This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/mixins/menuable/index.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
20 KiB
Text

{"version":3,"sources":["../../../src/mixins/menuable/index.ts"],"names":[],"mappings":"AAAA;AACA,OAAO,YAAP,MAAyB,iBAAzB;AACA,OAAO,SAAP,MAAsB,cAAtB;AACA,OAAO,WAAP,MAAwB,gBAAxB,C,CAEA;;AACA,OAAO,MAAP,MAAmC,mBAAnC;AACA,SAAS,aAAT,QAA8B,oBAA9B;AAKA,MAAM,UAAU,GAAG,MAAM,CACvB,SADuB,EAEvB,YAFuB,EAGvB,WAHuB,CAAzB;AAgBA;;AACA,eAAe,UAAU,CAAC,MAAX,GAA6B,MAA7B,CAAoC;AACjD,EAAA,IAAI,EAAE,UAD2C;AAGjD,EAAA,KAAK,EAAE;AACL,IAAA,aAAa,EAAE,OADV;AAEL,IAAA,KAAK,EAAE,OAFF;AAGL,IAAA,IAAI,EAAE,OAHD;AAIL,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADE;AAER,MAAA,OAAO,EAAE;AAFD,KAJL;AAQL,IAAA,QAAQ,EAAE,CAAC,MAAD,EAAS,MAAT,CARL;AASL,IAAA,WAAW,EAAE;AACX,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADK;AAEX,MAAA,OAAO,EAAE;AAFE,KATR;AAaL,IAAA,SAAS,EAAE;AACT,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADG;AAET,MAAA,OAAO,EAAE;AAFA,KAbN;AAiBL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADI;AAEV,MAAA,OAAO,EAAE;AAFC,KAjBP;AAqBL,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADE;AAER,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2B;AACzB;AACA;AACA,UAAA,UAAU,CAAC,SAAX,CAAqB,SAArB,GAAiC,SAAS,CAAC,SAA3C;AACD,SAJD,MAIO;AACL,UAAA,UAAU,CAAC,SAAX,CAAqB,SAArB,GAAiC,CAAjC;AACD;AACF,OAxBa,CA0Bd;;;AACA,WAAK,SAAL,CAAe,MAAK;AAClB,QAAA,UAAU,CAAC,OAAX,GAAqB,KAAK,OAAL,CAAa,KAAK,KAAL,CAAW,OAAxB,CAArB;AAEA,aAAK,UAAL,GAAkB,UAAlB;AACD,OAJD;AAKD;;AA3MM;AA/IwC,CAApC,CAAf","sourcesContent":["// Mixins\nimport Positionable from '../positionable'\nimport Stackable from '../stackable'\nimport Activatable from '../activatable'\n\n// Utilities\nimport mixins, { ExtractVue } from '../../util/mixins'\nimport { convertToUnit } from '../../util/helpers'\n\n// Types\nimport { VNode } from 'vue'\n\nconst baseMixins = mixins(\n Stackable,\n Positionable,\n Activatable\n)\n\ninterface options extends ExtractVue<typeof baseMixins> {\n attach: boolean | string | Element\n offsetY: boolean\n offsetX: boolean\n $refs: {\n content: HTMLElement\n activator: HTMLElement\n }\n}\n\n/* @vue/component */\nexport default baseMixins.extend<options>().extend({\n name: 'menuable',\n\n props: {\n allowOverflow: Boolean,\n light: Boolean,\n dark: Boolean,\n maxWidth: {\n type: [Number, String],\n default: 'auto',\n },\n minWidth: [Number, String],\n nudgeBottom: {\n type: [Number, String],\n default: 0,\n },\n nudgeLeft: {\n type: [Number, String],\n default: 0,\n },\n nudgeRight: {\n type: [Number, String],\n default: 0,\n },\n nudgeTop: {\n type: [Number, String],\n default: 0,\n },\n nudgeWidth: {\n type: [Number, String],\n default: 0,\n },\n offsetOverflow: Boolean,\n openOnClick: Boolean,\n positionX: {\n type: Number,\n default: null,\n },\n positionY: {\n type: Number,\n default: null,\n },\n zIndex: {\n type: [Number, String],\n default: null,\n },\n },\n\n data: () => ({\n absoluteX: 0,\n absoluteY: 0,\n activatedBy: null as EventTarget | null,\n activatorFixed: false,\n activatorNode: null as null | VNode | VNode[],\n dimensions: {\n activator: {\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n width: 0,\n height: 0,\n offsetTop: 0,\n scrollHeight: 0,\n offsetLeft: 0,\n },\n content: {\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n width: 0,\n height: 0,\n offsetTop: 0,\n scrollHeight: 0,\n },\n },\n hasJustFocused: false,\n hasWindow: false,\n inputActivator: false,\n isContentActive: false,\n pageWidth: 0,\n pageYOffset: 0,\n stackClass: 'v-menu__content--active',\n stackMinZIndex: 6,\n }),\n\n computed: {\n computedLeft () {\n const a = this.dimensions.activator\n const c = this.dimensions.content\n const activatorLeft = (this.attach !== false ? a.offsetLeft : a.left) || 0\n const minWidth = Math.max(a.width, c.width)\n let left = 0\n left += this.left ? activatorLeft - (minWidth - a.width) : activatorLeft\n if (this.offsetX) {\n const maxWidth = isNaN(Number(this.maxWidth))\n ? a.width\n : Math.min(a.width, Number(this.maxWidth))\n\n left += this.left ? -maxWidth : a.width\n }\n if (this.nudgeLeft) left -= parseInt(this.nudgeLeft)\n if (this.nudgeRight) left += parseInt(this.nudgeRight)\n\n return left\n },\n computedTop () {\n const a = this.dimensions.activator\n const c = this.dimensions.content\n let top = 0\n\n if (this.top) top += a.height - c.height\n if (this.attach !== false) top += a.offsetTop\n else top += a.top + this.pageYOffset\n if (this.offsetY) top += this.top ? -a.height : a.height\n if (this.nudgeTop) top -= parseInt(this.nudgeTop)\n if (this.nudgeBottom) top += parseInt(this.nudgeBottom)\n\n return top\n },\n hasActivator (): boolean {\n return !!this.$slots.activator || !!this.$scopedSlots.activator || !!this.activator || !!this.inputActivator\n },\n },\n\n watch: {\n disabled (val) {\n val && this.callDeactivate()\n },\n isActive (val) {\n if (this.disabled) return\n\n val ? this.callActivate() : this.callDeactivate()\n },\n positionX: 'updateDimensions',\n positionY: 'updateDimensions',\n },\n\n beforeMount () {\n this.hasWindow = typeof window !== 'undefined'\n },\n\n methods: {\n absolutePosition () {\n return {\n offsetTop: 0,\n offsetLeft: 0,\n scrollHeight: 0,\n top: this.positionY || this.absoluteY,\n bottom: this.positionY || this.absoluteY,\n left: this.positionX || this.absoluteX,\n right: this.positionX || this.absoluteX,\n height: 0,\n width: 0,\n }\n },\n activate () {},\n calcLeft (menuWidth: number) {\n return convertToUnit(this.attach !== false\n ? this.computedLeft\n : this.calcXOverflow(this.computedLeft, menuWidth))\n },\n calcTop () {\n return convertToUnit(this.attach !== false\n ? this.computedTop\n : this.calcYOverflow(this.computedTop))\n },\n calcXOverflow (left: number, menuWidth: number) {\n const xOverflow = left + menuWidth - this.pageWidth + 12\n\n if ((!this.left || this.right) && xOverflow > 0) {\n left = Math.max(left - xOverflow, 0)\n } else {\n left = Math.max(left, 12)\n }\n\n return left + this.getOffsetLeft()\n },\n calcYOverflow (top: number) {\n const documentHeight = this.getInnerHeight()\n const toTop = this.pageYOffset + documentHeight\n const activator = this.dimensions.activator\n const contentHeight = this.dimensions.content.height\n const totalHeight = top + contentHeight\n const isOverflowing = toTop < totalHeight\n\n // If overflowing bottom and offset\n // TODO: set 'bottom' position instead of 'top'\n if (isOverflowing &&\n this.offsetOverflow &&\n // If we don't have enough room to offset\n // the overflow, don't offset\n activator.top > contentHeight\n ) {\n top = this.pageYOffset + (activator.top - contentHeight)\n // If overflowing bottom\n } else if (isOverflowing && !this.allowOverflow) {\n top = toTop - contentHeight - 12\n // If overflowing top\n } else if (top < this.pageYOffset && !this.allowOverflow) {\n top = this.pageYOffset + 12\n }\n\n return top < 12 ? 12 : top\n },\n callActivate () {\n if (!this.hasWindow) return\n\n this.activate()\n },\n callDeactivate () {\n this.isContentActive = false\n\n this.deactivate()\n },\n checkForPageYOffset () {\n if (this.hasWindow) {\n this.pageYOffset = this.activatorFixed ? 0 : this.getOffsetTop()\n }\n },\n checkActivatorFixed () {\n if (this.attach !== false) return\n let el = this.getActivator()\n while (el) {\n if (window.getComputedStyle(el).position === 'fixed') {\n this.activatorFixed = true\n return\n }\n el = el.offsetParent as HTMLElement\n }\n this.activatorFixed = false\n },\n deactivate () {},\n genActivatorListeners () {\n const listeners = Activatable.options.methods.genActivatorListeners.call(this)\n\n const onClick = listeners.click\n\n listeners.click = (e: MouseEvent & KeyboardEvent) => {\n if (this.openOnClick) {\n onClick && onClick(e)\n }\n\n this.absoluteX = e.clientX\n this.absoluteY = e.clientY\n }\n\n return listeners\n },\n getInnerHeight () {\n if (!this.hasWindow) return 0\n\n return window.innerHeight ||\n document.documentElement.clientHeight\n },\n getOffsetLeft () {\n if (!this.hasWindow) return 0\n\n return window.pageXOffset ||\n document.documentElement.scrollLeft\n },\n getOffsetTop () {\n if (!this.hasWindow) return 0\n\n return window.pageYOffset ||\n document.documentElement.scrollTop\n },\n getRoundedBoundedClientRect (el: Element) {\n const rect = el.getBoundingClientRect()\n return {\n top: Math.round(rect.top),\n left: Math.round(rect.left),\n bottom: Math.round(rect.bottom),\n right: Math.round(rect.right),\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n }\n },\n measure (el: HTMLElement) {\n if (!el || !this.hasWindow) return null\n\n const rect = this.getRoundedBoundedClientRect(el)\n\n // Account for activator margin\n if (this.attach !== false) {\n const style = window.getComputedStyle(el)\n\n rect.left = parseInt(style.marginLeft!)\n rect.top = parseInt(style.marginTop!)\n }\n\n return rect\n },\n sneakPeek (cb: () => void) {\n requestAnimationFrame(() => {\n const el = this.$refs.content\n\n if (!el || el.style.display !== 'none') {\n cb()\n return\n }\n\n el.style.display = 'inline-block'\n cb()\n el.style.display = 'none'\n })\n },\n startTransition () {\n return new Promise<void>(resolve => requestAnimationFrame(() => {\n this.isContentActive = this.hasJustFocused = this.isActive\n resolve()\n }))\n },\n updateDimensions () {\n this.hasWindow = typeof window !== 'undefined'\n this.checkActivatorFixed()\n this.checkForPageYOffset()\n this.pageWidth = document.documentElement.clientWidth\n\n const dimensions: any = {}\n\n // Activator should already be shown\n if (!this.hasActivator || this.absolute) {\n dimensions.activator = this.absolutePosition()\n } else {\n const activator = this.getActivator()\n if (!activator) return\n\n dimensions.activator = this.measure(activator)\n dimensions.activator.offsetLeft = activator.offsetLeft\n if (this.attach !== false) {\n // account for css padding causing things to not line up\n // this is mostly for v-autocomplete, hopefully it won't break anything\n dimensions.activator.offsetTop = activator.offsetTop\n } else {\n dimensions.activator.offsetTop = 0\n }\n }\n\n // Display and hide to get dimensions\n this.sneakPeek(() => {\n dimensions.content = this.measure(this.$refs.content)\n\n this.dimensions = dimensions\n })\n },\n },\n})\n"],"sourceRoot":"","file":"index.js"}