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
package/knob/knob.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primereact = this.primereact || {};
|
|
2
|
-
this.primereact.knob = (function (exports, React,
|
|
2
|
+
this.primereact.knob = (function (exports, React, utils) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -25,6 +25,9 @@ this.primereact.knob = (function (exports, React, core) {
|
|
|
25
25
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
26
26
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
27
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
29
|
+
writable: false
|
|
30
|
+
});
|
|
28
31
|
return Constructor;
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -57,23 +60,20 @@ this.primereact.knob = (function (exports, React, core) {
|
|
|
57
60
|
configurable: true
|
|
58
61
|
}
|
|
59
62
|
});
|
|
63
|
+
Object.defineProperty(subClass, "prototype", {
|
|
64
|
+
writable: false
|
|
65
|
+
});
|
|
60
66
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
function _typeof(obj) {
|
|
64
70
|
"@babel/helpers - typeof";
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
_typeof = function _typeof(obj) {
|
|
72
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return _typeof(obj);
|
|
72
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
73
|
+
return typeof obj;
|
|
74
|
+
} : function (obj) {
|
|
75
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
76
|
+
}, _typeof(obj);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -317,10 +317,10 @@ this.primereact.knob = (function (exports, React, core) {
|
|
|
317
317
|
value: function render() {
|
|
318
318
|
var _this2 = this;
|
|
319
319
|
|
|
320
|
-
var containerClassName =
|
|
320
|
+
var containerClassName = utils.classNames('p-knob p-component', {
|
|
321
321
|
'p-disabled': this.props.disabled
|
|
322
322
|
}, this.props.className);
|
|
323
|
-
var text = this.props.showValue && /*#__PURE__*/React__default[
|
|
323
|
+
var text = this.props.showValue && /*#__PURE__*/React__default["default"].createElement("text", {
|
|
324
324
|
x: 50,
|
|
325
325
|
y: 57,
|
|
326
326
|
textAnchor: 'middle',
|
|
@@ -328,14 +328,14 @@ this.primereact.knob = (function (exports, React, core) {
|
|
|
328
328
|
className: 'p-knob-text',
|
|
329
329
|
name: this.props.name
|
|
330
330
|
}, this.valueToDisplay());
|
|
331
|
-
return /*#__PURE__*/React__default[
|
|
331
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
332
332
|
id: this.props.id,
|
|
333
333
|
className: containerClassName,
|
|
334
334
|
style: this.props.style,
|
|
335
335
|
ref: function ref(el) {
|
|
336
336
|
return _this2.element = el;
|
|
337
337
|
}
|
|
338
|
-
}, /*#__PURE__*/React__default[
|
|
338
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
339
339
|
viewBox: "0 0 100 100",
|
|
340
340
|
width: this.props.size,
|
|
341
341
|
height: this.props.size,
|
|
@@ -344,12 +344,12 @@ this.primereact.knob = (function (exports, React, core) {
|
|
|
344
344
|
onMouseUp: this.onMouseUp,
|
|
345
345
|
onTouchStart: this.onTouchStart,
|
|
346
346
|
onTouchEnd: this.onTouchEnd
|
|
347
|
-
}, /*#__PURE__*/React__default[
|
|
347
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
348
348
|
d: this.rangePath(),
|
|
349
349
|
strokeWidth: this.props.strokeWidth,
|
|
350
350
|
stroke: this.props.rangeColor,
|
|
351
351
|
className: 'p-knob-range'
|
|
352
|
-
}), /*#__PURE__*/React__default[
|
|
352
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
353
353
|
d: this.valuePath(),
|
|
354
354
|
strokeWidth: this.props.strokeWidth,
|
|
355
355
|
stroke: this.props.valueColor,
|
|
@@ -388,4 +388,4 @@ this.primereact.knob = (function (exports, React, core) {
|
|
|
388
388
|
|
|
389
389
|
return exports;
|
|
390
390
|
|
|
391
|
-
}({}, React, primereact.
|
|
391
|
+
})({}, React, primereact.utils);
|
package/knob/knob.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.knob=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.knob=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}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(e){return!1}}var f,v,m,y=function(e){h(m,e);var t,i,u,l,f,v=(t=m,i=d(),function(){var e,n=p(t);if(i){var o=p(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return c(this,e)});function m(e){var t;return s(this,m),(t=v.call(this,e)).state={},t.radius=40,t.midX=50,t.midY=50,t.minRadians=4*Math.PI/3,t.maxRadians=-Math.PI/3,t.onClick=t.onClick.bind(r(t)),t.onMouseDown=t.onMouseDown.bind(r(t)),t.onMouseUp=t.onMouseUp.bind(r(t)),t.onTouchStart=t.onTouchStart.bind(r(t)),t.onTouchEnd=t.onTouchEnd.bind(r(t)),t.onMouseMove=t.onMouseMove.bind(r(t)),t.onTouchMove=t.onTouchMove.bind(r(t)),t}return u=m,(l=[{key:"updateValue",value:function(e,t){var n=Math.atan2(this.props.size/2-t,e-this.props.size/2),i=-Math.PI/2-Math.PI/6;this.updateModel(n,i)}},{key:"updateModel",value:function(e,t){var n;if(e>this.maxRadians)n=this.mapRange(e,this.minRadians,this.maxRadians,this.props.min,this.props.max);else{if(!(e<t))return;n=this.mapRange(e+2*Math.PI,this.minRadians,this.maxRadians,this.props.min,this.props.max)}if(this.props.onChange){var i=Math.round((n-this.props.min)/this.props.step)*this.props.step+this.props.min;this.props.onChange({value:i})}}},{key:"mapRange",value:function(e,t,n,i,o){return(e-t)*(o-i)/(n-t)+i}},{key:"onClick",value:function(e){this.props.disabled||this.props.readOnly||this.updateValue(e.nativeEvent.offsetX,e.nativeEvent.offsetY)}},{key:"onMouseDown",value:function(e){this.props.disabled||this.props.readOnly||(this.windowMouseMoveListener=this.onMouseMove,this.windowMouseUpListener=this.onMouseUp,window.addEventListener("mousemove",this.windowMouseMoveListener),window.addEventListener("mouseup",this.windowMouseUpListener),e.preventDefault())}},{key:"onMouseUp",value:function(e){this.props.disabled||this.props.readOnly||(window.removeEventListener("mousemove",this.windowMouseMoveListener),window.removeEventListener("mouseup",this.windowMouseUpListener),this.windowMouseMoveListener=null,this.windowMouseUpListener=null,e.preventDefault())}},{key:"onTouchStart",value:function(e){this.props.disabled||this.props.readOnly||(this.windowTouchMoveListener=this.onTouchMove,this.windowTouchEndListener=this.onTouchEnd,window.addEventListener("touchmove",this.windowTouchMoveListener,{passive:!1,cancelable:!1}),window.addEventListener("touchend",this.windowTouchEndListener))}},{key:"onTouchEnd",value:function(e){this.props.disabled||this.props.readOnly||(window.removeEventListener("touchmove",this.windowTouchMoveListener),window.removeEventListener("touchend",this.windowTouchEndListener),this.windowTouchMoveListener=null,this.windowTouchEndListener=null)}},{key:"onMouseMove",value:function(e){this.props.disabled||this.props.readOnly||(this.updateValue(e.offsetX,e.offsetY),e.preventDefault())}},{key:"onTouchMove",value:function(e){if(!this.props.disabled&&!this.props.readOnly&&1===e.touches.length){var t=this.element.getBoundingClientRect(),n=e.targetTouches.item(0);this.updateValue(n.clientX-t.left,n.clientY-t.top),e.preventDefault()}}},{key:"rangePath",value:function(){return"M ".concat(this.minX()," ").concat(this.minY()," A ").concat(this.radius," ").concat(this.radius," 0 1 1 ").concat(this.maxX()," ").concat(this.maxY())}},{key:"valuePath",value:function(){return"M ".concat(this.zeroX()," ").concat(this.zeroY()," A ").concat(this.radius," ").concat(this.radius," 0 ").concat(this.largeArc()," ").concat(this.sweep()," ").concat(this.valueX()," ").concat(this.valueY())}},{key:"zeroRadians",value:function(){return this.mapRange(this.props.min>0&&this.props.max>0?this.props.min:0,this.props.min,this.props.max,this.minRadians,this.maxRadians)}},{key:"valueRadians",value:function(){return this.mapRange(this.props.value,this.props.min,this.props.max,this.minRadians,this.maxRadians)}},{key:"minX",value:function(){return this.midX+Math.cos(this.minRadians)*this.radius}},{key:"minY",value:function(){return this.midY-Math.sin(this.minRadians)*this.radius}},{key:"maxX",value:function(){return this.midX+Math.cos(this.maxRadians)*this.radius}},{key:"maxY",value:function(){return this.midY-Math.sin(this.maxRadians)*this.radius}},{key:"zeroX",value:function(){return this.midX+Math.cos(this.zeroRadians())*this.radius}},{key:"zeroY",value:function(){return this.midY-Math.sin(this.zeroRadians())*this.radius}},{key:"valueX",value:function(){return this.midX+Math.cos(this.valueRadians())*this.radius}},{key:"valueY",value:function(){return this.midY-Math.sin(this.valueRadians())*this.radius}},{key:"largeArc",value:function(){return Math.abs(this.zeroRadians()-this.valueRadians())<Math.PI?0:1}},{key:"sweep",value:function(){return this.valueRadians()>this.zeroRadians()?0:1}},{key:"valueToDisplay",value:function(){return this.props.valueTemplate.replace("{value}",this.props.value.toString())}},{key:"render",value:function(){var e=this,t=n.classNames("p-knob p-component",{"p-disabled":this.props.disabled},this.props.className),i=this.props.showValue&&o.default.createElement("text",{x:50,y:57,textAnchor:"middle",fill:this.props.textColor,className:"p-knob-text",name:this.props.name},this.valueToDisplay());return o.default.createElement("div",{id:this.props.id,className:t,style:this.props.style,ref:function(t){return e.element=t}},o.default.createElement("svg",{viewBox:"0 0 100 100",width:this.props.size,height:this.props.size,onClick:this.onClick,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchStart:this.onTouchStart,onTouchEnd:this.onTouchEnd},o.default.createElement("path",{d:this.rangePath(),strokeWidth:this.props.strokeWidth,stroke:this.props.rangeColor,className:"p-knob-range"}),o.default.createElement("path",{d:this.valuePath(),strokeWidth:this.props.strokeWidth,stroke:this.props.valueColor,className:"p-knob-value"}),i))}}])&&a(u.prototype,l),f&&a(u,f),Object.defineProperty(u,"prototype",{writable:!1}),m}(t.Component);return m={id:null,style:null,className:null,value:null,size:100,disabled:!1,readOnly:!1,showValue:!0,step:1,min:0,max:100,strokeWidth:14,name:null,valueColor:"var(--primary-color, Black)",rangeColor:"var(--surface-d, LightGray)",textColor:"var(--text-color-secondary, Black)",valueTemplate:"{value}",onChange:null},(v="defaultProps")in(f=y)?Object.defineProperty(f,v,{value:m,enumerable:!0,configurable:!0,writable:!0}):f[v]=m,e.Knob=y,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);
|
package/listbox/listbox.cjs.js
CHANGED
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var api = require('primereact/api');
|
|
7
|
-
var
|
|
7
|
+
var utils = require('primereact/utils');
|
|
8
|
+
var ripple = require('primereact/ripple');
|
|
8
9
|
var inputtext = require('primereact/inputtext');
|
|
10
|
+
var tooltip = require('primereact/tooltip');
|
|
9
11
|
var virtualscroller = require('primereact/virtualscroller');
|
|
10
12
|
|
|
11
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -84,6 +86,9 @@ function _defineProperties(target, props) {
|
|
|
84
86
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
85
87
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
86
88
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
89
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
90
|
+
writable: false
|
|
91
|
+
});
|
|
87
92
|
return Constructor;
|
|
88
93
|
}
|
|
89
94
|
|
|
@@ -116,23 +121,20 @@ function _inherits(subClass, superClass) {
|
|
|
116
121
|
configurable: true
|
|
117
122
|
}
|
|
118
123
|
});
|
|
124
|
+
Object.defineProperty(subClass, "prototype", {
|
|
125
|
+
writable: false
|
|
126
|
+
});
|
|
119
127
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
120
128
|
}
|
|
121
129
|
|
|
122
130
|
function _typeof(obj) {
|
|
123
131
|
"@babel/helpers - typeof";
|
|
124
132
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
_typeof = function _typeof(obj) {
|
|
131
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return _typeof(obj);
|
|
133
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
134
|
+
return typeof obj;
|
|
135
|
+
} : function (obj) {
|
|
136
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
137
|
+
}, _typeof(obj);
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -248,23 +250,23 @@ var ListBoxItem = /*#__PURE__*/function (_Component) {
|
|
|
248
250
|
key: "findNextItem",
|
|
249
251
|
value: function findNextItem(item) {
|
|
250
252
|
var nextItem = item.nextElementSibling;
|
|
251
|
-
if (nextItem) return
|
|
253
|
+
if (nextItem) return utils.DomHandler.hasClass(nextItem, 'p-disabled') || utils.DomHandler.hasClass(nextItem, 'p-listbox-item-group') ? this.findNextItem(nextItem) : nextItem;else return null;
|
|
252
254
|
}
|
|
253
255
|
}, {
|
|
254
256
|
key: "findPrevItem",
|
|
255
257
|
value: function findPrevItem(item) {
|
|
256
258
|
var prevItem = item.previousElementSibling;
|
|
257
|
-
if (prevItem) return
|
|
259
|
+
if (prevItem) return utils.DomHandler.hasClass(prevItem, 'p-disabled') || utils.DomHandler.hasClass(prevItem, 'p-listbox-item-group') ? this.findPrevItem(prevItem) : prevItem;else return null;
|
|
258
260
|
}
|
|
259
261
|
}, {
|
|
260
262
|
key: "render",
|
|
261
263
|
value: function render() {
|
|
262
|
-
var className =
|
|
264
|
+
var className = utils.classNames('p-listbox-item', {
|
|
263
265
|
'p-highlight': this.props.selected,
|
|
264
266
|
'p-disabled': this.props.disabled
|
|
265
267
|
}, this.props.option.className);
|
|
266
|
-
var content = this.props.template ?
|
|
267
|
-
return /*#__PURE__*/React__default[
|
|
268
|
+
var content = this.props.template ? utils.ObjectUtils.getJSXElement(this.props.template, this.props.option) : this.props.label;
|
|
269
|
+
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
268
270
|
className: className,
|
|
269
271
|
onClick: this.onClick,
|
|
270
272
|
onTouchEnd: this.onTouchEnd,
|
|
@@ -274,7 +276,7 @@ var ListBoxItem = /*#__PURE__*/function (_Component) {
|
|
|
274
276
|
key: this.props.label,
|
|
275
277
|
role: "option",
|
|
276
278
|
"aria-selected": this.props.selected
|
|
277
|
-
}, content, /*#__PURE__*/React__default[
|
|
279
|
+
}, content, /*#__PURE__*/React__default["default"].createElement(ripple.Ripple, null));
|
|
278
280
|
}
|
|
279
281
|
}]);
|
|
280
282
|
|
|
@@ -323,18 +325,18 @@ var ListBoxHeader = /*#__PURE__*/function (_Component) {
|
|
|
323
325
|
}, {
|
|
324
326
|
key: "render",
|
|
325
327
|
value: function render() {
|
|
326
|
-
return /*#__PURE__*/React__default[
|
|
328
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
327
329
|
className: "p-listbox-header"
|
|
328
|
-
}, /*#__PURE__*/React__default[
|
|
330
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
329
331
|
className: "p-listbox-filter-container"
|
|
330
|
-
}, /*#__PURE__*/React__default[
|
|
332
|
+
}, /*#__PURE__*/React__default["default"].createElement(inputtext.InputText, {
|
|
331
333
|
type: "text",
|
|
332
334
|
value: this.props.filter,
|
|
333
335
|
onChange: this.onFilter,
|
|
334
336
|
className: "p-listbox-filter",
|
|
335
337
|
disabled: this.props.disabled,
|
|
336
338
|
placeholder: this.props.filterPlaceholder
|
|
337
|
-
}), /*#__PURE__*/React__default[
|
|
339
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
338
340
|
className: "p-listbox-filter-icon pi pi-search"
|
|
339
341
|
})));
|
|
340
342
|
}
|
|
@@ -350,15 +352,15 @@ _defineProperty(ListBoxHeader, "defaultProps", {
|
|
|
350
352
|
onFilter: null
|
|
351
353
|
});
|
|
352
354
|
|
|
353
|
-
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
|
|
355
|
+
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; } } }; }
|
|
354
356
|
|
|
355
357
|
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); }
|
|
356
358
|
|
|
357
359
|
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; }
|
|
358
360
|
|
|
359
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
361
|
+
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; }
|
|
360
362
|
|
|
361
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
363
|
+
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; }
|
|
362
364
|
|
|
363
365
|
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); }; }
|
|
364
366
|
|
|
@@ -413,7 +415,7 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
413
415
|
}, {
|
|
414
416
|
key: "renderTooltip",
|
|
415
417
|
value: function renderTooltip() {
|
|
416
|
-
this.tooltip =
|
|
418
|
+
this.tooltip = tooltip.tip({
|
|
417
419
|
target: this.element,
|
|
418
420
|
content: this.props.tooltip,
|
|
419
421
|
options: this.props.tooltipOptions
|
|
@@ -552,7 +554,7 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
552
554
|
var _this2 = this;
|
|
553
555
|
|
|
554
556
|
return this.props.value.filter(function (val) {
|
|
555
|
-
return !
|
|
557
|
+
return !utils.ObjectUtils.equals(val, _this2.getOptionValue(option), _this2.props.dataKey);
|
|
556
558
|
});
|
|
557
559
|
}
|
|
558
560
|
}, {
|
|
@@ -570,7 +572,7 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
570
572
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
571
573
|
var val = _step.value;
|
|
572
574
|
|
|
573
|
-
if (
|
|
575
|
+
if (utils.ObjectUtils.equals(val, optionValue, this.props.dataKey)) {
|
|
574
576
|
selected = true;
|
|
575
577
|
break;
|
|
576
578
|
}
|
|
@@ -582,7 +584,7 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
582
584
|
}
|
|
583
585
|
}
|
|
584
586
|
} else {
|
|
585
|
-
selected =
|
|
587
|
+
selected = utils.ObjectUtils.equals(this.props.value, optionValue, this.props.dataKey);
|
|
586
588
|
}
|
|
587
589
|
|
|
588
590
|
return selected;
|
|
@@ -603,23 +605,23 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
603
605
|
}, {
|
|
604
606
|
key: "getOptionLabel",
|
|
605
607
|
value: function getOptionLabel(option) {
|
|
606
|
-
return this.props.optionLabel ?
|
|
608
|
+
return this.props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
|
|
607
609
|
}
|
|
608
610
|
}, {
|
|
609
611
|
key: "getOptionValue",
|
|
610
612
|
value: function getOptionValue(option) {
|
|
611
|
-
return this.props.optionValue ?
|
|
613
|
+
return this.props.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
|
|
612
614
|
}
|
|
613
615
|
}, {
|
|
614
616
|
key: "getOptionRenderKey",
|
|
615
617
|
value: function getOptionRenderKey(option) {
|
|
616
|
-
return this.props.dataKey ?
|
|
618
|
+
return this.props.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.props.dataKey) : this.getOptionLabel(option);
|
|
617
619
|
}
|
|
618
620
|
}, {
|
|
619
621
|
key: "isOptionDisabled",
|
|
620
622
|
value: function isOptionDisabled(option) {
|
|
621
623
|
if (this.props.optionDisabled) {
|
|
622
|
-
return
|
|
624
|
+
return utils.ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : utils.ObjectUtils.resolveFieldData(option, this.props.optionDisabled);
|
|
623
625
|
}
|
|
624
626
|
|
|
625
627
|
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
@@ -627,17 +629,17 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
627
629
|
}, {
|
|
628
630
|
key: "getOptionGroupRenderKey",
|
|
629
631
|
value: function getOptionGroupRenderKey(optionGroup) {
|
|
630
|
-
return
|
|
632
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);
|
|
631
633
|
}
|
|
632
634
|
}, {
|
|
633
635
|
key: "getOptionGroupLabel",
|
|
634
636
|
value: function getOptionGroupLabel(optionGroup) {
|
|
635
|
-
return
|
|
637
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);
|
|
636
638
|
}
|
|
637
639
|
}, {
|
|
638
640
|
key: "getOptionGroupChildren",
|
|
639
641
|
value: function getOptionGroupChildren(optionGroup) {
|
|
640
|
-
return
|
|
642
|
+
return utils.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren);
|
|
641
643
|
}
|
|
642
644
|
}, {
|
|
643
645
|
key: "getVisibleOptions",
|
|
@@ -691,7 +693,7 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
691
693
|
var disabled = _this3.isOptionDisabled(option);
|
|
692
694
|
|
|
693
695
|
var tabIndex = disabled ? null : _this3.props.tabIndex || 0;
|
|
694
|
-
return /*#__PURE__*/React__default[
|
|
696
|
+
return /*#__PURE__*/React__default["default"].createElement(ListBoxItem, {
|
|
695
697
|
key: optionKey,
|
|
696
698
|
label: optionLabel,
|
|
697
699
|
option: option,
|
|
@@ -708,12 +710,12 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
708
710
|
key: "renderItem",
|
|
709
711
|
value: function renderItem(option, index) {
|
|
710
712
|
if (this.props.optionGroupLabel) {
|
|
711
|
-
var groupContent = this.props.optionGroupTemplate ?
|
|
713
|
+
var groupContent = this.props.optionGroupTemplate ? utils.ObjectUtils.getJSXElement(this.props.optionGroupTemplate, option, index) : this.getOptionGroupLabel(option);
|
|
712
714
|
var groupChildrenContent = this.renderGroupChildren(option);
|
|
713
715
|
var key = index + '_' + this.getOptionGroupRenderKey(option);
|
|
714
|
-
return /*#__PURE__*/React__default[
|
|
716
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
715
717
|
key: key
|
|
716
|
-
}, /*#__PURE__*/React__default[
|
|
718
|
+
}, /*#__PURE__*/React__default["default"].createElement("li", {
|
|
717
719
|
className: "p-listbox-item-group"
|
|
718
720
|
}, groupContent), groupChildrenContent);
|
|
719
721
|
} else {
|
|
@@ -721,7 +723,7 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
721
723
|
var optionKey = index + '_' + this.getOptionRenderKey(option);
|
|
722
724
|
var disabled = this.isOptionDisabled(option);
|
|
723
725
|
var tabIndex = disabled ? null : this.props.tabIndex || 0;
|
|
724
|
-
return /*#__PURE__*/React__default[
|
|
726
|
+
return /*#__PURE__*/React__default["default"].createElement(ListBoxItem, {
|
|
725
727
|
key: optionKey,
|
|
726
728
|
label: optionLabel,
|
|
727
729
|
option: option,
|
|
@@ -764,8 +766,8 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
764
766
|
return item && _this5.renderItem(item, options.index);
|
|
765
767
|
},
|
|
766
768
|
contentTemplate: function contentTemplate(options) {
|
|
767
|
-
var className =
|
|
768
|
-
return /*#__PURE__*/React__default[
|
|
769
|
+
var className = utils.classNames('p-listbox-list', options.className);
|
|
770
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
769
771
|
ref: options.contentRef,
|
|
770
772
|
className: className,
|
|
771
773
|
role: "listbox",
|
|
@@ -774,14 +776,14 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
774
776
|
}
|
|
775
777
|
});
|
|
776
778
|
|
|
777
|
-
return /*#__PURE__*/React__default[
|
|
779
|
+
return /*#__PURE__*/React__default["default"].createElement(virtualscroller.VirtualScroller, _extends({
|
|
778
780
|
ref: function ref(el) {
|
|
779
781
|
return _this5.virtualScrollerRef = el;
|
|
780
782
|
}
|
|
781
783
|
}, virtualScrollerProps));
|
|
782
784
|
} else {
|
|
783
785
|
var items = this.renderItems(visibleOptions);
|
|
784
|
-
return /*#__PURE__*/React__default[
|
|
786
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
785
787
|
className: "p-listbox-list",
|
|
786
788
|
role: "listbox",
|
|
787
789
|
"aria-multiselectable": this.props.multiple
|
|
@@ -793,16 +795,16 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
793
795
|
value: function render() {
|
|
794
796
|
var _this6 = this;
|
|
795
797
|
|
|
796
|
-
var className =
|
|
798
|
+
var className = utils.classNames('p-listbox p-component', {
|
|
797
799
|
'p-disabled': this.props.disabled
|
|
798
800
|
}, this.props.className);
|
|
799
|
-
var listClassName =
|
|
801
|
+
var listClassName = utils.classNames('p-listbox-list-wrapper', this.props.listClassName);
|
|
800
802
|
var visibleOptions = this.getVisibleOptions();
|
|
801
803
|
var list = this.renderList(visibleOptions);
|
|
802
804
|
var header;
|
|
803
805
|
|
|
804
806
|
if (this.props.filter) {
|
|
805
|
-
header = /*#__PURE__*/React__default[
|
|
807
|
+
header = /*#__PURE__*/React__default["default"].createElement(ListBoxHeader, {
|
|
806
808
|
filter: this.getFilterValue(),
|
|
807
809
|
onFilter: this.onFilter,
|
|
808
810
|
disabled: this.props.disabled,
|
|
@@ -810,14 +812,14 @@ var ListBox = /*#__PURE__*/function (_Component) {
|
|
|
810
812
|
});
|
|
811
813
|
}
|
|
812
814
|
|
|
813
|
-
return /*#__PURE__*/React__default[
|
|
815
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
814
816
|
ref: function ref(el) {
|
|
815
817
|
return _this6.element = el;
|
|
816
818
|
},
|
|
817
819
|
id: this.props.id,
|
|
818
820
|
className: className,
|
|
819
821
|
style: this.props.style
|
|
820
|
-
}, header, /*#__PURE__*/React__default[
|
|
822
|
+
}, header, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
821
823
|
ref: function ref(el) {
|
|
822
824
|
return _this6.wrapper = el;
|
|
823
825
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/core"),o=require("primereact/inputtext"),r=require("primereact/virtualscroller");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e);function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function p(e){if(Array.isArray(e))return s(e)}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function c(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function f(){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 h(e){return p(e)||u(e)||c(e)||f()}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(){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(e){return!1}}var C=function(t){O(a,e.Component);var o,r,i=(o=a,r=j(),function(){var e,t=E(o);if(r){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function a(e){var t;return d(this,a),(t=i.call(this,e)).onClick=t.onClick.bind(b(t)),t.onTouchEnd=t.onTouchEnd.bind(b(t)),t.onKeyDown=t.onKeyDown.bind(b(t)),t}return y(a,[{key:"onClick",value:function(e){this.props.onClick&&this.props.onClick({originalEvent:e,option:this.props.option}),e.preventDefault()}},{key:"onTouchEnd",value:function(e){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:e,option:this.props.option})}},{key:"onKeyDown",value:function(e){var t=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(t);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(t);o&&o.focus(),e.preventDefault();break;case 13:this.onClick(e),e.preventDefault()}}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||n.DomHandler.hasClass(t,"p-listbox-item-group")?this.findNextItem(t):t:null}},{key:"findPrevItem",value:function(e){var t=e.previousElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||n.DomHandler.hasClass(t,"p-listbox-item-group")?this.findPrevItem(t):t:null}},{key:"render",value:function(){var e=n.classNames("p-listbox-item",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled},this.props.option.className),t=this.props.template?n.ObjectUtils.getJSXElement(this.props.template,this.props.option):this.props.label;return l.default.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},t,l.default.createElement(n.Ripple,null))}}]),a}();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(e){return!1}}S(C,"defaultProps",{option:null,label:null,selected:!1,disabled:!1,tabIndex:null,onClick:null,onTouchEnd:null,template:null});var w=function(t){O(a,e.Component);var n,r,i=(n=a,r=x(),function(){var e,t=E(n);if(r){var o=E(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return k(this,e)});function a(e){var t;return d(this,a),(t=i.call(this,e)).onFilter=t.onFilter.bind(b(t)),t}return y(a,[{key:"onFilter",value:function(e){this.props.onFilter&&this.props.onFilter({originalEvent:e,value:e.target.value})}},{key:"render",value:function(){return l.default.createElement("div",{className:"p-listbox-header"},l.default.createElement("div",{className:"p-listbox-filter-container"},l.default.createElement(o.InputText,{type:"text",value:this.props.filter,onChange:this.onFilter,className:"p-listbox-filter",disabled:this.props.disabled,placeholder:this.props.filterPlaceholder}),l.default.createElement("span",{className:"p-listbox-filter-icon pi pi-search"})))}}]),a}();function D(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function T(e,t){if(e){if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(){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(e){return!1}}S(w,"defaultProps",{filter:null,filterPlaceholder:null,disabled:!1,onFilter:null});var I=function(o){O(u,e.Component);var i,s,p=(i=u,s=V(),function(){var e,t=E(i);if(s){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function u(e){var t;return d(this,u),(t=p.call(this,e)).state={},t.props.onFilterValueChange||(t.state.filterValue=""),t.onFilter=t.onFilter.bind(b(t)),t.onOptionSelect=t.onOptionSelect.bind(b(t)),t.onOptionTouchEnd=t.onOptionTouchEnd.bind(b(t)),t}return y(u,[{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(P({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=n.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(e){var t=e.option;this.props.disabled||this.isOptionDisabled(t)||(this.props.multiple?this.onOptionSelectMultiple(e.originalEvent,t):this.onOptionSelectSingle(e.originalEvent,t),this.optionTouched=!1)}},{key:"onOptionTouchEnd",value:function(){this.props.disabled||(this.optionTouched=!0)}},{key:"onOptionSelectSingle",value:function(e,t){var n=this.isSelected(t),o=!1,r=null;!this.optionTouched&&this.props.metaKeySelection?n?(e.metaKey||e.ctrlKey)&&(r=null,o=!0):(r=this.getOptionValue(t),o=!0):(r=n?null:this.getOptionValue(t),o=!0);o&&this.updateModel(e,r)}},{key:"onOptionSelectMultiple",value:function(e,t){var n=this.isSelected(t),o=!1,r=null;if(!this.optionTouched&&this.props.metaKeySelection){var i=e.metaKey||e.ctrlKey;n?(r=i?this.removeOption(t):[this.getOptionValue(t)],o=!0):(r=[].concat(h(r=i&&this.props.value||[]),[this.getOptionValue(t)]),o=!0)}else r=n?this.removeOption(t):[].concat(h(this.props.value||[]),[this.getOptionValue(t)]),o=!0;o&&this.props.onChange({originalEvent:e,value:r,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:r}})}},{key:"onFilter",value:function(e){var t=e.value;this.props.onFilterValueChange?this.props.onFilterValueChange({originalEvent:e.originalEvent,value:t}):this.setState({filterValue:t})}},{key:"updateModel",value:function(e,t){this.props.onChange&&this.props.onChange({originalEvent:e,value:t,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:t}})}},{key:"removeOption",value:function(e){var t=this;return this.props.value.filter((function(o){return!n.ObjectUtils.equals(o,t.getOptionValue(e),t.props.dataKey)}))}},{key:"isSelected",value:function(e){var t=!1,o=this.getOptionValue(e);if(this.props.multiple){if(this.props.value){var r,i=D(this.props.value);try{for(i.s();!(r=i.n()).done;){if(n.ObjectUtils.equals(r.value,o,this.props.dataKey)){t=!0;break}}}catch(e){i.e(e)}finally{i.f()}}}else t=n.ObjectUtils.equals(this.props.value,o,this.props.dataKey);return t}},{key:"filter",value:function(e){var t=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale);return this.getOptionLabel(e).toLocaleLowerCase(this.props.filterLocale).indexOf(t)>-1}},{key:"hasFilter",value:function(){var e=this.getFilterValue();return e&&e.trim().length>0}},{key:"getOptionLabel",value:function(e){return this.props.optionLabel?n.ObjectUtils.resolveFieldData(e,this.props.optionLabel):e&&void 0!==e.label?e.label:e}},{key:"getOptionValue",value:function(e){return this.props.optionValue?n.ObjectUtils.resolveFieldData(e,this.props.optionValue):e&&void 0!==e.value?e.value:e}},{key:"getOptionRenderKey",value:function(e){return this.props.dataKey?n.ObjectUtils.resolveFieldData(e,this.props.dataKey):this.getOptionLabel(e)}},{key:"isOptionDisabled",value:function(e){return this.props.optionDisabled?n.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(e):n.ObjectUtils.resolveFieldData(e,this.props.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled}},{key:"getOptionGroupRenderKey",value:function(e){return n.ObjectUtils.resolveFieldData(e,this.props.optionGroupLabel)}},{key:"getOptionGroupLabel",value:function(e){return n.ObjectUtils.resolveFieldData(e,this.props.optionGroupLabel)}},{key:"getOptionGroupChildren",value:function(e){return n.ObjectUtils.resolveFieldData(e,this.props.optionGroupChildren)}},{key:"getVisibleOptions",value:function(){if(this.hasFilter()){var e=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale),n=this.props.filterBy?this.props.filterBy.split(","):[this.props.optionLabel||"label"];if(this.props.optionGroupLabel){var o,r=[],i=D(this.props.options);try{for(i.s();!(o=i.n()).done;){var l=o.value,a=t.FilterService.filter(this.getOptionGroupChildren(l),n,e,this.props.filterMatchMode,this.props.filterLocale);a&&a.length&&r.push(P(P({},l),{items:a}))}}catch(e){i.e(e)}finally{i.f()}return r}return t.FilterService.filter(this.props.options,n,e,this.props.filterMatchMode,this.props.filterLocale)}return this.props.options}},{key:"renderGroupChildren",value:function(e){var t=this;return this.getOptionGroupChildren(e).map((function(e,n){var o=t.getOptionLabel(e),r=n+"_"+t.getOptionRenderKey(e),i=t.isOptionDisabled(e),a=i?null:t.props.tabIndex||0;return l.default.createElement(C,{key:r,label:o,option:e,template:t.props.itemTemplate,selected:t.isSelected(e),onClick:t.onOptionSelect,onTouchEnd:t.onOptionTouchEnd,tabIndex:a,disabled:i})}))}},{key:"renderItem",value:function(e,t){if(this.props.optionGroupLabel){var o=this.props.optionGroupTemplate?n.ObjectUtils.getJSXElement(this.props.optionGroupTemplate,e,t):this.getOptionGroupLabel(e),r=this.renderGroupChildren(e),i=t+"_"+this.getOptionGroupRenderKey(e);return l.default.createElement(l.default.Fragment,{key:i},l.default.createElement("li",{className:"p-listbox-item-group"},o),r)}var a=this.getOptionLabel(e),s=t+"_"+this.getOptionRenderKey(e),p=this.isOptionDisabled(e),u=p?null:this.props.tabIndex||0;return l.default.createElement(C,{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(e){var t=this;return e&&e.length?e.map((function(e,n){return t.renderItem(e,n)})):null}},{key:"renderList",value:function(e){var t=this;if(this.props.virtualScrollerOptions){var o=P(P({},this.props.virtualScrollerOptions),{items:e,onLazyLoad:function(e){return t.props.virtualScrollerOptions.onLazyLoad(P(P({},e),{filter:t.getFilterValue()}))},itemTemplate:function(e,n){return e&&t.renderItem(e,n.index)},contentTemplate:function(e){var o=n.classNames("p-listbox-list",e.className);return l.default.createElement("ul",{ref:e.contentRef,className:o,role:"listbox","aria-multiselectable":t.props.multiple},e.children)}});return l.default.createElement(r.VirtualScroller,a({ref:function(e){return t.virtualScrollerRef=e}},o))}var i=this.renderItems(e);return l.default.createElement("ul",{className:"p-listbox-list",role:"listbox","aria-multiselectable":this.props.multiple},i)}},{key:"render",value:function(){var e,t=this,o=n.classNames("p-listbox p-component",{"p-disabled":this.props.disabled},this.props.className),r=n.classNames("p-listbox-list-wrapper",this.props.listClassName),i=this.getVisibleOptions(),a=this.renderList(i);return this.props.filter&&(e=l.default.createElement(w,{filter:this.getFilterValue(),onFilter:this.onFilter,disabled:this.props.disabled,filterPlaceholder:this.props.filterPlaceholder})),l.default.createElement("div",{ref:function(e){return t.element=e},id:this.props.id,className:o,style:this.props.style},e,l.default.createElement("div",{ref:function(e){return t.wrapper=e},className:r,style:this.props.listStyle},a))}}]),u}();S(I,"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}),exports.ListBox=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/utils"),r=require("primereact/ripple"),o=require("primereact/inputtext"),i=require("primereact/tooltip"),l=require("primereact/virtualscroller");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(e);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if(Array.isArray(e))return u(e)}function f(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function d(){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(e){return c(e)||f(e)||h(e)||d()}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function S(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(){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(e){return!1}}var x=function(t){k(a,e.Component);var o,i,l=(o=a,i=w(),function(){var e,t=j(o);if(i){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function a(e){var t;return y(this,a),(t=l.call(this,e)).onClick=t.onClick.bind(O(t)),t.onTouchEnd=t.onTouchEnd.bind(O(t)),t.onKeyDown=t.onKeyDown.bind(O(t)),t}return m(a,[{key:"onClick",value:function(e){this.props.onClick&&this.props.onClick({originalEvent:e,option:this.props.option}),e.preventDefault()}},{key:"onTouchEnd",value:function(e){this.props.onTouchEnd&&this.props.onTouchEnd({originalEvent:e,option:this.props.option})}},{key:"onKeyDown",value:function(e){var t=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(t);n&&n.focus(),e.preventDefault();break;case 38:var r=this.findPrevItem(t);r&&r.focus(),e.preventDefault();break;case 13:this.onClick(e),e.preventDefault()}}},{key:"findNextItem",value:function(e){var t=e.nextElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||n.DomHandler.hasClass(t,"p-listbox-item-group")?this.findNextItem(t):t:null}},{key:"findPrevItem",value:function(e){var t=e.previousElementSibling;return t?n.DomHandler.hasClass(t,"p-disabled")||n.DomHandler.hasClass(t,"p-listbox-item-group")?this.findPrevItem(t):t:null}},{key:"render",value:function(){var e=n.classNames("p-listbox-item",{"p-highlight":this.props.selected,"p-disabled":this.props.disabled},this.props.option.className),t=this.props.template?n.ObjectUtils.getJSXElement(this.props.template,this.props.option):this.props.label;return s.default.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},t,s.default.createElement(r.Ripple,null))}}]),a}();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(e){return!1}}C(x,"defaultProps",{option:null,label:null,selected:!1,disabled:!1,tabIndex:null,onClick:null,onTouchEnd:null,template:null});var T=function(t){k(l,e.Component);var n,r,i=(n=l,r=D(),function(){var e,t=j(n);if(r){var o=j(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return S(this,e)});function l(e){var t;return y(this,l),(t=i.call(this,e)).onFilter=t.onFilter.bind(O(t)),t}return m(l,[{key:"onFilter",value:function(e){this.props.onFilter&&this.props.onFilter({originalEvent:e,value:e.target.value})}},{key:"render",value:function(){return s.default.createElement("div",{className:"p-listbox-header"},s.default.createElement("div",{className:"p-listbox-filter-container"},s.default.createElement(o.InputText,{type:"text",value:this.props.filter,onChange:this.onFilter,className:"p-listbox-filter",disabled:this.props.disabled,placeholder:this.props.filterPlaceholder}),s.default.createElement("span",{className:"p-listbox-filter-icon pi pi-search"})))}}]),l}();function F(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function L(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}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(e){return!1}}C(T,"defaultProps",{filter:null,filterPlaceholder:null,disabled:!1,onFilter:null});var K=function(r){k(c,e.Component);var o,a,u=(o=c,a=R(),function(){var e,t=j(o);if(a){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function c(e){var t;return y(this,c),(t=u.call(this,e)).state={},t.props.onFilterValueChange||(t.state.filterValue=""),t.onFilter=t.onFilter.bind(O(t)),t.onOptionSelect=t.onOptionSelect.bind(O(t)),t.onOptionTouchEnd=t.onOptionTouchEnd.bind(O(t)),t}return m(c,[{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(I({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=i.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(e){var t=e.option;this.props.disabled||this.isOptionDisabled(t)||(this.props.multiple?this.onOptionSelectMultiple(e.originalEvent,t):this.onOptionSelectSingle(e.originalEvent,t),this.optionTouched=!1)}},{key:"onOptionTouchEnd",value:function(){this.props.disabled||(this.optionTouched=!0)}},{key:"onOptionSelectSingle",value:function(e,t){var n=this.isSelected(t),r=!1,o=null;!this.optionTouched&&this.props.metaKeySelection?n?(e.metaKey||e.ctrlKey)&&(o=null,r=!0):(o=this.getOptionValue(t),r=!0):(o=n?null:this.getOptionValue(t),r=!0);r&&this.updateModel(e,o)}},{key:"onOptionSelectMultiple",value:function(e,t){var n=this.isSelected(t),r=!1,o=null;if(!this.optionTouched&&this.props.metaKeySelection){var i=e.metaKey||e.ctrlKey;n?(o=i?this.removeOption(t):[this.getOptionValue(t)],r=!0):(o=[].concat(v(o=i&&this.props.value||[]),[this.getOptionValue(t)]),r=!0)}else o=n?this.removeOption(t):[].concat(v(this.props.value||[]),[this.getOptionValue(t)]),r=!0;r&&this.props.onChange({originalEvent:e,value:o,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:o}})}},{key:"onFilter",value:function(e){var t=e.value;this.props.onFilterValueChange?this.props.onFilterValueChange({originalEvent:e.originalEvent,value:t}):this.setState({filterValue:t})}},{key:"updateModel",value:function(e,t){this.props.onChange&&this.props.onChange({originalEvent:e,value:t,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:t}})}},{key:"removeOption",value:function(e){var t=this;return this.props.value.filter((function(r){return!n.ObjectUtils.equals(r,t.getOptionValue(e),t.props.dataKey)}))}},{key:"isSelected",value:function(e){var t=!1,r=this.getOptionValue(e);if(this.props.multiple){if(this.props.value){var o,i=F(this.props.value);try{for(i.s();!(o=i.n()).done;){if(n.ObjectUtils.equals(o.value,r,this.props.dataKey)){t=!0;break}}}catch(e){i.e(e)}finally{i.f()}}}else t=n.ObjectUtils.equals(this.props.value,r,this.props.dataKey);return t}},{key:"filter",value:function(e){var t=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale);return this.getOptionLabel(e).toLocaleLowerCase(this.props.filterLocale).indexOf(t)>-1}},{key:"hasFilter",value:function(){var e=this.getFilterValue();return e&&e.trim().length>0}},{key:"getOptionLabel",value:function(e){return this.props.optionLabel?n.ObjectUtils.resolveFieldData(e,this.props.optionLabel):e&&void 0!==e.label?e.label:e}},{key:"getOptionValue",value:function(e){return this.props.optionValue?n.ObjectUtils.resolveFieldData(e,this.props.optionValue):e&&void 0!==e.value?e.value:e}},{key:"getOptionRenderKey",value:function(e){return this.props.dataKey?n.ObjectUtils.resolveFieldData(e,this.props.dataKey):this.getOptionLabel(e)}},{key:"isOptionDisabled",value:function(e){return this.props.optionDisabled?n.ObjectUtils.isFunction(this.props.optionDisabled)?this.props.optionDisabled(e):n.ObjectUtils.resolveFieldData(e,this.props.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled}},{key:"getOptionGroupRenderKey",value:function(e){return n.ObjectUtils.resolveFieldData(e,this.props.optionGroupLabel)}},{key:"getOptionGroupLabel",value:function(e){return n.ObjectUtils.resolveFieldData(e,this.props.optionGroupLabel)}},{key:"getOptionGroupChildren",value:function(e){return n.ObjectUtils.resolveFieldData(e,this.props.optionGroupChildren)}},{key:"getVisibleOptions",value:function(){if(this.hasFilter()){var e=this.getFilterValue().trim().toLocaleLowerCase(this.props.filterLocale),n=this.props.filterBy?this.props.filterBy.split(","):[this.props.optionLabel||"label"];if(this.props.optionGroupLabel){var r,o=[],i=F(this.props.options);try{for(i.s();!(r=i.n()).done;){var l=r.value,a=t.FilterService.filter(this.getOptionGroupChildren(l),n,e,this.props.filterMatchMode,this.props.filterLocale);a&&a.length&&o.push(I(I({},l),{items:a}))}}catch(e){i.e(e)}finally{i.f()}return o}return t.FilterService.filter(this.props.options,n,e,this.props.filterMatchMode,this.props.filterLocale)}return this.props.options}},{key:"renderGroupChildren",value:function(e){var t=this;return this.getOptionGroupChildren(e).map((function(e,n){var r=t.getOptionLabel(e),o=n+"_"+t.getOptionRenderKey(e),i=t.isOptionDisabled(e),l=i?null:t.props.tabIndex||0;return s.default.createElement(x,{key:o,label:r,option:e,template:t.props.itemTemplate,selected:t.isSelected(e),onClick:t.onOptionSelect,onTouchEnd:t.onOptionTouchEnd,tabIndex:l,disabled:i})}))}},{key:"renderItem",value:function(e,t){if(this.props.optionGroupLabel){var r=this.props.optionGroupTemplate?n.ObjectUtils.getJSXElement(this.props.optionGroupTemplate,e,t):this.getOptionGroupLabel(e),o=this.renderGroupChildren(e),i=t+"_"+this.getOptionGroupRenderKey(e);return s.default.createElement(s.default.Fragment,{key:i},s.default.createElement("li",{className:"p-listbox-item-group"},r),o)}var l=this.getOptionLabel(e),a=t+"_"+this.getOptionRenderKey(e),p=this.isOptionDisabled(e),u=p?null:this.props.tabIndex||0;return s.default.createElement(x,{key:a,label:l,option:e,template:this.props.itemTemplate,selected:this.isSelected(e),onClick:this.onOptionSelect,onTouchEnd:this.onOptionTouchEnd,tabIndex:u,disabled:p})}},{key:"renderItems",value:function(e){var t=this;return e&&e.length?e.map((function(e,n){return t.renderItem(e,n)})):null}},{key:"renderList",value:function(e){var t=this;if(this.props.virtualScrollerOptions){var r=I(I({},this.props.virtualScrollerOptions),{items:e,onLazyLoad:function(e){return t.props.virtualScrollerOptions.onLazyLoad(I(I({},e),{filter:t.getFilterValue()}))},itemTemplate:function(e,n){return e&&t.renderItem(e,n.index)},contentTemplate:function(e){var r=n.classNames("p-listbox-list",e.className);return s.default.createElement("ul",{ref:e.contentRef,className:r,role:"listbox","aria-multiselectable":t.props.multiple},e.children)}});return s.default.createElement(l.VirtualScroller,p({ref:function(e){return t.virtualScrollerRef=e}},r))}var o=this.renderItems(e);return s.default.createElement("ul",{className:"p-listbox-list",role:"listbox","aria-multiselectable":this.props.multiple},o)}},{key:"render",value:function(){var e,t=this,r=n.classNames("p-listbox p-component",{"p-disabled":this.props.disabled},this.props.className),o=n.classNames("p-listbox-list-wrapper",this.props.listClassName),i=this.getVisibleOptions(),l=this.renderList(i);return this.props.filter&&(e=s.default.createElement(T,{filter:this.getFilterValue(),onFilter:this.onFilter,disabled:this.props.disabled,filterPlaceholder:this.props.filterPlaceholder})),s.default.createElement("div",{ref:function(e){return t.element=e},id:this.props.id,className:r,style:this.props.style},e,s.default.createElement("div",{ref:function(e){return t.wrapper=e},className:o,style:this.props.listStyle},l))}}]),c}();C(K,"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}),exports.ListBox=K;
|
package/listbox/listbox.esm.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { FilterService } from 'primereact/api';
|
|
3
|
-
import { DomHandler, classNames, ObjectUtils
|
|
3
|
+
import { DomHandler, classNames, ObjectUtils } from 'primereact/utils';
|
|
4
|
+
import { Ripple } from 'primereact/ripple';
|
|
4
5
|
import { InputText } from 'primereact/inputtext';
|
|
6
|
+
import { tip } from 'primereact/tooltip';
|
|
5
7
|
import { VirtualScroller } from 'primereact/virtualscroller';
|
|
6
8
|
|
|
7
9
|
function _extends() {
|
|
@@ -76,6 +78,9 @@ function _defineProperties(target, props) {
|
|
|
76
78
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
77
79
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
78
80
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
81
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
82
|
+
writable: false
|
|
83
|
+
});
|
|
79
84
|
return Constructor;
|
|
80
85
|
}
|
|
81
86
|
|
|
@@ -108,23 +113,20 @@ function _inherits(subClass, superClass) {
|
|
|
108
113
|
configurable: true
|
|
109
114
|
}
|
|
110
115
|
});
|
|
116
|
+
Object.defineProperty(subClass, "prototype", {
|
|
117
|
+
writable: false
|
|
118
|
+
});
|
|
111
119
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
function _typeof(obj) {
|
|
115
123
|
"@babel/helpers - typeof";
|
|
116
124
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
_typeof = function _typeof(obj) {
|
|
123
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
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);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -342,15 +344,15 @@ _defineProperty(ListBoxHeader, "defaultProps", {
|
|
|
342
344
|
onFilter: null
|
|
343
345
|
});
|
|
344
346
|
|
|
345
|
-
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; } } }; }
|
|
346
348
|
|
|
347
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); }
|
|
348
350
|
|
|
349
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; }
|
|
350
352
|
|
|
351
|
-
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; }
|
|
352
354
|
|
|
353
|
-
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; }
|
|
354
356
|
|
|
355
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); }; }
|
|
356
358
|
|