primevue 3.34.0 → 3.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/accordion/BaseAccordion.vue +17 -15
- package/accordion/accordion.cjs.js +1 -1
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordion/accordion.min.js +1 -1
- package/autocomplete/AutoComplete.vue +1 -1
- package/autocomplete/BaseAutoComplete.vue +81 -79
- package/autocomplete/autocomplete.cjs.js +4 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +4 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +4 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/BaseAvatar.vue +30 -28
- package/avatar/avatar.cjs.js +1 -1
- package/avatar/avatar.cjs.min.js +1 -1
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatar/avatar.min.js +1 -1
- package/avatargroup/BaseAvatarGroup.vue +9 -7
- package/avatargroup/avatargroup.cjs.js +1 -1
- package/avatargroup/avatargroup.cjs.min.js +1 -1
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/avatargroup/avatargroup.min.js +1 -1
- package/badge/BaseBadge.vue +33 -31
- package/badge/badge.cjs.js +1 -1
- package/badge/badge.cjs.min.js +1 -1
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +1 -1
- package/badge/badge.min.js +1 -1
- package/badgedirective/badgedirective.cjs.js +1 -1
- package/badgedirective/badgedirective.cjs.min.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/badgedirective/badgedirective.min.js +1 -1
- package/base/base.cjs.js +1 -1
- package/base/base.cjs.min.js +1 -1
- package/base/base.esm.js +1 -1
- package/base/base.esm.min.js +1 -1
- package/base/base.js +1 -1
- package/base/base.min.js +1 -1
- package/basecomponent/BaseComponent.vue +11 -8
- package/basecomponent/basecomponent.cjs.js +18 -13
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +18 -13
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +18 -13
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +7 -6
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +7 -6
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +7 -6
- package/basedirective/basedirective.min.js +1 -1
- package/blockui/BaseBlockUI.vue +12 -10
- package/blockui/BlockUI.vue +2 -0
- package/blockui/blockui.cjs.js +3 -1
- package/blockui/blockui.cjs.min.js +1 -1
- package/blockui/blockui.esm.js +3 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +3 -1
- package/blockui/blockui.min.js +1 -1
- package/breadcrumb/BaseBreadcrumb.vue +32 -30
- package/breadcrumb/Breadcrumb.vue +1 -1
- package/breadcrumb/breadcrumb.cjs.js +2 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +2 -2
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +2 -2
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/calendar/BaseCalendar.vue +149 -146
- package/calendar/Calendar.d.ts +11 -5
- package/calendar/Calendar.vue +85 -47
- package/calendar/calendar.cjs.js +162 -118
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +162 -118
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +162 -118
- package/calendar/calendar.min.js +1 -1
- package/carousel/BaseCarousel.vue +70 -68
- package/carousel/carousel.cjs.js +1 -1
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +1 -1
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +1 -1
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/BaseCascadeSelect.vue +81 -79
- package/cascadeselect/cascadeselect.cjs.js +1 -1
- package/cascadeselect/cascadeselect.cjs.min.js +1 -1
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +1 -1
- package/cascadeselect/cascadeselect.min.js +1 -1
- package/chart/BaseChart.vue +4 -2
- package/chart/chart.cjs.js +1 -1
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +1 -1
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +1 -1
- package/chart/chart.min.js +1 -1
- package/chip/BaseChip.vue +22 -20
- package/chip/chip.cjs.js +1 -1
- package/chip/chip.cjs.min.js +1 -1
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chip/chip.min.js +1 -1
- package/chips/BaseChips.vue +46 -44
- package/chips/chips.cjs.js +1 -1
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/chips/chips.min.js +1 -1
- package/colorpicker/BaseColorPicker.vue +8 -6
- package/colorpicker/colorpicker.cjs.js +1 -1
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +1 -1
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +1 -1
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +8 -0
- package/config/PrimeVue.d.ts +3 -0
- package/config/config.cjs.js +5 -0
- package/config/config.cjs.min.js +1 -1
- package/config/config.esm.js +5 -0
- package/config/config.esm.min.js +1 -1
- package/config/config.js +5 -0
- package/config/config.min.js +1 -1
- package/confirmdialog/BaseConfirmDialog.vue +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +22 -0
- package/confirmdialog/ConfirmDialog.vue +15 -10
- package/confirmdialog/confirmdialog.cjs.js +42 -29
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +43 -30
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +42 -29
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/BaseConfirmPopup.vue +72 -70
- package/confirmpopup/ConfirmPopup.d.ts +18 -0
- package/confirmpopup/ConfirmPopup.vue +45 -24
- package/confirmpopup/confirmpopup.cjs.js +14 -10
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +15 -11
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +14 -10
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/BaseContextMenu.vue +41 -39
- package/contextmenu/contextmenu.cjs.js +1 -1
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +1 -1
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +1 -1
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +138 -76
- package/core/core.min.js +18 -18
- package/datatable/BaseDataTable.vue +235 -233
- package/datatable/BodyCell.vue +1 -1
- package/datatable/ColumnFilter.vue +1 -1
- package/datatable/DataTable.d.ts +48 -4
- package/datatable/DataTable.vue +32 -19
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +74 -24
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +74 -24
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +74 -24
- package/datatable/datatable.min.js +1 -1
- package/dialog/BaseDialog.vue +136 -130
- package/dialog/Dialog.d.ts +20 -0
- package/dialog/Dialog.vue +54 -50
- package/dialog/dialog.cjs.js +24 -9
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +25 -10
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +24 -9
- package/dialog/dialog.min.js +1 -1
- package/divider/BaseDivider.vue +61 -59
- package/divider/divider.cjs.js +1 -1
- package/divider/divider.cjs.min.js +1 -1
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/divider/divider.min.js +1 -1
- package/dock/BaseDock.vue +106 -104
- package/dock/dock.cjs.js +1 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +1 -1
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +1 -1
- package/dock/dock.min.js +1 -1
- package/dropdown/BaseDropdown.vue +93 -91
- package/dropdown/dropdown.cjs.js +1 -1
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +1 -1
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +1 -1
- package/dropdown/dropdown.min.js +1 -1
- package/fieldset/BaseFieldset.vue +19 -17
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.cjs.min.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +1 -1
- package/fieldset/fieldset.min.js +1 -1
- package/fileupload/BaseFileUpload.vue +44 -42
- package/fileupload/fileupload.cjs.js +1 -1
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +1 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +1 -1
- package/fileupload/fileupload.min.js +1 -1
- package/galleria/BaseGalleria.vue +283 -281
- package/galleria/Galleria.vue +3 -0
- package/galleria/galleria.cjs.js +4 -1
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +4 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +4 -1
- package/galleria/galleria.min.js +1 -1
- package/image/BaseImage.vue +64 -62
- package/image/Image.vue +4 -0
- package/image/image.cjs.js +5 -1
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +5 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +5 -1
- package/image/image.min.js +1 -1
- package/inlinemessage/BaseInlineMessage.vue +16 -14
- package/inlinemessage/inlinemessage.cjs.js +1 -1
- package/inlinemessage/inlinemessage.cjs.min.js +1 -1
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inlinemessage/inlinemessage.min.js +1 -1
- package/inplace/BaseInplace.vue +18 -16
- package/inplace/Inplace.vue +1 -1
- package/inplace/inplace.cjs.js +4 -2
- package/inplace/inplace.cjs.min.js +1 -1
- package/inplace/inplace.esm.js +4 -2
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +4 -2
- package/inplace/inplace.min.js +1 -1
- package/inputnumber/BaseInputNumber.vue +101 -99
- package/inputnumber/InputNumber.vue +4 -4
- package/inputnumber/inputnumber.cjs.js +13 -5
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +13 -5
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +13 -5
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/BaseInputSwitch.vue +20 -18
- package/inputswitch/inputswitch.cjs.js +1 -1
- package/inputswitch/inputswitch.cjs.min.js +1 -1
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputswitch/inputswitch.min.js +1 -1
- package/knob/BaseKnob.vue +14 -12
- package/knob/knob.cjs.js +1 -1
- package/knob/knob.cjs.min.js +1 -1
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/knob/knob.min.js +1 -1
- package/listbox/BaseListbox.vue +34 -32
- package/listbox/listbox.cjs.js +1 -1
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +1 -1
- package/listbox/listbox.min.js +1 -1
- package/megamenu/BaseMegaMenu.vue +111 -109
- package/megamenu/megamenu.cjs.js +1 -1
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +1 -1
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +1 -1
- package/megamenu/megamenu.min.js +1 -1
- package/menu/BaseMenu.vue +19 -17
- package/menu/menu.cjs.js +1 -1
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +1 -1
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +1 -1
- package/menu/menu.min.js +1 -1
- package/menubar/BaseMenubar.vue +72 -70
- package/menubar/Menubar.vue +2 -2
- package/menubar/menubar.cjs.js +3 -3
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +3 -3
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +3 -3
- package/menubar/menubar.min.js +1 -1
- package/message/BaseMessage.vue +49 -47
- package/message/Message.d.ts +10 -0
- package/message/Message.vue +2 -1
- package/message/message.cjs.js +7 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +8 -4
- package/message/message.esm.min.js +1 -1
- package/message/message.js +7 -3
- package/message/message.min.js +1 -1
- package/multiselect/BaseMultiSelect.vue +106 -104
- package/multiselect/multiselect.cjs.js +1 -1
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -1
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/BaseOrderList.vue +38 -36
- package/orderlist/OrderList.vue +4 -4
- package/orderlist/orderlist.cjs.js +13 -5
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +14 -6
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +13 -5
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/BaseOrganizationChart.vue +53 -51
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +1 -1
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +1 -1
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlaypanel/BaseOverlayPanel.vue +70 -68
- package/overlaypanel/OverlayPanel.d.ts +15 -0
- package/overlaypanel/OverlayPanel.vue +11 -8
- package/overlaypanel/overlaypanel.cjs.js +11 -3
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.esm.js +12 -4
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +11 -3
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/BasePaginator.vue +40 -38
- package/paginator/JumpToPageDropdown.vue +7 -2
- package/paginator/Paginator.d.ts +20 -0
- package/paginator/Paginator.vue +7 -4
- package/paginator/RowsPerPageDropdown.vue +7 -2
- package/paginator/paginator.cjs.js +41 -12
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +42 -13
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +41 -12
- package/paginator/paginator.min.js +1 -1
- package/panel/BasePanel.vue +20 -18
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.cjs.min.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +1 -1
- package/panel/panel.min.js +1 -1
- package/panelmenu/BasePanelMenu.vue +33 -31
- package/panelmenu/panelmenu.cjs.js +1 -1
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -1
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -1
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/index.cjs.js +2 -9
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.esm.js +2 -9
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +2 -9
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +5 -5
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +5 -5
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +5 -5
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/BasePassword.vue +27 -25
- package/password/password.cjs.js +1 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +1 -1
- package/password/password.min.js +1 -1
- package/picklist/BasePickList.vue +34 -32
- package/picklist/PickList.vue +12 -12
- package/picklist/picklist.cjs.js +37 -13
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +38 -14
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +37 -13
- package/picklist/picklist.min.js +1 -1
- package/progressbar/BaseProgressBar.vue +99 -97
- package/progressbar/progressbar.cjs.js +1 -1
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +1 -1
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +1 -1
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/BaseProgressSpinner.vue +26 -24
- package/progressspinner/progressspinner.cjs.js +1 -1
- package/progressspinner/progressspinner.cjs.min.js +1 -1
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/progressspinner/progressspinner.min.js +1 -1
- package/rating/BaseRating.vue +19 -17
- package/rating/Rating.vue +4 -1
- package/rating/rating.cjs.js +7 -5
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +7 -5
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +7 -5
- package/rating/rating.min.js +1 -1
- package/resources/themes/arya-blue/theme.css +5601 -5585
- package/resources/themes/arya-green/theme.css +5601 -5585
- package/resources/themes/arya-orange/theme.css +5601 -5585
- package/resources/themes/arya-purple/theme.css +5601 -5585
- package/resources/themes/bootstrap4-dark-blue/theme.css +5538 -5523
- package/resources/themes/bootstrap4-dark-purple/theme.css +5538 -5523
- package/resources/themes/bootstrap4-light-blue/theme.css +5607 -5592
- package/resources/themes/bootstrap4-light-purple/theme.css +5607 -5592
- package/resources/themes/fluent-light/theme.css +5734 -5718
- package/resources/themes/lara-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5590 -5556
- package/resources/themes/lara-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5590 -5556
- package/resources/themes/lara-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5590 -5556
- package/resources/themes/lara-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5590 -5556
- package/resources/themes/lara-light-blue/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5604 -5570
- package/resources/themes/lara-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5604 -5570
- package/resources/themes/lara-light-purple/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5604 -5570
- package/resources/themes/lara-light-teal/fonts/Inter-italic.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-roman.var.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5604 -5570
- package/resources/themes/luna-amber/theme.css +5553 -5539
- package/resources/themes/luna-blue/theme.css +5553 -5539
- package/resources/themes/luna-green/theme.css +5553 -5539
- package/resources/themes/luna-pink/theme.css +5553 -5539
- package/resources/themes/md-dark-deeppurple/theme.css +7052 -7037
- package/resources/themes/md-dark-indigo/theme.css +7052 -7037
- package/resources/themes/md-light-deeppurple/theme.css +7073 -7058
- package/resources/themes/md-light-indigo/theme.css +7073 -7058
- package/resources/themes/mdc-dark-deeppurple/theme.css +7067 -7052
- package/resources/themes/mdc-dark-indigo/theme.css +7067 -7052
- package/resources/themes/mdc-light-deeppurple/theme.css +7074 -7059
- package/resources/themes/mdc-light-indigo/theme.css +7074 -7059
- package/resources/themes/mira/theme.css +5773 -5757
- package/resources/themes/nano/theme.css +5574 -5559
- package/resources/themes/nova/theme.css +5563 -5548
- package/resources/themes/nova-accent/theme.css +5539 -5524
- package/resources/themes/nova-alt/theme.css +5550 -5535
- package/resources/themes/nova-vue/theme.css +5563 -5548
- package/resources/themes/rhea/theme.css +5530 -5515
- package/resources/themes/saga-blue/theme.css +5590 -5574
- package/resources/themes/saga-green/theme.css +5590 -5574
- package/resources/themes/saga-orange/theme.css +5590 -5574
- package/resources/themes/saga-purple/theme.css +5590 -5574
- package/resources/themes/soho-dark/theme.css +5542 -5526
- package/resources/themes/soho-light/theme.css +5602 -5586
- package/resources/themes/tailwind-light/theme.css +5653 -5637
- package/resources/themes/vela-blue/theme.css +5590 -5574
- package/resources/themes/vela-green/theme.css +5590 -5574
- package/resources/themes/vela-orange/theme.css +5590 -5574
- package/resources/themes/vela-purple/theme.css +5590 -5574
- package/resources/themes/viva-dark/theme.css +5709 -5693
- package/resources/themes/viva-light/theme.css +5692 -5676
- package/ripple/ripple.cjs.js +1 -1
- package/ripple/ripple.cjs.min.js +1 -1
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -1
- package/ripple/ripple.min.js +1 -1
- package/scrollpanel/BaseScrollPanel.vue +56 -54
- package/scrollpanel/scrollpanel.cjs.js +1 -1
- package/scrollpanel/scrollpanel.cjs.min.js +1 -1
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrollpanel/scrollpanel.min.js +1 -1
- package/scrolltop/BaseScrollTop.vue +33 -31
- package/scrolltop/scrolltop.cjs.js +1 -1
- package/scrolltop/scrolltop.cjs.min.js +1 -1
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/scrolltop/scrolltop.min.js +1 -1
- package/sidebar/BaseSidebar.vue +146 -144
- package/sidebar/Sidebar.d.ts +10 -0
- package/sidebar/Sidebar.vue +17 -12
- package/sidebar/sidebar.cjs.js +10 -3
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +11 -4
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +10 -3
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/BaseSkeleton.vue +30 -28
- package/skeleton/skeleton.cjs.js +1 -1
- package/skeleton/skeleton.cjs.min.js +1 -1
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/skeleton/skeleton.min.js +1 -1
- package/slider/BaseSlider.vue +39 -37
- package/slider/slider.cjs.js +1 -2
- package/slider/slider.cjs.min.js +1 -1
- package/slider/slider.esm.js +1 -2
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -2
- package/slider/slider.min.js +1 -1
- package/speeddial/BaseSpeedDial.vue +77 -75
- package/speeddial/SpeedDial.vue +2 -2
- package/speeddial/speeddial.cjs.js +7 -3
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +7 -3
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +7 -3
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/BaseSplitButton.vue +32 -30
- package/splitbutton/SplitButton.vue +2 -1
- package/splitbutton/splitbutton.cjs.js +3 -2
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +3 -2
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +3 -2
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/BaseSplitter.vue +46 -44
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +1 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +1 -1
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/BaseSplitterPanel.vue +13 -11
- package/splitterpanel/splitterpanel.cjs.js +1 -1
- package/splitterpanel/splitterpanel.cjs.min.js +1 -1
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/splitterpanel/splitterpanel.min.js +1 -1
- package/steps/BaseSteps.vue +52 -50
- package/steps/steps.cjs.js +1 -1
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +1 -1
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +1 -1
- package/steps/steps.min.js +1 -1
- package/tabmenu/BaseTabMenu.vue +40 -38
- package/tabmenu/TabMenu.vue +5 -0
- package/tabmenu/tabmenu.cjs.js +6 -1
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +6 -1
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +6 -1
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabview/BaseTabView.vue +70 -68
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +1 -1
- package/tabview/tabview.min.js +1 -1
- package/tag/BaseTag.vue +16 -14
- package/tag/tag.cjs.js +1 -1
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +1 -1
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +1 -1
- package/tag/tag.min.js +1 -1
- package/terminal/BaseTerminal.vue +23 -21
- package/terminal/terminal.cjs.js +1 -1
- package/terminal/terminal.cjs.min.js +1 -1
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +1 -1
- package/terminal/terminal.min.js +1 -1
- package/textarea/BaseTextarea.vue +9 -7
- package/textarea/Textarea.vue +1 -3
- package/textarea/textarea.cjs.js +2 -3
- package/textarea/textarea.cjs.min.js +1 -1
- package/textarea/textarea.esm.js +2 -3
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +2 -3
- package/textarea/textarea.min.js +1 -1
- package/tieredmenu/BaseTieredMenu.vue +40 -38
- package/tieredmenu/tieredmenu.cjs.js +1 -1
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +1 -1
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +1 -1
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/BaseTimeline.vue +111 -109
- package/timeline/timeline.cjs.js +1 -1
- package/timeline/timeline.cjs.min.js +1 -1
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/timeline/timeline.min.js +1 -1
- package/toast/BaseToast.vue +73 -71
- package/toast/Toast.d.ts +14 -0
- package/toast/ToastMessage.vue +3 -2
- package/toast/toast.cjs.js +9 -4
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +10 -5
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +9 -4
- package/toast/toast.min.js +1 -1
- package/toolbar/BaseToolbar.vue +21 -19
- package/toolbar/toolbar.cjs.js +1 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +1 -2
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +1 -2
- package/toolbar/toolbar.min.js +1 -1
- package/tooltip/tooltip.cjs.js +1 -1
- package/tooltip/tooltip.cjs.min.js +1 -1
- package/tooltip/tooltip.esm.js +1 -1
- package/tooltip/tooltip.esm.min.js +1 -1
- package/tooltip/tooltip.js +1 -1
- package/tooltip/tooltip.min.js +1 -1
- package/tree/BaseTree.vue +82 -80
- package/tree/Tree.vue +1 -1
- package/tree/TreeNode.vue +1 -1
- package/tree/tree.cjs.js +8 -6
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +9 -7
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +8 -6
- package/tree/tree.min.js +1 -1
- package/treeselect/BaseTreeSelect.vue +51 -49
- package/treeselect/treeselect.cjs.js +1 -1
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +1 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +1 -1
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BaseTreeTable.vue +169 -167
- package/treetable/BodyCell.vue +1 -1
- package/treetable/TreeTable.d.ts +48 -4
- package/treetable/TreeTable.vue +28 -16
- package/treetable/treetable.cjs.js +66 -18
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +66 -18
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +66 -18
- package/treetable/treetable.min.js +1 -1
- package/vetur-attributes.json +4 -0
- package/vetur-tags.json +1 -0
- package/web-types.json +46 -1
package/listbox/listbox.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.listbox=function(e,t,i,n,o,s,l,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(i),d=a(o),p=a(s),h=l.useStyle("\n.p-listbox-list-wrapper {\n overflow: auto;\n}\n\n.p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\n.p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n}\n\n.p-listbox-item-group {\n cursor: auto;\n}\n\n.p-listbox-filter-container {\n position: relative;\n}\n\n.p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-listbox-filter {\n width: 100%;\n}\n",{name:"listbox",manual:!0});function f(e){return g(e)||b(e)||O(e)||m()}function m(){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 O(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return y(e)}function y(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 x={name:"Listbox",extends:{name:"BaseListbox",extends:p.default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:Boolean,dataKey:null,multiple:Boolean,metaKeySelection:Boolean,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},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-listbox p-component",{"p-focus":e.instance.focused,"p-disabled":e.props.disabled}]},header:"p-listbox-header",filterContainer:"p-listbox-filter-container",filterInput:"p-listbox-filter p-inputtext p-component",filterIcon:"p-listbox-filter-icon",wrapper:"p-listbox-list-wrapper",list:"p-listbox-list",itemGroup:"p-listbox-item-group",item:function(e){var t=e.instance,i=e.option,n=e.index,o=e.getItemOptions;return["p-listbox-item",{"p-highlight":t.isSelected(i),"p-focus":t.focusedOptionIndex===t.getOptionIndex(n,o),"p-disabled":t.isOptionDisabled(i)}]},emptyMessage:"p-listbox-empty-message"},loadStyle:h.load},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.ObjectUtils.isEmpty(e)?-1:void 0,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.$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.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(f(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(f(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 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.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 v(e){return v="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},v(e)}function I(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 S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach((function(t){F(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function F(e,t,i){return(t=V(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function V(e){var t=w(e,"string");return"symbol"===v(t)?t:String(t)}function w(e,t){if("object"!==v(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["id"],D=["tabindex"],K=["placeholder","aria-owns","aria-activedescendant","tabindex"],L=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],E=["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"],P=["tabindex"];return x.render=function(e,t,i,n,o,s){var l=r.resolveComponent("VirtualScroller"),a=r.resolveDirective("ripple");return r.openBlock(),r.createElementBlock("div",r.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"}),[r.createElementVNode("span",r.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,D),r.renderSlot(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[r.createElementVNode("div",r.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[r.withDirectives(r.createElementVNode("input",r.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)})},S(S({},e.filterInputProps),e.ptm("filterInput"))),null,16,K),[[r.vModelText,o.filterValue]]),r.renderSlot(e.$slots,"filtericon",{class:r.normalizeClass(e.cx("filterIcon"))},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),r.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),r.createElementVNode("span",r.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),r.toDisplayString(s.filterResultMessageText),17)],16)):r.createCommentVNode("",!0),r.createElementVNode("div",r.mergeProps({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[r.createVNode(l,r.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),r.createSlots({content:r.withCtx((function(i){var n=i.styleClass,l=i.contentRef,c=i.items,u=i.getItemOptions,d=i.contentStyle,p=i.itemSize;return[r.createElementVNode("ul",r.mergeProps({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")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c,(function(i,n){return r.openBlock(),r.createElementBlock(r.Fragment,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(r.openBlock(),r.createElementBlock("li",r.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")),[r.renderSlot(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[r.createTextVNode(r.toDisplayString(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,E)):r.withDirectives((r.openBlock(),r.createElementBlock("li",r.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)}),[r.renderSlot(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[r.createTextVNode(r.toDisplayString(s.getOptionLabel(i)),1)]}))],16,k)),[[a]])],64)})),128)),o.filterValue&&(!c||c&&0===c.length)?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[r.renderSlot(e.$slots,"emptyfilter",{},(function(){return[r.createTextVNode(r.toDisplayString(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[r.renderSlot(e.$slots,"empty",{},(function(){return[r.createTextVNode(r.toDisplayString(s.emptyMessageText),1)]}))],16)):r.createCommentVNode("",!0)],16,L)]})),_:2},[e.$slots.loader?{name:"loader",fn:r.withCtx((function(t){return[r.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),r.renderSlot(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),r.toDisplayString(s.emptyMessageText),17)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),r.toDisplayString(s.selectedMessageText),17),r.createElementVNode("span",r.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,P)],16,M)},x}(primevue.api,primevue.icons.search,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.listbox=function(e,t,i,n,o,s,l,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(i),d=a(o),p=a(s),h=l.useStyle("\n@layer primevue {\n .p-listbox-list-wrapper {\n overflow: auto;\n }\n \n .p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n }\n \n .p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n }\n \n .p-listbox-item-group {\n cursor: auto;\n }\n \n .p-listbox-filter-container {\n position: relative;\n }\n \n .p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n }\n \n .p-listbox-filter {\n width: 100%;\n }\n}\n",{name:"listbox",manual:!0});function f(e){return g(e)||b(e)||O(e)||m()}function m(){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 O(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return y(e)}function y(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 x={name:"Listbox",extends:{name:"BaseListbox",extends:p.default,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:Boolean,dataKey:null,multiple:Boolean,metaKeySelection:Boolean,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},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},css:{classes:{root:function(e){return["p-listbox p-component",{"p-focus":e.instance.focused,"p-disabled":e.props.disabled}]},header:"p-listbox-header",filterContainer:"p-listbox-filter-container",filterInput:"p-listbox-filter p-inputtext p-component",filterIcon:"p-listbox-filter-icon",wrapper:"p-listbox-list-wrapper",list:"p-listbox-list",itemGroup:"p-listbox-item-group",item:function(e){var t=e.instance,i=e.option,n=e.index,o=e.getItemOptions;return["p-listbox-item",{"p-highlight":t.isSelected(i),"p-focus":t.focusedOptionIndex===t.getOptionIndex(n,o),"p-disabled":t.isOptionDisabled(i)}]},emptyMessage:"p-listbox-empty-message"},loadStyle:h.load},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.ObjectUtils.isEmpty(e)?-1:void 0,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.$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.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(f(n=o&&this.modelValue||[]),[this.getOptionValue(t)])}else n=i?this.removeOption(t):[].concat(f(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 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.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 v(e){return v="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},v(e)}function I(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 S(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach((function(t){F(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function F(e,t,i){return(t=V(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function V(e){var t=w(e,"string");return"symbol"===v(t)?t:String(t)}function w(e,t){if("object"!==v(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["id"],D=["tabindex"],K=["placeholder","aria-owns","aria-activedescendant","tabindex"],L=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],E=["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"],P=["tabindex"];return x.render=function(e,t,i,n,o,s){var l=r.resolveComponent("VirtualScroller"),a=r.resolveDirective("ripple");return r.openBlock(),r.createElementBlock("div",r.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"}),[r.createElementVNode("span",r.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,D),r.renderSlot(e.$slots,"header",{value:e.modelValue,options:s.visibleOptions}),e.filter?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[r.createElementVNode("div",r.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[r.withDirectives(r.createElementVNode("input",r.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)})},S(S({},e.filterInputProps),e.ptm("filterInput"))),null,16,K),[[r.vModelText,o.filterValue]]),r.renderSlot(e.$slots,"filtericon",{class:r.normalizeClass(e.cx("filterIcon"))},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),r.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),r.createElementVNode("span",r.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),r.toDisplayString(s.filterResultMessageText),17)],16)):r.createCommentVNode("",!0),r.createElementVNode("div",r.mergeProps({ref:"listWrapper",class:e.cx("wrapper"),style:e.listStyle},e.ptm("wrapper")),[r.createVNode(l,r.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:e.listStyle,items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),r.createSlots({content:r.withCtx((function(i){var n=i.styleClass,l=i.contentRef,c=i.items,u=i.getItemOptions,d=i.contentStyle,p=i.itemSize;return[r.createElementVNode("ul",r.mergeProps({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")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c,(function(i,n){return r.openBlock(),r.createElementBlock(r.Fragment,{key:s.getOptionRenderKey(i,s.getOptionIndex(n,u))},[s.isOptionGroup(i)?(r.openBlock(),r.createElementBlock("li",r.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")),[r.renderSlot(e.$slots,"optiongroup",{option:i.optionGroup,index:s.getOptionIndex(n,u)},(function(){return[r.createTextVNode(r.toDisplayString(s.getOptionGroupLabel(i.optionGroup)),1)]}))],16,E)):r.withDirectives((r.openBlock(),r.createElementBlock("li",r.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)}),[r.renderSlot(e.$slots,"option",{option:i,index:s.getOptionIndex(n,u)},(function(){return[r.createTextVNode(r.toDisplayString(s.getOptionLabel(i)),1)]}))],16,k)),[[a]])],64)})),128)),o.filterValue&&(!c||c&&0===c.length)?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[r.renderSlot(e.$slots,"emptyfilter",{},(function(){return[r.createTextVNode(r.toDisplayString(s.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[r.renderSlot(e.$slots,"empty",{},(function(){return[r.createTextVNode(r.toDisplayString(s.emptyMessageText),1)]}))],16)):r.createCommentVNode("",!0)],16,L)]})),_:2},[e.$slots.loader?{name:"loader",fn:r.withCtx((function(t){return[r.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"])],16),r.renderSlot(e.$slots,"footer",{value:e.modelValue,options:s.visibleOptions}),!e.options||e.options&&0===e.options.length?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),r.toDisplayString(s.emptyMessageText),17)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),r.toDisplayString(s.selectedMessageText),17),r.createElementVNode("span",r.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,P)],16,M)},x}(primevue.api,primevue.icons.search,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.usestyle,Vue);
|
|
@@ -3,115 +3,117 @@ import BaseComponent from 'primevue/basecomponent';
|
|
|
3
3
|
import { useStyle } from 'primevue/usestyle';
|
|
4
4
|
|
|
5
5
|
const styles = `
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.p-megamenu-col-
|
|
90
|
-
.p-megamenu-col-
|
|
91
|
-
.p-megamenu-col-
|
|
92
|
-
.p-megamenu-col-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
6
|
+
@layer primevue {
|
|
7
|
+
.p-megamenu {
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.p-megamenu-root-list {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
list-style: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.p-megamenu-root-list > .p-menuitem {
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.p-megamenu .p-menuitem-link {
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.p-megamenu .p-menuitem-text {
|
|
31
|
+
line-height: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.p-megamenu-panel {
|
|
35
|
+
display: none;
|
|
36
|
+
position: absolute;
|
|
37
|
+
width: auto;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.p-megamenu-submenu {
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: 0;
|
|
48
|
+
list-style: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Horizontal */
|
|
52
|
+
.p-megamenu-horizontal {
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.p-megamenu-horizontal .p-megamenu-root-list {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
flex-wrap: wrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.p-megamenu-horizontal .p-megamenu-end {
|
|
63
|
+
margin-left: auto;
|
|
64
|
+
align-self: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Vertical */
|
|
68
|
+
.p-megamenu-vertical {
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.p-megamenu-vertical .p-megamenu-root-list {
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {
|
|
77
|
+
left: 100%;
|
|
78
|
+
top: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {
|
|
82
|
+
margin-left: auto;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.p-megamenu-grid {
|
|
86
|
+
display: flex;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-megamenu-col-2,
|
|
90
|
+
.p-megamenu-col-3,
|
|
91
|
+
.p-megamenu-col-4,
|
|
92
|
+
.p-megamenu-col-6,
|
|
93
|
+
.p-megamenu-col-12 {
|
|
94
|
+
flex: 0 0 auto;
|
|
95
|
+
padding: 0.5rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-megamenu-col-2 {
|
|
99
|
+
width: 16.6667%;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.p-megamenu-col-3 {
|
|
103
|
+
width: 25%;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.p-megamenu-col-4 {
|
|
107
|
+
width: 33.3333%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.p-megamenu-col-6 {
|
|
111
|
+
width: 50%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.p-megamenu-col-12 {
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
115
117
|
}
|
|
116
118
|
`;
|
|
117
119
|
|
package/megamenu/megamenu.cjs.js
CHANGED
|
@@ -15,7 +15,7 @@ var AngleDownIcon__default = /*#__PURE__*/_interopDefaultLegacy(AngleDownIcon);
|
|
|
15
15
|
var AngleRightIcon__default = /*#__PURE__*/_interopDefaultLegacy(AngleRightIcon);
|
|
16
16
|
var Ripple__default = /*#__PURE__*/_interopDefaultLegacy(Ripple);
|
|
17
17
|
|
|
18
|
-
var styles = "\n.p-megamenu {\n
|
|
18
|
+
var styles = "\n@layer primevue {\n .p-megamenu {\n display: flex;\n }\n \n .p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n .p-megamenu-root-list > .p-menuitem {\n position: relative;\n }\n \n .p-megamenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n \n .p-megamenu .p-menuitem-text {\n line-height: 1;\n }\n \n .p-megamenu-panel {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n }\n \n .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n display: block;\n }\n \n .p-megamenu-submenu {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n /* Horizontal */\n .p-megamenu-horizontal {\n align-items: center;\n }\n \n .p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n }\n \n /* Vertical */\n .p-megamenu-vertical {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n left: 100%;\n top: 0;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {\n margin-left: auto;\n }\n \n .p-megamenu-grid {\n display: flex;\n }\n \n .p-megamenu-col-2,\n .p-megamenu-col-3,\n .p-megamenu-col-4,\n .p-megamenu-col-6,\n .p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: 0.5rem;\n }\n \n .p-megamenu-col-2 {\n width: 16.6667%;\n }\n \n .p-megamenu-col-3 {\n width: 25%;\n }\n \n .p-megamenu-col-4 {\n width: 33.3333%;\n }\n \n .p-megamenu-col-6 {\n width: 50%;\n }\n \n .p-megamenu-col-12 {\n width: 100%;\n }\n}\n";
|
|
19
19
|
var inlineStyles = {
|
|
20
20
|
submenu: function submenu(_ref) {
|
|
21
21
|
var instance = _ref.instance,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/basecomponent"),n=require("primevue/usestyle"),i=require("primevue/icons/angledown"),s=require("primevue/icons/angleright"),o=require("primevue/ripple"),r=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),m=a(i),l=a(s),u=a(o),d=n.useStyle("\n.p-megamenu {\n display: flex;\n}\n\n.p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.p-megamenu-root-list > .p-menuitem {\n position: relative;\n}\n\n.p-megamenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n\n.p-megamenu .p-menuitem-text {\n line-height: 1;\n}\n\n.p-megamenu-panel {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n}\n\n.p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n display: block;\n}\n\n.p-megamenu-submenu {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n/* Horizontal */\n.p-megamenu-horizontal {\n align-items: center;\n}\n\n.p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n}\n\n/* Vertical */\n.p-megamenu-vertical {\n flex-direction: column;\n}\n\n.p-megamenu-vertical .p-megamenu-root-list {\n flex-direction: column;\n}\n\n.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n left: 100%;\n top: 0;\n}\n\n.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {\n margin-left: auto;\n}\n\n.p-megamenu-grid {\n display: flex;\n}\n\n.p-megamenu-col-2,\n.p-megamenu-col-3,\n.p-megamenu-col-4,\n.p-megamenu-col-6,\n.p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: 0.5rem;\n}\n\n.p-megamenu-col-2 {\n width: 16.6667%;\n}\n\n.p-megamenu-col-3 {\n width: 25%;\n}\n\n.p-megamenu-col-4 {\n width: 33.3333%;\n}\n\n.p-megamenu-col-6 {\n width: 50%;\n}\n\n.p-megamenu-col-12 {\n width: 100%;\n}\n",{name:"megamenu",manual:!0}),I={name:"BaseMegaMenu",extends:c.default,props:{model:{type:Array,default:null},orientation:{type:String,default:"horizontal"},exact:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-megamenu p-component",{"p-megamenu-horizontal":t.horizontal,"p-megamenu-vertical":t.vertical}]},start:"p-megamenu-start",menu:"p-megamenu-root-list",submenuHeader:function(e){return["p-megamenu-submenu-header p-submenu-header",{"p-disabled":e.instance.isItemDisabled(e.processedItem)}]},menuitem:function(e){var t=e.instance,n=e.processedItem;return["p-menuitem",{"p-menuitem-active p-highlight":t.isItemActive(n),"p-focus":t.isItemFocused(n),"p-disabled":t.isItemDisabled(n)}]},content:"p-menuitem-content",action:function(e){return["p-menuitem-link",{"router-link-active":e.isActive,"router-link-active-exact":e.props.exact&&e.isExactActive}]},icon:"p-menuitem-icon",label:"p-menuitem-text",submenuIcon:"p-submenu-icon",panel:"p-megamenu-panel",grid:"p-megamenu-grid",column:function(e){var t,n=e.processedItem;switch(e.instance.isItemGroup(n)?n.items.length:0){case 2:t="p-megamenu-col-6";break;case 3:t="p-megamenu-col-4";break;case 4:t="p-megamenu-col-3";break;case 6:t="p-megamenu-col-2";break;default:t="p-megamenu-col-12"}return t},submenu:"p-submenu-list p-megamenu-submenu",separator:"p-menuitem-separator",end:"p-megamenu-end"},inlineStyles:{submenu:function(e){return{display:e.instance.isItemActive(e.processedItem)?"block":"none"}}},loadStyle:d.load},provide:function(){return{$parentInstance:this}}},p={name:"MegaMenuSub",hostName:"MegaMenu",extends:c.default,emits:["item-click","item-mouseenter"],props:{menuId:{type:String,default:null},focusedItemId:{type:String,default:null},horizontal:{type:Boolean,default:!1},submenu:{type:Object,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItem:{type:Object,default:null},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},methods:{getSubListId:function(e){return"".concat(this.getItemId(e),"_list")},getSubListKey:function(e){return this.getSubListId(e)},getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(t,n,i){return t&&t.item?e.ObjectUtils.getItemValue(t.item[n],i):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,t,n){return this.ptm(n,{context:{item:e,index:t,active:this.isItemActive(e),focused:this.isItemFocused(e)}})},isItemActive:function(t){return!!e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===t.key},isItemVisible:function(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(t){return e.ObjectUtils.isNotEmpty(t.items)},onItemClick:function(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},onItemActionClick:function(e,t){t&&t(e)},getAriaSetSize:function(){var e=this;return this.items.filter((function(t){return e.isItemVisible(t)&&!e.getItemProp(t,"separator")})).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter((function(e){return t.isItemVisible(e)&&t.getItemProp(e,"separator")})).length+1},getMenuItemProps:function(e,t){return{action:r.mergeProps({class:this.cx("action"),tabindex:-1,"aria-hidden":!0},this.getPTOptions(e,t,"action")),icon:r.mergeProps({class:[this.cx("icon"),this.getItemProp(e,"icon")]},this.getPTOptions(e,t,"icon")),label:r.mergeProps({class:this.cx("label")},this.getPTOptions(e,t,"label")),submenuicon:r.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions(e,t,"submenuIcon"))}}},components:{AngleRightIcon:l.default,AngleDownIcon:m.default},directives:{ripple:u.default}},h=["tabindex"],f=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-highlight","data-p-focused","data-p-disabled"],g=["onClick","onMouseenter"],b=["href","onClick"],v=["href","target"],y=["id"];p.render=function(e,t,n,i,s,o){var a=r.resolveComponent("router-link"),c=r.resolveComponent("MegaMenuSub",!0),m=r.resolveDirective("ripple");return r.openBlock(),r.createElementBlock("ul",r.mergeProps({class:e.cx(0===n.level?"menu":"submenu"),tabindex:n.tabindex},e.ptm(0===n.level?"menu":"submenu")),[n.submenu?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,class:[e.cx("submenuHeader",{submenu:n.submenu}),o.getItemProp(n.submenu,"class")],style:o.getItemProp(n.submenu,"style"),role:"presentation"},e.ptm("submenuHeader")),r.toDisplayString(o.getItemLabel(n.submenu)),17)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.items,(function(i,s){return r.openBlock(),r.createElementBlock(r.Fragment,{key:o.getItemKey(i)},[o.isItemVisible(i)&&!o.getItemProp(i,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,id:o.getItemId(i),style:o.getItemProp(i,"style"),class:[e.cx("menuitem",{processedItem:i}),o.getItemProp(i,"class")],role:"menuitem","aria-label":o.getItemLabel(i),"aria-disabled":o.isItemDisabled(i)||void 0,"aria-expanded":o.isItemGroup(i)?o.isItemActive(i):void 0,"aria-haspopup":o.isItemGroup(i)&&!o.getItemProp(i,"to")?"menu":void 0,"aria-level":n.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(s)},o.getPTOptions(i,s,"menuitem"),{"data-p-highlight":o.isItemActive(i),"data-p-focused":o.isItemFocused(i),"data-p-disabled":o.isItemDisabled(i)}),[r.createElementVNode("div",r.mergeProps({class:e.cx("content"),onClick:function(e){return o.onItemClick(e,i)},onMouseenter:function(e){return o.onItemMouseEnter(e,i)}},o.getPTOptions(i,s,"content")),[n.templates.item?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.item),{key:1,item:i.item,hasSubmenu:o.isItemGroup(i),label:o.getItemLabel(i),props:o.getMenuItemProps(i,s)},null,8,["item","hasSubmenu","label","props"])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[o.getItemProp(i,"to")&&!o.isItemDisabled(i)?(r.openBlock(),r.createBlock(a,{key:0,to:o.getItemProp(i,"to"),custom:""},{default:r.withCtx((function(t){var a=t.navigate,c=t.href,l=t.isActive,u=t.isExactActive;return[r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({href:c,class:e.cx("action",{isActive:l,isExactActive:u}),tabindex:"-1","aria-hidden":"true",onClick:function(e){return o.onItemActionClick(e,a)}},o.getPTOptions(i,s,"action")),[n.templates.itemicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.itemicon),{key:0,item:i.item,class:r.normalizeClass([e.cx("icon"),o.getItemProp(i,"icon")])},null,8,["item","class"])):o.getItemProp(i,"icon")?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,class:[e.cx("icon"),o.getItemProp(i,"icon")]},o.getPTOptions(i,s,"icon")),null,16)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({class:e.cx("label")},o.getPTOptions(i,s,"label")),r.toDisplayString(o.getItemLabel(i)),17)],16,b)),[[m]])]})),_:2},1032,["to"])):r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({key:1,href:o.getItemProp(i,"url"),class:e.cx("action"),target:o.getItemProp(i,"target"),tabindex:"-1","aria-hidden":"true"},o.getPTOptions(i,s,"action")),[n.templates.itemicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.itemicon),{key:0,item:i.item,class:r.normalizeClass([e.cx("icon"),o.getItemProp(i,"icon")])},null,8,["item","class"])):o.getItemProp(i,"icon")?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,class:[e.cx("icon"),o.getItemProp(i,"icon")]},o.getPTOptions(i,s,"icon")),null,16)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({class:e.cx("label")},o.getPTOptions(i,s,"label")),r.toDisplayString(o.getItemLabel(i)),17),o.isItemGroup(i)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[n.templates.submenuicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.submenuicon),r.mergeProps({key:0,active:o.isItemActive(i),class:e.cx("submenuIcon")},o.getPTOptions(i,s,"submenuIcon")),null,16,["active","class"])):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.horizontal?"AngleDownIcon":"AngleRightIcon"),r.mergeProps({key:1,class:e.cx("submenuIcon")},o.getPTOptions(i,s,"submenuIcon")),null,16,["class"]))],64)):r.createCommentVNode("",!0)],16,v)),[[m]])],64))],16,g),o.isItemVisible(i)&&o.isItemGroup(i)?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("panel")},e.ptm("panel")),[r.createElementVNode("div",r.mergeProps({class:e.cx("grid")},e.ptm("grid")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,(function(s){return r.openBlock(),r.createElementBlock("div",r.mergeProps({key:o.getItemKey(s),class:e.cx("column",{processedItem:i})},e.ptm("column")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s,(function(s){return r.openBlock(),r.createBlock(c,{key:o.getSubListKey(s),id:o.getSubListId(s),style:r.normalizeStyle(e.sx("submenu",!0,{processedItem:i})),role:"menu",menuId:n.menuId,focusedItemId:n.focusedItemId,submenu:s,items:s.items,templates:n.templates,exact:n.exact,level:n.level+1,pt:e.pt,unstyled:e.unstyled,onItemClick:t[0]||(t[0]=function(t){return e.$emit("item-click",t)}),onItemMouseenter:t[1]||(t[1]=function(t){return e.$emit("item-mouseenter",t)})},null,8,["id","style","menuId","focusedItemId","submenu","items","templates","exact","level","pt","unstyled"])})),128))],16)})),128))],16)],16)):r.createCommentVNode("",!0)],16,f)):r.createCommentVNode("",!0),o.isItemVisible(i)&&o.getItemProp(i,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:1,id:o.getItemId(i),class:[e.cx("separator"),o.getItemProp(i,"class")],style:o.getItemProp(i,"style"),role:"separator"},e.ptm("separator")),null,16,y)):r.createCommentVNode("",!0)],64)})),128))],16,h)};var k={name:"MegaMenu",extends:I,emits:["focus","blur"],outsideClickListener:null,resizeListener:null,container:null,menubar:null,searchTimeout:null,searchValue:null,data:function(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,key:"",parentKey:""},activeItem:null,dirty:!1}},watch:{"$attrs.id":function(t){this.id=t||e.UniqueComponentId()},activeItem:function(t){e.ObjectUtils.isNotEmpty(t)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())}},beforeMount:function(){this.$slots.item||console.warn("In future versions, vue-router support will be removed. Item templating should be used.")},mounted:function(){this.id=this.id||e.UniqueComponentId()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener()},methods:{getItemProp:function(t,n){return t?e.ObjectUtils.getItemValue(t[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemGroup:function(t){return e.ObjectUtils.isNotEmpty(this.getItemProp(t,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(t){return t&&e.ObjectUtils.isNotEmpty(t.items)},hide:function(t,n){this.activeItem=null,this.focusedItemInfo={index:-1,key:"",parentKey:""},n&&e.DomHandler.focus(this.menubar),this.dirty=!1},onFocus:function(e){if(this.focused=!0,-1===this.focusedItemInfo.index){var t=this.findFirstFocusedItemIndex(),n=this.findVisibleItem(t);this.focusedItemInfo={index:t,key:n.key,parentKey:n.parentKey}}this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,key:"",parentKey:""},this.searchValue="",this.dirty=!1,this.$emit("blur",e)},onKeyDown:function(t){if(this.disabled)t.preventDefault();else{var n=t.metaKey||t.ctrlKey;switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"ArrowLeft":this.onArrowLeftKey(t);break;case"ArrowRight":this.onArrowRightKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"Space":this.onSpaceKey(t);break;case"Enter":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Tab":this.onTabKey(t);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&e.ObjectUtils.isPrintableCharacter(t.key)&&this.searchItems(t,t.key)}}},onItemChange:function(t){var n=t.processedItem,i=t.isFocus;if(!e.ObjectUtils.isEmpty(n)){var s=n.index,o=n.key,r=n.parentKey,a=e.ObjectUtils.isNotEmpty(n.items);a&&(this.activeItem=n),this.focusedItemInfo={index:s,key:o,parentKey:r},a&&(this.dirty=!0),i&&e.DomHandler.focus(this.menubar)}},onItemClick:function(t){var n=t.originalEvent,i=t.processedItem,s=this.isProccessedItemGroup(i),o=e.ObjectUtils.isEmpty(i.parent);if(this.isSelected(i)){var r=i.index,a=i.key,c=i.parentKey;this.activeItem=null,this.focusedItemInfo={index:r,key:a,parentKey:c},this.dirty=!o,e.DomHandler.focus(this.menubar)}else if(s)this.onItemChange(t);else{var m=o?i:this.activeItem;this.hide(n),this.changeFocusedItemInfo(n,m?m.index:-1),e.DomHandler.focus(this.menubar)}},onItemMouseEnter:function(e){this.dirty&&this.onItemChange(e)},onArrowDownKey:function(t){if(this.horizontal)if(e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===this.focusedItemInfo.key)this.focusedItemInfo={index:-1,key:"",parentKey:this.activeItem.key};else{var n=this.findVisibleItem(this.focusedItemInfo.index);this.isProccessedItemGroup(n)&&(this.onItemChange({originalEvent:t,processedItem:n}),this.focusedItemInfo={index:-1,key:n.key,parentKey:n.parentKey},this.searchValue="")}var i=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemInfo(t,i),t.preventDefault()},onArrowUpKey:function(t){if(t.altKey&&this.horizontal){if(-1!==this.focusedItemInfo.index){var n=this.findVisibleItem(this.focusedItemInfo.index);!this.isProccessedItemGroup(n)&&e.ObjectUtils.isNotEmpty(this.activeItem)&&(0===this.focusedItemInfo.index?(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key,parentKey:this.activeItem.parentKey},this.activeItem=null):this.changeFocusedItemInfo(t,this.findFirstItemIndex()))}t.preventDefault()}else{var i=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemInfo(t,i),t.preventDefault()}},onArrowLeftKey:function(t){var n=this.findVisibleItem(this.focusedItemInfo.index);if(this.isProccessedItemGroup(n)){if(this.horizontal){var i=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemInfo(t,i)}}else{this.vertical&&e.ObjectUtils.isNotEmpty(this.activeItem)&&0===n.columnIndex&&(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key,parentKey:this.activeItem.parentKey},this.activeItem=null);var s=n.columnIndex-1,o=this.visibleItems.findIndex((function(e){return e.columnIndex===s}));-1!==o&&this.changeFocusedItemInfo(t,o)}t.preventDefault()},onArrowRightKey:function(t){var n=this.findVisibleItem(this.focusedItemInfo.index);if(this.isProccessedItemGroup(n)){if(this.vertical)if(e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===n.key)this.focusedItemInfo={index:-1,key:"",parentKey:this.activeItem.key};else{var i=this.findVisibleItem(this.focusedItemInfo.index);this.isProccessedItemGroup(i)&&(this.onItemChange({originalEvent:t,processedItem:i}),this.focusedItemInfo={index:-1,key:i.key,parentKey:i.parentKey},this.searchValue="")}var s=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemInfo(t,s)}else{var o=n.columnIndex+1,r=this.visibleItems.findIndex((function(e){return e.columnIndex===o}));-1!==r&&this.changeFocusedItemInfo(t,r)}t.preventDefault()},onHomeKey:function(e){this.changeFocusedItemInfo(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemInfo(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(t){if(-1!==this.focusedItemInfo.index){var n=e.DomHandler.findSingle(this.menubar,'li[id="'.concat("".concat(this.focusedItemId),'"]')),i=n&&e.DomHandler.findSingle(n,'a[data-pc-section="action"]');i?i.click():n&&n.click(),!this.isProccessedItemGroup(this.visibleItems[this.focusedItemInfo.index])&&this.changeFocusedItemInfo(t,this.findFirstFocusedItemIndex())}t.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(t){e.ObjectUtils.isNotEmpty(this.activeItem)&&(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key},this.activeItem=null),t.preventDefault()},onTabKey:function(e){if(-1!==this.focusedItemInfo.index){var t=this.findVisibleItem(this.focusedItemInfo.index);!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=e.container&&!e.container.contains(t.target),i=!e.popup||!(e.target&&(e.target===t.target||e.target.contains(t.target)));n&&i&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener:function(){var t=this;this.resizeListener||(this.resizeListener=function(n){e.DomHandler.isTouchDevice()||t.hide(n,!0)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isItemMatched:function(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(t){return!!e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===t.key},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidItem(t)}))},findLastItemIndex:function(){var t=this;return e.ObjectUtils.findLastIndex(this.visibleItems,(function(e){return t.isValidItem(e)}))},findNextItemIndex:function(e){var t=this,n=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((function(e){return t.isValidItem(e)})):-1;return n>-1?n+e+1:e},findPrevItemIndex:function(t){var n=this,i=t>0?e.ObjectUtils.findLastIndex(this.visibleItems.slice(0,t),(function(e){return n.isValidItem(e)})):-1;return i>-1?i:t},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidSelectedItem(t)}))},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},findVisibleItem:function(t){return e.ObjectUtils.isNotEmpty(this.visibleItems)?this.visibleItems[t]:null},searchItems:function(e,t){var n=this;this.searchValue=(this.searchValue||"")+t;var i=-1,s=!1;return-1!==(i=-1!==this.focusedItemInfo.index?-1===(i=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((function(e){return n.isItemMatched(e)})))?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((function(e){return n.isItemMatched(e)})):i+this.focusedItemInfo.index:this.visibleItems.findIndex((function(e){return n.isItemMatched(e)})))&&(s=!0),-1===i&&-1===this.focusedItemInfo.index&&(i=this.findFirstFocusedItemIndex()),-1!==i&&this.changeFocusedItemInfo(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){n.searchValue="",n.searchTimeout=null}),500),s},changeFocusedItemInfo:function(t,n){var i=this.findVisibleItem(n);this.focusedItemInfo.index=n,this.focusedItemInfo.key=e.ObjectUtils.isNotEmpty(i)?i.key:"",this.scrollInView()},scrollInView:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=-1!==t?"".concat(this.id,"_").concat(t):this.focusedItemId,i=e.DomHandler.findSingle(this.menubar,'li[id="'.concat(n,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0,r=[];return e&&e.forEach((function(e,a){var c=(""!==s?s+"_":"")+(void 0!==o?o+"_":"")+a,m={item:e,index:a,level:n,key:c,parent:i,parentKey:s,columnIndex:void 0!==o?o:void 0!==i.columnIndex?i.columnIndex:a};m.items=0===n&&e.items&&e.items.length>0?e.items.map((function(e,i){return t.createProcessedItems(e,n+1,m,c,i)})):t.createProcessedItems(e.items,n+1,m,c),r.push(m)})),r},containerRef:function(e){this.container=e},menubarRef:function(e){this.menubar=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var t=e.ObjectUtils.isNotEmpty(this.activeItem)?this.activeItem:null;return t&&t.key===this.focusedItemInfo.parentKey?t.items.reduce((function(e,t){return t.forEach((function(t){t.items.forEach((function(t){e.push(t)}))})),e}),[]):this.processedItems},horizontal:function(){return"horizontal"===this.orientation},vertical:function(){return"vertical"===this.orientation},focusedItemId:function(){return e.ObjectUtils.isNotEmpty(this.focusedItemInfo.key)?"".concat(this.id,"_").concat(this.focusedItemInfo.key):null}},components:{MegaMenuSub:p}},x=["id"];k.render=function(e,t,n,i,s,o){var a=r.resolveComponent("MegaMenuSub");return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:o.containerRef,id:s.id,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"megamenu"}),[e.$slots.start?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("start")},e.ptm("start")),[r.renderSlot(e.$slots,"start")],16)):r.createCommentVNode("",!0),r.createVNode(a,{ref:o.menubarRef,id:s.id+"_list",tabindex:e.disabled?-1:e.tabindex,role:"menubar","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-disabled":e.disabled||void 0,"aria-orientation":e.orientation,"aria-activedescendant":s.focused?o.focusedItemId:void 0,menuId:s.id,focusedItemId:s.focused?o.focusedItemId:void 0,items:o.processedItems,horizontal:o.horizontal,templates:e.$slots,activeItem:s.activeItem,exact:e.exact,level:0,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter},null,8,["id","tabindex","aria-label","aria-labelledby","aria-disabled","aria-orientation","aria-activedescendant","menuId","focusedItemId","items","horizontal","templates","activeItem","exact","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"]),e.$slots.end?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,class:e.cx("end")},e.ptm("end")),[r.renderSlot(e.$slots,"end")],16)):r.createCommentVNode("",!0)],16,x)},module.exports=k;
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("primevue/basecomponent"),n=require("primevue/usestyle"),i=require("primevue/icons/angledown"),s=require("primevue/icons/angleright"),o=require("primevue/ripple"),r=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),m=a(i),l=a(s),u=a(o),d=n.useStyle("\n@layer primevue {\n .p-megamenu {\n display: flex;\n }\n \n .p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n .p-megamenu-root-list > .p-menuitem {\n position: relative;\n }\n \n .p-megamenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n \n .p-megamenu .p-menuitem-text {\n line-height: 1;\n }\n \n .p-megamenu-panel {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n }\n \n .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n display: block;\n }\n \n .p-megamenu-submenu {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n /* Horizontal */\n .p-megamenu-horizontal {\n align-items: center;\n }\n \n .p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n }\n \n /* Vertical */\n .p-megamenu-vertical {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n left: 100%;\n top: 0;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {\n margin-left: auto;\n }\n \n .p-megamenu-grid {\n display: flex;\n }\n \n .p-megamenu-col-2,\n .p-megamenu-col-3,\n .p-megamenu-col-4,\n .p-megamenu-col-6,\n .p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: 0.5rem;\n }\n \n .p-megamenu-col-2 {\n width: 16.6667%;\n }\n \n .p-megamenu-col-3 {\n width: 25%;\n }\n \n .p-megamenu-col-4 {\n width: 33.3333%;\n }\n \n .p-megamenu-col-6 {\n width: 50%;\n }\n \n .p-megamenu-col-12 {\n width: 100%;\n }\n}\n",{name:"megamenu",manual:!0}),I={name:"BaseMegaMenu",extends:c.default,props:{model:{type:Array,default:null},orientation:{type:String,default:"horizontal"},exact:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-megamenu p-component",{"p-megamenu-horizontal":t.horizontal,"p-megamenu-vertical":t.vertical}]},start:"p-megamenu-start",menu:"p-megamenu-root-list",submenuHeader:function(e){return["p-megamenu-submenu-header p-submenu-header",{"p-disabled":e.instance.isItemDisabled(e.processedItem)}]},menuitem:function(e){var t=e.instance,n=e.processedItem;return["p-menuitem",{"p-menuitem-active p-highlight":t.isItemActive(n),"p-focus":t.isItemFocused(n),"p-disabled":t.isItemDisabled(n)}]},content:"p-menuitem-content",action:function(e){return["p-menuitem-link",{"router-link-active":e.isActive,"router-link-active-exact":e.props.exact&&e.isExactActive}]},icon:"p-menuitem-icon",label:"p-menuitem-text",submenuIcon:"p-submenu-icon",panel:"p-megamenu-panel",grid:"p-megamenu-grid",column:function(e){var t,n=e.processedItem;switch(e.instance.isItemGroup(n)?n.items.length:0){case 2:t="p-megamenu-col-6";break;case 3:t="p-megamenu-col-4";break;case 4:t="p-megamenu-col-3";break;case 6:t="p-megamenu-col-2";break;default:t="p-megamenu-col-12"}return t},submenu:"p-submenu-list p-megamenu-submenu",separator:"p-menuitem-separator",end:"p-megamenu-end"},inlineStyles:{submenu:function(e){return{display:e.instance.isItemActive(e.processedItem)?"block":"none"}}},loadStyle:d.load},provide:function(){return{$parentInstance:this}}},p={name:"MegaMenuSub",hostName:"MegaMenu",extends:c.default,emits:["item-click","item-mouseenter"],props:{menuId:{type:String,default:null},focusedItemId:{type:String,default:null},horizontal:{type:Boolean,default:!1},submenu:{type:Object,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItem:{type:Object,default:null},exact:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},methods:{getSubListId:function(e){return"".concat(this.getItemId(e),"_list")},getSubListKey:function(e){return this.getSubListId(e)},getItemId:function(e){return"".concat(this.menuId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(t,n,i){return t&&t.item?e.ObjectUtils.getItemValue(t.item[n],i):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,t,n){return this.ptm(n,{context:{item:e,index:t,active:this.isItemActive(e),focused:this.isItemFocused(e)}})},isItemActive:function(t){return!!e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===t.key},isItemVisible:function(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(t){return e.ObjectUtils.isNotEmpty(t.items)},onItemClick:function(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter:function(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},onItemActionClick:function(e,t){t&&t(e)},getAriaSetSize:function(){var e=this;return this.items.filter((function(t){return e.isItemVisible(t)&&!e.getItemProp(t,"separator")})).length},getAriaPosInset:function(e){var t=this;return e-this.items.slice(0,e).filter((function(e){return t.isItemVisible(e)&&t.getItemProp(e,"separator")})).length+1},getMenuItemProps:function(e,t){return{action:r.mergeProps({class:this.cx("action"),tabindex:-1,"aria-hidden":!0},this.getPTOptions(e,t,"action")),icon:r.mergeProps({class:[this.cx("icon"),this.getItemProp(e,"icon")]},this.getPTOptions(e,t,"icon")),label:r.mergeProps({class:this.cx("label")},this.getPTOptions(e,t,"label")),submenuicon:r.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions(e,t,"submenuIcon"))}}},components:{AngleRightIcon:l.default,AngleDownIcon:m.default},directives:{ripple:u.default}},h=["tabindex"],f=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset","data-p-highlight","data-p-focused","data-p-disabled"],g=["onClick","onMouseenter"],b=["href","onClick"],v=["href","target"],y=["id"];p.render=function(e,t,n,i,s,o){var a=r.resolveComponent("router-link"),c=r.resolveComponent("MegaMenuSub",!0),m=r.resolveDirective("ripple");return r.openBlock(),r.createElementBlock("ul",r.mergeProps({class:e.cx(0===n.level?"menu":"submenu"),tabindex:n.tabindex},e.ptm(0===n.level?"menu":"submenu")),[n.submenu?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,class:[e.cx("submenuHeader",{submenu:n.submenu}),o.getItemProp(n.submenu,"class")],style:o.getItemProp(n.submenu,"style"),role:"presentation"},e.ptm("submenuHeader")),r.toDisplayString(o.getItemLabel(n.submenu)),17)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.items,(function(i,s){return r.openBlock(),r.createElementBlock(r.Fragment,{key:o.getItemKey(i)},[o.isItemVisible(i)&&!o.getItemProp(i,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:0,id:o.getItemId(i),style:o.getItemProp(i,"style"),class:[e.cx("menuitem",{processedItem:i}),o.getItemProp(i,"class")],role:"menuitem","aria-label":o.getItemLabel(i),"aria-disabled":o.isItemDisabled(i)||void 0,"aria-expanded":o.isItemGroup(i)?o.isItemActive(i):void 0,"aria-haspopup":o.isItemGroup(i)&&!o.getItemProp(i,"to")?"menu":void 0,"aria-level":n.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(s)},o.getPTOptions(i,s,"menuitem"),{"data-p-highlight":o.isItemActive(i),"data-p-focused":o.isItemFocused(i),"data-p-disabled":o.isItemDisabled(i)}),[r.createElementVNode("div",r.mergeProps({class:e.cx("content"),onClick:function(e){return o.onItemClick(e,i)},onMouseenter:function(e){return o.onItemMouseEnter(e,i)}},o.getPTOptions(i,s,"content")),[n.templates.item?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.item),{key:1,item:i.item,hasSubmenu:o.isItemGroup(i),label:o.getItemLabel(i),props:o.getMenuItemProps(i,s)},null,8,["item","hasSubmenu","label","props"])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[o.getItemProp(i,"to")&&!o.isItemDisabled(i)?(r.openBlock(),r.createBlock(a,{key:0,to:o.getItemProp(i,"to"),custom:""},{default:r.withCtx((function(t){var a=t.navigate,c=t.href,l=t.isActive,u=t.isExactActive;return[r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({href:c,class:e.cx("action",{isActive:l,isExactActive:u}),tabindex:"-1","aria-hidden":"true",onClick:function(e){return o.onItemActionClick(e,a)}},o.getPTOptions(i,s,"action")),[n.templates.itemicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.itemicon),{key:0,item:i.item,class:r.normalizeClass([e.cx("icon"),o.getItemProp(i,"icon")])},null,8,["item","class"])):o.getItemProp(i,"icon")?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,class:[e.cx("icon"),o.getItemProp(i,"icon")]},o.getPTOptions(i,s,"icon")),null,16)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({class:e.cx("label")},o.getPTOptions(i,s,"label")),r.toDisplayString(o.getItemLabel(i)),17)],16,b)),[[m]])]})),_:2},1032,["to"])):r.withDirectives((r.openBlock(),r.createElementBlock("a",r.mergeProps({key:1,href:o.getItemProp(i,"url"),class:e.cx("action"),target:o.getItemProp(i,"target"),tabindex:"-1","aria-hidden":"true"},o.getPTOptions(i,s,"action")),[n.templates.itemicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.itemicon),{key:0,item:i.item,class:r.normalizeClass([e.cx("icon"),o.getItemProp(i,"icon")])},null,8,["item","class"])):o.getItemProp(i,"icon")?(r.openBlock(),r.createElementBlock("span",r.mergeProps({key:1,class:[e.cx("icon"),o.getItemProp(i,"icon")]},o.getPTOptions(i,s,"icon")),null,16)):r.createCommentVNode("",!0),r.createElementVNode("span",r.mergeProps({class:e.cx("label")},o.getPTOptions(i,s,"label")),r.toDisplayString(o.getItemLabel(i)),17),o.isItemGroup(i)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[n.templates.submenuicon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.templates.submenuicon),r.mergeProps({key:0,active:o.isItemActive(i),class:e.cx("submenuIcon")},o.getPTOptions(i,s,"submenuIcon")),null,16,["active","class"])):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.horizontal?"AngleDownIcon":"AngleRightIcon"),r.mergeProps({key:1,class:e.cx("submenuIcon")},o.getPTOptions(i,s,"submenuIcon")),null,16,["class"]))],64)):r.createCommentVNode("",!0)],16,v)),[[m]])],64))],16,g),o.isItemVisible(i)&&o.isItemGroup(i)?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("panel")},e.ptm("panel")),[r.createElementVNode("div",r.mergeProps({class:e.cx("grid")},e.ptm("grid")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,(function(s){return r.openBlock(),r.createElementBlock("div",r.mergeProps({key:o.getItemKey(s),class:e.cx("column",{processedItem:i})},e.ptm("column")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s,(function(s){return r.openBlock(),r.createBlock(c,{key:o.getSubListKey(s),id:o.getSubListId(s),style:r.normalizeStyle(e.sx("submenu",!0,{processedItem:i})),role:"menu",menuId:n.menuId,focusedItemId:n.focusedItemId,submenu:s,items:s.items,templates:n.templates,exact:n.exact,level:n.level+1,pt:e.pt,unstyled:e.unstyled,onItemClick:t[0]||(t[0]=function(t){return e.$emit("item-click",t)}),onItemMouseenter:t[1]||(t[1]=function(t){return e.$emit("item-mouseenter",t)})},null,8,["id","style","menuId","focusedItemId","submenu","items","templates","exact","level","pt","unstyled"])})),128))],16)})),128))],16)],16)):r.createCommentVNode("",!0)],16,f)):r.createCommentVNode("",!0),o.isItemVisible(i)&&o.getItemProp(i,"separator")?(r.openBlock(),r.createElementBlock("li",r.mergeProps({key:1,id:o.getItemId(i),class:[e.cx("separator"),o.getItemProp(i,"class")],style:o.getItemProp(i,"style"),role:"separator"},e.ptm("separator")),null,16,y)):r.createCommentVNode("",!0)],64)})),128))],16,h)};var k={name:"MegaMenu",extends:I,emits:["focus","blur"],outsideClickListener:null,resizeListener:null,container:null,menubar:null,searchTimeout:null,searchValue:null,data:function(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,key:"",parentKey:""},activeItem:null,dirty:!1}},watch:{"$attrs.id":function(t){this.id=t||e.UniqueComponentId()},activeItem:function(t){e.ObjectUtils.isNotEmpty(t)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())}},beforeMount:function(){this.$slots.item||console.warn("In future versions, vue-router support will be removed. Item templating should be used.")},mounted:function(){this.id=this.id||e.UniqueComponentId()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener()},methods:{getItemProp:function(t,n){return t?e.ObjectUtils.getItemValue(t[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemGroup:function(t){return e.ObjectUtils.isNotEmpty(this.getItemProp(t,"items"))},isItemSeparator:function(e){return this.getItemProp(e,"separator")},getProccessedItemLabel:function(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:function(t){return t&&e.ObjectUtils.isNotEmpty(t.items)},hide:function(t,n){this.activeItem=null,this.focusedItemInfo={index:-1,key:"",parentKey:""},n&&e.DomHandler.focus(this.menubar),this.dirty=!1},onFocus:function(e){if(this.focused=!0,-1===this.focusedItemInfo.index){var t=this.findFirstFocusedItemIndex(),n=this.findVisibleItem(t);this.focusedItemInfo={index:t,key:n.key,parentKey:n.parentKey}}this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedItemInfo={index:-1,key:"",parentKey:""},this.searchValue="",this.dirty=!1,this.$emit("blur",e)},onKeyDown:function(t){if(this.disabled)t.preventDefault();else{var n=t.metaKey||t.ctrlKey;switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"ArrowLeft":this.onArrowLeftKey(t);break;case"ArrowRight":this.onArrowRightKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"Space":this.onSpaceKey(t);break;case"Enter":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Tab":this.onTabKey(t);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&e.ObjectUtils.isPrintableCharacter(t.key)&&this.searchItems(t,t.key)}}},onItemChange:function(t){var n=t.processedItem,i=t.isFocus;if(!e.ObjectUtils.isEmpty(n)){var s=n.index,o=n.key,r=n.parentKey,a=e.ObjectUtils.isNotEmpty(n.items);a&&(this.activeItem=n),this.focusedItemInfo={index:s,key:o,parentKey:r},a&&(this.dirty=!0),i&&e.DomHandler.focus(this.menubar)}},onItemClick:function(t){var n=t.originalEvent,i=t.processedItem,s=this.isProccessedItemGroup(i),o=e.ObjectUtils.isEmpty(i.parent);if(this.isSelected(i)){var r=i.index,a=i.key,c=i.parentKey;this.activeItem=null,this.focusedItemInfo={index:r,key:a,parentKey:c},this.dirty=!o,e.DomHandler.focus(this.menubar)}else if(s)this.onItemChange(t);else{var m=o?i:this.activeItem;this.hide(n),this.changeFocusedItemInfo(n,m?m.index:-1),e.DomHandler.focus(this.menubar)}},onItemMouseEnter:function(e){this.dirty&&this.onItemChange(e)},onArrowDownKey:function(t){if(this.horizontal)if(e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===this.focusedItemInfo.key)this.focusedItemInfo={index:-1,key:"",parentKey:this.activeItem.key};else{var n=this.findVisibleItem(this.focusedItemInfo.index);this.isProccessedItemGroup(n)&&(this.onItemChange({originalEvent:t,processedItem:n}),this.focusedItemInfo={index:-1,key:n.key,parentKey:n.parentKey},this.searchValue="")}var i=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemInfo(t,i),t.preventDefault()},onArrowUpKey:function(t){if(t.altKey&&this.horizontal){if(-1!==this.focusedItemInfo.index){var n=this.findVisibleItem(this.focusedItemInfo.index);!this.isProccessedItemGroup(n)&&e.ObjectUtils.isNotEmpty(this.activeItem)&&(0===this.focusedItemInfo.index?(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key,parentKey:this.activeItem.parentKey},this.activeItem=null):this.changeFocusedItemInfo(t,this.findFirstItemIndex()))}t.preventDefault()}else{var i=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemInfo(t,i),t.preventDefault()}},onArrowLeftKey:function(t){var n=this.findVisibleItem(this.focusedItemInfo.index);if(this.isProccessedItemGroup(n)){if(this.horizontal){var i=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemInfo(t,i)}}else{this.vertical&&e.ObjectUtils.isNotEmpty(this.activeItem)&&0===n.columnIndex&&(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key,parentKey:this.activeItem.parentKey},this.activeItem=null);var s=n.columnIndex-1,o=this.visibleItems.findIndex((function(e){return e.columnIndex===s}));-1!==o&&this.changeFocusedItemInfo(t,o)}t.preventDefault()},onArrowRightKey:function(t){var n=this.findVisibleItem(this.focusedItemInfo.index);if(this.isProccessedItemGroup(n)){if(this.vertical)if(e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===n.key)this.focusedItemInfo={index:-1,key:"",parentKey:this.activeItem.key};else{var i=this.findVisibleItem(this.focusedItemInfo.index);this.isProccessedItemGroup(i)&&(this.onItemChange({originalEvent:t,processedItem:i}),this.focusedItemInfo={index:-1,key:i.key,parentKey:i.parentKey},this.searchValue="")}var s=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemInfo(t,s)}else{var o=n.columnIndex+1,r=this.visibleItems.findIndex((function(e){return e.columnIndex===o}));-1!==r&&this.changeFocusedItemInfo(t,r)}t.preventDefault()},onHomeKey:function(e){this.changeFocusedItemInfo(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey:function(e){this.changeFocusedItemInfo(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey:function(t){if(-1!==this.focusedItemInfo.index){var n=e.DomHandler.findSingle(this.menubar,'li[id="'.concat("".concat(this.focusedItemId),'"]')),i=n&&e.DomHandler.findSingle(n,'a[data-pc-section="action"]');i?i.click():n&&n.click(),!this.isProccessedItemGroup(this.visibleItems[this.focusedItemInfo.index])&&this.changeFocusedItemInfo(t,this.findFirstFocusedItemIndex())}t.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onEscapeKey:function(t){e.ObjectUtils.isNotEmpty(this.activeItem)&&(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key},this.activeItem=null),t.preventDefault()},onTabKey:function(e){if(-1!==this.focusedItemInfo.index){var t=this.findVisibleItem(this.focusedItemInfo.index);!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=e.container&&!e.container.contains(t.target),i=!e.popup||!(e.target&&(e.target===t.target||e.target.contains(t.target)));n&&i&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener:function(){var t=this;this.resizeListener||(this.resizeListener=function(n){e.DomHandler.isTouchDevice()||t.hide(n,!0)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isItemMatched:function(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem:function(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem:function(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected:function(t){return!!e.ObjectUtils.isNotEmpty(this.activeItem)&&this.activeItem.key===t.key},findFirstItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidItem(t)}))},findLastItemIndex:function(){var t=this;return e.ObjectUtils.findLastIndex(this.visibleItems,(function(e){return t.isValidItem(e)}))},findNextItemIndex:function(e){var t=this,n=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((function(e){return t.isValidItem(e)})):-1;return n>-1?n+e+1:e},findPrevItemIndex:function(t){var n=this,i=t>0?e.ObjectUtils.findLastIndex(this.visibleItems.slice(0,t),(function(e){return n.isValidItem(e)})):-1;return i>-1?i:t},findSelectedItemIndex:function(){var e=this;return this.visibleItems.findIndex((function(t){return e.isValidSelectedItem(t)}))},findFirstFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex:function(){var e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},findVisibleItem:function(t){return e.ObjectUtils.isNotEmpty(this.visibleItems)?this.visibleItems[t]:null},searchItems:function(e,t){var n=this;this.searchValue=(this.searchValue||"")+t;var i=-1,s=!1;return-1!==(i=-1!==this.focusedItemInfo.index?-1===(i=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((function(e){return n.isItemMatched(e)})))?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((function(e){return n.isItemMatched(e)})):i+this.focusedItemInfo.index:this.visibleItems.findIndex((function(e){return n.isItemMatched(e)})))&&(s=!0),-1===i&&-1===this.focusedItemInfo.index&&(i=this.findFirstFocusedItemIndex()),-1!==i&&this.changeFocusedItemInfo(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){n.searchValue="",n.searchTimeout=null}),500),s},changeFocusedItemInfo:function(t,n){var i=this.findVisibleItem(n);this.focusedItemInfo.index=n,this.focusedItemInfo.key=e.ObjectUtils.isNotEmpty(i)?i.key:"",this.scrollInView()},scrollInView:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=-1!==t?"".concat(this.id,"_").concat(t):this.focusedItemId,i=e.DomHandler.findSingle(this.menubar,'li[id="'.concat(n,'"]'));i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4?arguments[4]:void 0,r=[];return e&&e.forEach((function(e,a){var c=(""!==s?s+"_":"")+(void 0!==o?o+"_":"")+a,m={item:e,index:a,level:n,key:c,parent:i,parentKey:s,columnIndex:void 0!==o?o:void 0!==i.columnIndex?i.columnIndex:a};m.items=0===n&&e.items&&e.items.length>0?e.items.map((function(e,i){return t.createProcessedItems(e,n+1,m,c,i)})):t.createProcessedItems(e.items,n+1,m,c),r.push(m)})),r},containerRef:function(e){this.container=e},menubarRef:function(e){this.menubar=e?e.$el:void 0}},computed:{processedItems:function(){return this.createProcessedItems(this.model||[])},visibleItems:function(){var t=e.ObjectUtils.isNotEmpty(this.activeItem)?this.activeItem:null;return t&&t.key===this.focusedItemInfo.parentKey?t.items.reduce((function(e,t){return t.forEach((function(t){t.items.forEach((function(t){e.push(t)}))})),e}),[]):this.processedItems},horizontal:function(){return"horizontal"===this.orientation},vertical:function(){return"vertical"===this.orientation},focusedItemId:function(){return e.ObjectUtils.isNotEmpty(this.focusedItemInfo.key)?"".concat(this.id,"_").concat(this.focusedItemInfo.key):null}},components:{MegaMenuSub:p}},x=["id"];k.render=function(e,t,n,i,s,o){var a=r.resolveComponent("MegaMenuSub");return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:o.containerRef,id:s.id,class:e.cx("root")},e.ptm("root"),{"data-pc-name":"megamenu"}),[e.$slots.start?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("start")},e.ptm("start")),[r.renderSlot(e.$slots,"start")],16)):r.createCommentVNode("",!0),r.createVNode(a,{ref:o.menubarRef,id:s.id+"_list",tabindex:e.disabled?-1:e.tabindex,role:"menubar","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-disabled":e.disabled||void 0,"aria-orientation":e.orientation,"aria-activedescendant":s.focused?o.focusedItemId:void 0,menuId:s.id,focusedItemId:s.focused?o.focusedItemId:void 0,items:o.processedItems,horizontal:o.horizontal,templates:e.$slots,activeItem:s.activeItem,exact:e.exact,level:0,pt:e.pt,unstyled:e.unstyled,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter},null,8,["id","tabindex","aria-label","aria-labelledby","aria-disabled","aria-orientation","aria-activedescendant","menuId","focusedItemId","items","horizontal","templates","activeItem","exact","pt","unstyled","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"]),e.$slots.end?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,class:e.cx("end")},e.ptm("end")),[r.renderSlot(e.$slots,"end")],16)):r.createCommentVNode("",!0)],16,x)},module.exports=k;
|
package/megamenu/megamenu.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import AngleRightIcon from 'primevue/icons/angleright';
|
|
|
6
6
|
import Ripple from 'primevue/ripple';
|
|
7
7
|
import { mergeProps, resolveComponent, resolveDirective, openBlock, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, createElementVNode, createBlock, withCtx, withDirectives, resolveDynamicComponent, normalizeClass, normalizeStyle, renderSlot, createVNode } from 'vue';
|
|
8
8
|
|
|
9
|
-
var styles = "\n.p-megamenu {\n
|
|
9
|
+
var styles = "\n@layer primevue {\n .p-megamenu {\n display: flex;\n }\n \n .p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n .p-megamenu-root-list > .p-menuitem {\n position: relative;\n }\n \n .p-megamenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n }\n \n .p-megamenu .p-menuitem-text {\n line-height: 1;\n }\n \n .p-megamenu-panel {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n }\n \n .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n display: block;\n }\n \n .p-megamenu-submenu {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n \n /* Horizontal */\n .p-megamenu-horizontal {\n align-items: center;\n }\n \n .p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n }\n \n /* Vertical */\n .p-megamenu-vertical {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list {\n flex-direction: column;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n left: 100%;\n top: 0;\n }\n \n .p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {\n margin-left: auto;\n }\n \n .p-megamenu-grid {\n display: flex;\n }\n \n .p-megamenu-col-2,\n .p-megamenu-col-3,\n .p-megamenu-col-4,\n .p-megamenu-col-6,\n .p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: 0.5rem;\n }\n \n .p-megamenu-col-2 {\n width: 16.6667%;\n }\n \n .p-megamenu-col-3 {\n width: 25%;\n }\n \n .p-megamenu-col-4 {\n width: 33.3333%;\n }\n \n .p-megamenu-col-6 {\n width: 50%;\n }\n \n .p-megamenu-col-12 {\n width: 100%;\n }\n}\n";
|
|
10
10
|
var inlineStyles = {
|
|
11
11
|
submenu: function submenu(_ref) {
|
|
12
12
|
var instance = _ref.instance,
|