primevue 3.12.4 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/accordion/accordion.cjs.js +18 -16
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +20 -18
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +19 -17
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/accordiontab.esm.js +1 -1
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +1 -1
- package/api/api.js +1 -1
- package/autocomplete/AutoComplete.d.ts +5 -0
- package/autocomplete/AutoComplete.vue +15 -12
- package/autocomplete/autocomplete.cjs.js +165 -154
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +163 -153
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +166 -156
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/avatar.cjs.js +9 -6
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +11 -8
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +10 -7
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/avatargroup.cjs.js +1 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +3 -3
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +2 -2
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/badge.cjs.js +3 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +5 -3
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +4 -2
- package/badge/badge.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/blockui/blockui.cjs.js +1 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +3 -3
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +2 -2
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +25 -23
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +27 -25
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +26 -24
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/button.cjs.js +13 -12
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +14 -13
- package/button/button.esm.min.js +1 -1
- package/button/button.js +14 -13
- package/button/button.min.js +1 -1
- package/calendar/Calendar.vue +22 -17
- package/calendar/calendar.cjs.js +464 -429
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +463 -429
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +465 -431
- package/calendar/calendar.min.js +1 -1
- package/card/card.cjs.js +7 -7
- package/card/card.cjs.min.js +1 -1
- package/card/card.esm.js +9 -9
- package/card/card.esm.min.js +1 -1
- package/card/card.js +8 -8
- package/card/card.min.js +1 -1
- package/carousel/Carousel.vue +1 -1
- package/carousel/carousel.cjs.js +57 -49
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +58 -50
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +58 -50
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.vue +7 -11
- package/cascadeselect/cascadeselect.cjs.js +80 -75
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +79 -75
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +81 -77
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/chart.cjs.js +7 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +7 -6
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +6 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/checkbox.cjs.js +16 -14
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +18 -16
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +17 -15
- package/checkbox/checkbox.min.js +1 -1
- package/chip/chip.cjs.js +13 -12
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +15 -14
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +14 -13
- package/chip/chip.min.js +1 -1
- package/chips/chips.cjs.js +22 -20
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +24 -22
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +23 -21
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.vue +9 -11
- package/colorpicker/colorpicker.cjs.js +74 -72
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +74 -73
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +75 -74
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +4 -0
- package/column/column.esm.js +1 -1
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -1
- package/columngroup/columngroup.esm.js +1 -1
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -1
- package/config/config.cjs.js +1 -1
- package/config/config.esm.js +1 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +2 -2
- package/confirmationeventbus/confirmationeventbus.esm.js +1 -1
- package/confirmationeventbus/confirmationeventbus.esm.min.js +1 -1
- package/confirmationeventbus/confirmationeventbus.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +8 -0
- package/confirmationservice/confirmationservice.cjs.js +2 -2
- package/confirmationservice/confirmationservice.esm.js +1 -1
- package/confirmationservice/confirmationservice.esm.min.js +1 -1
- package/confirmationservice/confirmationservice.js +3 -3
- package/confirmdialog/confirmdialog.cjs.js +15 -13
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +11 -9
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +16 -14
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.vue +6 -4
- package/confirmpopup/confirmpopup.cjs.js +62 -53
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +58 -50
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +63 -55
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.vue +6 -4
- package/contextmenu/contextmenu.cjs.js +68 -58
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +68 -59
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +69 -60
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +780 -642
- package/core/core.min.js +19 -14
- package/datatable/ColumnFilter.vue +6 -4
- package/datatable/DataTable.d.ts +5 -2
- package/datatable/DataTable.vue +17 -7
- package/datatable/HeaderCell.vue +6 -1
- package/datatable/TableBody.vue +1 -6
- package/datatable/TableHeader.vue +5 -1
- package/datatable/datatable.cjs.js +509 -470
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +499 -461
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +510 -472
- package/datatable/datatable.min.js +1 -1
- package/dataview/dataview.cjs.js +16 -14
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +17 -15
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +17 -15
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +17 -15
- package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +19 -17
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +18 -16
- package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
- package/deferredcontent/deferredcontent.cjs.js +1 -1
- package/deferredcontent/deferredcontent.cjs.min.js +1 -1
- package/deferredcontent/deferredcontent.esm.js +3 -3
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +2 -2
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/Dialog.vue +6 -8
- package/dialog/dialog.cjs.js +113 -107
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +113 -108
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +114 -109
- package/dialog/dialog.min.js +1 -1
- package/divider/divider.cjs.js +3 -3
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +5 -5
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +4 -4
- package/divider/divider.min.js +1 -1
- package/dock/dock.cjs.js +26 -23
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +26 -23
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +27 -24
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.vue +13 -15
- package/dropdown/dropdown.cjs.js +187 -179
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +186 -179
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +188 -181
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +22 -22
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +23 -23
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +23 -23
- package/editor/editor.min.js +1 -1
- package/fieldset/fieldset.cjs.js +22 -17
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +23 -18
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +23 -18
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +12 -0
- package/fileupload/FileUpload.vue +21 -7
- package/fileupload/fileupload.cjs.js +85 -65
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +83 -63
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +86 -66
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.cjs.js +1 -31
- package/fullcalendar/fullcalendar.cjs.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +3 -33
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +2 -32
- package/fullcalendar/fullcalendar.min.js +1 -1
- package/galleria/Galleria.vue +5 -3
- package/galleria/galleria.cjs.js +130 -112
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +128 -111
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +131 -114
- package/galleria/galleria.min.js +1 -1
- package/image/Image.vue +6 -2
- package/image/image.cjs.js +105 -84
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +103 -86
- package/image/image.esm.min.js +1 -1
- package/image/image.js +106 -86
- package/image/image.min.js +1 -1
- package/inlinemessage/inlinemessage.cjs.js +6 -4
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +8 -6
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +7 -5
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/inplace.cjs.js +12 -9
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +13 -10
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +13 -10
- package/inplace/inplace.min.js +1 -1
- package/inputmask/inputmask.cjs.js +7 -7
- package/inputmask/inputmask.cjs.min.js +1 -1
- package/inputmask/inputmask.esm.js +9 -9
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +8 -8
- package/inputmask/inputmask.min.js +1 -1
- package/inputnumber/InputNumber.d.ts +4 -0
- package/inputnumber/InputNumber.vue +22 -3
- package/inputnumber/inputnumber.cjs.js +29 -9
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +29 -9
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +30 -10
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/inputswitch.cjs.js +13 -12
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +15 -14
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +14 -13
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +2 -2
- package/inputtext/InputText.vue +1 -0
- package/inputtext/inputtext.cjs.js +6 -3
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +8 -5
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +7 -4
- package/inputtext/inputtext.min.js +1 -1
- package/knob/knob.cjs.js +21 -14
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +23 -16
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +22 -15
- package/knob/knob.min.js +1 -1
- package/listbox/listbox.cjs.js +37 -34
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +37 -34
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +38 -35
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +73 -66
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +74 -67
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +74 -67
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +0 -1
- package/menu/Menu.vue +10 -5
- package/menu/menu.cjs.js +113 -101
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +112 -101
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +114 -103
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +47 -40
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +48 -41
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +48 -41
- package/menubar/menubar.min.js +1 -1
- package/message/message.cjs.js +15 -12
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +16 -13
- package/message/message.esm.min.js +1 -1
- package/message/message.js +16 -13
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.vue +11 -15
- package/multiselect/multiselect.cjs.js +255 -245
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +254 -245
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +256 -247
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/orderlist.cjs.js +15 -12
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +15 -12
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +16 -13
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/organizationchart.cjs.js +42 -37
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +44 -39
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +43 -38
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlayeventbus/overlayeventbus.esm.js +1 -1
- package/overlayeventbus/overlayeventbus.esm.min.js +1 -1
- package/overlayeventbus/overlayeventbus.js +1 -1
- package/overlaypanel/OverlayPanel.vue +7 -3
- package/overlaypanel/overlaypanel.cjs.js +60 -49
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +56 -46
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +61 -51
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +59 -54
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +53 -48
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +60 -55
- package/paginator/paginator.min.js +1 -1
- package/panel/panel.cjs.js +21 -16
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +22 -17
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +22 -17
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenuSub.vue +1 -1
- package/panelmenu/panelmenu.cjs.js +62 -57
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +64 -59
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +63 -58
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +2 -2
- package/password/Password.vue +8 -12
- package/password/password.cjs.js +49 -51
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +49 -52
- package/password/password.esm.min.js +1 -1
- package/password/password.js +50 -53
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +38 -34
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +38 -34
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +39 -35
- package/picklist/picklist.min.js +1 -1
- package/portal/Portal.d.ts +36 -0
- package/portal/Portal.vue +41 -0
- package/portal/package.json +9 -0
- package/portal/portal.cjs.js +48 -0
- package/portal/portal.cjs.min.js +1 -0
- package/portal/portal.esm.js +46 -0
- package/portal/portal.esm.min.js +1 -0
- package/portal/portal.js +49 -0
- package/portal/portal.min.js +1 -0
- package/progressbar/progressbar.cjs.js +14 -12
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +16 -14
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +15 -13
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.vue +3 -3
- package/progressspinner/progressspinner.cjs.js +7 -6
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +9 -8
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +8 -7
- package/progressspinner/progressspinner.min.js +1 -1
- package/radiobutton/RadioButton.vue +3 -3
- package/radiobutton/radiobutton.cjs.js +18 -15
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +20 -17
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +19 -16
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/rating.cjs.js +13 -8
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +15 -10
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +14 -9
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +0 -4
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +15 -2
- package/resources/themes/arya-green/theme.css +15 -2
- package/resources/themes/arya-orange/theme.css +15 -2
- package/resources/themes/arya-purple/theme.css +15 -2
- package/resources/themes/bootstrap4-dark-blue/theme.css +15 -2
- package/resources/themes/bootstrap4-dark-purple/theme.css +15 -2
- package/resources/themes/bootstrap4-light-blue/theme.css +14 -1
- package/resources/themes/bootstrap4-light-purple/theme.css +14 -1
- package/resources/themes/fluent-light/theme.css +15 -2
- package/resources/themes/lara-dark-blue/theme.css +15 -2
- package/resources/themes/lara-dark-indigo/theme.css +15 -2
- package/resources/themes/lara-dark-purple/theme.css +15 -2
- package/resources/themes/lara-dark-teal/theme.css +15 -2
- package/resources/themes/lara-light-blue/theme.css +15 -2
- package/resources/themes/lara-light-indigo/theme.css +15 -2
- package/resources/themes/lara-light-purple/theme.css +15 -2
- package/resources/themes/lara-light-teal/theme.css +15 -2
- package/resources/themes/luna-amber/theme.css +15 -2
- package/resources/themes/luna-blue/theme.css +15 -2
- package/resources/themes/luna-green/theme.css +15 -2
- package/resources/themes/luna-pink/theme.css +15 -2
- package/resources/themes/md-dark-deeppurple/theme.css +16 -5
- package/resources/themes/md-dark-indigo/theme.css +16 -5
- package/resources/themes/md-light-deeppurple/theme.css +16 -5
- package/resources/themes/md-light-indigo/theme.css +16 -5
- package/resources/themes/mdc-dark-deeppurple/theme.css +16 -5
- package/resources/themes/mdc-dark-indigo/theme.css +16 -5
- package/resources/themes/mdc-light-deeppurple/theme.css +16 -5
- package/resources/themes/mdc-light-indigo/theme.css +16 -5
- package/resources/themes/nova/theme.css +15 -2
- package/resources/themes/nova-accent/theme.css +15 -2
- package/resources/themes/nova-alt/theme.css +15 -2
- package/resources/themes/nova-vue/theme.css +15 -2
- package/resources/themes/rhea/theme.css +15 -2
- package/resources/themes/saga-blue/theme.css +15 -2
- package/resources/themes/saga-green/theme.css +15 -2
- package/resources/themes/saga-orange/theme.css +15 -2
- package/resources/themes/saga-purple/theme.css +15 -2
- package/resources/themes/tailwind-light/theme.css +15 -2
- package/resources/themes/vela-blue/theme.css +15 -2
- package/resources/themes/vela-green/theme.css +15 -2
- package/resources/themes/vela-orange/theme.css +15 -2
- package/resources/themes/vela-purple/theme.css +15 -2
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -1
- package/row/row.esm.js +1 -1
- package/row/row.esm.min.js +1 -1
- package/row/row.js +1 -1
- package/scrollpanel/scrollpanel.cjs.js +9 -9
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +11 -11
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +10 -10
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/scrolltop.cjs.js +6 -4
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +8 -6
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +7 -5
- package/scrolltop/scrolltop.min.js +1 -1
- package/selectbutton/selectbutton.cjs.js +12 -11
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +13 -12
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +13 -12
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +4 -0
- package/sidebar/Sidebar.vue +9 -2
- package/sidebar/sidebar.cjs.js +66 -45
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +66 -46
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +67 -47
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/skeleton.cjs.js +3 -3
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +5 -5
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +4 -4
- package/skeleton/skeleton.min.js +1 -1
- package/slider/Slider.vue +1 -1
- package/slider/slider.cjs.js +34 -30
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +36 -32
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +35 -31
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +23 -21
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +22 -20
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +24 -22
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/splitbutton.cjs.js +7 -9
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +7 -9
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +8 -10
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/splitter.cjs.js +13 -9
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +15 -11
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +14 -10
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/splitterpanel.cjs.js +2 -2
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +4 -4
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +3 -3
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/Steps.vue +1 -4
- package/steps/steps.cjs.js +29 -29
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +31 -31
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +30 -30
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.esm.js +1 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +1 -1
- package/tabmenu/TabMenu.vue +3 -3
- package/tabmenu/tabmenu.cjs.js +26 -24
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +27 -25
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +27 -25
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/tabpanel.esm.js +1 -1
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +1 -1
- package/tabview/tabview.cjs.js +41 -36
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +42 -37
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +42 -37
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.cjs.js +4 -4
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +6 -6
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +5 -5
- package/tag/tag.min.js +1 -1
- package/terminal/terminal.cjs.js +17 -17
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +16 -16
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +18 -18
- package/terminal/terminal.min.js +1 -1
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +1 -1
- package/textarea/Textarea.vue +2 -1
- package/textarea/textarea.cjs.js +7 -4
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +9 -6
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +8 -5
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +0 -1
- package/tieredmenu/TieredMenu.vue +6 -4
- package/tieredmenu/tieredmenu.cjs.js +74 -64
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +73 -64
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +75 -66
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +1 -1
- package/timeline/timeline.cjs.js +10 -8
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +12 -10
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +11 -9
- package/timeline/timeline.min.js +1 -1
- package/toast/Toast.vue +7 -5
- package/toast/toast.cjs.js +59 -49
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +54 -45
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +60 -51
- package/toast/toast.min.js +1 -1
- package/toasteventbus/toasteventbus.esm.js +1 -1
- package/toasteventbus/toasteventbus.esm.min.js +1 -1
- package/toasteventbus/toasteventbus.js +1 -1
- package/toastservice/toastservice.cjs.js +3 -3
- package/toastservice/toastservice.esm.js +1 -1
- package/toastservice/toastservice.esm.min.js +1 -1
- package/toastservice/toastservice.js +4 -4
- package/togglebutton/togglebutton.cjs.js +10 -9
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +11 -10
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +11 -10
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.vue +2 -2
- package/toolbar/toolbar.cjs.js +3 -3
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +5 -5
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +4 -4
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +7 -1
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +8 -2
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +8 -2
- package/tooltip/tooltip.min.js +1 -1
- package/tree/TreeNode.vue +1 -4
- package/tree/tree.cjs.js +57 -45
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +58 -46
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +58 -46
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.vue +7 -11
- package/treeselect/treeselect.cjs.js +92 -91
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +91 -91
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +93 -93
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/FooterCell.vue +1 -1
- package/treetable/TreeTable.d.ts +1 -1
- package/treetable/TreeTableRow.vue +2 -2
- package/treetable/treetable.cjs.js +97 -88
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +97 -88
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +98 -89
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.vue +3 -3
- package/tristatecheckbox/tristatecheckbox.cjs.js +16 -14
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +18 -16
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +17 -15
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/useconfirm/useconfirm.js +1 -1
- package/usetoast/usetoast.js +1 -1
- package/utils/Utils.d.ts +1 -0
- package/utils/utils.cjs.js +4 -0
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +4 -0
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +5 -1
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +32 -4
- package/vetur-tags.json +12 -0
- package/virtualscroller/virtualscroller.cjs.js +15 -15
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +17 -17
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +16 -16
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +96 -6
package/dropdown/dropdown.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
this.primevue = this.primevue || {};
|
|
2
|
-
this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, VirtualScroller, vue) {
|
|
2
|
+
this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, VirtualScroller, Portal, vue) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -7,6 +7,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
7
7
|
var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBus);
|
|
8
8
|
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
9
9
|
var VirtualScroller__default = /*#__PURE__*/_interopDefaultLegacy(VirtualScroller);
|
|
10
|
+
var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
|
|
10
11
|
|
|
11
12
|
var script = {
|
|
12
13
|
name: 'Dropdown',
|
|
@@ -124,8 +125,8 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
124
125
|
getOptionValue(option) {
|
|
125
126
|
return this.optionValue ? utils.ObjectUtils.resolveFieldData(option, this.optionValue) : option;
|
|
126
127
|
},
|
|
127
|
-
getOptionRenderKey(option) {
|
|
128
|
-
return this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option);
|
|
128
|
+
getOptionRenderKey(option, index) {
|
|
129
|
+
return this.dataKey ? utils.ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option) + '_' + index.toString();
|
|
129
130
|
},
|
|
130
131
|
isOptionDisabled(option) {
|
|
131
132
|
return this.optionDisabled ? utils.ObjectUtils.resolveFieldData(option, this.optionDisabled) : false;
|
|
@@ -172,9 +173,11 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
172
173
|
isSelected(option) {
|
|
173
174
|
return utils.ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
|
|
174
175
|
},
|
|
175
|
-
show() {
|
|
176
|
+
show(isFocus) {
|
|
176
177
|
this.$emit('before-show');
|
|
177
178
|
this.overlayVisible = true;
|
|
179
|
+
|
|
180
|
+
isFocus && this.$refs.focusInput.focus();
|
|
178
181
|
},
|
|
179
182
|
hide() {
|
|
180
183
|
this.$emit('before-hide');
|
|
@@ -403,7 +406,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
403
406
|
utils.ZIndexUtils.clear(el);
|
|
404
407
|
},
|
|
405
408
|
alignOverlay() {
|
|
406
|
-
if (this.
|
|
409
|
+
if (this.appendTo === 'self') {
|
|
407
410
|
utils.DomHandler.relativePosition(this.overlay, this.$el);
|
|
408
411
|
}
|
|
409
412
|
else {
|
|
@@ -570,7 +573,7 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
570
573
|
}
|
|
571
574
|
},
|
|
572
575
|
onOverlayClick(event) {
|
|
573
|
-
OverlayEventBus__default[
|
|
576
|
+
OverlayEventBus__default["default"].emit('overlay-click', {
|
|
574
577
|
originalEvent: event,
|
|
575
578
|
target: this.$el
|
|
576
579
|
});
|
|
@@ -652,88 +655,90 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
652
655
|
emptyMessageText() {
|
|
653
656
|
return this.emptyMessage || this.$primevue.config.locale.emptyMessage;
|
|
654
657
|
},
|
|
655
|
-
appendDisabled() {
|
|
656
|
-
return this.appendTo === 'self';
|
|
657
|
-
},
|
|
658
658
|
virtualScrollerDisabled() {
|
|
659
659
|
return !this.virtualScrollerOptions;
|
|
660
660
|
},
|
|
661
|
-
appendTarget() {
|
|
662
|
-
return this.appendDisabled ? null : this.appendTo;
|
|
663
|
-
},
|
|
664
661
|
dropdownIconClass() {
|
|
665
662
|
return ['p-dropdown-trigger-icon', this.loading ? this.loadingIcon : 'pi pi-chevron-down'];
|
|
666
663
|
}
|
|
667
664
|
},
|
|
668
665
|
directives: {
|
|
669
|
-
'ripple': Ripple__default[
|
|
666
|
+
'ripple': Ripple__default["default"]
|
|
670
667
|
},
|
|
671
668
|
components: {
|
|
672
|
-
'VirtualScroller': VirtualScroller__default[
|
|
669
|
+
'VirtualScroller': VirtualScroller__default["default"],
|
|
670
|
+
'Portal': Portal__default["default"]
|
|
673
671
|
}
|
|
674
672
|
};
|
|
675
673
|
|
|
676
674
|
const _hoisted_1 = { class: "p-hidden-accessible" };
|
|
677
|
-
const _hoisted_2 =
|
|
675
|
+
const _hoisted_2 = ["id", "disabled", "tabindex", "aria-expanded", "aria-labelledby"];
|
|
676
|
+
const _hoisted_3 = ["disabled", "placeholder", "value", "aria-expanded"];
|
|
677
|
+
const _hoisted_4 = ["aria-expanded"];
|
|
678
|
+
const _hoisted_5 = {
|
|
678
679
|
key: 0,
|
|
679
680
|
class: "p-dropdown-header"
|
|
680
681
|
};
|
|
681
|
-
const
|
|
682
|
-
const
|
|
683
|
-
const
|
|
684
|
-
const
|
|
682
|
+
const _hoisted_6 = { class: "p-dropdown-filter-container" };
|
|
683
|
+
const _hoisted_7 = ["value", "placeholder"];
|
|
684
|
+
const _hoisted_8 = /*#__PURE__*/vue.createElementVNode("span", { class: "p-dropdown-filter-icon pi pi-search" }, null, -1);
|
|
685
|
+
const _hoisted_9 = ["onClick", "aria-label", "aria-selected"];
|
|
686
|
+
const _hoisted_10 = { class: "p-dropdown-item-group" };
|
|
687
|
+
const _hoisted_11 = ["onClick", "aria-label", "aria-selected"];
|
|
688
|
+
const _hoisted_12 = {
|
|
685
689
|
key: 2,
|
|
686
690
|
class: "p-dropdown-empty-message"
|
|
687
691
|
};
|
|
688
|
-
const
|
|
692
|
+
const _hoisted_13 = {
|
|
689
693
|
key: 3,
|
|
690
694
|
class: "p-dropdown-empty-message"
|
|
691
695
|
};
|
|
692
696
|
|
|
693
697
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
694
698
|
const _component_VirtualScroller = vue.resolveComponent("VirtualScroller");
|
|
699
|
+
const _component_Portal = vue.resolveComponent("Portal");
|
|
695
700
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
696
701
|
|
|
697
|
-
return (vue.openBlock(), vue.
|
|
702
|
+
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
698
703
|
ref: "container",
|
|
699
|
-
class: $options.containerClass,
|
|
700
|
-
onClick: _cache[
|
|
704
|
+
class: vue.normalizeClass($options.containerClass),
|
|
705
|
+
onClick: _cache[11] || (_cache[11] = $event => ($options.onClick($event)))
|
|
701
706
|
}, [
|
|
702
|
-
vue.
|
|
703
|
-
vue.
|
|
707
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
708
|
+
vue.createElementVNode("input", {
|
|
704
709
|
ref: "focusInput",
|
|
705
710
|
type: "text",
|
|
706
711
|
id: $props.inputId,
|
|
707
712
|
readonly: "",
|
|
708
713
|
disabled: $props.disabled,
|
|
709
|
-
onFocus: _cache[
|
|
710
|
-
onBlur: _cache[
|
|
711
|
-
onKeydown: _cache[
|
|
714
|
+
onFocus: _cache[0] || (_cache[0] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
715
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
716
|
+
onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onKeyDown && $options.onKeyDown(...args))),
|
|
712
717
|
tabindex: $props.tabindex,
|
|
713
718
|
"aria-haspopup": "true",
|
|
714
719
|
"aria-expanded": $data.overlayVisible,
|
|
715
720
|
"aria-labelledby": $props.ariaLabelledBy
|
|
716
|
-
}, null, 40,
|
|
721
|
+
}, null, 40, _hoisted_2)
|
|
717
722
|
]),
|
|
718
723
|
($props.editable)
|
|
719
|
-
? (vue.openBlock(), vue.
|
|
724
|
+
? (vue.openBlock(), vue.createElementBlock("input", {
|
|
720
725
|
key: 0,
|
|
721
726
|
type: "text",
|
|
722
727
|
class: "p-dropdown-label p-inputtext",
|
|
723
728
|
disabled: $props.disabled,
|
|
724
|
-
onFocus: _cache[
|
|
725
|
-
onBlur: _cache[
|
|
729
|
+
onFocus: _cache[3] || (_cache[3] = (...args) => ($options.onFocus && $options.onFocus(...args))),
|
|
730
|
+
onBlur: _cache[4] || (_cache[4] = (...args) => ($options.onBlur && $options.onBlur(...args))),
|
|
726
731
|
placeholder: $props.placeholder,
|
|
727
732
|
value: $options.editableInputValue,
|
|
728
|
-
onInput: _cache[
|
|
733
|
+
onInput: _cache[5] || (_cache[5] = (...args) => ($options.onEditableInput && $options.onEditableInput(...args))),
|
|
729
734
|
"aria-haspopup": "listbox",
|
|
730
735
|
"aria-expanded": $data.overlayVisible
|
|
731
|
-
}, null, 40,
|
|
736
|
+
}, null, 40, _hoisted_3))
|
|
732
737
|
: vue.createCommentVNode("", true),
|
|
733
738
|
(!$props.editable)
|
|
734
|
-
? (vue.openBlock(), vue.
|
|
739
|
+
? (vue.openBlock(), vue.createElementBlock("span", {
|
|
735
740
|
key: 1,
|
|
736
|
-
class: $options.labelClass
|
|
741
|
+
class: vue.normalizeClass($options.labelClass)
|
|
737
742
|
}, [
|
|
738
743
|
vue.renderSlot(_ctx.$slots, "value", {
|
|
739
744
|
value: $props.modelValue,
|
|
@@ -744,170 +749,172 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
744
749
|
], 2))
|
|
745
750
|
: vue.createCommentVNode("", true),
|
|
746
751
|
($props.showClear && $props.modelValue != null)
|
|
747
|
-
? (vue.openBlock(), vue.
|
|
752
|
+
? (vue.openBlock(), vue.createElementBlock("i", {
|
|
748
753
|
key: 2,
|
|
749
754
|
class: "p-dropdown-clear-icon pi pi-times",
|
|
750
|
-
onClick: _cache[
|
|
755
|
+
onClick: _cache[6] || (_cache[6] = $event => ($options.onClearClick($event)))
|
|
751
756
|
}))
|
|
752
757
|
: vue.createCommentVNode("", true),
|
|
753
|
-
vue.
|
|
758
|
+
vue.createElementVNode("div", {
|
|
754
759
|
class: "p-dropdown-trigger",
|
|
755
760
|
role: "button",
|
|
756
761
|
"aria-haspopup": "listbox",
|
|
757
762
|
"aria-expanded": $data.overlayVisible
|
|
758
763
|
}, [
|
|
759
764
|
vue.renderSlot(_ctx.$slots, "indicator", {}, () => [
|
|
760
|
-
vue.
|
|
765
|
+
vue.createElementVNode("span", {
|
|
766
|
+
class: vue.normalizeClass($options.dropdownIconClass)
|
|
767
|
+
}, null, 2)
|
|
761
768
|
])
|
|
762
|
-
], 8,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
class: $options.panelStyleClass,
|
|
780
|
-
onClick: _cache[11] || (_cache[11] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
781
|
-
}, [
|
|
782
|
-
vue.renderSlot(_ctx.$slots, "header", {
|
|
783
|
-
value: $props.modelValue,
|
|
784
|
-
options: $options.visibleOptions
|
|
785
|
-
}),
|
|
786
|
-
($props.filter)
|
|
787
|
-
? (vue.openBlock(), vue.createBlock("div", _hoisted_2, [
|
|
788
|
-
vue.createVNode("div", _hoisted_3, [
|
|
789
|
-
vue.createVNode("input", {
|
|
790
|
-
type: "text",
|
|
791
|
-
ref: "filterInput",
|
|
792
|
-
value: $data.filterValue,
|
|
793
|
-
onVnodeUpdated: _cache[8] || (_cache[8] = (...args) => ($options.onFilterUpdated && $options.onFilterUpdated(...args))),
|
|
794
|
-
autoComplete: "off",
|
|
795
|
-
class: "p-dropdown-filter p-inputtext p-component",
|
|
796
|
-
placeholder: $props.filterPlaceholder,
|
|
797
|
-
onKeydown: _cache[9] || (_cache[9] = (...args) => ($options.onFilterKeyDown && $options.onFilterKeyDown(...args))),
|
|
798
|
-
onInput: _cache[10] || (_cache[10] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
799
|
-
}, null, 40, ["value", "placeholder"]),
|
|
800
|
-
_hoisted_4
|
|
801
|
-
])
|
|
802
|
-
]))
|
|
803
|
-
: vue.createCommentVNode("", true),
|
|
804
|
-
vue.createVNode("div", {
|
|
805
|
-
ref: $options.itemsWrapperRef,
|
|
806
|
-
class: "p-dropdown-items-wrapper",
|
|
807
|
-
style: {'max-height': $options.virtualScrollerDisabled ? $props.scrollHeight : ''}
|
|
769
|
+
], 8, _hoisted_4),
|
|
770
|
+
vue.createVNode(_component_Portal, { appendTo: $props.appendTo }, {
|
|
771
|
+
default: vue.withCtx(() => [
|
|
772
|
+
vue.createVNode(vue.Transition, {
|
|
773
|
+
name: "p-connected-overlay",
|
|
774
|
+
onEnter: $options.onOverlayEnter,
|
|
775
|
+
onAfterEnter: $options.onOverlayAfterEnter,
|
|
776
|
+
onLeave: $options.onOverlayLeave,
|
|
777
|
+
onAfterLeave: $options.onOverlayAfterLeave
|
|
778
|
+
}, {
|
|
779
|
+
default: vue.withCtx(() => [
|
|
780
|
+
($data.overlayVisible)
|
|
781
|
+
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
782
|
+
key: 0,
|
|
783
|
+
ref: $options.overlayRef,
|
|
784
|
+
class: vue.normalizeClass($options.panelStyleClass),
|
|
785
|
+
onClick: _cache[10] || (_cache[10] = (...args) => ($options.onOverlayClick && $options.onOverlayClick(...args)))
|
|
808
786
|
}, [
|
|
809
|
-
vue.
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
787
|
+
vue.renderSlot(_ctx.$slots, "header", {
|
|
788
|
+
value: $props.modelValue,
|
|
789
|
+
options: $options.visibleOptions
|
|
790
|
+
}),
|
|
791
|
+
($props.filter)
|
|
792
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
793
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
794
|
+
vue.createElementVNode("input", {
|
|
795
|
+
type: "text",
|
|
796
|
+
ref: "filterInput",
|
|
797
|
+
value: $data.filterValue,
|
|
798
|
+
onVnodeUpdated: _cache[7] || (_cache[7] = (...args) => ($options.onFilterUpdated && $options.onFilterUpdated(...args))),
|
|
799
|
+
autoComplete: "off",
|
|
800
|
+
class: "p-dropdown-filter p-inputtext p-component",
|
|
801
|
+
placeholder: $props.filterPlaceholder,
|
|
802
|
+
onKeydown: _cache[8] || (_cache[8] = (...args) => ($options.onFilterKeyDown && $options.onFilterKeyDown(...args))),
|
|
803
|
+
onInput: _cache[9] || (_cache[9] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
804
|
+
}, null, 40, _hoisted_7),
|
|
805
|
+
_hoisted_8
|
|
806
|
+
])
|
|
807
|
+
]))
|
|
808
|
+
: vue.createCommentVNode("", true),
|
|
809
|
+
vue.createElementVNode("div", {
|
|
810
|
+
ref: $options.itemsWrapperRef,
|
|
811
|
+
class: "p-dropdown-items-wrapper",
|
|
812
|
+
style: vue.normalizeStyle({'max-height': $options.virtualScrollerDisabled ? $props.scrollHeight : ''})
|
|
813
|
+
}, [
|
|
814
|
+
vue.createVNode(_component_VirtualScroller, vue.mergeProps({ ref: $options.virtualScrollerRef }, $props.virtualScrollerOptions, {
|
|
815
|
+
items: $options.visibleOptions,
|
|
816
|
+
style: {'height': $props.scrollHeight},
|
|
817
|
+
disabled: $options.virtualScrollerDisabled
|
|
818
|
+
}), vue.createSlots({
|
|
819
|
+
content: vue.withCtx(({ styleClass, contentRef, items, getItemOptions, contentStyle }) => [
|
|
820
|
+
vue.createElementVNode("ul", {
|
|
821
|
+
ref: contentRef,
|
|
822
|
+
class: vue.normalizeClass(['p-dropdown-items', styleClass]),
|
|
823
|
+
style: vue.normalizeStyle(contentStyle),
|
|
824
|
+
role: "listbox"
|
|
825
|
+
}, [
|
|
826
|
+
(!$props.optionGroupLabel)
|
|
827
|
+
? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(items, (option, i) => {
|
|
828
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
829
|
+
class: vue.normalizeClass(['p-dropdown-item', {'p-highlight': $options.isSelected(option), 'p-disabled': $options.isOptionDisabled(option)}]),
|
|
830
|
+
key: $options.getOptionRenderKey(option, i),
|
|
831
|
+
onClick: $event => ($options.onOptionSelect($event, option)),
|
|
832
|
+
role: "option",
|
|
833
|
+
"aria-label": $options.getOptionLabel(option),
|
|
834
|
+
"aria-selected": $options.isSelected(option)
|
|
835
|
+
}, [
|
|
836
|
+
vue.renderSlot(_ctx.$slots, "option", {
|
|
837
|
+
option: option,
|
|
848
838
|
index: $options.getOptionIndex(i, getItemOptions)
|
|
849
839
|
}, () => [
|
|
850
|
-
vue.createTextVNode(vue.toDisplayString($options.
|
|
840
|
+
vue.createTextVNode(vue.toDisplayString($options.getOptionLabel(option)), 1)
|
|
851
841
|
])
|
|
852
|
-
]),
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
option: option,
|
|
842
|
+
], 10, _hoisted_9)), [
|
|
843
|
+
[_directive_ripple]
|
|
844
|
+
])
|
|
845
|
+
}), 128))
|
|
846
|
+
: (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(items, (optionGroup, i) => {
|
|
847
|
+
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
848
|
+
key: $options.getOptionGroupRenderKey(optionGroup)
|
|
849
|
+
}, [
|
|
850
|
+
vue.createElementVNode("li", _hoisted_10, [
|
|
851
|
+
vue.renderSlot(_ctx.$slots, "optiongroup", {
|
|
852
|
+
option: optionGroup,
|
|
864
853
|
index: $options.getOptionIndex(i, getItemOptions)
|
|
865
854
|
}, () => [
|
|
866
|
-
vue.createTextVNode(vue.toDisplayString($options.
|
|
855
|
+
vue.createTextVNode(vue.toDisplayString($options.getOptionGroupLabel(optionGroup)), 1)
|
|
867
856
|
])
|
|
868
|
-
]
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
857
|
+
]),
|
|
858
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.getOptionGroupChildren(optionGroup), (option, i) => {
|
|
859
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", {
|
|
860
|
+
class: vue.normalizeClass(['p-dropdown-item', {'p-highlight': $options.isSelected(option), 'p-disabled': $options.isOptionDisabled(option)}]),
|
|
861
|
+
key: $options.getOptionRenderKey(option, i),
|
|
862
|
+
onClick: $event => ($options.onOptionSelect($event, option)),
|
|
863
|
+
role: "option",
|
|
864
|
+
"aria-label": $options.getOptionLabel(option),
|
|
865
|
+
"aria-selected": $options.isSelected(option)
|
|
866
|
+
}, [
|
|
867
|
+
vue.renderSlot(_ctx.$slots, "option", {
|
|
868
|
+
option: option,
|
|
869
|
+
index: $options.getOptionIndex(i, getItemOptions)
|
|
870
|
+
}, () => [
|
|
871
|
+
vue.createTextVNode(vue.toDisplayString($options.getOptionLabel(option)), 1)
|
|
872
|
+
])
|
|
873
|
+
], 10, _hoisted_11)), [
|
|
874
|
+
[_directive_ripple]
|
|
875
|
+
])
|
|
876
|
+
}), 128))
|
|
877
|
+
], 64))
|
|
878
|
+
}), 128)),
|
|
879
|
+
($data.filterValue && (!items || (items && items.length === 0)))
|
|
880
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_12, [
|
|
881
|
+
vue.renderSlot(_ctx.$slots, "emptyfilter", {}, () => [
|
|
882
|
+
vue.createTextVNode(vue.toDisplayString($options.emptyFilterMessageText), 1)
|
|
884
883
|
])
|
|
885
884
|
]))
|
|
886
|
-
:
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
885
|
+
: ((!$props.options || ($props.options && $props.options.length === 0)))
|
|
886
|
+
? (vue.openBlock(), vue.createElementBlock("li", _hoisted_13, [
|
|
887
|
+
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
888
|
+
vue.createTextVNode(vue.toDisplayString($options.emptyMessageText), 1)
|
|
889
|
+
])
|
|
890
|
+
]))
|
|
891
|
+
: vue.createCommentVNode("", true)
|
|
892
|
+
], 6)
|
|
893
|
+
]),
|
|
894
|
+
_: 2
|
|
895
|
+
}, [
|
|
896
|
+
(_ctx.$slots.loader)
|
|
897
|
+
? {
|
|
898
|
+
name: "loader",
|
|
899
|
+
fn: vue.withCtx(({ options }) => [
|
|
900
|
+
vue.renderSlot(_ctx.$slots, "loader", { options: options })
|
|
901
|
+
])
|
|
902
|
+
}
|
|
903
|
+
: undefined
|
|
904
|
+
]), 1040, ["items", "style", "disabled"])
|
|
905
|
+
], 4),
|
|
906
|
+
vue.renderSlot(_ctx.$slots, "footer", {
|
|
907
|
+
value: $props.modelValue,
|
|
908
|
+
options: $options.visibleOptions
|
|
909
|
+
})
|
|
910
|
+
], 2))
|
|
911
|
+
: vue.createCommentVNode("", true)
|
|
912
|
+
]),
|
|
913
|
+
_: 3
|
|
914
|
+
}, 8, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])
|
|
915
|
+
]),
|
|
916
|
+
_: 3
|
|
917
|
+
}, 8, ["appendTo"])
|
|
911
918
|
], 2))
|
|
912
919
|
}
|
|
913
920
|
|
|
@@ -945,4 +952,4 @@ this.primevue.dropdown = (function (utils, OverlayEventBus, api, Ripple, Virtual
|
|
|
945
952
|
|
|
946
953
|
return script;
|
|
947
954
|
|
|
948
|
-
}(primevue.utils, primevue.overlayeventbus, primevue.api, primevue.ripple, primevue.virtualscroller, Vue)
|
|
955
|
+
})(primevue.utils, primevue.overlayeventbus, primevue.api, primevue.ripple, primevue.virtualscroller, primevue.portal, Vue);
|
package/dropdown/dropdown.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,l,n,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=r(t),a=r(l),p=r(n),d={name:"Dropdown",emits:["update:modelValue","before-show","before-hide","show","hide","change","filter","focus","blur"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:String,disabled:Boolean,dataKey:null,showClear:Boolean,inputId:String,tabindex:String,ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},panelClass:null,loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null}},data:()=>({focused:!1,filterValue:null,overlayVisible:!1}),watch:{modelValue(){this.isModelValueChanged=!0}},outsideClickListener:null,scrollHandler:null,resizeListener:null,searchTimeout:null,currentSearchChar:null,previousSearchChar:null,searchValue:null,overlay:null,itemsWrapper:null,virtualScroller:null,isModelValueChanged:!1,updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollValueInView(),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.itemsWrapper=null,this.overlay&&(e.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(t){return this.optionLabel?e.ObjectUtils.resolveFieldData(t,this.optionLabel):t},getOptionValue(t){return this.optionValue?e.ObjectUtils.resolveFieldData(t,this.optionValue):t},getOptionRenderKey(t){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):this.getOptionLabel(t)},isOptionDisabled(t){return!!this.optionDisabled&&e.ObjectUtils.resolveFieldData(t,this.optionDisabled)},getOptionGroupRenderKey(t){return e.ObjectUtils.resolveFieldData(t,this.optionGroupLabel)},getOptionGroupLabel(t){return e.ObjectUtils.resolveFieldData(t,this.optionGroupLabel)},getOptionGroupChildren(t){return e.ObjectUtils.resolveFieldData(t,this.optionGroupChildren)},getSelectedOption(){let e=this.getSelectedOptionIndex();return-1!==e?this.optionGroupLabel?this.getOptionGroupChildren(this.visibleOptions[e.group])[e.option]:this.visibleOptions[e]:null},getSelectedOptionIndex(){if(null!=this.modelValue&&this.visibleOptions){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.visibleOptions);for(let e=0;e<this.visibleOptions.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.visibleOptions[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(t,i){for(let l=0;l<i.length;l++)if(e.ObjectUtils.equals(t,this.getOptionValue(i[l]),this.equalityKey))return l;return-1},isSelected(t){return e.ObjectUtils.equals(this.modelValue,this.getOptionValue(t),this.equalityKey)},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)},onKeyDown(e){switch(e.which){case 40:this.onDownKey(e);break;case 38:this.onUpKey(e);break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide();break;default:this.search(e)}},onFilterKeyDown(e){switch(e.which){case 40:this.onDownKey(e);break;case 38:this.onUpKey(e);break;case 13:case 27:this.overlayVisible=!1,e.preventDefault()}},onDownKey(e){if(this.visibleOptions)if(!this.overlayVisible&&e.altKey)this.show();else{let t=this.visibleOptions&&this.visibleOptions.length>0?this.findNextOption(this.getSelectedOptionIndex()):null;t&&this.updateModel(e,this.getOptionValue(t))}e.preventDefault()},onUpKey(e){if(this.visibleOptions){let t=this.findPrevOption(this.getSelectedOptionIndex());t&&this.updateModel(e,this.getOptionValue(t))}e.preventDefault()},findNextOption(e){if(this.optionGroupLabel){let t=-1===e?0:e.group,i=-1===e?-1:e.option,l=this.findNextOptionInList(this.getOptionGroupChildren(this.visibleOptions[t]),i);return l||(t+1!==this.visibleOptions.length?this.findNextOption({group:t+1,option:-1}):null)}return this.findNextOptionInList(this.visibleOptions,e)},findNextOptionInList(e,t){let i=t+1;if(i===e.length)return null;let l=e[i];return this.isOptionDisabled(l)?this.findNextOptionInList(i):l},findPrevOption(e){if(-1===e)return null;if(this.optionGroupLabel){let t=e.group,i=e.option,l=this.findPrevOptionInList(this.getOptionGroupChildren(this.visibleOptions[t]),i);return l||(t>0?this.findPrevOption({group:t-1,option:this.getOptionGroupChildren(this.visibleOptions[t-1]).length}):null)}return this.findPrevOptionInList(this.visibleOptions,e)},findPrevOptionInList(e,t){let i=t-1;if(i<0)return null;let l=e[i];return this.isOptionDisabled(l)?this.findPrevOption(i):l},onClearClick(e){this.updateModel(e,null)},onClick(t){this.disabled||this.loading||e.DomHandler.hasClass(t.target,"p-dropdown-clear-icon")||"INPUT"===t.target.tagName||this.overlay&&this.overlay.contains(t.target)||(this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onOptionSelect(e,t){let i=this.getOptionValue(t);this.updateModel(e,i),this.$refs.focusInput.focus(),setTimeout((()=>{this.hide()}),200)},onEditableInput(e){this.$emit("update:modelValue",e.target.value)},onOverlayEnter(t){if(e.ZIndexUtils.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollValueInView(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e)}),0)}},onOverlayAfterEnter(){this.filter&&this.$refs.filterInput.focus(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.itemsWrapper=null,this.overlay=null},onOverlayAfterLeave(t){e.ZIndexUtils.clear(t)},alignOverlay(){this.appendDisabled?e.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=e.DomHandler.getOuterWidth(this.$el)+"px",e.DomHandler.absolutePosition(this.overlay,this.$el))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!e.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},search(e){if(!this.visibleOptions)return;this.searchTimeout&&clearTimeout(this.searchTimeout);const t=e.key;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=t,this.previousSearchChar===this.currentSearchChar?this.searchValue=this.currentSearchChar:this.searchValue=this.searchValue?this.searchValue+t:t,this.searchValue){let t=this.getSelectedOptionIndex(),i=this.optionGroupLabel?this.searchOptionInGroup(t):this.searchOption(++t);i&&this.updateModel(e,this.getOptionValue(i))}this.searchTimeout=setTimeout((()=>{this.searchValue=null}),250)},searchOption(e){let t;return this.searchValue&&(t=this.searchOptionInRange(e,this.visibleOptions.length),t||(t=this.searchOptionInRange(0,e))),t},searchOptionInRange(e,t){for(let i=e;i<t;i++){let e=this.visibleOptions[i];if(this.matchesSearchValue(e))return e}return null},searchOptionInGroup(e){let t=-1===e?{group:0,option:-1}:e;for(let e=t.group;e<this.visibleOptions.length;e++){let i=this.getOptionGroupChildren(this.visibleOptions[e]);for(let l=t.group===e?t.option+1:0;l<i.length;l++)if(this.matchesSearchValue(i[l]))return i[l]}for(let e=0;e<=t.group;e++){let i=this.getOptionGroupChildren(this.visibleOptions[e]);for(let l=0;l<(t.group===e?t.option:i.length);l++)if(this.matchesSearchValue(i[l]))return i[l]}return null},matchesSearchValue(e){return this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},onFilterChange(e){this.filterValue=e.target.value,this.$emit("filter",{originalEvent:e,value:e.target.value})},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},itemsWrapperRef(e){this.itemsWrapper=e},virtualScrollerRef(e){this.virtualScroller=e},scrollValueInView(){if(this.overlay){let t=e.DomHandler.findSingle(this.overlay,"li.p-highlight");t&&t.scrollIntoView({block:"nearest",inline:"start"})}},onOverlayClick(e){s.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{visibleOptions(){if(this.filterValue){if(this.optionGroupLabel){let e=[];for(let t of this.options){let l=i.FilterService.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(l&&l.length){let i={...t};i[this.optionGroupChildren]=l,e.push(i)}}return e}return i.FilterService.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale)}return this.options},containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-dropdown-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-dropdown-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e=this.getSelectedOption();return null!==e?this.getOptionLabel(e):this.placeholder||"p-emptylabel"},editableInputValue(){let e=this.getSelectedOption();return e?this.getOptionLabel(e):this.modelValue},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptyFilterMessage},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage},appendDisabled(){return"self"===this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},appendTarget(){return this.appendDisabled?null:this.appendTo},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:a.default},components:{VirtualScroller:p.default}};const h={class:"p-hidden-accessible"},u={key:0,class:"p-dropdown-header"},c={class:"p-dropdown-filter-container"},b=o.createVNode("span",{class:"p-dropdown-filter-icon pi pi-search"},null,-1),f={class:"p-dropdown-item-group"},v={key:2,class:"p-dropdown-empty-message"},g={key:3,class:"p-dropdown-empty-message"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-dropdown {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-dropdown-trigger {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-dropdown-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-fluid .p-dropdown {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n"),d.render=function(e,t,i,l,n,r){const s=o.resolveComponent("VirtualScroller"),a=o.resolveDirective("ripple");return o.openBlock(),o.createBlock("div",{ref:"container",class:r.containerClass,onClick:t[12]||(t[12]=e=>r.onClick(e))},[o.createVNode("div",h,[o.createVNode("input",{ref:"focusInput",type:"text",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[1]||(t[1]=(...e)=>r.onFocus&&r.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>r.onBlur&&r.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>r.onKeyDown&&r.onKeyDown(...e)),tabindex:i.tabindex,"aria-haspopup":"true","aria-expanded":n.overlayVisible,"aria-labelledby":i.ariaLabelledBy},null,40,["id","disabled","tabindex","aria-expanded","aria-labelledby"])]),i.editable?(o.openBlock(),o.createBlock("input",{key:0,type:"text",class:"p-dropdown-label p-inputtext",disabled:i.disabled,onFocus:t[4]||(t[4]=(...e)=>r.onFocus&&r.onFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>r.onBlur&&r.onBlur(...e)),placeholder:i.placeholder,value:r.editableInputValue,onInput:t[6]||(t[6]=(...e)=>r.onEditableInput&&r.onEditableInput(...e)),"aria-haspopup":"listbox","aria-expanded":n.overlayVisible},null,40,["disabled","placeholder","value","aria-expanded"])):o.createCommentVNode("",!0),i.editable?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock("span",{key:1,class:r.labelClass},[o.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[o.createTextVNode(o.toDisplayString(r.label||"empty"),1)]))],2)),i.showClear&&null!=i.modelValue?(o.openBlock(),o.createBlock("i",{key:2,class:"p-dropdown-clear-icon pi pi-times",onClick:t[7]||(t[7]=e=>r.onClearClick(e))})):o.createCommentVNode("",!0),o.createVNode("div",{class:"p-dropdown-trigger",role:"button","aria-haspopup":"listbox","aria-expanded":n.overlayVisible},[o.renderSlot(e.$slots,"indicator",{},(()=>[o.createVNode("span",{class:r.dropdownIconClass},null,2)]))],8,["aria-expanded"]),(o.openBlock(),o.createBlock(o.Teleport,{to:r.appendTarget,disabled:r.appendDisabled},[o.createVNode(o.Transition,{name:"p-connected-overlay",onEnter:r.onOverlayEnter,onAfterEnter:r.onOverlayAfterEnter,onLeave:r.onOverlayLeave,onAfterLeave:r.onOverlayAfterLeave},{default:o.withCtx((()=>[n.overlayVisible?(o.openBlock(),o.createBlock("div",{key:0,ref:r.overlayRef,class:r.panelStyleClass,onClick:t[11]||(t[11]=(...e)=>r.onOverlayClick&&r.onOverlayClick(...e))},[o.renderSlot(e.$slots,"header",{value:i.modelValue,options:r.visibleOptions}),i.filter?(o.openBlock(),o.createBlock("div",u,[o.createVNode("div",c,[o.createVNode("input",{type:"text",ref:"filterInput",value:n.filterValue,onVnodeUpdated:t[8]||(t[8]=(...e)=>r.onFilterUpdated&&r.onFilterUpdated(...e)),autoComplete:"off",class:"p-dropdown-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onKeydown:t[9]||(t[9]=(...e)=>r.onFilterKeyDown&&r.onFilterKeyDown(...e)),onInput:t[10]||(t[10]=(...e)=>r.onFilterChange&&r.onFilterChange(...e))},null,40,["value","placeholder"]),b])])):o.createCommentVNode("",!0),o.createVNode("div",{ref:r.itemsWrapperRef,class:"p-dropdown-items-wrapper",style:{"max-height":r.virtualScrollerDisabled?i.scrollHeight:""}},[o.createVNode(s,o.mergeProps({ref:r.virtualScrollerRef},i.virtualScrollerOptions,{items:r.visibleOptions,style:{height:i.scrollHeight},disabled:r.virtualScrollerDisabled}),o.createSlots({content:o.withCtx((({styleClass:t,contentRef:l,items:s,getItemOptions:p,contentStyle:d})=>[o.createVNode("ul",{ref:l,class:["p-dropdown-items",t],style:d,role:"listbox"},[i.optionGroupLabel?(o.openBlock(!0),o.createBlock(o.Fragment,{key:1},o.renderList(s,((t,i)=>(o.openBlock(),o.createBlock(o.Fragment,{key:r.getOptionGroupRenderKey(t)},[o.createVNode("li",f,[o.renderSlot(e.$slots,"optiongroup",{option:t,index:r.getOptionIndex(i,p)},(()=>[o.createTextVNode(o.toDisplayString(r.getOptionGroupLabel(t)),1)]))]),(o.openBlock(!0),o.createBlock(o.Fragment,null,o.renderList(r.getOptionGroupChildren(t),((t,i)=>o.withDirectives((o.openBlock(),o.createBlock("li",{class:["p-dropdown-item",{"p-highlight":r.isSelected(t),"p-disabled":r.isOptionDisabled(t)}],key:r.getOptionRenderKey(t),onClick:e=>r.onOptionSelect(e,t),role:"option","aria-label":r.getOptionLabel(t),"aria-selected":r.isSelected(t)},[o.renderSlot(e.$slots,"option",{option:t,index:r.getOptionIndex(i,p)},(()=>[o.createTextVNode(o.toDisplayString(r.getOptionLabel(t)),1)]))],10,["onClick","aria-label","aria-selected"])),[[a]]))),128))],64)))),128)):(o.openBlock(!0),o.createBlock(o.Fragment,{key:0},o.renderList(s,((t,i)=>o.withDirectives((o.openBlock(),o.createBlock("li",{class:["p-dropdown-item",{"p-highlight":r.isSelected(t),"p-disabled":r.isOptionDisabled(t)}],key:r.getOptionRenderKey(t),onClick:e=>r.onOptionSelect(e,t),role:"option","aria-label":r.getOptionLabel(t),"aria-selected":r.isSelected(t)},[o.renderSlot(e.$slots,"option",{option:t,index:r.getOptionIndex(i,p)},(()=>[o.createTextVNode(o.toDisplayString(r.getOptionLabel(t)),1)]))],10,["onClick","aria-label","aria-selected"])),[[a]]))),128)),n.filterValue&&(!s||s&&0===s.length)?(o.openBlock(),o.createBlock("li",v,[o.renderSlot(e.$slots,"emptyfilter",{},(()=>[o.createTextVNode(o.toDisplayString(r.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(o.openBlock(),o.createBlock("li",g,[o.renderSlot(e.$slots,"empty",{},(()=>[o.createTextVNode(o.toDisplayString(r.emptyMessageText),1)]))])):o.createCommentVNode("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:o.withCtx((({options:t})=>[o.renderSlot(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),o.renderSlot(e.$slots,"footer",{value:i.modelValue,options:r.visibleOptions})],2)):o.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)},d}(primevue.utils,primevue.overlayeventbus,primevue.api,primevue.ripple,primevue.virtualscroller,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,l,n,o,r){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(t),p=s(l),d=s(n),h=s(o),u={name:"Dropdown",emits:["update:modelValue","before-show","before-hide","show","hide","change","filter","focus","blur"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:String,disabled:Boolean,dataKey:null,showClear:Boolean,inputId:String,tabindex:String,ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},panelClass:null,loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null}},data:()=>({focused:!1,filterValue:null,overlayVisible:!1}),watch:{modelValue(){this.isModelValueChanged=!0}},outsideClickListener:null,scrollHandler:null,resizeListener:null,searchTimeout:null,currentSearchChar:null,previousSearchChar:null,searchValue:null,overlay:null,itemsWrapper:null,virtualScroller:null,isModelValueChanged:!1,updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollValueInView(),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.itemsWrapper=null,this.overlay&&(e.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(t){return this.optionLabel?e.ObjectUtils.resolveFieldData(t,this.optionLabel):t},getOptionValue(t){return this.optionValue?e.ObjectUtils.resolveFieldData(t,this.optionValue):t},getOptionRenderKey(t,i){return this.dataKey?e.ObjectUtils.resolveFieldData(t,this.dataKey):this.getOptionLabel(t)+"_"+i.toString()},isOptionDisabled(t){return!!this.optionDisabled&&e.ObjectUtils.resolveFieldData(t,this.optionDisabled)},getOptionGroupRenderKey(t){return e.ObjectUtils.resolveFieldData(t,this.optionGroupLabel)},getOptionGroupLabel(t){return e.ObjectUtils.resolveFieldData(t,this.optionGroupLabel)},getOptionGroupChildren(t){return e.ObjectUtils.resolveFieldData(t,this.optionGroupChildren)},getSelectedOption(){let e=this.getSelectedOptionIndex();return-1!==e?this.optionGroupLabel?this.getOptionGroupChildren(this.visibleOptions[e.group])[e.option]:this.visibleOptions[e]:null},getSelectedOptionIndex(){if(null!=this.modelValue&&this.visibleOptions){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.visibleOptions);for(let e=0;e<this.visibleOptions.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.visibleOptions[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(t,i){for(let l=0;l<i.length;l++)if(e.ObjectUtils.equals(t,this.getOptionValue(i[l]),this.equalityKey))return l;return-1},isSelected(t){return e.ObjectUtils.equals(this.modelValue,this.getOptionValue(t),this.equalityKey)},show(e){this.$emit("before-show"),this.overlayVisible=!0,e&&this.$refs.focusInput.focus()},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(e){this.focused=!0,this.$emit("focus",e)},onBlur(e){this.focused=!1,this.$emit("blur",e)},onKeyDown(e){switch(e.which){case 40:this.onDownKey(e);break;case 38:this.onUpKey(e);break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 13:case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide();break;default:this.search(e)}},onFilterKeyDown(e){switch(e.which){case 40:this.onDownKey(e);break;case 38:this.onUpKey(e);break;case 13:case 27:this.overlayVisible=!1,e.preventDefault()}},onDownKey(e){if(this.visibleOptions)if(!this.overlayVisible&&e.altKey)this.show();else{let t=this.visibleOptions&&this.visibleOptions.length>0?this.findNextOption(this.getSelectedOptionIndex()):null;t&&this.updateModel(e,this.getOptionValue(t))}e.preventDefault()},onUpKey(e){if(this.visibleOptions){let t=this.findPrevOption(this.getSelectedOptionIndex());t&&this.updateModel(e,this.getOptionValue(t))}e.preventDefault()},findNextOption(e){if(this.optionGroupLabel){let t=-1===e?0:e.group,i=-1===e?-1:e.option,l=this.findNextOptionInList(this.getOptionGroupChildren(this.visibleOptions[t]),i);return l||(t+1!==this.visibleOptions.length?this.findNextOption({group:t+1,option:-1}):null)}return this.findNextOptionInList(this.visibleOptions,e)},findNextOptionInList(e,t){let i=t+1;if(i===e.length)return null;let l=e[i];return this.isOptionDisabled(l)?this.findNextOptionInList(i):l},findPrevOption(e){if(-1===e)return null;if(this.optionGroupLabel){let t=e.group,i=e.option,l=this.findPrevOptionInList(this.getOptionGroupChildren(this.visibleOptions[t]),i);return l||(t>0?this.findPrevOption({group:t-1,option:this.getOptionGroupChildren(this.visibleOptions[t-1]).length}):null)}return this.findPrevOptionInList(this.visibleOptions,e)},findPrevOptionInList(e,t){let i=t-1;if(i<0)return null;let l=e[i];return this.isOptionDisabled(l)?this.findPrevOption(i):l},onClearClick(e){this.updateModel(e,null)},onClick(t){this.disabled||this.loading||e.DomHandler.hasClass(t.target,"p-dropdown-clear-icon")||"INPUT"===t.target.tagName||this.overlay&&this.overlay.contains(t.target)||(this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onOptionSelect(e,t){let i=this.getOptionValue(t);this.updateModel(e,i),this.$refs.focusInput.focus(),setTimeout((()=>{this.hide()}),200)},onEditableInput(e){this.$emit("update:modelValue",e.target.value)},onOverlayEnter(t){if(e.ZIndexUtils.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollValueInView(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e)}),0)}},onOverlayAfterEnter(){this.filter&&this.$refs.filterInput.focus(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.itemsWrapper=null,this.overlay=null},onOverlayAfterLeave(t){e.ZIndexUtils.clear(t)},alignOverlay(){"self"===this.appendTo?e.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=e.DomHandler.getOuterWidth(this.$el)+"px",e.DomHandler.absolutePosition(this.overlay,this.$el))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new e.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!e.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},search(e){if(!this.visibleOptions)return;this.searchTimeout&&clearTimeout(this.searchTimeout);const t=e.key;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=t,this.previousSearchChar===this.currentSearchChar?this.searchValue=this.currentSearchChar:this.searchValue=this.searchValue?this.searchValue+t:t,this.searchValue){let t=this.getSelectedOptionIndex(),i=this.optionGroupLabel?this.searchOptionInGroup(t):this.searchOption(++t);i&&this.updateModel(e,this.getOptionValue(i))}this.searchTimeout=setTimeout((()=>{this.searchValue=null}),250)},searchOption(e){let t;return this.searchValue&&(t=this.searchOptionInRange(e,this.visibleOptions.length),t||(t=this.searchOptionInRange(0,e))),t},searchOptionInRange(e,t){for(let i=e;i<t;i++){let e=this.visibleOptions[i];if(this.matchesSearchValue(e))return e}return null},searchOptionInGroup(e){let t=-1===e?{group:0,option:-1}:e;for(let e=t.group;e<this.visibleOptions.length;e++){let i=this.getOptionGroupChildren(this.visibleOptions[e]);for(let l=t.group===e?t.option+1:0;l<i.length;l++)if(this.matchesSearchValue(i[l]))return i[l]}for(let e=0;e<=t.group;e++){let i=this.getOptionGroupChildren(this.visibleOptions[e]);for(let l=0;l<(t.group===e?t.option:i.length);l++)if(this.matchesSearchValue(i[l]))return i[l]}return null},matchesSearchValue(e){return this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},onFilterChange(e){this.filterValue=e.target.value,this.$emit("filter",{originalEvent:e,value:e.target.value})},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},itemsWrapperRef(e){this.itemsWrapper=e},virtualScrollerRef(e){this.virtualScroller=e},scrollValueInView(){if(this.overlay){let t=e.DomHandler.findSingle(this.overlay,"li.p-highlight");t&&t.scrollIntoView({block:"nearest",inline:"start"})}},onOverlayClick(e){a.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{visibleOptions(){if(this.filterValue){if(this.optionGroupLabel){let e=[];for(let t of this.options){let l=i.FilterService.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(l&&l.length){let i={...t};i[this.optionGroupChildren]=l,e.push(i)}}return e}return i.FilterService.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale)}return this.options},containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-dropdown-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-dropdown-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e=this.getSelectedOption();return null!==e?this.getOptionLabel(e):this.placeholder||"p-emptylabel"},editableInputValue(){let e=this.getSelectedOption();return e?this.getOptionLabel(e):this.modelValue},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptyFilterMessage},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage},virtualScrollerDisabled(){return!this.virtualScrollerOptions},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:p.default},components:{VirtualScroller:d.default,Portal:h.default}};const c={class:"p-hidden-accessible"},b=["id","disabled","tabindex","aria-expanded","aria-labelledby"],f=["disabled","placeholder","value","aria-expanded"],v=["aria-expanded"],m={key:0,class:"p-dropdown-header"},g={class:"p-dropdown-filter-container"},y=["value","placeholder"],O=r.createElementVNode("span",{class:"p-dropdown-filter-icon pi pi-search"},null,-1),w=["onClick","aria-label","aria-selected"],V={class:"p-dropdown-item-group"},C=["onClick","aria-label","aria-selected"],S={key:2,class:"p-dropdown-empty-message"},x={key:3,class:"p-dropdown-empty-message"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-dropdown {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-dropdown-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-dropdown-trigger {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-dropdown-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-dropdown-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\ninput.p-dropdown-label {\n cursor: default;\n}\n.p-dropdown .p-dropdown-panel {\n min-width: 100%;\n}\n.p-dropdown-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-dropdown-items-wrapper {\n overflow: auto;\n}\n.p-dropdown-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-dropdown-item-group {\n cursor: auto;\n}\n.p-dropdown-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-dropdown-filter {\n width: 100%;\n}\n.p-dropdown-filter-container {\n position: relative;\n}\n.p-dropdown-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-fluid .p-dropdown {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-fluid .p-dropdown .p-dropdown-label {\n width: 1%;\n}\n"),u.render=function(e,t,i,l,n,o){const s=r.resolveComponent("VirtualScroller"),a=r.resolveComponent("Portal"),p=r.resolveDirective("ripple");return r.openBlock(),r.createElementBlock("div",{ref:"container",class:r.normalizeClass(o.containerClass),onClick:t[11]||(t[11]=e=>o.onClick(e))},[r.createElementVNode("div",c,[r.createElementVNode("input",{ref:"focusInput",type:"text",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[0]||(t[0]=(...e)=>o.onFocus&&o.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>o.onBlur&&o.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>o.onKeyDown&&o.onKeyDown(...e)),tabindex:i.tabindex,"aria-haspopup":"true","aria-expanded":n.overlayVisible,"aria-labelledby":i.ariaLabelledBy},null,40,b)]),i.editable?(r.openBlock(),r.createElementBlock("input",{key:0,type:"text",class:"p-dropdown-label p-inputtext",disabled:i.disabled,onFocus:t[3]||(t[3]=(...e)=>o.onFocus&&o.onFocus(...e)),onBlur:t[4]||(t[4]=(...e)=>o.onBlur&&o.onBlur(...e)),placeholder:i.placeholder,value:o.editableInputValue,onInput:t[5]||(t[5]=(...e)=>o.onEditableInput&&o.onEditableInput(...e)),"aria-haspopup":"listbox","aria-expanded":n.overlayVisible},null,40,f)):r.createCommentVNode("",!0),i.editable?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(o.labelClass)},[r.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[r.createTextVNode(r.toDisplayString(o.label||"empty"),1)]))],2)),i.showClear&&null!=i.modelValue?(r.openBlock(),r.createElementBlock("i",{key:2,class:"p-dropdown-clear-icon pi pi-times",onClick:t[6]||(t[6]=e=>o.onClearClick(e))})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:"p-dropdown-trigger",role:"button","aria-haspopup":"listbox","aria-expanded":n.overlayVisible},[r.renderSlot(e.$slots,"indicator",{},(()=>[r.createElementVNode("span",{class:r.normalizeClass(o.dropdownIconClass)},null,2)]))],8,v),r.createVNode(a,{appendTo:i.appendTo},{default:r.withCtx((()=>[r.createVNode(r.Transition,{name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},{default:r.withCtx((()=>[n.overlayVisible?(r.openBlock(),r.createElementBlock("div",{key:0,ref:o.overlayRef,class:r.normalizeClass(o.panelStyleClass),onClick:t[10]||(t[10]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))},[r.renderSlot(e.$slots,"header",{value:i.modelValue,options:o.visibleOptions}),i.filter?(r.openBlock(),r.createElementBlock("div",m,[r.createElementVNode("div",g,[r.createElementVNode("input",{type:"text",ref:"filterInput",value:n.filterValue,onVnodeUpdated:t[7]||(t[7]=(...e)=>o.onFilterUpdated&&o.onFilterUpdated(...e)),autoComplete:"off",class:"p-dropdown-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onKeydown:t[8]||(t[8]=(...e)=>o.onFilterKeyDown&&o.onFilterKeyDown(...e)),onInput:t[9]||(t[9]=(...e)=>o.onFilterChange&&o.onFilterChange(...e))},null,40,y),O])])):r.createCommentVNode("",!0),r.createElementVNode("div",{ref:o.itemsWrapperRef,class:"p-dropdown-items-wrapper",style:r.normalizeStyle({"max-height":o.virtualScrollerDisabled?i.scrollHeight:""})},[r.createVNode(s,r.mergeProps({ref:o.virtualScrollerRef},i.virtualScrollerOptions,{items:o.visibleOptions,style:{height:i.scrollHeight},disabled:o.virtualScrollerDisabled}),r.createSlots({content:r.withCtx((({styleClass:t,contentRef:l,items:s,getItemOptions:a,contentStyle:d})=>[r.createElementVNode("ul",{ref:l,class:r.normalizeClass(["p-dropdown-items",t]),style:r.normalizeStyle(d),role:"listbox"},[i.optionGroupLabel?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s,((t,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:o.getOptionGroupRenderKey(t)},[r.createElementVNode("li",V,[r.renderSlot(e.$slots,"optiongroup",{option:t,index:o.getOptionIndex(i,a)},(()=>[r.createTextVNode(r.toDisplayString(o.getOptionGroupLabel(t)),1)]))]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.getOptionGroupChildren(t),((t,i)=>r.withDirectives((r.openBlock(),r.createElementBlock("li",{class:r.normalizeClass(["p-dropdown-item",{"p-highlight":o.isSelected(t),"p-disabled":o.isOptionDisabled(t)}]),key:o.getOptionRenderKey(t,i),onClick:e=>o.onOptionSelect(e,t),role:"option","aria-label":o.getOptionLabel(t),"aria-selected":o.isSelected(t)},[r.renderSlot(e.$slots,"option",{option:t,index:o.getOptionIndex(i,a)},(()=>[r.createTextVNode(r.toDisplayString(o.getOptionLabel(t)),1)]))],10,C)),[[p]]))),128))],64)))),128)):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(s,((t,i)=>r.withDirectives((r.openBlock(),r.createElementBlock("li",{class:r.normalizeClass(["p-dropdown-item",{"p-highlight":o.isSelected(t),"p-disabled":o.isOptionDisabled(t)}]),key:o.getOptionRenderKey(t,i),onClick:e=>o.onOptionSelect(e,t),role:"option","aria-label":o.getOptionLabel(t),"aria-selected":o.isSelected(t)},[r.renderSlot(e.$slots,"option",{option:t,index:o.getOptionIndex(i,a)},(()=>[r.createTextVNode(r.toDisplayString(o.getOptionLabel(t)),1)]))],10,w)),[[p]]))),128)),n.filterValue&&(!s||s&&0===s.length)?(r.openBlock(),r.createElementBlock("li",S,[r.renderSlot(e.$slots,"emptyfilter",{},(()=>[r.createTextVNode(r.toDisplayString(o.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(r.openBlock(),r.createElementBlock("li",x,[r.renderSlot(e.$slots,"empty",{},(()=>[r.createTextVNode(r.toDisplayString(o.emptyMessageText),1)]))])):r.createCommentVNode("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:r.withCtx((({options:t})=>[r.renderSlot(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),r.renderSlot(e.$slots,"footer",{value:i.modelValue,options:o.visibleOptions})],2)):r.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:3},8,["appendTo"])],2)},u}(primevue.utils,primevue.overlayeventbus,primevue.api,primevue.ripple,primevue.virtualscroller,primevue.portal,Vue);
|