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pB,KAAK,YAAL,EADoB,EAEpB,KAAK,cAAL,CAAoB,sBAApB,EAAmC;AACjC,MAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,IADD;AAEL,QAAA,KAAK,EAAE,KAAK,KAFP;AAGL,QAAA,IAAI,EAAE,KAAK;AAHN;AAD0B,KAAnC,EAMG,CAAC,KAAK,aAAL,EAAD,CANH,CAFoB,CAAd,CAAR;AAUD;AAja8B,CAAlB,C","sourcesContent":["// Styles\nimport './VMenu.sass'\n\n// Mixins\nimport Delayable from '../../mixins/delayable'\nimport Dependent from '../../mixins/dependent'\nimport Detachable from '../../mixins/detachable'\nimport Menuable from '../../mixins/menuable'\nimport Returnable from '../../mixins/returnable'\nimport Toggleable from '../../mixins/toggleable'\nimport Themeable from '../../mixins/themeable'\n\n// Directives\nimport ClickOutside from '../../directives/click-outside'\nimport Resize from '../../directives/resize'\n\n// Utilities\nimport mixins from '../../util/mixins'\nimport { convertToUnit, keyCodes } from '../../util/helpers'\nimport ThemeProvider from '../../util/ThemeProvider'\n\n// Types\nimport { VNode, VNodeDirective, VNodeData } from 'vue'\n\nconst baseMixins = mixins(\n Dependent,\n Delayable,\n Detachable,\n Menuable,\n Returnable,\n Toggleable,\n Themeable\n)\n\n/* @vue/component */\nexport default baseMixins.extend({\n name: 'v-menu',\n\n provide (): object {\n return {\n isInMenu: true,\n // Pass theme through to default slot\n theme: this.theme,\n }\n },\n\n directives: {\n ClickOutside,\n Resize,\n },\n\n props: {\n auto: Boolean,\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n closeOnContentClick: {\n type: Boolean,\n default: true,\n },\n disabled: Boolean,\n disableKeys: Boolean,\n fullWidth: Boolean,\n maxHeight: {\n type: [Number, String],\n default: 'auto',\n },\n offsetX: Boolean,\n offsetY: Boolean,\n openOnClick: {\n type: Boolean,\n default: true,\n },\n openOnHover: Boolean,\n origin: {\n type: String,\n default: 'top left',\n },\n transition: {\n type: [Boolean, String],\n default: 'v-menu-transition',\n },\n },\n\n data () {\n return {\n calculatedTopAuto: 0,\n defaultOffset: 8,\n hasJustFocused: false,\n listIndex: -1,\n resizeTimeout: 0,\n selectedIndex: null as null | number,\n tiles: [] as HTMLElement[],\n }\n },\n\n computed: {\n activeTile (): HTMLElement | undefined {\n return this.tiles[this.listIndex]\n },\n calculatedLeft (): string {\n const menuWidth = Math.max(this.dimensions.content.width, parseFloat(this.calculatedMinWidth))\n\n if (!this.auto) return this.calcLeft(menuWidth) || '0'\n\n return convertToUnit(this.calcXOverflow(this.calcLeftAuto(), menuWidth)) || '0'\n },\n calculatedMaxHeight (): string {\n const height = this.auto\n ? '200px'\n : convertToUnit(this.maxHeight)\n\n return height || '0'\n },\n calculatedMaxWidth (): string {\n return convertToUnit(this.maxWidth) || '0'\n },\n calculatedMinWidth (): string {\n if (this.minWidth) {\n return convertToUnit(this.minWidth) || '0'\n }\n\n const minWidth = Math.min(\n this.dimensions.activator.width +\n Number(this.nudgeWidth) +\n (this.auto ? 16 : 0),\n Math.max(this.pageWidth - 24, 0)\n )\n\n const calculatedMaxWidth = isNaN(parseInt(this.calculatedMaxWidth))\n ? minWidth\n : parseInt(this.calculatedMaxWidth)\n\n return convertToUnit(Math.min(\n calculatedMaxWidth,\n minWidth\n )) || '0'\n },\n calculatedTop (): string {\n const top = !this.auto\n ? this.calcTop()\n : convertToUnit(this.calcYOverflow(this.calculatedTopAuto))\n\n return top || '0'\n },\n hasClickableTiles (): boolean {\n return Boolean(this.tiles.find(tile => tile.tabIndex > -1))\n },\n styles (): object {\n return {\n maxHeight: this.calculatedMaxHeight,\n minWidth: this.calculatedMinWidth,\n maxWidth: this.calculatedMaxWidth,\n top: this.calculatedTop,\n left: this.calculatedLeft,\n transformOrigin: this.origin,\n zIndex: this.zIndex || this.activeZIndex,\n }\n },\n },\n\n watch: {\n isActive (val) {\n if (!val) this.listIndex = -1\n },\n isContentActive (val) {\n this.hasJustFocused = val\n },\n listIndex (next, prev) {\n if (next in this.tiles) {\n const tile = this.tiles[next]\n tile.classList.add('v-list-item--highlighted')\n this.$refs.content.scrollTop = tile.offsetTop - tile.clientHeight\n }\n\n prev in this.tiles &&\n this.tiles[prev].classList.remove('v-list-item--highlighted')\n },\n },\n\n mounted () {\n this.isActive && this.callActivate()\n },\n\n methods: {\n activate () {\n // Update coordinates and dimensions of menu\n // and its activator\n this.updateDimensions()\n // Start the transition\n requestAnimationFrame(() => {\n // Once transitioning, calculate scroll and top position\n this.startTransition().then(() => {\n if (this.$refs.content) {\n this.calculatedTopAuto = this.calcTopAuto()\n this.auto && (this.$refs.content.scrollTop = this.calcScrollPosition())\n }\n })\n })\n },\n calcScrollPosition () {\n const $el = this.$refs.content\n const activeTile = $el.querySelector('.v-list-item--active') as HTMLElement\n const maxScrollTop = $el.scrollHeight - $el.offsetHeight\n\n return activeTile\n ? Math.min(maxScrollTop, Math.max(0, activeTile.offsetTop - $el.offsetHeight / 2 + activeTile.offsetHeight / 2))\n : $el.scrollTop\n },\n calcLeftAuto () {\n return parseInt(this.dimensions.activator.left - this.defaultOffset * 2)\n },\n calcTopAuto () {\n const $el = this.$refs.content\n const activeTile = $el.querySelector('.v-list-item--active') as HTMLElement | null\n\n if (!activeTile) {\n this.selectedIndex = null\n }\n\n if (this.offsetY || !activeTile) {\n return this.computedTop\n }\n\n this.selectedIndex = Array.from(this.tiles).indexOf(activeTile)\n\n const tileDistanceFromMenuTop = activeTile.offsetTop - this.calcScrollPosition()\n const firstTileOffsetTop = ($el.querySelector('.v-list-item') as HTMLElement).offsetTop\n\n return this.computedTop - tileDistanceFromMenuTop - firstTileOffsetTop - 1\n },\n changeListIndex (e: KeyboardEvent) {\n // For infinite scroll and autocomplete, re-evaluate children\n this.getTiles()\n\n if (!this.isActive || !this.hasClickableTiles) {\n return\n } else if (e.keyCode === keyCodes.tab) {\n this.isActive = false\n return\n } else if (e.keyCode === keyCodes.down) {\n this.nextTile()\n } else if (e.keyCode === keyCodes.up) {\n this.prevTile()\n } else if (e.keyCode === keyCodes.enter && this.listIndex !== -1) {\n this.tiles[this.listIndex].click()\n } else { return }\n // One of the conditions was met, prevent default action (#2988)\n e.preventDefault()\n },\n closeConditional (e: Event) {\n const target = e.target as HTMLElement\n\n return this.isActive &&\n this.closeOnClick &&\n !this.$refs.content.contains(target)\n },\n genActivatorListeners () {\n const listeners = Menuable.options.methods.genActivatorListeners.call(this)\n\n if (!this.disableKeys) {\n listeners.keydown = this.onKeyDown\n }\n\n return listeners\n },\n genTransition (): VNode {\n if (!this.transition) return this.genContent()\n\n return this.$createElement('transition', {\n props: {\n name: this.transition,\n },\n }, [this.genContent()])\n },\n genDirectives (): VNodeDirective[] {\n const directives: VNodeDirective[] = [{\n name: 'show',\n value: this.isContentActive,\n }]\n\n // Do not add click outside for hover menu\n if (!this.openOnHover && this.closeOnClick) {\n directives.push({\n name: 'click-outside',\n value: () => { this.isActive = false },\n args: {\n closeConditional: this.closeConditional,\n include: () => [this.$el, ...this.getOpenDependentElements()],\n },\n } as any)\n }\n\n return directives\n },\n genContent (): VNode {\n const options = {\n attrs: {\n ...this.getScopeIdAttrs(),\n role: 'role' in this.$attrs ? this.$attrs.role : 'menu',\n },\n staticClass: 'v-menu__content',\n class: {\n ...this.rootThemeClasses,\n 'v-menu__content--auto': this.auto,\n 'v-menu__content--fixed': this.activatorFixed,\n menuable__content__active: this.isActive,\n [this.contentClass.trim()]: true,\n },\n style: this.styles,\n directives: this.genDirectives(),\n ref: 'content',\n on: {\n click: (e: Event) => {\n e.stopPropagation()\n\n const target = e.target as HTMLElement\n\n if (target.getAttribute('disabled')) return\n if (this.closeOnContentClick) this.isActive = false\n },\n keydown: this.onKeyDown,\n },\n } as VNodeData\n\n if (!this.disabled && this.openOnHover) {\n options.on = options.on || {}\n options.on.mouseenter = this.mouseEnterHandler\n }\n\n if (this.openOnHover) {\n options.on = options.on || {}\n options.on.mouseleave = this.mouseLeaveHandler\n }\n\n return this.$createElement(\n 'div',\n options,\n this.showLazyContent(this.getContentSlot())\n )\n },\n getTiles () {\n this.tiles = Array.from(this.$refs.content.querySelectorAll('.v-list-item'))\n },\n mouseEnterHandler () {\n this.runDelay('open', () => {\n if (this.hasJustFocused) return\n\n this.hasJustFocused = true\n this.isActive = true\n })\n },\n mouseLeaveHandler (e: MouseEvent) {\n // Prevent accidental re-activation\n this.runDelay('close', () => {\n if (this.$refs.content.contains(e.relatedTarget as HTMLElement)) return\n\n requestAnimationFrame(() => {\n this.isActive = false\n this.callDeactivate()\n })\n })\n },\n nextTile () {\n const tile = this.tiles[this.listIndex + 1]\n\n if (!tile) {\n if (!this.tiles.length) return\n\n this.listIndex = -1\n this.nextTile()\n\n return\n }\n\n this.listIndex++\n if (tile.tabIndex === -1) this.nextTile()\n },\n prevTile () {\n const tile = this.tiles[this.listIndex - 1]\n\n if (!tile) {\n if (!this.tiles.length) return\n\n this.listIndex = this.tiles.length\n this.prevTile()\n\n return\n }\n\n this.listIndex--\n if (tile.tabIndex === -1) this.prevTile()\n },\n onKeyDown (e: KeyboardEvent) {\n if (e.keyCode === keyCodes.esc) {\n // Wait for dependent elements to close first\n setTimeout(() => { this.isActive = false })\n const activator = this.getActivator()\n this.$nextTick(() => activator && activator.focus())\n } else if (\n !this.isActive &&\n [keyCodes.up, keyCodes.down].includes(e.keyCode)\n ) {\n this.isActive = true\n }\n\n // Allow for isActive watcher to generate tile list\n this.$nextTick(() => this.changeListIndex(e))\n },\n onResize () {\n if (!this.isActive) return\n\n // Account for screen resize\n // and orientation change\n // eslint-disable-next-line no-unused-expressions\n this.$refs.content.offsetWidth\n this.updateDimensions()\n\n // When resizing to a smaller width\n // content width is evaluated before\n // the new activator width has been\n // set, causing it to not size properly\n // hacky but will revisit in the future\n clearTimeout(this.resizeTimeout)\n this.resizeTimeout = window.setTimeout(this.updateDimensions, 100)\n },\n },\n\n render (h): VNode {\n const data = {\n staticClass: 'v-menu',\n class: {\n 'v-menu--inline': !this.fullWidth && (this.$slots.activator || this.$scopedSlots.activator),\n },\n directives: [{\n arg: '500',\n name: 'resize',\n value: this.onResize,\n }],\n }\n\n return h('div', data, [\n this.genActivator(),\n this.$createElement(ThemeProvider, {\n props: {\n root: true,\n light: this.light,\n dark: this.dark,\n },\n }, [this.genTransition()]),\n ])\n },\n})\n"],"sourceRoot":"","file":"VMenu.js"} |