primevue 3.8.2 → 3.11.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 +2 -2
- package/accordion/Accordion.d.ts +74 -11
- package/accordion/accordion.esm.js +1 -1
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +1 -1
- package/accordiontab/AccordionTab.d.ts +37 -8
- package/accordiontab/accordiontab.esm.js +1 -1
- package/accordiontab/accordiontab.esm.min.js +1 -1
- package/accordiontab/accordiontab.js +1 -1
- package/api/Api.d.ts +292 -251
- package/api/api.cjs.js +66 -32
- package/api/api.cjs.min.js +1 -1
- package/api/api.esm.js +66 -32
- package/api/api.esm.min.js +1 -1
- package/api/api.js +67 -33
- package/api/api.min.js +1 -1
- package/autocomplete/AutoComplete.d.ts +280 -63
- package/autocomplete/AutoComplete.vue +16 -9
- package/autocomplete/autocomplete.cjs.js +23 -15
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +20 -12
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +24 -16
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +57 -8
- package/avatar/avatar.esm.js +1 -1
- package/avatar/avatar.esm.min.js +1 -1
- package/avatar/avatar.js +1 -1
- package/avatargroup/AvatarGroup.d.ts +29 -3
- package/avatargroup/avatargroup.esm.js +1 -1
- package/avatargroup/avatargroup.esm.min.js +1 -1
- package/avatargroup/avatargroup.js +1 -1
- package/badge/Badge.d.ts +46 -5
- package/badge/badge.esm.js +1 -1
- package/badge/badge.esm.min.js +1 -1
- package/badge/badge.js +1 -1
- package/badgedirective/badgedirective.esm.js +1 -1
- package/badgedirective/badgedirective.esm.min.js +1 -1
- package/badgedirective/badgedirective.js +1 -1
- package/blockui/BlockUI.d.ts +52 -11
- package/blockui/blockui.esm.js +1 -1
- package/blockui/blockui.esm.min.js +1 -1
- package/blockui/blockui.js +1 -1
- package/breadcrumb/Breadcrumb.d.ts +49 -9
- package/breadcrumb/BreadcrumbItem.vue +5 -2
- package/breadcrumb/breadcrumb.cjs.js +5 -2
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +6 -3
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +6 -3
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/button/Button.d.ts +68 -11
- package/button/button.cjs.js +1 -1
- package/button/button.esm.js +1 -1
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/calendar/Calendar.d.ts +320 -58
- package/calendar/Calendar.vue +406 -84
- package/calendar/calendar.cjs.js +521 -204
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +521 -203
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +523 -205
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +43 -9
- package/card/card.esm.js +1 -1
- package/card/card.esm.min.js +1 -1
- package/card/card.js +1 -1
- package/carousel/Carousel.d.ts +121 -24
- package/carousel/Carousel.vue +2 -2
- package/carousel/carousel.cjs.js +7 -7
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +7 -7
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +8 -8
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +172 -35
- package/cascadeselect/cascadeselect.cjs.js +2 -2
- package/cascadeselect/cascadeselect.esm.js +1 -1
- package/cascadeselect/cascadeselect.esm.min.js +1 -1
- package/cascadeselect/cascadeselect.js +3 -3
- package/chart/Chart.d.ts +104 -12
- package/chart/Chart.vue +18 -4
- package/chart/chart.cjs.js +20 -8
- package/chart/chart.cjs.min.js +1 -1
- package/chart/chart.esm.js +19 -5
- package/chart/chart.esm.min.js +1 -1
- package/chart/chart.js +19 -5
- package/chart/chart.min.js +1 -1
- package/checkbox/Checkbox.d.ts +66 -8
- package/checkbox/checkbox.esm.js +1 -1
- package/checkbox/checkbox.esm.min.js +1 -1
- package/checkbox/checkbox.js +1 -1
- package/chip/Chip.d.ts +50 -4
- package/chip/chip.esm.js +1 -1
- package/chip/chip.esm.min.js +1 -1
- package/chip/chip.js +1 -1
- package/chips/Chips.d.ts +88 -15
- package/chips/chips.esm.js +1 -1
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -1
- package/colorpicker/ColorPicker.d.ts +105 -13
- package/colorpicker/ColorPicker.vue +6 -1
- package/colorpicker/colorpicker.cjs.js +7 -2
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +7 -2
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -3
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +448 -78
- package/column/column.esm.js +1 -1
- package/column/column.esm.min.js +1 -1
- package/column/column.js +1 -1
- package/columngroup/ColumnGroup.d.ts +30 -4
- package/columngroup/columngroup.esm.js +1 -1
- package/columngroup/columngroup.esm.min.js +1 -1
- package/columngroup/columngroup.js +1 -1
- package/config/config.cjs.js +1 -1
- package/config/config.esm.js +1 -2
- package/config/config.esm.min.js +1 -1
- package/config/config.js +2 -2
- package/confirmationeventbus/confirmationeventbus.esm.js +1 -1
- package/confirmationeventbus/confirmationeventbus.esm.min.js +1 -1
- package/confirmationeventbus/confirmationeventbus.js +1 -1
- package/confirmationoptions/ConfirmationOptions.d.ts +58 -0
- package/confirmationoptions/package.json +3 -0
- package/confirmationservice/ConfirmationService.d.ts +2 -1
- package/confirmationservice/confirmationservice.cjs.js +2 -2
- package/confirmationservice/confirmationservice.esm.js +1 -1
- package/confirmationservice/confirmationservice.esm.min.js +1 -1
- package/confirmationservice/confirmationservice.js +3 -3
- package/confirmdialog/ConfirmDialog.d.ts +57 -5
- package/confirmdialog/ConfirmDialog.vue +8 -2
- package/confirmdialog/confirmdialog.cjs.js +17 -10
- package/confirmdialog/confirmdialog.cjs.min.js +1 -1
- package/confirmdialog/confirmdialog.esm.js +12 -5
- package/confirmdialog/confirmdialog.esm.min.js +1 -1
- package/confirmdialog/confirmdialog.js +18 -11
- package/confirmdialog/confirmdialog.min.js +1 -1
- package/confirmpopup/ConfirmPopup.d.ts +41 -3
- package/confirmpopup/ConfirmPopup.vue +7 -4
- package/confirmpopup/confirmpopup.cjs.js +19 -11
- package/confirmpopup/confirmpopup.cjs.min.js +1 -1
- package/confirmpopup/confirmpopup.esm.js +15 -7
- package/confirmpopup/confirmpopup.esm.min.js +1 -1
- package/confirmpopup/confirmpopup.js +20 -12
- package/confirmpopup/confirmpopup.min.js +1 -1
- package/contextmenu/ContextMenu.d.ts +88 -16
- package/contextmenu/ContextMenuSub.vue +7 -4
- package/contextmenu/contextmenu.cjs.js +8 -5
- package/contextmenu/contextmenu.cjs.min.js +1 -1
- package/contextmenu/contextmenu.esm.js +8 -5
- package/contextmenu/contextmenu.esm.min.js +1 -1
- package/contextmenu/contextmenu.js +9 -6
- package/contextmenu/contextmenu.min.js +1 -1
- package/core/core.js +861 -383
- package/core/core.min.js +15 -13
- package/datatable/BodyCell.vue +27 -1
- package/datatable/ColumnFilter.vue +17 -6
- package/datatable/DataTable.d.ts +1056 -130
- package/datatable/DataTable.vue +150 -131
- package/datatable/HeaderCheckbox.vue +5 -2
- package/datatable/RowCheckbox.vue +1 -1
- package/datatable/RowRadioButton.vue +1 -1
- package/datatable/TableBody.vue +57 -14
- package/datatable/TableFooter.vue +15 -1
- package/datatable/TableHeader.vue +15 -1
- package/datatable/datatable.cjs.js +542 -381
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +533 -373
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +543 -383
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +198 -32
- package/dataview/DataView.vue +8 -8
- package/dataview/dataview.cjs.js +13 -13
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +13 -13
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +14 -14
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +34 -5
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
- package/dataviewlayoutoptions/dataviewlayoutoptions.js +1 -1
- package/deferredcontent/DeferredContent.d.ts +31 -6
- package/deferredcontent/deferredcontent.esm.js +1 -1
- package/deferredcontent/deferredcontent.esm.min.js +1 -1
- package/deferredcontent/deferredcontent.js +1 -1
- package/dialog/Dialog.d.ts +187 -34
- package/dialog/Dialog.vue +1 -1
- package/dialog/dialog.cjs.js +2 -3
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +2 -3
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +3 -4
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +53 -8
- package/divider/divider.esm.js +1 -1
- package/divider/divider.esm.min.js +1 -1
- package/divider/divider.js +1 -1
- package/dock/Dock.d.ts +92 -15
- package/dock/DockSub.vue +3 -1
- package/dock/dock.cjs.js +4 -1
- package/dock/dock.cjs.min.js +1 -1
- package/dock/dock.esm.js +4 -2
- package/dock/dock.esm.min.js +1 -1
- package/dock/dock.js +5 -3
- package/dock/dock.min.js +1 -1
- package/dropdown/Dropdown.d.ts +340 -76
- package/dropdown/Dropdown.vue +1 -1
- package/dropdown/dropdown.cjs.js +4 -4
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +2 -2
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +5 -5
- package/dropdown/dropdown.min.js +1 -1
- package/editor/Editor.d.ts +78 -11
- package/editor/editor.cjs.js +1 -1
- package/editor/editor.esm.js +1 -1
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/fieldset/Fieldset.d.ts +63 -11
- package/fieldset/fieldset.cjs.js +1 -1
- package/fieldset/fieldset.esm.js +1 -1
- package/fieldset/fieldset.esm.min.js +1 -1
- package/fieldset/fieldset.js +2 -2
- package/fileupload/FileUpload.d.ts +255 -37
- package/fileupload/fileupload.cjs.js +4 -4
- package/fileupload/fileupload.esm.js +1 -1
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -5
- package/fullcalendar/FullCalendar.d.ts +29 -3
- package/fullcalendar/fullcalendar.esm.js +1 -1
- package/fullcalendar/fullcalendar.esm.min.js +1 -1
- package/fullcalendar/fullcalendar.js +1 -1
- package/galleria/Galleria.d.ts +196 -46
- package/galleria/galleria.cjs.js +3 -3
- package/galleria/galleria.esm.js +1 -1
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +4 -4
- package/image/Image.d.ts +51 -6
- package/image/image.esm.js +1 -1
- package/image/image.esm.min.js +1 -1
- package/image/image.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +34 -6
- package/inlinemessage/inlinemessage.esm.js +1 -1
- package/inlinemessage/inlinemessage.esm.min.js +1 -1
- package/inlinemessage/inlinemessage.js +1 -1
- package/inplace/Inplace.d.ts +57 -12
- package/inplace/inplace.cjs.js +1 -1
- package/inplace/inplace.esm.js +1 -1
- package/inplace/inplace.esm.min.js +1 -1
- package/inplace/inplace.js +2 -2
- package/inputmask/InputMask.d.ts +75 -15
- package/inputmask/inputmask.esm.js +1 -1
- package/inputmask/inputmask.esm.min.js +1 -1
- package/inputmask/inputmask.js +1 -1
- package/inputnumber/InputNumber.d.ts +180 -30
- package/inputnumber/InputNumber.vue +19 -3
- package/inputnumber/inputnumber.cjs.js +21 -5
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +20 -4
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +22 -6
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +61 -9
- package/inputswitch/inputswitch.esm.js +1 -1
- package/inputswitch/inputswitch.esm.min.js +1 -1
- package/inputswitch/inputswitch.js +1 -1
- package/inputtext/InputText.d.ts +34 -5
- package/inputtext/InputText.vue +1 -1
- package/inputtext/inputtext.cjs.js +2 -2
- package/inputtext/inputtext.cjs.min.js +1 -1
- package/inputtext/inputtext.esm.js +4 -4
- package/inputtext/inputtext.esm.min.js +1 -1
- package/inputtext/inputtext.js +3 -3
- package/inputtext/inputtext.min.js +1 -1
- package/knob/Knob.d.ts +92 -18
- package/knob/knob.esm.js +1 -1
- package/knob/knob.esm.min.js +1 -1
- package/knob/knob.js +1 -1
- package/listbox/Listbox.d.ts +246 -56
- package/listbox/listbox.cjs.js +2 -2
- package/listbox/listbox.esm.js +1 -1
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +3 -3
- package/megamenu/MegaMenu.d.ts +60 -12
- package/megamenu/MegaMenu.vue +10 -7
- package/megamenu/megamenu.cjs.js +11 -8
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +11 -8
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +12 -9
- package/megamenu/megamenu.min.js +1 -1
- package/menu/Menu.d.ts +84 -15
- package/menu/Menu.vue +6 -3
- package/menu/Menuitem.vue +5 -2
- package/menu/menu.cjs.js +13 -7
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.esm.js +12 -6
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +14 -8
- package/menu/menu.min.js +1 -1
- package/menubar/Menubar.d.ts +52 -11
- package/menubar/Menubar.vue +1 -0
- package/menubar/MenubarSub.vue +7 -4
- package/menubar/menubar.cjs.js +9 -6
- package/menubar/menubar.cjs.min.js +1 -1
- package/menubar/menubar.esm.js +9 -6
- package/menubar/menubar.esm.min.js +1 -1
- package/menubar/menubar.js +10 -7
- package/menubar/menubar.min.js +1 -1
- package/menuitem/MenuItem.d.ts +82 -0
- package/menuitem/package.json +3 -0
- package/message/Message.d.ts +57 -10
- package/message/Message.vue +6 -2
- package/message/message.cjs.js +7 -3
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +7 -3
- package/message/message.esm.min.js +1 -1
- package/message/message.js +8 -4
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +368 -83
- package/multiselect/multiselect.cjs.js +3 -3
- package/multiselect/multiselect.esm.js +1 -1
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +4 -4
- package/orderlist/OrderList.d.ts +122 -17
- package/orderlist/OrderList.vue +2 -0
- package/orderlist/orderlist.cjs.js +5 -3
- package/orderlist/orderlist.cjs.min.js +1 -1
- package/orderlist/orderlist.esm.js +4 -2
- package/orderlist/orderlist.esm.min.js +1 -1
- package/orderlist/orderlist.js +6 -4
- package/orderlist/orderlist.min.js +1 -1
- package/organizationchart/OrganizationChart.d.ts +137 -15
- package/organizationchart/OrganizationChart.vue +1 -0
- package/organizationchart/organizationchart.cjs.js +1 -1
- package/organizationchart/organizationchart.cjs.min.js +1 -1
- package/organizationchart/organizationchart.esm.js +2 -2
- package/organizationchart/organizationchart.esm.min.js +1 -1
- package/organizationchart/organizationchart.js +2 -2
- package/organizationchart/organizationchart.min.js +1 -1
- package/overlayeventbus/overlayeventbus.esm.js +1 -1
- package/overlayeventbus/overlayeventbus.esm.min.js +1 -1
- package/overlayeventbus/overlayeventbus.js +1 -1
- package/overlaypanel/OverlayPanel.d.ts +107 -12
- package/overlaypanel/overlaypanel.cjs.js +5 -5
- package/overlaypanel/overlaypanel.esm.js +1 -1
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +6 -6
- package/package.json +5 -1
- package/paginator/Paginator.d.ts +129 -27
- package/paginator/Paginator.vue +4 -4
- package/paginator/paginator.cjs.js +12 -12
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +5 -5
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +13 -13
- package/paginator/paginator.min.js +1 -1
- package/panel/Panel.d.ts +64 -8
- package/panel/Panel.vue +1 -1
- package/panel/panel.cjs.js +1 -1
- package/panel/panel.esm.js +1 -1
- package/panel/panel.esm.min.js +1 -1
- package/panel/panel.js +2 -2
- package/panelmenu/PanelMenu.d.ts +59 -11
- package/panelmenu/PanelMenu.vue +8 -5
- package/panelmenu/PanelMenuSub.vue +8 -5
- package/panelmenu/panelmenu.cjs.js +18 -12
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +19 -13
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +19 -13
- package/panelmenu/panelmenu.min.js +1 -1
- package/password/Password.d.ts +115 -24
- package/password/password.cjs.js +2 -2
- package/password/password.esm.js +1 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +3 -3
- package/picklist/PickList.d.ts +199 -26
- package/picklist/PickList.vue +10 -4
- package/picklist/picklist.cjs.js +15 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +14 -8
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +16 -10
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +43 -8
- package/progressbar/ProgressBar.vue +13 -12
- package/progressbar/progressbar.cjs.js +13 -12
- package/progressbar/progressbar.cjs.min.js +1 -1
- package/progressbar/progressbar.esm.js +15 -14
- package/progressbar/progressbar.esm.min.js +1 -1
- package/progressbar/progressbar.js +14 -13
- package/progressbar/progressbar.min.js +1 -1
- package/progressspinner/ProgressSpinner.d.ts +39 -6
- package/progressspinner/progressspinner.esm.js +1 -1
- package/progressspinner/progressspinner.esm.min.js +1 -1
- package/progressspinner/progressspinner.js +1 -1
- package/radiobutton/RadioButton.d.ts +52 -7
- package/radiobutton/radiobutton.esm.js +1 -1
- package/radiobutton/radiobutton.esm.min.js +1 -1
- package/radiobutton/radiobutton.js +1 -1
- package/rating/Rating.d.ts +67 -10
- package/rating/Rating.vue +1 -1
- package/rating/rating.cjs.js +1 -1
- package/rating/rating.cjs.min.js +1 -1
- package/rating/rating.esm.js +2 -2
- package/rating/rating.esm.min.js +1 -1
- package/rating/rating.js +2 -2
- package/rating/rating.min.js +1 -1
- package/resources/primevue.css +5 -0
- package/resources/primevue.min.css +1 -1
- package/resources/themes/arya-blue/theme.css +81 -33
- package/resources/themes/arya-green/theme.css +81 -33
- package/resources/themes/arya-orange/theme.css +81 -33
- package/resources/themes/arya-purple/theme.css +81 -33
- package/resources/themes/bootstrap4-dark-blue/theme.css +62 -21
- package/resources/themes/bootstrap4-dark-purple/theme.css +62 -21
- package/resources/themes/bootstrap4-light-blue/theme.css +62 -21
- package/resources/themes/bootstrap4-light-purple/theme.css +62 -21
- package/resources/themes/fluent-light/theme.css +81 -33
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-blue/theme.css +5421 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-indigo/theme.css +5421 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-purple/theme.css +5421 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-dark-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-dark-teal/theme.css +5421 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-blue/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-blue/theme.css +5421 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-indigo/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-indigo/theme.css +5421 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-purple/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-purple/theme.css +5421 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Bold.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Light.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Medium.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-Regular.woff2 +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff +0 -0
- package/resources/themes/lara-light-teal/fonts/Inter-SemiBold.woff2 +0 -0
- package/resources/themes/lara-light-teal/theme.css +5421 -0
- package/resources/themes/luna-amber/theme.css +78 -37
- package/resources/themes/luna-blue/theme.css +78 -37
- package/resources/themes/luna-green/theme.css +78 -37
- package/resources/themes/luna-pink/theme.css +78 -37
- package/resources/themes/md-dark-deeppurple/theme.css +252 -48
- package/resources/themes/md-dark-indigo/theme.css +252 -48
- package/resources/themes/md-light-deeppurple/theme.css +252 -48
- package/resources/themes/md-light-indigo/theme.css +252 -48
- package/resources/themes/mdc-dark-deeppurple/theme.css +252 -48
- package/resources/themes/mdc-dark-indigo/theme.css +252 -48
- package/resources/themes/mdc-light-deeppurple/theme.css +252 -48
- package/resources/themes/mdc-light-indigo/theme.css +252 -48
- package/resources/themes/nova/theme.css +78 -37
- package/resources/themes/nova-accent/theme.css +78 -37
- package/resources/themes/nova-alt/theme.css +78 -37
- package/resources/themes/nova-vue/theme.css +78 -37
- package/resources/themes/rhea/theme.css +78 -37
- package/resources/themes/saga-blue/theme.css +65 -17
- package/resources/themes/saga-green/theme.css +65 -17
- package/resources/themes/saga-orange/theme.css +65 -17
- package/resources/themes/saga-purple/theme.css +65 -17
- package/resources/themes/tailwind-light/theme.css +92 -36
- package/resources/themes/vela-blue/theme.css +81 -33
- package/resources/themes/vela-green/theme.css +81 -33
- package/resources/themes/vela-orange/theme.css +81 -33
- package/resources/themes/vela-purple/theme.css +81 -33
- package/ripple/ripple.esm.js +1 -1
- package/ripple/ripple.esm.min.js +1 -1
- package/ripple/ripple.js +1 -1
- package/row/Row.d.ts +25 -3
- package/row/row.esm.js +1 -1
- package/row/row.esm.min.js +1 -1
- package/row/row.js +1 -1
- package/scrollpanel/ScrollPanel.d.ts +27 -5
- package/scrollpanel/scrollpanel.esm.js +1 -1
- package/scrollpanel/scrollpanel.esm.min.js +1 -1
- package/scrollpanel/scrollpanel.js +1 -1
- package/scrolltop/ScrollTop.d.ts +47 -7
- package/scrolltop/scrolltop.esm.js +1 -1
- package/scrolltop/scrolltop.esm.min.js +1 -1
- package/scrolltop/scrolltop.js +1 -1
- package/selectbutton/SelectButton.d.ts +108 -19
- package/selectbutton/SelectButton.vue +8 -2
- package/selectbutton/selectbutton.cjs.js +15 -10
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +15 -10
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +16 -11
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +81 -16
- package/sidebar/sidebar.cjs.js +1 -1
- package/sidebar/sidebar.esm.js +1 -1
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +2 -2
- package/skeleton/Skeleton.d.ts +58 -9
- package/skeleton/skeleton.esm.js +1 -1
- package/skeleton/skeleton.esm.min.js +1 -1
- package/skeleton/skeleton.js +1 -1
- package/slider/Slider.d.ts +90 -14
- package/slider/slider.esm.js +1 -1
- package/slider/slider.esm.min.js +1 -1
- package/slider/slider.js +1 -1
- package/speeddial/SpeedDial.d.ts +166 -29
- package/speeddial/SpeedDial.vue +3 -1
- package/speeddial/speeddial.cjs.js +5 -2
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +4 -2
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +6 -4
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +76 -11
- package/splitbutton/SplitButton.vue +3 -1
- package/splitbutton/splitbutton.cjs.js +15 -13
- package/splitbutton/splitbutton.cjs.min.js +1 -1
- package/splitbutton/splitbutton.esm.js +15 -13
- package/splitbutton/splitbutton.esm.min.js +1 -1
- package/splitbutton/splitbutton.js +16 -14
- package/splitbutton/splitbutton.min.js +1 -1
- package/splitter/Splitter.d.ts +74 -7
- package/splitter/Splitter.vue +5 -5
- package/splitter/splitter.cjs.js +1 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +2 -2
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +2 -2
- package/splitter/splitter.min.js +1 -1
- package/splitterpanel/SplitterPanel.d.ts +34 -7
- package/splitterpanel/splitterpanel.esm.js +1 -1
- package/splitterpanel/splitterpanel.esm.min.js +1 -1
- package/splitterpanel/splitterpanel.js +1 -1
- package/steps/Steps.d.ts +51 -11
- package/steps/Steps.vue +5 -2
- package/steps/steps.cjs.js +5 -2
- package/steps/steps.cjs.min.js +1 -1
- package/steps/steps.esm.js +6 -3
- package/steps/steps.esm.min.js +1 -1
- package/steps/steps.js +6 -3
- package/steps/steps.min.js +1 -1
- package/styleclass/styleclass.esm.js +1 -1
- package/styleclass/styleclass.esm.min.js +1 -1
- package/styleclass/styleclass.js +1 -1
- package/tabmenu/TabMenu.d.ts +63 -10
- package/tabmenu/TabMenu.vue +6 -3
- package/tabmenu/tabmenu.cjs.js +7 -4
- package/tabmenu/tabmenu.cjs.min.js +1 -1
- package/tabmenu/tabmenu.esm.js +7 -4
- package/tabmenu/tabmenu.esm.min.js +1 -1
- package/tabmenu/tabmenu.js +8 -5
- package/tabmenu/tabmenu.min.js +1 -1
- package/tabpanel/TabPanel.d.ts +38 -7
- package/tabpanel/tabpanel.esm.js +1 -1
- package/tabpanel/tabpanel.esm.min.js +1 -1
- package/tabpanel/tabpanel.js +1 -1
- package/tabview/TabView.d.ts +73 -11
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +2 -2
- package/tag/Tag.d.ts +44 -8
- package/tag/Tag.vue +1 -1
- package/tag/tag.cjs.js +6 -6
- package/tag/tag.cjs.min.js +1 -1
- package/tag/tag.esm.js +8 -8
- package/tag/tag.esm.min.js +1 -1
- package/tag/tag.js +7 -7
- package/tag/tag.min.js +1 -1
- package/terminal/Terminal.d.ts +36 -5
- package/terminal/terminal.cjs.js +3 -3
- package/terminal/terminal.esm.js +1 -1
- package/terminal/terminal.esm.min.js +1 -1
- package/terminal/terminal.js +4 -4
- package/terminalservice/TerminalService.d.ts +9 -6
- package/terminalservice/terminalservice.esm.js +1 -1
- package/terminalservice/terminalservice.esm.min.js +1 -1
- package/terminalservice/terminalservice.js +1 -1
- package/textarea/Textarea.d.ts +38 -6
- package/textarea/textarea.esm.js +1 -1
- package/textarea/textarea.esm.min.js +1 -1
- package/textarea/textarea.js +1 -1
- package/tieredmenu/TieredMenu.d.ts +89 -15
- package/tieredmenu/TieredMenuSub.vue +7 -4
- package/tieredmenu/tieredmenu.cjs.js +9 -6
- package/tieredmenu/tieredmenu.cjs.min.js +1 -1
- package/tieredmenu/tieredmenu.esm.js +8 -5
- package/tieredmenu/tieredmenu.esm.min.js +1 -1
- package/tieredmenu/tieredmenu.js +10 -7
- package/tieredmenu/tieredmenu.min.js +1 -1
- package/timeline/Timeline.d.ts +94 -15
- package/timeline/timeline.esm.js +1 -1
- package/timeline/timeline.esm.min.js +1 -1
- package/timeline/timeline.js +1 -1
- package/toast/Toast.d.ts +118 -12
- package/toast/toast.cjs.js +7 -7
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +8 -8
- package/toasteventbus/toasteventbus.esm.js +1 -1
- package/toasteventbus/toasteventbus.esm.min.js +1 -1
- package/toasteventbus/toasteventbus.js +1 -1
- package/toastservice/ToastService.d.ts +17 -5
- package/toastservice/toastservice.cjs.js +3 -3
- package/toastservice/toastservice.esm.js +1 -1
- package/toastservice/toastservice.esm.min.js +1 -1
- package/toastservice/toastservice.js +4 -4
- package/togglebutton/ToggleButton.d.ts +64 -11
- package/togglebutton/togglebutton.cjs.js +1 -1
- package/togglebutton/togglebutton.esm.js +1 -1
- package/togglebutton/togglebutton.esm.min.js +1 -1
- package/togglebutton/togglebutton.js +2 -2
- package/toolbar/Toolbar.d.ts +31 -6
- package/toolbar/Toolbar.vue +2 -2
- package/toolbar/toolbar.cjs.js +2 -2
- package/toolbar/toolbar.cjs.min.js +1 -1
- package/toolbar/toolbar.esm.js +3 -3
- package/toolbar/toolbar.esm.min.js +1 -1
- package/toolbar/toolbar.js +3 -3
- package/toolbar/toolbar.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/tree/Tree.d.ts +189 -26
- package/tree/Tree.vue +1 -0
- package/tree/TreeNode.vue +4 -1
- package/tree/tree.cjs.js +6 -3
- package/tree/tree.cjs.min.js +1 -1
- package/tree/tree.esm.js +6 -3
- package/tree/tree.esm.min.js +1 -1
- package/tree/tree.js +7 -4
- package/tree/tree.min.js +1 -1
- package/treeselect/TreeSelect.d.ts +201 -44
- package/treeselect/TreeSelect.vue +9 -0
- package/treeselect/treeselect.cjs.js +12 -3
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +10 -1
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +13 -4
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/BodyCell.vue +3 -3
- package/treetable/TreeTable.d.ts +459 -63
- package/treetable/TreeTable.vue +9 -9
- package/treetable/treetable.cjs.js +17 -17
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +16 -16
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +18 -18
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +40 -6
- package/tristatecheckbox/tristatecheckbox.esm.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +1 -1
- package/ts-helpers.d.ts +28 -0
- package/useconfirm/UseConfirm.d.ts +5 -19
- package/useconfirm/useconfirm.js +1 -1
- package/usetoast/UseToast.d.ts +3 -5
- package/usetoast/usetoast.js +1 -1
- package/utils/Utils.d.ts +3 -0
- package/utils/utils.cjs.js +41 -4
- package/utils/utils.cjs.min.js +1 -1
- package/utils/utils.esm.js +41 -4
- package/utils/utils.esm.min.js +1 -1
- package/utils/utils.js +42 -5
- package/utils/utils.min.js +1 -1
- package/vetur-attributes.json +66 -30
- package/vetur-tags.json +16 -7
- package/virtualscroller/VirtualScroller.d.ts +294 -53
- package/virtualscroller/VirtualScroller.vue +296 -255
- package/virtualscroller/virtualscroller.cjs.js +325 -266
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +326 -267
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +326 -267
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +296 -47
package/menubar/MenubarSub.vue
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ul :class="containerClass" :role="root ? 'menubar' : 'menu'">
|
|
3
|
-
<template v-for="(item, i) of model" :key="item
|
|
3
|
+
<template v-for="(item, i) of model" :key="label(item) + i.toString()">
|
|
4
4
|
<li role="none" :class="getItemClass(item)" :style="item.style" v-if="visible(item) && !item.separator"
|
|
5
5
|
@mouseenter="onItemMouseEnter($event, item)">
|
|
6
6
|
<template v-if="!template">
|
|
7
7
|
<router-link v-if="item.to && !disabled(item)" :to="item.to" custom v-slot="{navigate, href, isActive, isExactActive}">
|
|
8
8
|
<a :href="href" @click="onItemClick($event, item, navigate)" :class="linkClass(item, {isActive, isExactActive})" v-ripple @keydown="onItemKeyDown($event, item)" role="menuitem">
|
|
9
9
|
<span :class="['p-menuitem-icon', item.icon]"></span>
|
|
10
|
-
<span class="p-menuitem-text">{{item
|
|
10
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
11
11
|
</a>
|
|
12
12
|
</router-link>
|
|
13
13
|
<a v-else :href="item.url" :class="linkClass(item)" :target="item.target" :aria-haspopup="item.items != null" :aria-expanded="item === activeItem"
|
|
14
14
|
@click="onItemClick($event, item)" @keydown="onItemKeyDown($event, item)" role="menuitem" :tabindex="disabled(item) ? null : '0'" v-ripple>
|
|
15
15
|
<span :class="['p-menuitem-icon', item.icon]"></span>
|
|
16
|
-
<span class="p-menuitem-text">{{item
|
|
16
|
+
<span class="p-menuitem-text">{{label(item)}}</span>
|
|
17
17
|
<span :class="getSubmenuIcon()" v-if="item.items"></span>
|
|
18
18
|
</a>
|
|
19
19
|
</template>
|
|
20
20
|
<component v-else :is="template" :item="item"></component>
|
|
21
|
-
<MenubarSub :model="item.items" v-if="visible(item) && item.items" :key="item
|
|
21
|
+
<MenubarSub :model="item.items" v-if="visible(item) && item.items" :key="label(item) + '_sub_'" :mobileActive="mobileActive"
|
|
22
22
|
@leaf-click="onLeafClick" @keydown-item="onChildItemKeyDown" :parentActive="item === activeItem" :template="template" :exact="exact" />
|
|
23
23
|
</li>
|
|
24
24
|
<li :class="['p-menu-separator', item.class]" :style="item.style" v-if="visible(item) && item.separator" :key="'separator' + i.toString()" role="separator"></li>
|
|
@@ -289,6 +289,9 @@ export default {
|
|
|
289
289
|
},
|
|
290
290
|
disabled(item) {
|
|
291
291
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
292
|
+
},
|
|
293
|
+
label(item) {
|
|
294
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
292
295
|
}
|
|
293
296
|
},
|
|
294
297
|
computed: {
|
package/menubar/menubar.cjs.js
CHANGED
|
@@ -264,6 +264,9 @@ var script$1 = {
|
|
|
264
264
|
},
|
|
265
265
|
disabled(item) {
|
|
266
266
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
267
|
+
},
|
|
268
|
+
label(item) {
|
|
269
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
267
270
|
}
|
|
268
271
|
},
|
|
269
272
|
computed: {
|
|
@@ -272,7 +275,7 @@ var script$1 = {
|
|
|
272
275
|
}
|
|
273
276
|
},
|
|
274
277
|
directives: {
|
|
275
|
-
'ripple': Ripple__default[
|
|
278
|
+
'ripple': Ripple__default["default"]
|
|
276
279
|
}
|
|
277
280
|
};
|
|
278
281
|
|
|
@@ -290,7 +293,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
290
293
|
}, [
|
|
291
294
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
|
|
292
295
|
return (vue.openBlock(), vue.createBlock(vue.Fragment, {
|
|
293
|
-
key:
|
|
296
|
+
key: $options.label(item) + i.toString()
|
|
294
297
|
}, [
|
|
295
298
|
($options.visible(item) && !item.separator)
|
|
296
299
|
? (vue.openBlock(), vue.createBlock("li", {
|
|
@@ -319,7 +322,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
319
322
|
vue.createVNode("span", {
|
|
320
323
|
class: ['p-menuitem-icon', item.icon]
|
|
321
324
|
}, null, 2),
|
|
322
|
-
vue.createVNode("span", _hoisted_1$1, vue.toDisplayString(
|
|
325
|
+
vue.createVNode("span", _hoisted_1$1, vue.toDisplayString($options.label(item)), 1)
|
|
323
326
|
], 42, ["href", "onClick", "onKeydown"]), [
|
|
324
327
|
[_directive_ripple]
|
|
325
328
|
])
|
|
@@ -341,7 +344,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
341
344
|
vue.createVNode("span", {
|
|
342
345
|
class: ['p-menuitem-icon', item.icon]
|
|
343
346
|
}, null, 2),
|
|
344
|
-
vue.createVNode("span", _hoisted_2$1, vue.toDisplayString(
|
|
347
|
+
vue.createVNode("span", _hoisted_2$1, vue.toDisplayString($options.label(item)), 1),
|
|
345
348
|
(item.items)
|
|
346
349
|
? (vue.openBlock(), vue.createBlock("span", {
|
|
347
350
|
key: 0,
|
|
@@ -359,7 +362,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
359
362
|
($options.visible(item) && item.items)
|
|
360
363
|
? (vue.openBlock(), vue.createBlock(_component_MenubarSub, {
|
|
361
364
|
model: item.items,
|
|
362
|
-
key:
|
|
365
|
+
key: $options.label(item) + '_sub_',
|
|
363
366
|
mobileActive: $props.mobileActive,
|
|
364
367
|
onLeafClick: $options.onLeafClick,
|
|
365
368
|
onKeydownItem: $options.onChildItemKeyDown,
|
|
@@ -526,7 +529,7 @@ function styleInject(css, ref) {
|
|
|
526
529
|
}
|
|
527
530
|
}
|
|
528
531
|
|
|
529
|
-
var css_248z = "\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n";
|
|
532
|
+
var css_248z = "\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-decoration: none;\n}\n";
|
|
530
533
|
styleInject(css_248z);
|
|
531
534
|
|
|
532
535
|
script.render = render;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"MenubarSub",emits:["keydown-item","leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)||this.mobileActive?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let n=e.currentTarget.parentElement;switch(e.which){case 40:this.root?t.items&&this.expandSubmenu(t,n):this.navigateToNextItem(n),e.preventDefault();break;case 38:this.root||this.navigateToPrevItem(n),e.preventDefault();break;case 39:if(this.root){var i=this.findNextItem(n);i&&i.children[0].focus()}else t.items&&this.expandSubmenu(t,n);e.preventDefault();break;case 37:this.root&&this.navigateToPrevItem(n),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:n})},onChildItemKeyDown(e){this.root?38===e.originalEvent.which&&null==e.element.previousElementSibling&&this.collapseMenu(e.element):37===e.originalEvent.which&&this.collapseMenu(e.element)},findNextItem(t){let n=t.nextElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null},findPrevItem(t){let n=t.previousElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null},expandSubmenu(e,t){this.activeItem=e,setTimeout((()=>{t.children[1].children[0].children[0].focus()}),50)},collapseMenu(e){this.activeItem=null,e.parentElement.previousElementSibling.focus()},navigateToNextItem(e){var t=this.findNextItem(e);t&&t.children[0].focus()},navigateToPrevItem(e){var t=this.findPrevItem(e);t&&t.children[0].focus()},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},getSubmenuIcon(){return["p-submenu-icon pi",{"pi-angle-right":!this.root,"pi-angle-down":this.root}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},directives:{ripple:i(t).default}};const o={class:"p-menuitem-text"},s={class:"p-menuitem-text"};l.render=function(e,t,i,l,a,r){const c=n.resolveComponent("router-link"),m=n.resolveComponent("MenubarSub",!0),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{class:r.containerClass,role:i.root?"menubar":"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:e.label+t.toString()},[r.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:r.getItemClass(e),style:e.style,onMouseenter:t=>r.onItemMouseEnter(t,e)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!r.disabled(e)?(n.openBlock(),n.createBlock(c,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>r.onItemClick(n,e,t),class:r.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",o,n.toDisplayString(e.label),1)],42,["href","onClick","onKeydown"]),[[u]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:r.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===a.activeItem,onClick:t=>r.onItemClick(t,e),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem",tabindex:r.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(e.label),1),e.items?(n.openBlock(),n.createBlock("span",{key:0,class:r.getSubmenuIcon()},null,2)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[u]])],64)),r.visible(e)&&e.items?(n.openBlock(),n.createBlock(m,{model:e.items,key:e.label+"_sub_",mobileActive:i.mobileActive,onLeafClick:r.onLeafClick,onKeydownItem:r.onChildItemKeyDown,parentActive:e===a.activeItem,template:i.template,exact:i.exact},null,8,["model","mobileActive","onLeafClick","onKeydownItem","parentActive","template","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),r.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],10,["role"])};var a={name:"Menubar",props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0}},outsideClickListener:null,data:()=>({mobileActive:!1}),beforeUnmount(){this.mobileActive=!1,this.unbindOutsideClickListener(),this.$refs.rootmenu&&this.$refs.rootmenu.$el&&e.ZIndexUtils.clear(this.$refs.rootmenu.$el)},methods:{toggle(t){this.mobileActive?(this.mobileActive=!1,e.ZIndexUtils.clear(this.$refs.rootmenu.$el)):(this.mobileActive=!0,e.ZIndexUtils.set("menu",this.$refs.rootmenu.$el,this.$primevue.config.zIndex.menu)),this.bindOutsideClickListener(),t.preventDefault()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.mobileActive||this.$refs.rootmenu.$el===e.target||this.$refs.rootmenu.$el.contains(e.target)||this.$refs.menubutton===e.target||this.$refs.menubutton.contains(e.target)||(this.mobileActive=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},onLeafClick(){this.mobileActive=!1}},computed:{containerClass(){return["p-menubar p-component",{"p-menubar-mobile-active":this.mobileActive}]}},components:{MenubarSub:l}};const r={key:0,class:"p-menubar-start"},c=n.createVNode("i",{class:"pi pi-bars"},null,-1),m={key:1,class:"p-menubar-end"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),a.render=function(e,t,i,l,o,s){const a=n.resolveComponent("MenubarSub");return n.openBlock(),n.createBlock("div",{class:s.containerClass},[e.$slots.start?(n.openBlock(),n.createBlock("div",r,[n.renderSlot(e.$slots,"start")])):n.createCommentVNode("",!0),n.createVNode("a",{ref:"menubutton",tabindex:"0",class:"p-menubar-button",onClick:t[1]||(t[1]=e=>s.toggle(e))},[c],512),n.createVNode(a,{ref:"rootmenu",model:i.model,root:!0,mobileActive:o.mobileActive,onLeafClick:s.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","mobileActive","onLeafClick","template","exact"]),e.$slots.end?(n.openBlock(),n.createBlock("div",m,[n.renderSlot(e.$slots,"end")])):n.createCommentVNode("",!0)],2)},module.exports=a;
|
|
1
|
+
"use strict";var e=require("primevue/utils"),t=require("primevue/ripple"),n=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"MenubarSub",emits:["keydown-item","leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)||this.mobileActive?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let n=e.currentTarget.parentElement;switch(e.which){case 40:this.root?t.items&&this.expandSubmenu(t,n):this.navigateToNextItem(n),e.preventDefault();break;case 38:this.root||this.navigateToPrevItem(n),e.preventDefault();break;case 39:if(this.root){var i=this.findNextItem(n);i&&i.children[0].focus()}else t.items&&this.expandSubmenu(t,n);e.preventDefault();break;case 37:this.root&&this.navigateToPrevItem(n),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:n})},onChildItemKeyDown(e){this.root?38===e.originalEvent.which&&null==e.element.previousElementSibling&&this.collapseMenu(e.element):37===e.originalEvent.which&&this.collapseMenu(e.element)},findNextItem(t){let n=t.nextElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null},findPrevItem(t){let n=t.previousElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null},expandSubmenu(e,t){this.activeItem=e,setTimeout((()=>{t.children[1].children[0].children[0].focus()}),50)},collapseMenu(e){this.activeItem=null,e.parentElement.previousElementSibling.focus()},navigateToNextItem(e){var t=this.findNextItem(e);t&&t.children[0].focus()},navigateToPrevItem(e){var t=this.findPrevItem(e);t&&t.children[0].focus()},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},getSubmenuIcon(){return["p-submenu-icon pi",{"pi-angle-right":!this.root,"pi-angle-down":this.root}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},directives:{ripple:i(t).default}};const o={class:"p-menuitem-text"},s={class:"p-menuitem-text"};l.render=function(e,t,i,l,a,r){const c=n.resolveComponent("router-link"),m=n.resolveComponent("MenubarSub",!0),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{class:r.containerClass,role:i.root?"menubar":"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:r.label(e)+t.toString()},[r.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:r.getItemClass(e),style:e.style,onMouseenter:t=>r.onItemMouseEnter(t,e)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!r.disabled(e)?(n.openBlock(),n.createBlock(c,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>r.onItemClick(n,e,t),class:r.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",o,n.toDisplayString(r.label(e)),1)],42,["href","onClick","onKeydown"]),[[u]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:r.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===a.activeItem,onClick:t=>r.onItemClick(t,e),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem",tabindex:r.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(r.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",{key:0,class:r.getSubmenuIcon()},null,2)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[u]])],64)),r.visible(e)&&e.items?(n.openBlock(),n.createBlock(m,{model:e.items,key:r.label(e)+"_sub_",mobileActive:i.mobileActive,onLeafClick:r.onLeafClick,onKeydownItem:r.onChildItemKeyDown,parentActive:e===a.activeItem,template:i.template,exact:i.exact},null,8,["model","mobileActive","onLeafClick","onKeydownItem","parentActive","template","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),r.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],10,["role"])};var a={name:"Menubar",props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0}},outsideClickListener:null,data:()=>({mobileActive:!1}),beforeUnmount(){this.mobileActive=!1,this.unbindOutsideClickListener(),this.$refs.rootmenu&&this.$refs.rootmenu.$el&&e.ZIndexUtils.clear(this.$refs.rootmenu.$el)},methods:{toggle(t){this.mobileActive?(this.mobileActive=!1,e.ZIndexUtils.clear(this.$refs.rootmenu.$el)):(this.mobileActive=!0,e.ZIndexUtils.set("menu",this.$refs.rootmenu.$el,this.$primevue.config.zIndex.menu)),this.bindOutsideClickListener(),t.preventDefault()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.mobileActive||this.$refs.rootmenu.$el===e.target||this.$refs.rootmenu.$el.contains(e.target)||this.$refs.menubutton===e.target||this.$refs.menubutton.contains(e.target)||(this.mobileActive=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},onLeafClick(){this.mobileActive=!1}},computed:{containerClass(){return["p-menubar p-component",{"p-menubar-mobile-active":this.mobileActive}]}},components:{MenubarSub:l}};const r={key:0,class:"p-menubar-start"},c=n.createVNode("i",{class:"pi pi-bars"},null,-1),m={key:1,class:"p-menubar-end"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-decoration: none;\n}\n"),a.render=function(e,t,i,l,o,s){const a=n.resolveComponent("MenubarSub");return n.openBlock(),n.createBlock("div",{class:s.containerClass},[e.$slots.start?(n.openBlock(),n.createBlock("div",r,[n.renderSlot(e.$slots,"start")])):n.createCommentVNode("",!0),n.createVNode("a",{ref:"menubutton",tabindex:"0",class:"p-menubar-button",onClick:t[1]||(t[1]=e=>s.toggle(e))},[c],512),n.createVNode(a,{ref:"rootmenu",model:i.model,root:!0,mobileActive:o.mobileActive,onLeafClick:s.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","mobileActive","onLeafClick","template","exact"]),e.$slots.end?(n.openBlock(),n.createBlock("div",m,[n.renderSlot(e.$slots,"end")])):n.createCommentVNode("",!0)],2)},module.exports=a;
|
package/menubar/menubar.esm.js
CHANGED
|
@@ -258,6 +258,9 @@ var script$1 = {
|
|
|
258
258
|
},
|
|
259
259
|
disabled(item) {
|
|
260
260
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
261
|
+
},
|
|
262
|
+
label(item) {
|
|
263
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
261
264
|
}
|
|
262
265
|
},
|
|
263
266
|
computed: {
|
|
@@ -284,7 +287,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
284
287
|
}, [
|
|
285
288
|
(openBlock(true), createBlock(Fragment, null, renderList($props.model, (item, i) => {
|
|
286
289
|
return (openBlock(), createBlock(Fragment, {
|
|
287
|
-
key:
|
|
290
|
+
key: $options.label(item) + i.toString()
|
|
288
291
|
}, [
|
|
289
292
|
($options.visible(item) && !item.separator)
|
|
290
293
|
? (openBlock(), createBlock("li", {
|
|
@@ -313,7 +316,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
313
316
|
createVNode("span", {
|
|
314
317
|
class: ['p-menuitem-icon', item.icon]
|
|
315
318
|
}, null, 2),
|
|
316
|
-
createVNode("span", _hoisted_1$1, toDisplayString(
|
|
319
|
+
createVNode("span", _hoisted_1$1, toDisplayString($options.label(item)), 1)
|
|
317
320
|
], 42, ["href", "onClick", "onKeydown"]), [
|
|
318
321
|
[_directive_ripple]
|
|
319
322
|
])
|
|
@@ -335,7 +338,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
335
338
|
createVNode("span", {
|
|
336
339
|
class: ['p-menuitem-icon', item.icon]
|
|
337
340
|
}, null, 2),
|
|
338
|
-
createVNode("span", _hoisted_2$1, toDisplayString(
|
|
341
|
+
createVNode("span", _hoisted_2$1, toDisplayString($options.label(item)), 1),
|
|
339
342
|
(item.items)
|
|
340
343
|
? (openBlock(), createBlock("span", {
|
|
341
344
|
key: 0,
|
|
@@ -353,7 +356,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
353
356
|
($options.visible(item) && item.items)
|
|
354
357
|
? (openBlock(), createBlock(_component_MenubarSub, {
|
|
355
358
|
model: item.items,
|
|
356
|
-
key:
|
|
359
|
+
key: $options.label(item) + '_sub_',
|
|
357
360
|
mobileActive: $props.mobileActive,
|
|
358
361
|
onLeafClick: $options.onLeafClick,
|
|
359
362
|
onKeydownItem: $options.onChildItemKeyDown,
|
|
@@ -520,9 +523,9 @@ function styleInject(css, ref) {
|
|
|
520
523
|
}
|
|
521
524
|
}
|
|
522
525
|
|
|
523
|
-
var css_248z = "\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n";
|
|
526
|
+
var css_248z = "\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-decoration: none;\n}\n";
|
|
524
527
|
styleInject(css_248z);
|
|
525
528
|
|
|
526
529
|
script.render = render;
|
|
527
530
|
|
|
528
|
-
export default
|
|
531
|
+
export { script as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DomHandler as e,ZIndexUtils as t}from"primevue/utils";import n from"primevue/ripple";import{resolveComponent as i,resolveDirective as l,openBlock as s,createBlock as o,Fragment as a,renderList as r,withCtx as m,withDirectives as c,createVNode as u,toDisplayString as p,createCommentVNode as d,resolveDynamicComponent as b,renderSlot as h}from"vue";var v={name:"MenubarSub",emits:["keydown-item","leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)||this.mobileActive?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let n=e.currentTarget.parentElement;switch(e.which){case 40:this.root?t.items&&this.expandSubmenu(t,n):this.navigateToNextItem(n),e.preventDefault();break;case 38:this.root||this.navigateToPrevItem(n),e.preventDefault();break;case 39:if(this.root){var i=this.findNextItem(n);i&&i.children[0].focus()}else t.items&&this.expandSubmenu(t,n);e.preventDefault();break;case 37:this.root&&this.navigateToPrevItem(n),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:n})},onChildItemKeyDown(e){this.root?38===e.originalEvent.which&&null==e.element.previousElementSibling&&this.collapseMenu(e.element):37===e.originalEvent.which&&this.collapseMenu(e.element)},findNextItem(t){let n=t.nextElementSibling;return n?e.hasClass(n,"p-disabled")||!e.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null},findPrevItem(t){let n=t.previousElementSibling;return n?e.hasClass(n,"p-disabled")||!e.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null},expandSubmenu(e,t){this.activeItem=e,setTimeout((()=>{t.children[1].children[0].children[0].focus()}),50)},collapseMenu(e){this.activeItem=null,e.parentElement.previousElementSibling.focus()},navigateToNextItem(e){var t=this.findNextItem(e);t&&t.children[0].focus()},navigateToPrevItem(e){var t=this.findPrevItem(e);t&&t.children[0].focus()},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},getSubmenuIcon(){return["p-submenu-icon pi",{"pi-angle-right":!this.root,"pi-angle-down":this.root}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},directives:{ripple:n}};const f={class:"p-menuitem-text"},k={class:"p-menuitem-text"};v.render=function(e,t,n,h,v,y){const x=i("router-link"),C=i("MenubarSub",!0),g=l("ripple");return s(),o("ul",{class:y.containerClass,role:n.root?"menubar":"menu"},[(s(!0),o(a,null,r(n.model,((e,t)=>(s(),o(a,{key:
|
|
1
|
+
import{DomHandler as e,ZIndexUtils as t}from"primevue/utils";import n from"primevue/ripple";import{resolveComponent as i,resolveDirective as l,openBlock as s,createBlock as o,Fragment as a,renderList as r,withCtx as m,withDirectives as c,createVNode as u,toDisplayString as p,createCommentVNode as d,resolveDynamicComponent as b,renderSlot as h}from"vue";var v={name:"MenubarSub",emits:["keydown-item","leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)||this.mobileActive?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let n=e.currentTarget.parentElement;switch(e.which){case 40:this.root?t.items&&this.expandSubmenu(t,n):this.navigateToNextItem(n),e.preventDefault();break;case 38:this.root||this.navigateToPrevItem(n),e.preventDefault();break;case 39:if(this.root){var i=this.findNextItem(n);i&&i.children[0].focus()}else t.items&&this.expandSubmenu(t,n);e.preventDefault();break;case 37:this.root&&this.navigateToPrevItem(n),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:n})},onChildItemKeyDown(e){this.root?38===e.originalEvent.which&&null==e.element.previousElementSibling&&this.collapseMenu(e.element):37===e.originalEvent.which&&this.collapseMenu(e.element)},findNextItem(t){let n=t.nextElementSibling;return n?e.hasClass(n,"p-disabled")||!e.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null},findPrevItem(t){let n=t.previousElementSibling;return n?e.hasClass(n,"p-disabled")||!e.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null},expandSubmenu(e,t){this.activeItem=e,setTimeout((()=>{t.children[1].children[0].children[0].focus()}),50)},collapseMenu(e){this.activeItem=null,e.parentElement.previousElementSibling.focus()},navigateToNextItem(e){var t=this.findNextItem(e);t&&t.children[0].focus()},navigateToPrevItem(e){var t=this.findPrevItem(e);t&&t.children[0].focus()},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},getSubmenuIcon(){return["p-submenu-icon pi",{"pi-angle-right":!this.root,"pi-angle-down":this.root}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},directives:{ripple:n}};const f={class:"p-menuitem-text"},k={class:"p-menuitem-text"};v.render=function(e,t,n,h,v,y){const x=i("router-link"),C=i("MenubarSub",!0),g=l("ripple");return s(),o("ul",{class:y.containerClass,role:n.root?"menubar":"menu"},[(s(!0),o(a,null,r(n.model,((e,t)=>(s(),o(a,{key:y.label(e)+t.toString()},[y.visible(e)&&!e.separator?(s(),o("li",{key:0,role:"none",class:y.getItemClass(e),style:e.style,onMouseenter:t=>y.onItemMouseEnter(t,e)},[n.template?(s(),o(b(n.template),{key:1,item:e},null,8,["item"])):(s(),o(a,{key:0},[e.to&&!y.disabled(e)?(s(),o(x,{key:0,to:e.to,custom:""},{default:m((({navigate:t,href:n,isActive:i,isExactActive:l})=>[c(u("a",{href:n,onClick:n=>y.onItemClick(n,e,t),class:y.linkClass(e,{isActive:i,isExactActive:l}),onKeydown:t=>y.onItemKeyDown(t,e),role:"menuitem"},[u("span",{class:["p-menuitem-icon",e.icon]},null,2),u("span",f,p(y.label(e)),1)],42,["href","onClick","onKeydown"]),[[g]])])),_:2},1032,["to"])):c((s(),o("a",{key:1,href:e.url,class:y.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===v.activeItem,onClick:t=>y.onItemClick(t,e),onKeydown:t=>y.onItemKeyDown(t,e),role:"menuitem",tabindex:y.disabled(e)?null:"0"},[u("span",{class:["p-menuitem-icon",e.icon]},null,2),u("span",k,p(y.label(e)),1),e.items?(s(),o("span",{key:0,class:y.getSubmenuIcon()},null,2)):d("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[g]])],64)),y.visible(e)&&e.items?(s(),o(C,{model:e.items,key:y.label(e)+"_sub_",mobileActive:n.mobileActive,onLeafClick:y.onLeafClick,onKeydownItem:y.onChildItemKeyDown,parentActive:e===v.activeItem,template:n.template,exact:n.exact},null,8,["model","mobileActive","onLeafClick","onKeydownItem","parentActive","template","exact"])):d("",!0)],46,["onMouseenter"])):d("",!0),y.visible(e)&&e.separator?(s(),o("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):d("",!0)],64)))),128))],10,["role"])};var y={name:"Menubar",props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0}},outsideClickListener:null,data:()=>({mobileActive:!1}),beforeUnmount(){this.mobileActive=!1,this.unbindOutsideClickListener(),this.$refs.rootmenu&&this.$refs.rootmenu.$el&&t.clear(this.$refs.rootmenu.$el)},methods:{toggle(e){this.mobileActive?(this.mobileActive=!1,t.clear(this.$refs.rootmenu.$el)):(this.mobileActive=!0,t.set("menu",this.$refs.rootmenu.$el,this.$primevue.config.zIndex.menu)),this.bindOutsideClickListener(),e.preventDefault()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.mobileActive||this.$refs.rootmenu.$el===e.target||this.$refs.rootmenu.$el.contains(e.target)||this.$refs.menubutton===e.target||this.$refs.menubutton.contains(e.target)||(this.mobileActive=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},onLeafClick(){this.mobileActive=!1}},computed:{containerClass(){return["p-menubar p-component",{"p-menubar-mobile-active":this.mobileActive}]}},components:{MenubarSub:v}};const x={key:0,class:"p-menubar-start"},C=u("i",{class:"pi pi-bars"},null,-1),g={key:1,class:"p-menubar-end"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-decoration: none;\n}\n"),y.render=function(e,t,n,l,a,r){const m=i("MenubarSub");return s(),o("div",{class:r.containerClass},[e.$slots.start?(s(),o("div",x,[h(e.$slots,"start")])):d("",!0),u("a",{ref:"menubutton",tabindex:"0",class:"p-menubar-button",onClick:t[1]||(t[1]=e=>r.toggle(e))},[C],512),u(m,{ref:"rootmenu",model:n.model,root:!0,mobileActive:a.mobileActive,onLeafClick:r.onLeafClick,template:e.$slots.item,exact:n.exact},null,8,["model","mobileActive","onLeafClick","template","exact"]),e.$slots.end?(s(),o("div",g,[h(e.$slots,"end")])):d("",!0)],2)};export{y as default};
|
package/menubar/menubar.js
CHANGED
|
@@ -262,6 +262,9 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
262
262
|
},
|
|
263
263
|
disabled(item) {
|
|
264
264
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
|
265
|
+
},
|
|
266
|
+
label(item) {
|
|
267
|
+
return (typeof item.label === 'function' ? item.label() : item.label);
|
|
265
268
|
}
|
|
266
269
|
},
|
|
267
270
|
computed: {
|
|
@@ -270,7 +273,7 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
270
273
|
}
|
|
271
274
|
},
|
|
272
275
|
directives: {
|
|
273
|
-
'ripple': Ripple__default[
|
|
276
|
+
'ripple': Ripple__default["default"]
|
|
274
277
|
}
|
|
275
278
|
};
|
|
276
279
|
|
|
@@ -288,7 +291,7 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
288
291
|
}, [
|
|
289
292
|
(vue.openBlock(true), vue.createBlock(vue.Fragment, null, vue.renderList($props.model, (item, i) => {
|
|
290
293
|
return (vue.openBlock(), vue.createBlock(vue.Fragment, {
|
|
291
|
-
key:
|
|
294
|
+
key: $options.label(item) + i.toString()
|
|
292
295
|
}, [
|
|
293
296
|
($options.visible(item) && !item.separator)
|
|
294
297
|
? (vue.openBlock(), vue.createBlock("li", {
|
|
@@ -317,7 +320,7 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
317
320
|
vue.createVNode("span", {
|
|
318
321
|
class: ['p-menuitem-icon', item.icon]
|
|
319
322
|
}, null, 2),
|
|
320
|
-
vue.createVNode("span", _hoisted_1$1, vue.toDisplayString(
|
|
323
|
+
vue.createVNode("span", _hoisted_1$1, vue.toDisplayString($options.label(item)), 1)
|
|
321
324
|
], 42, ["href", "onClick", "onKeydown"]), [
|
|
322
325
|
[_directive_ripple]
|
|
323
326
|
])
|
|
@@ -339,7 +342,7 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
339
342
|
vue.createVNode("span", {
|
|
340
343
|
class: ['p-menuitem-icon', item.icon]
|
|
341
344
|
}, null, 2),
|
|
342
|
-
vue.createVNode("span", _hoisted_2$1, vue.toDisplayString(
|
|
345
|
+
vue.createVNode("span", _hoisted_2$1, vue.toDisplayString($options.label(item)), 1),
|
|
343
346
|
(item.items)
|
|
344
347
|
? (vue.openBlock(), vue.createBlock("span", {
|
|
345
348
|
key: 0,
|
|
@@ -357,7 +360,7 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
357
360
|
($options.visible(item) && item.items)
|
|
358
361
|
? (vue.openBlock(), vue.createBlock(_component_MenubarSub, {
|
|
359
362
|
model: item.items,
|
|
360
|
-
key:
|
|
363
|
+
key: $options.label(item) + '_sub_',
|
|
361
364
|
mobileActive: $props.mobileActive,
|
|
362
365
|
onLeafClick: $options.onLeafClick,
|
|
363
366
|
onKeydownItem: $options.onChildItemKeyDown,
|
|
@@ -524,11 +527,11 @@ this.primevue.menubar = (function (utils, Ripple, vue) {
|
|
|
524
527
|
}
|
|
525
528
|
}
|
|
526
529
|
|
|
527
|
-
var css_248z = "\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n";
|
|
530
|
+
var css_248z = "\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-decoration: none;\n}\n";
|
|
528
531
|
styleInject(css_248z);
|
|
529
532
|
|
|
530
533
|
script.render = render;
|
|
531
534
|
|
|
532
535
|
return script;
|
|
533
536
|
|
|
534
|
-
}(primevue.utils, primevue.ripple, Vue)
|
|
537
|
+
})(primevue.utils, primevue.ripple, Vue);
|
package/menubar/menubar.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.menubar=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"MenubarSub",emits:["keydown-item","leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)||this.mobileActive?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let n=e.currentTarget.parentElement;switch(e.which){case 40:this.root?t.items&&this.expandSubmenu(t,n):this.navigateToNextItem(n),e.preventDefault();break;case 38:this.root||this.navigateToPrevItem(n),e.preventDefault();break;case 39:if(this.root){var i=this.findNextItem(n);i&&i.children[0].focus()}else t.items&&this.expandSubmenu(t,n);e.preventDefault();break;case 37:this.root&&this.navigateToPrevItem(n),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:n})},onChildItemKeyDown(e){this.root?38===e.originalEvent.which&&null==e.element.previousElementSibling&&this.collapseMenu(e.element):37===e.originalEvent.which&&this.collapseMenu(e.element)},findNextItem(t){let n=t.nextElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null},findPrevItem(t){let n=t.previousElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null},expandSubmenu(e,t){this.activeItem=e,setTimeout((()=>{t.children[1].children[0].children[0].focus()}),50)},collapseMenu(e){this.activeItem=null,e.parentElement.previousElementSibling.focus()},navigateToNextItem(e){var t=this.findNextItem(e);t&&t.children[0].focus()},navigateToPrevItem(e){var t=this.findPrevItem(e);t&&t.children[0].focus()},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},getSubmenuIcon(){return["p-submenu-icon pi",{"pi-angle-right":!this.root,"pi-angle-down":this.root}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},directives:{ripple:i(t).default}};const o={class:"p-menuitem-text"},s={class:"p-menuitem-text"};l.render=function(e,t,i,l,a,r){const c=n.resolveComponent("router-link"),m=n.resolveComponent("MenubarSub",!0),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{class:r.containerClass,role:i.root?"menubar":"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:e.label+t.toString()},[r.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:r.getItemClass(e),style:e.style,onMouseenter:t=>r.onItemMouseEnter(t,e)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!r.disabled(e)?(n.openBlock(),n.createBlock(c,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>r.onItemClick(n,e,t),class:r.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",o,n.toDisplayString(e.label),1)],42,["href","onClick","onKeydown"]),[[u]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:r.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===a.activeItem,onClick:t=>r.onItemClick(t,e),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem",tabindex:r.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(e.label),1),e.items?(n.openBlock(),n.createBlock("span",{key:0,class:r.getSubmenuIcon()},null,2)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[u]])],64)),r.visible(e)&&e.items?(n.openBlock(),n.createBlock(m,{model:e.items,key:e.label+"_sub_",mobileActive:i.mobileActive,onLeafClick:r.onLeafClick,onKeydownItem:r.onChildItemKeyDown,parentActive:e===a.activeItem,template:i.template,exact:i.exact},null,8,["model","mobileActive","onLeafClick","onKeydownItem","parentActive","template","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),r.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],10,["role"])};var a={name:"Menubar",props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0}},outsideClickListener:null,data:()=>({mobileActive:!1}),beforeUnmount(){this.mobileActive=!1,this.unbindOutsideClickListener(),this.$refs.rootmenu&&this.$refs.rootmenu.$el&&e.ZIndexUtils.clear(this.$refs.rootmenu.$el)},methods:{toggle(t){this.mobileActive?(this.mobileActive=!1,e.ZIndexUtils.clear(this.$refs.rootmenu.$el)):(this.mobileActive=!0,e.ZIndexUtils.set("menu",this.$refs.rootmenu.$el,this.$primevue.config.zIndex.menu)),this.bindOutsideClickListener(),t.preventDefault()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.mobileActive||this.$refs.rootmenu.$el===e.target||this.$refs.rootmenu.$el.contains(e.target)||this.$refs.menubutton===e.target||this.$refs.menubutton.contains(e.target)||(this.mobileActive=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},onLeafClick(){this.mobileActive=!1}},computed:{containerClass(){return["p-menubar p-component",{"p-menubar-mobile-active":this.mobileActive}]}},components:{MenubarSub:l}};const r={key:0,class:"p-menubar-start"},c=n.createVNode("i",{class:"pi pi-bars"},null,-1),m={key:1,class:"p-menubar-end"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n"),a.render=function(e,t,i,l,o,s){const a=n.resolveComponent("MenubarSub");return n.openBlock(),n.createBlock("div",{class:s.containerClass},[e.$slots.start?(n.openBlock(),n.createBlock("div",r,[n.renderSlot(e.$slots,"start")])):n.createCommentVNode("",!0),n.createVNode("a",{ref:"menubutton",tabindex:"0",class:"p-menubar-button",onClick:t[1]||(t[1]=e=>s.toggle(e))},[c],512),n.createVNode(a,{ref:"rootmenu",model:i.model,root:!0,mobileActive:o.mobileActive,onLeafClick:s.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","mobileActive","onLeafClick","template","exact"]),e.$slots.end?(n.openBlock(),n.createBlock("div",m,[n.renderSlot(e.$slots,"end")])):n.createCommentVNode("",!0)],2)},a}(primevue.utils,primevue.ripple,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.menubar=function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l={name:"MenubarSub",emits:["keydown-item","leaf-click"],props:{model:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},parentActive:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},template:{type:Function,default:null},exact:{type:Boolean,default:!0}},documentClickListener:null,watch:{parentActive(e){e||(this.activeItem=null)}},data:()=>({activeItem:null}),updated(){this.root&&this.activeItem&&this.bindDocumentClickListener()},beforeUnmount(){this.unbindDocumentClickListener()},methods:{onItemMouseEnter(e,t){this.disabled(t)||this.mobileActive?e.preventDefault():this.root?(this.activeItem||this.popup)&&(this.activeItem=t):this.activeItem=t},onItemClick(e,t,n){this.disabled(t)?e.preventDefault():(t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?this.activeItem=null:this.activeItem=t),t.items||this.onLeafClick(),t.to&&n&&n(e))},onLeafClick(){this.activeItem=null,this.$emit("leaf-click")},onItemKeyDown(e,t){let n=e.currentTarget.parentElement;switch(e.which){case 40:this.root?t.items&&this.expandSubmenu(t,n):this.navigateToNextItem(n),e.preventDefault();break;case 38:this.root||this.navigateToPrevItem(n),e.preventDefault();break;case 39:if(this.root){var i=this.findNextItem(n);i&&i.children[0].focus()}else t.items&&this.expandSubmenu(t,n);e.preventDefault();break;case 37:this.root&&this.navigateToPrevItem(n),e.preventDefault()}this.$emit("keydown-item",{originalEvent:e,element:n})},onChildItemKeyDown(e){this.root?38===e.originalEvent.which&&null==e.element.previousElementSibling&&this.collapseMenu(e.element):37===e.originalEvent.which&&this.collapseMenu(e.element)},findNextItem(t){let n=t.nextElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findNextItem(n):n:null},findPrevItem(t){let n=t.previousElementSibling;return n?e.DomHandler.hasClass(n,"p-disabled")||!e.DomHandler.hasClass(n,"p-menuitem")?this.findPrevItem(n):n:null},expandSubmenu(e,t){this.activeItem=e,setTimeout((()=>{t.children[1].children[0].children[0].focus()}),50)},collapseMenu(e){this.activeItem=null,e.parentElement.previousElementSibling.focus()},navigateToNextItem(e){var t=this.findNextItem(e);t&&t.children[0].focus()},navigateToPrevItem(e){var t=this.findPrevItem(e);t&&t.children[0].focus()},getItemClass(e){return["p-menuitem",e.class,{"p-menuitem-active":this.activeItem===e}]},linkClass(e,t){return["p-menuitem-link",{"p-disabled":this.disabled(e),"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=e=>{this.$el&&!this.$el.contains(e.target)&&(this.activeItem=null,this.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},getSubmenuIcon(){return["p-submenu-icon pi",{"pi-angle-right":!this.root,"pi-angle-down":this.root}]},visible:e=>"function"==typeof e.visible?e.visible():!1!==e.visible,disabled:e=>"function"==typeof e.disabled?e.disabled():e.disabled,label:e=>"function"==typeof e.label?e.label():e.label},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},directives:{ripple:i(t).default}};const o={class:"p-menuitem-text"},s={class:"p-menuitem-text"};l.render=function(e,t,i,l,a,r){const c=n.resolveComponent("router-link"),m=n.resolveComponent("MenubarSub",!0),u=n.resolveDirective("ripple");return n.openBlock(),n.createBlock("ul",{class:r.containerClass,role:i.root?"menubar":"menu"},[(n.openBlock(!0),n.createBlock(n.Fragment,null,n.renderList(i.model,((e,t)=>(n.openBlock(),n.createBlock(n.Fragment,{key:r.label(e)+t.toString()},[r.visible(e)&&!e.separator?(n.openBlock(),n.createBlock("li",{key:0,role:"none",class:r.getItemClass(e),style:e.style,onMouseenter:t=>r.onItemMouseEnter(t,e)},[i.template?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i.template),{key:1,item:e},null,8,["item"])):(n.openBlock(),n.createBlock(n.Fragment,{key:0},[e.to&&!r.disabled(e)?(n.openBlock(),n.createBlock(c,{key:0,to:e.to,custom:""},{default:n.withCtx((({navigate:t,href:i,isActive:l,isExactActive:s})=>[n.withDirectives(n.createVNode("a",{href:i,onClick:n=>r.onItemClick(n,e,t),class:r.linkClass(e,{isActive:l,isExactActive:s}),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",o,n.toDisplayString(r.label(e)),1)],42,["href","onClick","onKeydown"]),[[u]])])),_:2},1032,["to"])):n.withDirectives((n.openBlock(),n.createBlock("a",{key:1,href:e.url,class:r.linkClass(e),target:e.target,"aria-haspopup":null!=e.items,"aria-expanded":e===a.activeItem,onClick:t=>r.onItemClick(t,e),onKeydown:t=>r.onItemKeyDown(t,e),role:"menuitem",tabindex:r.disabled(e)?null:"0"},[n.createVNode("span",{class:["p-menuitem-icon",e.icon]},null,2),n.createVNode("span",s,n.toDisplayString(r.label(e)),1),e.items?(n.openBlock(),n.createBlock("span",{key:0,class:r.getSubmenuIcon()},null,2)):n.createCommentVNode("",!0)],42,["href","target","aria-haspopup","aria-expanded","onClick","onKeydown","tabindex"])),[[u]])],64)),r.visible(e)&&e.items?(n.openBlock(),n.createBlock(m,{model:e.items,key:r.label(e)+"_sub_",mobileActive:i.mobileActive,onLeafClick:r.onLeafClick,onKeydownItem:r.onChildItemKeyDown,parentActive:e===a.activeItem,template:i.template,exact:i.exact},null,8,["model","mobileActive","onLeafClick","onKeydownItem","parentActive","template","exact"])):n.createCommentVNode("",!0)],46,["onMouseenter"])):n.createCommentVNode("",!0),r.visible(e)&&e.separator?(n.openBlock(),n.createBlock("li",{class:["p-menu-separator",e.class],style:e.style,key:"separator"+t.toString(),role:"separator"},null,6)):n.createCommentVNode("",!0)],64)))),128))],10,["role"])};var a={name:"Menubar",props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0}},outsideClickListener:null,data:()=>({mobileActive:!1}),beforeUnmount(){this.mobileActive=!1,this.unbindOutsideClickListener(),this.$refs.rootmenu&&this.$refs.rootmenu.$el&&e.ZIndexUtils.clear(this.$refs.rootmenu.$el)},methods:{toggle(t){this.mobileActive?(this.mobileActive=!1,e.ZIndexUtils.clear(this.$refs.rootmenu.$el)):(this.mobileActive=!0,e.ZIndexUtils.set("menu",this.$refs.rootmenu.$el,this.$primevue.config.zIndex.menu)),this.bindOutsideClickListener(),t.preventDefault()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.mobileActive||this.$refs.rootmenu.$el===e.target||this.$refs.rootmenu.$el.contains(e.target)||this.$refs.menubutton===e.target||this.$refs.menubutton.contains(e.target)||(this.mobileActive=!1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},onLeafClick(){this.mobileActive=!1}},computed:{containerClass(){return["p-menubar p-component",{"p-menubar-mobile-active":this.mobileActive}]}},components:{MenubarSub:l}};const r={key:0,class:"p-menubar-start"},c=n.createVNode("i",{class:"pi pi-bars"},null,-1),m={key:1,class:"p-menubar-end"};return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-menubar {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .p-menuitem-link {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-custom,\n.p-menubar .p-menubar-end {\n margin-left: auto;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-decoration: none;\n}\n"),a.render=function(e,t,i,l,o,s){const a=n.resolveComponent("MenubarSub");return n.openBlock(),n.createBlock("div",{class:s.containerClass},[e.$slots.start?(n.openBlock(),n.createBlock("div",r,[n.renderSlot(e.$slots,"start")])):n.createCommentVNode("",!0),n.createVNode("a",{ref:"menubutton",tabindex:"0",class:"p-menubar-button",onClick:t[1]||(t[1]=e=>s.toggle(e))},[c],512),n.createVNode(a,{ref:"rootmenu",model:i.model,root:!0,mobileActive:o.mobileActive,onLeafClick:s.onLeafClick,template:e.$slots.item,exact:i.exact},null,8,["model","mobileActive","onLeafClick","template","exact"]),e.$slots.end?(n.openBlock(),n.createBlock("div",m,[n.renderSlot(e.$slots,"end")])):n.createCommentVNode("",!0)],2)},a}(primevue.utils,primevue.ripple,Vue);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { RouteLocationRaw } from "vue-router";
|
|
2
|
+
|
|
3
|
+
type MenuItemLabelType = string | ((...args: any) => string) | undefined;
|
|
4
|
+
|
|
5
|
+
type MenuItemDisabledType = boolean | ((...args: any) => boolean) | undefined;
|
|
6
|
+
|
|
7
|
+
type MenuItemVisibleType = boolean | ((...args: any) => boolean) | undefined;
|
|
8
|
+
|
|
9
|
+
export interface MenuItemCommandEvent {
|
|
10
|
+
/**
|
|
11
|
+
* Browser event.
|
|
12
|
+
*/
|
|
13
|
+
originalEvent: Event;
|
|
14
|
+
/**
|
|
15
|
+
* Menuitem instance.
|
|
16
|
+
*/
|
|
17
|
+
item: MenuItem;
|
|
18
|
+
/**
|
|
19
|
+
* Optional
|
|
20
|
+
*/
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface MenuItem {
|
|
25
|
+
/**
|
|
26
|
+
* Property name or getter function to use as the label of an item.
|
|
27
|
+
*/
|
|
28
|
+
label?: MenuItemLabelType;
|
|
29
|
+
/**
|
|
30
|
+
* Icon of the item.
|
|
31
|
+
*/
|
|
32
|
+
icon?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Route configuration such as path, name and parameters.
|
|
35
|
+
*/
|
|
36
|
+
to?: RouteLocationRaw | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Callback to execute when item is clicked.
|
|
39
|
+
* @param {@link MenuItemCommandEvent} event - Custom command event.
|
|
40
|
+
*/
|
|
41
|
+
command?(event: MenuItemCommandEvent): void;
|
|
42
|
+
/**
|
|
43
|
+
* External link to navigate when item is clicked.
|
|
44
|
+
*/
|
|
45
|
+
url?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* An array of children menuitems.
|
|
48
|
+
*/
|
|
49
|
+
items?: MenuItem[] | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* A boolean or a function to return a boolean to specify if the item is disabled.
|
|
52
|
+
*/
|
|
53
|
+
disabled?: MenuItemDisabledType;
|
|
54
|
+
/**
|
|
55
|
+
* A boolean or a function to return a boolean to specify if the item is visible.
|
|
56
|
+
*/
|
|
57
|
+
visible?: MenuItemVisibleType;
|
|
58
|
+
/**
|
|
59
|
+
* Specifies where to open the linked document.
|
|
60
|
+
*/
|
|
61
|
+
target?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Defines the item as a separator.
|
|
64
|
+
*/
|
|
65
|
+
separator?: boolean | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Inline style of the menuitem.
|
|
68
|
+
*/
|
|
69
|
+
style?: any;
|
|
70
|
+
/**
|
|
71
|
+
* Style class of the menuitem.
|
|
72
|
+
*/
|
|
73
|
+
class?: any;
|
|
74
|
+
/**
|
|
75
|
+
* Unique identifier of an item.
|
|
76
|
+
*/
|
|
77
|
+
key?: string | undefined
|
|
78
|
+
/**
|
|
79
|
+
* Optional
|
|
80
|
+
*/
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}
|
package/message/Message.d.ts
CHANGED
|
@@ -1,18 +1,65 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
type MessageSeverityType = 'success' | 'info' | 'warn' | 'error' | undefined;
|
|
5
|
+
|
|
6
|
+
export interface MessageProps {
|
|
7
|
+
/**
|
|
8
|
+
* Severity level of the message.
|
|
9
|
+
* @see MessageSeverityType
|
|
10
|
+
* Default value is 'info'.
|
|
11
|
+
*/
|
|
12
|
+
severity?: MessageSeverityType;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the message can be closed manually using the close icon.
|
|
15
|
+
* Default value is true.
|
|
16
|
+
*/
|
|
17
|
+
closable?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* When enabled, message is not removed automatically.
|
|
20
|
+
*/
|
|
21
|
+
sticky?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Delay in milliseconds to close the message automatically.
|
|
24
|
+
* Default value is 3000.
|
|
25
|
+
*/
|
|
26
|
+
life?: number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Display a custom icon for the message.
|
|
29
|
+
*/
|
|
30
|
+
icon?: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface MessageSlots {
|
|
34
|
+
/**
|
|
35
|
+
* Default custom slot.
|
|
36
|
+
*/
|
|
37
|
+
default: () => VNode[];
|
|
8
38
|
}
|
|
9
39
|
|
|
10
|
-
declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
40
|
+
export declare type MessageEmits = {
|
|
41
|
+
/**
|
|
42
|
+
* Callback to invoke when a message is closed.
|
|
43
|
+
* @param {Event} event - Browser event.
|
|
44
|
+
*/
|
|
45
|
+
'close': (event: Event) => void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class Message extends ClassComponent<MessageProps, MessageSlots, MessageEmits> { }
|
|
49
|
+
|
|
50
|
+
declare module '@vue/runtime-core' {
|
|
51
|
+
interface GlobalComponents {
|
|
52
|
+
Message: GlobalComponentConstructor<Message>
|
|
15
53
|
}
|
|
16
54
|
}
|
|
17
55
|
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* Messages is used to display inline messages with various severities.
|
|
59
|
+
*
|
|
60
|
+
* Demos:
|
|
61
|
+
*
|
|
62
|
+
* - [Message](https://www.primefaces.org/primevue/showcase/#/message)
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
18
65
|
export default Message;
|
package/message/Message.vue
CHANGED
|
@@ -36,7 +36,11 @@ export default {
|
|
|
36
36
|
life: {
|
|
37
37
|
type: Number,
|
|
38
38
|
default: 3000
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
icon: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: null
|
|
43
|
+
},
|
|
40
44
|
},
|
|
41
45
|
timeout: null,
|
|
42
46
|
data() {
|
|
@@ -62,7 +66,7 @@ export default {
|
|
|
62
66
|
return 'p-message p-component p-message-' + this.severity;
|
|
63
67
|
},
|
|
64
68
|
iconClass() {
|
|
65
|
-
return ['p-message-icon pi', {
|
|
69
|
+
return ['p-message-icon pi', this.icon ? this.icon : {
|
|
66
70
|
'pi-info-circle': this.severity === 'info',
|
|
67
71
|
'pi-check': this.severity === 'success',
|
|
68
72
|
'pi-exclamation-triangle': this.severity === 'warn',
|
package/message/message.cjs.js
CHANGED
|
@@ -26,7 +26,11 @@ var script = {
|
|
|
26
26
|
life: {
|
|
27
27
|
type: Number,
|
|
28
28
|
default: 3000
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
icon: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
30
34
|
},
|
|
31
35
|
timeout: null,
|
|
32
36
|
data() {
|
|
@@ -52,7 +56,7 @@ var script = {
|
|
|
52
56
|
return 'p-message p-component p-message-' + this.severity;
|
|
53
57
|
},
|
|
54
58
|
iconClass() {
|
|
55
|
-
return ['p-message-icon pi', {
|
|
59
|
+
return ['p-message-icon pi', this.icon ? this.icon : {
|
|
56
60
|
'pi-info-circle': this.severity === 'info',
|
|
57
61
|
'pi-check': this.severity === 'success',
|
|
58
62
|
'pi-exclamation-triangle': this.severity === 'warn',
|
|
@@ -61,7 +65,7 @@ var script = {
|
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
67
|
directives: {
|
|
64
|
-
'ripple': Ripple__default[
|
|
68
|
+
'ripple': Ripple__default["default"]
|
|
65
69
|
}
|
|
66
70
|
};
|
|
67
71
|
|