UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

1 lines 63.3 kB
{"version":3,"file":"index.mjs","sources":["../../src/menu/BaseMenu.vue","../../src/menu/Menuitem.vue","../../src/menu/Menuitem.vue?vue&type=template&id=d15e76a4&lang.js","../../src/menu/Menu.vue","../../src/menu/Menu.vue?vue&type=template&id=292e85aa&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport MenuStyle from 'primevue/menu/style';\n\nexport default {\n name: 'BaseMenu',\n extends: BaseComponent,\n props: {\n popup: {\n type: Boolean,\n default: false\n },\n model: {\n type: Array,\n default: null\n },\n appendTo: {\n type: [String, Object],\n default: 'body'\n },\n autoZIndex: {\n type: Boolean,\n default: true\n },\n baseZIndex: {\n type: Number,\n default: 0\n },\n tabindex: {\n type: Number,\n default: 0\n },\n ariaLabel: {\n type: String,\n default: null\n },\n ariaLabelledby: {\n type: String,\n default: null\n }\n },\n style: MenuStyle,\n provide() {\n return {\n $pcMenu: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <li\n v-if=\"visible()\"\n :id=\"id\"\n :class=\"[cx('item'), item.class]\"\n role=\"menuitem\"\n :style=\"item.style\"\n :aria-label=\"label()\"\n :aria-disabled=\"disabled()\"\n :data-p-focused=\"isItemFocused()\"\n :data-p-disabled=\"disabled() || false\"\n :data-p=\"dataP\"\n v-bind=\"getPTOptions('item')\"\n >\n <div :class=\"cx('itemContent')\" @click=\"onItemClick($event)\" @mousemove=\"onItemMouseMove($event)\" :data-p=\"dataP\" v-bind=\"getPTOptions('itemContent')\">\n <template v-if=\"!templates.item\">\n <a v-ripple :href=\"item.url\" :class=\"cx('itemLink')\" :target=\"item.target\" tabindex=\"-1\" v-bind=\"getPTOptions('itemLink')\">\n <component v-if=\"templates.itemicon\" :is=\"templates.itemicon\" :item=\"item\" :class=\"cx('itemIcon')\" />\n <span v-else-if=\"item.icon\" :class=\"[cx('itemIcon'), item.icon]\" :data-p=\"dataP\" v-bind=\"getPTOptions('itemIcon')\" />\n <span :class=\"cx('itemLabel')\" :data-p=\"dataP\" v-bind=\"getPTOptions('itemLabel')\">{{ label() }}</span>\n </a>\n </template>\n <component v-else-if=\"templates.item\" :is=\"templates.item\" :item=\"item\" :label=\"label()\" :props=\"getMenuItemProps(item)\"></component>\n </div>\n </li>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { resolve } from '@primeuix/utils/object';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps } from 'vue';\n\nexport default {\n name: 'Menuitem',\n hostName: 'Menu',\n extends: BaseComponent,\n inheritAttrs: false,\n emits: ['item-click', 'item-mousemove'],\n props: {\n item: null,\n templates: null,\n id: null,\n focusedOptionId: null,\n index: null\n },\n methods: {\n getItemProp(processedItem, name) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name]) : undefined;\n },\n getPTOptions(key) {\n return this.ptm(key, {\n context: {\n item: this.item,\n index: this.index,\n focused: this.isItemFocused(),\n disabled: this.disabled()\n }\n });\n },\n isItemFocused() {\n return this.focusedOptionId === this.id;\n },\n onItemClick(event) {\n const command = this.getItemProp(this.item, 'command');\n\n command && command({ originalEvent: event, item: this.item.item });\n this.$emit('item-click', { originalEvent: event, item: this.item, id: this.id });\n },\n onItemMouseMove(event) {\n this.$emit('item-mousemove', { originalEvent: event, item: this.item, id: this.id });\n },\n visible() {\n return typeof this.item.visible === 'function' ? this.item.visible() : this.item.visible !== false;\n },\n disabled() {\n return typeof this.item.disabled === 'function' ? this.item.disabled() : this.item.disabled;\n },\n label() {\n return typeof this.item.label === 'function' ? this.item.label() : this.item.label;\n },\n getMenuItemProps(item) {\n return {\n action: mergeProps(\n {\n class: this.cx('itemLink'),\n tabindex: '-1'\n },\n this.getPTOptions('itemLink')\n ),\n icon: mergeProps(\n {\n class: [this.cx('itemIcon'), item.icon]\n },\n this.getPTOptions('itemIcon')\n ),\n label: mergeProps(\n {\n class: this.cx('itemLabel')\n },\n this.getPTOptions('itemLabel')\n )\n };\n }\n },\n computed: {\n dataP() {\n return cn({\n focus: this.isItemFocused(),\n disabled: this.disabled()\n });\n }\n },\n directives: {\n ripple: Ripple\n }\n};\n</script>\n","<template>\n <li\n v-if=\"visible()\"\n :id=\"id\"\n :class=\"[cx('item'), item.class]\"\n role=\"menuitem\"\n :style=\"item.style\"\n :aria-label=\"label()\"\n :aria-disabled=\"disabled()\"\n :data-p-focused=\"isItemFocused()\"\n :data-p-disabled=\"disabled() || false\"\n :data-p=\"dataP\"\n v-bind=\"getPTOptions('item')\"\n >\n <div :class=\"cx('itemContent')\" @click=\"onItemClick($event)\" @mousemove=\"onItemMouseMove($event)\" :data-p=\"dataP\" v-bind=\"getPTOptions('itemContent')\">\n <template v-if=\"!templates.item\">\n <a v-ripple :href=\"item.url\" :class=\"cx('itemLink')\" :target=\"item.target\" tabindex=\"-1\" v-bind=\"getPTOptions('itemLink')\">\n <component v-if=\"templates.itemicon\" :is=\"templates.itemicon\" :item=\"item\" :class=\"cx('itemIcon')\" />\n <span v-else-if=\"item.icon\" :class=\"[cx('itemIcon'), item.icon]\" :data-p=\"dataP\" v-bind=\"getPTOptions('itemIcon')\" />\n <span :class=\"cx('itemLabel')\" :data-p=\"dataP\" v-bind=\"getPTOptions('itemLabel')\">{{ label() }}</span>\n </a>\n </template>\n <component v-else-if=\"templates.item\" :is=\"templates.item\" :item=\"item\" :label=\"label()\" :props=\"getMenuItemProps(item)\"></component>\n </div>\n </li>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { resolve } from '@primeuix/utils/object';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps } from 'vue';\n\nexport default {\n name: 'Menuitem',\n hostName: 'Menu',\n extends: BaseComponent,\n inheritAttrs: false,\n emits: ['item-click', 'item-mousemove'],\n props: {\n item: null,\n templates: null,\n id: null,\n focusedOptionId: null,\n index: null\n },\n methods: {\n getItemProp(processedItem, name) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name]) : undefined;\n },\n getPTOptions(key) {\n return this.ptm(key, {\n context: {\n item: this.item,\n index: this.index,\n focused: this.isItemFocused(),\n disabled: this.disabled()\n }\n });\n },\n isItemFocused() {\n return this.focusedOptionId === this.id;\n },\n onItemClick(event) {\n const command = this.getItemProp(this.item, 'command');\n\n command && command({ originalEvent: event, item: this.item.item });\n this.$emit('item-click', { originalEvent: event, item: this.item, id: this.id });\n },\n onItemMouseMove(event) {\n this.$emit('item-mousemove', { originalEvent: event, item: this.item, id: this.id });\n },\n visible() {\n return typeof this.item.visible === 'function' ? this.item.visible() : this.item.visible !== false;\n },\n disabled() {\n return typeof this.item.disabled === 'function' ? this.item.disabled() : this.item.disabled;\n },\n label() {\n return typeof this.item.label === 'function' ? this.item.label() : this.item.label;\n },\n getMenuItemProps(item) {\n return {\n action: mergeProps(\n {\n class: this.cx('itemLink'),\n tabindex: '-1'\n },\n this.getPTOptions('itemLink')\n ),\n icon: mergeProps(\n {\n class: [this.cx('itemIcon'), item.icon]\n },\n this.getPTOptions('itemIcon')\n ),\n label: mergeProps(\n {\n class: this.cx('itemLabel')\n },\n this.getPTOptions('itemLabel')\n )\n };\n }\n },\n computed: {\n dataP() {\n return cn({\n focus: this.isItemFocused(),\n disabled: this.disabled()\n });\n }\n },\n directives: {\n ripple: Ripple\n }\n};\n</script>\n","<template>\n <Portal :appendTo=\"appendTo\" :disabled=\"!popup\">\n <transition name=\"p-connected-overlay\" @enter=\"onEnter\" @leave=\"onLeave\" @after-leave=\"onAfterLeave\" v-bind=\"ptm('transition')\">\n <div v-if=\"popup ? overlayVisible : true\" :ref=\"containerRef\" :id=\"$id\" :class=\"cx('root')\" @click=\"onOverlayClick\" :data-p=\"dataP\" v-bind=\"ptmi('root')\">\n <div v-if=\"$slots.start\" :class=\"cx('start')\" v-bind=\"ptm('start')\">\n <slot name=\"start\"></slot>\n </div>\n <ul\n :ref=\"listRef\"\n :id=\"$id + '_list'\"\n :class=\"cx('list')\"\n role=\"menu\"\n :tabindex=\"tabindex\"\n :aria-activedescendant=\"focused ? focusedOptionId : undefined\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n @focus=\"onListFocus\"\n @blur=\"onListBlur\"\n @keydown=\"onListKeyDown\"\n v-bind=\"ptm('list')\"\n >\n <template v-for=\"(item, i) of model\" :key=\"label(item) + i.toString()\">\n <template v-if=\"item.items && visible(item) && !item.separator\">\n <li v-if=\"item.items\" :id=\"$id + '_' + i\" :class=\"[cx('submenuLabel'), item.class]\" role=\"none\" v-bind=\"ptm('submenuLabel')\">\n <!--TODO: submenuheader deprecated since v4.0. Use submenulabel-->\n <slot :name=\"$slots.submenulabel ? 'submenulabel' : 'submenuheader'\" :item=\"item\">{{ label(item) }}</slot>\n </li>\n <template v-for=\"(child, j) of item.items\" :key=\"child.label + i + '_' + j\">\n <PVMenuitem\n v-if=\"visible(child) && !child.separator\"\n :id=\"$id + '_' + i + '_' + j\"\n :item=\"child\"\n :templates=\"$slots\"\n :focusedOptionId=\"focusedOptionId\"\n :unstyled=\"unstyled\"\n @item-click=\"itemClick\"\n @item-mousemove=\"itemMouseMove\"\n :pt=\"pt\"\n />\n <li v-else-if=\"visible(child) && child.separator\" :key=\"'separator' + i + j\" :class=\"[cx('separator'), item.class]\" :style=\"child.style\" role=\"separator\" v-bind=\"ptm('separator')\"></li>\n </template>\n </template>\n <li v-else-if=\"visible(item) && item.separator\" :key=\"'separator' + i.toString()\" :class=\"[cx('separator'), item.class]\" :style=\"item.style\" role=\"separator\" v-bind=\"ptm('separator')\"></li>\n <PVMenuitem\n v-else\n :key=\"label(item) + i.toString()\"\n :id=\"$id + '_' + i\"\n :item=\"item\"\n :index=\"i\"\n :templates=\"$slots\"\n :focusedOptionId=\"focusedOptionId\"\n :unstyled=\"unstyled\"\n @item-click=\"itemClick\"\n @item-mousemove=\"itemMouseMove\"\n :pt=\"pt\"\n />\n </template>\n </ul>\n <div v-if=\"$slots.end\" :class=\"cx('end')\" v-bind=\"ptm('end')\">\n <slot name=\"end\"></slot>\n </div>\n </div>\n </transition>\n </Portal>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { absolutePosition, addStyle, find, findSingle, focus, getOuterWidth, isTouchDevice } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport BaseMenu from './BaseMenu.vue';\nimport Menuitem from './Menuitem.vue';\n\nexport default {\n name: 'Menu',\n extends: BaseMenu,\n inheritAttrs: false,\n emits: ['show', 'hide', 'focus', 'blur'],\n data() {\n return {\n overlayVisible: false,\n focused: false,\n focusedOptionIndex: -1,\n selectedOptionIndex: -1\n };\n },\n target: null,\n outsideClickListener: null,\n scrollHandler: null,\n resizeListener: null,\n container: null,\n list: null,\n mounted() {\n if (!this.popup) {\n this.bindResizeListener();\n this.bindOutsideClickListener();\n }\n },\n beforeUnmount() {\n this.unbindResizeListener();\n this.unbindOutsideClickListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n this.target = null;\n\n if (this.container && this.autoZIndex) {\n ZIndex.clear(this.container);\n }\n\n this.container = null;\n },\n methods: {\n itemClick(event) {\n const item = event.item;\n\n if (this.disabled(item)) {\n return;\n }\n\n if (item.command) {\n item.command(event);\n }\n\n if (this.overlayVisible) this.hide();\n\n if (!this.popup && this.focusedOptionIndex !== event.id) {\n this.focusedOptionIndex = event.id;\n }\n },\n itemMouseMove(event) {\n if (this.focused) {\n this.focusedOptionIndex = event.id;\n }\n },\n onListFocus(event) {\n this.focused = true;\n !this.popup && this.changeFocusedOptionIndex(0);\n\n this.$emit('focus', event);\n },\n onListBlur(event) {\n this.focused = false;\n this.focusedOptionIndex = -1;\n this.$emit('blur', event);\n },\n onListKeyDown(event) {\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n\n case 'Home':\n this.onHomeKey(event);\n break;\n\n case 'End':\n this.onEndKey(event);\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n\n case 'Space':\n this.onSpaceKey(event);\n break;\n\n case 'Escape':\n if (this.popup) {\n focus(this.target);\n this.hide();\n }\n\n case 'Tab':\n this.overlayVisible && this.hide();\n break;\n\n default:\n break;\n }\n },\n onArrowDownKey(event) {\n const optionIndex = this.findNextOptionIndex(this.focusedOptionIndex);\n\n this.changeFocusedOptionIndex(optionIndex);\n event.preventDefault();\n },\n onArrowUpKey(event) {\n if (event.altKey && this.popup) {\n focus(this.target);\n this.hide();\n event.preventDefault();\n } else {\n const optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex);\n\n this.changeFocusedOptionIndex(optionIndex);\n event.preventDefault();\n }\n },\n onHomeKey(event) {\n this.changeFocusedOptionIndex(0);\n event.preventDefault();\n },\n onEndKey(event) {\n this.changeFocusedOptionIndex(find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]').length - 1);\n event.preventDefault();\n },\n onEnterKey(event) {\n const element = findSingle(this.list, `li[id=\"${`${this.focusedOptionIndex}`}\"]`);\n const anchorElement = element && findSingle(element, 'a[data-pc-section=\"itemlink\"]');\n\n this.popup && focus(this.target);\n anchorElement ? anchorElement.click() : element && element.click();\n\n event.preventDefault();\n },\n onSpaceKey(event) {\n this.onEnterKey(event);\n },\n findNextOptionIndex(index) {\n const links = find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]');\n const matchedOptionIndex = [...links].findIndex((link) => link.id === index);\n\n return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;\n },\n findPrevOptionIndex(index) {\n const links = find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]');\n const matchedOptionIndex = [...links].findIndex((link) => link.id === index);\n\n return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;\n },\n changeFocusedOptionIndex(index) {\n const links = find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]');\n let order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index;\n\n order > -1 && (this.focusedOptionIndex = links[order].getAttribute('id'));\n },\n toggle(event) {\n if (this.overlayVisible) this.hide();\n else this.show(event);\n },\n show(event) {\n this.overlayVisible = true;\n this.target = event.currentTarget;\n },\n hide() {\n this.overlayVisible = false;\n this.target = null;\n },\n onEnter(el) {\n addStyle(el, { position: 'absolute', top: '0' });\n this.alignOverlay();\n this.bindOutsideClickListener();\n this.bindResizeListener();\n this.bindScrollListener();\n\n if (this.autoZIndex) {\n ZIndex.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);\n }\n\n if (this.popup) {\n focus(this.list);\n }\n\n this.$emit('show');\n },\n onLeave() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n this.unbindScrollListener();\n this.$emit('hide');\n },\n onAfterLeave(el) {\n if (this.autoZIndex) {\n ZIndex.clear(el);\n }\n },\n alignOverlay() {\n absolutePosition(this.container, this.target);\n const targetWidth = getOuterWidth(this.target);\n\n if (targetWidth > getOuterWidth(this.container)) {\n this.container.style.minWidth = getOuterWidth(this.target) + 'px';\n }\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n const isOutsideContainer = this.container && !this.container.contains(event.target);\n const isOutsideTarget = !(this.target && (this.target === event.target || this.target.contains(event.target)));\n\n if (this.overlayVisible && isOutsideContainer && isOutsideTarget) {\n this.hide();\n } else if (!this.popup && isOutsideContainer && isOutsideTarget) {\n this.focusedOptionIndex = -1;\n }\n };\n\n document.addEventListener('click', this.outsideClickListener, true);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener, true);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener() {\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {\n if (this.overlayVisible) {\n this.hide();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener() {\n if (!this.resizeListener) {\n this.resizeListener = () => {\n if (this.overlayVisible && !isTouchDevice()) {\n this.hide();\n }\n };\n\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n visible(item) {\n return typeof item.visible === 'function' ? item.visible() : item.visible !== false;\n },\n disabled(item) {\n return typeof item.disabled === 'function' ? item.disabled() : item.disabled;\n },\n label(item) {\n return typeof item.label === 'function' ? item.label() : item.label;\n },\n onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.target\n });\n },\n containerRef(el) {\n this.container = el;\n },\n listRef(el) {\n this.list = el;\n }\n },\n computed: {\n focusedOptionId() {\n return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;\n },\n dataP() {\n return cn({\n popup: this.popup\n });\n }\n },\n components: {\n PVMenuitem: Menuitem,\n Portal: Portal\n }\n};\n</script>\n","<template>\n <Portal :appendTo=\"appendTo\" :disabled=\"!popup\">\n <transition name=\"p-connected-overlay\" @enter=\"onEnter\" @leave=\"onLeave\" @after-leave=\"onAfterLeave\" v-bind=\"ptm('transition')\">\n <div v-if=\"popup ? overlayVisible : true\" :ref=\"containerRef\" :id=\"$id\" :class=\"cx('root')\" @click=\"onOverlayClick\" :data-p=\"dataP\" v-bind=\"ptmi('root')\">\n <div v-if=\"$slots.start\" :class=\"cx('start')\" v-bind=\"ptm('start')\">\n <slot name=\"start\"></slot>\n </div>\n <ul\n :ref=\"listRef\"\n :id=\"$id + '_list'\"\n :class=\"cx('list')\"\n role=\"menu\"\n :tabindex=\"tabindex\"\n :aria-activedescendant=\"focused ? focusedOptionId : undefined\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n @focus=\"onListFocus\"\n @blur=\"onListBlur\"\n @keydown=\"onListKeyDown\"\n v-bind=\"ptm('list')\"\n >\n <template v-for=\"(item, i) of model\" :key=\"label(item) + i.toString()\">\n <template v-if=\"item.items && visible(item) && !item.separator\">\n <li v-if=\"item.items\" :id=\"$id + '_' + i\" :class=\"[cx('submenuLabel'), item.class]\" role=\"none\" v-bind=\"ptm('submenuLabel')\">\n <!--TODO: submenuheader deprecated since v4.0. Use submenulabel-->\n <slot :name=\"$slots.submenulabel ? 'submenulabel' : 'submenuheader'\" :item=\"item\">{{ label(item) }}</slot>\n </li>\n <template v-for=\"(child, j) of item.items\" :key=\"child.label + i + '_' + j\">\n <PVMenuitem\n v-if=\"visible(child) && !child.separator\"\n :id=\"$id + '_' + i + '_' + j\"\n :item=\"child\"\n :templates=\"$slots\"\n :focusedOptionId=\"focusedOptionId\"\n :unstyled=\"unstyled\"\n @item-click=\"itemClick\"\n @item-mousemove=\"itemMouseMove\"\n :pt=\"pt\"\n />\n <li v-else-if=\"visible(child) && child.separator\" :key=\"'separator' + i + j\" :class=\"[cx('separator'), item.class]\" :style=\"child.style\" role=\"separator\" v-bind=\"ptm('separator')\"></li>\n </template>\n </template>\n <li v-else-if=\"visible(item) && item.separator\" :key=\"'separator' + i.toString()\" :class=\"[cx('separator'), item.class]\" :style=\"item.style\" role=\"separator\" v-bind=\"ptm('separator')\"></li>\n <PVMenuitem\n v-else\n :key=\"label(item) + i.toString()\"\n :id=\"$id + '_' + i\"\n :item=\"item\"\n :index=\"i\"\n :templates=\"$slots\"\n :focusedOptionId=\"focusedOptionId\"\n :unstyled=\"unstyled\"\n @item-click=\"itemClick\"\n @item-mousemove=\"itemMouseMove\"\n :pt=\"pt\"\n />\n </template>\n </ul>\n <div v-if=\"$slots.end\" :class=\"cx('end')\" v-bind=\"ptm('end')\">\n <slot name=\"end\"></slot>\n </div>\n </div>\n </transition>\n </Portal>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { absolutePosition, addStyle, find, findSingle, focus, getOuterWidth, isTouchDevice } from '@primeuix/utils/dom';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport BaseMenu from './BaseMenu.vue';\nimport Menuitem from './Menuitem.vue';\n\nexport default {\n name: 'Menu',\n extends: BaseMenu,\n inheritAttrs: false,\n emits: ['show', 'hide', 'focus', 'blur'],\n data() {\n return {\n overlayVisible: false,\n focused: false,\n focusedOptionIndex: -1,\n selectedOptionIndex: -1\n };\n },\n target: null,\n outsideClickListener: null,\n scrollHandler: null,\n resizeListener: null,\n container: null,\n list: null,\n mounted() {\n if (!this.popup) {\n this.bindResizeListener();\n this.bindOutsideClickListener();\n }\n },\n beforeUnmount() {\n this.unbindResizeListener();\n this.unbindOutsideClickListener();\n\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n\n this.target = null;\n\n if (this.container && this.autoZIndex) {\n ZIndex.clear(this.container);\n }\n\n this.container = null;\n },\n methods: {\n itemClick(event) {\n const item = event.item;\n\n if (this.disabled(item)) {\n return;\n }\n\n if (item.command) {\n item.command(event);\n }\n\n if (this.overlayVisible) this.hide();\n\n if (!this.popup && this.focusedOptionIndex !== event.id) {\n this.focusedOptionIndex = event.id;\n }\n },\n itemMouseMove(event) {\n if (this.focused) {\n this.focusedOptionIndex = event.id;\n }\n },\n onListFocus(event) {\n this.focused = true;\n !this.popup && this.changeFocusedOptionIndex(0);\n\n this.$emit('focus', event);\n },\n onListBlur(event) {\n this.focused = false;\n this.focusedOptionIndex = -1;\n this.$emit('blur', event);\n },\n onListKeyDown(event) {\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n\n case 'Home':\n this.onHomeKey(event);\n break;\n\n case 'End':\n this.onEndKey(event);\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n\n case 'Space':\n this.onSpaceKey(event);\n break;\n\n case 'Escape':\n if (this.popup) {\n focus(this.target);\n this.hide();\n }\n\n case 'Tab':\n this.overlayVisible && this.hide();\n break;\n\n default:\n break;\n }\n },\n onArrowDownKey(event) {\n const optionIndex = this.findNextOptionIndex(this.focusedOptionIndex);\n\n this.changeFocusedOptionIndex(optionIndex);\n event.preventDefault();\n },\n onArrowUpKey(event) {\n if (event.altKey && this.popup) {\n focus(this.target);\n this.hide();\n event.preventDefault();\n } else {\n const optionIndex = this.findPrevOptionIndex(this.focusedOptionIndex);\n\n this.changeFocusedOptionIndex(optionIndex);\n event.preventDefault();\n }\n },\n onHomeKey(event) {\n this.changeFocusedOptionIndex(0);\n event.preventDefault();\n },\n onEndKey(event) {\n this.changeFocusedOptionIndex(find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]').length - 1);\n event.preventDefault();\n },\n onEnterKey(event) {\n const element = findSingle(this.list, `li[id=\"${`${this.focusedOptionIndex}`}\"]`);\n const anchorElement = element && findSingle(element, 'a[data-pc-section=\"itemlink\"]');\n\n this.popup && focus(this.target);\n anchorElement ? anchorElement.click() : element && element.click();\n\n event.preventDefault();\n },\n onSpaceKey(event) {\n this.onEnterKey(event);\n },\n findNextOptionIndex(index) {\n const links = find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]');\n const matchedOptionIndex = [...links].findIndex((link) => link.id === index);\n\n return matchedOptionIndex > -1 ? matchedOptionIndex + 1 : 0;\n },\n findPrevOptionIndex(index) {\n const links = find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]');\n const matchedOptionIndex = [...links].findIndex((link) => link.id === index);\n\n return matchedOptionIndex > -1 ? matchedOptionIndex - 1 : 0;\n },\n changeFocusedOptionIndex(index) {\n const links = find(this.container, 'li[data-pc-section=\"item\"][data-p-disabled=\"false\"]');\n let order = index >= links.length ? links.length - 1 : index < 0 ? 0 : index;\n\n order > -1 && (this.focusedOptionIndex = links[order].getAttribute('id'));\n },\n toggle(event) {\n if (this.overlayVisible) this.hide();\n else this.show(event);\n },\n show(event) {\n this.overlayVisible = true;\n this.target = event.currentTarget;\n },\n hide() {\n this.overlayVisible = false;\n this.target = null;\n },\n onEnter(el) {\n addStyle(el, { position: 'absolute', top: '0' });\n this.alignOverlay();\n this.bindOutsideClickListener();\n this.bindResizeListener();\n this.bindScrollListener();\n\n if (this.autoZIndex) {\n ZIndex.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);\n }\n\n if (this.popup) {\n focus(this.list);\n }\n\n this.$emit('show');\n },\n onLeave() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n this.unbindScrollListener();\n this.$emit('hide');\n },\n onAfterLeave(el) {\n if (this.autoZIndex) {\n ZIndex.clear(el);\n }\n },\n alignOverlay() {\n absolutePosition(this.container, this.target);\n const targetWidth = getOuterWidth(this.target);\n\n if (targetWidth > getOuterWidth(this.container)) {\n this.container.style.minWidth = getOuterWidth(this.target) + 'px';\n }\n },\n bindOutsideClickListener() {\n if (!this.outsideClickListener) {\n this.outsideClickListener = (event) => {\n const isOutsideContainer = this.container && !this.container.contains(event.target);\n const isOutsideTarget = !(this.target && (this.target === event.target || this.target.contains(event.target)));\n\n if (this.overlayVisible && isOutsideContainer && isOutsideTarget) {\n this.hide();\n } else if (!this.popup && isOutsideContainer && isOutsideTarget) {\n this.focusedOptionIndex = -1;\n }\n };\n\n document.addEventListener('click', this.outsideClickListener, true);\n }\n },\n unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener, true);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener() {\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {\n if (this.overlayVisible) {\n this.hide();\n }\n });\n }\n\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener() {\n if (!this.resizeListener) {\n this.resizeListener = () => {\n if (this.overlayVisible && !isTouchDevice()) {\n this.hide();\n }\n };\n\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n visible(item) {\n return typeof item.visible === 'function' ? item.visible() : item.visible !== false;\n },\n disabled(item) {\n return typeof item.disabled === 'function' ? item.disabled() : item.disabled;\n },\n label(item) {\n return typeof item.label === 'function' ? item.label() : item.label;\n },\n onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.target\n });\n },\n containerRef(el) {\n this.container = el;\n },\n listRef(el) {\n this.list = el;\n }\n },\n computed: {\n focusedOptionId() {\n return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;\n },\n dataP() {\n return cn({\n popup: this.popup\n });\n }\n },\n components: {\n PVMenuitem: Menuitem,\n Portal: Portal\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","popup","type","Boolean","model","Array","appendTo","String","Object","autoZIndex","baseZIndex","Number","tabindex","ariaLabel","ariaLabelledby","style","MenuStyle","provide","$pcMenu","$parentInstance","hostName","inheritAttrs","emits","item","templates","id","focusedOptionId","index","methods","getItemProp","processedItem","resolve","undefined","getPTOptions","key","ptm","context","focused","isItemFocused","disabled","onItemClick","event","command","originalEvent","$emit","onItemMouseMove","visible","label","getMenuItemProps","action","mergeProps","cx","icon","computed","dataP","cn","focus","directives","ripple","Ripple","$options","_openBlock","_createElementBlock","_mergeProps","$props","_ctx","role","_createElementVNode","onClick","_cache","$event","onMousemove","_withDirectives","href","url","target","itemicon","_createBlock","_resolveDynamicComponent","_hoisted_4","_hoisted_5","BaseMenu","data","overlayVisible","focusedOptionIndex","selectedOptionIndex","outsideClickListener","scrollHandler","resizeListener","container","list","mounted","bindResizeListener","bindOutsideClickListener","beforeUnmount","unbindResizeListener","unbindOutsideClickListener","destroy","ZIndex","clear","itemClick","hide","itemMouseMove","onListFocus","changeFocusedOptionIndex","onListBlur","onListKeyDown","code","onArrowDownKey","onArrowUpKey","onHomeKey","onEndKey","onEnterKey","onSpaceKey","optionIndex","findNextOptionIndex","preventDefault","altKey","findPrevOptionIndex","find","length","element","findSingle","concat","anchorElement","click","links","matchedOptionIndex","_toConsumableArray","findIndex","link","order","getAttribute","toggle","show","currentTarget","onEnter","el","addStyle","position","top","alignOverlay","bindScrollListener","set","$primevue","config","zIndex","menu","onLeave","unbindScrollListener","onAfterLeave","absolutePosition","targetWidth","getOuterWidth","minWidth","_this","isOutsideContainer","contains","isOutsideTarget","document","addEventListener","removeEventListener","_this2","ConnectedOverlayScrollHandler","_this3","isTouchDevice","window","onOverlayClick","OverlayEventBus","emit","containerRef","listRef","components","PVMenuitem","Menuitem","Portal","_component_Portal","_createVNode","_Transition","$data","ref","$id","apply","arguments","ptmi","$slots","start","_renderSlot","onFocus","onBlur","onKeydown","_Fragment","_renderList","i","toString","items","separator","submenulabel","_createTextVNode","_toDisplayString","child","j","_component_PVMenuitem","unstyled","onItemMousemove","pt","end"],"mappings":";;;;;;;;;;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,UAAU;AAChB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDC,IAAAA,KAAK,EAAE;AACHF,MAAAA,IAAI,EAAEG,KAAK;MACX,SAAS,EAAA;KACZ;AACDC,IAAAA,QAAQ,EAAE;AACNJ,MAAAA,IAAI,EAAE,CAACK,MAAM,EAAEC,MAAM,CAAC;MACtB,SAAS,EAAA;KACZ;AACDC,IAAA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