primevue 3.42.0 → 3.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/Accordion.d.ts +8 -0
- package/accordion/Accordion.vue +1 -0
- package/accordion/accordion.cjs.js +3 -2
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +3 -2
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +3 -2
- package/accordion/accordion.min.js +1 -1
- package/accordiontab/AccordionTab.d.ts +6 -3
- package/animateonscroll/animateonscroll.cjs.js +2 -2
- package/animateonscroll/animateonscroll.cjs.min.js +1 -1
- package/animateonscroll/animateonscroll.esm.js +2 -2
- package/animateonscroll/animateonscroll.esm.min.js +1 -1
- package/animateonscroll/animateonscroll.js +2 -2
- package/animateonscroll/animateonscroll.min.js +1 -1
- package/api/api.cjs.js +6 -6
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +6 -6
- package/api/api.esm.min.js +1 -1
- package/api/api.js +6 -6
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +25 -2
- package/autocomplete/AutoComplete.vue +2 -1
- package/autocomplete/autocomplete.cjs.js +5 -3
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +5 -3
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +5 -3
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +6 -3
- package/avatar/Avatar.vue +4 -11
- package/avatar/avatar.cjs.js +4 -11
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +4 -11
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +4 -11
- package/avatar/avatar.min.js +1 -1
- package/badge/Badge.d.ts +8 -4
- package/badgedirective/BadgeDirective.d.ts +8 -0
- package/badgedirective/badgedirective.cjs.js +2 -2
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +2 -2
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +2 -2
- package/badgedirective/badgedirective.min.js +1 -1
- package/base/style/basestyle.cjs.js +2 -2
- package/base/style/basestyle.cjs.min.js +1 -1
- package/base/style/basestyle.esm.js +2 -2
- package/base/style/basestyle.esm.min.js +1 -1
- package/base/style/basestyle.js +2 -2
- package/base/style/basestyle.min.js +1 -1
- package/basecomponent/BaseComponent.vue +16 -1
- package/basecomponent/basecomponent.cjs.js +14 -5
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +14 -5
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +14 -5
- package/basecomponent/basecomponent.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.cjs.js +2 -2
- package/basecomponent/style/basecomponentstyle.cjs.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.esm.js +2 -2
- package/basecomponent/style/basecomponentstyle.esm.min.js +1 -1
- package/basecomponent/style/basecomponentstyle.js +2 -2
- package/basecomponent/style/basecomponentstyle.min.js +1 -1
- package/basedirective/basedirective.cjs.js +2 -3
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +2 -3
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +2 -3
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BlockUI.d.ts +8 -0
- package/breadcrumb/Breadcrumb.d.ts +8 -0
- package/button/Button.d.ts +10 -10
- package/button/Button.vue +1 -5
- package/button/button.cjs.js +1 -6
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +1 -6
- package/button/button.esm.min.js +1 -1
- package/button/button.js +1 -6
- package/button/button.min.js +1 -1
- package/button/style/buttonstyle.cjs.js +2 -2
- package/button/style/buttonstyle.cjs.min.js +1 -1
- package/button/style/buttonstyle.esm.js +2 -2
- package/button/style/buttonstyle.esm.min.js +1 -1
- package/button/style/buttonstyle.js +2 -2
- package/button/style/buttonstyle.min.js +1 -1
- package/calendar/Calendar.d.ts +37 -11
- package/calendar/Calendar.vue +9 -5
- package/calendar/calendar.cjs.js +10 -8
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +10 -8
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +10 -8
- package/calendar/calendar.min.js +1 -1
- package/carousel/Carousel.d.ts +8 -0
- package/carousel/Carousel.vue +4 -2
- package/carousel/carousel.cjs.js +5 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +5 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +5 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +8 -0
- package/cascadeselect/CascadeSelect.vue +1 -1
- package/cascadeselect/CascadeSelectSub.vue +4 -1
- package/cascadeselect/cascadeselect.cjs.js +7 -4
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +7 -4
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +7 -4
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/Chart.d.ts +8 -0
- package/chart/Chart.vue +1 -1
- package/chart/chart.cjs.js +4 -3
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +4 -3
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +4 -3
- package/chart/chart.min.js +1 -1
- package/chart/style/chartstyle.cjs.js +6 -2
- package/chart/style/chartstyle.cjs.min.js +1 -1
- package/chart/style/chartstyle.esm.js +6 -2
- package/chart/style/chartstyle.esm.min.js +1 -1
- package/chart/style/chartstyle.js +6 -2
- package/chart/style/chartstyle.min.js +1 -1
- package/checkbox/Checkbox.d.ts +8 -0
- package/checkbox/checkbox.cjs.js +2 -2
- package/checkbox/checkbox.cjs.min.js +1 -1
- package/checkbox/checkbox.esm.js +2 -2
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +2 -2
- package/checkbox/checkbox.min.js +1 -1
- package/chip/Chip.d.ts +8 -0
- package/chips/Chips.d.ts +8 -0
- package/chips/chips.cjs.js +2 -2
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +2 -2
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +2 -2
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +8 -0
- package/column/Column.d.ts +31 -13
- package/columngroup/ColumnGroup.d.ts +6 -3
- package/config/config.cjs.js +3 -3
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +3 -3
- package/config/config.esm.min.js +1 -1
- package/config/config.js +3 -3
- package/config/config.min.js +1 -1
- package/confirmdialog/ConfirmDialog.d.ts +24 -2
- package/confirmpopup/ConfirmPopup.d.ts +24 -2
- package/confirmpopup/confirmpopup.cjs.js +2 -2
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +2 -2
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +2 -2
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +8 -0
- package/contextmenu/contextmenu.cjs.js +2 -2
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +2 -2
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +2 -2
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +308 -229
- package/core/core.min.js +27 -27
- package/datatable/BodyCell.vue +1 -0
- package/datatable/ColumnFilter.vue +1 -0
- package/datatable/DataTable.d.ts +23 -1
- package/datatable/FooterCell.vue +1 -0
- package/datatable/HeaderCell.vue +1 -0
- package/datatable/HeaderCheckbox.vue +1 -0
- package/datatable/RowCheckbox.vue +2 -0
- package/datatable/RowRadioButton.vue +1 -0
- package/datatable/TableBody.vue +1 -0
- package/datatable/TableFooter.vue +2 -0
- package/datatable/TableHeader.vue +3 -0
- package/datatable/datatable.cjs.js +34 -20
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +34 -20
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +34 -20
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +24 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +8 -0
- package/deferredcontent/DeferredContent.d.ts +8 -0
- package/dialog/Dialog.d.ts +20 -16
- package/dialog/dialog.cjs.js +2 -2
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -2
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +2 -2
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +8 -0
- package/dock/Dock.d.ts +8 -0
- package/dropdown/Dropdown.d.ts +28 -24
- package/dropdown/Dropdown.vue +5 -3
- package/dropdown/dropdown.cjs.js +8 -7
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +8 -7
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +8 -7
- package/dropdown/dropdown.min.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.js +1 -1
- package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
- package/dropdown/style/dropdownstyle.esm.js +1 -1
- package/dropdown/style/dropdownstyle.esm.min.js +1 -1
- package/dropdown/style/dropdownstyle.js +1 -1
- package/dropdown/style/dropdownstyle.min.js +1 -1
- package/dynamicdialog/DynamicDialog.vue +1 -1
- package/dynamicdialog/dynamicdialog.cjs.js +1 -3
- package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
- package/dynamicdialog/dynamicdialog.esm.js +1 -3
- package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
- package/dynamicdialog/dynamicdialog.js +1 -3
- package/dynamicdialog/dynamicdialog.min.js +1 -1
- package/editor/Editor.d.ts +8 -0
- package/editor/editor.cjs.js +2 -2
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +8 -0
- package/fieldset/Fieldset.vue +1 -1
- package/fieldset/fieldset.cjs.js +3 -3
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +3 -3
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +3 -3
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/FileUpload.d.ts +30 -6
- package/galleria/BaseGalleria.vue +8 -0
- package/galleria/Galleria.d.ts +16 -0
- package/galleria/Galleria.vue +1 -1
- package/galleria/GalleriaContent.vue +11 -1
- package/galleria/GalleriaItem.vue +72 -3
- package/galleria/galleria.cjs.js +93 -13
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +93 -13
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +93 -13
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +8 -0
- package/image/Image.vue +4 -1
- package/image/image.cjs.js +20 -15
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +20 -15
- package/image/image.esm.min.js +1 -1
- package/image/image.js +20 -15
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +8 -0
- package/inplace/Inplace.d.ts +23 -1
- package/inplace/inplace.cjs.js +2 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +2 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -2
- package/inplace/inplace.min.js +1 -1
- package/inputgroup/InputGroup.d.ts +8 -0
- package/inputgroupaddon/InputGroupAddon.d.ts +8 -0
- package/inputmask/InputMask.d.ts +8 -0
- package/inputnumber/InputNumber.d.ts +30 -12
- package/inputnumber/InputNumber.vue +10 -5
- package/inputnumber/inputnumber.cjs.js +22 -23
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +22 -23
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +22 -23
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +8 -0
- package/inputswitch/inputswitch.cjs.js +2 -2
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +2 -2
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +2 -2
- package/inputswitch/inputswitch.min.js +1 -1
- package/inputtext/InputText.d.ts +8 -4
- package/inputtext/InputText.vue +9 -9
- package/inputtext/inputtext.cjs.js +9 -9
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +9 -9
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +9 -9
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +8 -0
- package/listbox/Listbox.d.ts +8 -0
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -2
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -2
- package/listbox/listbox.min.js +1 -1
- package/megamenu/MegaMenu.d.ts +8 -0
- package/menu/Menu.d.ts +8 -0
- package/menu/menu.cjs.js +2 -2
- 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 +2 -2
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +8 -0
- package/menubar/menubar.cjs.js +2 -2
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +2 -2
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +2 -2
- package/menubar/menubar.min.js +1 -1
- package/message/Message.d.ts +17 -13
- package/message/message.cjs.js +2 -2
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +2 -2
- package/message/message.esm.min.js +1 -1
- package/message/message.js +2 -2
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +8 -0
- package/multiselect/multiselect.cjs.js +4 -4
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +4 -4
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -4
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +27 -5
- package/orderlist/OrderList.vue +4 -4
- package/orderlist/orderlist.cjs.js +18 -18
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +18 -18
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +18 -18
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +8 -0
- package/organizationchart/organizationchart.cjs.js +2 -2
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -2
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +8 -0
- package/overlaypanel/overlaypanel.cjs.js +2 -2
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +2 -2
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +2 -2
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/Paginator.d.ts +44 -26
- package/paginator/style/paginatorstyle.cjs.js +2 -2
- package/paginator/style/paginatorstyle.cjs.min.js +1 -1
- package/paginator/style/paginatorstyle.esm.js +2 -2
- package/paginator/style/paginatorstyle.esm.min.js +1 -1
- package/paginator/style/paginatorstyle.js +2 -2
- package/paginator/style/paginatorstyle.min.js +1 -1
- package/panel/Panel.d.ts +8 -0
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +3 -3
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +3 -3
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +3 -3
- package/panel/panel.min.js +1 -1
- package/panelmenu/PanelMenu.d.ts +8 -0
- package/panelmenu/panelmenu.cjs.js +2 -2
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +2 -2
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +2 -2
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +2 -2
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +2 -2
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +2 -2
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +168 -124
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +168 -124
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +168 -124
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +25 -3
- package/password/Password.vue +2 -1
- package/password/password.cjs.js +5 -6
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +5 -6
- package/password/password.esm.min.js +1 -1
- package/password/password.js +5 -6
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +35 -13
- package/picklist/PickList.vue +48 -12
- package/picklist/picklist.cjs.js +49 -37
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +49 -37
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +49 -37
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +10 -6
- package/progressspinner/ProgressSpinner.d.ts +8 -0
- package/radiobutton/RadioButton.d.ts +8 -0
- package/radiobutton/radiobutton.cjs.js +2 -2
- package/radiobutton/radiobutton.cjs.min.js +1 -1
- package/radiobutton/radiobutton.esm.js +2 -2
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +2 -2
- package/radiobutton/radiobutton.min.js +1 -1
- package/rating/Rating.d.ts +8 -0
- package/row/Row.d.ts +6 -3
- package/scrollpanel/ScrollPanel.d.ts +8 -0
- package/scrollpanel/ScrollPanel.vue +8 -1
- package/scrollpanel/scrollpanel.cjs.js +14 -5
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +14 -5
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +14 -5
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/ScrollTop.d.ts +8 -0
- package/selectbutton/SelectButton.d.ts +8 -0
- package/sidebar/Sidebar.d.ts +8 -0
- package/sidebar/sidebar.cjs.js +2 -2
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +2 -2
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +2 -2
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +8 -0
- package/slider/Slider.d.ts +8 -0
- package/speeddial/SpeedDial.d.ts +23 -1
- package/speeddial/speeddial.cjs.js +2 -2
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +2 -2
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +2 -2
- package/speeddial/speeddial.min.js +1 -1
- package/speeddial/style/speeddialstyle.cjs.js +2 -2
- package/speeddial/style/speeddialstyle.cjs.min.js +1 -1
- package/speeddial/style/speeddialstyle.esm.js +2 -2
- package/speeddial/style/speeddialstyle.esm.min.js +1 -1
- package/speeddial/style/speeddialstyle.js +2 -2
- package/speeddial/style/speeddialstyle.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +24 -2
- package/splitbutton/SplitButton.vue +2 -2
- package/splitbutton/splitbutton.cjs.js +4 -4
- 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 +4 -4
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.cjs.js +3 -3
- package/splitbutton/style/splitbuttonstyle.cjs.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.esm.js +3 -3
- package/splitbutton/style/splitbuttonstyle.esm.min.js +1 -1
- package/splitbutton/style/splitbuttonstyle.js +3 -3
- package/splitbutton/style/splitbuttonstyle.min.js +1 -1
- package/splitter/Splitter.d.ts +8 -0
- package/splitterpanel/SplitterPanel.d.ts +8 -0
- package/steps/Steps.d.ts +8 -0
- package/tabmenu/TabMenu.d.ts +8 -0
- package/tabpanel/TabPanel.d.ts +8 -5
- package/tabview/TabView.vue +1 -0
- package/tabview/tabview.cjs.js +3 -2
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +3 -2
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +3 -2
- package/tabview/tabview.min.js +1 -1
- package/tag/Tag.d.ts +8 -0
- package/terminal/Terminal.d.ts +8 -0
- package/textarea/Textarea.d.ts +8 -0
- package/tieredmenu/TieredMenu.d.ts +18 -14
- package/tieredmenu/tieredmenu.cjs.js +2 -2
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +2 -2
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +2 -2
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +8 -0
- package/toast/Toast.d.ts +8 -0
- package/toast/style/toaststyle.cjs.js +2 -2
- package/toast/style/toaststyle.cjs.min.js +1 -1
- package/toast/style/toaststyle.esm.js +2 -2
- package/toast/style/toaststyle.esm.min.js +1 -1
- package/toast/style/toaststyle.js +2 -2
- package/toast/style/toaststyle.min.js +1 -1
- package/toast/toast.cjs.js +4 -4
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +4 -4
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +4 -4
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +8 -0
- package/togglebutton/togglebutton.cjs.js +2 -2
- package/togglebutton/togglebutton.cjs.min.js +1 -1
- package/togglebutton/togglebutton.esm.js +2 -2
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +2 -2
- package/togglebutton/togglebutton.min.js +1 -1
- package/toolbar/Toolbar.d.ts +8 -0
- package/tooltip/Tooltip.d.ts +8 -0
- package/tree/Tree.d.ts +46 -22
- package/tree/Tree.vue +3 -1
- package/tree/tree.cjs.js +9 -5
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +9 -5
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +9 -5
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +25 -3
- package/treeselect/treeselect.cjs.js +4 -4
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +4 -4
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +4 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +3 -1
- package/treetable/FooterCell.vue +1 -0
- package/treetable/HeaderCell.vue +1 -0
- package/treetable/TreeTable.d.ts +23 -1
- package/treetable/TreeTable.vue +3 -1
- package/treetable/treetable.cjs.js +19 -13
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +19 -13
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +19 -13
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +8 -0
- package/tristatecheckbox/tristatecheckbox.cjs.js +2 -2
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +2 -2
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +2 -2
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/usestyle/usestyle.cjs.js +2 -2
- package/usestyle/usestyle.cjs.min.js +1 -1
- package/usestyle/usestyle.esm.js +2 -2
- package/usestyle/usestyle.esm.min.js +1 -1
- package/usestyle/usestyle.js +2 -2
- package/usestyle/usestyle.min.js +1 -1
- package/utils/Utils.d.ts +1 -0
- package/utils/utils.cjs.js +27 -3
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +27 -3
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +27 -3
- package/utils/utils.min.js +1 -1
- package/virtualscroller/VirtualScroller.d.ts +8 -0
- package/virtualscroller/VirtualScroller.vue +1 -1
- package/virtualscroller/virtualscroller.cjs.js +5 -5
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +5 -5
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +5 -5
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/basecomponent";import t from"primevue/inputswitch/style";import{openBlock as n,createElementBlock as r,mergeProps as i,createElementVNode as u}from"vue";var l={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:e,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:t,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e
|
|
1
|
+
import e from"primevue/basecomponent";import t from"primevue/inputswitch/style";import{openBlock as n,createElementBlock as r,mergeProps as i,createElementVNode as u}from"vue";var l={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:e,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:t,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){var r;return(t="symbol"==o(r=p(t,"string"))?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var d=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"];l.render=function(e,t,l,o,a,s){return n(),r("div",i({class:e.cx("root"),style:e.sx("root"),onClick:t[2]||(t[2]=function(e){return s.onClick(e)})},e.ptm("root"),{"data-pc-name":"inputswitch"}),[u("div",i({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",i({ref:"input",id:e.inputId,type:"checkbox",role:"switch",class:e.inputClass,style:e.inputStyle,checked:s.checked,disabled:e.disabled,"aria-checked":s.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return s.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return s.onBlur(e)})},c(c({},e.inputProps),e.ptm("hiddenInput"))),null,16,d)],16),u("span",i({class:e.cx("slider")},e.ptm("slider")),null,16)],16)};export{l as default};
|
|
@@ -100,8 +100,8 @@ this.primevue.inputswitch = (function (BaseComponent, InputSwitchStyle, vue) {
|
|
|
100
100
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
101
101
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
102
102
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
103
|
-
function _toPropertyKey(
|
|
104
|
-
function _toPrimitive(
|
|
103
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
104
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
105
105
|
var _hoisted_1 = ["id", "checked", "disabled", "aria-checked", "aria-labelledby", "aria-label"];
|
|
106
106
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
107
107
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.inputswitch=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:r(e).default,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.inputswitch=function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i={name:"InputSwitch",extends:{name:"BaseInputSwitch",extends:r(e).default,props:{modelValue:{type:null,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:r(t).default,provide:function(){return{$parentInstance:this}}},emits:["click","update:modelValue","change","input","focus","blur"],data:function(){return{focused:!1}},methods:{onClick:function(e){if(!this.disabled){var t=this.checked?this.falseValue:this.trueValue;this.$emit("click",e),this.$emit("update:modelValue",t),this.$emit("change",e),this.$emit("input",t),this.$refs.input.focus()}},onFocus:function(e){this.focused=!0,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.$emit("blur",e)}},computed:{checked:function(){return this.modelValue===this.trueValue}}};function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){var r;return(t="symbol"==u(r=a(t,"string"))?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var s=["id","checked","disabled","aria-checked","aria-labelledby","aria-label"];return i.render=function(e,t,r,i,u,l){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:e.cx("root"),style:e.sx("root"),onClick:t[2]||(t[2]=function(e){return l.onClick(e)})},e.ptm("root"),{"data-pc-name":"inputswitch"}),[n.createElementVNode("div",n.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[n.createElementVNode("input",n.mergeProps({ref:"input",id:e.inputId,type:"checkbox",role:"switch",class:e.inputClass,style:e.inputStyle,checked:l.checked,disabled:e.disabled,"aria-checked":l.checked,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:t[0]||(t[0]=function(e){return l.onFocus(e)}),onBlur:t[1]||(t[1]=function(e){return l.onBlur(e)})},o(o({},e.inputProps),e.ptm("hiddenInput"))),null,16,s)],16),n.createElementVNode("span",n.mergeProps({class:e.cx("slider")},e.ptm("slider")),null,16)],16)},i}(primevue.basecomponent,primevue.inputswitch.style,Vue);
|
package/inputtext/InputText.d.ts
CHANGED
|
@@ -12,12 +12,12 @@ import { ComponentHooks } from '../basecomponent';
|
|
|
12
12
|
import { PassThroughOptions } from '../passthrough';
|
|
13
13
|
import { ClassComponent, GlobalComponentConstructor, Nullable, PassThrough } from '../ts-helpers';
|
|
14
14
|
|
|
15
|
-
export declare type InputTextPassThroughOptionType = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions) => InputTextPassThroughAttributes | string) | string | null | undefined;
|
|
15
|
+
export declare type InputTextPassThroughOptionType<T = any> = InputTextPassThroughAttributes | ((options: InputTextPassThroughMethodOptions<T>) => InputTextPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Custom passthrough(pt) option method.
|
|
19
19
|
*/
|
|
20
|
-
export interface InputTextPassThroughMethodOptions {
|
|
20
|
+
export interface InputTextPassThroughMethodOptions<T = any> {
|
|
21
21
|
/**
|
|
22
22
|
* Defines instance.
|
|
23
23
|
*/
|
|
@@ -30,6 +30,10 @@ export interface InputTextPassThroughMethodOptions {
|
|
|
30
30
|
* Defines current options.
|
|
31
31
|
*/
|
|
32
32
|
context: InputTextContext;
|
|
33
|
+
/**
|
|
34
|
+
* Defines parent instance.
|
|
35
|
+
*/
|
|
36
|
+
parent: T;
|
|
33
37
|
/**
|
|
34
38
|
* Defines passthrough(pt) options in global config.
|
|
35
39
|
*/
|
|
@@ -40,11 +44,11 @@ export interface InputTextPassThroughMethodOptions {
|
|
|
40
44
|
* Custom passthrough(pt) options.
|
|
41
45
|
* @see {@link InputTextProps.pt}
|
|
42
46
|
*/
|
|
43
|
-
export interface InputTextPassThroughOptions {
|
|
47
|
+
export interface InputTextPassThroughOptions<T = any> {
|
|
44
48
|
/**
|
|
45
49
|
* Used to pass attributes to the root's DOM element.
|
|
46
50
|
*/
|
|
47
|
-
root?: InputTextPassThroughOptionType
|
|
51
|
+
root?: InputTextPassThroughOptionType<T>;
|
|
48
52
|
/**
|
|
49
53
|
* Used to manage all lifecycle hooks.
|
|
50
54
|
* @see {@link BaseComponent.ComponentHooks}
|
package/inputtext/InputText.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="
|
|
2
|
+
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="getPTOptions('root')" data-pc-name="inputtext" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -10,6 +10,14 @@ export default {
|
|
|
10
10
|
extends: BaseInputText,
|
|
11
11
|
emits: ['update:modelValue'],
|
|
12
12
|
methods: {
|
|
13
|
+
getPTOptions(key) {
|
|
14
|
+
return this.ptm(key, {
|
|
15
|
+
context: {
|
|
16
|
+
filled: this.filled,
|
|
17
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
},
|
|
13
21
|
onInput(event) {
|
|
14
22
|
this.$emit('update:modelValue', event.target.value);
|
|
15
23
|
}
|
|
@@ -17,14 +25,6 @@ export default {
|
|
|
17
25
|
computed: {
|
|
18
26
|
filled() {
|
|
19
27
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
20
|
-
},
|
|
21
|
-
ptmParams() {
|
|
22
|
-
return {
|
|
23
|
-
context: {
|
|
24
|
-
filled: this.filled,
|
|
25
|
-
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
};
|
|
@@ -32,6 +32,14 @@ var script = {
|
|
|
32
32
|
"extends": script$1,
|
|
33
33
|
emits: ['update:modelValue'],
|
|
34
34
|
methods: {
|
|
35
|
+
getPTOptions: function getPTOptions(key) {
|
|
36
|
+
return this.ptm(key, {
|
|
37
|
+
context: {
|
|
38
|
+
filled: this.filled,
|
|
39
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
},
|
|
35
43
|
onInput: function onInput(event) {
|
|
36
44
|
this.$emit('update:modelValue', event.target.value);
|
|
37
45
|
}
|
|
@@ -39,14 +47,6 @@ var script = {
|
|
|
39
47
|
computed: {
|
|
40
48
|
filled: function filled() {
|
|
41
49
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
42
|
-
},
|
|
43
|
-
ptmParams: function ptmParams() {
|
|
44
|
-
return {
|
|
45
|
-
context: {
|
|
46
|
-
filled: this.filled,
|
|
47
|
-
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
};
|
|
@@ -59,7 +59,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59
59
|
onInput: _cache[0] || (_cache[0] = function () {
|
|
60
60
|
return $options.onInput && $options.onInput.apply($options, arguments);
|
|
61
61
|
})
|
|
62
|
-
},
|
|
62
|
+
}, $options.getPTOptions('root'), {
|
|
63
63
|
"data-pc-name": "inputtext"
|
|
64
64
|
}), null, 16, _hoisted_1);
|
|
65
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/inputtext/style"),n=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}
|
|
1
|
+
"use strict";var e=require("primevue/basecomponent"),t=require("primevue/inputtext/style"),n=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{getPTOptions:function(e){return this.ptm(e,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},i=["value"];l.render=function(e,t,u,l,o,r){return n.openBlock(),n.createElementBlock("input",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return r.onInput&&r.onInput.apply(r,arguments)})},r.getPTOptions("root"),{"data-pc-name":"inputtext"}),null,16,i)},module.exports=l;
|
|
@@ -25,6 +25,14 @@ var script = {
|
|
|
25
25
|
"extends": script$1,
|
|
26
26
|
emits: ['update:modelValue'],
|
|
27
27
|
methods: {
|
|
28
|
+
getPTOptions: function getPTOptions(key) {
|
|
29
|
+
return this.ptm(key, {
|
|
30
|
+
context: {
|
|
31
|
+
filled: this.filled,
|
|
32
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
},
|
|
28
36
|
onInput: function onInput(event) {
|
|
29
37
|
this.$emit('update:modelValue', event.target.value);
|
|
30
38
|
}
|
|
@@ -32,14 +40,6 @@ var script = {
|
|
|
32
40
|
computed: {
|
|
33
41
|
filled: function filled() {
|
|
34
42
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
35
|
-
},
|
|
36
|
-
ptmParams: function ptmParams() {
|
|
37
|
-
return {
|
|
38
|
-
context: {
|
|
39
|
-
filled: this.filled,
|
|
40
|
-
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -52,7 +52,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
52
52
|
onInput: _cache[0] || (_cache[0] = function () {
|
|
53
53
|
return $options.onInput && $options.onInput.apply($options, arguments);
|
|
54
54
|
})
|
|
55
|
-
},
|
|
55
|
+
}, $options.getPTOptions('root'), {
|
|
56
56
|
"data-pc-name": "inputtext"
|
|
57
57
|
}), null, 16, _hoisted_1);
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"primevue/basecomponent";import e from"primevue/inputtext/style";import{openBlock as n,createElementBlock as u,mergeProps as l}from"vue";var
|
|
1
|
+
import t from"primevue/basecomponent";import e from"primevue/inputtext/style";import{openBlock as n,createElementBlock as u,mergeProps as l}from"vue";var o={name:"InputText",extends:{name:"BaseInputText",extends:t,props:{modelValue:null,size:{type:String,default:null}},style:e,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{getPTOptions:function(t){return this.ptm(t,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(t){this.$emit("update:modelValue",t.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},i=["value"];o.render=function(t,e,o,a,r,p){return n(),u("input",l({class:t.cx("root"),value:t.modelValue,onInput:e[0]||(e[0]=function(){return p.onInput&&p.onInput.apply(p,arguments)})},p.getPTOptions("root"),{"data-pc-name":"inputtext"}),null,16,i)};export{o as default};
|
package/inputtext/inputtext.js
CHANGED
|
@@ -30,6 +30,14 @@ this.primevue.inputtext = (function (BaseComponent, InputTextStyle, vue) {
|
|
|
30
30
|
"extends": script$1,
|
|
31
31
|
emits: ['update:modelValue'],
|
|
32
32
|
methods: {
|
|
33
|
+
getPTOptions: function getPTOptions(key) {
|
|
34
|
+
return this.ptm(key, {
|
|
35
|
+
context: {
|
|
36
|
+
filled: this.filled,
|
|
37
|
+
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
},
|
|
33
41
|
onInput: function onInput(event) {
|
|
34
42
|
this.$emit('update:modelValue', event.target.value);
|
|
35
43
|
}
|
|
@@ -37,14 +45,6 @@ this.primevue.inputtext = (function (BaseComponent, InputTextStyle, vue) {
|
|
|
37
45
|
computed: {
|
|
38
46
|
filled: function filled() {
|
|
39
47
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
|
40
|
-
},
|
|
41
|
-
ptmParams: function ptmParams() {
|
|
42
|
-
return {
|
|
43
|
-
context: {
|
|
44
|
-
filled: this.filled,
|
|
45
|
-
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
};
|
|
@@ -57,7 +57,7 @@ this.primevue.inputtext = (function (BaseComponent, InputTextStyle, vue) {
|
|
|
57
57
|
onInput: _cache[0] || (_cache[0] = function () {
|
|
58
58
|
return $options.onInput && $options.onInput.apply($options, arguments);
|
|
59
59
|
})
|
|
60
|
-
},
|
|
60
|
+
}, $options.getPTOptions('root'), {
|
|
61
61
|
"data-pc-name": "inputtext"
|
|
62
62
|
}), null, 16, _hoisted_1);
|
|
63
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.inputtext=function(e,t,n){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.inputtext=function(e,t,n){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"InputText",extends:{name:"BaseInputText",extends:u(e).default,props:{modelValue:null,size:{type:String,default:null}},style:u(t).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue"],methods:{getPTOptions:function(e){return this.ptm(e,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0}}},i=["value"];return l.render=function(e,t,u,l,o,r){return n.openBlock(),n.createElementBlock("input",n.mergeProps({class:e.cx("root"),value:e.modelValue,onInput:t[0]||(t[0]=function(){return r.onInput&&r.onInput.apply(r,arguments)})},r.getPTOptions("root"),{"data-pc-name":"inputtext"}),null,16,i)},l}(primevue.basecomponent,primevue.inputtext.style,Vue);
|
package/knob/Knob.d.ts
CHANGED
|
@@ -29,6 +29,14 @@ export interface KnobPassThroughMethodOptions {
|
|
|
29
29
|
* Defines current inline state.
|
|
30
30
|
*/
|
|
31
31
|
state: KnobState;
|
|
32
|
+
/**
|
|
33
|
+
* Defines valid attributes.
|
|
34
|
+
*/
|
|
35
|
+
attrs: any;
|
|
36
|
+
/**
|
|
37
|
+
* Defines parent options.
|
|
38
|
+
*/
|
|
39
|
+
parent: any;
|
|
32
40
|
/**
|
|
33
41
|
* Defines passthrough(pt) options in global config.
|
|
34
42
|
*/
|
package/listbox/Listbox.d.ts
CHANGED
|
@@ -35,6 +35,14 @@ export interface ListboxPassThroughMethodOptions {
|
|
|
35
35
|
* Defines current options.
|
|
36
36
|
*/
|
|
37
37
|
context: ListboxContext;
|
|
38
|
+
/**
|
|
39
|
+
* Defines valid attributes.
|
|
40
|
+
*/
|
|
41
|
+
attrs: any;
|
|
42
|
+
/**
|
|
43
|
+
* Defines parent options.
|
|
44
|
+
*/
|
|
45
|
+
parent: any;
|
|
38
46
|
/**
|
|
39
47
|
* Defines passthrough(pt) options in global config.
|
|
40
48
|
*/
|
package/listbox/listbox.cjs.js
CHANGED
|
@@ -708,8 +708,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
708
708
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
709
709
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
710
710
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
711
|
-
function _toPropertyKey(
|
|
712
|
-
function _toPrimitive(
|
|
711
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
712
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
713
713
|
var _hoisted_1 = ["id"];
|
|
714
714
|
var _hoisted_2 = ["tabindex"];
|
|
715
715
|
var _hoisted_3 = ["placeholder", "aria-owns", "aria-activedescendant", "tabindex"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/api"),t=require("primevue/icons/search"),i=require("primevue/ripple"),n=require("primevue/utils"),o=require("primevue/virtualscroller"),s=require("primevue/basecomponent"),r=require("primevue/listbox/style"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(i),d=a(o);function p(e){return m(e)||O(e)||f(e)||h()}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if(e){if("string"==typeof e)return b(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(e,t):void 0}}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var g={name:"Listbox",extends:{name:"BaseListbox",extends:a(s).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a(r).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n.UniqueComponentId(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?n.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?n.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){n.DomHandler.focus(this.list);var e=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=n.DomHandler.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');n.DomHandler.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else n.DomHandler.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var o=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,o),e.preventDefault();break}!i&&n.ObjectUtils.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(p(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(p(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),r=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,r)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return n.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return n.ObjectUtils.equals(e,i,t.equalityKey)})):n.ObjectUtils.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!n.ObjectUtils.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=n.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return n.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return n.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:u.default},components:{VirtualScroller:d.default,SearchIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){I(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function I(e,t,i){return(t=S(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function S(e){var t=F(e,"string");return"symbol"===y(t)?t:String(t)}function F(e,t){if("object"!==y(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var V=["id"],M=["tabindex"],D=["placeholder","aria-owns","aria-activedescendant","tabindex"],w=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],K=["id"],L=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],E=["tabindex"];g.render=function(e,t,i,n,o,s){var r=l.resolveComponent("VirtualScroller"),a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[l.createElementVNode("span",l.mergeProps({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,M),l.renderSlot(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[l.createElementVNode("div",l.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[l.withDirectives(l.createElementVNode("input",l.mergeProps({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},x(x({},e.filterInputProps),e.ptm("filterInput"))),null,16,D),[[l.vModelText,o.filterValue]]),l.renderSlot(e.$slots,"filtericon",{class:l.normalizeClass(e.cx("filterIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),l.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.filterResultMessageText),17)],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),l.createSlots({content:l.withCtx((function(i){var n=i.styleClass,r=i.contentRef,c=i.items,u=i.getItemOptions,d=i.contentStyle,p=i.itemSize;return[l.createElementVNode("ul",l.mergeProps({ref:function(e){return s.listRef(e,r)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c,(function(i,n){return l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[l.renderSlot(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,K)):l.withDirectives((l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[l.renderSlot(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionLabel(i)),1)]}))],16,L)),[[a]])],64)})),128)),o.filterValue&&(!c||c&&0===c.length)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"emptyfilter",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"empty",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]}))],16)):l.createCommentVNode("",!0)],16,w)]})),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),l.renderSlot(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.emptyMessageText),17)):l.createCommentVNode("",!0),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.selectedMessageText),17),l.createElementVNode("span",l.mergeProps({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,E)],16,V)},module.exports=g;
|
|
1
|
+
"use strict";var e=require("primevue/api"),t=require("primevue/icons/search"),i=require("primevue/ripple"),n=require("primevue/utils"),o=require("primevue/virtualscroller"),s=require("primevue/basecomponent"),r=require("primevue/listbox/style"),l=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(i),d=a(o);function p(e){return m(e)||O(e)||f(e)||h()}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if(e){if("string"==typeof e)return b(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?b(e,t):void 0}}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function m(e){if(Array.isArray(e))return b(e)}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var g={name:"Listbox",extends:{name:"BaseListbox",extends:a(s).default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a(r).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n.UniqueComponentId()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n.UniqueComponentId(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?n.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?n.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?n.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&n.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return n.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){n.DomHandler.focus(this.list);var e=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=n.DomHandler.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=n.DomHandler.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');n.DomHandler.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else n.DomHandler.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var o=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,o),e.preventDefault();break}!i&&n.ObjectUtils.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(p(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(p(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),r=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,r)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return n.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return n.ObjectUtils.equals(e,i,t.equalityKey)})):n.ObjectUtils.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?n.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?n.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!n.ObjectUtils.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=n.DomHandler.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.FilterService.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return n.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return n.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:u.default},components:{VirtualScroller:d.default,SearchIcon:c.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){I(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function I(e,t,i){var n;return(t="symbol"==y(n=S(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function S(e,t){if("object"!=y(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var F=["id"],V=["tabindex"],M=["placeholder","aria-owns","aria-activedescendant","tabindex"],D=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],w=["id"],K=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],L=["tabindex"];g.render=function(e,t,i,n,o,s){var r=l.resolveComponent("VirtualScroller"),a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[l.createElementVNode("span",l.mergeProps({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,V),l.renderSlot(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[l.createElementVNode("div",l.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[l.withDirectives(l.createElementVNode("input",l.mergeProps({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},x(x({},e.filterInputProps),e.ptm("filterInput"))),null,16,M),[[l.vModelText,o.filterValue]]),l.renderSlot(e.$slots,"filtericon",{class:l.normalizeClass(e.cx("filterIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),l.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.filterResultMessageText),17)],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[l.createVNode(r,l.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),l.createSlots({content:l.withCtx((function(i){var n=i.styleClass,r=i.contentRef,c=i.items,u=i.getItemOptions,d=i.contentStyle,p=i.itemSize;return[l.createElementVNode("ul",l.mergeProps({ref:function(e){return s.listRef(e,r)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c,(function(i,n){return l.openBlock(),l.createElementBlock(l.Fragment,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[l.renderSlot(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,w)):l.withDirectives((l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:p?p+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[l.renderSlot(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[l.createTextVNode(l.toDisplayString(s.getOptionLabel(i)),1)]}))],16,K)),[[a]])],64)})),128)),o.filterValue&&(!c||c&&0===c.length)?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"emptyfilter",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("li",l.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[l.renderSlot(e.$slots,"empty",{},(function(){return[l.createTextVNode(l.toDisplayString(s.emptyMessageText),1)]}))],16)):l.createCommentVNode("",!0)],16,D)]})),_:2},[e.$slots.loader?{name:"loader",fn:l.withCtx((function(t){return[l.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),l.renderSlot(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(l.openBlock(),l.createElementBlock("span",l.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.emptyMessageText),17)):l.createCommentVNode("",!0),l.createElementVNode("span",l.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),l.toDisplayString(s.selectedMessageText),17),l.createElementVNode("span",l.mergeProps({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,L)],16,F)},module.exports=g;
|
package/listbox/listbox.esm.js
CHANGED
|
@@ -698,8 +698,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
698
698
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
699
699
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
700
700
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
701
|
-
function _toPropertyKey(
|
|
702
|
-
function _toPrimitive(
|
|
701
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
702
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
703
703
|
var _hoisted_1 = ["id"];
|
|
704
704
|
var _hoisted_2 = ["tabindex"];
|
|
705
705
|
var _hoisted_3 = ["placeholder", "aria-owns", "aria-activedescendant", "tabindex"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FilterService as e}from"primevue/api";import t from"primevue/icons/search";import i from"primevue/ripple";import{UniqueComponentId as n,ObjectUtils as o,DomHandler as s}from"primevue/utils";import l from"primevue/virtualscroller";import r from"primevue/basecomponent";import a from"primevue/listbox/style";import{resolveComponent as u,resolveDirective as d,openBlock as c,createElementBlock as p,mergeProps as h,createElementVNode as f,renderSlot as O,withDirectives as b,vModelText as m,normalizeClass as y,createBlock as g,resolveDynamicComponent as v,toDisplayString as x,createCommentVNode as I,createVNode as S,createSlots as F,withCtx as M,Fragment as K,renderList as w,createTextVNode as V}from"vue";function L(e){return $(e)||E(e)||T(e)||D()}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){if(e){if("string"==typeof e)return P(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?P(e,t):void 0}}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function $(e){if(Array.isArray(e))return P(e)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var k={name:"Listbox",extends:{name:"BaseListbox",extends:r,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?o.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?o.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?o.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&o.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return o.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return o.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){s.focus(this.list);var e=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=s.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');s.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else s.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var n=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,n),e.preventDefault();break}!i&&o.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(L(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(L(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),l=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,l)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return o.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return o.equals(e,i,t.equalityKey)})):o.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return o.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?o.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!o.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return o.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return o.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:i},components:{VirtualScroller:l,SearchIcon:t}};function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function H(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach((function(t){G(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function G(e,t,i){return(t=j(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function j(e){var t=C(e,"string");return"symbol"===R(t)?t:String(t)}function C(e,t){if("object"!==R(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B=["id"],U=["tabindex"],N=["placeholder","aria-owns","aria-activedescendant","tabindex"],_=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],q=["id"],z=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],W=["tabindex"];k.render=function(e,t,i,n,o,s){var l=u("VirtualScroller"),r=d("ripple");return c(),p("div",h({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[f("span",h({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,U),O(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(c(),p("div",h({key:0,class:e.cx("header")},e.ptm("header")),[f("div",h({class:e.cx("filterContainer")},e.ptm("filterContainer")),[b(f("input",h({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},H(H({},e.filterInputProps),e.ptm("filterInput"))),null,16,N),[[m,o.filterValue]]),O(e.$slots,"filtericon",{class:y(e.cx("filterIcon"))},(function(){return[(c(),g(v(e.filterIcon?"span":"SearchIcon"),h({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),x(s.filterResultMessageText),17)],16)):I("",!0),f("div",h({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[S(l,h({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),F({content:M((function(i){var n=i.styleClass,l=i.contentRef,a=i.items,u=i.getItemOptions,d=i.contentStyle,m=i.itemSize;return[f("ul",h({ref:function(e){return s.listRef(e,l)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(c(!0),p(K,null,w(a,(function(i,n){return c(),p(K,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(c(),p("li",h({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[O(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,q)):b((c(),p("li",h({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[O(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionLabel(i)),1)]}))],16,z)),[[r]])],64)})),128)),o.filterValue&&(!a||a&&0===a.length)?(c(),p("li",h({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"emptyfilter",{},(function(){return[V(x(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(c(),p("li",h({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"empty",{},(function(){return[V(x(s.emptyMessageText),1)]}))],16)):I("",!0)],16,_)]})),_:2},[e.$slots.loader?{name:"loader",fn:M((function(t){return[O(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),O(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(c(),p("span",h({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),x(s.emptyMessageText),17)):I("",!0),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),x(s.selectedMessageText),17),f("span",h({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,W)],16,B)};export{k as default};
|
|
1
|
+
import{FilterService as e}from"primevue/api";import t from"primevue/icons/search";import i from"primevue/ripple";import{UniqueComponentId as n,ObjectUtils as o,DomHandler as s}from"primevue/utils";import l from"primevue/virtualscroller";import r from"primevue/basecomponent";import a from"primevue/listbox/style";import{resolveComponent as u,resolveDirective as d,openBlock as c,createElementBlock as p,mergeProps as h,createElementVNode as f,renderSlot as O,withDirectives as b,vModelText as m,normalizeClass as y,createBlock as g,resolveDynamicComponent as v,toDisplayString as x,createCommentVNode as I,createVNode as S,createSlots as F,withCtx as M,Fragment as K,renderList as w,createTextVNode as V}from"vue";function L(e){return $(e)||E(e)||T(e)||D()}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){if(e){if("string"==typeof e)return P(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?P(e,t):void 0}}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function $(e){if(Array.isArray(e))return P(e)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var k={name:"Listbox",extends:{name:"BaseListbox",extends:r,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:{type:Boolean,default:!1},dataKey:null,multiple:{type:Boolean,default:!1},metaKeySelection:{type:Boolean,default:!0},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:a,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","filter"],list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data:function(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||n(),this.autoUpdateModel()},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?o.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?o.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?o.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&o.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return o.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return o.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},onFirstHiddenFocus:function(){s.focus(this.list);var e=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');this.$refs.lastHiddenFocusableElement.tabIndex=s.isElement(e)?void 0:-1,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus:function(e){if(e.relatedTarget===this.list){var t=s.getFirstFocusableElement(this.$el,':not([data-p-hidden-focusable="true"])');s.focus(t),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else s.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout:function(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus:function(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.autoUpdateModel(),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown:function(e){var t=this,i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&i){var n=this.visibleOptions.filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,n),e.preventDefault();break}!i&&o.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown:function(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd:function(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle:function(e,t){var i=this.isSelected(t),n=!1,o=null;!this.optionTouched&&this.metaKeySelection?i?e&&(e.metaKey||e.ctrlKey)&&(o=null,n=!0):(o=this.getOptionValue(t),n=!0):(o=i?null:this.getOptionValue(t),n=!0);n&&this.updateModel(e,o)},onOptionSelectMultiple:function(e,t){var i=this.isSelected(t),n=null;if(!this.optionTouched&&this.metaKeySelection){var o=e.metaKey||e.ctrlKey;n=i?o?this.removeOption(t):[this.getOptionValue(t)]:[].concat(L(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(L(this.modelValue||[]),[this.getOptionValue(t)]);this.updateModel(e,n)},onOptionSelectRange:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===i&&(i=this.findNearestSelectedOptionIndex(n,!0)),-1===n&&(n=this.findNearestSelectedOptionIndex(i)),-1!==i&&-1!==n){var o=Math.min(i,n),s=Math.max(i,n),l=this.visibleOptions.slice(o,s+1).filter((function(e){return t.isValidOption(e)})).map((function(e){return t.getOptionValue(e)}));this.updateModel(e,l)}},onFilterChange:function(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur:function(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey:function(e){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey:function(e){var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{var t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{var n=e.metaKey||e.ctrlKey,o=this.findLastOptionIndex();this.multiple&&e.shiftKey&&n&&this.onOptionSelectRange(e,this.startRangeIndex,o),this.changeFocusedOptionIndex(e,o)}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched:function(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return o.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return o.equals(e,i,t.equalityKey)})):o.equals(this.modelValue,i,this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return o.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?o.findLastIndex(this.visibleOptions,(function(t){return e.isValidSelectedOption(t)})):-1},findNextSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var t=this,i=this.hasSelectedOption&&e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidSelectedOption(e)})):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var t=-1;return this.hasSelectedOption&&(t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?-1===(t=this.findPrevSelectedOptionIndex(e))?this.findNextSelectedOptionIndex(e):t:-1===(t=this.findNextSelectedOptionIndex(e))?this.findPrevSelectedOptionIndex(e):t),t>-1?t:e},findFirstFocusedOptionIndex:function(){var e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1;-1===(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500)},removeOption:function(e){var t=this;return this.modelValue.filter((function(i){return!o.equals(i,t.getOptionValue(e),t.equalityKey)}))},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=-1!==e?"".concat(this.id,"_").concat(e):this.focusedOptionId,i=s.findSingle(this.list,'li[id="'.concat(t,'"]'));i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&this.focused&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption:function(){return o.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return o.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:i},components:{VirtualScroller:l,SearchIcon:t}};function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function H(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach((function(t){G(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function G(e,t,i){var n;return(t="symbol"==R(n=j(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function j(e,t){if("object"!=R(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var C=["id"],B=["tabindex"],U=["placeholder","aria-owns","aria-activedescendant","tabindex"],N=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],_=["id"],q=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"],z=["tabindex"];k.render=function(e,t,i,n,o,s){var l=u("VirtualScroller"),r=d("ripple");return c(),p("div",h({id:o.id,class:e.cx("root"),onFocusout:t[10]||(t[10]=function(){return s.onFocusout&&s.onFocusout.apply(s,arguments)})},e.ptm("root"),{"data-pc-name":"listbox"}),[f("span",h({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[0]||(t[0]=function(){return s.onFirstHiddenFocus&&s.onFirstHiddenFocus.apply(s,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,B),O(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(c(),p("div",h({key:0,class:e.cx("header")},e.ptm("header")),[f("div",h({class:e.cx("filterContainer")},e.ptm("filterContainer")),[b(f("input",h({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=function(e){return o.filterValue=e}),type:"text",class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":s.focusedOptionId,tabindex:e.disabled||o.focused?-1:e.tabindex,onInput:t[2]||(t[2]=function(){return s.onFilterChange&&s.onFilterChange.apply(s,arguments)}),onBlur:t[3]||(t[3]=function(){return s.onFilterBlur&&s.onFilterBlur.apply(s,arguments)}),onKeydown:t[4]||(t[4]=function(){return s.onFilterKeyDown&&s.onFilterKeyDown.apply(s,arguments)})},H(H({},e.filterInputProps),e.ptm("filterInput"))),null,16,U),[[m,o.filterValue]]),O(e.$slots,"filtericon",{class:y(e.cx("filterIcon"))},(function(){return[(c(),g(v(e.filterIcon?"span":"SearchIcon"),h({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),x(s.filterResultMessageText),17)],16)):I("",!0),f("div",h({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[S(l,h({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),F({content:M((function(i){var n=i.styleClass,l=i.contentRef,a=i.items,u=i.getItemOptions,d=i.contentStyle,m=i.itemSize;return[f("ul",h({ref:function(e){return s.listRef(e,l)},id:o.id+"_list",class:[e.cx("list"),n],style:d,tabindex:-1,role:"listbox","aria-multiselectable":e.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[6]||(t[6]=function(){return s.onListFocus&&s.onListFocus.apply(s,arguments)}),onBlur:t[7]||(t[7]=function(){return s.onListBlur&&s.onListBlur.apply(s,arguments)}),onKeydown:t[8]||(t[8]=function(){return s.onListKeyDown&&s.onListKeyDown.apply(s,arguments)})},e.ptm("list")),[(c(!0),p(K,null,w(a,(function(i,n){return c(),p(K,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(c(),p("li",h({key:0,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[O(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,_)):b((c(),p("li",h({key:1,id:o.id+"_"+s.getOptionIndex(n,u),style:{height:m?m+"px":void 0},class:e.cx("item",{option:i,index:n,getItemOptions:u}),role:"option","aria-label":s.getOptionLabel(i),"aria-selected":s.isSelected(i),"aria-disabled":s.isOptionDisabled(i),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(n,u)),onClick:function(e){return s.onOptionSelect(e,i,s.getOptionIndex(n,u))},onMousedown:function(e){return s.onOptionMouseDown(e,s.getOptionIndex(n,u))},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(n,u))},onTouchend:t[5]||(t[5]=function(e){return s.onOptionTouchEnd()})},s.getPTOptions(i,u,n,"item"),{"data-p-highlight":s.isSelected(i),"data-p-focused":o.focusedOptionIndex===s.getOptionIndex(n,u),"data-p-disabled":s.isOptionDisabled(i)}),[O(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[V(x(s.getOptionLabel(i)),1)]}))],16,q)),[[r]])],64)})),128)),o.filterValue&&(!a||a&&0===a.length)?(c(),p("li",h({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"emptyfilter",{},(function(){return[V(x(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(c(),p("li",h({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[O(e.$slots,"empty",{},(function(){return[V(x(s.emptyMessageText),1)]}))],16)):I("",!0)],16,N)]})),_:2},[e.$slots.loader?{name:"loader",fn:M((function(t){return[O(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),O(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(c(),p("span",h({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),x(s.emptyMessageText),17)):I("",!0),f("span",h({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),x(s.selectedMessageText),17),f("span",h({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:e.disabled?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return s.onLastHiddenFocus&&s.onLastHiddenFocus.apply(s,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16,z)],16,C)};export{k as default};
|