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,KAAK,EAAE,KAAK;AAHD,OAAD;AALD,KAAb;AAYA,WAAO,CAAC,CAAC,KAAD,EAAQ,IAAR,EAAc,CACpB,KAAK,YAAL,EADoB,EAEpB,KAAK,cAAL,CAAoB,aAApB,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,CAAf","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"} |