primereact 7.0.0-rc.2 → 7.2.0
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/LICENSE.md +1 -1
- package/README.md +35 -10
- package/accordion/accordion.cjs.js +55 -42
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +7 -3
- package/accordion/accordion.esm.js +42 -29
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +55 -43
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -52
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +96 -61
- package/api/api.esm.js +96 -39
- package/api/api.esm.min.js +1 -1
- package/api/api.js +110 -53
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +97 -89
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +11 -4
- package/autocomplete/autocomplete.esm.js +34 -26
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +93 -90
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +21 -20
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +2 -1
- package/avatar/avatar.esm.js +16 -15
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +22 -21
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +14 -14
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +12 -12
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +15 -15
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +14 -14
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +12 -12
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +15 -15
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +38 -27
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +28 -18
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +37 -28
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +27 -27
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +12 -12
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +28 -28
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +44 -55
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +4 -11
- package/button/button.esm.js +33 -44
- package/button/button.esm.min.js +1 -1
- package/button/button.js +43 -56
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +209 -170
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +7 -2
- package/calendar/calendar.esm.js +84 -45
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +205 -171
- package/calendar/calendar.min.css +1 -1
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +12 -12
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.esm.js +11 -11
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +13 -13
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +24 -24
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +12 -12
- package/card/card.esm.min.js +1 -1
- package/card/card.js +25 -25
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +60 -58
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +24 -23
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +59 -59
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +65 -61
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +2 -1
- package/cascadeselect/cascadeselect.esm.js +21 -17
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +62 -62
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +19 -21
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +14 -14
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +18 -18
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +33 -28
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +2 -1
- package/checkbox/checkbox.esm.js +26 -21
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +33 -29
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +27 -25
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +3 -4
- package/chip/chip.esm.js +22 -20
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +28 -26
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +59 -33
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +10 -0
- package/chips/chips.esm.js +50 -24
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +59 -34
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +50 -46
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +20 -6
- package/colorpicker/colorpicker.esm.js +22 -18
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +47 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.cjs.js +31 -12
- package/column/column.cjs.min.js +1 -1
- package/column/column.d.ts +28 -2
- package/column/column.esm.js +31 -12
- package/column/column.esm.min.js +1 -1
- package/column/column.js +32 -13
- package/column/column.min.js +1 -1
- package/columngroup/columngroup.cjs.js +28 -12
- package/columngroup/columngroup.cjs.min.js +1 -1
- package/columngroup/columngroup.esm.js +28 -12
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +29 -13
- package/columngroup/columngroup.min.js +1 -1
- package/confirmdialog/confirmdialog.cjs.js +35 -33
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +4 -3
- package/confirmdialog/confirmdialog.esm.js +19 -17
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +35 -34
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +60 -55
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +6 -4
- package/confirmpopup/confirmpopup.esm.js +26 -22
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +57 -55
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +81 -76
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +2 -1
- package/contextmenu/contextmenu.esm.js +48 -44
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +78 -77
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +11284 -852
- package/core/core.min.js +40 -1
- package/csstransition/csstransition.cjs.js +62 -32
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +8 -0
- package/csstransition/csstransition.esm.js +61 -32
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +62 -34
- package/csstransition/csstransition.min.js +1 -1
- package/csstransition/package.json +2 -1
- package/datascroller/datascroller.cjs.js +23 -22
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.esm.js +15 -14
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +23 -23
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +838 -632
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +38 -14
- package/datatable/datatable.esm.js +575 -369
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +835 -633
- package/datatable/datatable.min.css +1 -1
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +43 -40
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +17 -14
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +42 -41
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +12 -12
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +11 -11
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +13 -13
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +78 -73
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +3 -1
- package/dialog/dialog.esm.js +31 -27
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +75 -74
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +15 -15
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +12 -12
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +16 -16
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +62 -28
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +13 -0
- package/dock/dock.esm.js +50 -16
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +62 -29
- package/dock/dock.min.css +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +120 -98
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +2 -1
- package/dropdown/dropdown.esm.js +58 -36
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +116 -99
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +58 -56
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +1 -0
- package/editor/editor.esm.js +22 -18
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +57 -53
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +31 -29
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +2 -1
- package/fieldset/fieldset.esm.js +17 -15
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +30 -30
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +79 -69
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -1
- package/fileupload/fileupload.esm.js +40 -30
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +79 -70
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +17 -19
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +12 -12
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +16 -16
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/galleria.cjs.js +85 -81
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +2 -1
- package/galleria/galleria.esm.js +21 -18
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +82 -82
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +13 -13
- package/gmap/gmap.cjs.min.js +1 -1
- package/gmap/gmap.esm.js +12 -12
- package/gmap/gmap.esm.min.js +1 -1
- package/gmap/gmap.js +14 -14
- package/gmap/gmap.min.js +1 -1
- package/image/image.cjs.js +69 -44
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +6 -5
- package/image/image.esm.js +44 -20
- package/image/image.esm.min.js +1 -1
- package/image/image.js +67 -45
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +19 -19
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +12 -12
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +20 -20
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +24 -23
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +1 -1
- package/inputmask/inputmask.esm.js +17 -16
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +24 -24
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +90 -63
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +4 -4
- package/inputnumber/inputnumber.esm.js +73 -46
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +89 -64
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +28 -25
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +21 -18
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +28 -26
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +25 -23
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +1 -1
- package/inputtext/inputtext.esm.js +16 -14
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +24 -24
- package/inputtext/inputtext.min.css +1 -1
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +23 -22
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +1 -1
- package/inputtextarea/inputtextarea.esm.js +15 -14
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +23 -23
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +9 -6
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +5 -2
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +10 -7
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +18 -18
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +12 -12
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +19 -19
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +52 -50
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +17 -15
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +51 -51
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +47 -46
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +13 -12
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +47 -47
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +69 -62
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +2 -1
- package/mention/mention.esm.js +25 -19
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +64 -63
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +45 -40
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +4 -1
- package/menu/menu.esm.js +19 -15
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +42 -41
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -46
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +15 -13
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -47
- package/menubar/menubar.min.css +1 -1
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +20 -19
- package/message/message.cjs.min.js +1 -1
- package/message/message.d.ts +3 -1
- package/message/message.esm.js +14 -13
- package/message/message.esm.min.js +1 -1
- package/message/message.js +21 -20
- package/message/message.min.js +1 -1
- package/messages/messages.cjs.js +30 -28
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +2 -1
- package/messages/messages.esm.js +14 -12
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +29 -29
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -136
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +5 -2
- package/multiselect/multiselect.esm.js +64 -52
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +144 -137
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +27 -26
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +2 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +15 -14
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +27 -27
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +46 -45
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +13 -12
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +46 -46
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +37 -37
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +12 -12
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +38 -38
- package/organizationchart/organizationchart.min.css +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +45 -42
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +3 -2
- package/overlaypanel/overlaypanel.esm.js +23 -21
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +41 -43
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.cjs.js +2 -2
- package/overlayservice/overlayservice.cjs.min.js +1 -1
- package/overlayservice/overlayservice.esm.js +1 -1
- package/overlayservice/overlayservice.esm.min.js +1 -1
- package/overlayservice/overlayservice.js +3 -3
- package/overlayservice/overlayservice.min.js +1 -1
- package/package.json +11 -4
- package/paginator/paginator.cjs.js +61 -60
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +15 -14
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +61 -61
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +35 -32
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +5 -3
- package/panel/panel.esm.js +20 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +34 -33
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +53 -52
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +2 -1
- package/panelmenu/panelmenu.esm.js +15 -14
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +53 -53
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +47 -43
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +3 -2
- package/password/password.esm.js +21 -17
- package/password/password.esm.min.js +1 -1
- package/password/password.js +44 -44
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +69 -65
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +25 -21
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +69 -66
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +17 -20
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +15 -18
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +18 -22
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +3793 -2921
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2567 -1694
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +3792 -2918
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +20 -20
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +12 -12
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +21 -21
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/progressspinner.cjs.js +16 -16
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +12 -12
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +17 -17
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +23 -22
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +15 -14
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +23 -23
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +23 -22
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +17 -16
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +23 -23
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +216 -140
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +94 -42
- package/resources/themes/arya-green/theme.css +94 -42
- package/resources/themes/arya-orange/theme.css +94 -42
- package/resources/themes/arya-purple/theme.css +94 -42
- package/resources/themes/bootstrap4-dark-blue/theme.css +75 -30
- package/resources/themes/bootstrap4-dark-purple/theme.css +75 -30
- package/resources/themes/bootstrap4-light-blue/theme.css +74 -29
- package/resources/themes/bootstrap4-light-purple/theme.css +74 -29
- package/resources/themes/fluent-light/theme.css +94 -42
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5707 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5707 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5707 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5707 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5707 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5707 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5707 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5707 -0
- package/resources/themes/luna-amber/theme.css +91 -46
- package/resources/themes/luna-blue/theme.css +91 -46
- package/resources/themes/luna-green/theme.css +91 -46
- package/resources/themes/luna-pink/theme.css +91 -46
- package/resources/themes/md-dark-deeppurple/theme.css +265 -53
- package/resources/themes/md-dark-indigo/theme.css +265 -53
- package/resources/themes/md-light-deeppurple/theme.css +265 -53
- package/resources/themes/md-light-indigo/theme.css +265 -53
- package/resources/themes/mdc-dark-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-dark-indigo/theme.css +265 -53
- package/resources/themes/mdc-light-deeppurple/theme.css +265 -53
- package/resources/themes/mdc-light-indigo/theme.css +265 -53
- package/resources/themes/nova/theme.css +91 -46
- package/resources/themes/nova-accent/theme.css +91 -46
- package/resources/themes/nova-alt/theme.css +91 -46
- package/resources/themes/rhea/theme.css +91 -46
- package/resources/themes/saga-blue/theme.css +77 -25
- package/resources/themes/saga-green/theme.css +77 -25
- package/resources/themes/saga-orange/theme.css +77 -25
- package/resources/themes/saga-purple/theme.css +77 -25
- package/resources/themes/tailwind-light/theme.css +101 -49
- package/resources/themes/vela-blue/theme.css +94 -42
- package/resources/themes/vela-green/theme.css +94 -42
- package/resources/themes/vela-orange/theme.css +94 -42
- package/resources/themes/vela-purple/theme.css +94 -42
- package/ripple/ripple.cjs.js +22 -22
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +14 -14
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +23 -23
- package/ripple/ripple.min.js +1 -1
- package/row/row.cjs.js +12 -12
- package/row/row.cjs.min.js +1 -1
- package/row/row.esm.js +11 -11
- package/row/row.esm.min.js +1 -1
- package/row/row.js +13 -13
- package/row/row.min.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +30 -30
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +12 -12
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +31 -31
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +30 -25
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +4 -2
- package/scrolltop/scrolltop.esm.js +21 -17
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +28 -26
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +31 -29
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +17 -15
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +30 -30
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +3 -1
- package/sidebar/sidebar.cjs.js +154 -127
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +4 -1
- package/sidebar/sidebar.esm.js +145 -119
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +151 -128
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +14 -14
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +12 -12
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +15 -15
- package/skeleton/skeleton.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +49 -44
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +2 -1
- package/slidemenu/slidemenu.esm.js +19 -15
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +46 -45
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +40 -30
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +32 -22
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +41 -31
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +33 -32
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +3 -2
- package/speeddial/speeddial.esm.js +15 -14
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +33 -33
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +58 -50
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +8 -6
- package/splitbutton/splitbutton.esm.js +28 -20
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +55 -51
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +31 -31
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +14 -14
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +32 -32
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +21 -21
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +12 -12
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +22 -22
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.cjs.js +28 -28
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.esm.js +12 -12
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +29 -29
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +27 -26
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +13 -12
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -27
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +224 -79
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +12 -1
- package/tabview/tabview.esm.js +194 -49
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +224 -80
- package/tabview/tabview.min.css +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +20 -19
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +2 -1
- package/tag/tag.esm.js +16 -15
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +21 -20
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +23 -23
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +12 -12
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +24 -24
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.cjs.js +2 -2
- package/terminalservice/terminalservice.cjs.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +3 -3
- package/terminalservice/terminalservice.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +54 -48
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +2 -1
- package/tieredmenu/tieredmenu.esm.js +20 -15
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +50 -49
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +23 -23
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +12 -12
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +24 -24
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +72 -55
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +5 -1
- package/toast/toast.esm.js +46 -30
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +69 -56
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +27 -22
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +3 -2
- package/togglebutton/togglebutton.esm.js +21 -16
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +26 -23
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +18 -18
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +12 -12
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +19 -19
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +78 -49
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +0 -1
- package/tooltip/tooltip.esm.js +49 -21
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +77 -50
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +2 -0
- package/tree/tree.cjs.js +69 -68
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +14 -3
- package/tree/tree.esm.js +19 -18
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +69 -69
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +4 -1
- package/treeselect/treeselect.cjs.js +66 -62
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +11 -3
- package/treeselect/treeselect.esm.js +26 -22
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +63 -63
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +1393 -330
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +11 -3
- package/treetable/treetable.esm.js +1303 -240
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +1392 -331
- package/treetable/treetable.min.css +1 -1
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +24 -23
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +15 -14
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +24 -24
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/utils/utils.cjs.js +174 -51
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +18 -0
- package/utils/utils.esm.js +173 -51
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +175 -52
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +79 -53
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +64 -38
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +80 -54
- package/virtualscroller/virtualscroller.min.css +1 -1
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +45 -8
- package/core/core.cjs.js +0 -2987
- package/core/core.cjs.min.js +0 -1
- package/core/core.esm.js +0 -2963
- package/core/core.esm.min.js +0 -1
- package/core/package.json +0 -5
- package/util.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{Component as e}from"react";import{FilterService as n}from"primereact/api";import{DomHandler as o,classNames as r,ObjectUtils as i,Ripple as l,tip as s}from"primereact/core";import{InputText as a}from"primereact/inputtext";import{VirtualScroller as p}from"primereact/virtualscroller";function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function f(t){if(Array.isArray(t))return c(t)}function h(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function d(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t){return f(t)||h(t)||d(t)||v()}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,e,n){return e&&m(t.prototype,e),n&&m(t,n),t}function O(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function k(t,e){return(k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&k(t,e)}function S(t){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return O(t)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var L=function(n){E(u,e);var s,a,p=(s=u,a=T(),function(){var t,e=w(s);if(a){var n=w(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return C(this,t)});function u(t){var e;return b(this,u),(e=p.call(this,t)).onClick=e.onClick.bind(O(e)),e.onTouchEnd=e.onTouchEnd.bind(O(e)),e.onKeyDown=e.onKeyDown.bind(O(e)),e}return g(u,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option}),t.preventDefault()}},{key:"onTouchEnd",value:function(t){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:t,option:this.props.option})}},{key:"onKeyDown",value:function(t){var e=t.currentTarget;switch(t.which){case 40:var n=this.findNextItem(e);n&&n.focus(),t.preventDefault();break;case 38:var o=this.findPrevItem(e);o&&o.focus(),t.preventDefault();break;case 13:this.onClick(t),t.preventDefault()}}},{key:"findNextItem",value:function(t){var e=t.nextElementSibling;return e?o.hasClass(e,"p-disabled")||o.hasClass(e,"p-listbox-item-group")?this.findNextItem(e):e:null}},{key:"findPrevItem",value:function(t){var e=t.previousElementSibling;return e?o.hasClass(e,"p-disabled")||o.hasClass(e,"p-listbox-item-group")?this.findPrevItem(e):e:null}},{key:"render",value:function(){var e=r("p-listbox-item",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled},this.props.option.className),n=this.props.template?i.getJSXElement(this.props.template,this.props.option):this.props.label;return t.createElement("li",{className:e,onClick:this.onClick,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,"aria-label":this.props.label,key:this.props.label,role:"option","aria-selected":this.props.selected},n,t.createElement(l,null))}}]),u}();function D(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}x(L,"defaultProps",{option:null,label:null,selected:!1,disabled:!1,tabIndex:null,onClick:null,onTouchEnd:null,template:null});var F=function(n){E(l,e);var o,r,i=(o=l,r=D(),function(){var t,e=w(o);if(r){var n=w(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return C(this,t)});function l(t){var e;return b(this,l),(e=i.call(this,t)).onFilter=e.onFilter.bind(O(e)),e}return g(l,[{key:"onFilter",value:function(t){this.props.onFilter&&this.props.onFilter({originalEvent:t,value:t.target.value})}},{key:"render",value:function(){return t.createElement("div",{className:"p-listbox-header"},t.createElement("div",{className:"p-listbox-filter-container"},t.createElement(a,{type:"text",value:this.props.filter,onChange:this.onFilter,className:"p-listbox-filter",disabled:this.props.disabled,placeholder:this.props.filterPlaceholder}),t.createElement("span",{className:"p-listbox-filter-icon pi pi-search"})))}}]),l}();function P(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=V(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}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 i,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}function V(t,e){if(t){if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(t,e):void 0}}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}x(F,"defaultProps",{filter:null,filterPlaceholder:null,disabled:!1,onFilter:null});var G=function(o){E(f,e);var l,a,c=(l=f,a=R(),function(){var t,e=w(l);if(a){var n=w(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return C(this,t)});function f(t){var e;return b(this,f),(e=c.call(this,t)).state={},e.props.onFilterValueChange||(e.state.filterValue=""),e.onFilter=e.onFilter.bind(O(e)),e.onOptionSelect=e.onOptionSelect.bind(O(e)),e.onOptionTouchEnd=e.onOptionTouchEnd.bind(O(e)),e}return g(f,[{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(K({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=s({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"getFilterValue",value:function(){return(this.props.onFilterValueChange?this.props.filterValue:this.state.filterValue)||""}},{key:"onOptionSelect",value:function(t){var e=t.option;this.props.disabled||this.isOptionDisabled(e)||(this.props.multiple?this.onOptionSelectMultiple(t.originalEvent,e):this.onOptionSelectSingle(t.originalEvent,e),this.optionTouched=!1)}},{key:"onOptionTouchEnd",value:function(){this.props.disabled||(this.optionTouched=!0)}},{key:"onOptionSelectSingle",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;!this.optionTouched&&this.props.metaKeySelection?n?(t.metaKey||t.ctrlKey)&&(r=null,o=!0):(r=this.getOptionValue(e),o=!0):(r=n?null:this.getOptionValue(e),o=!0);o&&this.updateModel(t,r)}},{key:"onOptionSelectMultiple",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;if(!this.optionTouched&&this.props.metaKeySelection){var i=t.metaKey||t.ctrlKey;n?(r=i?this.removeOption(e):[this.getOptionValue(e)],o=!0):(r=[].concat(y(r=i&&this.props.value||[]),[this.getOptionValue(e)]),o=!0)}else r=n?this.removeOption(e):[].concat(y(this.props.value||[]),[this.getOptionValue(e)]),o=!0;o&&this.props.onChange({originalEvent:t,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}},{key:"onFilter",value:function(t){var e=t.value;this.props.onFilterValueChange?this.props.onFilterValueChange({originalEvent:t.originalEvent,value:e}):this.setState({filterValue:e})}},{key:"updateModel",value:function(t,e){this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"removeOption",value:function(t){var e=this;return this.props.value.filter((function(n){return!i.equals(n,e.getOptionValue(t),e.props.dataKey)}))}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value){var o,r=P(this.props.value);try{for(r.s();!(o=r.n()).done;){if(i.equals(o.value,n,this.props.dataKey)){e=!0;break}}}catch(t){r.e(t)}finally{r.f()}}}else e=i.equals(this.props.value,n,this.props.dataKey);return e}},{key:"filter",value:function(t){var e=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale);return this.getOptionLabel(t).toLocaleLowerCase(this.props.filterLocale).indexOf(e)>-1}},{key:"hasFilter",value:function(){var t=this.getFilterValue();return t&&t.trim().length>0}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?i.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?i.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"getOptionRenderKey",value:function(t){return this.props.dataKey?i.resolveFieldData(t,this.props.dataKey):this.getOptionLabel(t)}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?i.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):i.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"getOptionGroupRenderKey",value:function(t){return i.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupLabel",value:function(t){return i.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupChildren",value:function(t){return i.resolveFieldData(t,this.props.optionGroupChildren)}},{key:"getVisibleOptions",value:function(){if(this.hasFilter()){var t=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale),e=this.props.filterBy?this.props.filterBy.split(","):[this.props.optionLabel||"label"];if(this.props.optionGroupLabel){var o,r=[],i=P(this.props.options);try{for(i.s();!(o=i.n()).done;){var l=o.value,s=n.filter(this.getOptionGroupChildren(l),e,t,this.props.filterMatchMode,this.props.filterLocale);s&&s.length&&r.push(K(K({},l),{items:s}))}}catch(t){i.e(t)}finally{i.f()}return r}return n.filter(this.props.options,e,t,this.props.filterMatchMode,this.props.filterLocale)}return this.props.options}},{key:"renderGroupChildren",value:function(e){var n=this;return this.getOptionGroupChildren(e).map((function(e,o){var r=n.getOptionLabel(e),i=o+"_"+n.getOptionRenderKey(e),l=n.isOptionDisabled(e),s=l?null:n.props.tabIndex||0;return t.createElement(L,{key:i,label:r,option:e,template:n.props.itemTemplate,selected:n.isSelected(e),onClick:n.onOptionSelect,onTouchEnd:n.onOptionTouchEnd,tabIndex:s,disabled:l})}))}},{key:"renderItem",value:function(e,n){if(this.props.optionGroupLabel){var o=this.props.optionGroupTemplate?i.getJSXElement(this.props.optionGroupTemplate,e,n):this.getOptionGroupLabel(e),r=this.renderGroupChildren(e),l=n+"_"+this.getOptionGroupRenderKey(e);return t.createElement(t.Fragment,{key:l},t.createElement("li",{className:"p-listbox-item-group"},o),r)}var s=this.getOptionLabel(e),a=n+"_"+this.getOptionRenderKey(e),p=this.isOptionDisabled(e),u=p?null:this.props.tabIndex||0;return t.createElement(L,{key:a,label:s,option:e,template:this.props.itemTemplate,selected:this.isSelected(e),onClick:this.onOptionSelect,onTouchEnd:this.onOptionTouchEnd,tabIndex:u,disabled:p})}},{key:"renderItems",value:function(t){var e=this;return t&&t.length?t.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"renderList",value:function(e){var n=this;if(this.props.virtualScrollerOptions){var o=K(K({},this.props.virtualScrollerOptions),{items:e,onLazyLoad:function(t){return n.props.virtualScrollerOptions.onLazyLoad(K(K({},t),{filter:n.getFilterValue()}))},itemTemplate:function(t,e){return t&&n.renderItem(t,e.index)},contentTemplate:function(e){var o=r("p-listbox-list",e.className);return t.createElement("ul",{ref:e.contentRef,className:o,role:"listbox","aria-multiselectable":n.props.multiple},e.children)}});return t.createElement(p,u({ref:function(t){return n.virtualScrollerRef=t}},o))}var i=this.renderItems(e);return t.createElement("ul",{className:"p-listbox-list",role:"listbox","aria-multiselectable":this.props.multiple},i)}},{key:"render",value:function(){var e,n=this,o=r("p-listbox p-component",{"p-disabled":this.props.disabled},this.props.className),i=r("p-listbox-list-wrapper",this.props.listClassName),l=this.getVisibleOptions(),s=this.renderList(l);return this.props.filter&&(e=t.createElement(F,{filter:this.getFilterValue(),onFilter:this.onFilter,disabled:this.props.disabled,filterPlaceholder:this.props.filterPlaceholder})),t.createElement("div",{ref:function(t){return n.element=t},id:this.props.id,className:o,style:this.props.style},e,t.createElement("div",{ref:function(t){return n.wrapper=t},className:i,style:this.props.listStyle},s))}}]),f}();x(G,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,optionGroupTemplate:null,itemTemplate:null,style:null,listStyle:null,listClassName:null,className:null,virtualScrollerOptions:null,disabled:null,dataKey:null,multiple:!1,metaKeySelection:!1,filter:!1,filterBy:null,filterValue:null,filterMatchMode:"contains",filterPlaceholder:null,filterLocale:void 0,tabIndex:0,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFilterValueChange:null});export{G as ListBox};
|
|
1
|
+
import t,{Component as e}from"react";import{FilterService as n}from"primereact/api";import{DomHandler as o,classNames as r,ObjectUtils as i}from"primereact/utils";import{Ripple as l}from"primereact/ripple";import{InputText as a}from"primereact/inputtext";import{tip as s}from"primereact/tooltip";import{VirtualScroller as p}from"primereact/virtualscroller";function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},u.apply(this,arguments)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function f(t){if(Array.isArray(t))return c(t)}function h(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function d(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(t){return f(t)||h(t)||d(t)||y()}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function O(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function k(t,e){return k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},k(t,e)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function w(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return O(t)}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function T(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var L=function(n){E(u,e);var a,s,p=(a=u,s=T(),function(){var t,e=C(a);if(s){var n=C(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return w(this,t)});function u(t){var e;return m(this,u),(e=p.call(this,t)).onClick=e.onClick.bind(O(e)),e.onTouchEnd=e.onTouchEnd.bind(O(e)),e.onKeyDown=e.onKeyDown.bind(O(e)),e}return g(u,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option}),t.preventDefault()}},{key:"onTouchEnd",value:function(t){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:t,option:this.props.option})}},{key:"onKeyDown",value:function(t){var e=t.currentTarget;switch(t.which){case 40:var n=this.findNextItem(e);n&&n.focus(),t.preventDefault();break;case 38:var o=this.findPrevItem(e);o&&o.focus(),t.preventDefault();break;case 13:this.onClick(t),t.preventDefault()}}},{key:"findNextItem",value:function(t){var e=t.nextElementSibling;return e?o.hasClass(e,"p-disabled")||o.hasClass(e,"p-listbox-item-group")?this.findNextItem(e):e:null}},{key:"findPrevItem",value:function(t){var e=t.previousElementSibling;return e?o.hasClass(e,"p-disabled")||o.hasClass(e,"p-listbox-item-group")?this.findPrevItem(e):e:null}},{key:"render",value:function(){var e=r("p-listbox-item",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled},this.props.option.className),n=this.props.template?i.getJSXElement(this.props.template,this.props.option):this.props.label;return t.createElement("li",{className:e,onClick:this.onClick,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,"aria-label":this.props.label,key:this.props.label,role:"option","aria-selected":this.props.selected},n,t.createElement(l,null))}}]),u}();function D(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}x(L,"defaultProps",{option:null,label:null,selected:!1,disabled:!1,tabIndex:null,onClick:null,onTouchEnd:null,template:null});var F=function(n){E(l,e);var o,r,i=(o=l,r=D(),function(){var t,e=C(o);if(r){var n=C(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return w(this,t)});function l(t){var e;return m(this,l),(e=i.call(this,t)).onFilter=e.onFilter.bind(O(e)),e}return g(l,[{key:"onFilter",value:function(t){this.props.onFilter&&this.props.onFilter({originalEvent:t,value:t.target.value})}},{key:"render",value:function(){return t.createElement("div",{className:"p-listbox-header"},t.createElement("div",{className:"p-listbox-filter-container"},t.createElement(a,{type:"text",value:this.props.filter,onChange:this.onFilter,className:"p-listbox-filter",disabled:this.props.disabled,placeholder:this.props.filterPlaceholder}),t.createElement("span",{className:"p-listbox-filter-icon pi pi-search"})))}}]),l}();function P(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=j(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}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 i,l=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function j(t,e){if(t){if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(t,e):void 0}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}x(F,"defaultProps",{filter:null,filterPlaceholder:null,disabled:!1,onFilter:null});var G=function(o){E(f,e);var l,a,c=(l=f,a=R(),function(){var t,e=C(l);if(a){var n=C(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return w(this,t)});function f(t){var e;return m(this,f),(e=c.call(this,t)).state={},e.props.onFilterValueChange||(e.state.filterValue=""),e.onFilter=e.onFilter.bind(O(e)),e.onOptionSelect=e.onOptionSelect.bind(O(e)),e.onOptionTouchEnd=e.onOptionTouchEnd.bind(O(e)),e}return g(f,[{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(K({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=s({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"getFilterValue",value:function(){return(this.props.onFilterValueChange?this.props.filterValue:this.state.filterValue)||""}},{key:"onOptionSelect",value:function(t){var e=t.option;this.props.disabled||this.isOptionDisabled(e)||(this.props.multiple?this.onOptionSelectMultiple(t.originalEvent,e):this.onOptionSelectSingle(t.originalEvent,e),this.optionTouched=!1)}},{key:"onOptionTouchEnd",value:function(){this.props.disabled||(this.optionTouched=!0)}},{key:"onOptionSelectSingle",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;!this.optionTouched&&this.props.metaKeySelection?n?(t.metaKey||t.ctrlKey)&&(r=null,o=!0):(r=this.getOptionValue(e),o=!0):(r=n?null:this.getOptionValue(e),o=!0);o&&this.updateModel(t,r)}},{key:"onOptionSelectMultiple",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;if(!this.optionTouched&&this.props.metaKeySelection){var i=t.metaKey||t.ctrlKey;n?(r=i?this.removeOption(e):[this.getOptionValue(e)],o=!0):(r=[].concat(v(r=i&&this.props.value||[]),[this.getOptionValue(e)]),o=!0)}else r=n?this.removeOption(e):[].concat(v(this.props.value||[]),[this.getOptionValue(e)]),o=!0;o&&this.props.onChange({originalEvent:t,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}},{key:"onFilter",value:function(t){var e=t.value;this.props.onFilterValueChange?this.props.onFilterValueChange({originalEvent:t.originalEvent,value:e}):this.setState({filterValue:e})}},{key:"updateModel",value:function(t,e){this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"removeOption",value:function(t){var e=this;return this.props.value.filter((function(n){return!i.equals(n,e.getOptionValue(t),e.props.dataKey)}))}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value){var o,r=P(this.props.value);try{for(r.s();!(o=r.n()).done;){if(i.equals(o.value,n,this.props.dataKey)){e=!0;break}}}catch(t){r.e(t)}finally{r.f()}}}else e=i.equals(this.props.value,n,this.props.dataKey);return e}},{key:"filter",value:function(t){var e=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale);return this.getOptionLabel(t).toLocaleLowerCase(this.props.filterLocale).indexOf(e)>-1}},{key:"hasFilter",value:function(){var t=this.getFilterValue();return t&&t.trim().length>0}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?i.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?i.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"getOptionRenderKey",value:function(t){return this.props.dataKey?i.resolveFieldData(t,this.props.dataKey):this.getOptionLabel(t)}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?i.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):i.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"getOptionGroupRenderKey",value:function(t){return i.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupLabel",value:function(t){return i.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupChildren",value:function(t){return i.resolveFieldData(t,this.props.optionGroupChildren)}},{key:"getVisibleOptions",value:function(){if(this.hasFilter()){var t=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale),e=this.props.filterBy?this.props.filterBy.split(","):[this.props.optionLabel||"label"];if(this.props.optionGroupLabel){var o,r=[],i=P(this.props.options);try{for(i.s();!(o=i.n()).done;){var l=o.value,a=n.filter(this.getOptionGroupChildren(l),e,t,this.props.filterMatchMode,this.props.filterLocale);a&&a.length&&r.push(K(K({},l),{items:a}))}}catch(t){i.e(t)}finally{i.f()}return r}return n.filter(this.props.options,e,t,this.props.filterMatchMode,this.props.filterLocale)}return this.props.options}},{key:"renderGroupChildren",value:function(e){var n=this;return this.getOptionGroupChildren(e).map((function(e,o){var r=n.getOptionLabel(e),i=o+"_"+n.getOptionRenderKey(e),l=n.isOptionDisabled(e),a=l?null:n.props.tabIndex||0;return t.createElement(L,{key:i,label:r,option:e,template:n.props.itemTemplate,selected:n.isSelected(e),onClick:n.onOptionSelect,onTouchEnd:n.onOptionTouchEnd,tabIndex:a,disabled:l})}))}},{key:"renderItem",value:function(e,n){if(this.props.optionGroupLabel){var o=this.props.optionGroupTemplate?i.getJSXElement(this.props.optionGroupTemplate,e,n):this.getOptionGroupLabel(e),r=this.renderGroupChildren(e),l=n+"_"+this.getOptionGroupRenderKey(e);return t.createElement(t.Fragment,{key:l},t.createElement("li",{className:"p-listbox-item-group"},o),r)}var a=this.getOptionLabel(e),s=n+"_"+this.getOptionRenderKey(e),p=this.isOptionDisabled(e),u=p?null:this.props.tabIndex||0;return t.createElement(L,{key:s,label:a,option:e,template:this.props.itemTemplate,selected:this.isSelected(e),onClick:this.onOptionSelect,onTouchEnd:this.onOptionTouchEnd,tabIndex:u,disabled:p})}},{key:"renderItems",value:function(t){var e=this;return t&&t.length?t.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"renderList",value:function(e){var n=this;if(this.props.virtualScrollerOptions){var o=K(K({},this.props.virtualScrollerOptions),{items:e,onLazyLoad:function(t){return n.props.virtualScrollerOptions.onLazyLoad(K(K({},t),{filter:n.getFilterValue()}))},itemTemplate:function(t,e){return t&&n.renderItem(t,e.index)},contentTemplate:function(e){var o=r("p-listbox-list",e.className);return t.createElement("ul",{ref:e.contentRef,className:o,role:"listbox","aria-multiselectable":n.props.multiple},e.children)}});return t.createElement(p,u({ref:function(t){return n.virtualScrollerRef=t}},o))}var i=this.renderItems(e);return t.createElement("ul",{className:"p-listbox-list",role:"listbox","aria-multiselectable":this.props.multiple},i)}},{key:"render",value:function(){var e,n=this,o=r("p-listbox p-component",{"p-disabled":this.props.disabled},this.props.className),i=r("p-listbox-list-wrapper",this.props.listClassName),l=this.getVisibleOptions(),a=this.renderList(l);return this.props.filter&&(e=t.createElement(F,{filter:this.getFilterValue(),onFilter:this.onFilter,disabled:this.props.disabled,filterPlaceholder:this.props.filterPlaceholder})),t.createElement("div",{ref:function(t){return n.element=t},id:this.props.id,className:o,style:this.props.style},e,t.createElement("div",{ref:function(t){return n.wrapper=t},className:i,style:this.props.listStyle},a))}}]),f}();x(G,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,optionGroupTemplate:null,itemTemplate:null,style:null,listStyle:null,listClassName:null,className:null,virtualScrollerOptions:null,disabled:null,dataKey:null,multiple:!1,metaKeySelection:!1,filter:!1,filterBy:null,filterValue:null,filterMatchMode:"contains",filterPlaceholder:null,filterLocale:void 0,tabIndex:0,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFilterValueChange:null});export{G as ListBox};
|
package/listbox/listbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.listbox = (function (exports, React, api,
|
|
2
|
+
this.primereact.listbox = (function (exports, React, api, utils, ripple, inputtext, tooltip, virtualscroller) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -78,6 +78,9 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
78
78
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
79
79
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
80
80
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
81
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
82
|
+
writable: false
|
|
83
|
+
});
|
|
81
84
|
return Constructor;
|
|
82
85
|
}
|
|
83
86
|
|
|
@@ -110,23 +113,20 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
110
113
|
configurable: true
|
|
111
114
|
}
|
|
112
115
|
});
|
|
116
|
+
Object.defineProperty(subClass, "prototype", {
|
|
117
|
+
writable: false
|
|
118
|
+
});
|
|
113
119
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
function _typeof(obj) {
|
|
117
123
|
"@babel/helpers - typeof";
|
|
118
124
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
_typeof = function _typeof(obj) {
|
|
125
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return _typeof(obj);
|
|
125
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
126
|
+
return typeof obj;
|
|
127
|
+
} : function (obj) {
|
|
128
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
129
|
+
}, _typeof(obj);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -242,23 +242,23 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
242
242
|
key: "findNextItem",
|
|
243
243
|
value: function findNextItem(item) {
|
|
244
244
|
var nextItem = item.nextElementSibling;
|
|
245
|
-
if (nextItem) return
|
|
245
|
+
if (nextItem) return utils.DomHandler.hasClass(nextItem, 'p-disabled') || utils.DomHandler.hasClass(nextItem, 'p-listbox-item-group') ? this.findNextItem(nextItem) : nextItem;else return null;
|
|
246
246
|
}
|
|
247
247
|
}, {
|
|
248
248
|
key: "findPrevItem",
|
|
249
249
|
value: function findPrevItem(item) {
|
|
250
250
|
var prevItem = item.previousElementSibling;
|
|
251
|
-
if (prevItem) return
|
|
251
|
+
if (prevItem) return utils.DomHandler.hasClass(prevItem, 'p-disabled') || utils.DomHandler.hasClass(prevItem, 'p-listbox-item-group') ? this.findPrevItem(prevItem) : prevItem;else return null;
|
|
252
252
|
}
|
|
253
253
|
}, {
|
|
254
254
|
key: "render",
|
|
255
255
|
value: function render() {
|
|
256
|
-
var className =
|
|
256
|
+
var className = utils.classNames('p-listbox-item', {
|
|
257
257
|
'p-highlight': this.props.selected,
|
|
258
258
|
'p-disabled': this.props.disabled
|
|
259
259
|
}, this.props.option.className);
|
|
260
|
-
var content = this.props.template ?
|
|
261
|
-
return /*#__PURE__*/React__default[
|
|
260
|
+
var content = this.props.template ? utils.ObjectUtils.getJSXElement(this.props.template, this.props.option) : this.props.label;
|
|
261
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
262
262
|
className: className,
|
|
263
263
|
onClick: this.onClick,
|
|
264
264
|
onTouchEnd: this.onTouchEnd,
|
|
@@ -268,7 +268,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
268
268
|
key: this.props.label,
|
|
269
269
|
role: "option",
|
|
270
270
|
"aria-selected": this.props.selected
|
|
271
|
-
}, content, /*#__PURE__*/React__default[
|
|
271
|
+
}, content, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
272
272
|
}
|
|
273
273
|
}]);
|
|
274
274
|
|
|
@@ -317,18 +317,18 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
317
317
|
}, {
|
|
318
318
|
key: "render",
|
|
319
319
|
value: function render() {
|
|
320
|
-
return /*#__PURE__*/React__default[
|
|
320
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
321
321
|
className: "p-listbox-header"
|
|
322
|
-
}, /*#__PURE__*/React__default[
|
|
322
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
323
323
|
className: "p-listbox-filter-container"
|
|
324
|
-
}, /*#__PURE__*/React__default[
|
|
324
|
+
}, /*#__PURE__*/React__default["default"].createElement(inputtext.InputText, {
|
|
325
325
|
type: "text",
|
|
326
326
|
value: this.props.filter,
|
|
327
327
|
onChange: this.onFilter,
|
|
328
328
|
className: "p-listbox-filter",
|
|
329
329
|
disabled: this.props.disabled,
|
|
330
330
|
placeholder: this.props.filterPlaceholder
|
|
331
|
-
}), /*#__PURE__*/React__default[
|
|
331
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
332
332
|
className: "p-listbox-filter-icon pi pi-search"
|
|
333
333
|
})));
|
|
334
334
|
}
|
|
@@ -344,15 +344,15 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
344
344
|
onFilter: null
|
|
345
345
|
});
|
|
346
346
|
|
|
347
|
-
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
|
|
347
|
+
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; } } }; }
|
|
348
348
|
|
|
349
349
|
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); }
|
|
350
350
|
|
|
351
351
|
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; }
|
|
352
352
|
|
|
353
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
353
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
354
354
|
|
|
355
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
355
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
356
356
|
|
|
357
357
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
358
358
|
|
|
@@ -407,7 +407,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
407
407
|
}, {
|
|
408
408
|
key: "renderTooltip",
|
|
409
409
|
value: function renderTooltip() {
|
|
410
|
-
this.tooltip =
|
|
410
|
+
this.tooltip = tooltip.tip({
|
|
411
411
|
target: this.element,
|
|
412
412
|
content: this.props.tooltip,
|
|
413
413
|
options: this.props.tooltipOptions
|
|
@@ -546,7 +546,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
546
546
|
var _this2 = this;
|
|
547
547
|
|
|
548
548
|
return this.props.value.filter(function (val) {
|
|
549
|
-
return !
|
|
549
|
+
return !utils.ObjectUtils.equals(val, _this2.getOptionValue(option), _this2.props.dataKey);
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
}, {
|
|
@@ -564,7 +564,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
564
564
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
565
565
|
var val = _step.value;
|
|
566
566
|
|
|
567
|
-
if (
|
|
567
|
+
if (utils.ObjectUtils.equals(val, optionValue, this.props.dataKey)) {
|
|
568
568
|
selected = true;
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
@@ -576,7 +576,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
} else {
|
|
579
|
-
selected =
|
|
579
|
+
selected = utils.ObjectUtils.equals(this.props.value, optionValue, this.props.dataKey);
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
return selected;
|
|
@@ -597,23 +597,23 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
597
597
|
}, {
|
|
598
598
|
key: "getOptionLabel",
|
|
599
599
|
value: function getOptionLabel(option) {
|
|
600
|
-
return this.props.optionLabel ?
|
|
600
|
+
return this.props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
|
|
601
601
|
}
|
|
602
602
|
}, {
|
|
603
603
|
key: "getOptionValue",
|
|
604
604
|
value: function getOptionValue(option) {
|
|
605
|
-
return this.props.optionValue ?
|
|
605
|
+
return this.props.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
|
|
606
606
|
}
|
|
607
607
|
}, {
|
|
608
608
|
key: "getOptionRenderKey",
|
|
609
609
|
value: function getOptionRenderKey(option) {
|
|
610
|
-
return this.props.dataKey ?
|
|
610
|
+
return this.props.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.props.dataKey) : this.getOptionLabel(option);
|
|
611
611
|
}
|
|
612
612
|
}, {
|
|
613
613
|
key: "isOptionDisabled",
|
|
614
614
|
value: function isOptionDisabled(option) {
|
|
615
615
|
if (this.props.optionDisabled) {
|
|
616
|
-
return
|
|
616
|
+
return utils.ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : utils.ObjectUtils.resolveFieldData(option, this.props.optionDisabled);
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
@@ -621,17 +621,17 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
621
621
|
}, {
|
|
622
622
|
key: "getOptionGroupRenderKey",
|
|
623
623
|
value: function getOptionGroupRenderKey(optionGroup) {
|
|
624
|
-
return
|
|
624
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);
|
|
625
625
|
}
|
|
626
626
|
}, {
|
|
627
627
|
key: "getOptionGroupLabel",
|
|
628
628
|
value: function getOptionGroupLabel(optionGroup) {
|
|
629
|
-
return
|
|
629
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);
|
|
630
630
|
}
|
|
631
631
|
}, {
|
|
632
632
|
key: "getOptionGroupChildren",
|
|
633
633
|
value: function getOptionGroupChildren(optionGroup) {
|
|
634
|
-
return
|
|
634
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren);
|
|
635
635
|
}
|
|
636
636
|
}, {
|
|
637
637
|
key: "getVisibleOptions",
|
|
@@ -685,7 +685,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
685
685
|
var disabled = _this3.isOptionDisabled(option);
|
|
686
686
|
|
|
687
687
|
var tabIndex = disabled ? null : _this3.props.tabIndex || 0;
|
|
688
|
-
return /*#__PURE__*/React__default[
|
|
688
|
+
return /*#__PURE__*/React__default["default"].createElement(ListBoxItem, {
|
|
689
689
|
key: optionKey,
|
|
690
690
|
label: optionLabel,
|
|
691
691
|
option: option,
|
|
@@ -702,12 +702,12 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
702
702
|
key: "renderItem",
|
|
703
703
|
value: function renderItem(option, index) {
|
|
704
704
|
if (this.props.optionGroupLabel) {
|
|
705
|
-
var groupContent = this.props.optionGroupTemplate ?
|
|
705
|
+
var groupContent = this.props.optionGroupTemplate ? utils.ObjectUtils.getJSXElement(this.props.optionGroupTemplate, option, index) : this.getOptionGroupLabel(option);
|
|
706
706
|
var groupChildrenContent = this.renderGroupChildren(option);
|
|
707
707
|
var key = index + '_' + this.getOptionGroupRenderKey(option);
|
|
708
|
-
return /*#__PURE__*/React__default[
|
|
708
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
709
709
|
key: key
|
|
710
|
-
}, /*#__PURE__*/React__default[
|
|
710
|
+
}, /*#__PURE__*/React__default["default"].createElement("li", {
|
|
711
711
|
className: "p-listbox-item-group"
|
|
712
712
|
}, groupContent), groupChildrenContent);
|
|
713
713
|
} else {
|
|
@@ -715,7 +715,7 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
715
715
|
var optionKey = index + '_' + this.getOptionRenderKey(option);
|
|
716
716
|
var disabled = this.isOptionDisabled(option);
|
|
717
717
|
var tabIndex = disabled ? null : this.props.tabIndex || 0;
|
|
718
|
-
return /*#__PURE__*/React__default[
|
|
718
|
+
return /*#__PURE__*/React__default["default"].createElement(ListBoxItem, {
|
|
719
719
|
key: optionKey,
|
|
720
720
|
label: optionLabel,
|
|
721
721
|
option: option,
|
|
@@ -758,8 +758,8 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
758
758
|
return item && _this5.renderItem(item, options.index);
|
|
759
759
|
},
|
|
760
760
|
contentTemplate: function contentTemplate(options) {
|
|
761
|
-
var className =
|
|
762
|
-
return /*#__PURE__*/React__default[
|
|
761
|
+
var className = utils.classNames('p-listbox-list', options.className);
|
|
762
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
763
763
|
ref: options.contentRef,
|
|
764
764
|
className: className,
|
|
765
765
|
role: "listbox",
|
|
@@ -768,14 +768,14 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
768
768
|
}
|
|
769
769
|
});
|
|
770
770
|
|
|
771
|
-
return /*#__PURE__*/React__default[
|
|
771
|
+
return /*#__PURE__*/React__default["default"].createElement(virtualscroller.VirtualScroller, _extends({
|
|
772
772
|
ref: function ref(el) {
|
|
773
773
|
return _this5.virtualScrollerRef = el;
|
|
774
774
|
}
|
|
775
775
|
}, virtualScrollerProps));
|
|
776
776
|
} else {
|
|
777
777
|
var items = this.renderItems(visibleOptions);
|
|
778
|
-
return /*#__PURE__*/React__default[
|
|
778
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
779
779
|
className: "p-listbox-list",
|
|
780
780
|
role: "listbox",
|
|
781
781
|
"aria-multiselectable": this.props.multiple
|
|
@@ -787,16 +787,16 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
787
787
|
value: function render() {
|
|
788
788
|
var _this6 = this;
|
|
789
789
|
|
|
790
|
-
var className =
|
|
790
|
+
var className = utils.classNames('p-listbox p-component', {
|
|
791
791
|
'p-disabled': this.props.disabled
|
|
792
792
|
}, this.props.className);
|
|
793
|
-
var listClassName =
|
|
793
|
+
var listClassName = utils.classNames('p-listbox-list-wrapper', this.props.listClassName);
|
|
794
794
|
var visibleOptions = this.getVisibleOptions();
|
|
795
795
|
var list = this.renderList(visibleOptions);
|
|
796
796
|
var header;
|
|
797
797
|
|
|
798
798
|
if (this.props.filter) {
|
|
799
|
-
header = /*#__PURE__*/React__default[
|
|
799
|
+
header = /*#__PURE__*/React__default["default"].createElement(ListBoxHeader, {
|
|
800
800
|
filter: this.getFilterValue(),
|
|
801
801
|
onFilter: this.onFilter,
|
|
802
802
|
disabled: this.props.disabled,
|
|
@@ -804,14 +804,14 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
806
|
|
|
807
|
-
return /*#__PURE__*/React__default[
|
|
807
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
808
808
|
ref: function ref(el) {
|
|
809
809
|
return _this6.element = el;
|
|
810
810
|
},
|
|
811
811
|
id: this.props.id,
|
|
812
812
|
className: className,
|
|
813
813
|
style: this.props.style
|
|
814
|
-
}, header, /*#__PURE__*/React__default[
|
|
814
|
+
}, header, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
815
815
|
ref: function ref(el) {
|
|
816
816
|
return _this6.wrapper = el;
|
|
817
817
|
},
|
|
@@ -864,4 +864,4 @@ this.primereact.listbox = (function (exports, React, api, core, inputtext, virtu
|
|
|
864
864
|
|
|
865
865
|
return exports;
|
|
866
866
|
|
|
867
|
-
}({}, React, primereact.api, primereact.
|
|
867
|
+
})({}, React, primereact.api, primereact.utils, primereact.ripple, primereact.inputtext, primereact.tooltip, primereact.virtualscroller);
|
package/listbox/listbox.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.listbox=function(t,e,n,o,r,i){"use strict";function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=l(e);function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function u(t){if(Array.isArray(t))return p(t)}function c(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function f(t,e){if(t){if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(t){return u(t)||c(t)||f(t)||h()}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e,n){return e&&y(t.prototype,e),n&&y(t,n),t}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function O(t,e){return(O=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&O(t,e)}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t,e){if(e&&("object"===k(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function j(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var w=function(t){g(i,t);var e,n,r=(e=i,n=C(),function(){var t,o=S(e);if(n){var r=S(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return E(this,t)});function i(t){var e;return v(this,i),(e=r.call(this,t)).onClick=e.onClick.bind(m(e)),e.onTouchEnd=e.onTouchEnd.bind(m(e)),e.onKeyDown=e.onKeyDown.bind(m(e)),e}return b(i,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option}),t.preventDefault()}},{key:"onTouchEnd",value:function(t){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:t,option:this.props.option})}},{key:"onKeyDown",value:function(t){var e=t.currentTarget;switch(t.which){case 40:var n=this.findNextItem(e);n&&n.focus(),t.preventDefault();break;case 38:var o=this.findPrevItem(e);o&&o.focus(),t.preventDefault();break;case 13:this.onClick(t),t.preventDefault()}}},{key:"findNextItem",value:function(t){var e=t.nextElementSibling;return e?o.DomHandler.hasClass(e,"p-disabled")||o.DomHandler.hasClass(e,"p-listbox-item-group")?this.findNextItem(e):e:null}},{key:"findPrevItem",value:function(t){var e=t.previousElementSibling;return e?o.DomHandler.hasClass(e,"p-disabled")||o.DomHandler.hasClass(e,"p-listbox-item-group")?this.findPrevItem(e):e:null}},{key:"render",value:function(){var t=o.classNames("p-listbox-item",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled},this.props.option.className),e=this.props.template?o.ObjectUtils.getJSXElement(this.props.template,this.props.option):this.props.label;return a.default.createElement("li",{className:t,onClick:this.onClick,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,"aria-label":this.props.label,key:this.props.label,role:"option","aria-selected":this.props.selected},e,a.default.createElement(o.Ripple,null))}}]),i}(e.Component);function x(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}j(w,"defaultProps",{option:null,label:null,selected:!1,disabled:!1,tabIndex:null,onClick:null,onTouchEnd:null,template:null});var D=function(t){g(i,t);var e,n,o=(e=i,n=x(),function(){var t,o=S(e);if(n){var r=S(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return E(this,t)});function i(t){var e;return v(this,i),(e=o.call(this,t)).onFilter=e.onFilter.bind(m(e)),e}return b(i,[{key:"onFilter",value:function(t){this.props.onFilter&&this.props.onFilter({originalEvent:t,value:t.target.value})}},{key:"render",value:function(){return a.default.createElement("div",{className:"p-listbox-header"},a.default.createElement("div",{className:"p-listbox-filter-container"},a.default.createElement(r.InputText,{type:"text",value:this.props.filter,onChange:this.onFilter,className:"p-listbox-filter",disabled:this.props.disabled,placeholder:this.props.filterPlaceholder}),a.default.createElement("span",{className:"p-listbox-filter-icon pi pi-search"})))}}]),i}(e.Component);function T(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=F(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}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 i,l=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function F(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?P(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function I(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}j(D,"defaultProps",{filter:null,filterPlaceholder:null,disabled:!1,onFilter:null});var R=function(t){g(p,t);var e,r,l=(e=p,r=I(),function(){var t,n=S(e);if(r){var o=S(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return E(this,t)});function p(t){var e;return v(this,p),(e=l.call(this,t)).state={},e.props.onFilterValueChange||(e.state.filterValue=""),e.onFilter=e.onFilter.bind(m(e)),e.onOptionSelect=e.onOptionSelect.bind(m(e)),e.onOptionTouchEnd=e.onOptionTouchEnd.bind(m(e)),e}return b(p,[{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(V({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=o.tip({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"getFilterValue",value:function(){return(this.props.onFilterValueChange?this.props.filterValue:this.state.filterValue)||""}},{key:"onOptionSelect",value:function(t){var e=t.option;this.props.disabled||this.isOptionDisabled(e)||(this.props.multiple?this.onOptionSelectMultiple(t.originalEvent,e):this.onOptionSelectSingle(t.originalEvent,e),this.optionTouched=!1)}},{key:"onOptionTouchEnd",value:function(){this.props.disabled||(this.optionTouched=!0)}},{key:"onOptionSelectSingle",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;!this.optionTouched&&this.props.metaKeySelection?n?(t.metaKey||t.ctrlKey)&&(r=null,o=!0):(r=this.getOptionValue(e),o=!0):(r=n?null:this.getOptionValue(e),o=!0);o&&this.updateModel(t,r)}},{key:"onOptionSelectMultiple",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;if(!this.optionTouched&&this.props.metaKeySelection){var i=t.metaKey||t.ctrlKey;n?(r=i?this.removeOption(e):[this.getOptionValue(e)],o=!0):(r=[].concat(d(r=i&&this.props.value||[]),[this.getOptionValue(e)]),o=!0)}else r=n?this.removeOption(e):[].concat(d(this.props.value||[]),[this.getOptionValue(e)]),o=!0;o&&this.props.onChange({originalEvent:t,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}},{key:"onFilter",value:function(t){var e=t.value;this.props.onFilterValueChange?this.props.onFilterValueChange({originalEvent:t.originalEvent,value:e}):this.setState({filterValue:e})}},{key:"updateModel",value:function(t,e){this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"removeOption",value:function(t){var e=this;return this.props.value.filter((function(n){return!o.ObjectUtils.equals(n,e.getOptionValue(t),e.props.dataKey)}))}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value){var r,i=T(this.props.value);try{for(i.s();!(r=i.n()).done;){if(o.ObjectUtils.equals(r.value,n,this.props.dataKey)){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else e=o.ObjectUtils.equals(this.props.value,n,this.props.dataKey);return e}},{key:"filter",value:function(t){var e=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale);return this.getOptionLabel(t).toLocaleLowerCase(this.props.filterLocale).indexOf(e)>-1}},{key:"hasFilter",value:function(){var t=this.getFilterValue();return t&&t.trim().length>0}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?o.ObjectUtils.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?o.ObjectUtils.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"getOptionRenderKey",value:function(t){return this.props.dataKey?o.ObjectUtils.resolveFieldData(t,this.props.dataKey):this.getOptionLabel(t)}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?o.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):o.ObjectUtils.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"getOptionGroupRenderKey",value:function(t){return o.ObjectUtils.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupLabel",value:function(t){return o.ObjectUtils.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupChildren",value:function(t){return o.ObjectUtils.resolveFieldData(t,this.props.optionGroupChildren)}},{key:"getVisibleOptions",value:function(){if(this.hasFilter()){var t=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale),e=this.props.filterBy?this.props.filterBy.split(","):[this.props.optionLabel||"label"];if(this.props.optionGroupLabel){var o,r=[],i=T(this.props.options);try{for(i.s();!(o=i.n()).done;){var l=o.value,a=n.FilterService.filter(this.getOptionGroupChildren(l),e,t,this.props.filterMatchMode,this.props.filterLocale);a&&a.length&&r.push(V(V({},l),{items:a}))}}catch(t){i.e(t)}finally{i.f()}return r}return n.FilterService.filter(this.props.options,e,t,this.props.filterMatchMode,this.props.filterLocale)}return this.props.options}},{key:"renderGroupChildren",value:function(t){var e=this;return this.getOptionGroupChildren(t).map((function(t,n){var o=e.getOptionLabel(t),r=n+"_"+e.getOptionRenderKey(t),i=e.isOptionDisabled(t),l=i?null:e.props.tabIndex||0;return a.default.createElement(w,{key:r,label:o,option:t,template:e.props.itemTemplate,selected:e.isSelected(t),onClick:e.onOptionSelect,onTouchEnd:e.onOptionTouchEnd,tabIndex:l,disabled:i})}))}},{key:"renderItem",value:function(t,e){if(this.props.optionGroupLabel){var n=this.props.optionGroupTemplate?o.ObjectUtils.getJSXElement(this.props.optionGroupTemplate,t,e):this.getOptionGroupLabel(t),r=this.renderGroupChildren(t),i=e+"_"+this.getOptionGroupRenderKey(t);return a.default.createElement(a.default.Fragment,{key:i},a.default.createElement("li",{className:"p-listbox-item-group"},n),r)}var l=this.getOptionLabel(t),s=e+"_"+this.getOptionRenderKey(t),p=this.isOptionDisabled(t),u=p?null:this.props.tabIndex||0;return a.default.createElement(w,{key:s,label:l,option:t,template:this.props.itemTemplate,selected:this.isSelected(t),onClick:this.onOptionSelect,onTouchEnd:this.onOptionTouchEnd,tabIndex:u,disabled:p})}},{key:"renderItems",value:function(t){var e=this;return t&&t.length?t.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"renderList",value:function(t){var e=this;if(this.props.virtualScrollerOptions){var n=V(V({},this.props.virtualScrollerOptions),{items:t,onLazyLoad:function(t){return e.props.virtualScrollerOptions.onLazyLoad(V(V({},t),{filter:e.getFilterValue()}))},itemTemplate:function(t,n){return t&&e.renderItem(t,n.index)},contentTemplate:function(t){var n=o.classNames("p-listbox-list",t.className);return a.default.createElement("ul",{ref:t.contentRef,className:n,role:"listbox","aria-multiselectable":e.props.multiple},t.children)}});return a.default.createElement(i.VirtualScroller,s({ref:function(t){return e.virtualScrollerRef=t}},n))}var r=this.renderItems(t);return a.default.createElement("ul",{className:"p-listbox-list",role:"listbox","aria-multiselectable":this.props.multiple},r)}},{key:"render",value:function(){var t,e=this,n=o.classNames("p-listbox p-component",{"p-disabled":this.props.disabled},this.props.className),r=o.classNames("p-listbox-list-wrapper",this.props.listClassName),i=this.getVisibleOptions(),l=this.renderList(i);return this.props.filter&&(t=a.default.createElement(D,{filter:this.getFilterValue(),onFilter:this.onFilter,disabled:this.props.disabled,filterPlaceholder:this.props.filterPlaceholder})),a.default.createElement("div",{ref:function(t){return e.element=t},id:this.props.id,className:n,style:this.props.style},t,a.default.createElement("div",{ref:function(t){return e.wrapper=t},className:r,style:this.props.listStyle},l))}}]),p}(e.Component);return j(R,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,optionGroupTemplate:null,itemTemplate:null,style:null,listStyle:null,listClassName:null,className:null,virtualScrollerOptions:null,disabled:null,dataKey:null,multiple:!1,metaKeySelection:!1,filter:!1,filterBy:null,filterValue:null,filterMatchMode:"contains",filterPlaceholder:null,filterLocale:void 0,tabIndex:0,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFilterValueChange:null}),t.ListBox=R,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.api,primereact.core,primereact.inputtext,primereact.virtualscroller);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.listbox=function(t,e,n,o,r,i,l,a){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=s(e);function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},u.apply(this,arguments)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function f(t){if(Array.isArray(t))return c(t)}function h(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function d(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t){return f(t)||h(t)||d(t)||v()}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function O(t,e,n){return e&&m(t.prototype,e),n&&m(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function k(t,e){return k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},k(t,e)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function j(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return g(t)}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function w(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function x(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var D=function(t){E(l,t);var e,n,i=(e=l,n=x(),function(){var t,o=C(e);if(n){var r=C(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return j(this,t)});function l(t){var e;return b(this,l),(e=i.call(this,t)).onClick=e.onClick.bind(g(e)),e.onTouchEnd=e.onTouchEnd.bind(g(e)),e.onKeyDown=e.onKeyDown.bind(g(e)),e}return O(l,[{key:"onClick",value:function(t){this.props.onClick&&this.props.onClick({originalEvent:t,option:this.props.option}),t.preventDefault()}},{key:"onTouchEnd",value:function(t){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:t,option:this.props.option})}},{key:"onKeyDown",value:function(t){var e=t.currentTarget;switch(t.which){case 40:var n=this.findNextItem(e);n&&n.focus(),t.preventDefault();break;case 38:var o=this.findPrevItem(e);o&&o.focus(),t.preventDefault();break;case 13:this.onClick(t),t.preventDefault()}}},{key:"findNextItem",value:function(t){var e=t.nextElementSibling;return e?o.DomHandler.hasClass(e,"p-disabled")||o.DomHandler.hasClass(e,"p-listbox-item-group")?this.findNextItem(e):e:null}},{key:"findPrevItem",value:function(t){var e=t.previousElementSibling;return e?o.DomHandler.hasClass(e,"p-disabled")||o.DomHandler.hasClass(e,"p-listbox-item-group")?this.findPrevItem(e):e:null}},{key:"render",value:function(){var t=o.classNames("p-listbox-item",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled},this.props.option.className),e=this.props.template?o.ObjectUtils.getJSXElement(this.props.template,this.props.option):this.props.label;return p.default.createElement("li",{className:t,onClick:this.onClick,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,tabIndex:this.props.tabIndex,"aria-label":this.props.label,key:this.props.label,role:"option","aria-selected":this.props.selected},e,p.default.createElement(r.Ripple,null))}}]),l}(e.Component);function T(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}w(D,"defaultProps",{option:null,label:null,selected:!1,disabled:!1,tabIndex:null,onClick:null,onTouchEnd:null,template:null});var F=function(t){E(r,t);var e,n,o=(e=r,n=T(),function(){var t,o=C(e);if(n){var r=C(this).constructor;t=Reflect.construct(o,arguments,r)}else t=o.apply(this,arguments);return j(this,t)});function r(t){var e;return b(this,r),(e=o.call(this,t)).onFilter=e.onFilter.bind(g(e)),e}return O(r,[{key:"onFilter",value:function(t){this.props.onFilter&&this.props.onFilter({originalEvent:t,value:t.target.value})}},{key:"render",value:function(){return p.default.createElement("div",{className:"p-listbox-header"},p.default.createElement("div",{className:"p-listbox-filter-container"},p.default.createElement(i.InputText,{type:"text",value:this.props.filter,onChange:this.onFilter,className:"p-listbox-filter",disabled:this.props.disabled,placeholder:this.props.filterPlaceholder}),p.default.createElement("span",{className:"p-listbox-filter-icon pi pi-search"})))}}]),r}(e.Component);function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}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 i,l=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){a=!0,i=t},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function P(t,e){if(t){if("string"==typeof t)return V(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(t,e):void 0}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){w(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function K(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}w(F,"defaultProps",{filter:null,filterPlaceholder:null,disabled:!1,onFilter:null});var N=function(t){E(s,t);var e,r,i=(e=s,r=K(),function(){var t,n=C(e);if(r){var o=C(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return j(this,t)});function s(t){var e;return b(this,s),(e=i.call(this,t)).state={},e.props.onFilterValueChange||(e.state.filterValue=""),e.onFilter=e.onFilter.bind(g(e)),e.onOptionSelect=e.onOptionSelect.bind(g(e)),e.onOptionTouchEnd=e.onOptionTouchEnd.bind(g(e)),e}return O(s,[{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(R({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=l.tip({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"getFilterValue",value:function(){return(this.props.onFilterValueChange?this.props.filterValue:this.state.filterValue)||""}},{key:"onOptionSelect",value:function(t){var e=t.option;this.props.disabled||this.isOptionDisabled(e)||(this.props.multiple?this.onOptionSelectMultiple(t.originalEvent,e):this.onOptionSelectSingle(t.originalEvent,e),this.optionTouched=!1)}},{key:"onOptionTouchEnd",value:function(){this.props.disabled||(this.optionTouched=!0)}},{key:"onOptionSelectSingle",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;!this.optionTouched&&this.props.metaKeySelection?n?(t.metaKey||t.ctrlKey)&&(r=null,o=!0):(r=this.getOptionValue(e),o=!0):(r=n?null:this.getOptionValue(e),o=!0);o&&this.updateModel(t,r)}},{key:"onOptionSelectMultiple",value:function(t,e){var n=this.isSelected(e),o=!1,r=null;if(!this.optionTouched&&this.props.metaKeySelection){var i=t.metaKey||t.ctrlKey;n?(r=i?this.removeOption(e):[this.getOptionValue(e)],o=!0):(r=[].concat(y(r=i&&this.props.value||[]),[this.getOptionValue(e)]),o=!0)}else r=n?this.removeOption(e):[].concat(y(this.props.value||[]),[this.getOptionValue(e)]),o=!0;o&&this.props.onChange({originalEvent:t,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}},{key:"onFilter",value:function(t){var e=t.value;this.props.onFilterValueChange?this.props.onFilterValueChange({originalEvent:t.originalEvent,value:e}):this.setState({filterValue:e})}},{key:"updateModel",value:function(t,e){this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"removeOption",value:function(t){var e=this;return this.props.value.filter((function(n){return!o.ObjectUtils.equals(n,e.getOptionValue(t),e.props.dataKey)}))}},{key:"isSelected",value:function(t){var e=!1,n=this.getOptionValue(t);if(this.props.multiple){if(this.props.value){var r,i=L(this.props.value);try{for(i.s();!(r=i.n()).done;){if(o.ObjectUtils.equals(r.value,n,this.props.dataKey)){e=!0;break}}}catch(t){i.e(t)}finally{i.f()}}}else e=o.ObjectUtils.equals(this.props.value,n,this.props.dataKey);return e}},{key:"filter",value:function(t){var e=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale);return this.getOptionLabel(t).toLocaleLowerCase(this.props.filterLocale).indexOf(e)>-1}},{key:"hasFilter",value:function(){var t=this.getFilterValue();return t&&t.trim().length>0}},{key:"getOptionLabel",value:function(t){return this.props.optionLabel?o.ObjectUtils.resolveFieldData(t,this.props.optionLabel):t&&void 0!==t.label?t.label:t}},{key:"getOptionValue",value:function(t){return this.props.optionValue?o.ObjectUtils.resolveFieldData(t,this.props.optionValue):t&&void 0!==t.value?t.value:t}},{key:"getOptionRenderKey",value:function(t){return this.props.dataKey?o.ObjectUtils.resolveFieldData(t,this.props.dataKey):this.getOptionLabel(t)}},{key:"isOptionDisabled",value:function(t){return this.props.optionDisabled?o.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(t):o.ObjectUtils.resolveFieldData(t,this.props.optionDisabled):!(!t||void 0===t.disabled)&&t.disabled}},{key:"getOptionGroupRenderKey",value:function(t){return o.ObjectUtils.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupLabel",value:function(t){return o.ObjectUtils.resolveFieldData(t,this.props.optionGroupLabel)}},{key:"getOptionGroupChildren",value:function(t){return o.ObjectUtils.resolveFieldData(t,this.props.optionGroupChildren)}},{key:"getVisibleOptions",value:function(){if(this.hasFilter()){var t=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale),e=this.props.filterBy?this.props.filterBy.split(","):[this.props.optionLabel||"label"];if(this.props.optionGroupLabel){var o,r=[],i=L(this.props.options);try{for(i.s();!(o=i.n()).done;){var l=o.value,a=n.FilterService.filter(this.getOptionGroupChildren(l),e,t,this.props.filterMatchMode,this.props.filterLocale);a&&a.length&&r.push(R(R({},l),{items:a}))}}catch(t){i.e(t)}finally{i.f()}return r}return n.FilterService.filter(this.props.options,e,t,this.props.filterMatchMode,this.props.filterLocale)}return this.props.options}},{key:"renderGroupChildren",value:function(t){var e=this;return this.getOptionGroupChildren(t).map((function(t,n){var o=e.getOptionLabel(t),r=n+"_"+e.getOptionRenderKey(t),i=e.isOptionDisabled(t),l=i?null:e.props.tabIndex||0;return p.default.createElement(D,{key:r,label:o,option:t,template:e.props.itemTemplate,selected:e.isSelected(t),onClick:e.onOptionSelect,onTouchEnd:e.onOptionTouchEnd,tabIndex:l,disabled:i})}))}},{key:"renderItem",value:function(t,e){if(this.props.optionGroupLabel){var n=this.props.optionGroupTemplate?o.ObjectUtils.getJSXElement(this.props.optionGroupTemplate,t,e):this.getOptionGroupLabel(t),r=this.renderGroupChildren(t),i=e+"_"+this.getOptionGroupRenderKey(t);return p.default.createElement(p.default.Fragment,{key:i},p.default.createElement("li",{className:"p-listbox-item-group"},n),r)}var l=this.getOptionLabel(t),a=e+"_"+this.getOptionRenderKey(t),s=this.isOptionDisabled(t),u=s?null:this.props.tabIndex||0;return p.default.createElement(D,{key:a,label:l,option:t,template:this.props.itemTemplate,selected:this.isSelected(t),onClick:this.onOptionSelect,onTouchEnd:this.onOptionTouchEnd,tabIndex:u,disabled:s})}},{key:"renderItems",value:function(t){var e=this;return t&&t.length?t.map((function(t,n){return e.renderItem(t,n)})):null}},{key:"renderList",value:function(t){var e=this;if(this.props.virtualScrollerOptions){var n=R(R({},this.props.virtualScrollerOptions),{items:t,onLazyLoad:function(t){return e.props.virtualScrollerOptions.onLazyLoad(R(R({},t),{filter:e.getFilterValue()}))},itemTemplate:function(t,n){return t&&e.renderItem(t,n.index)},contentTemplate:function(t){var n=o.classNames("p-listbox-list",t.className);return p.default.createElement("ul",{ref:t.contentRef,className:n,role:"listbox","aria-multiselectable":e.props.multiple},t.children)}});return p.default.createElement(a.VirtualScroller,u({ref:function(t){return e.virtualScrollerRef=t}},n))}var r=this.renderItems(t);return p.default.createElement("ul",{className:"p-listbox-list",role:"listbox","aria-multiselectable":this.props.multiple},r)}},{key:"render",value:function(){var t,e=this,n=o.classNames("p-listbox p-component",{"p-disabled":this.props.disabled},this.props.className),r=o.classNames("p-listbox-list-wrapper",this.props.listClassName),i=this.getVisibleOptions(),l=this.renderList(i);return this.props.filter&&(t=p.default.createElement(F,{filter:this.getFilterValue(),onFilter:this.onFilter,disabled:this.props.disabled,filterPlaceholder:this.props.filterPlaceholder})),p.default.createElement("div",{ref:function(t){return e.element=t},id:this.props.id,className:n,style:this.props.style},t,p.default.createElement("div",{ref:function(t){return e.wrapper=t},className:r,style:this.props.listStyle},l))}}]),s}(e.Component);return w(N,"defaultProps",{id:null,value:null,options:null,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,optionGroupTemplate:null,itemTemplate:null,style:null,listStyle:null,listClassName:null,className:null,virtualScrollerOptions:null,disabled:null,dataKey:null,multiple:!1,metaKeySelection:!1,filter:!1,filterBy:null,filterValue:null,filterMatchMode:"contains",filterPlaceholder:null,filterLocale:void 0,tabIndex:0,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null,onFilterValueChange:null}),t.ListBox=N,Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.api,primereact.utils,primereact.ripple,primereact.inputtext,primereact.tooltip,primereact.virtualscroller);
|