primereact 10.6.2 → 10.6.4
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 +14 -16
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +4 -0
- package/accordion/accordion.esm.js +14 -16
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +14 -16
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -38
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +5 -0
- package/api/api.esm.js +109 -38
- package/api/api.esm.min.js +1 -1
- package/api/api.js +109 -38
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +22 -14
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.d.ts +5 -0
- package/autocomplete/autocomplete.esm.js +22 -14
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +22 -14
- package/autocomplete/autocomplete.min.js +1 -1
- package/blockui/blockui.cjs.js +3 -6
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +3 -6
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +3 -6
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +3 -6
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +3 -6
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +3 -6
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/buttongroup/buttongroup.cjs.js +6 -1
- package/buttongroup/buttongroup.cjs.min.js +1 -1
- package/buttongroup/buttongroup.d.ts +1 -1
- package/buttongroup/buttongroup.esm.js +7 -2
- package/buttongroup/buttongroup.esm.min.js +1 -1
- package/buttongroup/buttongroup.js +6 -1
- package/buttongroup/buttongroup.min.js +1 -1
- package/calendar/calendar.cjs.js +52 -25
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.d.ts +5 -0
- package/calendar/calendar.esm.js +52 -25
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +52 -25
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +2 -5
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +3 -6
- package/card/card.esm.min.js +1 -1
- package/card/card.js +2 -5
- package/card/card.min.js +1 -1
- package/carousel/carousel.cjs.js +6 -2
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +7 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +6 -2
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/cascadeselect.cjs.js +14 -16
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.d.ts +5 -0
- package/cascadeselect/cascadeselect.esm.js +14 -16
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +14 -16
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +4 -7
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +4 -7
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +4 -7
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +6 -3
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.d.ts +11 -1
- package/checkbox/checkbox.esm.js +6 -3
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +6 -3
- package/checkbox/checkbox.min.js +1 -1
- package/chips/chips.cjs.js +17 -15
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.d.ts +5 -0
- package/chips/chips.esm.js +17 -15
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +17 -15
- package/chips/chips.min.js +1 -1
- package/colorpicker/colorpicker.cjs.js +2 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +2 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +2 -2
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/column.d.ts +1 -1
- package/componentbase/componentbase.cjs.js +1 -1
- package/componentbase/componentbase.cjs.min.js +1 -1
- package/componentbase/componentbase.esm.js +1 -1
- package/componentbase/componentbase.esm.min.js +1 -1
- package/componentbase/componentbase.js +1 -1
- package/componentbase/componentbase.min.js +1 -1
- package/confirmpopup/confirmpopup.cjs.js +2 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +2 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +2 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/core/core.js +453 -234
- package/core/core.min.js +11 -11
- package/datatable/datatable.cjs.js +32 -12
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +27 -27
- package/datatable/datatable.esm.js +32 -12
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +32 -12
- package/datatable/datatable.min.js +1 -1
- package/dialog/dialog.cjs.js +146 -95
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +147 -96
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +147 -96
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +80 -60
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +23 -18
- package/dropdown/dropdown.esm.js +80 -60
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +80 -60
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +2 -2
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/editor/editor.min.js +1 -1
- package/fileupload/fileupload.cjs.js +7 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -0
- package/fileupload/fileupload.esm.js +7 -4
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +7 -4
- package/fileupload/fileupload.min.js +1 -1
- package/floatlabel/floatlabel.cjs.js +6 -1
- package/floatlabel/floatlabel.cjs.min.js +1 -1
- package/floatlabel/floatlabel.d.ts +5 -0
- package/floatlabel/floatlabel.esm.js +7 -2
- package/floatlabel/floatlabel.esm.min.js +1 -1
- package/floatlabel/floatlabel.js +6 -1
- package/floatlabel/floatlabel.min.js +1 -1
- package/galleria/galleria.cjs.js +9 -3
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +10 -4
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +9 -3
- package/galleria/galleria.min.js +1 -1
- package/iconfield/iconfield.cjs.js +4 -4
- package/iconfield/iconfield.cjs.min.js +1 -1
- package/iconfield/iconfield.esm.js +4 -4
- package/iconfield/iconfield.esm.min.js +1 -1
- package/iconfield/iconfield.js +4 -4
- package/iconfield/iconfield.min.js +1 -1
- package/iconfield/package.json +7 -0
- package/image/image.cjs.js +2 -2
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +2 -2
- package/image/image.esm.min.js +1 -1
- package/image/image.js +2 -2
- package/image/image.min.js +1 -1
- package/inputicon/package.json +7 -0
- package/inputmask/inputmask.cjs.js +21 -1
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.d.ts +11 -1
- package/inputmask/inputmask.esm.js +22 -2
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +21 -1
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +79 -24
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.d.ts +5 -0
- package/inputnumber/inputnumber.esm.js +79 -24
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +79 -24
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +348 -0
- package/inputotp/inputotp.cjs.min.js +1 -0
- package/inputotp/inputotp.d.ts +177 -0
- package/inputotp/inputotp.esm.js +340 -0
- package/inputotp/inputotp.esm.min.js +1 -0
- package/inputotp/inputotp.js +346 -0
- package/inputotp/inputotp.min.js +1 -0
- package/inputotp/package.json +7 -0
- package/inputtext/inputtext.cjs.js +9 -5
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.d.ts +5 -0
- package/inputtext/inputtext.esm.js +9 -5
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +9 -5
- package/inputtext/inputtext.min.js +1 -1
- package/inputtextarea/inputtextarea.cjs.js +8 -4
- package/inputtextarea/inputtextarea.cjs.min.js +1 -1
- package/inputtextarea/inputtextarea.d.ts +5 -0
- package/inputtextarea/inputtextarea.esm.js +8 -4
- package/inputtextarea/inputtextarea.esm.min.js +1 -1
- package/inputtextarea/inputtextarea.js +8 -4
- package/inputtextarea/inputtextarea.min.js +1 -1
- package/keyfilter/keyfilter.cjs.js +3 -1
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +3 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +3 -1
- package/keyfilter/keyfilter.min.js +1 -1
- package/knob/knob.cjs.js +2 -2
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +2 -2
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +2 -2
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +2 -6
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -6
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -6
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +10 -6
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +10 -6
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +10 -6
- package/megamenu/megamenu.min.js +1 -1
- package/mention/mention.cjs.js +13 -9
- package/mention/mention.cjs.min.js +1 -1
- package/mention/mention.esm.js +13 -9
- package/mention/mention.esm.min.js +1 -1
- package/mention/mention.js +13 -9
- package/mention/mention.min.js +1 -1
- package/menu/menu.cjs.js +23 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +19 -0
- package/menu/menu.esm.js +23 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +23 -5
- package/menu/menu.min.js +1 -1
- package/messages/messages.cjs.js +1 -1
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +1 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +1 -1
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +33 -12
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +6 -5
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +32 -11
- package/metergroup/metergroup.min.js +1 -1
- package/metergroup/package.json +7 -0
- package/multiselect/multiselect.cjs.js +45 -11
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +22 -17
- package/multiselect/multiselect.esm.js +45 -11
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +45 -11
- package/multiselect/multiselect.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.cjs.js +6 -3
- package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.esm.js +6 -3
- package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
- package/multistatecheckbox/multistatecheckbox.js +6 -3
- package/multistatecheckbox/multistatecheckbox.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +8 -5
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +8 -5
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +8 -5
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +6 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +6 -0
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +6 -0
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +13 -17
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +13 -17
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +13 -17
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +148 -174
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +148 -174
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +148 -174
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +109 -18
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +10 -5
- package/password/password.esm.js +109 -18
- package/password/password.esm.min.js +1 -1
- package/password/password.js +110 -19
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +6 -0
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +6 -0
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +6 -0
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +1471 -1140
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1471 -1140
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1471 -1140
- package/primereact.all.min.js +1 -1
- package/radiobutton/radiobutton.cjs.js +8 -3
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.d.ts +5 -0
- package/radiobutton/radiobutton.esm.js +8 -3
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +8 -3
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +2 -2
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -2
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -2
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +51 -43
- package/resources/themes/arya-green/theme.css +51 -43
- package/resources/themes/arya-orange/theme.css +51 -43
- package/resources/themes/bootstrap4-dark-blue/theme.css +51 -43
- package/resources/themes/bootstrap4-dark-purple/theme.css +9 -0
- package/resources/themes/bootstrap4-light-blue/theme.css +51 -43
- package/resources/themes/bootstrap4-light-purple/theme.css +9 -0
- package/resources/themes/fluent-light/theme.css +51 -43
- package/resources/themes/lara-dark-amber/theme.css +51 -43
- package/resources/themes/lara-dark-blue/theme.css +51 -43
- package/resources/themes/lara-dark-cyan/theme.css +51 -43
- package/resources/themes/lara-dark-green/theme.css +51 -43
- package/resources/themes/lara-dark-indigo/theme.css +51 -43
- package/resources/themes/lara-dark-pink/theme.css +51 -43
- package/resources/themes/lara-dark-purple/theme.css +1124 -227
- package/resources/themes/lara-dark-teal/theme.css +51 -43
- package/resources/themes/lara-light-amber/theme.css +51 -43
- package/resources/themes/lara-light-blue/theme.css +51 -43
- package/resources/themes/lara-light-cyan/theme.css +51 -43
- package/resources/themes/lara-light-green/theme.css +51 -43
- package/resources/themes/lara-light-indigo/theme.css +51 -43
- package/resources/themes/lara-light-pink/theme.css +51 -43
- package/resources/themes/lara-light-purple/theme.css +1122 -229
- package/resources/themes/lara-light-teal/theme.css +51 -43
- package/resources/themes/luna-amber/theme.css +51 -43
- package/resources/themes/luna-blue/theme.css +51 -43
- package/resources/themes/luna-green/theme.css +51 -43
- package/resources/themes/luna-pink/theme.css +51 -43
- package/resources/themes/md-dark-deeppurple/theme.css +9 -0
- package/resources/themes/md-dark-indigo/theme.css +193 -185
- package/resources/themes/md-light-deeppurple/theme.css +9 -0
- package/resources/themes/md-light-indigo/theme.css +51 -43
- package/resources/themes/mdc-dark-deeppurple/theme.css +9 -0
- package/resources/themes/mdc-dark-indigo/theme.css +193 -185
- package/resources/themes/mdc-light-deeppurple/theme.css +9 -0
- package/resources/themes/mdc-light-indigo/theme.css +51 -43
- package/resources/themes/mira/theme.css +51 -43
- package/resources/themes/nano/theme.css +51 -43
- package/resources/themes/nova/theme.css +51 -43
- package/resources/themes/nova-accent/theme.css +51 -43
- package/resources/themes/nova-alt/theme.css +51 -43
- package/resources/themes/rhea/theme.css +51 -43
- package/resources/themes/saga-blue/theme.css +51 -43
- package/resources/themes/saga-green/theme.css +51 -43
- package/resources/themes/saga-orange/theme.css +51 -43
- package/resources/themes/soho-dark/theme.css +76 -68
- package/resources/themes/soho-light/theme.css +51 -43
- package/resources/themes/tailwind-light/theme.css +52 -44
- package/resources/themes/vela-blue/theme.css +51 -43
- package/resources/themes/vela-green/theme.css +51 -43
- package/resources/themes/vela-orange/theme.css +51 -43
- package/resources/themes/viva-dark/theme.css +51 -43
- package/resources/themes/viva-light/theme.css +51 -43
- package/ripple/ripple.d.ts +32 -0
- package/scrollpanel/scrollpanel.cjs.js +2 -5
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +3 -6
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +2 -5
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +2 -2
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -2
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -2
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/sidebar.cjs.js +5 -5
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +5 -5
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +5 -5
- package/sidebar/sidebar.min.js +1 -1
- package/slidemenu/slidemenu.cjs.js +2 -2
- package/slidemenu/slidemenu.cjs.min.js +1 -1
- package/slidemenu/slidemenu.esm.js +2 -2
- package/slidemenu/slidemenu.esm.min.js +1 -1
- package/slidemenu/slidemenu.js +2 -2
- package/slidemenu/slidemenu.min.js +1 -1
- package/slider/slider.cjs.js +3 -3
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +3 -3
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +3 -3
- package/slider/slider.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +2 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +2 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +2 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +6 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +6 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +6 -1
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +14 -4
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.d.ts +13 -1
- package/stepper/stepper.esm.js +14 -4
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +14 -4
- package/stepper/stepper.min.js +1 -1
- package/stepperpanel/stepperpanel.cjs.js +4 -2
- package/stepperpanel/stepperpanel.cjs.min.js +1 -1
- package/stepperpanel/stepperpanel.d.ts +2 -2
- package/stepperpanel/stepperpanel.esm.js +4 -2
- package/stepperpanel/stepperpanel.esm.min.js +1 -1
- package/stepperpanel/stepperpanel.js +4 -2
- package/stepperpanel/stepperpanel.min.js +1 -1
- package/steps/steps.cjs.js +2 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +2 -2
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +2 -2
- package/steps/steps.min.js +1 -1
- package/tabmenu/tabmenu.cjs.js +2 -5
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +2 -5
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +2 -5
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/tabview.cjs.js +3 -3
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +4 -0
- package/tabview/tabview.esm.js +3 -3
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -3
- package/tabview/tabview.min.js +1 -1
- package/tieredmenu/tieredmenu.cjs.js +2 -2
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +2 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/toast/toast.cjs.js +7 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +7 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +7 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/togglebutton.cjs.js +3 -3
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +3 -3
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +3 -3
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/toolbar.cjs.js +2 -5
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -6
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +2 -5
- package/toolbar/toolbar.min.js +1 -1
- package/tree/tree.cjs.js +12 -5
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +12 -5
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +12 -5
- package/tree/tree.min.js +1 -1
- package/treeselect/treeselect.cjs.js +19 -5
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.d.ts +5 -0
- package/treeselect/treeselect.esm.js +19 -5
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +19 -5
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +14 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +14 -3
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +14 -3
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +8 -4
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.d.ts +5 -0
- package/tristatecheckbox/tristatecheckbox.esm.js +8 -4
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +8 -4
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +3 -3
- package/web-types.json +362 -15
package/dropdown/dropdown.cjs.js
CHANGED
|
@@ -159,11 +159,13 @@ var classes = {
|
|
|
159
159
|
root: function root(_ref) {
|
|
160
160
|
var props = _ref.props,
|
|
161
161
|
focusedState = _ref.focusedState,
|
|
162
|
-
overlayVisibleState = _ref.overlayVisibleState
|
|
162
|
+
overlayVisibleState = _ref.overlayVisibleState,
|
|
163
|
+
context = _ref.context;
|
|
163
164
|
return utils.classNames('p-dropdown p-component p-inputwrapper', {
|
|
164
165
|
'p-disabled': props.disabled,
|
|
165
166
|
'p-invalid': props.invalid,
|
|
166
167
|
'p-focus': focusedState,
|
|
168
|
+
'p-variant-filled': props.variant ? props.variant === 'filled' : context && context.inputStyle === 'filled',
|
|
167
169
|
'p-dropdown-clearable': props.showClear && !props.disabled,
|
|
168
170
|
'p-inputwrapper-filled': utils.ObjectUtils.isNotEmpty(props.value),
|
|
169
171
|
'p-inputwrapper-focus': focusedState || overlayVisibleState
|
|
@@ -197,25 +199,31 @@ var classes = {
|
|
|
197
199
|
'p-dropdown-clearable-filter': !!clearIcon
|
|
198
200
|
});
|
|
199
201
|
},
|
|
200
|
-
filterInput:
|
|
201
|
-
|
|
202
|
-
|
|
202
|
+
filterInput: function filterInput(_ref5) {
|
|
203
|
+
var props = _ref5.props,
|
|
204
|
+
context = _ref5.context;
|
|
205
|
+
return utils.classNames('p-dropdown-filter p-inputtext p-component', {
|
|
206
|
+
'p-variant-filled': props.variant ? props.variant === 'filled' : context && context.inputStyle === 'filled'
|
|
207
|
+
});
|
|
208
|
+
},
|
|
209
|
+
list: function list(_ref6) {
|
|
210
|
+
var virtualScrollerOptions = _ref6.virtualScrollerOptions;
|
|
203
211
|
return virtualScrollerOptions ? 'p-dropdown-items' : 'p-dropdown-items';
|
|
204
212
|
},
|
|
205
|
-
panel: function panel(
|
|
206
|
-
var context =
|
|
213
|
+
panel: function panel(_ref7) {
|
|
214
|
+
var context = _ref7.context;
|
|
207
215
|
return utils.classNames('p-dropdown-panel p-component', {
|
|
208
216
|
'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact__default["default"].inputStyle === 'filled',
|
|
209
217
|
'p-ripple-disabled': context && context.ripple === false || PrimeReact__default["default"].ripple === false
|
|
210
218
|
});
|
|
211
219
|
},
|
|
212
|
-
item: function item(
|
|
213
|
-
var selected =
|
|
214
|
-
disabled =
|
|
215
|
-
label =
|
|
216
|
-
index =
|
|
217
|
-
focusedOptionIndex =
|
|
218
|
-
highlightOnSelect =
|
|
220
|
+
item: function item(_ref8) {
|
|
221
|
+
var selected = _ref8.selected,
|
|
222
|
+
disabled = _ref8.disabled,
|
|
223
|
+
label = _ref8.label,
|
|
224
|
+
index = _ref8.index,
|
|
225
|
+
focusedOptionIndex = _ref8.focusedOptionIndex,
|
|
226
|
+
highlightOnSelect = _ref8.highlightOnSelect;
|
|
219
227
|
return utils.classNames('p-dropdown-item', {
|
|
220
228
|
'p-highlight': selected && highlightOnSelect,
|
|
221
229
|
'p-disabled': disabled,
|
|
@@ -233,14 +241,14 @@ var classes = {
|
|
|
233
241
|
};
|
|
234
242
|
var styles = "\n@layer primereact {\n .p-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n }\n \n .p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n \n .p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n \n .p-dropdown-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n input.p-dropdown-label {\n cursor: default;\n }\n \n .p-dropdown .p-dropdown-panel {\n min-width: 100%;\n }\n \n .p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n }\n \n .p-dropdown-items-wrapper {\n overflow: auto;\n }\n \n .p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n }\n \n .p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-dropdown-filter {\n width: 100%;\n }\n \n .p-dropdown-filter-container {\n position: relative;\n }\n \n .p-dropdown-clear-icon,\n .p-dropdown-filter-icon,\n .p-dropdown-filter-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-fluid .p-dropdown {\n display: flex;\n }\n \n .p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n }\n}\n";
|
|
235
243
|
var inlineStyles = {
|
|
236
|
-
wrapper: function wrapper(
|
|
237
|
-
var props =
|
|
244
|
+
wrapper: function wrapper(_ref9) {
|
|
245
|
+
var props = _ref9.props;
|
|
238
246
|
return {
|
|
239
247
|
maxHeight: props.scrollHeight || 'auto'
|
|
240
248
|
};
|
|
241
249
|
},
|
|
242
|
-
panel: function panel(
|
|
243
|
-
var props =
|
|
250
|
+
panel: function panel(_ref10) {
|
|
251
|
+
var props = _ref10.props;
|
|
244
252
|
props.panelStyle;
|
|
245
253
|
}
|
|
246
254
|
};
|
|
@@ -267,7 +275,7 @@ var DropdownBase = componentbase.ComponentBase.extend({
|
|
|
267
275
|
filterBy: null,
|
|
268
276
|
filterClearIcon: null,
|
|
269
277
|
filterIcon: null,
|
|
270
|
-
filterInputAutoFocus:
|
|
278
|
+
filterInputAutoFocus: false,
|
|
271
279
|
filterLocale: undefined,
|
|
272
280
|
filterMatchMode: 'contains',
|
|
273
281
|
filterPlaceholder: null,
|
|
@@ -277,6 +285,7 @@ var DropdownBase = componentbase.ComponentBase.extend({
|
|
|
277
285
|
inputId: null,
|
|
278
286
|
inputRef: null,
|
|
279
287
|
invalid: false,
|
|
288
|
+
variant: null,
|
|
280
289
|
itemTemplate: null,
|
|
281
290
|
loading: false,
|
|
282
291
|
loadingIcon: null,
|
|
@@ -478,31 +487,6 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
478
487
|
props === null || props === void 0 || (_props$changeFocusedO = props.changeFocusedOptionIndex) === null || _props$changeFocusedO === void 0 || _props$changeFocusedO.call(props, event, index);
|
|
479
488
|
}
|
|
480
489
|
};
|
|
481
|
-
var createGroupChildren = function createGroupChildren(optionGroup, style) {
|
|
482
|
-
var groupChildren = props.getOptionGroupChildren(optionGroup);
|
|
483
|
-
return groupChildren.map(function (option, j) {
|
|
484
|
-
var optionLabel = props.getOptionLabel(option);
|
|
485
|
-
var optionKey = j + '_' + props.getOptionRenderKey(option);
|
|
486
|
-
var disabled = props.isOptionDisabled(option);
|
|
487
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownItem, {
|
|
488
|
-
key: optionKey,
|
|
489
|
-
index: j,
|
|
490
|
-
focusedOptionIndex: props.focusedOptionIndex,
|
|
491
|
-
label: optionLabel,
|
|
492
|
-
option: option,
|
|
493
|
-
style: style,
|
|
494
|
-
template: props.itemTemplate,
|
|
495
|
-
selected: props.isSelected(option),
|
|
496
|
-
highlightOnSelect: props.highlightOnSelect,
|
|
497
|
-
disabled: disabled,
|
|
498
|
-
onClick: props.onOptionClick,
|
|
499
|
-
onMouseMove: changeFocusedItemOnHover,
|
|
500
|
-
ptm: ptm,
|
|
501
|
-
cx: cx,
|
|
502
|
-
checkmark: props.checkmark
|
|
503
|
-
});
|
|
504
|
-
});
|
|
505
|
-
};
|
|
506
490
|
var createEmptyMessage = function createEmptyMessage(emptyMessage, isFilter) {
|
|
507
491
|
var message = utils.ObjectUtils.getJSXElement(emptyMessage, props) || PrimeReact.localeOption(isFilter ? 'emptyFilterMessage' : 'emptyMessage');
|
|
508
492
|
var emptyMessageProps = mergeProps({
|
|
@@ -516,10 +500,9 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
516
500
|
height: scrollerOptions.props ? scrollerOptions.props.itemSize : undefined
|
|
517
501
|
};
|
|
518
502
|
style = _objectSpread$1(_objectSpread$1({}, style), option.style);
|
|
519
|
-
if (props.optionGroupLabel) {
|
|
503
|
+
if (option.group && props.optionGroupLabel) {
|
|
520
504
|
var optionGroupLabel = props.optionGroupLabel;
|
|
521
505
|
var groupContent = props.optionGroupTemplate ? utils.ObjectUtils.getJSXElement(props.optionGroupTemplate, option, index) : props.getOptionGroupLabel(option);
|
|
522
|
-
var groupChildrenContent = createGroupChildren(option, style);
|
|
523
506
|
var key = index + '_' + props.getOptionGroupRenderKey(option);
|
|
524
507
|
var itemGroupProps = mergeProps({
|
|
525
508
|
className: cx('itemGroup', {
|
|
@@ -531,12 +514,12 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
531
514
|
var itemGroupLabelProps = mergeProps({
|
|
532
515
|
className: cx('itemGroupLabel')
|
|
533
516
|
}, getPTOptions('itemGroupLabel'));
|
|
534
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
517
|
+
return /*#__PURE__*/React__namespace.createElement("li", _extends({
|
|
535
518
|
key: key
|
|
536
|
-
},
|
|
519
|
+
}, itemGroupProps), /*#__PURE__*/React__namespace.createElement("span", itemGroupLabelProps, groupContent));
|
|
537
520
|
}
|
|
521
|
+
var optionKey = props.getOptionRenderKey(option) + '_' + index;
|
|
538
522
|
var optionLabel = props.getOptionLabel(option);
|
|
539
|
-
var optionKey = index + '_' + props.getOptionRenderKey(option);
|
|
540
523
|
var disabled = props.isOptionDisabled(option);
|
|
541
524
|
return /*#__PURE__*/React__namespace.createElement(DropdownItem, {
|
|
542
525
|
key: optionKey,
|
|
@@ -603,7 +586,9 @@ var DropdownPanel = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__name
|
|
|
603
586
|
ref: filterInputRef,
|
|
604
587
|
type: 'text',
|
|
605
588
|
autoComplete: 'off',
|
|
606
|
-
className: cx('filterInput'
|
|
589
|
+
className: cx('filterInput', {
|
|
590
|
+
context: context
|
|
591
|
+
}),
|
|
607
592
|
placeholder: props.filterPlaceholder,
|
|
608
593
|
onKeyDown: props.onFilterInputKeyDown,
|
|
609
594
|
onChange: function onChange(e) {
|
|
@@ -791,7 +776,24 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
791
776
|
_useOverlayListener2 = _slicedToArray(_useOverlayListener, 2),
|
|
792
777
|
bindOverlayListener = _useOverlayListener2[0],
|
|
793
778
|
unbindOverlayListener = _useOverlayListener2[1];
|
|
779
|
+
var flatOptions = function flatOptions(options) {
|
|
780
|
+
return (options || []).reduce(function (result, option, index) {
|
|
781
|
+
result.push({
|
|
782
|
+
optionGroup: option,
|
|
783
|
+
group: true,
|
|
784
|
+
index: index,
|
|
785
|
+
code: option.code,
|
|
786
|
+
label: option.label
|
|
787
|
+
});
|
|
788
|
+
var optionGroupChildren = getOptionGroupChildren(option);
|
|
789
|
+
optionGroupChildren && optionGroupChildren.forEach(function (o) {
|
|
790
|
+
return result.push(o);
|
|
791
|
+
});
|
|
792
|
+
return result;
|
|
793
|
+
}, []);
|
|
794
|
+
};
|
|
794
795
|
var getVisibleOptions = function getVisibleOptions() {
|
|
796
|
+
var options = props.optionGroupLabel ? flatOptions(props.options) : props.options;
|
|
795
797
|
if (hasFilter && !isLazy) {
|
|
796
798
|
var filterValue = filterState.trim().toLocaleLowerCase(props.filterLocale);
|
|
797
799
|
var searchFields = props.filterBy ? props.filterBy.split(',') : [props.optionLabel || 'label'];
|
|
@@ -812,11 +814,11 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
812
814
|
} finally {
|
|
813
815
|
_iterator.f();
|
|
814
816
|
}
|
|
815
|
-
return filteredGroups;
|
|
817
|
+
return flatOptions(filteredGroups);
|
|
816
818
|
}
|
|
817
|
-
return PrimeReact.FilterService.filter(
|
|
819
|
+
return PrimeReact.FilterService.filter(options, searchFields, filterValue, props.filterMatchMode, props.filterLocale);
|
|
818
820
|
}
|
|
819
|
-
return
|
|
821
|
+
return options;
|
|
820
822
|
};
|
|
821
823
|
var onFirstHiddenFocus = function onFirstHiddenFocus(event) {
|
|
822
824
|
var focusableEl = event.relatedTarget === focusInputRef.current ? utils.DomHandler.getFirstFocusableElement(overlayRef.current, ':not([data-p-hidden-focusable="true"])') : focusInputRef.current;
|
|
@@ -1345,12 +1347,20 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1345
1347
|
utils.DomHandler.alignOverlay(overlayRef.current, inputRef.current.parentElement, props.appendTo || context && context.appendTo || PrimeReact__default["default"].appendTo);
|
|
1346
1348
|
};
|
|
1347
1349
|
var scrollInView = function scrollInView() {
|
|
1348
|
-
var
|
|
1349
|
-
if (
|
|
1350
|
-
|
|
1350
|
+
var focusedItem = utils.DomHandler.findSingle(overlayRef.current, 'li[data-p-focused="true"]');
|
|
1351
|
+
if (focusedItem && focusedItem.scrollIntoView) {
|
|
1352
|
+
focusedItem.scrollIntoView({
|
|
1351
1353
|
block: 'nearest',
|
|
1352
1354
|
inline: 'nearest'
|
|
1353
1355
|
});
|
|
1356
|
+
} else {
|
|
1357
|
+
var highlightItem = utils.DomHandler.findSingle(overlayRef.current, 'li[data-p-highlight="true"]');
|
|
1358
|
+
if (highlightItem && highlightItem.scrollIntoView) {
|
|
1359
|
+
highlightItem.scrollIntoView({
|
|
1360
|
+
block: 'nearest',
|
|
1361
|
+
inline: 'nearest'
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1354
1364
|
}
|
|
1355
1365
|
};
|
|
1356
1366
|
var updateEditableLabel = function updateEditableLabel(option) {
|
|
@@ -1364,10 +1374,10 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1364
1374
|
}
|
|
1365
1375
|
};
|
|
1366
1376
|
var getOptionLabel = function getOptionLabel(option) {
|
|
1367
|
-
return props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, props.optionLabel) : option
|
|
1377
|
+
return props.optionLabel ? utils.ObjectUtils.resolveFieldData(option, props.optionLabel) : option;
|
|
1368
1378
|
};
|
|
1369
1379
|
var getOptionValue = function getOptionValue(option) {
|
|
1370
|
-
return props.optionValue ? utils.ObjectUtils.resolveFieldData(option, props.optionValue) : option
|
|
1380
|
+
return props.optionValue ? utils.ObjectUtils.resolveFieldData(option, props.optionValue) : option;
|
|
1371
1381
|
};
|
|
1372
1382
|
var getOptionRenderKey = function getOptionRenderKey(option) {
|
|
1373
1383
|
return props.dataKey ? utils.ObjectUtils.resolveFieldData(option, props.dataKey) : getOptionLabel(option);
|
|
@@ -1443,10 +1453,10 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1443
1453
|
alignOverlay();
|
|
1444
1454
|
});
|
|
1445
1455
|
hooks.useUpdateEffect(function () {
|
|
1446
|
-
if (overlayVisibleState && props.value) {
|
|
1456
|
+
if (overlayVisibleState && (props.value || focusedOptionIndex >= 0)) {
|
|
1447
1457
|
scrollInView();
|
|
1448
1458
|
}
|
|
1449
|
-
}, [overlayVisibleState, props.value]);
|
|
1459
|
+
}, [overlayVisibleState, props.value, focusedOptionIndex]);
|
|
1450
1460
|
hooks.useUpdateEffect(function () {
|
|
1451
1461
|
if (overlayVisibleState && filterState && props.filter) {
|
|
1452
1462
|
alignOverlay();
|
|
@@ -1550,11 +1560,20 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1550
1560
|
}, ptm('input'));
|
|
1551
1561
|
return /*#__PURE__*/React__namespace.createElement("span", inputProps, content);
|
|
1552
1562
|
};
|
|
1563
|
+
var onClearIconKeyDown = function onClearIconKeyDown(event) {
|
|
1564
|
+
if (event.key === 'Enter' || event.code === 'Space') {
|
|
1565
|
+
clear(event);
|
|
1566
|
+
event.preventDefault();
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1553
1569
|
var createClearIcon = function createClearIcon() {
|
|
1554
1570
|
if (props.value != null && props.showClear && !props.disabled) {
|
|
1555
1571
|
var clearIconProps = mergeProps({
|
|
1556
1572
|
className: cx('clearIcon'),
|
|
1557
|
-
onPointerUp: clear
|
|
1573
|
+
onPointerUp: clear,
|
|
1574
|
+
tabIndex: props.tabIndex || '0',
|
|
1575
|
+
onKeyDown: onClearIconKeyDown,
|
|
1576
|
+
'aria-label': PrimeReact.localeOption('clear')
|
|
1558
1577
|
}, ptm('clearIcon'));
|
|
1559
1578
|
var icon = props.clearIcon || /*#__PURE__*/React__namespace.createElement(times.TimesIcon, clearIconProps);
|
|
1560
1579
|
return utils.IconUtils.getJSXIcon(icon, _objectSpread({}, clearIconProps), {
|
|
@@ -1617,6 +1636,7 @@ var Dropdown = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace
|
|
|
1617
1636
|
id: props.id,
|
|
1618
1637
|
ref: elementRef,
|
|
1619
1638
|
className: utils.classNames(props.className, cx('root', {
|
|
1639
|
+
context: context,
|
|
1620
1640
|
focusedState: focusedState,
|
|
1621
1641
|
overlayVisibleState: overlayVisibleState
|
|
1622
1642
|
})),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/icons/chevrondown"),l=require("primereact/icons/spinner"),i=require("primereact/icons/times"),a=require("primereact/overlayservice"),c=require("primereact/tooltip"),u=require("primereact/utils"),s=require("primereact/csstransition"),p=require("primereact/icons/search"),d=require("primereact/portal"),f=require("primereact/virtualscroller"),m=require("primereact/ripple"),v=require("primereact/icons/check"),b=require("primereact/iconbase");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function h(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=h(e),w=g(t);function O(){return O=Object.assign?Object.assign.bind():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},O.apply(this,arguments)}function I(e){return I="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},I(e)}function E(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function x(e){var t=E(e,"string");return"symbol"===I(t)?t:String(t)}function S(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){if(Array.isArray(e))return e}function F(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,i,a=[],c=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return a}}function j(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 k(e,t){if(e){if("string"==typeof e)return j(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)?j(e,t):void 0}}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(e,t){return D(e)||F(e,t)||k(e,t)||C()}var L=n.ComponentBase.extend({defaultProps:{__TYPE:"Dropdown",__parentMetadata:null,appendTo:null,ariaLabel:null,ariaLabelledBy:null,autoFocus:!1,children:void 0,className:null,clearIcon:null,dataKey:null,disabled:!1,dropdownIcon:null,editable:!1,emptyFilterMessage:null,highlightOnSelect:!0,checkmark:!1,emptyMessage:null,filter:!1,filterBy:null,filterClearIcon:null,filterIcon:null,filterInputAutoFocus:!0,filterLocale:void 0,filterMatchMode:"contains",filterPlaceholder:null,filterTemplate:null,focusInputRef:null,id:null,inputId:null,inputRef:null,invalid:!1,itemTemplate:null,loading:!1,loadingIcon:null,maxLength:null,name:null,onBlur:null,onChange:null,onContextMenu:null,onFilter:null,onFocus:null,onHide:null,onMouseDown:null,onShow:null,optionDisabled:null,optionGroupChildren:"items",selectOnFocus:!1,focusOnHover:!0,autoOptionFocus:!1,optionGroupLabel:null,optionGroupTemplate:null,optionLabel:null,optionValue:null,options:null,panelClassName:null,panelFooterTemplate:null,panelStyle:null,placeholder:null,required:!1,resetFilterOnHide:!1,scrollHeight:"200px",showClear:!1,showFilterClear:!1,showOnFocus:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,transitionOptions:null,value:null,valueTemplate:null,virtualScrollerOptions:null},css:{classes:{root:function(e){var t=e.props,n=e.focusedState,r=e.overlayVisibleState;return u.classNames("p-dropdown p-component p-inputwrapper",{"p-disabled":t.disabled,"p-invalid":t.invalid,"p-focus":n,"p-dropdown-clearable":t.showClear&&!t.disabled,"p-inputwrapper-filled":u.ObjectUtils.isNotEmpty(t.value),"p-inputwrapper-focus":n||r})},input:function(e){var t=e.props,n=e.label;return t.editable?"p-dropdown-label p-inputtext":u.classNames("p-dropdown-label p-inputtext",{"p-placeholder":null===n&&t.placeholder,"p-dropdown-label-empty":null===n&&!t.placeholder})},trigger:"p-dropdown-trigger",emptyMessage:"p-dropdown-empty-message",itemGroup:function(e){var t=e.optionGroupLabel;return u.classNames("p-dropdown-item-group",{"p-dropdown-item-empty":!t||0===t.length})},itemGroupLabel:"p-dropdown-item-group-label",dropdownIcon:"p-dropdown-trigger-icon p-clickable",loadingIcon:"p-dropdown-trigger-icon p-clickable",clearIcon:"p-dropdown-clear-icon p-clickable",filterIcon:"p-dropdown-filter-icon",filterClearIcon:"p-dropdown-filter-clear-icon",filterContainer:function(e){return u.classNames("p-dropdown-filter-container",{"p-dropdown-clearable-filter":!!e.clearIcon})},filterInput:"p-dropdown-filter p-inputtext p-component",list:function(e){return"p-dropdown-items"},panel:function(e){var t=e.context;return u.classNames("p-dropdown-panel p-component",{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===w.default.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===w.default.ripple})},item:function(e){var t=e.label;return u.classNames("p-dropdown-item",{"p-highlight":e.selected&&e.highlightOnSelect,"p-disabled":e.disabled,"p-focus":e.index===e.focusedOptionIndex,"p-dropdown-item-empty":!t||0===t.length})},itemLabel:"p-dropdown-item-label",checkIcon:"p-dropdown-check-icon",blankIcon:"p-dropdown-blank-icon",wrapper:"p-dropdown-items-wrapper",header:"p-dropdown-header",footer:"p-dropdown-footer",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n }\n \n .p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n \n .p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n \n .p-dropdown-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n input.p-dropdown-label {\n cursor: default;\n }\n \n .p-dropdown .p-dropdown-panel {\n min-width: 100%;\n }\n \n .p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n }\n \n .p-dropdown-items-wrapper {\n overflow: auto;\n }\n \n .p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n }\n \n .p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-dropdown-filter {\n width: 100%;\n }\n \n .p-dropdown-filter-container {\n position: relative;\n }\n \n .p-dropdown-clear-icon,\n .p-dropdown-filter-icon,\n .p-dropdown-filter-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-fluid .p-dropdown {\n display: flex;\n }\n \n .p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n }\n}\n",inlineStyles:{wrapper:function(e){return{maxHeight:e.props.scrollHeight||"auto"}},panel:function(e){}}}}),P=y.memo(y.forwardRef((function(e,t){var n=b.IconBase.getPTI(e);return y.createElement("svg",O({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("rect",{width:"1",height:"1",fill:"currentColor",fillOpacity:"0"}))})));P.displayName="BlankIcon";var U=y.memo((function(e){var t=r.useMergeProps(),n=e.ptm,o=e.cx,l=e.selected,i=e.disabled,a=e.option,c=e.label,s=e.index,p=e.focusedOptionIndex,d=e.checkmark,f=e.highlightOnSelect,b=function(e){return n(e,{context:{selected:l,disabled:i}})},g=e.template?u.ObjectUtils.getJSXElement(e.template,e.option):e.label,h=t({role:"option",key:e.label,className:u.classNames(a.className,o("item",{selected:l,disabled:i,label:c,index:s,focusedOptionIndex:p,highlightOnSelect:f})),style:e.style,onClick:function(t){return n=t,void(e.onClick&&e.onClick({originalEvent:n,option:a}));var n},onMouseMove:function(t){return null==e?void 0:e.onMouseMove(t,s)},"aria-label":c,"aria-selected":l,"data-p-highlight":l,"data-p-focused":p===s,"data-p-disabled":i},b("item")),w=t({className:o("itemLabel")},b("itemLabel"));return y.createElement("li",h,d&&function(){if(l){var e=t({className:o("checkIcon")},b("checIcon"));return y.createElement(v.CheckIcon,e)}var n=t({className:o("blankIcon")},b("blankIcon"));return y.createElement(P,n)}(),y.createElement("span",w,g),y.createElement(m.Ripple,null))}));function R(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 T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}U.displayName="DropdownItem";var M=y.memo(y.forwardRef((function(e,n){var o,l,a,c,m,v=r.useMergeProps(),b=e.ptm,g=e.cx,h=e.sx,w=y.useContext(t.PrimeReactContext),I=y.useRef(null),E=!(e.visibleOptions&&e.visibleOptions.length)&&e.hasFilter,x={filter:function(e){return j(e)},reset:function(){return e.resetFilter()}},S=function(t,n){return b(t,T({hostName:e.hostName},n))},D=function(){e.onEnter((function(){if(e.virtualScrollerRef.current){var t=e.getSelectedOptionIndex();-1!==t&&setTimeout((function(){return e.virtualScrollerRef.current.scrollToIndex(t)}),0)}}))},F=function(){e.onEntered((function(){e.filter&&e.filterInputAutoFocus&&u.DomHandler.focus(I.current,!1)}))},j=function(t){e.virtualScrollerRef.current&&e.virtualScrollerRef.current.scrollToIndex(0),e.onFilterInputChange&&e.onFilterInputChange(t)},k=function(){if(e.panelFooterTemplate){var t=u.ObjectUtils.getJSXElement(e.panelFooterTemplate,e,e.onOverlayHide),n=v({className:g("footer")},S("footer"));return y.createElement("div",n,t)}return null},C=function(t,n){var r;e.focusOnHover&&(null==e||null===(r=e.changeFocusedOptionIndex)||void 0===r||r.call(e,t,n))},N=function(t,n){return e.getOptionGroupChildren(t).map((function(t,r){var o=e.getOptionLabel(t),l=r+"_"+e.getOptionRenderKey(t),i=e.isOptionDisabled(t);return y.createElement(U,{key:l,index:r,focusedOptionIndex:e.focusedOptionIndex,label:o,option:t,style:n,template:e.itemTemplate,selected:e.isSelected(t),highlightOnSelect:e.highlightOnSelect,disabled:i,onClick:e.onOptionClick,onMouseMove:C,ptm:b,cx:g,checkmark:e.checkmark})}))},L=function(n,r){var o=u.ObjectUtils.getJSXElement(n,e)||t.localeOption(r?"emptyFilterMessage":"emptyMessage"),l=v({className:g("emptyMessage")},S("emptyMessage"));return y.createElement("li",l,o)},P=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={height:r.props?r.props.itemSize:void 0};if(o=T(T({},o),t.style),e.optionGroupLabel){var l=e.optionGroupLabel,i=e.optionGroupTemplate?u.ObjectUtils.getJSXElement(e.optionGroupTemplate,t,n):e.getOptionGroupLabel(t),a=N(t,o),c=n+"_"+e.getOptionGroupRenderKey(t),s=v({className:g("itemGroup",{optionGroupLabel:l}),style:o,"data-p-highlight":e.selected},S("itemGroup")),p=v({className:g("itemGroupLabel")},S("itemGroupLabel"));return y.createElement(y.Fragment,{key:c},y.createElement("li",s,y.createElement("span",p,i)),a)}var d=e.getOptionLabel(t),f=n+"_"+e.getOptionRenderKey(t),m=e.isOptionDisabled(t);return y.createElement(U,{key:f,label:d,index:n,focusedOptionIndex:e.focusedOptionIndex,option:t,style:o,template:e.itemTemplate,selected:e.isSelected(t),highlightOnSelect:e.highlightOnSelect,disabled:m,onClick:e.onOptionClick,onMouseMove:C,ptm:b,cx:g,checkmark:e.checkmark})},R=function(){if(e.showFilterClear&&e.filterValue){var n=t.localeOption("clear"),r=v({className:g("filterClearIcon"),"aria-label":n,onClick:function(){return e.onFilterClearIconClick((function(){return u.DomHandler.focus(I.current)}))}},S("filterClearIcon"));return u.IconUtils.getJSXIcon(e.filterClearIcon||y.createElement(i.TimesIcon,r),T({},r),{props:e})}return null},M=function(){if(e.filter){var t=R(),n=v({className:g("filterIcon")},S("filterIcon")),r=u.IconUtils.getJSXIcon(e.filterIcon||y.createElement(p.SearchIcon,n),T({},n),{props:e}),o=v({className:g("filterContainer",{clearIcon:t})},S("filterContainer")),l=v({ref:I,type:"text",autoComplete:"off",className:g("filterInput"),placeholder:e.filterPlaceholder,onKeyDown:e.onFilterInputKeyDown,onChange:function(e){return j(e)},value:e.filterValue},S("filterInput")),i=y.createElement("div",o,y.createElement("input",l),t,r);if(e.filterTemplate){var a={className:u.classNames("p-dropdown-filter-container",{"p-dropdown-clearable-filter":!!t}),element:i,filterOptions:x,filterInputKeyDown:e.onFilterInputKeyDown,filterInputChange:j,filterIconClassName:"p-dropdown-filter-icon",clearIcon:t,props:e};i=u.ObjectUtils.getJSXElement(e.filterTemplate,a)}var c=v({className:g("header")},S("header"));return y.createElement("div",c,i)}return null},H=function(){if(e.virtualScrollerOptions){var t=T(T({},e.virtualScrollerOptions),{style:T(T({},e.virtualScrollerOptions.style),{height:e.scrollHeight}),className:u.classNames("p-dropdown-items-wrapper",e.virtualScrollerOptions.className),items:e.visibleOptions,autoSize:!0,onLazyLoad:function(t){return e.virtualScrollerOptions.onLazyLoad(T(T({},t),{filter:e.filterValue}))},itemTemplate:function(e,t){return e&&P(e,t.index,t)},contentTemplate:function(t){var n=E?L(e.hasFilter?e.emptyFilterMessage:e.emptyMessage):t.children,r=v({ref:t.contentRef,style:t.style,className:u.classNames(t.className,g("list",{virtualScrollerProps:e.virtualScrollerOptions})),role:"listbox"},S("list"));return y.createElement("ul",r,n)}});return y.createElement(f.VirtualScroller,O({ref:e.virtualScrollerRef},t,{pt:b("virtualScroller")}))}var n=u.ObjectUtils.isNotEmpty(e.visibleOptions)?e.visibleOptions.map(P):e.hasFilter?L(e.emptyFilterMessage,!0):L(e.emptyMessage),r=v({className:g("wrapper"),style:h("wrapper")},S("wrapper")),o=v({className:g("list"),role:"listbox"},S("list"));return y.createElement("div",r,y.createElement("ul",o,n))},G=(o=M(),l=H(),a=k(),c=v({className:u.classNames(e.panelClassName,g("panel",{context:w})),style:h("panel"),onClick:e.onClick},S("panel")),m=v({classNames:g("transition"),in:e.in,timeout:{enter:120,exit:100},options:e.transitionOptions,unmountOnExit:!0,onEnter:D,onEntered:F,onExit:e.onExit,onExited:e.onExited},S("transition")),y.createElement(s.CSSTransition,O({nodeRef:n},m),y.createElement("div",O({ref:n},c),e.firstFocusableElement,o,l,a,e.lastFocusableElement)));return y.createElement(d.Portal,{element:G,appendTo:e.appendTo})})));function H(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=G(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 l,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,l=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw l}}}}function G(e,t){if(e){if("string"==typeof e)return A(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)?A(e,t):void 0}}function A(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 q(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}M.displayName="DropdownPanel";var V=y.memo(y.forwardRef((function(e,s){var p=r.useMergeProps(),d=y.useContext(t.PrimeReactContext),f=L.getProps(e,d),m=N(y.useState(""),2),v=m[0],b=m[1],g=N(y.useState(!1),2),h=g[0],E=g[1],x=N(y.useState(-1),2),D=x[0],F=x[1],j=N(y.useState(!1),2),k=j[0],C=j[1],P=y.useRef(!1),U=y.useRef(null),R=y.useRef(null),T=y.useRef(null),G=y.useRef(null),A=y.useRef(f.inputRef),q=y.useRef(f.focusInputRef),V=y.useRef(null),B=y.useRef(null),_=y.useRef(null);y.useRef(null);var J=f.virtualScrollerOptions&&f.virtualScrollerOptions.lazy,X=u.ObjectUtils.isNotEmpty(v),z=f.appendTo||d&&d.appendTo||w.default.appendTo,Z=L.setMetaData(K(K({props:f},f.__parentMetadata),{},{state:{filter:v,focused:h,overlayVisible:k}})),W=Z.ptm,$=Z.cx,Y=Z.sx;n.useHandleStyle(L.css.styles,Z.isUnstyled,{name:"dropdown"});var Q=N(r.useOverlayListener({target:U,overlay:R,listener:function(e,t){t.valid&&("outside"===t.type?!ne(e)&&Ge():Ge())},when:k}),2),ee=Q[0],te=Q[1],ne=function(e){return u.DomHandler.isAttributeEquals(e.target,"data-pc-section","clearicon")||u.DomHandler.isAttributeEquals(e.target.parentElement||e.target,"data-pc-section","filterclearicon")},re=function(e){f.showOnFocus&&!k&&He(),E(!0),f.onFocus&&f.onFocus(e)},oe=function(e){E(!1),f.onBlur&&setTimeout((function(){var t=A.current?A.current.value:void 0;f.onBlur({originalEvent:e.originalEvent,value:t,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:f.name,id:f.id,value:t}})}),200)},le=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Ve(t);Pe({originalEvent:e,option:r}),n&&Ge()},ie=function(e){if(f.disabled||u.DomHandler.isAndroid())e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":ge(e);break;case"ArrowUp":he(e);break;case"ArrowLeft":case"ArrowRight":ye(e,f.editable);break;case"Home":we(e);break;case"End":Oe(e);break;case"PageDown":Ee(e);break;case"PageUp":Ie(e);break;case"Space":xe(e,f.editable);break;case"NumpadEnter":case"Enter":Se(e);break;case"Escape":De(e);break;case"Tab":Fe(e);break;case"Backspace":je(e,f.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&u.ObjectUtils.isPrintableCharacter(e.key)&&(!k&&!f.editable&&He(),!f.editable&&fe(e,e.key))}P.current=!1}},ae=function(e){var t;return ce(e)&&(null===(t=Ke(e))||void 0===t?void 0:t.toLocaleLowerCase(f.filterLocale).startsWith(_.current.toLocaleLowerCase(f.filterLocale)))},ce=function(e){return u.ObjectUtils.isNotEmpty(e)&&!(_e(e)||Be(e))},ue=function(){return u.ObjectUtils.isNotEmpty(f.value)},se=function(e){return ce(e)&&Me(e)},pe=function(){return ue?Qe.findIndex((function(e){return se(e)})):-1},de=function(){var e=pe();return e<0?me():e},fe=function(e,t){_.current=(_.current||"")+t;var n=-1,r=!1;return u.ObjectUtils.isNotEmpty(_.current)&&(-1!==(n=-1!==D?-1===(n=Qe.slice(D).findIndex((function(e){return ae(e)})))?Qe.slice(0,D).findIndex((function(e){return ae(e)})):n+D:Qe.findIndex((function(e){return ae(e)})))&&(r=!0),-1===n&&-1===D&&(n=de()),-1!==n&&be(e,n)),B.current&&clearTimeout(B.current),B.current=setTimeout((function(){_.current="",B.current=null}),500),r},me=function(){return Qe.findIndex((function(e){return ce(e)}))},ve=function(){return u.ObjectUtils.findLastIndex(Qe,(function(e){return ce(e)}))},be=function(e,t){D!==t&&(F(t),f.selectOnFocus&&le(e,Qe[t],!1))},ge=function(e){if(k){var t=-1!==D?(r=(n=D)<Qe.length-1?Qe.slice(n+1).findIndex((function(e){return ce(e)})):-1)>-1?r+n+1:n:P.current?me():de();be(e,t)}else He(),f.editable&&be(e,pe());var n,r;e.preventDefault()},he=function(e){var t,n,r;if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==D&&le(e,Qe[D]),state.overlayVisible&&Ge(),e.preventDefault();else{var o=-1!==D?(r=(n=D)>0?u.ObjectUtils.findLastIndex(Qe.slice(0,n),(function(e){return ce(e)})):-1)>-1?r:n:P.current?ve():(t=pe())<0?ve():t;be(e,o),!k&&He(),e.preventDefault()}},ye=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&F(-1)},we=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(e.currentTarget.setSelectionRange(0,0),F(-1)):(be(e,me()),!k&&He()),e.preventDefault()},Oe=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n),F(-1)}else be(e,ve()),!k&&He();e.preventDefault()},Ie=function(e){e.preventDefault()},Ee=function(e){e.preventDefault()},xe=function(e){!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&Se(e)},Se=function(e){k?(-1!==D&&le(e,Qe[D]),Ge()):(F(-1),ge(e)),e.preventDefault()},De=function(e){k&&Ge(),e.preventDefault()},Fe=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(!k||u.DomHandler.getFocusableElements(R.current,':not([data-p-hidden-focusable="true"])').length>0?(-1!==D&&le(e,Qe[D]),k&&Ge()):(u.DomHandler.focus(T.current),e.preventDefault()))},je=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&!k&&He()},ke=function(e){var t=null;e.target.value&&(t=Qe.findIndex((function(t){return Ke(t).toLocaleLowerCase().startsWith(e.target.value.toLocaleLowerCase())}))),F(t),f.onChange&&f.onChange({originalEvent:e.originalEvent,value:e.target.value,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:f.name,id:f.id,value:e.target.value}})},Ce=function(e){E(!0),Ge(),f.onFocus&&f.onFocus(e)},Ne=function(e){b(""),f.onFilter&&f.onFilter({filter:""}),e&&e()},Le=function(e){f.onChange&&f.onChange({originalEvent:e,value:void 0,stopPropagation:function(){null==e||e.stopPropagation()},preventDefault:function(){null==e||e.preventDefault()},target:{name:f.name,id:f.id,value:void 0}}),f.filter&&Ne(),qe()},Pe=function(e){if(et!==e.option){qe(e.option),F(-1);var t=Ve(e.option),n=Te(e.option,Qe);f.onChange&&f.onChange({originalEvent:e.originalEvent,value:t,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:f.name,id:f.id,value:t}}),be(e.originalEvent,n)}},Ue=function(e){if(e=e||Qe,null!=f.value&&e){if(!f.optionGroupLabel)return Te(f.value,e);for(var t=0;t<e.length;t++){var n=Te(f.value,Je(e[t]));if(-1!==n)return{group:t,option:n}}}return-1},Re=function(){return f.optionValue?null:f.dataKey},Te=function(e,t){var n=Re();return t.findIndex((function(t){return u.ObjectUtils.equals(e,Ve(t),n)}))},Me=function(e){return u.ObjectUtils.equals(f.value,Ve(e),Re())},He=function(){F(-1!==D?D:f.autoOptionFocus?de():f.editable?-1:pe()),C(!0)},Ge=function(){C(!1),P.current=!1},Ae=function(){u.DomHandler.alignOverlay(R.current,A.current.parentElement,f.appendTo||d&&d.appendTo||w.default.appendTo)},qe=function(e){A.current&&(A.current.value=e?Ke(e):f.value||"",q.current&&(q.current.value=A.current.value))},Ke=function(e){return f.optionLabel?u.ObjectUtils.resolveFieldData(e,f.optionLabel):e&&void 0!==e.label?e.label:e},Ve=function(e){return f.optionValue?u.ObjectUtils.resolveFieldData(e,f.optionValue):e&&void 0!==e.value?e.value:e},Be=function(e){return f.optionGroupLabel&&e.optionGroup&&e.group},_e=function(e){return f.optionDisabled?u.ObjectUtils.isFunction(f.optionDisabled)?f.optionDisabled(e):u.ObjectUtils.resolveFieldData(e,f.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled},Je=function(e){return u.ObjectUtils.resolveFieldData(e,f.optionGroupChildren)},Xe=function(){if(f.editable&&A.current){var e=(et?Ke(et):null)||f.value||"";A.current.value=e,q.current&&(q.current.value=e)}};y.useImperativeHandle(s,(function(){return{props:f,show:He,hide:Ge,clear:Le,focus:function(){return u.DomHandler.focus(q.current)},getElement:function(){return U.current},getOverlay:function(){return R.current},getInput:function(){return A.current},getFocusInput:function(){return q.current},getVirtualScroller:function(){return V.current}}})),y.useEffect((function(){u.ObjectUtils.combinedRefs(A,f.inputRef),u.ObjectUtils.combinedRefs(q,f.focusInputRef)}),[A,f.inputRef,q,f.focusInputRef]),r.useMountEffect((function(){f.autoFocus&&u.DomHandler.focus(q.current,f.autoFocus),Ae()})),r.useUpdateEffect((function(){var e;k&&f.value&&(e=u.DomHandler.findSingle(R.current,'li[data-p-highlight="true"]'))&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"nearest"})}),[k,f.value]),r.useUpdateEffect((function(){k&&v&&f.filter&&Ae()}),[k,v,f.filter]),r.useUpdateEffect((function(){!v||f.options&&0!==f.options.length||b(""),Xe(),A.current&&(A.current.selectedIndex=1)})),r.useUnmountEffect((function(){u.ZIndexUtils.clear(R.current)}));var ze,Ze,We,$e,Ye,Qe=function(){if(X&&!J){var e=v.trim().toLocaleLowerCase(f.filterLocale),n=f.filterBy?f.filterBy.split(","):[f.optionLabel||"label"];if(f.optionGroupLabel){var r,o=[],l=H(f.options);try{for(l.s();!(r=l.n()).done;){var i=r.value,a=t.FilterService.filter(Je(i),n,e,f.filterMatchMode,f.filterLocale);a&&a.length&&o.push(K(K({},i),S({},"".concat(f.optionGroupChildren),a)))}}catch(e){l.e(e)}finally{l.f()}return o}return t.FilterService.filter(f.options,n,e,f.filterMatchMode,f.filterLocale)}return f.options}(),et=-1!==(ze=Ue(f.options))?f.optionGroupLabel?Je(f.options[ze.group])[ze.option]:f.options[ze]:null,tt=u.ObjectUtils.isNotEmpty(f.tooltip),nt=L.getOtherProps(f),rt=u.ObjectUtils.reduceKeys(nt,u.DomHandler.ARIA_PROPS),ot=function(){var e={value:"",label:f.placeholder};if(et){var t=Ve(et);e={value:"object"===I(t)?f.options.findIndex((function(e){return e===t})):t,label:Ke(et)}}var n=p({className:"p-hidden-accessible p-dropdown-hidden-select"},W("hiddenSelectedMessage")),r=p({ref:A,required:f.required,defaultValue:e.value,name:f.name,tabIndex:-1,"aria-hidden":"true"},W("select")),o=p({value:e.value},W("option"));return y.createElement("div",n,y.createElement("select",r,y.createElement("option",o,e.label)))}(),lt=function(){var e=u.ObjectUtils.isNotEmpty(et)?Ke(et):null;f.editable&&(e=e||f.value||"");var t=p({className:"p-hidden-accessible"},W("hiddenSelectedMessage")),n=p(K({ref:q,id:f.inputId,defaultValue:e,type:"text",readOnly:!0,"aria-haspopup":"listbox",onFocus:re,onBlur:oe,onKeyDown:ie,disabled:f.disabled,tabIndex:f.disabled?-1:f.tabIndex||0},rt),W("input"));return y.createElement("div",t,y.createElement("input",n))}(),it=function(){var e=u.ObjectUtils.isNotEmpty(et)?Ke(et):null;if(f.editable){var t=p(K({ref:A,type:"text",defaultValue:e||f.value||"",className:$("input",{label:e}),disabled:f.disabled,placeholder:f.placeholder,maxLength:f.maxLength,onInput:ke,onFocus:Ce,onKeyDown:ie,onBlur:oe,tabIndex:f.disabled?-1:f.tabIndex||0,"aria-haspopup":"listbox"},rt),W("input"));return y.createElement("input",t)}var n=f.valueTemplate?u.ObjectUtils.getJSXElement(f.valueTemplate,et,f):e||f.placeholder||"empty",r=p({ref:A,className:$("input",{label:e}),tabIndex:"-1"},W("input"));return y.createElement("span",r,n)}(),at=f.loading?(Ze=p({className:$("loadingIcon"),"data-pr-overlay-visible":k},W("loadingIcon")),We=u.IconUtils.getJSXIcon(f.loadingIcon||y.createElement(l.SpinnerIcon,{spin:!0}),K({},Ze),{props:f}),$e=f.placeholder||f.ariaLabel,Ye=p({className:$("trigger"),role:"button","aria-haspopup":"listbox","aria-expanded":k,"aria-label":$e},W("trigger")),y.createElement("div",Ye,We)):function(){var e=p({className:$("dropdownIcon"),"data-pr-overlay-visible":k},W("dropdownIcon")),t=u.IconUtils.getJSXIcon(f.dropdownIcon||y.createElement(o.ChevronDownIcon,e),K({},e),{props:f}),n=f.placeholder||f.ariaLabel,r=p({className:$("trigger"),role:"button","aria-haspopup":"listbox","aria-expanded":k,"aria-label":n},W("trigger"));return y.createElement("div",r,t)}(),ct=function(){if(null!=f.value&&f.showClear&&!f.disabled){var e=p({className:$("clearIcon"),onPointerUp:Le},W("clearIcon"));return u.IconUtils.getJSXIcon(f.clearIcon||y.createElement(i.TimesIcon,e),K({},e),{props:f})}return null}(),ut=p({id:f.id,ref:U,className:u.classNames(f.className,$("root",{focusedState:h,overlayVisibleState:k})),style:f.style,onClick:function(e){return t=e,void(f.disabled||f.loading||(f.onClick&&f.onClick(t),t.defaultPrevented||ne(t)||"INPUT"===t.target.tagName||(R.current&&R.current&&R.current.contains(t.target)||(u.DomHandler.focus(q.current),k?Ge():He()),P.current=!0)));var t},onMouseDown:f.onMouseDown,onContextMenu:f.onContextMenu,onFocus:function(){f.editable&&!k&&!1===P.current&&u.DomHandler.focus(A.current)},"data-p-disabled":f.disabled,"data-p-focus":h},nt,W("root")),st=p({ref:T,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:function(e){var t=e.relatedTarget===q.current?u.DomHandler.getFirstFocusableElement(R.current,':not([data-p-hidden-focusable="true"])'):q.current;u.DomHandler.focus(t)},"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},W("hiddenFirstFocusableEl")),pt=p({ref:G,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:function(e){var t=e.relatedTarget===q.current?u.DomHandler.getLastFocusableElement(R.current,':not([data-p-hidden-focusable="true"])'):q.current;u.DomHandler.focus(t)},"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},W("hiddenLastFocusableEl"));return y.createElement(y.Fragment,null,y.createElement("div",ut,lt,ot,it,ct,at,y.createElement(M,O({hostName:"Dropdown",ref:R,visibleOptions:Qe,virtualScrollerRef:V},f,{appendTo:z,cx:$,filterValue:v,focusedOptionIndex:D,getOptionGroupChildren:Je,getOptionGroupLabel:function(e){return u.ObjectUtils.resolveFieldData(e,f.optionGroupLabel)},getOptionGroupRenderKey:function(e){return u.ObjectUtils.resolveFieldData(e,f.optionGroupLabel)},getOptionLabel:Ke,getOptionRenderKey:function(e){return f.dataKey?u.ObjectUtils.resolveFieldData(e,f.dataKey):Ke(e)},getSelectedOptionIndex:Ue,hasFilter:X,in:k,isOptionDisabled:_e,isSelected:Me,onClick:function(e){a.OverlayService.emit("overlay-click",{originalEvent:e,target:U.current})},onEnter:function(e){u.ZIndexUtils.set("overlay",R.current,d&&d.autoZIndex||w.default.autoZIndex,d&&d.zIndex.overlay||w.default.zIndex.overlay),u.DomHandler.addStyles(R.current,{position:"absolute",top:"0",left:"0"}),Ae(),e&&e()},onEntered:function(e){e&&e(),ee(),f.onShow&&f.onShow()},onExit:function(){te()},onExited:function(){f.filter&&f.resetFilterOnHide&&Ne(),u.ZIndexUtils.clear(R.current),f.onHide&&f.onHide()},onFilterClearIconClick:function(e){Ne(e)},onFilterInputChange:function(e){var t=e.target.value;b(t),f.onFilter&&f.onFilter({originalEvent:e,filter:t})},onFilterInputKeyDown:function(e){switch(e.code){case"ArrowDown":ge(e);break;case"ArrowUp":he(e);break;case"ArrowLeft":case"ArrowRight":ye(e,!0);break;case"Escape":case"Enter":case"NumpadEnter":Se(e),e.preventDefault()}},onOptionClick:function(e){e.option.disabled||(Pe(e),u.DomHandler.focus(q.current)),Ge()},ptm:W,resetFilter:Ne,changeFocusedOptionIndex:be,firstFocusableElement:y.createElement("span",st),lastFocusableElement:y.createElement("span",pt),sx:Y}))),tt&&y.createElement(c.Tooltip,O({target:U,content:f.tooltip,pt:W("tooltip")},f.tooltipOptions)))})));V.displayName="Dropdown",exports.Dropdown=V;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/api"),n=require("primereact/componentbase"),r=require("primereact/hooks"),o=require("primereact/icons/chevrondown"),l=require("primereact/icons/spinner"),i=require("primereact/icons/times"),a=require("primereact/overlayservice"),u=require("primereact/tooltip"),c=require("primereact/utils"),s=require("primereact/csstransition"),p=require("primereact/icons/search"),d=require("primereact/portal"),f=require("primereact/virtualscroller"),m=require("primereact/ripple"),v=require("primereact/icons/check"),b=require("primereact/iconbase");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function h(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var y=h(e),w=g(t);function O(){return O=Object.assign?Object.assign.bind():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},O.apply(this,arguments)}function I(e){return I="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},I(e)}function E(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function x(e){var t=E(e,"string");return"symbol"===I(t)?t:String(t)}function S(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){if(Array.isArray(e))return e}function j(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,i,a=[],u=!0,c=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}function F(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 N(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 C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(e,t){return D(e)||j(e,t)||N(e,t)||C()}var L=n.ComponentBase.extend({defaultProps:{__TYPE:"Dropdown",__parentMetadata:null,appendTo:null,ariaLabel:null,ariaLabelledBy:null,autoFocus:!1,children:void 0,className:null,clearIcon:null,dataKey:null,disabled:!1,dropdownIcon:null,editable:!1,emptyFilterMessage:null,highlightOnSelect:!0,checkmark:!1,emptyMessage:null,filter:!1,filterBy:null,filterClearIcon:null,filterIcon:null,filterInputAutoFocus:!1,filterLocale:void 0,filterMatchMode:"contains",filterPlaceholder:null,filterTemplate:null,focusInputRef:null,id:null,inputId:null,inputRef:null,invalid:!1,variant:null,itemTemplate:null,loading:!1,loadingIcon:null,maxLength:null,name:null,onBlur:null,onChange:null,onContextMenu:null,onFilter:null,onFocus:null,onHide:null,onMouseDown:null,onShow:null,optionDisabled:null,optionGroupChildren:"items",selectOnFocus:!1,focusOnHover:!0,autoOptionFocus:!1,optionGroupLabel:null,optionGroupTemplate:null,optionLabel:null,optionValue:null,options:null,panelClassName:null,panelFooterTemplate:null,panelStyle:null,placeholder:null,required:!1,resetFilterOnHide:!1,scrollHeight:"200px",showClear:!1,showFilterClear:!1,showOnFocus:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,transitionOptions:null,value:null,valueTemplate:null,virtualScrollerOptions:null},css:{classes:{root:function(e){var t=e.props,n=e.focusedState,r=e.overlayVisibleState,o=e.context;return c.classNames("p-dropdown p-component p-inputwrapper",{"p-disabled":t.disabled,"p-invalid":t.invalid,"p-focus":n,"p-variant-filled":t.variant?"filled"===t.variant:o&&"filled"===o.inputStyle,"p-dropdown-clearable":t.showClear&&!t.disabled,"p-inputwrapper-filled":c.ObjectUtils.isNotEmpty(t.value),"p-inputwrapper-focus":n||r})},input:function(e){var t=e.props,n=e.label;return t.editable?"p-dropdown-label p-inputtext":c.classNames("p-dropdown-label p-inputtext",{"p-placeholder":null===n&&t.placeholder,"p-dropdown-label-empty":null===n&&!t.placeholder})},trigger:"p-dropdown-trigger",emptyMessage:"p-dropdown-empty-message",itemGroup:function(e){var t=e.optionGroupLabel;return c.classNames("p-dropdown-item-group",{"p-dropdown-item-empty":!t||0===t.length})},itemGroupLabel:"p-dropdown-item-group-label",dropdownIcon:"p-dropdown-trigger-icon p-clickable",loadingIcon:"p-dropdown-trigger-icon p-clickable",clearIcon:"p-dropdown-clear-icon p-clickable",filterIcon:"p-dropdown-filter-icon",filterClearIcon:"p-dropdown-filter-clear-icon",filterContainer:function(e){return c.classNames("p-dropdown-filter-container",{"p-dropdown-clearable-filter":!!e.clearIcon})},filterInput:function(e){var t=e.props,n=e.context;return c.classNames("p-dropdown-filter p-inputtext p-component",{"p-variant-filled":t.variant?"filled"===t.variant:n&&"filled"===n.inputStyle})},list:function(e){return"p-dropdown-items"},panel:function(e){var t=e.context;return c.classNames("p-dropdown-panel p-component",{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===w.default.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===w.default.ripple})},item:function(e){var t=e.label;return c.classNames("p-dropdown-item",{"p-highlight":e.selected&&e.highlightOnSelect,"p-disabled":e.disabled,"p-focus":e.index===e.focusedOptionIndex,"p-dropdown-item-empty":!t||0===t.length})},itemLabel:"p-dropdown-item-label",checkIcon:"p-dropdown-check-icon",blankIcon:"p-dropdown-blank-icon",wrapper:"p-dropdown-items-wrapper",header:"p-dropdown-header",footer:"p-dropdown-footer",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-dropdown {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n }\n \n .p-dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n \n .p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n }\n \n .p-dropdown-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n input.p-dropdown-label {\n cursor: default;\n }\n \n .p-dropdown .p-dropdown-panel {\n min-width: 100%;\n }\n \n .p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n }\n \n .p-dropdown-items-wrapper {\n overflow: auto;\n }\n \n .p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n }\n \n .p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-dropdown-filter {\n width: 100%;\n }\n \n .p-dropdown-filter-container {\n position: relative;\n }\n \n .p-dropdown-clear-icon,\n .p-dropdown-filter-icon,\n .p-dropdown-filter-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-fluid .p-dropdown {\n display: flex;\n }\n \n .p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n }\n}\n",inlineStyles:{wrapper:function(e){return{maxHeight:e.props.scrollHeight||"auto"}},panel:function(e){}}}}),P=y.memo(y.forwardRef((function(e,t){var n=b.IconBase.getPTI(e);return y.createElement("svg",O({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("rect",{width:"1",height:"1",fill:"currentColor",fillOpacity:"0"}))})));P.displayName="BlankIcon";var U=y.memo((function(e){var t=r.useMergeProps(),n=e.ptm,o=e.cx,l=e.selected,i=e.disabled,a=e.option,u=e.label,s=e.index,p=e.focusedOptionIndex,d=e.checkmark,f=e.highlightOnSelect,b=function(e){return n(e,{context:{selected:l,disabled:i}})},g=e.template?c.ObjectUtils.getJSXElement(e.template,e.option):e.label,h=t({role:"option",key:e.label,className:c.classNames(a.className,o("item",{selected:l,disabled:i,label:u,index:s,focusedOptionIndex:p,highlightOnSelect:f})),style:e.style,onClick:function(t){return n=t,void(e.onClick&&e.onClick({originalEvent:n,option:a}));var n},onMouseMove:function(t){return null==e?void 0:e.onMouseMove(t,s)},"aria-label":u,"aria-selected":l,"data-p-highlight":l,"data-p-focused":p===s,"data-p-disabled":i},b("item")),w=t({className:o("itemLabel")},b("itemLabel"));return y.createElement("li",h,d&&function(){if(l){var e=t({className:o("checkIcon")},b("checIcon"));return y.createElement(v.CheckIcon,e)}var n=t({className:o("blankIcon")},b("blankIcon"));return y.createElement(P,n)}(),y.createElement("span",w,g),y.createElement(m.Ripple,null))}));function R(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 T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}U.displayName="DropdownItem";var M=y.memo(y.forwardRef((function(e,n){var o,l,a,u,m,v=r.useMergeProps(),b=e.ptm,g=e.cx,h=e.sx,w=y.useContext(t.PrimeReactContext),I=y.useRef(null),E=!(e.visibleOptions&&e.visibleOptions.length)&&e.hasFilter,x={filter:function(e){return F(e)},reset:function(){return e.resetFilter()}},S=function(t,n){return b(t,T({hostName:e.hostName},n))},D=function(){e.onEnter((function(){if(e.virtualScrollerRef.current){var t=e.getSelectedOptionIndex();-1!==t&&setTimeout((function(){return e.virtualScrollerRef.current.scrollToIndex(t)}),0)}}))},j=function(){e.onEntered((function(){e.filter&&e.filterInputAutoFocus&&c.DomHandler.focus(I.current,!1)}))},F=function(t){e.virtualScrollerRef.current&&e.virtualScrollerRef.current.scrollToIndex(0),e.onFilterInputChange&&e.onFilterInputChange(t)},N=function(){if(e.panelFooterTemplate){var t=c.ObjectUtils.getJSXElement(e.panelFooterTemplate,e,e.onOverlayHide),n=v({className:g("footer")},S("footer"));return y.createElement("div",n,t)}return null},C=function(t,n){var r;e.focusOnHover&&(null==e||null===(r=e.changeFocusedOptionIndex)||void 0===r||r.call(e,t,n))},k=function(n,r){var o=c.ObjectUtils.getJSXElement(n,e)||t.localeOption(r?"emptyFilterMessage":"emptyMessage"),l=v({className:g("emptyMessage")},S("emptyMessage"));return y.createElement("li",l,o)},L=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={height:r.props?r.props.itemSize:void 0};if(o=T(T({},o),t.style),t.group&&e.optionGroupLabel){var l=e.optionGroupLabel,i=e.optionGroupTemplate?c.ObjectUtils.getJSXElement(e.optionGroupTemplate,t,n):e.getOptionGroupLabel(t),a=n+"_"+e.getOptionGroupRenderKey(t),u=v({className:g("itemGroup",{optionGroupLabel:l}),style:o,"data-p-highlight":e.selected},S("itemGroup")),s=v({className:g("itemGroupLabel")},S("itemGroupLabel"));return y.createElement("li",O({key:a},u),y.createElement("span",s,i))}var p=e.getOptionRenderKey(t)+"_"+n,d=e.getOptionLabel(t),f=e.isOptionDisabled(t);return y.createElement(U,{key:p,label:d,index:n,focusedOptionIndex:e.focusedOptionIndex,option:t,style:o,template:e.itemTemplate,selected:e.isSelected(t),highlightOnSelect:e.highlightOnSelect,disabled:f,onClick:e.onOptionClick,onMouseMove:C,ptm:b,cx:g,checkmark:e.checkmark})},P=function(){if(e.showFilterClear&&e.filterValue){var n=t.localeOption("clear"),r=v({className:g("filterClearIcon"),"aria-label":n,onClick:function(){return e.onFilterClearIconClick((function(){return c.DomHandler.focus(I.current)}))}},S("filterClearIcon"));return c.IconUtils.getJSXIcon(e.filterClearIcon||y.createElement(i.TimesIcon,r),T({},r),{props:e})}return null},R=function(){if(e.filter){var t=P(),n=v({className:g("filterIcon")},S("filterIcon")),r=c.IconUtils.getJSXIcon(e.filterIcon||y.createElement(p.SearchIcon,n),T({},n),{props:e}),o=v({className:g("filterContainer",{clearIcon:t})},S("filterContainer")),l=v({ref:I,type:"text",autoComplete:"off",className:g("filterInput",{context:w}),placeholder:e.filterPlaceholder,onKeyDown:e.onFilterInputKeyDown,onChange:function(e){return F(e)},value:e.filterValue},S("filterInput")),i=y.createElement("div",o,y.createElement("input",l),t,r);if(e.filterTemplate){var a={className:c.classNames("p-dropdown-filter-container",{"p-dropdown-clearable-filter":!!t}),element:i,filterOptions:x,filterInputKeyDown:e.onFilterInputKeyDown,filterInputChange:F,filterIconClassName:"p-dropdown-filter-icon",clearIcon:t,props:e};i=c.ObjectUtils.getJSXElement(e.filterTemplate,a)}var u=v({className:g("header")},S("header"));return y.createElement("div",u,i)}return null},M=function(){if(e.virtualScrollerOptions){var t=T(T({},e.virtualScrollerOptions),{style:T(T({},e.virtualScrollerOptions.style),{height:e.scrollHeight}),className:c.classNames("p-dropdown-items-wrapper",e.virtualScrollerOptions.className),items:e.visibleOptions,autoSize:!0,onLazyLoad:function(t){return e.virtualScrollerOptions.onLazyLoad(T(T({},t),{filter:e.filterValue}))},itemTemplate:function(e,t){return e&&L(e,t.index,t)},contentTemplate:function(t){var n=E?k(e.hasFilter?e.emptyFilterMessage:e.emptyMessage):t.children,r=v({ref:t.contentRef,style:t.style,className:c.classNames(t.className,g("list",{virtualScrollerProps:e.virtualScrollerOptions})),role:"listbox"},S("list"));return y.createElement("ul",r,n)}});return y.createElement(f.VirtualScroller,O({ref:e.virtualScrollerRef},t,{pt:b("virtualScroller")}))}var n=c.ObjectUtils.isNotEmpty(e.visibleOptions)?e.visibleOptions.map(L):e.hasFilter?k(e.emptyFilterMessage,!0):k(e.emptyMessage),r=v({className:g("wrapper"),style:h("wrapper")},S("wrapper")),o=v({className:g("list"),role:"listbox"},S("list"));return y.createElement("div",r,y.createElement("ul",o,n))},H=(o=R(),l=M(),a=N(),u=v({className:c.classNames(e.panelClassName,g("panel",{context:w})),style:h("panel"),onClick:e.onClick},S("panel")),m=v({classNames:g("transition"),in:e.in,timeout:{enter:120,exit:100},options:e.transitionOptions,unmountOnExit:!0,onEnter:D,onEntered:j,onExit:e.onExit,onExited:e.onExited},S("transition")),y.createElement(s.CSSTransition,O({nodeRef:n},m),y.createElement("div",O({ref:n},u),e.firstFocusableElement,o,l,a,e.lastFocusableElement)));return y.createElement(d.Portal,{element:H,appendTo:e.appendTo})})));function H(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=G(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 l,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,l=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw l}}}}function G(e,t){if(e){if("string"==typeof e)return A(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)?A(e,t):void 0}}function A(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 q(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 V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}M.displayName="DropdownPanel";var K=y.memo(y.forwardRef((function(e,s){var p=r.useMergeProps(),d=y.useContext(t.PrimeReactContext),f=L.getProps(e,d),m=k(y.useState(""),2),v=m[0],b=m[1],g=k(y.useState(!1),2),h=g[0],E=g[1],x=k(y.useState(-1),2),D=x[0],j=x[1],F=k(y.useState(!1),2),N=F[0],C=F[1],P=y.useRef(!1),U=y.useRef(null),R=y.useRef(null),T=y.useRef(null),G=y.useRef(null),A=y.useRef(f.inputRef),q=y.useRef(f.focusInputRef),K=y.useRef(null),B=y.useRef(null),_=y.useRef(null);y.useRef(null);var J=f.virtualScrollerOptions&&f.virtualScrollerOptions.lazy,X=c.ObjectUtils.isNotEmpty(v),z=f.appendTo||d&&d.appendTo||w.default.appendTo,Z=L.setMetaData(V(V({props:f},f.__parentMetadata),{},{state:{filter:v,focused:h,overlayVisible:N}})),W=Z.ptm,$=Z.cx,Y=Z.sx;n.useHandleStyle(L.css.styles,Z.isUnstyled,{name:"dropdown"});var Q=k(r.useOverlayListener({target:U,overlay:R,listener:function(e,t){t.valid&&("outside"===t.type?!re(e)&&Ae():Ae())},when:N}),2),ee=Q[0],te=Q[1],ne=function(e){return(e||[]).reduce((function(e,t,n){e.push({optionGroup:t,group:!0,index:n,code:t.code,label:t.label});var r=ze(t);return r&&r.forEach((function(t){return e.push(t)})),e}),[])},re=function(e){return c.DomHandler.isAttributeEquals(e.target,"data-pc-section","clearicon")||c.DomHandler.isAttributeEquals(e.target.parentElement||e.target,"data-pc-section","filterclearicon")},oe=function(e){f.showOnFocus&&!N&&Ge(),E(!0),f.onFocus&&f.onFocus(e)},le=function(e){E(!1),f.onBlur&&setTimeout((function(){var t=A.current?A.current.value:void 0;f.onBlur({originalEvent:e.originalEvent,value:t,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:f.name,id:f.id,value:t}})}),200)},ie=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=_e(t);Ue({originalEvent:e,option:r}),n&&Ae()},ae=function(e){if(f.disabled||c.DomHandler.isAndroid())e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":he(e);break;case"ArrowUp":ye(e);break;case"ArrowLeft":case"ArrowRight":we(e,f.editable);break;case"Home":Oe(e);break;case"End":Ie(e);break;case"PageDown":xe(e);break;case"PageUp":Ee(e);break;case"Space":Se(e,f.editable);break;case"NumpadEnter":case"Enter":De(e);break;case"Escape":je(e);break;case"Tab":Fe(e);break;case"Backspace":Ne(e,f.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&c.ObjectUtils.isPrintableCharacter(e.key)&&(!N&&!f.editable&&Ge(),!f.editable&&me(e,e.key))}P.current=!1}},ue=function(e){var t;return ce(e)&&(null===(t=Be(e))||void 0===t?void 0:t.toLocaleLowerCase(f.filterLocale).startsWith(_.current.toLocaleLowerCase(f.filterLocale)))},ce=function(e){return c.ObjectUtils.isNotEmpty(e)&&!(Xe(e)||Je(e))},se=function(){return c.ObjectUtils.isNotEmpty(f.value)},pe=function(e){return ce(e)&&He(e)},de=function(){return se?nt.findIndex((function(e){return pe(e)})):-1},fe=function(){var e=de();return e<0?ve():e},me=function(e,t){_.current=(_.current||"")+t;var n=-1,r=!1;return c.ObjectUtils.isNotEmpty(_.current)&&(-1!==(n=-1!==D?-1===(n=nt.slice(D).findIndex((function(e){return ue(e)})))?nt.slice(0,D).findIndex((function(e){return ue(e)})):n+D:nt.findIndex((function(e){return ue(e)})))&&(r=!0),-1===n&&-1===D&&(n=fe()),-1!==n&&ge(e,n)),B.current&&clearTimeout(B.current),B.current=setTimeout((function(){_.current="",B.current=null}),500),r},ve=function(){return nt.findIndex((function(e){return ce(e)}))},be=function(){return c.ObjectUtils.findLastIndex(nt,(function(e){return ce(e)}))},ge=function(e,t){D!==t&&(j(t),f.selectOnFocus&&ie(e,nt[t],!1))},he=function(e){if(N){var t=-1!==D?(r=(n=D)<nt.length-1?nt.slice(n+1).findIndex((function(e){return ce(e)})):-1)>-1?r+n+1:n:P.current?ve():fe();ge(e,t)}else Ge(),f.editable&&ge(e,de());var n,r;e.preventDefault()},ye=function(e){var t,n,r;if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==D&&ie(e,nt[D]),state.overlayVisible&&Ae(),e.preventDefault();else{var o=-1!==D?(r=(n=D)>0?c.ObjectUtils.findLastIndex(nt.slice(0,n),(function(e){return ce(e)})):-1)>-1?r:n:P.current?be():(t=de())<0?be():t;ge(e,o),!N&&Ge(),e.preventDefault()}},we=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&j(-1)},Oe=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(e.currentTarget.setSelectionRange(0,0),j(-1)):(ge(e,ve()),!N&&Ge()),e.preventDefault()},Ie=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n),j(-1)}else ge(e,be()),!N&&Ge();e.preventDefault()},Ee=function(e){e.preventDefault()},xe=function(e){e.preventDefault()},Se=function(e){!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&De(e)},De=function(e){N?(-1!==D&&ie(e,nt[D]),Ae()):(j(-1),he(e)),e.preventDefault()},je=function(e){N&&Ae(),e.preventDefault()},Fe=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(!N||c.DomHandler.getFocusableElements(R.current,':not([data-p-hidden-focusable="true"])').length>0?(-1!==D&&ie(e,nt[D]),N&&Ae()):(c.DomHandler.focus(T.current),e.preventDefault()))},Ne=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&!N&&Ge()},Ce=function(e){var t=null;e.target.value&&(t=nt.findIndex((function(t){return Be(t).toLocaleLowerCase().startsWith(e.target.value.toLocaleLowerCase())}))),j(t),f.onChange&&f.onChange({originalEvent:e.originalEvent,value:e.target.value,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:f.name,id:f.id,value:e.target.value}})},ke=function(e){E(!0),Ae(),f.onFocus&&f.onFocus(e)},Le=function(e){b(""),f.onFilter&&f.onFilter({filter:""}),e&&e()},Pe=function(e){f.onChange&&f.onChange({originalEvent:e,value:void 0,stopPropagation:function(){null==e||e.stopPropagation()},preventDefault:function(){null==e||e.preventDefault()},target:{name:f.name,id:f.id,value:void 0}}),f.filter&&Le(),Ke()},Ue=function(e){if(rt!==e.option){Ke(e.option),j(-1);var t=_e(e.option),n=Me(e.option,nt);f.onChange&&f.onChange({originalEvent:e.originalEvent,value:t,stopPropagation:function(){e.originalEvent.stopPropagation()},preventDefault:function(){e.originalEvent.preventDefault()},target:{name:f.name,id:f.id,value:t}}),ge(e.originalEvent,n)}},Re=function(e){if(e=e||nt,null!=f.value&&e){if(!f.optionGroupLabel)return Me(f.value,e);for(var t=0;t<e.length;t++){var n=Me(f.value,ze(e[t]));if(-1!==n)return{group:t,option:n}}}return-1},Te=function(){return f.optionValue?null:f.dataKey},Me=function(e,t){var n=Te();return t.findIndex((function(t){return c.ObjectUtils.equals(e,_e(t),n)}))},He=function(e){return c.ObjectUtils.equals(f.value,_e(e),Te())},Ge=function(){j(-1!==D?D:f.autoOptionFocus?fe():f.editable?-1:de()),C(!0)},Ae=function(){C(!1),P.current=!1},qe=function(){c.DomHandler.alignOverlay(R.current,A.current.parentElement,f.appendTo||d&&d.appendTo||w.default.appendTo)},Ve=function(){var e=c.DomHandler.findSingle(R.current,'li[data-p-focused="true"]');if(e&&e.scrollIntoView)e.scrollIntoView({block:"nearest",inline:"nearest"});else{var t=c.DomHandler.findSingle(R.current,'li[data-p-highlight="true"]');t&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"nearest"})}},Ke=function(e){A.current&&(A.current.value=e?Be(e):f.value||"",q.current&&(q.current.value=A.current.value))},Be=function(e){return f.optionLabel?c.ObjectUtils.resolveFieldData(e,f.optionLabel):e},_e=function(e){return f.optionValue?c.ObjectUtils.resolveFieldData(e,f.optionValue):e},Je=function(e){return f.optionGroupLabel&&e.optionGroup&&e.group},Xe=function(e){return f.optionDisabled?c.ObjectUtils.isFunction(f.optionDisabled)?f.optionDisabled(e):c.ObjectUtils.resolveFieldData(e,f.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled},ze=function(e){return c.ObjectUtils.resolveFieldData(e,f.optionGroupChildren)},Ze=function(){if(f.editable&&A.current){var e=(rt?Be(rt):null)||f.value||"";A.current.value=e,q.current&&(q.current.value=e)}};y.useImperativeHandle(s,(function(){return{props:f,show:Ge,hide:Ae,clear:Pe,focus:function(){return c.DomHandler.focus(q.current)},getElement:function(){return U.current},getOverlay:function(){return R.current},getInput:function(){return A.current},getFocusInput:function(){return q.current},getVirtualScroller:function(){return K.current}}})),y.useEffect((function(){c.ObjectUtils.combinedRefs(A,f.inputRef),c.ObjectUtils.combinedRefs(q,f.focusInputRef)}),[A,f.inputRef,q,f.focusInputRef]),r.useMountEffect((function(){f.autoFocus&&c.DomHandler.focus(q.current,f.autoFocus),qe()})),r.useUpdateEffect((function(){N&&(f.value||D>=0)&&Ve()}),[N,f.value,D]),r.useUpdateEffect((function(){N&&v&&f.filter&&qe()}),[N,v,f.filter]),r.useUpdateEffect((function(){!v||f.options&&0!==f.options.length||b(""),Ze(),A.current&&(A.current.selectedIndex=1)})),r.useUnmountEffect((function(){c.ZIndexUtils.clear(R.current)}));var We,$e,Ye,Qe,et,tt=function(e){"Enter"!==e.key&&"Space"!==e.code||(Pe(e),e.preventDefault())},nt=function(){var e=f.optionGroupLabel?ne(f.options):f.options;if(X&&!J){var n=v.trim().toLocaleLowerCase(f.filterLocale),r=f.filterBy?f.filterBy.split(","):[f.optionLabel||"label"];if(f.optionGroupLabel){var o,l=[],i=H(f.options);try{for(i.s();!(o=i.n()).done;){var a=o.value,u=t.FilterService.filter(ze(a),r,n,f.filterMatchMode,f.filterLocale);u&&u.length&&l.push(V(V({},a),S({},"".concat(f.optionGroupChildren),u)))}}catch(e){i.e(e)}finally{i.f()}return ne(l)}return t.FilterService.filter(e,r,n,f.filterMatchMode,f.filterLocale)}return e}(),rt=-1!==(We=Re(f.options))?f.optionGroupLabel?ze(f.options[We.group])[We.option]:f.options[We]:null,ot=c.ObjectUtils.isNotEmpty(f.tooltip),lt=L.getOtherProps(f),it=c.ObjectUtils.reduceKeys(lt,c.DomHandler.ARIA_PROPS),at=function(){var e={value:"",label:f.placeholder};if(rt){var t=_e(rt);e={value:"object"===I(t)?f.options.findIndex((function(e){return e===t})):t,label:Be(rt)}}var n=p({className:"p-hidden-accessible p-dropdown-hidden-select"},W("hiddenSelectedMessage")),r=p({ref:A,required:f.required,defaultValue:e.value,name:f.name,tabIndex:-1,"aria-hidden":"true"},W("select")),o=p({value:e.value},W("option"));return y.createElement("div",n,y.createElement("select",r,y.createElement("option",o,e.label)))}(),ut=function(){var e=c.ObjectUtils.isNotEmpty(rt)?Be(rt):null;f.editable&&(e=e||f.value||"");var t=p({className:"p-hidden-accessible"},W("hiddenSelectedMessage")),n=p(V({ref:q,id:f.inputId,defaultValue:e,type:"text",readOnly:!0,"aria-haspopup":"listbox",onFocus:oe,onBlur:le,onKeyDown:ae,disabled:f.disabled,tabIndex:f.disabled?-1:f.tabIndex||0},it),W("input"));return y.createElement("div",t,y.createElement("input",n))}(),ct=function(){var e=c.ObjectUtils.isNotEmpty(rt)?Be(rt):null;if(f.editable){var t=p(V({ref:A,type:"text",defaultValue:e||f.value||"",className:$("input",{label:e}),disabled:f.disabled,placeholder:f.placeholder,maxLength:f.maxLength,onInput:Ce,onFocus:ke,onKeyDown:ae,onBlur:le,tabIndex:f.disabled?-1:f.tabIndex||0,"aria-haspopup":"listbox"},it),W("input"));return y.createElement("input",t)}var n=f.valueTemplate?c.ObjectUtils.getJSXElement(f.valueTemplate,rt,f):e||f.placeholder||"empty",r=p({ref:A,className:$("input",{label:e}),tabIndex:"-1"},W("input"));return y.createElement("span",r,n)}(),st=f.loading?($e=p({className:$("loadingIcon"),"data-pr-overlay-visible":N},W("loadingIcon")),Ye=c.IconUtils.getJSXIcon(f.loadingIcon||y.createElement(l.SpinnerIcon,{spin:!0}),V({},$e),{props:f}),Qe=f.placeholder||f.ariaLabel,et=p({className:$("trigger"),role:"button","aria-haspopup":"listbox","aria-expanded":N,"aria-label":Qe},W("trigger")),y.createElement("div",et,Ye)):function(){var e=p({className:$("dropdownIcon"),"data-pr-overlay-visible":N},W("dropdownIcon")),t=c.IconUtils.getJSXIcon(f.dropdownIcon||y.createElement(o.ChevronDownIcon,e),V({},e),{props:f}),n=f.placeholder||f.ariaLabel,r=p({className:$("trigger"),role:"button","aria-haspopup":"listbox","aria-expanded":N,"aria-label":n},W("trigger"));return y.createElement("div",r,t)}(),pt=function(){if(null!=f.value&&f.showClear&&!f.disabled){var e=p({className:$("clearIcon"),onPointerUp:Pe,tabIndex:f.tabIndex||"0",onKeyDown:tt,"aria-label":t.localeOption("clear")},W("clearIcon"));return c.IconUtils.getJSXIcon(f.clearIcon||y.createElement(i.TimesIcon,e),V({},e),{props:f})}return null}(),dt=p({id:f.id,ref:U,className:c.classNames(f.className,$("root",{context:d,focusedState:h,overlayVisibleState:N})),style:f.style,onClick:function(e){return t=e,void(f.disabled||f.loading||(f.onClick&&f.onClick(t),t.defaultPrevented||re(t)||"INPUT"===t.target.tagName||(R.current&&R.current&&R.current.contains(t.target)||(c.DomHandler.focus(q.current),N?Ae():Ge()),P.current=!0)));var t},onMouseDown:f.onMouseDown,onContextMenu:f.onContextMenu,onFocus:function(){f.editable&&!N&&!1===P.current&&c.DomHandler.focus(A.current)},"data-p-disabled":f.disabled,"data-p-focus":h},lt,W("root")),ft=p({ref:T,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:function(e){var t=e.relatedTarget===q.current?c.DomHandler.getFirstFocusableElement(R.current,':not([data-p-hidden-focusable="true"])'):q.current;c.DomHandler.focus(t)},"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},W("hiddenFirstFocusableEl")),mt=p({ref:G,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:function(e){var t=e.relatedTarget===q.current?c.DomHandler.getLastFocusableElement(R.current,':not([data-p-hidden-focusable="true"])'):q.current;c.DomHandler.focus(t)},"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},W("hiddenLastFocusableEl"));return y.createElement(y.Fragment,null,y.createElement("div",dt,ut,at,ct,pt,st,y.createElement(M,O({hostName:"Dropdown",ref:R,visibleOptions:nt,virtualScrollerRef:K},f,{appendTo:z,cx:$,filterValue:v,focusedOptionIndex:D,getOptionGroupChildren:ze,getOptionGroupLabel:function(e){return c.ObjectUtils.resolveFieldData(e,f.optionGroupLabel)},getOptionGroupRenderKey:function(e){return c.ObjectUtils.resolveFieldData(e,f.optionGroupLabel)},getOptionLabel:Be,getOptionRenderKey:function(e){return f.dataKey?c.ObjectUtils.resolveFieldData(e,f.dataKey):Be(e)},getSelectedOptionIndex:Re,hasFilter:X,in:N,isOptionDisabled:Xe,isSelected:He,onClick:function(e){a.OverlayService.emit("overlay-click",{originalEvent:e,target:U.current})},onEnter:function(e){c.ZIndexUtils.set("overlay",R.current,d&&d.autoZIndex||w.default.autoZIndex,d&&d.zIndex.overlay||w.default.zIndex.overlay),c.DomHandler.addStyles(R.current,{position:"absolute",top:"0",left:"0"}),qe(),e&&e()},onEntered:function(e){e&&e(),ee(),f.onShow&&f.onShow()},onExit:function(){te()},onExited:function(){f.filter&&f.resetFilterOnHide&&Le(),c.ZIndexUtils.clear(R.current),f.onHide&&f.onHide()},onFilterClearIconClick:function(e){Le(e)},onFilterInputChange:function(e){var t=e.target.value;b(t),f.onFilter&&f.onFilter({originalEvent:e,filter:t})},onFilterInputKeyDown:function(e){switch(e.code){case"ArrowDown":he(e);break;case"ArrowUp":ye(e);break;case"ArrowLeft":case"ArrowRight":we(e,!0);break;case"Escape":case"Enter":case"NumpadEnter":De(e),e.preventDefault()}},onOptionClick:function(e){e.option.disabled||(Ue(e),c.DomHandler.focus(q.current)),Ae()},ptm:W,resetFilter:Le,changeFocusedOptionIndex:ge,firstFocusableElement:y.createElement("span",ft),lastFocusableElement:y.createElement("span",mt),sx:Y}))),ot&&y.createElement(u.Tooltip,O({target:U,content:f.tooltip,pt:W("tooltip")},f.tooltipOptions)))})));K.displayName="Dropdown",exports.Dropdown=K;
|
package/dropdown/dropdown.d.ts
CHANGED
|
@@ -249,7 +249,7 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
249
249
|
* When present, it specifies that the component should automatically get focus on load.
|
|
250
250
|
* @defaultValue false
|
|
251
251
|
*/
|
|
252
|
-
autoFocus?: boolean
|
|
252
|
+
autoFocus?: boolean;
|
|
253
253
|
/**
|
|
254
254
|
* Style class of the component.
|
|
255
255
|
*/
|
|
@@ -266,12 +266,17 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
266
266
|
* When present, it specifies that the component should have invalid state style.
|
|
267
267
|
* @defaultValue false
|
|
268
268
|
*/
|
|
269
|
-
invalid?: boolean
|
|
269
|
+
invalid?: boolean;
|
|
270
270
|
/**
|
|
271
271
|
* When present, it specifies that the component should be disabled.
|
|
272
272
|
* @defaultValue false
|
|
273
273
|
*/
|
|
274
|
-
disabled?: boolean
|
|
274
|
+
disabled?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Specifies the input variant of the component.
|
|
277
|
+
* @defaultValue outlined
|
|
278
|
+
*/
|
|
279
|
+
variant?: 'outlined' | 'filled' | undefined;
|
|
275
280
|
/**
|
|
276
281
|
* Icon of the dropdown.
|
|
277
282
|
*/
|
|
@@ -280,17 +285,17 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
280
285
|
* When present, custom value instead of predefined options can be entered using the editable input field.
|
|
281
286
|
* @defaultValue false
|
|
282
287
|
*/
|
|
283
|
-
editable?: boolean
|
|
288
|
+
editable?: boolean;
|
|
284
289
|
/**
|
|
285
290
|
* Whether the selected option will be add highlight class.
|
|
286
291
|
* @defaultValue true
|
|
287
292
|
*/
|
|
288
|
-
highlightOnSelect?: boolean
|
|
293
|
+
highlightOnSelect?: boolean;
|
|
289
294
|
/**
|
|
290
295
|
* Whether the selected option will be shown with a check mark.
|
|
291
296
|
* @defaultValue false
|
|
292
297
|
*/
|
|
293
|
-
checkmark?: boolean
|
|
298
|
+
checkmark?: boolean;
|
|
294
299
|
/**
|
|
295
300
|
* Template to display when filtering does not return any results.
|
|
296
301
|
* @defaultValue No available options
|
|
@@ -305,7 +310,7 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
305
310
|
* When specified, displays an input field to filter the items on keyup.
|
|
306
311
|
* @defaultValue false
|
|
307
312
|
*/
|
|
308
|
-
filter?: boolean
|
|
313
|
+
filter?: boolean;
|
|
309
314
|
/**
|
|
310
315
|
* Icon of the filter to search.
|
|
311
316
|
*/
|
|
@@ -321,9 +326,9 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
321
326
|
filterClearIcon?: IconType<DropdownProps> | undefined;
|
|
322
327
|
/**
|
|
323
328
|
* When the panel is opened, it specifies that the filter input should focus automatically.
|
|
324
|
-
* @defaultValue
|
|
329
|
+
* @defaultValue false
|
|
325
330
|
*/
|
|
326
|
-
filterInputAutoFocus?: boolean
|
|
331
|
+
filterInputAutoFocus?: boolean;
|
|
327
332
|
/**
|
|
328
333
|
* Locale to use in filtering. The default locale is the host environment's current locale.
|
|
329
334
|
*/
|
|
@@ -354,17 +359,17 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
354
359
|
* When enabled, the focused tab is activated.
|
|
355
360
|
* @defaultValue false
|
|
356
361
|
*/
|
|
357
|
-
selectOnFocus?:
|
|
362
|
+
selectOnFocus?: boolean;
|
|
358
363
|
/**
|
|
359
364
|
* When enabled, the focus is placed on the hovered option.
|
|
360
365
|
* @defaultValue true
|
|
361
366
|
*/
|
|
362
|
-
focusOnHover?: boolean
|
|
367
|
+
focusOnHover?: boolean;
|
|
363
368
|
/**
|
|
364
369
|
* Whether to focus on the first visible or selected element.
|
|
365
370
|
* @defaultValue false
|
|
366
371
|
*/
|
|
367
|
-
autoOptionFocus?:
|
|
372
|
+
autoOptionFocus?: boolean;
|
|
368
373
|
/**
|
|
369
374
|
* Identifier of the focusable input.
|
|
370
375
|
*/
|
|
@@ -381,7 +386,7 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
381
386
|
* Displays a loader to indicate data load is in progress.
|
|
382
387
|
* @defaultValue false
|
|
383
388
|
*/
|
|
384
|
-
loading?: boolean
|
|
389
|
+
loading?: boolean;
|
|
385
390
|
/**
|
|
386
391
|
* The icon to show while indicating data load is in progress.
|
|
387
392
|
*/
|
|
@@ -444,12 +449,12 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
444
449
|
* When present, it specifies that an input field must be filled out before submitting the form.
|
|
445
450
|
* @defaultValue false
|
|
446
451
|
*/
|
|
447
|
-
required?: boolean
|
|
452
|
+
required?: boolean;
|
|
448
453
|
/**
|
|
449
454
|
* Clears the filter value when hiding the dropdown.
|
|
450
455
|
* @defaultValue false
|
|
451
456
|
*/
|
|
452
|
-
resetFilterOnHide?: boolean
|
|
457
|
+
resetFilterOnHide?: boolean;
|
|
453
458
|
/**
|
|
454
459
|
* Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
|
|
455
460
|
* @defaultValue 200px
|
|
@@ -459,17 +464,17 @@ export interface DropdownProps extends Omit<React.DetailedHTMLProps<React.InputH
|
|
|
459
464
|
* When enabled, a clear icon is displayed to clear the value.
|
|
460
465
|
* @defaultValue false
|
|
461
466
|
*/
|
|
462
|
-
showClear?: boolean
|
|
467
|
+
showClear?: boolean;
|
|
463
468
|
/**
|
|
464
469
|
* When enabled, a clear icon is displayed to clear the filtered value.
|
|
465
470
|
* @defaultValue false
|
|
466
471
|
*/
|
|
467
|
-
showFilterClear?: boolean
|
|
472
|
+
showFilterClear?: boolean;
|
|
468
473
|
/**
|
|
469
474
|
* When enabled, overlay panel will be visible with input focus.
|
|
470
475
|
* @defaultValue false
|
|
471
476
|
*/
|
|
472
|
-
showOnFocus?: boolean
|
|
477
|
+
showOnFocus?: boolean;
|
|
473
478
|
/**
|
|
474
479
|
* Inline style of the element.
|
|
475
480
|
*/
|