Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VTooltip.js.map 10KB

1
  1. {"version":3,"sources":["../../../src/components/VTooltip/VTooltip.js"],"names":[],"mappings":";;AAAA,OAAO,+CAAP;AAEA;AACA,OAAO,SAAP,MAAsB,wBAAtB;AACA,OAAO,SAAP,MAAsB,wBAAtB;AACA,OAAO,SAAP,MAAsB,wBAAtB;AACA,OAAO,UAAP,MAAuB,yBAAvB;AACA,OAAO,QAAP,MAAqB,uBAArB;AACA,OAAO,UAAP,MAAuB,yBAAvB;AAEA;AACA,SAAS,aAAT,EAAwB,WAAxB,QAA2C,oBAA3C;AACA,SAAS,YAAT,QAA6B,oBAA7B;AAEA;AACA,eAAe;AACb,UAAM,WADO;AAGb,YAAQ,CAAC,SAAD,EAAY,SAAZ,EAAuB,SAAvB,EAAkC,UAAlC,EAA8C,QAA9C,EAAwD,UAAxD,CAHK;AAKb,WAAO;AACL,oBAAY;AACV,kBAAM,CAAC,MAAD,EAAS,MAAT,CADI;AAEV,qBAAS;AAFC,SADP;AAKL,kBAAU;AACR,kBAAM,CAAC,MAAD,EAAS,MAAT,CADE;AAER,qBAAS;AAFD,SALL;AASL,kBAAU,OATL;AAUL,eAAO;AACL,kBAAM,OADD;AAEL,qBAAS;AAFJ,SAVF;AAcL,mBAAW;AACT,kBAAM,CAAC,MAAD,EAAS,MAAT,CADG;AAET,qBAAS;AAFA,SAdN;AAkBL,aAAK;AACH,kBAAM,MADH;AAEH,qBAAS;AAFN,SAlBA;AAsBL,oBAAY,MAtBP;AAuBL,gBAAQ;AACN,qBAAS;AADH;AAvBH,KALM;AAiCb,UAAM;AAAA,eAAO;AACX,gCAAoB,CADT;AAEX,6BAAiB;AAFN,SAAP;AAAA,KAjCO;AAsCb,cAAU;AACR,sBADQ,4BACM;AAAA,8BACmB,KAAK,UADxB;AAAA,gBACJ,SADI,eACJ,SADI;AAAA,gBACO,OADP,eACO,OADP;;AA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KAAK,eAAL,EARoD;AAS3D,wBAAY,CAAC;AACX,sBAAM,MADK;AAEX,uBAAO,KAAK;AAFD,aAAD,CAT+C;AAa3D,iBAAK;AAbsD,SAApC,CAAT,EAcZ,KAAK,eAAL,CAAqB,KAAK,MAAL,CAAY,OAAjC,CAdY,CAAhB;AAgBA,eAAO,EAAE,KAAK,GAAP,EAAY;AACjB,yBAAa,WADI;AAEjB,qBAAS,KAAK;AAFG,SAAZ,EAGJ,CACD,EAAE,YAAF,EAAgB;AACd,mBAAO;AACL,sBAAM,KAAK;AADN;AADO,SAAhB,EAIG,CAAC,OAAD,CAJH,CADC,EAMD,KAAK,YAAL,EANC,CAHI,CAAP;AAWD;AAnMY,CAAf","sourcesContent":["import '../../stylus/components/_tooltips.styl'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Delayable from '../../mixins/delayable'\nimport Dependent from '../../mixins/dependent'\nimport Detachable from '../../mixins/detachable'\nimport Menuable from '../../mixins/menuable'\nimport Toggleable from '../../mixins/toggleable'\n\n// Helpers\nimport { convertToUnit, getSlotType } from '../../util/helpers'\nimport { consoleError } from '../../util/console'\n\n/* @vue/component */\nexport default {\n name: 'v-tooltip',\n\n mixins: [Colorable, Delayable, Dependent, Detachable, Menuable, Toggleable],\n\n props: {\n closeDelay: {\n type: [Number, String],\n default: 200\n },\n debounce: {\n type: [Number, String],\n default: 0\n },\n disabled: Boolean,\n fixed: {\n type: Boolean,\n default: true\n },\n openDelay: {\n type: [Number, String],\n default: 200\n },\n tag: {\n type: String,\n default: 'span'\n },\n transition: String,\n zIndex: {\n default: null\n }\n },\n\n data: () => ({\n calculatedMinWidth: 0,\n closeDependents: false\n }),\n\n computed: {\n calculatedLeft () {\n const { activator, content } = this.dimensions\n const unknown = !this.bottom && !this.left && !this.top && !this.right\n const activatorLeft = this.isAttached ? activator.offsetLeft : activator.left\n let left = 0\n\n if (this.top || this.bottom || unknown) {\n left = (\n activatorLeft +\n (activator.width / 2) -\n (content.width / 2)\n )\n } else if (this.left || this.right) {\n left = (\n activatorLeft +\n (this.right ? activator.width : -content.width) +\n (this.right ? 10 : -10)\n )\n }\n\n if (this.nudgeLeft) left -= parseInt(this.nudgeLeft)\n if (this.nudgeRight) left += parseInt(this.nudgeRight)\n\n return `${this.calcXOverflow(left, this.dimensions.content.width)}px`\n },\n calculatedTop () {\n const { activator, content } = this.dimensions\n const activatorTop = this.isAttached ? activator.offsetTop : activator.top\n let top = 0\n\n if (this.top || this.bottom) {\n top = (\n activatorTop +\n (this.bottom ? activator.height : -content.height) +\n (this.bottom ? 10 : -10)\n )\n } else if (this.left || this.right) {\n top = (\n activatorTop +\n (activator.height / 2) -\n (content.height / 2)\n )\n }\n\n if (this.nudgeTop) top -= parseInt(this.nudgeTop)\n if (this.nudgeBottom) top += parseInt(this.nudgeBottom)\n\n return `${this.calcYOverflow(top + this.pageYOffset)}px`\n },\n classes () {\n return {\n 'v-tooltip--top': this.top,\n 'v-tooltip--right': this.right,\n 'v-tooltip--bottom': this.bottom,\n 'v-tooltip--left': this.left\n }\n },\n computedTransition () {\n if (this.transition) return this.transition\n if (this.top) return 'slide-y-reverse-transition'\n if (this.right) return 'slide-x-transition'\n if (this.bottom) return 'slide-y-transition'\n if (this.left) return 'slide-x-reverse-transition'\n return ''\n },\n offsetY () {\n return this.top || this.bottom\n },\n offsetX () {\n return this.left || this.right\n },\n styles () {\n return {\n left: this.calculatedLeft,\n maxWidth: convertToUnit(this.maxWidth),\n minWidth: convertToUnit(this.minWidth),\n opacity: this.isActive ? 0.9 : 0,\n top: this.calculatedTop,\n zIndex: this.zIndex || this.activeZIndex\n }\n }\n },\n\n beforeMount () {\n this.$nextTick(() => {\n this.value && this.callActivate()\n })\n },\n\n mounted () {\n if (getSlotType(this, 'activator', true) === 'v-slot') {\n consoleError(`v-tooltip's activator slot must be bound, try '<template #activator=\"data\"><v-btn v-on=\"data.on>'`, this)\n }\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(this.startTransition)\n },\n genActivator () {\n const listeners = this.disabled ? {} : {\n mouseenter: e => {\n this.getActivator(e)\n this.runDelay('open')\n },\n mouseleave: e => {\n this.getActivator(e)\n this.runDelay('close')\n }\n }\n\n if (getSlotType(this, 'activator') === 'scoped') {\n const activator = this.$scopedSlots.activator({ on: listeners })\n this.activatorNode = activator\n return activator\n }\n\n return this.$createElement('span', {\n on: listeners,\n ref: 'activator'\n }, this.$slots.activator)\n }\n },\n\n render (h) {\n const tooltip = h('div', this.setBackgroundColor(this.color, {\n staticClass: 'v-tooltip__content',\n 'class': {\n [this.contentClass]: true,\n 'menuable__content__active': this.isActive,\n 'v-tooltip__content--fixed': this.activatorFixed\n },\n style: this.styles,\n attrs: this.getScopeIdAttrs(),\n directives: [{\n name: 'show',\n value: this.isContentActive\n }],\n ref: 'content'\n }), this.showLazyContent(this.$slots.default))\n\n return h(this.tag, {\n staticClass: 'v-tooltip',\n 'class': this.classes\n }, [\n h('transition', {\n props: {\n name: this.computedTransition\n }\n }, [tooltip]),\n this.genActivator()\n ])\n }\n}\n"],"sourceRoot":""}