primereact 8.7.2 → 9.0.0-beta.1
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/accordion/accordion.cjs.js +56 -57
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +168 -25
- package/accordion/accordion.esm.js +56 -57
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +56 -57
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +31 -69
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +11 -3
- package/api/api.esm.js +31 -69
- package/api/api.esm.min.js +1 -1
- package/api/api.js +31 -69
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +100 -157
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +385 -80
- package/autocomplete/autocomplete.esm.js +100 -157
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +100 -157
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +86 -14
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.d.ts +77 -14
- package/avatar/avatar.esm.js +86 -14
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +86 -14
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +0 -2
- package/avatargroup/avatargroup.d.ts +33 -1
- package/avatargroup/avatargroup.esm.js +0 -2
- package/avatargroup/avatargroup.js +0 -2
- package/badge/badge.cjs.js +27 -3
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.d.ts +48 -8
- package/badge/badge.esm.js +27 -3
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +27 -3
- package/badge/badge.min.js +1 -1
- package/blockui/blockui.cjs.js +40 -54
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.d.ts +71 -8
- package/blockui/blockui.esm.js +40 -54
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +40 -54
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +6 -29
- package/breadcrumb/breadcrumb.d.ts +41 -3
- package/breadcrumb/breadcrumb.esm.js +6 -29
- package/breadcrumb/breadcrumb.js +6 -29
- package/button/button.cjs.js +29 -11
- package/button/button.cjs.min.js +1 -1
- package/button/button.d.ts +67 -15
- package/button/button.esm.js +29 -11
- package/button/button.esm.min.js +1 -1
- package/button/button.js +29 -11
- package/button/button.min.js +1 -1
- package/calendar/calendar.cjs.js +203 -668
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +585 -110
- package/calendar/calendar.esm.js +203 -668
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +203 -668
- package/calendar/calendar.min.js +1 -1
- package/captcha/captcha.cjs.js +7 -21
- package/captcha/captcha.cjs.min.js +1 -1
- package/captcha/captcha.d.ts +77 -7
- package/captcha/captcha.esm.js +7 -21
- package/captcha/captcha.esm.min.js +1 -1
- package/captcha/captcha.js +7 -21
- package/captcha/captcha.min.js +1 -1
- package/card/card.cjs.js +0 -6
- package/card/card.d.ts +45 -7
- package/card/card.esm.js +0 -6
- package/card/card.js +0 -6
- package/carousel/carousel.cjs.js +42 -130
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.d.ts +138 -22
- package/carousel/carousel.esm.js +42 -130
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +42 -130
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +54 -133
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +177 -29
- package/cascadeselect/cascadeselect.esm.js +54 -133
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +54 -133
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +6 -7
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.d.ts +88 -10
- package/chart/chart.esm.js +6 -7
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +6 -7
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +31 -41
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +137 -33
- package/checkbox/checkbox.esm.js +32 -42
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +31 -41
- package/checkbox/checkbox.min.css +1 -1
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +26 -41
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.d.ts +75 -7
- package/chip/chip.esm.js +26 -41
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +26 -41
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +39 -79
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +188 -36
- package/chips/chips.esm.js +39 -79
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +39 -79
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +81 -144
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.d.ts +150 -31
- package/colorpicker/colorpicker.esm.js +81 -144
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +81 -144
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +736 -134
- package/columngroup/columngroup.d.ts +30 -1
- package/confirmdialog/confirmdialog.cjs.js +60 -60
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.d.ts +142 -18
- package/confirmdialog/confirmdialog.esm.js +60 -60
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +60 -60
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +78 -95
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.d.ts +165 -22
- package/confirmpopup/confirmpopup.esm.js +78 -95
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +78 -95
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +79 -121
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.d.ts +79 -11
- package/contextmenu/contextmenu.esm.js +79 -121
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +79 -121
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +1048 -2092
- package/core/core.min.js +15 -15
- package/csstransition/csstransition.cjs.js +27 -13
- package/csstransition/csstransition.cjs.min.js +1 -1
- package/csstransition/csstransition.d.ts +31 -1
- package/csstransition/csstransition.esm.js +27 -13
- package/csstransition/csstransition.esm.min.js +1 -1
- package/csstransition/csstransition.js +27 -13
- package/csstransition/csstransition.min.js +1 -1
- package/datascroller/datascroller.cjs.js +32 -64
- package/datascroller/datascroller.cjs.min.js +1 -1
- package/datascroller/datascroller.d.ts +102 -16
- package/datascroller/datascroller.esm.js +32 -64
- package/datascroller/datascroller.esm.min.js +1 -1
- package/datascroller/datascroller.js +32 -64
- package/datascroller/datascroller.min.js +1 -1
- package/datatable/datatable.cjs.js +345 -1092
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +1259 -226
- package/datatable/datatable.esm.js +345 -1092
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +345 -1092
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +56 -68
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.d.ts +222 -43
- package/dataview/dataview.esm.js +56 -68
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +56 -68
- package/dataview/dataview.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +37 -46
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.d.ts +37 -1
- package/deferredcontent/deferredcontent.esm.js +37 -46
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +37 -46
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +99 -191
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.d.ts +282 -51
- package/dialog/dialog.esm.js +100 -192
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +99 -191
- package/dialog/dialog.min.css +1 -1
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +0 -2
- package/divider/divider.d.ts +47 -10
- package/divider/divider.esm.js +0 -2
- package/divider/divider.js +0 -2
- package/dock/dock.cjs.js +31 -53
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.d.ts +68 -12
- package/dock/dock.esm.js +31 -53
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +31 -53
- package/dock/dock.min.js +1 -1
- package/dropdown/dropdown.cjs.js +98 -209
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +338 -83
- package/dropdown/dropdown.esm.js +99 -210
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +98 -209
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +31 -22
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.d.ts +129 -12
- package/editor/editor.esm.js +31 -22
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +31 -22
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +29 -51
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.d.ts +85 -7
- package/fieldset/fieldset.esm.js +29 -51
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +29 -51
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/fileupload.cjs.js +49 -128
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +425 -62
- package/fileupload/fileupload.esm.js +49 -128
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +49 -128
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/galleria.cjs.js +57 -166
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.d.ts +198 -30
- package/galleria/galleria.esm.js +57 -166
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +57 -166
- package/galleria/galleria.min.js +1 -1
- package/gmap/gmap.cjs.js +2 -23
- package/gmap/gmap.d.ts +91 -5
- package/gmap/gmap.esm.js +2 -23
- package/gmap/gmap.js +2 -23
- package/hooks/hooks.cjs.js +101 -131
- package/hooks/hooks.cjs.min.js +1 -1
- package/hooks/hooks.d.ts +114 -7
- package/hooks/hooks.esm.js +101 -131
- package/hooks/hooks.esm.min.js +1 -1
- package/hooks/hooks.js +101 -131
- package/hooks/hooks.min.js +1 -1
- package/image/image.cjs.js +41 -67
- package/image/image.cjs.min.js +1 -1
- package/image/image.d.ts +91 -11
- package/image/image.esm.js +41 -67
- package/image/image.esm.min.js +1 -1
- package/image/image.js +41 -67
- package/image/image.min.js +1 -1
- package/inplace/inplace.cjs.js +26 -45
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.d.ts +101 -9
- package/inplace/inplace.esm.js +26 -45
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +26 -45
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +22 -113
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +120 -28
- package/inputmask/inputmask.esm.js +23 -114
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +22 -113
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +93 -267
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +266 -58
- package/inputnumber/inputnumber.esm.js +94 -268
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +93 -267
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +30 -38
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.d.ts +118 -27
- package/inputswitch/inputswitch.esm.js +31 -39
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +30 -38
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/inputtext.cjs.js +0 -11
- package/inputtext/inputtext.d.ts +58 -9
- package/inputtext/inputtext.esm.js +0 -11
- package/inputtext/inputtext.js +0 -11
- package/inputtextarea/inputtextarea.cjs.js +0 -20
- package/inputtextarea/inputtextarea.d.ts +53 -9
- package/inputtextarea/inputtextarea.esm.js +0 -20
- package/inputtextarea/inputtextarea.js +0 -20
- package/keyfilter/keyfilter.cjs.js +4 -15
- package/keyfilter/keyfilter.esm.js +4 -15
- package/keyfilter/keyfilter.js +4 -15
- package/keyfilter/keyfilteroptions.d.ts +15 -0
- package/knob/knob.cjs.js +74 -106
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.d.ts +127 -20
- package/knob/knob.esm.js +74 -106
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +74 -106
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +97 -125
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.d.ts +270 -42
- package/listbox/listbox.esm.js +98 -126
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +97 -125
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +36 -99
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.d.ts +50 -11
- package/megamenu/megamenu.esm.js +36 -99
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +36 -99
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +85 -138
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.d.ts +187 -33
- package/mention/mention.esm.js +85 -138
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +85 -138
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +41 -73
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +89 -12
- package/menu/menu.esm.js +41 -73
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +41 -73
- package/menu/menu.min.css +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +49 -99
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.d.ts +53 -8
- package/menubar/menubar.esm.js +49 -99
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +49 -99
- package/menubar/menubar.min.js +1 -1
- package/menuitem/menuitem.d.ts +114 -19
- package/message/message.cjs.js +0 -7
- package/message/message.d.ts +50 -11
- package/message/message.esm.js +0 -7
- package/message/message.js +0 -7
- package/messages/messages.cjs.js +39 -67
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.d.ts +91 -11
- package/messages/messages.esm.js +39 -67
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +39 -67
- package/messages/messages.min.js +1 -1
- package/multiselect/multiselect.cjs.js +148 -212
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +433 -81
- package/multiselect/multiselect.esm.js +149 -213
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +148 -212
- package/multiselect/multiselect.min.css +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +61 -53
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.d.ts +157 -22
- package/multistatecheckbox/multistatecheckbox.esm.js +62 -54
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +61 -53
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/orderlist/orderlist.cjs.js +38 -103
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.d.ts +113 -16
- package/orderlist/orderlist.esm.js +38 -103
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +38 -103
- package/orderlist/orderlist.min.css +1 -1
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +26 -52
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.d.ts +107 -16
- package/organizationchart/organizationchart.esm.js +26 -52
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +26 -52
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +44 -80
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +89 -15
- package/overlaypanel/overlaypanel.esm.js +44 -80
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +44 -80
- package/overlaypanel/overlaypanel.min.css +1 -1
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/overlayservice/overlayservice.d.ts +52 -7
- package/package.json +2 -2
- package/paginator/paginator.cjs.js +46 -87
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.d.ts +409 -44
- package/paginator/paginator.esm.js +46 -87
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +46 -87
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +29 -50
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.d.ts +142 -16
- package/panel/panel.esm.js +29 -50
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +29 -50
- package/panel/panel.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +35 -81
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.d.ts +46 -4
- package/panelmenu/panelmenu.esm.js +35 -81
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +35 -81
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +61 -108
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +177 -37
- package/password/password.esm.js +61 -108
- package/password/password.esm.min.js +1 -1
- package/password/password.js +61 -108
- package/password/password.min.css +1 -1
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +48 -159
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.d.ts +272 -46
- package/picklist/picklist.esm.js +48 -159
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +48 -159
- package/picklist/picklist.min.js +1 -1
- package/portal/portal.cjs.js +26 -31
- package/portal/portal.cjs.min.js +1 -1
- package/portal/portal.esm.js +26 -31
- package/portal/portal.esm.min.js +1 -1
- package/portal/portal.js +26 -31
- package/portal/portal.min.js +1 -1
- package/primereact.all.cjs.js +2541 -7484
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +2541 -7484
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +2541 -7484
- package/primereact.all.min.js +1 -1
- package/progressbar/progressbar.cjs.js +0 -7
- package/progressbar/progressbar.d.ts +60 -11
- package/progressbar/progressbar.esm.js +0 -7
- package/progressbar/progressbar.js +0 -7
- package/progressspinner/progressspinner.cjs.js +0 -2
- package/progressspinner/progressspinner.d.ts +47 -4
- package/progressspinner/progressspinner.esm.js +0 -2
- package/progressspinner/progressspinner.js +0 -2
- package/radiobutton/radiobutton.cjs.js +35 -41
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +99 -29
- package/radiobutton/radiobutton.esm.js +35 -41
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +35 -41
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +27 -14
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.d.ts +101 -24
- package/rating/rating.esm.js +27 -14
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +27 -14
- package/rating/rating.min.js +1 -1
- package/resources/primereact.css +121 -64
- package/resources/primereact.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +5 -9
- package/resources/themes/arya-green/theme.css +4 -10
- package/resources/themes/arya-orange/theme.css +4 -9
- package/resources/themes/arya-purple/theme.css +4 -9
- package/resources/themes/bootstrap4-dark-blue/theme.css +4 -9
- package/resources/themes/bootstrap4-dark-purple/theme.css +4 -9
- package/resources/themes/bootstrap4-light-blue/theme.css +4 -9
- package/resources/themes/bootstrap4-light-purple/theme.css +4 -10
- package/resources/themes/fluent-light/theme.css +4 -10
- package/resources/themes/lara-dark-blue/theme.css +4 -9
- package/resources/themes/lara-dark-indigo/theme.css +4 -10
- package/resources/themes/lara-dark-purple/theme.css +4 -9
- package/resources/themes/lara-dark-teal/theme.css +4 -10
- package/resources/themes/lara-light-blue/theme.css +4 -9
- package/resources/themes/lara-light-indigo/theme.css +4 -9
- package/resources/themes/lara-light-purple/theme.css +4 -9
- package/resources/themes/lara-light-teal/theme.css +4 -9
- package/resources/themes/luna-amber/theme.css +5 -9
- package/resources/themes/luna-blue/theme.css +4 -9
- package/resources/themes/luna-green/theme.css +5 -9
- package/resources/themes/luna-pink/theme.css +4 -9
- package/resources/themes/md-dark-deeppurple/theme.css +4 -9
- package/resources/themes/md-dark-indigo/theme.css +5 -9
- package/resources/themes/md-light-deeppurple/theme.css +5 -9
- package/resources/themes/md-light-indigo/theme.css +5 -9
- package/resources/themes/mdc-dark-deeppurple/theme.css +5 -9
- package/resources/themes/mdc-dark-indigo/theme.css +4 -9
- package/resources/themes/mdc-light-deeppurple/theme.css +5 -9
- package/resources/themes/mdc-light-indigo/theme.css +4 -9
- package/resources/themes/mira/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/mira/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/mira/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/mira/theme.css +6237 -0
- package/resources/themes/nano/theme.css +6009 -0
- package/resources/themes/nova/theme.css +4 -9
- package/resources/themes/nova-accent/theme.css +5 -9
- package/resources/themes/nova-alt/theme.css +4 -9
- package/resources/themes/rhea/theme.css +5 -9
- package/resources/themes/saga-blue/theme.css +4 -9
- package/resources/themes/saga-green/theme.css +5 -9
- package/resources/themes/saga-orange/theme.css +5 -9
- package/resources/themes/saga-purple/theme.css +5 -9
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-dark/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-dark/theme.css +6002 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/soho-light/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/soho-light/theme.css +6056 -0
- package/resources/themes/vela-blue/theme.css +4 -9
- package/resources/themes/vela-green/theme.css +4 -9
- package/resources/themes/vela-orange/theme.css +4 -9
- package/resources/themes/vela-purple/theme.css +5 -9
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-dark/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-dark/theme.css +6164 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-300.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-600.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-700.woff2 +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff +0 -0
- package/resources/themes/viva-light/fonts/poppins-v15-latin-ext_latin-regular.woff2 +0 -0
- package/resources/themes/viva-light/theme.css +6164 -0
- package/ripple/ripple.cjs.js +0 -12
- package/ripple/ripple.d.ts +29 -1
- package/ripple/ripple.esm.js +0 -12
- package/ripple/ripple.js +0 -12
- package/row/row.cjs.js +0 -2
- package/row/row.d.ts +37 -3
- package/row/row.esm.js +0 -2
- package/row/row.js +0 -2
- package/scrollpanel/scrollpanel.cjs.js +2 -16
- package/scrollpanel/scrollpanel.d.ts +45 -1
- package/scrollpanel/scrollpanel.esm.js +2 -16
- package/scrollpanel/scrollpanel.js +2 -16
- package/scrolltop/scrolltop.cjs.js +44 -57
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.d.ts +70 -10
- package/scrolltop/scrolltop.esm.js +44 -57
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +44 -57
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +29 -53
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.d.ts +111 -32
- package/selectbutton/selectbutton.esm.js +30 -54
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +29 -53
- package/selectbutton/selectbutton.min.js +1 -1
- package/selectitem/selectitem.d.ts +34 -0
- package/sidebar/sidebar.cjs.js +65 -84
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.d.ts +120 -22
- package/sidebar/sidebar.esm.js +65 -84
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +65 -84
- package/sidebar/sidebar.min.css +1 -1
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +0 -2
- package/skeleton/skeleton.d.ts +61 -11
- package/skeleton/skeleton.esm.js +0 -2
- package/skeleton/skeleton.js +0 -2
- package/slidemenu/slidemenu.cjs.js +73 -87
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.d.ts +132 -18
- package/slidemenu/slidemenu.esm.js +73 -87
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +73 -87
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +61 -96
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.d.ts +101 -18
- package/slider/slider.esm.js +61 -96
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +61 -96
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +70 -89
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.d.ts +149 -20
- package/speeddial/speeddial.esm.js +70 -89
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +70 -89
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +48 -81
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.d.ts +131 -23
- package/splitbutton/splitbutton.esm.js +48 -81
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +48 -81
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +72 -85
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.d.ts +98 -12
- package/splitter/splitter.esm.js +72 -85
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +72 -85
- package/splitter/splitter.min.js +1 -1
- package/steps/steps.cjs.js +0 -14
- package/steps/steps.d.ts +67 -6
- package/steps/steps.esm.js +0 -14
- package/steps/steps.js +0 -14
- package/styleclass/styleclass.cjs.js +75 -111
- package/styleclass/styleclass.cjs.min.js +1 -1
- package/styleclass/styleclass.d.ts +77 -12
- package/styleclass/styleclass.esm.js +75 -111
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +75 -111
- package/styleclass/styleclass.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +33 -54
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.d.ts +62 -5
- package/tabmenu/tabmenu.esm.js +33 -54
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +33 -54
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +84 -103
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +213 -27
- package/tabview/tabview.esm.js +84 -103
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +84 -103
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +27 -4
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.d.ts +50 -6
- package/tag/tag.esm.js +27 -4
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +27 -4
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +40 -63
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.d.ts +45 -3
- package/terminal/terminal.esm.js +41 -64
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +40 -63
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.d.ts +42 -4
- package/tieredmenu/tieredmenu.cjs.js +68 -111
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.d.ts +77 -12
- package/tieredmenu/tieredmenu.esm.js +68 -111
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +68 -111
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.cjs.js +33 -17
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.d.ts +62 -13
- package/timeline/timeline.esm.js +33 -17
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +33 -17
- package/timeline/timeline.min.js +1 -1
- package/toast/toast.cjs.js +85 -100
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.d.ts +134 -27
- package/toast/toast.esm.js +85 -100
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +85 -100
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +4 -8
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.d.ts +122 -15
- package/togglebutton/togglebutton.esm.js +5 -9
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +4 -8
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +13 -9
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.d.ts +55 -5
- package/toolbar/toolbar.esm.js +13 -9
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +13 -9
- package/toolbar/toolbar.min.css +1 -1
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +111 -164
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.d.ts +73 -9
- package/tooltip/tooltip.esm.js +111 -164
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +111 -164
- package/tooltip/tooltip.min.css +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tooltip/tooltipoptions.d.ts +350 -31
- package/tree/tree.cjs.js +68 -223
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.d.ts +435 -71
- package/tree/tree.esm.js +68 -223
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +68 -223
- package/tree/tree.min.js +1 -1
- package/treenode/treenode.d.ts +62 -12
- package/treeselect/treeselect.cjs.js +124 -168
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +327 -77
- package/treeselect/treeselect.esm.js +125 -169
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +124 -168
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +143 -461
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.d.ts +501 -112
- package/treetable/treetable.esm.js +143 -461
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +143 -461
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +32 -39
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +72 -20
- package/tristatecheckbox/tristatecheckbox.esm.js +33 -40
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +32 -39
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/ts-helpers.d.ts +24 -0
- package/utils/utils.cjs.js +137 -339
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.d.ts +8 -1
- package/utils/utils.esm.js +137 -339
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +137 -339
- package/utils/utils.min.js +1 -1
- package/virtualscroller/virtualscroller.cjs.js +108 -204
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +351 -59
- package/virtualscroller/virtualscroller.esm.js +108 -204
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +108 -204
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +173 -41
package/dropdown/dropdown.cjs.js
CHANGED
|
@@ -40,14 +40,12 @@ function _extends() {
|
|
|
40
40
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
41
41
|
for (var i = 1; i < arguments.length; i++) {
|
|
42
42
|
var source = arguments[i];
|
|
43
|
-
|
|
44
43
|
for (var key in source) {
|
|
45
44
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
46
45
|
target[key] = source[key];
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
|
-
|
|
51
49
|
return target;
|
|
52
50
|
};
|
|
53
51
|
return _extends.apply(this, arguments);
|
|
@@ -63,7 +61,24 @@ function _typeof(obj) {
|
|
|
63
61
|
}, _typeof(obj);
|
|
64
62
|
}
|
|
65
63
|
|
|
64
|
+
function _toPrimitive(input, hint) {
|
|
65
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
66
|
+
var prim = input[Symbol.toPrimitive];
|
|
67
|
+
if (prim !== undefined) {
|
|
68
|
+
var res = prim.call(input, hint || "default");
|
|
69
|
+
if (_typeof(res) !== "object") return res;
|
|
70
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
71
|
+
}
|
|
72
|
+
return (hint === "string" ? String : Number)(input);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function _toPropertyKey(arg) {
|
|
76
|
+
var key = _toPrimitive(arg, "string");
|
|
77
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
78
|
+
}
|
|
79
|
+
|
|
66
80
|
function _defineProperty(obj, key, value) {
|
|
81
|
+
key = _toPropertyKey(key);
|
|
67
82
|
if (key in obj) {
|
|
68
83
|
Object.defineProperty(obj, key, {
|
|
69
84
|
value: value,
|
|
@@ -74,7 +89,6 @@ function _defineProperty(obj, key, value) {
|
|
|
74
89
|
} else {
|
|
75
90
|
obj[key] = value;
|
|
76
91
|
}
|
|
77
|
-
|
|
78
92
|
return obj;
|
|
79
93
|
}
|
|
80
94
|
|
|
@@ -83,42 +97,40 @@ function _arrayWithHoles(arr) {
|
|
|
83
97
|
}
|
|
84
98
|
|
|
85
99
|
function _iterableToArrayLimit(arr, i) {
|
|
86
|
-
var _i =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
try {
|
|
96
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
97
|
-
_arr.push(_s.value);
|
|
98
|
-
|
|
99
|
-
if (i && _arr.length === i) break;
|
|
100
|
-
}
|
|
101
|
-
} catch (err) {
|
|
102
|
-
_d = true;
|
|
103
|
-
_e = err;
|
|
104
|
-
} finally {
|
|
100
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
101
|
+
if (null != _i) {
|
|
102
|
+
var _s,
|
|
103
|
+
_e,
|
|
104
|
+
_x,
|
|
105
|
+
_r,
|
|
106
|
+
_arr = [],
|
|
107
|
+
_n = !0,
|
|
108
|
+
_d = !1;
|
|
105
109
|
try {
|
|
106
|
-
if (
|
|
110
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
111
|
+
if (Object(_i) !== _i) return;
|
|
112
|
+
_n = !1;
|
|
113
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
114
|
+
;
|
|
115
|
+
}
|
|
116
|
+
} catch (err) {
|
|
117
|
+
_d = !0, _e = err;
|
|
107
118
|
} finally {
|
|
108
|
-
|
|
119
|
+
try {
|
|
120
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
121
|
+
} finally {
|
|
122
|
+
if (_d) throw _e;
|
|
123
|
+
}
|
|
109
124
|
}
|
|
125
|
+
return _arr;
|
|
110
126
|
}
|
|
111
|
-
|
|
112
|
-
return _arr;
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
function _arrayLikeToArray$1(arr, len) {
|
|
116
130
|
if (len == null || len > arr.length) len = arr.length;
|
|
117
|
-
|
|
118
131
|
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
119
132
|
arr2[i] = arr[i];
|
|
120
133
|
}
|
|
121
|
-
|
|
122
134
|
return arr2;
|
|
123
135
|
}
|
|
124
136
|
|
|
@@ -148,7 +160,6 @@ var DropdownItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
148
160
|
});
|
|
149
161
|
}
|
|
150
162
|
};
|
|
151
|
-
|
|
152
163
|
var className = utils.classNames('p-dropdown-item', {
|
|
153
164
|
'p-highlight': props.selected,
|
|
154
165
|
'p-disabled': props.disabled,
|
|
@@ -168,7 +179,6 @@ var DropdownItem = /*#__PURE__*/React__namespace.memo(function (props) {
|
|
|
168
179
|
DropdownItem.displayName = 'DropdownItem';
|
|
169
180
|
|
|
170
181
|
function ownKeys$1(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; }
|
|
171
|
-
|
|
172
182
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
173
183
|
var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
174
184
|
var virtualScrollerRef = React__namespace.useRef(null);
|
|
@@ -182,12 +192,10 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
182
192
|
return props.resetFilter();
|
|
183
193
|
}
|
|
184
194
|
};
|
|
185
|
-
|
|
186
195
|
var onEnter = function onEnter() {
|
|
187
196
|
props.onEnter(function () {
|
|
188
197
|
if (virtualScrollerRef.current) {
|
|
189
198
|
var selectedIndex = props.getSelectedOptionIndex();
|
|
190
|
-
|
|
191
199
|
if (selectedIndex !== -1) {
|
|
192
200
|
setTimeout(function () {
|
|
193
201
|
return virtualScrollerRef.current.scrollToIndex(selectedIndex);
|
|
@@ -196,7 +204,6 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
196
204
|
}
|
|
197
205
|
});
|
|
198
206
|
};
|
|
199
|
-
|
|
200
207
|
var onEntered = function onEntered() {
|
|
201
208
|
props.onEntered(function () {
|
|
202
209
|
if (props.filter && props.filterInputAutoFocus) {
|
|
@@ -204,12 +211,10 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
204
211
|
}
|
|
205
212
|
});
|
|
206
213
|
};
|
|
207
|
-
|
|
208
214
|
var onFilterInputChange = function onFilterInputChange(event) {
|
|
209
215
|
virtualScrollerRef.current && virtualScrollerRef.current.scrollToIndex(0);
|
|
210
216
|
props.onFilterInputChange && props.onFilterInputChange(event);
|
|
211
217
|
};
|
|
212
|
-
|
|
213
218
|
var createGroupChildren = function createGroupChildren(optionGroup, style) {
|
|
214
219
|
var groupChildren = props.getOptionGroupChildren(optionGroup);
|
|
215
220
|
return groupChildren.map(function (option, j) {
|
|
@@ -228,20 +233,17 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
228
233
|
});
|
|
229
234
|
});
|
|
230
235
|
};
|
|
231
|
-
|
|
232
236
|
var createEmptyMessage = function createEmptyMessage(emptyMessage, isFilter) {
|
|
233
237
|
var message = utils.ObjectUtils.getJSXElement(emptyMessage, props) || PrimeReact.localeOption(isFilter ? 'emptyFilterMessage' : 'emptyMessage');
|
|
234
238
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
235
239
|
className: "p-dropdown-empty-message"
|
|
236
240
|
}, message);
|
|
237
241
|
};
|
|
238
|
-
|
|
239
242
|
var createItem = function createItem(option, index) {
|
|
240
243
|
var scrollerOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
241
244
|
var style = {
|
|
242
245
|
height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
|
|
243
246
|
};
|
|
244
|
-
|
|
245
247
|
if (props.optionGroupLabel) {
|
|
246
248
|
var groupContent = props.optionGroupTemplate ? utils.ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : props.getOptionGroupLabel(option);
|
|
247
249
|
var groupChildrenContent = createGroupChildren(option, style);
|
|
@@ -268,17 +270,14 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
268
270
|
});
|
|
269
271
|
}
|
|
270
272
|
};
|
|
271
|
-
|
|
272
273
|
var createItems = function createItems() {
|
|
273
274
|
if (utils.ObjectUtils.isNotEmpty(props.visibleOptions)) {
|
|
274
275
|
return props.visibleOptions.map(createItem);
|
|
275
276
|
} else if (props.hasFilter) {
|
|
276
277
|
return createEmptyMessage(props.emptyFilterMessage, true);
|
|
277
278
|
}
|
|
278
|
-
|
|
279
279
|
return createEmptyMessage(props.emptyMessage);
|
|
280
280
|
};
|
|
281
|
-
|
|
282
281
|
var createFilterClearIcon = function createFilterClearIcon() {
|
|
283
282
|
if (props.showFilterClear && props.filterValue) {
|
|
284
283
|
var ariaLabel = PrimeReact.localeOption('clear');
|
|
@@ -292,10 +291,8 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
292
291
|
}
|
|
293
292
|
});
|
|
294
293
|
}
|
|
295
|
-
|
|
296
294
|
return null;
|
|
297
295
|
};
|
|
298
|
-
|
|
299
296
|
var createFilter = function createFilter() {
|
|
300
297
|
if (props.filter) {
|
|
301
298
|
var clearIcon = createFilterClearIcon();
|
|
@@ -316,7 +313,6 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
316
313
|
}), clearIcon, /*#__PURE__*/React__namespace.createElement("i", {
|
|
317
314
|
className: "p-dropdown-filter-icon pi pi-search"
|
|
318
315
|
}));
|
|
319
|
-
|
|
320
316
|
if (props.filterTemplate) {
|
|
321
317
|
var defaultContentOptions = {
|
|
322
318
|
className: containerClassName,
|
|
@@ -330,15 +326,12 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
330
326
|
};
|
|
331
327
|
content = utils.ObjectUtils.getJSXElement(props.filterTemplate, defaultContentOptions);
|
|
332
328
|
}
|
|
333
|
-
|
|
334
329
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
335
330
|
className: "p-dropdown-header"
|
|
336
331
|
}, content);
|
|
337
332
|
}
|
|
338
|
-
|
|
339
333
|
return null;
|
|
340
334
|
};
|
|
341
|
-
|
|
342
335
|
var createContent = function createContent() {
|
|
343
336
|
if (props.virtualScrollerOptions) {
|
|
344
337
|
var virtualScrollerProps = _objectSpread$1(_objectSpread$1({}, props.virtualScrollerOptions), {
|
|
@@ -366,7 +359,6 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
366
359
|
}, content);
|
|
367
360
|
}
|
|
368
361
|
});
|
|
369
|
-
|
|
370
362
|
return /*#__PURE__*/React__namespace.createElement(virtualscroller.VirtualScroller, _extends({
|
|
371
363
|
ref: virtualScrollerRef
|
|
372
364
|
}, virtualScrollerProps));
|
|
@@ -383,9 +375,11 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
383
375
|
}, items));
|
|
384
376
|
}
|
|
385
377
|
};
|
|
386
|
-
|
|
387
378
|
var createElement = function createElement() {
|
|
388
|
-
var className = utils.classNames('p-dropdown-panel p-component', props.panelClassName
|
|
379
|
+
var className = utils.classNames('p-dropdown-panel p-component', props.panelClassName, {
|
|
380
|
+
'p-input-filled': PrimeReact__default["default"].inputStyle === 'filled',
|
|
381
|
+
'p-ripple-disabled': PrimeReact__default["default"].ripple === false
|
|
382
|
+
});
|
|
389
383
|
var filter = createFilter();
|
|
390
384
|
var content = createContent();
|
|
391
385
|
return /*#__PURE__*/React__namespace.createElement(csstransition.CSSTransition, {
|
|
@@ -410,7 +404,6 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
410
404
|
onClick: props.onClick
|
|
411
405
|
}, filter, content));
|
|
412
406
|
};
|
|
413
|
-
|
|
414
407
|
var element = createElement();
|
|
415
408
|
return /*#__PURE__*/React__namespace.createElement(portal.Portal, {
|
|
416
409
|
element: element,
|
|
@@ -420,74 +413,60 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
420
413
|
DropdownPanel.displayName = 'DropdownPanel';
|
|
421
414
|
|
|
422
415
|
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; }
|
|
423
|
-
|
|
424
416
|
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; }
|
|
425
|
-
|
|
426
417
|
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; } } }; }
|
|
427
|
-
|
|
428
418
|
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); }
|
|
429
|
-
|
|
430
419
|
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; }
|
|
431
420
|
var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
432
421
|
var _React$useState = React__namespace.useState(''),
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
422
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
423
|
+
filterState = _React$useState2[0],
|
|
424
|
+
setFilterState = _React$useState2[1];
|
|
437
425
|
var _React$useState3 = React__namespace.useState(false),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
426
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
427
|
+
focusedState = _React$useState4[0],
|
|
428
|
+
setFocusedState = _React$useState4[1];
|
|
442
429
|
var _React$useState5 = React__namespace.useState(false),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
430
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
431
|
+
overlayVisibleState = _React$useState6[0],
|
|
432
|
+
setOverlayVisibleState = _React$useState6[1];
|
|
447
433
|
var elementRef = React__namespace.useRef(null);
|
|
448
434
|
var overlayRef = React__namespace.useRef(null);
|
|
449
435
|
var inputRef = React__namespace.useRef(props.inputRef);
|
|
450
|
-
var focusInputRef = React__namespace.useRef(
|
|
436
|
+
var focusInputRef = React__namespace.useRef(props.focusInputRef);
|
|
451
437
|
var searchTimeout = React__namespace.useRef(null);
|
|
452
438
|
var searchValue = React__namespace.useRef(null);
|
|
453
439
|
var currentSearchChar = React__namespace.useRef(null);
|
|
454
440
|
var isLazy = props.virtualScrollerOptions && props.virtualScrollerOptions.lazy;
|
|
455
441
|
var hasFilter = utils.ObjectUtils.isNotEmpty(filterState);
|
|
456
442
|
var appendTo = props.appendTo || PrimeReact__default["default"].appendTo;
|
|
457
|
-
|
|
458
443
|
var _useOverlayListener = hooks.useOverlayListener({
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
444
|
+
target: elementRef,
|
|
445
|
+
overlay: overlayRef,
|
|
446
|
+
listener: function listener(event, _ref) {
|
|
447
|
+
var type = _ref.type,
|
|
463
448
|
valid = _ref.valid;
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
unbindOverlayListener = _useOverlayListener2[1];
|
|
474
|
-
|
|
449
|
+
if (valid) {
|
|
450
|
+
type === 'outside' ? !isClearClicked(event) && hide() : hide();
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
when: overlayVisibleState
|
|
454
|
+
}),
|
|
455
|
+
_useOverlayListener2 = _slicedToArray(_useOverlayListener, 2),
|
|
456
|
+
bindOverlayListener = _useOverlayListener2[0],
|
|
457
|
+
unbindOverlayListener = _useOverlayListener2[1];
|
|
475
458
|
var getVisibleOptions = function getVisibleOptions() {
|
|
476
459
|
if (hasFilter && !isLazy) {
|
|
477
460
|
var filterValue = filterState.trim().toLocaleLowerCase(props.filterLocale);
|
|
478
461
|
var searchFields = props.filterBy ? props.filterBy.split(',') : [props.optionLabel || 'label'];
|
|
479
|
-
|
|
480
462
|
if (props.optionGroupLabel) {
|
|
481
463
|
var filteredGroups = [];
|
|
482
|
-
|
|
483
464
|
var _iterator = _createForOfIteratorHelper(props.options),
|
|
484
|
-
|
|
485
|
-
|
|
465
|
+
_step;
|
|
486
466
|
try {
|
|
487
467
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
488
468
|
var optgroup = _step.value;
|
|
489
469
|
var filteredSubOptions = PrimeReact.FilterService.filter(getOptionGroupChildren(optgroup), searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
490
|
-
|
|
491
470
|
if (filteredSubOptions && filteredSubOptions.length) {
|
|
492
471
|
filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), {
|
|
493
472
|
items: filteredSubOptions
|
|
@@ -499,7 +478,6 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
499
478
|
} finally {
|
|
500
479
|
_iterator.f();
|
|
501
480
|
}
|
|
502
|
-
|
|
503
481
|
return filteredGroups;
|
|
504
482
|
} else {
|
|
505
483
|
return PrimeReact.FilterService.filter(props.options, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
@@ -508,16 +486,19 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
508
486
|
return props.options;
|
|
509
487
|
}
|
|
510
488
|
};
|
|
511
|
-
|
|
512
489
|
var isClearClicked = function isClearClicked(event) {
|
|
513
490
|
return utils.DomHandler.hasClass(event.target, 'p-dropdown-clear-icon') || utils.DomHandler.hasClass(event.target, 'p-dropdown-filter-clear-icon');
|
|
514
491
|
};
|
|
515
|
-
|
|
516
492
|
var onClick = function onClick(event) {
|
|
517
493
|
if (props.disabled) {
|
|
518
494
|
return;
|
|
519
495
|
}
|
|
496
|
+
props.onClick && props.onClick(event);
|
|
520
497
|
|
|
498
|
+
// do not continue if the user defined click wants to prevent it
|
|
499
|
+
if (event.defaultPrevented) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
521
502
|
if (utils.DomHandler.hasClass(event.target, 'p-dropdown-clear-icon') || event.target.tagName === 'INPUT') {
|
|
522
503
|
return;
|
|
523
504
|
} else if (!overlayRef.current || !(overlayRef.current && overlayRef.current.contains(event.target))) {
|
|
@@ -525,19 +506,15 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
525
506
|
overlayVisibleState ? hide() : show();
|
|
526
507
|
}
|
|
527
508
|
};
|
|
528
|
-
|
|
529
509
|
var onInputFocus = function onInputFocus(event) {
|
|
530
510
|
if (props.showOnFocus && !overlayVisibleState) {
|
|
531
511
|
show();
|
|
532
512
|
}
|
|
533
|
-
|
|
534
513
|
setFocusedState(true);
|
|
535
514
|
props.onFocus && props.onFocus(event);
|
|
536
515
|
};
|
|
537
|
-
|
|
538
516
|
var onInputBlur = function onInputBlur(event) {
|
|
539
517
|
setFocusedState(false);
|
|
540
|
-
|
|
541
518
|
if (props.onBlur) {
|
|
542
519
|
setTimeout(function () {
|
|
543
520
|
var currentValue = inputRef.current ? inputRef.current.value : undefined;
|
|
@@ -555,58 +532,54 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
555
532
|
}, 200);
|
|
556
533
|
}
|
|
557
534
|
};
|
|
558
|
-
|
|
559
535
|
var onPanelClick = function onPanelClick(event) {
|
|
560
536
|
overlayservice.OverlayService.emit('overlay-click', {
|
|
561
537
|
originalEvent: event,
|
|
562
538
|
target: elementRef.current
|
|
563
539
|
});
|
|
564
540
|
};
|
|
565
|
-
|
|
566
541
|
var onInputKeyDown = function onInputKeyDown(event) {
|
|
567
542
|
switch (event.which) {
|
|
568
543
|
//down
|
|
569
544
|
case 40:
|
|
570
545
|
onDownKey(event);
|
|
571
546
|
break;
|
|
572
|
-
//up
|
|
573
547
|
|
|
548
|
+
//up
|
|
574
549
|
case 38:
|
|
575
550
|
onUpKey(event);
|
|
576
551
|
break;
|
|
577
|
-
//space and enter
|
|
578
552
|
|
|
553
|
+
//space and enter
|
|
579
554
|
case 32:
|
|
580
555
|
case 13:
|
|
581
556
|
overlayVisibleState ? hide() : show();
|
|
582
557
|
event.preventDefault();
|
|
583
558
|
break;
|
|
584
|
-
//escape and tab
|
|
585
559
|
|
|
560
|
+
//escape and tab
|
|
586
561
|
case 27:
|
|
587
562
|
case 9:
|
|
588
563
|
hide();
|
|
589
564
|
break;
|
|
590
|
-
|
|
591
565
|
default:
|
|
592
566
|
search(event);
|
|
593
567
|
break;
|
|
594
568
|
}
|
|
595
569
|
};
|
|
596
|
-
|
|
597
570
|
var onFilterInputKeyDown = function onFilterInputKeyDown(event) {
|
|
598
571
|
switch (event.which) {
|
|
599
572
|
//down
|
|
600
573
|
case 40:
|
|
601
574
|
onDownKey(event);
|
|
602
575
|
break;
|
|
603
|
-
//up
|
|
604
576
|
|
|
577
|
+
//up
|
|
605
578
|
case 38:
|
|
606
579
|
onUpKey(event);
|
|
607
580
|
break;
|
|
608
|
-
//enter and escape
|
|
609
581
|
|
|
582
|
+
//enter and escape
|
|
610
583
|
case 13:
|
|
611
584
|
case 27:
|
|
612
585
|
hide();
|
|
@@ -614,11 +587,9 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
614
587
|
break;
|
|
615
588
|
}
|
|
616
589
|
};
|
|
617
|
-
|
|
618
590
|
var onUpKey = function onUpKey(event) {
|
|
619
591
|
if (visibleOptions) {
|
|
620
592
|
var prevOption = findPrevOption(getSelectedOptionIndex());
|
|
621
|
-
|
|
622
593
|
if (prevOption) {
|
|
623
594
|
selectItem({
|
|
624
595
|
originalEvent: event,
|
|
@@ -626,17 +597,14 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
626
597
|
});
|
|
627
598
|
}
|
|
628
599
|
}
|
|
629
|
-
|
|
630
600
|
event.preventDefault();
|
|
631
601
|
};
|
|
632
|
-
|
|
633
602
|
var onDownKey = function onDownKey(event) {
|
|
634
603
|
if (visibleOptions) {
|
|
635
604
|
if (!overlayVisibleState && event.altKey) {
|
|
636
605
|
show();
|
|
637
606
|
} else {
|
|
638
607
|
var nextOption = findNextOption(getSelectedOptionIndex());
|
|
639
|
-
|
|
640
608
|
if (nextOption) {
|
|
641
609
|
selectItem({
|
|
642
610
|
originalEvent: event,
|
|
@@ -645,10 +613,8 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
645
613
|
}
|
|
646
614
|
}
|
|
647
615
|
}
|
|
648
|
-
|
|
649
616
|
event.preventDefault();
|
|
650
617
|
};
|
|
651
|
-
|
|
652
618
|
var findNextOption = function findNextOption(index) {
|
|
653
619
|
if (props.optionGroupLabel) {
|
|
654
620
|
var groupIndex = index === -1 ? 0 : index.group;
|
|
@@ -659,26 +625,20 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
659
625
|
option: -1
|
|
660
626
|
});else return null;
|
|
661
627
|
}
|
|
662
|
-
|
|
663
628
|
return findNextOptionInList(visibleOptions, index);
|
|
664
629
|
};
|
|
665
|
-
|
|
666
630
|
var findNextOptionInList = function findNextOptionInList(list, index) {
|
|
667
631
|
var i = index + 1;
|
|
668
|
-
|
|
669
632
|
if (i === list.length) {
|
|
670
633
|
return null;
|
|
671
634
|
}
|
|
672
|
-
|
|
673
635
|
var option = list[i];
|
|
674
636
|
return isOptionDisabled(option) ? findNextOptionInList(i) : option;
|
|
675
637
|
};
|
|
676
|
-
|
|
677
638
|
var findPrevOption = function findPrevOption(index) {
|
|
678
639
|
if (index === -1) {
|
|
679
640
|
return null;
|
|
680
641
|
}
|
|
681
|
-
|
|
682
642
|
if (props.optionGroupLabel) {
|
|
683
643
|
var groupIndex = index.group;
|
|
684
644
|
var optionIndex = index.option;
|
|
@@ -688,39 +648,29 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
688
648
|
option: getOptionGroupChildren(visibleOptions[groupIndex - 1]).length
|
|
689
649
|
});else return null;
|
|
690
650
|
}
|
|
691
|
-
|
|
692
651
|
return findPrevOptionInList(visibleOptions, index);
|
|
693
652
|
};
|
|
694
|
-
|
|
695
653
|
var findPrevOptionInList = function findPrevOptionInList(list, index) {
|
|
696
654
|
var i = index - 1;
|
|
697
|
-
|
|
698
655
|
if (i < 0) {
|
|
699
656
|
return null;
|
|
700
657
|
}
|
|
701
|
-
|
|
702
658
|
var option = list[i];
|
|
703
659
|
return isOptionDisabled(option) ? findPrevOption(i) : option;
|
|
704
660
|
};
|
|
705
|
-
|
|
706
661
|
var search = function search(event) {
|
|
707
662
|
if (searchTimeout.current) {
|
|
708
663
|
clearTimeout(searchTimeout.current);
|
|
709
664
|
}
|
|
710
|
-
|
|
711
665
|
var _char = event.key;
|
|
712
|
-
|
|
713
666
|
if (_char === 'Shift' || _char === 'Control' || _char === 'Alt') {
|
|
714
667
|
return;
|
|
715
668
|
}
|
|
716
|
-
|
|
717
669
|
if (currentSearchChar.current === _char) searchValue.current = _char;else searchValue.current = searchValue.current ? searchValue.current + _char : _char;
|
|
718
670
|
currentSearchChar.current = _char;
|
|
719
|
-
|
|
720
671
|
if (searchValue.current) {
|
|
721
672
|
var searchIndex = getSelectedOptionIndex();
|
|
722
673
|
var newOption = props.optionGroupLabel ? searchOptionInGroup(searchIndex) : searchOption(searchIndex + 1);
|
|
723
|
-
|
|
724
674
|
if (newOption) {
|
|
725
675
|
selectItem({
|
|
726
676
|
originalEvent: event,
|
|
@@ -728,72 +678,56 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
728
678
|
});
|
|
729
679
|
}
|
|
730
680
|
}
|
|
731
|
-
|
|
732
681
|
searchTimeout.current = setTimeout(function () {
|
|
733
682
|
searchValue.current = null;
|
|
734
683
|
}, 250);
|
|
735
684
|
};
|
|
736
|
-
|
|
737
685
|
var searchOption = function searchOption(index) {
|
|
738
686
|
if (searchValue.current) {
|
|
739
687
|
return searchOptionInRange(index, visibleOptions.length) || searchOptionInRange(0, index);
|
|
740
688
|
}
|
|
741
|
-
|
|
742
689
|
return null;
|
|
743
690
|
};
|
|
744
|
-
|
|
745
691
|
var searchOptionInRange = function searchOptionInRange(start, end) {
|
|
746
692
|
for (var i = start; i < end; i++) {
|
|
747
693
|
var opt = visibleOptions[i];
|
|
748
|
-
|
|
749
694
|
if (matchesSearchValue(opt)) {
|
|
750
695
|
return opt;
|
|
751
696
|
}
|
|
752
697
|
}
|
|
753
|
-
|
|
754
698
|
return null;
|
|
755
699
|
};
|
|
756
|
-
|
|
757
700
|
var searchOptionInGroup = function searchOptionInGroup(index) {
|
|
758
701
|
var searchIndex = index === -1 ? {
|
|
759
702
|
group: 0,
|
|
760
703
|
option: -1
|
|
761
704
|
} : index;
|
|
762
|
-
|
|
763
705
|
for (var i = searchIndex.group; i < visibleOptions.length; i++) {
|
|
764
706
|
var groupOptions = getOptionGroupChildren(visibleOptions[i]);
|
|
765
|
-
|
|
766
707
|
for (var j = searchIndex.group === i ? searchIndex.option + 1 : 0; j < groupOptions.length; j++) {
|
|
767
708
|
if (matchesSearchValue(groupOptions[j])) {
|
|
768
709
|
return groupOptions[j];
|
|
769
710
|
}
|
|
770
711
|
}
|
|
771
712
|
}
|
|
772
|
-
|
|
773
713
|
for (var _i = 0; _i <= searchIndex.group; _i++) {
|
|
774
714
|
var _groupOptions = getOptionGroupChildren(visibleOptions[_i]);
|
|
775
|
-
|
|
776
715
|
for (var _j = 0; _j < (searchIndex.group === _i ? searchIndex.option : _groupOptions.length); _j++) {
|
|
777
716
|
if (matchesSearchValue(_groupOptions[_j])) {
|
|
778
717
|
return _groupOptions[_j];
|
|
779
718
|
}
|
|
780
719
|
}
|
|
781
720
|
}
|
|
782
|
-
|
|
783
721
|
return null;
|
|
784
722
|
};
|
|
785
|
-
|
|
786
723
|
var matchesSearchValue = function matchesSearchValue(option) {
|
|
787
724
|
var label = getOptionLabel(option);
|
|
788
|
-
|
|
789
725
|
if (!label) {
|
|
790
726
|
return false;
|
|
791
727
|
}
|
|
792
|
-
|
|
793
728
|
label = label.toLocaleLowerCase(props.filterLocale);
|
|
794
729
|
return label.startsWith(searchValue.current.toLocaleLowerCase(props.filterLocale));
|
|
795
730
|
};
|
|
796
|
-
|
|
797
731
|
var onEditableInputChange = function onEditableInputChange(event) {
|
|
798
732
|
if (props.onChange) {
|
|
799
733
|
props.onChange({
|
|
@@ -809,28 +743,22 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
809
743
|
});
|
|
810
744
|
}
|
|
811
745
|
};
|
|
812
|
-
|
|
813
746
|
var onEditableInputFocus = function onEditableInputFocus(event) {
|
|
814
747
|
setFocusedState(true);
|
|
815
748
|
hide();
|
|
816
749
|
props.onFocus && props.onFocus(event);
|
|
817
750
|
};
|
|
818
|
-
|
|
819
751
|
var onOptionClick = function onOptionClick(event) {
|
|
820
752
|
var option = event.option;
|
|
821
|
-
|
|
822
753
|
if (!option.disabled) {
|
|
823
754
|
selectItem(event);
|
|
824
755
|
utils.DomHandler.focus(focusInputRef.current);
|
|
825
756
|
}
|
|
826
|
-
|
|
827
757
|
hide();
|
|
828
758
|
};
|
|
829
|
-
|
|
830
759
|
var onFilterInputChange = function onFilterInputChange(event) {
|
|
831
760
|
var filter = event.target.value;
|
|
832
761
|
setFilterState(filter);
|
|
833
|
-
|
|
834
762
|
if (props.onFilter) {
|
|
835
763
|
props.onFilter({
|
|
836
764
|
originalEvent: event,
|
|
@@ -838,11 +766,9 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
838
766
|
});
|
|
839
767
|
}
|
|
840
768
|
};
|
|
841
|
-
|
|
842
769
|
var onFilterClearIconClick = function onFilterClearIconClick(callback) {
|
|
843
770
|
resetFilter(callback);
|
|
844
771
|
};
|
|
845
|
-
|
|
846
772
|
var resetFilter = function resetFilter(callback) {
|
|
847
773
|
setFilterState('');
|
|
848
774
|
props.onFilter && props.onFilter({
|
|
@@ -850,7 +776,6 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
850
776
|
});
|
|
851
777
|
callback && callback();
|
|
852
778
|
};
|
|
853
|
-
|
|
854
779
|
var clear = function clear(event) {
|
|
855
780
|
if (props.onChange) {
|
|
856
781
|
props.onChange({
|
|
@@ -865,15 +790,12 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
865
790
|
}
|
|
866
791
|
});
|
|
867
792
|
}
|
|
868
|
-
|
|
869
793
|
updateEditableLabel();
|
|
870
794
|
};
|
|
871
|
-
|
|
872
795
|
var selectItem = function selectItem(event) {
|
|
873
796
|
if (selectedOption !== event.option) {
|
|
874
797
|
updateEditableLabel(event.option);
|
|
875
798
|
var optionValue = getOptionValue(event.option);
|
|
876
|
-
|
|
877
799
|
if (props.onChange) {
|
|
878
800
|
props.onChange({
|
|
879
801
|
originalEvent: event.originalEvent,
|
|
@@ -889,15 +811,12 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
889
811
|
}
|
|
890
812
|
}
|
|
891
813
|
};
|
|
892
|
-
|
|
893
814
|
var getSelectedOptionIndex = function getSelectedOptionIndex(options) {
|
|
894
815
|
options = options || visibleOptions;
|
|
895
|
-
|
|
896
816
|
if (props.value != null && options) {
|
|
897
817
|
if (props.optionGroupLabel) {
|
|
898
818
|
for (var i = 0; i < options.length; i++) {
|
|
899
819
|
var selectedOptionIndex = findOptionIndexInList(props.value, getOptionGroupChildren(options[i]));
|
|
900
|
-
|
|
901
820
|
if (selectedOptionIndex !== -1) {
|
|
902
821
|
return {
|
|
903
822
|
group: i,
|
|
@@ -909,65 +828,51 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
909
828
|
return findOptionIndexInList(props.value, options);
|
|
910
829
|
}
|
|
911
830
|
}
|
|
912
|
-
|
|
913
831
|
return -1;
|
|
914
832
|
};
|
|
915
|
-
|
|
916
833
|
var equalityKey = function equalityKey() {
|
|
917
834
|
return props.optionValue ? null : props.dataKey;
|
|
918
835
|
};
|
|
919
|
-
|
|
920
836
|
var findOptionIndexInList = function findOptionIndexInList(value, list) {
|
|
921
837
|
var key = equalityKey();
|
|
922
838
|
return list.findIndex(function (item) {
|
|
923
839
|
return utils.ObjectUtils.equals(value, getOptionValue(item), key);
|
|
924
840
|
});
|
|
925
841
|
};
|
|
926
|
-
|
|
927
842
|
var isSelected = function isSelected(option) {
|
|
928
843
|
return utils.ObjectUtils.equals(props.value, getOptionValue(option), equalityKey());
|
|
929
844
|
};
|
|
930
|
-
|
|
931
845
|
var show = function show() {
|
|
932
846
|
setOverlayVisibleState(true);
|
|
933
847
|
};
|
|
934
|
-
|
|
935
848
|
var hide = function hide() {
|
|
936
849
|
setOverlayVisibleState(false);
|
|
937
850
|
};
|
|
938
|
-
|
|
939
851
|
var onOverlayEnter = function onOverlayEnter(callback) {
|
|
940
852
|
utils.ZIndexUtils.set('overlay', overlayRef.current, PrimeReact__default["default"].autoZIndex, PrimeReact__default["default"].zIndex['overlay']);
|
|
941
853
|
alignOverlay();
|
|
942
854
|
callback && callback();
|
|
943
855
|
};
|
|
944
|
-
|
|
945
856
|
var onOverlayEntered = function onOverlayEntered(callback) {
|
|
946
857
|
callback && callback();
|
|
947
858
|
bindOverlayListener();
|
|
948
859
|
props.onShow && props.onShow();
|
|
949
860
|
};
|
|
950
|
-
|
|
951
861
|
var onOverlayExit = function onOverlayExit() {
|
|
952
862
|
unbindOverlayListener();
|
|
953
863
|
};
|
|
954
|
-
|
|
955
864
|
var onOverlayExited = function onOverlayExited() {
|
|
956
865
|
if (props.filter && props.resetFilterOnHide) {
|
|
957
866
|
resetFilter();
|
|
958
867
|
}
|
|
959
|
-
|
|
960
868
|
utils.ZIndexUtils.clear(overlayRef.current);
|
|
961
869
|
props.onHide && props.onHide();
|
|
962
870
|
};
|
|
963
|
-
|
|
964
871
|
var alignOverlay = function alignOverlay() {
|
|
965
872
|
utils.DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || PrimeReact__default["default"].appendTo);
|
|
966
873
|
};
|
|
967
|
-
|
|
968
874
|
var scrollInView = function scrollInView() {
|
|
969
875
|
var highlightItem = utils.DomHandler.findSingle(overlayRef.current, 'li.p-highlight');
|
|
970
|
-
|
|
971
876
|
if (highlightItem && highlightItem.scrollIntoView) {
|
|
972
877
|
highlightItem.scrollIntoView({
|
|
973
878
|
block: 'nearest',
|
|
@@ -975,45 +880,35 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
975
880
|
});
|
|
976
881
|
}
|
|
977
882
|
};
|
|
978
|
-
|
|
979
883
|
var updateEditableLabel = function updateEditableLabel(option) {
|
|
980
884
|
if (inputRef.current) {
|
|
981
885
|
inputRef.current.value = option ? getOptionLabel(option) : props.value || '';
|
|
982
886
|
}
|
|
983
887
|
};
|
|
984
|
-
|
|
985
888
|
var getOptionLabel = function getOptionLabel(option) {
|
|
986
889
|
return props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
|
|
987
890
|
};
|
|
988
|
-
|
|
989
891
|
var getOptionValue = function getOptionValue(option) {
|
|
990
892
|
return props.optionValue ? utils.ObjectUtils.resolveFieldData(option, props.optionValue) : option && option['value'] !== undefined ? option['value'] : option;
|
|
991
893
|
};
|
|
992
|
-
|
|
993
894
|
var getOptionRenderKey = function getOptionRenderKey(option) {
|
|
994
895
|
return props.dataKey ? utils.ObjectUtils.resolveFieldData(option, props.dataKey) : getOptionLabel(option);
|
|
995
896
|
};
|
|
996
|
-
|
|
997
897
|
var isOptionDisabled = function isOptionDisabled(option) {
|
|
998
898
|
if (props.optionDisabled) {
|
|
999
899
|
return utils.ObjectUtils.isFunction(props.optionDisabled) ? props.optionDisabled(option) : utils.ObjectUtils.resolveFieldData(option, props.optionDisabled);
|
|
1000
900
|
}
|
|
1001
|
-
|
|
1002
901
|
return option && option['disabled'] !== undefined ? option['disabled'] : false;
|
|
1003
902
|
};
|
|
1004
|
-
|
|
1005
903
|
var getOptionGroupRenderKey = function getOptionGroupRenderKey(optionGroup) {
|
|
1006
904
|
return utils.ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
|
|
1007
905
|
};
|
|
1008
|
-
|
|
1009
906
|
var getOptionGroupLabel = function getOptionGroupLabel(optionGroup) {
|
|
1010
907
|
return utils.ObjectUtils.resolveFieldData(optionGroup, props.optionGroupLabel);
|
|
1011
908
|
};
|
|
1012
|
-
|
|
1013
909
|
var getOptionGroupChildren = function getOptionGroupChildren(optionGroup) {
|
|
1014
910
|
return utils.ObjectUtils.resolveFieldData(optionGroup, props.optionGroupChildren);
|
|
1015
911
|
};
|
|
1016
|
-
|
|
1017
912
|
var updateInputField = function updateInputField() {
|
|
1018
913
|
if (props.editable && inputRef.current) {
|
|
1019
914
|
var label = selectedOption ? getOptionLabel(selectedOption) : null;
|
|
@@ -1021,17 +916,18 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1021
916
|
inputRef.current.value = value;
|
|
1022
917
|
}
|
|
1023
918
|
};
|
|
1024
|
-
|
|
1025
919
|
var getSelectedOption = function getSelectedOption() {
|
|
1026
920
|
var index = getSelectedOptionIndex(props.options);
|
|
1027
921
|
return index !== -1 ? props.optionGroupLabel ? getOptionGroupChildren(props.options[index.group])[index.option] : props.options[index] : null;
|
|
1028
922
|
};
|
|
1029
|
-
|
|
1030
923
|
React__namespace.useImperativeHandle(ref, function () {
|
|
1031
924
|
return {
|
|
1032
925
|
props: props,
|
|
1033
926
|
show: show,
|
|
1034
927
|
hide: hide,
|
|
928
|
+
focus: function focus() {
|
|
929
|
+
return utils.DomHandler.focus(focusInputRef.current);
|
|
930
|
+
},
|
|
1035
931
|
getElement: function getElement() {
|
|
1036
932
|
return elementRef.current;
|
|
1037
933
|
},
|
|
@@ -1048,7 +944,8 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1048
944
|
});
|
|
1049
945
|
React__namespace.useEffect(function () {
|
|
1050
946
|
utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
|
|
1051
|
-
|
|
947
|
+
utils.ObjectUtils.combinedRefs(focusInputRef, props.focusInputRef);
|
|
948
|
+
}, [inputRef, props.inputRef, focusInputRef, props.focusInputRef]);
|
|
1052
949
|
hooks.useMountEffect(function () {
|
|
1053
950
|
if (props.autoFocus) {
|
|
1054
951
|
utils.DomHandler.focus(focusInputRef.current, props.autoFocus);
|
|
@@ -1060,17 +957,15 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1060
957
|
}
|
|
1061
958
|
}, [overlayVisibleState, props.value]);
|
|
1062
959
|
hooks.useUpdateEffect(function () {
|
|
1063
|
-
if (overlayVisibleState && props.filter) {
|
|
960
|
+
if (overlayVisibleState && filterState && props.filter) {
|
|
1064
961
|
alignOverlay();
|
|
1065
962
|
}
|
|
1066
|
-
}, [overlayVisibleState, props.filter]);
|
|
963
|
+
}, [overlayVisibleState, filterState, props.filter]);
|
|
1067
964
|
hooks.useUpdateEffect(function () {
|
|
1068
965
|
if (filterState && (!props.options || props.options.length === 0)) {
|
|
1069
966
|
setFilterState('');
|
|
1070
967
|
}
|
|
1071
|
-
|
|
1072
968
|
updateInputField();
|
|
1073
|
-
|
|
1074
969
|
if (inputRef.current) {
|
|
1075
970
|
inputRef.current.selectedIndex = 1;
|
|
1076
971
|
}
|
|
@@ -1078,13 +973,11 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1078
973
|
hooks.useUnmountEffect(function () {
|
|
1079
974
|
utils.ZIndexUtils.clear(overlayRef.current);
|
|
1080
975
|
});
|
|
1081
|
-
|
|
1082
976
|
var createHiddenSelect = function createHiddenSelect() {
|
|
1083
977
|
var option = {
|
|
1084
978
|
value: '',
|
|
1085
979
|
label: props.placeholder
|
|
1086
980
|
};
|
|
1087
|
-
|
|
1088
981
|
if (selectedOption) {
|
|
1089
982
|
var optionValue = getOptionValue(selectedOption);
|
|
1090
983
|
option = {
|
|
@@ -1094,7 +987,6 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1094
987
|
label: getOptionLabel(selectedOption)
|
|
1095
988
|
};
|
|
1096
989
|
}
|
|
1097
|
-
|
|
1098
990
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
1099
991
|
className: "p-hidden-accessible p-dropdown-hidden-select"
|
|
1100
992
|
}, /*#__PURE__*/React__namespace.createElement("select", {
|
|
@@ -1108,7 +1000,6 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1108
1000
|
value: option.value
|
|
1109
1001
|
}, option.label)));
|
|
1110
1002
|
};
|
|
1111
|
-
|
|
1112
1003
|
var createKeyboardHelper = function createKeyboardHelper() {
|
|
1113
1004
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
1114
1005
|
className: "p-hidden-accessible"
|
|
@@ -1125,10 +1016,8 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1125
1016
|
tabIndex: props.tabIndex
|
|
1126
1017
|
}, ariaProps)));
|
|
1127
1018
|
};
|
|
1128
|
-
|
|
1129
1019
|
var createLabel = function createLabel() {
|
|
1130
1020
|
var label = utils.ObjectUtils.isNotEmpty(selectedOption) ? getOptionLabel(selectedOption) : null;
|
|
1131
|
-
|
|
1132
1021
|
if (props.editable) {
|
|
1133
1022
|
var value = label || props.value || '';
|
|
1134
1023
|
return /*#__PURE__*/React__namespace.createElement("input", _extends({
|
|
@@ -1149,7 +1038,6 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1149
1038
|
'p-placeholder': label === null && props.placeholder,
|
|
1150
1039
|
'p-dropdown-label-empty': label === null && !props.placeholder
|
|
1151
1040
|
});
|
|
1152
|
-
|
|
1153
1041
|
var content = props.valueTemplate ? utils.ObjectUtils.getJSXElement(props.valueTemplate, selectedOption, props) : label || props.placeholder || 'empty';
|
|
1154
1042
|
return /*#__PURE__*/React__namespace.createElement("span", {
|
|
1155
1043
|
ref: inputRef,
|
|
@@ -1157,20 +1045,22 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1157
1045
|
}, content);
|
|
1158
1046
|
}
|
|
1159
1047
|
};
|
|
1160
|
-
|
|
1161
1048
|
var createClearIcon = function createClearIcon() {
|
|
1162
1049
|
if (props.value != null && props.showClear && !props.disabled) {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1050
|
+
var iconClassName = utils.classNames('p-dropdown-clear-icon p-clickable');
|
|
1051
|
+
var iconProps = {
|
|
1052
|
+
className: iconClassName,
|
|
1053
|
+
onPointerUp: clear
|
|
1054
|
+
};
|
|
1055
|
+
return utils.IconUtils.getJSXIcon(props.clearIcon, iconProps);
|
|
1167
1056
|
}
|
|
1168
|
-
|
|
1169
1057
|
return null;
|
|
1170
1058
|
};
|
|
1171
|
-
|
|
1172
1059
|
var createDropdownIcon = function createDropdownIcon() {
|
|
1173
|
-
var iconClassName = utils.classNames('p-dropdown-trigger-icon p-clickable'
|
|
1060
|
+
var iconClassName = utils.classNames('p-dropdown-trigger-icon p-clickable');
|
|
1061
|
+
var icon = utils.IconUtils.getJSXIcon(props.dropdownIcon, {
|
|
1062
|
+
className: iconClassName
|
|
1063
|
+
});
|
|
1174
1064
|
var ariaLabel = props.placeholder || props.ariaLabel;
|
|
1175
1065
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
1176
1066
|
className: "p-dropdown-trigger",
|
|
@@ -1178,11 +1068,8 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1178
1068
|
"aria-haspopup": "listbox",
|
|
1179
1069
|
"aria-expanded": overlayVisibleState,
|
|
1180
1070
|
"aria-label": ariaLabel
|
|
1181
|
-
},
|
|
1182
|
-
className: iconClassName
|
|
1183
|
-
}));
|
|
1071
|
+
}, icon);
|
|
1184
1072
|
};
|
|
1185
|
-
|
|
1186
1073
|
var visibleOptions = getVisibleOptions();
|
|
1187
1074
|
var selectedOption = getSelectedOption();
|
|
1188
1075
|
var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
|
|
@@ -1248,6 +1135,7 @@ Dropdown.defaultProps = {
|
|
|
1248
1135
|
ariaLabelledBy: null,
|
|
1249
1136
|
autoFocus: false,
|
|
1250
1137
|
className: null,
|
|
1138
|
+
clearIcon: 'pi pi-times',
|
|
1251
1139
|
dataKey: null,
|
|
1252
1140
|
disabled: false,
|
|
1253
1141
|
dropdownIcon: 'pi pi-chevron-down',
|
|
@@ -1261,6 +1149,7 @@ Dropdown.defaultProps = {
|
|
|
1261
1149
|
filterMatchMode: 'contains',
|
|
1262
1150
|
filterPlaceholder: null,
|
|
1263
1151
|
filterTemplate: null,
|
|
1152
|
+
focusInputRef: null,
|
|
1264
1153
|
id: null,
|
|
1265
1154
|
inputId: null,
|
|
1266
1155
|
inputRef: null,
|