primevue 3.11.1 → 3.12.2
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 +256 -2
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.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.cjs.js +4 -4
- package/autocomplete/autocomplete.esm.js +1 -1
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +5 -5
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.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.esm.js +1 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/button/button.cjs.js +1 -1
- package/button/button.esm.js +1 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/calendar/Calendar.d.ts +30 -0
- package/calendar/Calendar.vue +19 -10
- package/calendar/calendar.cjs.js +22 -13
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +20 -11
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +23 -14
- package/calendar/calendar.min.js +1 -1
- package/card/card.esm.js +1 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +1 -1
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +2 -2
- package/cascadeselect/cascadeselect.cjs.js +2 -2
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +3 -3
- package/chart/chart.cjs.js +4 -2
- package/chart/chart.esm.js +1 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +1 -1
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +2 -2
- package/column/Column.d.ts +19 -3
- package/column/Column.vue +6 -2
- package/column/column.cjs.js +6 -2
- package/column/column.cjs.min.js +1 -1
- package/column/column.esm.js +7 -3
- package/column/column.esm.min.js +1 -1
- package/column/column.js +7 -3
- package/column/column.min.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/PrimeVue.d.ts +8 -0
- package/config/config.cjs.js +1 -1
- package/config/config.esm.js +2 -1
- 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 +4 -0
- package/confirmationservice/ConfirmationService.d.ts +8 -1
- 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 +6 -6
- package/confirmdialog/confirmdialog.esm.js +1 -1
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +7 -7
- package/confirmpopup/ConfirmPopup.vue +1 -1
- package/confirmpopup/confirmpopup.cjs.js +7 -7
- 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 +8 -8
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/contextmenu.cjs.js +1 -1
- package/contextmenu/contextmenu.esm.js +1 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +2 -2
- package/core/core.js +115 -81
- package/core/core.min.js +6 -6
- package/datatable/BodyCell.vue +17 -8
- package/datatable/DataTable.d.ts +1 -1
- package/datatable/DataTable.vue +18 -15
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/TableBody.vue +7 -1
- package/datatable/datatable.cjs.js +68 -47
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +57 -36
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +69 -48
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +1 -1
- package/dataview/dataview.cjs.js +1 -1
- package/dataview/dataview.esm.js +1 -1
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +2 -2
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +1 -1
- package/deferredcontent/DeferredContent.vue +2 -2
- package/deferredcontent/deferredcontent.cjs.js +2 -2
- 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 +3 -3
- package/deferredcontent/deferredcontent.min.js +1 -1
- package/dialog/dialog.cjs.js +1 -1
- package/dialog/dialog.esm.js +1 -1
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -2
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/dock/dock.cjs.js +2 -2
- package/dock/dock.esm.js +1 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +3 -3
- package/dropdown/Dropdown.vue +15 -10
- package/dropdown/dropdown.cjs.js +26 -22
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +25 -21
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +27 -23
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +1 -1
- package/editor/editor.esm.js +1 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -2
- package/fileupload/FileUpload.vue +1 -0
- package/fileupload/fileupload.cjs.js +5 -4
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +2 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +6 -5
- package/fileupload/fileupload.min.js +1 -1
- package/fullcalendar/fullcalendar.esm.js +1 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +1 -1
- package/galleria/Galleria.vue +2 -8
- package/galleria/galleria.cjs.js +5 -11
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +3 -9
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +6 -12
- package/galleria/galleria.min.js +1 -1
- package/image/image.esm.js +1 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inplace/inplace.cjs.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -2
- package/inputmask/inputmask.esm.js +1 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +1 -1
- package/inputnumber/InputNumber.d.ts +22 -1
- package/inputnumber/InputNumber.vue +7 -3
- package/inputnumber/inputnumber.cjs.js +8 -4
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +7 -3
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +9 -5
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +1 -1
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputtext/inputtext.esm.js +1 -1
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +1 -1
- package/knob/Knob.vue +1 -1
- package/knob/knob.cjs.js +1 -1
- 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 -2
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +3 -3
- package/megamenu/megamenu.cjs.js +1 -1
- package/megamenu/megamenu.esm.js +1 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +2 -2
- package/menu/Menu.vue +1 -1
- package/menu/menu.cjs.js +3 -3
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +2 -2
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +4 -4
- package/menu/menu.min.js +1 -1
- package/menubar/menubar.cjs.js +1 -1
- package/menubar/menubar.esm.js +1 -1
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +2 -2
- package/message/message.cjs.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -2
- package/multiselect/MultiSelect.vue +21 -14
- package/multiselect/multiselect.cjs.js +25 -16
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +23 -14
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +26 -17
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +4 -0
- package/orderlist/OrderList.vue +10 -1
- package/orderlist/orderlist.cjs.js +19 -11
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +18 -10
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +20 -12
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.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.cjs.js +5 -5
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +6 -6
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +8 -8
- package/paginator/paginator.esm.js +1 -1
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +9 -9
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -2
- package/panelmenu/PanelMenu.vue +9 -4
- package/panelmenu/PanelMenuSub.vue +6 -1
- package/panelmenu/panelmenu.cjs.js +16 -4
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +17 -5
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +17 -5
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/password.cjs.js +2 -2
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +3 -3
- package/picklist/PickList.d.ts +5 -1
- package/picklist/PickList.vue +10 -1
- package/picklist/picklist.cjs.js +27 -19
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +26 -18
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +28 -20
- package/picklist/picklist.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/radiobutton/radiobutton.esm.js +1 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +1 -1
- package/rating/rating.esm.js +1 -1
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +1 -1
- package/resources/themes/arya-blue/theme.css +275 -1
- package/resources/themes/arya-green/theme.css +275 -1
- package/resources/themes/arya-orange/theme.css +275 -1
- package/resources/themes/arya-purple/theme.css +275 -1
- package/resources/themes/bootstrap4-dark-blue/theme.css +279 -1
- package/resources/themes/bootstrap4-dark-purple/theme.css +279 -1
- package/resources/themes/bootstrap4-light-blue/theme.css +278 -0
- package/resources/themes/bootstrap4-light-purple/theme.css +278 -0
- package/resources/themes/fluent-light/theme.css +274 -0
- package/resources/themes/lara-dark-blue/theme.css +282 -52
- package/resources/themes/lara-dark-indigo/theme.css +282 -52
- package/resources/themes/lara-dark-purple/theme.css +282 -52
- package/resources/themes/lara-dark-teal/theme.css +282 -52
- package/resources/themes/lara-light-blue/theme.css +374 -144
- package/resources/themes/lara-light-indigo/theme.css +281 -51
- package/resources/themes/lara-light-purple/theme.css +281 -51
- package/resources/themes/lara-light-teal/theme.css +281 -51
- package/resources/themes/luna-amber/theme.css +274 -0
- package/resources/themes/luna-blue/theme.css +274 -0
- package/resources/themes/luna-green/theme.css +274 -0
- package/resources/themes/luna-pink/theme.css +274 -0
- package/resources/themes/md-dark-deeppurple/theme.css +365 -8
- package/resources/themes/md-dark-indigo/theme.css +365 -8
- package/resources/themes/md-light-deeppurple/theme.css +362 -5
- package/resources/themes/md-light-indigo/theme.css +362 -5
- package/resources/themes/mdc-dark-deeppurple/theme.css +365 -8
- package/resources/themes/mdc-dark-indigo/theme.css +365 -8
- package/resources/themes/mdc-light-deeppurple/theme.css +362 -5
- package/resources/themes/mdc-light-indigo/theme.css +362 -5
- package/resources/themes/nova/theme.css +274 -0
- package/resources/themes/nova-accent/theme.css +274 -0
- package/resources/themes/nova-alt/theme.css +274 -0
- package/resources/themes/nova-vue/theme.css +274 -0
- package/resources/themes/rhea/theme.css +274 -0
- package/resources/themes/saga-blue/theme.css +274 -0
- package/resources/themes/saga-green/theme.css +274 -0
- package/resources/themes/saga-orange/theme.css +274 -0
- package/resources/themes/saga-purple/theme.css +274 -0
- package/resources/themes/tailwind-light/theme.css +274 -0
- package/resources/themes/vela-blue/theme.css +275 -1
- package/resources/themes/vela-green/theme.css +275 -1
- package/resources/themes/vela-orange/theme.css +275 -1
- package/resources/themes/vela-purple/theme.css +275 -1
- 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.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/selectbutton/selectbutton.cjs.js +1 -1
- package/selectbutton/selectbutton.esm.js +1 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -2
- package/sidebar/sidebar.cjs.js +1 -1
- package/sidebar/sidebar.esm.js +1 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +2 -2
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/slider/Slider.vue +10 -2
- package/slider/slider.cjs.js +9 -1
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +10 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +10 -2
- package/slider/slider.min.js +1 -1
- package/speeddial/speeddial.cjs.js +3 -3
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +4 -4
- package/splitbutton/SplitButton.vue +6 -2
- package/splitbutton/splitbutton.cjs.js +5 -5
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +4 -4
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +6 -6
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.vue +1 -1
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +2 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +2 -2
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/steps/steps.esm.js +1 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.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.cjs.js +1 -1
- package/tabmenu/tabmenu.esm.js +1 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +2 -2
- package/tabpanel/tabpanel.esm.js +1 -1
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +1 -1
- package/tabview/TabView.vue +1 -1
- package/tabview/tabview.cjs.js +2 -2
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +2 -2
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -3
- package/tabview/tabview.min.js +1 -1
- package/tag/tag.esm.js +1 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +1 -1
- package/terminal/terminal.cjs.js +3 -3
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -4
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +1 -1
- package/textarea/textarea.esm.js +1 -1
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +1 -1
- package/tieredmenu/TieredMenu.vue +1 -1
- package/tieredmenu/tieredmenu.cjs.js +3 -3
- 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 +4 -4
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/toast/Toast.d.ts +1 -1
- package/toast/toast.cjs.js +7 -7
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +8 -8
- 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 +1 -1
- package/togglebutton/togglebutton.esm.js +1 -1
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +2 -2
- package/toolbar/toolbar.esm.js +1 -1
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +1 -1
- package/tooltip/tooltip.cjs.js +16 -0
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +17 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +17 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/tree.cjs.js +1 -1
- package/tree/tree.esm.js +1 -1
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +2 -2
- package/treeselect/treeselect.cjs.js +3 -3
- package/treeselect/treeselect.esm.js +1 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treetable/FooterCell.vue +1 -1
- package/treetable/TreeTable.d.ts +1 -1
- package/treetable/treetable.cjs.js +3 -3
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +2 -2
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +4 -4
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +1 -1
- package/useconfirm/useconfirm.js +1 -1
- package/usetoast/usetoast.js +1 -1
- package/utils/utils.js +1 -1
- package/vetur-attributes.json +15 -3
- package/vetur-tags.json +6 -3
- package/virtualscroller/VirtualScroller.vue +23 -13
- package/virtualscroller/virtualscroller.cjs.js +23 -13
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +24 -14
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +24 -14
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +130 -10
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
|
@@ -228,8 +228,7 @@ var script = {
|
|
|
228
228
|
}
|
|
229
229
|
break;
|
|
230
230
|
|
|
231
|
-
//
|
|
232
|
-
case 13:
|
|
231
|
+
//escape
|
|
233
232
|
case 27:
|
|
234
233
|
if (this.overlayVisible) {
|
|
235
234
|
this.hide();
|
|
@@ -309,6 +308,17 @@ var script = {
|
|
|
309
308
|
onOverlayEnter(el) {
|
|
310
309
|
ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
311
310
|
this.alignOverlay();
|
|
311
|
+
|
|
312
|
+
if (!this.virtualScrollerDisabled) {
|
|
313
|
+
const selectedIndex = this.getSelectedOptionIndex();
|
|
314
|
+
if (selectedIndex !== -1) {
|
|
315
|
+
setTimeout(() => {
|
|
316
|
+
this.virtualScroller && this.virtualScroller.scrollToIndex(selectedIndex);
|
|
317
|
+
}, 0);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
onOverlayAfterEnter() {
|
|
312
322
|
this.bindOutsideClickListener();
|
|
313
323
|
this.bindScrollListener();
|
|
314
324
|
this.bindResizeListener();
|
|
@@ -317,13 +327,6 @@ var script = {
|
|
|
317
327
|
this.$refs.filterInput.focus();
|
|
318
328
|
}
|
|
319
329
|
|
|
320
|
-
if (!this.virtualScrollerDisabled) {
|
|
321
|
-
const selectedIndex = this.getSelectedOptionIndex();
|
|
322
|
-
if (selectedIndex !== -1) {
|
|
323
|
-
this.virtualScroller.scrollToIndex(selectedIndex);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
330
|
this.$emit('show');
|
|
328
331
|
},
|
|
329
332
|
onOverlayLeave() {
|
|
@@ -446,7 +449,11 @@ var script = {
|
|
|
446
449
|
else if (this.visibleOptions) {
|
|
447
450
|
if (this.optionGroupLabel) {
|
|
448
451
|
value = [];
|
|
449
|
-
this.visibleOptions.forEach(optionGroup =>
|
|
452
|
+
this.visibleOptions.forEach(optionGroup => {
|
|
453
|
+
for (let option of this.getOptionGroupChildren(optionGroup)) {
|
|
454
|
+
value.push(this.getOptionValue(option));
|
|
455
|
+
}
|
|
456
|
+
});
|
|
450
457
|
}
|
|
451
458
|
else {
|
|
452
459
|
value = this.visibleOptions.map(option => this.getOptionValue(option));
|
|
@@ -483,7 +490,7 @@ var script = {
|
|
|
483
490
|
}
|
|
484
491
|
},
|
|
485
492
|
computed: {
|
|
486
|
-
|
|
493
|
+
visibleOptions() {
|
|
487
494
|
if (this.filterValue) {
|
|
488
495
|
if (this.optionGroupLabel) {
|
|
489
496
|
let filteredGroups = [];
|
|
@@ -496,7 +503,7 @@ var script = {
|
|
|
496
503
|
return filteredGroups
|
|
497
504
|
}
|
|
498
505
|
else {
|
|
499
|
-
return FilterService.filter(this.options, this.searchFields, this.filterValue,
|
|
506
|
+
return FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
500
507
|
}
|
|
501
508
|
}
|
|
502
509
|
else {
|
|
@@ -732,6 +739,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
732
739
|
createVNode(Transition, {
|
|
733
740
|
name: "p-connected-overlay",
|
|
734
741
|
onEnter: $options.onOverlayEnter,
|
|
742
|
+
onAfterEnter: $options.onOverlayAfterEnter,
|
|
735
743
|
onLeave: $options.onOverlayLeave,
|
|
736
744
|
onAfterLeave: $options.onOverlayAfterLeave
|
|
737
745
|
}, {
|
|
@@ -782,6 +790,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
782
790
|
type: "text",
|
|
783
791
|
ref: "filterInput",
|
|
784
792
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ($data.filterValue = $event)),
|
|
793
|
+
autoComplete: "on",
|
|
785
794
|
class: "p-multiselect-filter p-inputtext p-component",
|
|
786
795
|
placeholder: $props.filterPlaceholder,
|
|
787
796
|
onInput: _cache[8] || (_cache[8] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
@@ -929,7 +938,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
929
938
|
: createCommentVNode("", true)
|
|
930
939
|
]),
|
|
931
940
|
_: 3
|
|
932
|
-
}, 8, ["onEnter", "onLeave", "onAfterLeave"])
|
|
941
|
+
}, 8, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])
|
|
933
942
|
], 8, ["to", "disabled"]))
|
|
934
943
|
], 2))
|
|
935
944
|
}
|
|
@@ -966,4 +975,4 @@ styleInject(css_248z);
|
|
|
966
975
|
|
|
967
976
|
script.render = render;
|
|
968
977
|
|
|
969
|
-
export
|
|
978
|
+
export default script;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ZIndexUtils as e,ObjectUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as l}from"primevue/utils";import n from"primevue/overlayeventbus";import{FilterService as s}from"primevue/api";import o from"primevue/ripple";import a from"primevue/virtualscroller";import{resolveComponent as r,resolveDirective as p,openBlock as c,createBlock as d,createVNode as u,renderSlot as h,Fragment as m,createTextVNode as b,toDisplayString as f,renderList as y,createCommentVNode as g,Teleport as v,Transition as x,withCtx as k,withDirectives as L,vModelText as O,mergeProps as C,createSlots as S}from"vue";var V={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(e.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?t.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?t.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?t.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getOptionGroupRenderKey(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupLabel(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return t.resolveFieldData(e,this.optionGroupChildren)},isOptionDisabled(e){return!(!this.maxSelectionLimitReached||this.isSelected(e))||!!this.optionDisabled&&t.resolveFieldData(e,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(e,i){return e?i.findIndex((i=>e.some((e=>t.equals(e,this.getOptionValue(i),this.equalityKey))))):-1},isSelected(e){if(this.modelValue){let i=this.getOptionValue(e),l=this.equalityKey;return this.modelValue.some((e=>t.equals(e,i,l)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(e){this.disabled||this.loading||this.overlay&&this.overlay.contains(e.target)||i.hasClass(e.target,"p-multiselect-close")||(i.hasClass(e.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();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()}},onOptionSelect(e,i){if(this.disabled||this.isOptionDisabled(i))return;let l=null;l=this.isSelected(i)?this.modelValue.filter((e=>!t.equals(e,this.getOptionValue(i),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(i)],this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:e,value:l})},onOptionKeyDown(e,t){let i=e.target;switch(e.which){case 40:var l=this.findNextItem(i);l&&l.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(i);n&&n.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findNextItem(t):t:null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findPrevItem(t):t:null},onOverlayEnter(t){if(e.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&this.virtualScroller.scrollToIndex(e)}this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(t){e.clear(t)},alignOverlay(){this.appendDisabled?i.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.getOuterWidth(this.$el)+"px",i.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new l(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let i of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(i)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(e,i){for(let l of i){let i=this.getOptionValue(l);if(t.equals(i,e,this.equalityKey))return l}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>t=[...t,...this.getOptionGroupChildren(e)]))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(e){let i=this.modelValue.filter((i=>!t.equals(i,e,this.equalityKey)));this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:event,value:i})},onOverlayClick(e){n.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 i=s.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return s.filter(this.options,this.searchFields,this.filterValue,"contains",this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},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},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:o},components:{VirtualScroller:a}};const w={class:"p-hidden-accessible"},I={class:"p-multiselect-label-container"},$={class:"p-multiselect-token-label"},D={class:"p-multiselect-trigger"},F={key:0,class:"p-multiselect-header"},K={class:"p-hidden-accessible"},B={key:1,class:"p-multiselect-filter-container"},G=u("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),E=u("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1),T={class:"p-checkbox p-component"},A={class:"p-multiselect-item-group"},H={class:"p-checkbox p-component"},R={key:2,class:"p-multiselect-empty-message"},z={key:3,class:"p-multiselect-empty-message"};!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-multiselect {\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-multiselect-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-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\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 font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\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: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\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 overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),V.render=function(e,t,i,l,n,s){const o=r("VirtualScroller"),a=p("ripple");return c(),d("div",{ref:"container",class:s.containerClass,onClick:t[11]||(t[11]=(...e)=>s.onClick&&s.onClick(...e))},[u("div",w,[u("input",{ref:"focusInput",type:"text",role:"listbox",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[1]||(t[1]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>s.onKeyDown&&s.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"])]),u("div",I,[u("div",{class:s.labelClass},[h(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>["comma"===i.display?(c(),d(m,{key:0},[b(f(s.label||"empty"),1)],64)):"chip"===i.display?(c(),d(m,{key:1},[(c(!0),d(m,null,y(i.modelValue,(t=>(c(),d("div",{class:"p-multiselect-token",key:s.getLabelByValue(t)},[h(e.$slots,"chip",{value:t},(()=>[u("span",$,f(s.getLabelByValue(t)),1)])),i.disabled?g("",!0):(c(),d("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>s.removeChip(t)},null,8,["onClick"]))])))),128)),i.modelValue&&0!==i.modelValue.length?g("",!0):(c(),d(m,{key:0},[b(f(i.placeholder||"empty"),1)],64))],64)):g("",!0)]))],2)]),u("div",D,[h(e.$slots,"indicator",{},(()=>[u("span",{class:s.dropdownIconClass},null,2)]))]),(c(),d(v,{to:s.appendTarget,disabled:s.appendDisabled},[u(x,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:k((()=>[n.overlayVisible?(c(),d("div",{key:0,ref:s.overlayRef,class:s.panelStyleClass,onClick:t[10]||(t[10]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},[h(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.showToggleAll&&null==i.selectionLimit||i.filter?(c(),d("div",F,[i.showToggleAll&&null==i.selectionLimit?(c(),d("div",{key:0,class:"p-checkbox p-component",onClick:t[6]||(t[6]=(...e)=>s.onToggleAll&&s.onToggleAll(...e)),role:"checkbox","aria-checked":s.allSelected},[u("div",K,[u("input",{type:"checkbox",readonly:"",onFocus:t[4]||(t[4]=(...e)=>s.onHeaderCheckboxFocus&&s.onHeaderCheckboxFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onHeaderCheckboxBlur&&s.onHeaderCheckboxBlur(...e))},null,32)]),u("div",{class:["p-checkbox-box",{"p-highlight":s.allSelected,"p-focus":n.headerCheckboxFocused}],role:"checkbox","aria-checked":s.allSelected},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.allSelected}]},null,2)],10,["aria-checked"])],8,["aria-checked"])):g("",!0),i.filter?(c(),d("div",B,[L(u("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[7]||(t[7]=e=>n.filterValue=e),class:"p-multiselect-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onInput:t[8]||(t[8]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},null,40,["placeholder"]),[[O,n.filterValue]]),G])):g("",!0),L(u("button",{class:"p-multiselect-close p-link",onClick:t[9]||(t[9]=(...e)=>s.onCloseClick&&s.onCloseClick(...e)),type:"button"},[E],512),[[a]])])):g("",!0),u("div",{class:"p-multiselect-items-wrapper",style:{"max-height":s.virtualScrollerDisabled?i.scrollHeight:""}},[u(o,C({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},disabled:s.virtualScrollerDisabled}),S({content:k((({styleClass:t,contentRef:l,items:o,getItemOptions:r,contentStyle:p})=>[u("ul",{ref:l,class:["p-multiselect-items p-component",t],style:p,role:"listbox","aria-multiselectable":"true"},[i.optionGroupLabel?(c(!0),d(m,{key:1},y(o,((t,l)=>(c(),d(m,{key:s.getOptionGroupRenderKey(t)},[u("li",A,[h(e.$slots,"optiongroup",{option:t,index:s.getOptionIndex(l,r)},(()=>[b(f(s.getOptionGroupLabel(t)),1)]))]),(c(!0),d(m,null,y(s.getOptionGroupChildren(t),((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[u("div",H,[u("div",{class:["p-checkbox-box",{"p-highlight":s.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[u("span",null,f(s.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128))],64)))),128)):(c(!0),d(m,{key:0},y(o,((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[u("div",T,[u("div",{class:["p-checkbox-box",{"p-highlight":s.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[u("span",null,f(s.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128)),n.filterValue&&(!o||o&&0===o.length)?(c(),d("li",R,[h(e.$slots,"emptyfilter",{},(()=>[b(f(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(c(),d("li",z,[h(e.$slots,"empty",{},(()=>[b(f(s.emptyMessageText),1)]))])):g("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:k((({options:t})=>[h(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),h(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions})],2)):g("",!0)])),_:3},8,["onEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)};export{V as default};
|
|
1
|
+
import{ZIndexUtils as e,ObjectUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as l}from"primevue/utils";import n from"primevue/overlayeventbus";import{FilterService as s}from"primevue/api";import o from"primevue/ripple";import a from"primevue/virtualscroller";import{resolveComponent as r,resolveDirective as p,openBlock as c,createBlock as d,createVNode as u,renderSlot as h,Fragment as m,createTextVNode as b,toDisplayString as f,renderList as y,createCommentVNode as g,Teleport as v,Transition as x,withCtx as k,withDirectives as L,vModelText as O,mergeProps as C,createSlots as S}from"vue";var V={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(e.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?t.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?t.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?t.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getOptionGroupRenderKey(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupLabel(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return t.resolveFieldData(e,this.optionGroupChildren)},isOptionDisabled(e){return!(!this.maxSelectionLimitReached||this.isSelected(e))||!!this.optionDisabled&&t.resolveFieldData(e,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(e,i){return e?i.findIndex((i=>e.some((e=>t.equals(e,this.getOptionValue(i),this.equalityKey))))):-1},isSelected(e){if(this.modelValue){let i=this.getOptionValue(e),l=this.equalityKey;return this.modelValue.some((e=>t.equals(e,i,l)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(e){this.disabled||this.loading||this.overlay&&this.overlay.contains(e.target)||i.hasClass(e.target,"p-multiselect-close")||(i.hasClass(e.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide()}},onOptionSelect(e,i){if(this.disabled||this.isOptionDisabled(i))return;let l=null;l=this.isSelected(i)?this.modelValue.filter((e=>!t.equals(e,this.getOptionValue(i),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(i)],this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:e,value:l})},onOptionKeyDown(e,t){let i=e.target;switch(e.which){case 40:var l=this.findNextItem(i);l&&l.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(i);n&&n.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findNextItem(t):t:null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findPrevItem(t):t:null},onOverlayEnter(t){if(e.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e)}),0)}},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(t){e.clear(t)},alignOverlay(){this.appendDisabled?i.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.getOuterWidth(this.$el)+"px",i.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new l(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let i of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(i)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(e,i){for(let l of i){let i=this.getOptionValue(l);if(t.equals(i,e,this.equalityKey))return l}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>{for(let i of this.getOptionGroupChildren(e))t.push(this.getOptionValue(i))}))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(e){let i=this.modelValue.filter((i=>!t.equals(i,e,this.equalityKey)));this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:event,value:i})},onOverlayClick(e){n.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 i=s.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return s.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},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},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:o},components:{VirtualScroller:a}};const w={class:"p-hidden-accessible"},I={class:"p-multiselect-label-container"},$={class:"p-multiselect-token-label"},D={class:"p-multiselect-trigger"},F={key:0,class:"p-multiselect-header"},K={class:"p-hidden-accessible"},B={key:1,class:"p-multiselect-filter-container"},E=u("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),G=u("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1),A={class:"p-checkbox p-component"},T={class:"p-multiselect-item-group"},H={class:"p-checkbox p-component"},M={key:2,class:"p-multiselect-empty-message"},R={key:3,class:"p-multiselect-empty-message"};!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-multiselect {\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-multiselect-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-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\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 font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\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: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\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 overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),V.render=function(e,t,i,l,n,s){const o=r("VirtualScroller"),a=p("ripple");return c(),d("div",{ref:"container",class:s.containerClass,onClick:t[11]||(t[11]=(...e)=>s.onClick&&s.onClick(...e))},[u("div",w,[u("input",{ref:"focusInput",type:"text",role:"listbox",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[1]||(t[1]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>s.onKeyDown&&s.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"])]),u("div",I,[u("div",{class:s.labelClass},[h(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>["comma"===i.display?(c(),d(m,{key:0},[b(f(s.label||"empty"),1)],64)):"chip"===i.display?(c(),d(m,{key:1},[(c(!0),d(m,null,y(i.modelValue,(t=>(c(),d("div",{class:"p-multiselect-token",key:s.getLabelByValue(t)},[h(e.$slots,"chip",{value:t},(()=>[u("span",$,f(s.getLabelByValue(t)),1)])),i.disabled?g("",!0):(c(),d("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>s.removeChip(t)},null,8,["onClick"]))])))),128)),i.modelValue&&0!==i.modelValue.length?g("",!0):(c(),d(m,{key:0},[b(f(i.placeholder||"empty"),1)],64))],64)):g("",!0)]))],2)]),u("div",D,[h(e.$slots,"indicator",{},(()=>[u("span",{class:s.dropdownIconClass},null,2)]))]),(c(),d(v,{to:s.appendTarget,disabled:s.appendDisabled},[u(x,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:k((()=>[n.overlayVisible?(c(),d("div",{key:0,ref:s.overlayRef,class:s.panelStyleClass,onClick:t[10]||(t[10]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},[h(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.showToggleAll&&null==i.selectionLimit||i.filter?(c(),d("div",F,[i.showToggleAll&&null==i.selectionLimit?(c(),d("div",{key:0,class:"p-checkbox p-component",onClick:t[6]||(t[6]=(...e)=>s.onToggleAll&&s.onToggleAll(...e)),role:"checkbox","aria-checked":s.allSelected},[u("div",K,[u("input",{type:"checkbox",readonly:"",onFocus:t[4]||(t[4]=(...e)=>s.onHeaderCheckboxFocus&&s.onHeaderCheckboxFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>s.onHeaderCheckboxBlur&&s.onHeaderCheckboxBlur(...e))},null,32)]),u("div",{class:["p-checkbox-box",{"p-highlight":s.allSelected,"p-focus":n.headerCheckboxFocused}],role:"checkbox","aria-checked":s.allSelected},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.allSelected}]},null,2)],10,["aria-checked"])],8,["aria-checked"])):g("",!0),i.filter?(c(),d("div",B,[L(u("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[7]||(t[7]=e=>n.filterValue=e),autoComplete:"on",class:"p-multiselect-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onInput:t[8]||(t[8]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},null,40,["placeholder"]),[[O,n.filterValue]]),E])):g("",!0),L(u("button",{class:"p-multiselect-close p-link",onClick:t[9]||(t[9]=(...e)=>s.onCloseClick&&s.onCloseClick(...e)),type:"button"},[G],512),[[a]])])):g("",!0),u("div",{class:"p-multiselect-items-wrapper",style:{"max-height":s.virtualScrollerDisabled?i.scrollHeight:""}},[u(o,C({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},disabled:s.virtualScrollerDisabled}),S({content:k((({styleClass:t,contentRef:l,items:o,getItemOptions:r,contentStyle:p})=>[u("ul",{ref:l,class:["p-multiselect-items p-component",t],style:p,role:"listbox","aria-multiselectable":"true"},[i.optionGroupLabel?(c(!0),d(m,{key:1},y(o,((t,l)=>(c(),d(m,{key:s.getOptionGroupRenderKey(t)},[u("li",T,[h(e.$slots,"optiongroup",{option:t,index:s.getOptionIndex(l,r)},(()=>[b(f(s.getOptionGroupLabel(t)),1)]))]),(c(!0),d(m,null,y(s.getOptionGroupChildren(t),((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[u("div",H,[u("div",{class:["p-checkbox-box",{"p-highlight":s.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[u("span",null,f(s.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128))],64)))),128)):(c(!0),d(m,{key:0},y(o,((t,l)=>L((c(),d("li",{class:["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}],role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[u("div",A,[u("div",{class:["p-checkbox-box",{"p-highlight":s.isSelected(t)}]},[u("span",{class:["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}]},null,2)],2)]),h(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[u("span",null,f(s.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128)),n.filterValue&&(!o||o&&0===o.length)?(c(),d("li",M,[h(e.$slots,"emptyfilter",{},(()=>[b(f(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(c(),d("li",R,[h(e.$slots,"empty",{},(()=>[b(f(s.emptyMessageText),1)]))])):g("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:k((({options:t})=>[h(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),h(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions})],2)):g("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)};export default V;
|
|
@@ -231,8 +231,7 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
231
231
|
}
|
|
232
232
|
break;
|
|
233
233
|
|
|
234
|
-
//
|
|
235
|
-
case 13:
|
|
234
|
+
//escape
|
|
236
235
|
case 27:
|
|
237
236
|
if (this.overlayVisible) {
|
|
238
237
|
this.hide();
|
|
@@ -312,6 +311,17 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
312
311
|
onOverlayEnter(el) {
|
|
313
312
|
utils.ZIndexUtils.set('overlay', el, this.$primevue.config.zIndex.overlay);
|
|
314
313
|
this.alignOverlay();
|
|
314
|
+
|
|
315
|
+
if (!this.virtualScrollerDisabled) {
|
|
316
|
+
const selectedIndex = this.getSelectedOptionIndex();
|
|
317
|
+
if (selectedIndex !== -1) {
|
|
318
|
+
setTimeout(() => {
|
|
319
|
+
this.virtualScroller && this.virtualScroller.scrollToIndex(selectedIndex);
|
|
320
|
+
}, 0);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
onOverlayAfterEnter() {
|
|
315
325
|
this.bindOutsideClickListener();
|
|
316
326
|
this.bindScrollListener();
|
|
317
327
|
this.bindResizeListener();
|
|
@@ -320,13 +330,6 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
320
330
|
this.$refs.filterInput.focus();
|
|
321
331
|
}
|
|
322
332
|
|
|
323
|
-
if (!this.virtualScrollerDisabled) {
|
|
324
|
-
const selectedIndex = this.getSelectedOptionIndex();
|
|
325
|
-
if (selectedIndex !== -1) {
|
|
326
|
-
this.virtualScroller.scrollToIndex(selectedIndex);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
333
|
this.$emit('show');
|
|
331
334
|
},
|
|
332
335
|
onOverlayLeave() {
|
|
@@ -449,7 +452,11 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
449
452
|
else if (this.visibleOptions) {
|
|
450
453
|
if (this.optionGroupLabel) {
|
|
451
454
|
value = [];
|
|
452
|
-
this.visibleOptions.forEach(optionGroup =>
|
|
455
|
+
this.visibleOptions.forEach(optionGroup => {
|
|
456
|
+
for (let option of this.getOptionGroupChildren(optionGroup)) {
|
|
457
|
+
value.push(this.getOptionValue(option));
|
|
458
|
+
}
|
|
459
|
+
});
|
|
453
460
|
}
|
|
454
461
|
else {
|
|
455
462
|
value = this.visibleOptions.map(option => this.getOptionValue(option));
|
|
@@ -479,14 +486,14 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
479
486
|
this.$emit('change', {originalEvent: event, value: value});
|
|
480
487
|
},
|
|
481
488
|
onOverlayClick(event) {
|
|
482
|
-
OverlayEventBus__default[
|
|
489
|
+
OverlayEventBus__default['default'].emit('overlay-click', {
|
|
483
490
|
originalEvent: event,
|
|
484
491
|
target: this.$el
|
|
485
492
|
});
|
|
486
493
|
}
|
|
487
494
|
},
|
|
488
495
|
computed: {
|
|
489
|
-
|
|
496
|
+
visibleOptions() {
|
|
490
497
|
if (this.filterValue) {
|
|
491
498
|
if (this.optionGroupLabel) {
|
|
492
499
|
let filteredGroups = [];
|
|
@@ -499,7 +506,7 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
499
506
|
return filteredGroups
|
|
500
507
|
}
|
|
501
508
|
else {
|
|
502
|
-
return api.FilterService.filter(this.options, this.searchFields, this.filterValue,
|
|
509
|
+
return api.FilterService.filter(this.options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
|
|
503
510
|
}
|
|
504
511
|
}
|
|
505
512
|
else {
|
|
@@ -624,10 +631,10 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
624
631
|
}
|
|
625
632
|
},
|
|
626
633
|
directives: {
|
|
627
|
-
'ripple': Ripple__default[
|
|
634
|
+
'ripple': Ripple__default['default']
|
|
628
635
|
},
|
|
629
636
|
components: {
|
|
630
|
-
'VirtualScroller': VirtualScroller__default[
|
|
637
|
+
'VirtualScroller': VirtualScroller__default['default']
|
|
631
638
|
}
|
|
632
639
|
};
|
|
633
640
|
|
|
@@ -735,6 +742,7 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
735
742
|
vue.createVNode(vue.Transition, {
|
|
736
743
|
name: "p-connected-overlay",
|
|
737
744
|
onEnter: $options.onOverlayEnter,
|
|
745
|
+
onAfterEnter: $options.onOverlayAfterEnter,
|
|
738
746
|
onLeave: $options.onOverlayLeave,
|
|
739
747
|
onAfterLeave: $options.onOverlayAfterLeave
|
|
740
748
|
}, {
|
|
@@ -785,6 +793,7 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
785
793
|
type: "text",
|
|
786
794
|
ref: "filterInput",
|
|
787
795
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ($data.filterValue = $event)),
|
|
796
|
+
autoComplete: "on",
|
|
788
797
|
class: "p-multiselect-filter p-inputtext p-component",
|
|
789
798
|
placeholder: $props.filterPlaceholder,
|
|
790
799
|
onInput: _cache[8] || (_cache[8] = (...args) => ($options.onFilterChange && $options.onFilterChange(...args)))
|
|
@@ -932,7 +941,7 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
932
941
|
: vue.createCommentVNode("", true)
|
|
933
942
|
]),
|
|
934
943
|
_: 3
|
|
935
|
-
}, 8, ["onEnter", "onLeave", "onAfterLeave"])
|
|
944
|
+
}, 8, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])
|
|
936
945
|
], 8, ["to", "disabled"]))
|
|
937
946
|
], 2))
|
|
938
947
|
}
|
|
@@ -971,4 +980,4 @@ this.primevue.multiselect = (function (utils, OverlayEventBus, api, Ripple, Virt
|
|
|
971
980
|
|
|
972
981
|
return script;
|
|
973
982
|
|
|
974
|
-
}
|
|
983
|
+
}(primevue.utils, primevue.overlayeventbus, primevue.api, primevue.ripple, primevue.virtualscroller, Vue));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.multiselect=function(e,t,l,i,n,s){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),a=o(i),c=o(n),d={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=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)},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)},isOptionDisabled(t){return!(!this.maxSelectionLimitReached||this.isSelected(t))||!!this.optionDisabled&&e.ObjectUtils.resolveFieldData(t,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(t,l){return t?l.findIndex((l=>t.some((t=>e.ObjectUtils.equals(t,this.getOptionValue(l),this.equalityKey))))):-1},isSelected(t){if(this.modelValue){let l=this.getOptionValue(t),i=this.equalityKey;return this.modelValue.some((t=>e.ObjectUtils.equals(t,l,i)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(t){this.disabled||this.loading||this.overlay&&this.overlay.contains(t.target)||e.DomHandler.hasClass(t.target,"p-multiselect-close")||(e.DomHandler.hasClass(t.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();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()}},onOptionSelect(t,l){if(this.disabled||this.isOptionDisabled(l))return;let i=null;i=this.isSelected(l)?this.modelValue.filter((t=>!e.ObjectUtils.equals(t,this.getOptionValue(l),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(l)],this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:t,value:i})},onOptionKeyDown(e,t){let l=e.target;switch(e.which){case 40:var i=this.findNextItem(l);i&&i.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(l);n&&n.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(t){let l=t.nextElementSibling;return l?e.DomHandler.hasClass(l,"p-disabled")||e.DomHandler.hasClass(l,"p-multiselect-item-group")?this.findNextItem(l):l:null},findPrevItem(t){let l=t.previousElementSibling;return l?e.DomHandler.hasClass(l,"p-disabled")||e.DomHandler.hasClass(l,"p-multiselect-item-group")?this.findPrevItem(l):l:null},onOverlayEnter(t){if(e.ZIndexUtils.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&this.virtualScroller.scrollToIndex(e)}this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),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))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&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.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let l of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(l)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(t,l){for(let i of l){let l=this.getOptionValue(i);if(e.ObjectUtils.equals(l,t,this.equalityKey))return i}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>t=[...t,...this.getOptionGroupChildren(e)]))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(t){let l=this.modelValue.filter((l=>!e.ObjectUtils.equals(l,t,this.equalityKey)));this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:event,value:l})},onOverlayClick(e){r.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 i=l.FilterService.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return l.FilterService.filter(this.options,this.searchFields,this.filterValue,"contains",this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},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},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:a.default},components:{VirtualScroller:c.default}};const p={class:"p-hidden-accessible"},u={class:"p-multiselect-label-container"},h={class:"p-multiselect-token-label"},m={class:"p-multiselect-trigger"},b={key:0,class:"p-multiselect-header"},f={class:"p-hidden-accessible"},y={key:1,class:"p-multiselect-filter-container"},g=s.createVNode("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),v=s.createVNode("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1),k={class:"p-checkbox p-component"},x={class:"p-multiselect-item-group"},V={class:"p-checkbox p-component"},O={key:2,class:"p-multiselect-empty-message"},S={key:3,class:"p-multiselect-empty-message"};return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-multiselect {\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-multiselect-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-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\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 font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\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: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\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 overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),d.render=function(e,t,l,i,n,o){const r=s.resolveComponent("VirtualScroller"),a=s.resolveDirective("ripple");return s.openBlock(),s.createBlock("div",{ref:"container",class:o.containerClass,onClick:t[11]||(t[11]=(...e)=>o.onClick&&o.onClick(...e))},[s.createVNode("div",p,[s.createVNode("input",{ref:"focusInput",type:"text",role:"listbox",id:l.inputId,readonly:"",disabled:l.disabled,onFocus:t[1]||(t[1]=(...e)=>o.onFocus&&o.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>o.onBlur&&o.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>o.onKeyDown&&o.onKeyDown(...e)),tabindex:l.tabindex,"aria-haspopup":"true","aria-expanded":n.overlayVisible,"aria-labelledby":l.ariaLabelledBy},null,40,["id","disabled","tabindex","aria-expanded","aria-labelledby"])]),s.createVNode("div",u,[s.createVNode("div",{class:o.labelClass},[s.renderSlot(e.$slots,"value",{value:l.modelValue,placeholder:l.placeholder},(()=>["comma"===l.display?(s.openBlock(),s.createBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(o.label||"empty"),1)],64)):"chip"===l.display?(s.openBlock(),s.createBlock(s.Fragment,{key:1},[(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(l.modelValue,(t=>(s.openBlock(),s.createBlock("div",{class:"p-multiselect-token",key:o.getLabelByValue(t)},[s.renderSlot(e.$slots,"chip",{value:t},(()=>[s.createVNode("span",h,s.toDisplayString(o.getLabelByValue(t)),1)])),l.disabled?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>o.removeChip(t)},null,8,["onClick"]))])))),128)),l.modelValue&&0!==l.modelValue.length?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(l.placeholder||"empty"),1)],64))],64)):s.createCommentVNode("",!0)]))],2)]),s.createVNode("div",m,[s.renderSlot(e.$slots,"indicator",{},(()=>[s.createVNode("span",{class:o.dropdownIconClass},null,2)]))]),(s.openBlock(),s.createBlock(s.Teleport,{to:o.appendTarget,disabled:o.appendDisabled},[s.createVNode(s.Transition,{name:"p-connected-overlay",onEnter:o.onOverlayEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},{default:s.withCtx((()=>[n.overlayVisible?(s.openBlock(),s.createBlock("div",{key:0,ref:o.overlayRef,class:o.panelStyleClass,onClick:t[10]||(t[10]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))},[s.renderSlot(e.$slots,"header",{value:l.modelValue,options:o.visibleOptions}),l.showToggleAll&&null==l.selectionLimit||l.filter?(s.openBlock(),s.createBlock("div",b,[l.showToggleAll&&null==l.selectionLimit?(s.openBlock(),s.createBlock("div",{key:0,class:"p-checkbox p-component",onClick:t[6]||(t[6]=(...e)=>o.onToggleAll&&o.onToggleAll(...e)),role:"checkbox","aria-checked":o.allSelected},[s.createVNode("div",f,[s.createVNode("input",{type:"checkbox",readonly:"",onFocus:t[4]||(t[4]=(...e)=>o.onHeaderCheckboxFocus&&o.onHeaderCheckboxFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>o.onHeaderCheckboxBlur&&o.onHeaderCheckboxBlur(...e))},null,32)]),s.createVNode("div",{class:["p-checkbox-box",{"p-highlight":o.allSelected,"p-focus":n.headerCheckboxFocused}],role:"checkbox","aria-checked":o.allSelected},[s.createVNode("span",{class:["p-checkbox-icon",{"pi pi-check":o.allSelected}]},null,2)],10,["aria-checked"])],8,["aria-checked"])):s.createCommentVNode("",!0),l.filter?(s.openBlock(),s.createBlock("div",y,[s.withDirectives(s.createVNode("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[7]||(t[7]=e=>n.filterValue=e),class:"p-multiselect-filter p-inputtext p-component",placeholder:l.filterPlaceholder,onInput:t[8]||(t[8]=(...e)=>o.onFilterChange&&o.onFilterChange(...e))},null,40,["placeholder"]),[[s.vModelText,n.filterValue]]),g])):s.createCommentVNode("",!0),s.withDirectives(s.createVNode("button",{class:"p-multiselect-close p-link",onClick:t[9]||(t[9]=(...e)=>o.onCloseClick&&o.onCloseClick(...e)),type:"button"},[v],512),[[a]])])):s.createCommentVNode("",!0),s.createVNode("div",{class:"p-multiselect-items-wrapper",style:{"max-height":o.virtualScrollerDisabled?l.scrollHeight:""}},[s.createVNode(r,s.mergeProps({ref:o.virtualScrollerRef},l.virtualScrollerOptions,{items:o.visibleOptions,style:{height:l.scrollHeight},disabled:o.virtualScrollerDisabled}),s.createSlots({content:s.withCtx((({styleClass:t,contentRef:i,items:r,getItemOptions:c,contentStyle:d})=>[s.createVNode("ul",{ref:i,class:["p-multiselect-items p-component",t],style:d,role:"listbox","aria-multiselectable":"true"},[l.optionGroupLabel?(s.openBlock(!0),s.createBlock(s.Fragment,{key:1},s.renderList(r,((t,i)=>(s.openBlock(),s.createBlock(s.Fragment,{key:o.getOptionGroupRenderKey(t)},[s.createVNode("li",x,[s.renderSlot(e.$slots,"optiongroup",{option:t,index:o.getOptionIndex(i,c)},(()=>[s.createTextVNode(s.toDisplayString(o.getOptionGroupLabel(t)),1)]))]),(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(o.getOptionGroupChildren(t),((t,i)=>s.withDirectives((s.openBlock(),s.createBlock("li",{class:["p-multiselect-item",{"p-highlight":o.isSelected(t),"p-disabled":o.isOptionDisabled(t)}],role:"option","aria-selected":o.isSelected(t),key:o.getOptionRenderKey(t),onClick:e=>o.onOptionSelect(e,t),onKeydown:e=>o.onOptionKeyDown(e,t),tabindex:l.tabindex||"0","aria-label":o.getOptionLabel(t)},[s.createVNode("div",V,[s.createVNode("div",{class:["p-checkbox-box",{"p-highlight":o.isSelected(t)}]},[s.createVNode("span",{class:["p-checkbox-icon",{"pi pi-check":o.isSelected(t)}]},null,2)],2)]),s.renderSlot(e.$slots,"option",{option:t,index:o.getOptionIndex(i,c)},(()=>[s.createVNode("span",null,s.toDisplayString(o.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128))],64)))),128)):(s.openBlock(!0),s.createBlock(s.Fragment,{key:0},s.renderList(r,((t,i)=>s.withDirectives((s.openBlock(),s.createBlock("li",{class:["p-multiselect-item",{"p-highlight":o.isSelected(t),"p-disabled":o.isOptionDisabled(t)}],role:"option","aria-selected":o.isSelected(t),key:o.getOptionRenderKey(t),onClick:e=>o.onOptionSelect(e,t),onKeydown:e=>o.onOptionKeyDown(e,t),tabindex:l.tabindex||"0","aria-label":o.getOptionLabel(t)},[s.createVNode("div",k,[s.createVNode("div",{class:["p-checkbox-box",{"p-highlight":o.isSelected(t)}]},[s.createVNode("span",{class:["p-checkbox-icon",{"pi pi-check":o.isSelected(t)}]},null,2)],2)]),s.renderSlot(e.$slots,"option",{option:t,index:o.getOptionIndex(i,c)},(()=>[s.createVNode("span",null,s.toDisplayString(o.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128)),n.filterValue&&(!r||r&&0===r.length)?(s.openBlock(),s.createBlock("li",O,[s.renderSlot(e.$slots,"emptyfilter",{},(()=>[s.createTextVNode(s.toDisplayString(o.emptyFilterMessageText),1)]))])):!l.options||l.options&&0===l.options.length?(s.openBlock(),s.createBlock("li",S,[s.renderSlot(e.$slots,"empty",{},(()=>[s.createTextVNode(s.toDisplayString(o.emptyMessageText),1)]))])):s.createCommentVNode("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:s.withCtx((({options:t})=>[s.renderSlot(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),s.renderSlot(e.$slots,"footer",{value:l.modelValue,options:o.visibleOptions})],2)):s.createCommentVNode("",!0)])),_:3},8,["onEnter","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.multiselect=function(e,t,l,i,n,s){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),a=o(i),c=o(n),d={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=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)},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)},isOptionDisabled(t){return!(!this.maxSelectionLimitReached||this.isSelected(t))||!!this.optionDisabled&&e.ObjectUtils.resolveFieldData(t,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(t,l){return t?l.findIndex((l=>t.some((t=>e.ObjectUtils.equals(t,this.getOptionValue(l),this.equalityKey))))):-1},isSelected(t){if(this.modelValue){let l=this.getOptionValue(t),i=this.equalityKey;return this.modelValue.some((t=>e.ObjectUtils.equals(t,l,i)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(t){this.disabled||this.loading||this.overlay&&this.overlay.contains(t.target)||e.DomHandler.hasClass(t.target,"p-multiselect-close")||(e.DomHandler.hasClass(t.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide()}},onOptionSelect(t,l){if(this.disabled||this.isOptionDisabled(l))return;let i=null;i=this.isSelected(l)?this.modelValue.filter((t=>!e.ObjectUtils.equals(t,this.getOptionValue(l),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(l)],this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:t,value:i})},onOptionKeyDown(e,t){let l=e.target;switch(e.which){case 40:var i=this.findNextItem(l);i&&i.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(l);n&&n.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(t){let l=t.nextElementSibling;return l?e.DomHandler.hasClass(l,"p-disabled")||e.DomHandler.hasClass(l,"p-multiselect-item-group")?this.findNextItem(l):l:null},findPrevItem(t){let l=t.previousElementSibling;return l?e.DomHandler.hasClass(l,"p-disabled")||e.DomHandler.hasClass(l,"p-multiselect-item-group")?this.findPrevItem(l):l:null},onOverlayEnter(t){if(e.ZIndexUtils.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e)}),0)}},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),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))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&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.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let l of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(l)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(t,l){for(let i of l){let l=this.getOptionValue(i);if(e.ObjectUtils.equals(l,t,this.equalityKey))return i}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>{for(let l of this.getOptionGroupChildren(e))t.push(this.getOptionValue(l))}))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(t){let l=this.modelValue.filter((l=>!e.ObjectUtils.equals(l,t,this.equalityKey)));this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:event,value:l})},onOverlayClick(e){r.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 i=l.FilterService.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return l.FilterService.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},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},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:a.default},components:{VirtualScroller:c.default}};const p={class:"p-hidden-accessible"},u={class:"p-multiselect-label-container"},h={class:"p-multiselect-token-label"},m={class:"p-multiselect-trigger"},b={key:0,class:"p-multiselect-header"},f={class:"p-hidden-accessible"},y={key:1,class:"p-multiselect-filter-container"},g=s.createVNode("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),v=s.createVNode("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1),k={class:"p-checkbox p-component"},x={class:"p-multiselect-item-group"},V={class:"p-checkbox p-component"},O={key:2,class:"p-multiselect-empty-message"},S={key:3,class:"p-multiselect-empty-message"};return function(e,t){void 0===t&&(t={});var l=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===l&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-multiselect {\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-multiselect-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-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\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 font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\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: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\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 overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),d.render=function(e,t,l,i,n,o){const r=s.resolveComponent("VirtualScroller"),a=s.resolveDirective("ripple");return s.openBlock(),s.createBlock("div",{ref:"container",class:o.containerClass,onClick:t[11]||(t[11]=(...e)=>o.onClick&&o.onClick(...e))},[s.createVNode("div",p,[s.createVNode("input",{ref:"focusInput",type:"text",role:"listbox",id:l.inputId,readonly:"",disabled:l.disabled,onFocus:t[1]||(t[1]=(...e)=>o.onFocus&&o.onFocus(...e)),onBlur:t[2]||(t[2]=(...e)=>o.onBlur&&o.onBlur(...e)),onKeydown:t[3]||(t[3]=(...e)=>o.onKeyDown&&o.onKeyDown(...e)),tabindex:l.tabindex,"aria-haspopup":"true","aria-expanded":n.overlayVisible,"aria-labelledby":l.ariaLabelledBy},null,40,["id","disabled","tabindex","aria-expanded","aria-labelledby"])]),s.createVNode("div",u,[s.createVNode("div",{class:o.labelClass},[s.renderSlot(e.$slots,"value",{value:l.modelValue,placeholder:l.placeholder},(()=>["comma"===l.display?(s.openBlock(),s.createBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(o.label||"empty"),1)],64)):"chip"===l.display?(s.openBlock(),s.createBlock(s.Fragment,{key:1},[(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(l.modelValue,(t=>(s.openBlock(),s.createBlock("div",{class:"p-multiselect-token",key:o.getLabelByValue(t)},[s.renderSlot(e.$slots,"chip",{value:t},(()=>[s.createVNode("span",h,s.toDisplayString(o.getLabelByValue(t)),1)])),l.disabled?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>o.removeChip(t)},null,8,["onClick"]))])))),128)),l.modelValue&&0!==l.modelValue.length?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(l.placeholder||"empty"),1)],64))],64)):s.createCommentVNode("",!0)]))],2)]),s.createVNode("div",m,[s.renderSlot(e.$slots,"indicator",{},(()=>[s.createVNode("span",{class:o.dropdownIconClass},null,2)]))]),(s.openBlock(),s.createBlock(s.Teleport,{to:o.appendTarget,disabled:o.appendDisabled},[s.createVNode(s.Transition,{name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},{default:s.withCtx((()=>[n.overlayVisible?(s.openBlock(),s.createBlock("div",{key:0,ref:o.overlayRef,class:o.panelStyleClass,onClick:t[10]||(t[10]=(...e)=>o.onOverlayClick&&o.onOverlayClick(...e))},[s.renderSlot(e.$slots,"header",{value:l.modelValue,options:o.visibleOptions}),l.showToggleAll&&null==l.selectionLimit||l.filter?(s.openBlock(),s.createBlock("div",b,[l.showToggleAll&&null==l.selectionLimit?(s.openBlock(),s.createBlock("div",{key:0,class:"p-checkbox p-component",onClick:t[6]||(t[6]=(...e)=>o.onToggleAll&&o.onToggleAll(...e)),role:"checkbox","aria-checked":o.allSelected},[s.createVNode("div",f,[s.createVNode("input",{type:"checkbox",readonly:"",onFocus:t[4]||(t[4]=(...e)=>o.onHeaderCheckboxFocus&&o.onHeaderCheckboxFocus(...e)),onBlur:t[5]||(t[5]=(...e)=>o.onHeaderCheckboxBlur&&o.onHeaderCheckboxBlur(...e))},null,32)]),s.createVNode("div",{class:["p-checkbox-box",{"p-highlight":o.allSelected,"p-focus":n.headerCheckboxFocused}],role:"checkbox","aria-checked":o.allSelected},[s.createVNode("span",{class:["p-checkbox-icon",{"pi pi-check":o.allSelected}]},null,2)],10,["aria-checked"])],8,["aria-checked"])):s.createCommentVNode("",!0),l.filter?(s.openBlock(),s.createBlock("div",y,[s.withDirectives(s.createVNode("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[7]||(t[7]=e=>n.filterValue=e),autoComplete:"on",class:"p-multiselect-filter p-inputtext p-component",placeholder:l.filterPlaceholder,onInput:t[8]||(t[8]=(...e)=>o.onFilterChange&&o.onFilterChange(...e))},null,40,["placeholder"]),[[s.vModelText,n.filterValue]]),g])):s.createCommentVNode("",!0),s.withDirectives(s.createVNode("button",{class:"p-multiselect-close p-link",onClick:t[9]||(t[9]=(...e)=>o.onCloseClick&&o.onCloseClick(...e)),type:"button"},[v],512),[[a]])])):s.createCommentVNode("",!0),s.createVNode("div",{class:"p-multiselect-items-wrapper",style:{"max-height":o.virtualScrollerDisabled?l.scrollHeight:""}},[s.createVNode(r,s.mergeProps({ref:o.virtualScrollerRef},l.virtualScrollerOptions,{items:o.visibleOptions,style:{height:l.scrollHeight},disabled:o.virtualScrollerDisabled}),s.createSlots({content:s.withCtx((({styleClass:t,contentRef:i,items:r,getItemOptions:c,contentStyle:d})=>[s.createVNode("ul",{ref:i,class:["p-multiselect-items p-component",t],style:d,role:"listbox","aria-multiselectable":"true"},[l.optionGroupLabel?(s.openBlock(!0),s.createBlock(s.Fragment,{key:1},s.renderList(r,((t,i)=>(s.openBlock(),s.createBlock(s.Fragment,{key:o.getOptionGroupRenderKey(t)},[s.createVNode("li",x,[s.renderSlot(e.$slots,"optiongroup",{option:t,index:o.getOptionIndex(i,c)},(()=>[s.createTextVNode(s.toDisplayString(o.getOptionGroupLabel(t)),1)]))]),(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(o.getOptionGroupChildren(t),((t,i)=>s.withDirectives((s.openBlock(),s.createBlock("li",{class:["p-multiselect-item",{"p-highlight":o.isSelected(t),"p-disabled":o.isOptionDisabled(t)}],role:"option","aria-selected":o.isSelected(t),key:o.getOptionRenderKey(t),onClick:e=>o.onOptionSelect(e,t),onKeydown:e=>o.onOptionKeyDown(e,t),tabindex:l.tabindex||"0","aria-label":o.getOptionLabel(t)},[s.createVNode("div",V,[s.createVNode("div",{class:["p-checkbox-box",{"p-highlight":o.isSelected(t)}]},[s.createVNode("span",{class:["p-checkbox-icon",{"pi pi-check":o.isSelected(t)}]},null,2)],2)]),s.renderSlot(e.$slots,"option",{option:t,index:o.getOptionIndex(i,c)},(()=>[s.createVNode("span",null,s.toDisplayString(o.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128))],64)))),128)):(s.openBlock(!0),s.createBlock(s.Fragment,{key:0},s.renderList(r,((t,i)=>s.withDirectives((s.openBlock(),s.createBlock("li",{class:["p-multiselect-item",{"p-highlight":o.isSelected(t),"p-disabled":o.isOptionDisabled(t)}],role:"option","aria-selected":o.isSelected(t),key:o.getOptionRenderKey(t),onClick:e=>o.onOptionSelect(e,t),onKeydown:e=>o.onOptionKeyDown(e,t),tabindex:l.tabindex||"0","aria-label":o.getOptionLabel(t)},[s.createVNode("div",k,[s.createVNode("div",{class:["p-checkbox-box",{"p-highlight":o.isSelected(t)}]},[s.createVNode("span",{class:["p-checkbox-icon",{"pi pi-check":o.isSelected(t)}]},null,2)],2)]),s.renderSlot(e.$slots,"option",{option:t,index:o.getOptionIndex(i,c)},(()=>[s.createVNode("span",null,s.toDisplayString(o.getOptionLabel(t)),1)]))],42,["aria-selected","onClick","onKeydown","tabindex","aria-label"])),[[a]]))),128)),n.filterValue&&(!r||r&&0===r.length)?(s.openBlock(),s.createBlock("li",O,[s.renderSlot(e.$slots,"emptyfilter",{},(()=>[s.createTextVNode(s.toDisplayString(o.emptyFilterMessageText),1)]))])):!l.options||l.options&&0===l.options.length?(s.openBlock(),s.createBlock("li",S,[s.renderSlot(e.$slots,"empty",{},(()=>[s.createTextVNode(s.toDisplayString(o.emptyMessageText),1)]))])):s.createCommentVNode("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:s.withCtx((({options:t})=>[s.renderSlot(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),s.renderSlot(e.$slots,"footer",{value:l.modelValue,options:o.visibleOptions})],2)):s.createCommentVNode("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)},d}(primevue.utils,primevue.overlayeventbus,primevue.api,primevue.ripple,primevue.virtualscroller,Vue);
|
package/orderlist/OrderList.d.ts
CHANGED
|
@@ -61,6 +61,10 @@ export interface OrderListProps {
|
|
|
61
61
|
* Default value is '960px'.
|
|
62
62
|
*/
|
|
63
63
|
breakpoint?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to displays rows with alternating colors.
|
|
66
|
+
*/
|
|
67
|
+
stripedRows?: boolean | undefined;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
export interface OrderListSlots {
|
package/orderlist/OrderList.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div :class="containerClass">
|
|
3
3
|
<div class="p-orderlist-controls">
|
|
4
4
|
<slot name="controlsstart"></slot>
|
|
5
5
|
<OLButton type="button" icon="pi pi-angle-up" @click="moveUp"></OLButton>
|
|
@@ -61,6 +61,10 @@ export default {
|
|
|
61
61
|
breakpoint: {
|
|
62
62
|
type: String,
|
|
63
63
|
default: '960px'
|
|
64
|
+
},
|
|
65
|
+
stripedRows: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
64
68
|
}
|
|
65
69
|
},
|
|
66
70
|
itemTouched: false,
|
|
@@ -352,6 +356,11 @@ export default {
|
|
|
352
356
|
}
|
|
353
357
|
},
|
|
354
358
|
computed: {
|
|
359
|
+
containerClass() {
|
|
360
|
+
return ['p-orderlist p-component', {
|
|
361
|
+
'p-orderlist-striped': this.stripedRows
|
|
362
|
+
}];
|
|
363
|
+
},
|
|
355
364
|
attributeSelector() {
|
|
356
365
|
return UniqueComponentId();
|
|
357
366
|
}
|
|
@@ -41,6 +41,10 @@ var script = {
|
|
|
41
41
|
breakpoint: {
|
|
42
42
|
type: String,
|
|
43
43
|
default: '960px'
|
|
44
|
+
},
|
|
45
|
+
stripedRows: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
44
48
|
}
|
|
45
49
|
},
|
|
46
50
|
itemTouched: false,
|
|
@@ -326,22 +330,26 @@ var script = {
|
|
|
326
330
|
}
|
|
327
331
|
},
|
|
328
332
|
computed: {
|
|
333
|
+
containerClass() {
|
|
334
|
+
return ['p-orderlist p-component', {
|
|
335
|
+
'p-orderlist-striped': this.stripedRows
|
|
336
|
+
}];
|
|
337
|
+
},
|
|
329
338
|
attributeSelector() {
|
|
330
339
|
return utils.UniqueComponentId();
|
|
331
340
|
}
|
|
332
341
|
},
|
|
333
342
|
components: {
|
|
334
|
-
'OLButton': Button__default[
|
|
343
|
+
'OLButton': Button__default['default']
|
|
335
344
|
},
|
|
336
345
|
directives: {
|
|
337
|
-
'ripple': Ripple__default[
|
|
346
|
+
'ripple': Ripple__default['default']
|
|
338
347
|
}
|
|
339
348
|
};
|
|
340
349
|
|
|
341
|
-
const _hoisted_1 = { class: "p-orderlist
|
|
342
|
-
const _hoisted_2 = { class: "p-orderlist-
|
|
343
|
-
const _hoisted_3 = {
|
|
344
|
-
const _hoisted_4 = {
|
|
350
|
+
const _hoisted_1 = { class: "p-orderlist-controls" };
|
|
351
|
+
const _hoisted_2 = { class: "p-orderlist-list-container" };
|
|
352
|
+
const _hoisted_3 = {
|
|
345
353
|
key: 0,
|
|
346
354
|
class: "p-orderlist-header"
|
|
347
355
|
};
|
|
@@ -350,8 +358,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
350
358
|
const _component_OLButton = vue.resolveComponent("OLButton");
|
|
351
359
|
const _directive_ripple = vue.resolveDirective("ripple");
|
|
352
360
|
|
|
353
|
-
return (vue.openBlock(), vue.createBlock("div",
|
|
354
|
-
vue.createVNode("div",
|
|
361
|
+
return (vue.openBlock(), vue.createBlock("div", { class: $options.containerClass }, [
|
|
362
|
+
vue.createVNode("div", _hoisted_1, [
|
|
355
363
|
vue.renderSlot(_ctx.$slots, "controlsstart"),
|
|
356
364
|
vue.createVNode(_component_OLButton, {
|
|
357
365
|
type: "button",
|
|
@@ -375,9 +383,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
375
383
|
}, null, 8, ["onClick"]),
|
|
376
384
|
vue.renderSlot(_ctx.$slots, "controlsend")
|
|
377
385
|
]),
|
|
378
|
-
vue.createVNode("div",
|
|
386
|
+
vue.createVNode("div", _hoisted_2, [
|
|
379
387
|
(_ctx.$slots.header)
|
|
380
|
-
? (vue.openBlock(), vue.createBlock("div",
|
|
388
|
+
? (vue.openBlock(), vue.createBlock("div", _hoisted_3, [
|
|
381
389
|
vue.renderSlot(_ctx.$slots, "header")
|
|
382
390
|
]))
|
|
383
391
|
: vue.createCommentVNode("", true),
|
|
@@ -414,7 +422,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
414
422
|
_: 3
|
|
415
423
|
}, 8, ["style"])
|
|
416
424
|
])
|
|
417
|
-
]))
|
|
425
|
+
], 2))
|
|
418
426
|
}
|
|
419
427
|
|
|
420
428
|
function styleInject(css, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/button"),t=require("primevue/utils"),i=require("primevue/ripple"),l=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),r=n(i),s={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.ObjectUtils.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let r=e.metaKey||e.ctrlKey;o&&r?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=r&&this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(l);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(l);o&&o.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let i=e.nextElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findPrevItem(i):null},updateListScroll(){const e=t.DomHandler.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":t.DomHandler.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:()=>t.UniqueComponentId()},components:{OLButton:o.default},directives:{ripple:r.default}};const d={class:"p-orderlist
|
|
1
|
+
"use strict";var e=require("primevue/button"),t=require("primevue/utils"),i=require("primevue/ripple"),l=require("vue");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),r=n(i),s={name:"OrderList",emits:["update:modelValue","reorder","update:selection","selection-change"],props:{modelValue:{type:Array,default:null},selection:{type:Array,default:null},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1}},itemTouched:!1,reorderDirection:null,styleElement:null,data(){return{d_selection:this.selection}},beforeUnmount(){this.destroyStyle()},updated(){this.reorderDirection&&(this.updateListScroll(),this.reorderDirection=null)},mounted(){this.responsive&&this.createStyle()},methods:{getItemKey(e,i){return this.dataKey?t.ObjectUtils.resolveFieldData(e,this.dataKey):i},isSelected(e){return-1!=t.ObjectUtils.findIndexInList(e,this.d_selection)},moveUp(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e[n],i=e[n-1];e[n-1]=t,e[n]=i}}this.reorderDirection="up",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveTop(){if(this.d_selection){let e=[...this.modelValue];for(let i=0;i<this.d_selection.length;i++){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(0===n)break;{let t=e.splice(n,1)[0];e.unshift(t)}}this.reorderDirection="top",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveDown(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e[n],i=e[n+1];e[n+1]=t,e[n]=i}}this.reorderDirection="down",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},moveBottom(){if(this.d_selection){let e=[...this.modelValue];for(let i=this.d_selection.length-1;i>=0;i--){let l=this.d_selection[i],n=t.ObjectUtils.findIndexInList(l,e);if(n===e.length-1)break;{let t=e.splice(n,1)[0];e.push(t)}}this.reorderDirection="bottom",this.$emit("update:modelValue",e),this.$emit("reorder",{originalEvent:event,value:e,direction:this.reorderDirection})}},onItemClick(e,i,l){this.itemTouched=!1;let n=t.ObjectUtils.findIndexInList(i,this.d_selection),o=-1!=n;if(!this.itemTouched&&this.metaKeySelection){let r=e.metaKey||e.ctrlKey;o&&r?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=r&&this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue))}else o?this.d_selection=this.d_selection.filter(((e,t)=>t!==n)):(this.d_selection=this.d_selection?[...this.d_selection]:[],t.ObjectUtils.insertIntoOrderedArray(i,l,this.d_selection,this.modelValue));this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemTouchEnd(){this.itemTouched=!0},onItemKeyDown(e,t,i){let l=e.currentTarget;switch(e.which){case 40:var n=this.findNextItem(l);n&&n.focus(),e.preventDefault();break;case 38:var o=this.findPrevItem(l);o&&o.focus(),e.preventDefault();break;case 13:this.onItemClick(e,t,i),e.preventDefault()}},findNextItem(e){let i=e.nextElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findNextItem(i):null},findPrevItem(e){let i=e.previousElementSibling;return i?t.DomHandler.hasClass(i,"p-orderlist-item")?i:this.findPrevItem(i):null},updateListScroll(){const e=t.DomHandler.find(this.$refs.list.$el,".p-orderlist-item.p-highlight");if(e&&e.length)switch(this.reorderDirection){case"up":t.DomHandler.scrollInView(this.$refs.list.$el,e[0]);break;case"top":this.$refs.list.$el.scrollTop=0;break;case"down":t.DomHandler.scrollInView(this.$refs.list.$el,e[e.length-1]);break;case"bottom":this.$refs.list.$el.scrollTop=this.$refs.list.$el.scrollHeight}},createStyle(){if(!this.styleElement){this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e=`\n@media screen and (max-width: ${this.breakpoint}) {\n .p-orderlist[${this.attributeSelector}] {\n flex-direction: column;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-orderlist[${this.attributeSelector}] .p-orderlist-controls .p-button:last-child {\n margin-right: 0;\n }\n}\n`;this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{containerClass(){return["p-orderlist p-component",{"p-orderlist-striped":this.stripedRows}]},attributeSelector:()=>t.UniqueComponentId()},components:{OLButton:o.default},directives:{ripple:r.default}};const d={class:"p-orderlist-controls"},c={class:"p-orderlist-list-container"},a={key:0,class:"p-orderlist-header"};!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-orderlist {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.p-orderlist-controls {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.p-orderlist-list-container {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-orderlist-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow: auto;\n min-height: 12rem;\n max-height: 24rem;\n}\n.p-orderlist-item {\n cursor: pointer;\n overflow: hidden;\n position: relative;\n}\n.p-orderlist.p-state-disabled .p-orderlist-item,\n.p-orderlist.p-state-disabled .p-button {\n cursor: default;\n}\n.p-orderlist.p-state-disabled .p-orderlist-list {\n overflow: hidden;\n}\n"),s.render=function(e,t,i,n,o,r){const s=l.resolveComponent("OLButton"),h=l.resolveDirective("ripple");return l.openBlock(),l.createBlock("div",{class:r.containerClass},[l.createVNode("div",d,[l.renderSlot(e.$slots,"controlsstart"),l.createVNode(s,{type:"button",icon:"pi pi-angle-up",onClick:r.moveUp},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-double-up",onClick:r.moveTop},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-down",onClick:r.moveDown},null,8,["onClick"]),l.createVNode(s,{type:"button",icon:"pi pi-angle-double-down",onClick:r.moveBottom},null,8,["onClick"]),l.renderSlot(e.$slots,"controlsend")]),l.createVNode("div",c,[e.$slots.header?(l.openBlock(),l.createBlock("div",a,[l.renderSlot(e.$slots,"header")])):l.createCommentVNode("",!0),l.createVNode(l.TransitionGroup,{ref:"list",name:"p-orderlist-flip",tag:"ul",class:"p-orderlist-list",style:i.listStyle,role:"listbox","aria-multiselectable":"multiple"},{default:l.withCtx((()=>[(l.openBlock(!0),l.createBlock(l.Fragment,null,l.renderList(i.modelValue,((i,n)=>l.withDirectives((l.openBlock(),l.createBlock("li",{key:r.getItemKey(i,n),tabindex:"0",class:["p-orderlist-item",{"p-highlight":r.isSelected(i)}],onClick:e=>r.onItemClick(e,i,n),onKeydown:e=>r.onItemKeyDown(e,i,n),onTouchend:t[1]||(t[1]=(...e)=>r.onItemTouchEnd&&r.onItemTouchEnd(...e)),role:"option","aria-selected":r.isSelected(i)},[l.renderSlot(e.$slots,"item",{item:i,index:n})],42,["onClick","onKeydown","aria-selected"])),[[h]]))),128))])),_:3},8,["style"])])],2)},module.exports=s;
|