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.

VNavigationDrawer.js.map 16KB

1
  1. {"version":3,"sources":["../../../src/components/VNavigationDrawer/VNavigationDrawer.ts"],"names":[],"mappings":";;;;;;;;AAGA;;AAOA;;AAKA;;;AAdA;;AAGA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AAGA;;;;AACA;;;;AACA;;;;AAGA;;AACA;;;;;;kBAMe,sBACb,+BAAgB,MAAhB,EAAwB,CACtB,aADsB,EAEtB,OAFsB,EAGtB,OAHsB,CAAxB,CADa,EAMb,mBANa,EAOb,qBAPa,EAQb,qBARa,EASb;AACF;AAVe,EAWb,MAXa,CAWN;AACP,UAAM,qBADC;AAGP,gBAAY;AACV,4CADU;AAEV,gCAFU;AAGV;AAHU,KAHL;AASP,WAAO;AACL,iBAAS,OADJ;AAEL,6BAAqB,OAFhB;AAGL,8BAAsB,OAHjB;AAIL,gBAAQ;AACN,kBAAM,CAAC,MAAD,EAAS,MAAT,CADA;AAEN,qBAAS;AAFH,SAJH;AAQL,kBAAU,OARL;AASL,qBAAa,OATR;AAUL,0BAAkB;AAChB,kBAAM,CAAC,MAAD,EAAS,MAAT,CADU;AAEhB,qBAAS;AAFO,SAVb;AAcL,0BAAkB;AAChB,kBAAM,CAAC,MAAD,EAAS,MAAT,CADU;AAEhB,qBAAS;AAFO,SAdb;AAkBL,mBAAW,OAlBN;AAmBL,eAAO,OAnBF;AAoBL,mBAAW,OApBN;AAqBL,mBAAW,OArBN;AAsBL,mBAAW,OAtBN;AAuBL,eAAO;AACL,kBAAM,CAAC,MAAD,EAAS,MAAT,CADD;AAEL,qBAAS;AAFJ,SAvBF;AA2BL,eAAO,EAAE,UAAU,KAAZ;AA3BF,KATA;AAuCP,UAAM;AAAA,eAAO;AACX,sBAAU,KADC;AAEX,uBAAW;AACT,sBAAM,CADG;AAET,uBAAO;AAFE;AAFA,SAAP;AAAA,KAvCC;AA+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,SAAS,WAAT,CAAqB,UAArB,CAApB;AACA,gCAAY,WAAZ,CAAwB,QAAxB,EAAkC,IAAlC,EAAwC,KAAxC,EAA+C,MAA/C,EAAuD,CAAvD;AACA,2BAAO,aAAP,CAAqB,WAArB;AACD;AAdC;AAJO,SAAb;AAsBA,eAAO,EAAE,OAAF,EAAW,IAAX,EAAiB,CACtB,KAAK,MAAL,CAAY,OADU,EAEtB,EAAE,KAAF,EAAS,EAAE,SAAS,6BAAX,EAAT,CAFsB,CAAjB,CAAP;AAID;AAjUM,CAXM,C","sourcesContent":["// Styles\nimport '../../stylus/components/_navigation-drawer.styl'\n\n// Mixins\nimport Applicationable from '../../mixins/applicationable'\nimport Dependent from '../../mixins/dependent'\nimport Overlayable from '../../mixins/overlayable'\nimport SSRBootable from '../../mixins/ssr-bootable'\nimport Themeable from '../../mixins/themeable'\n\n// Directives\nimport ClickOutside from '../../directives/click-outside'\nimport Resize from '../../directives/resize'\nimport Touch, { TouchWrapper } from '../../directives/touch'\n\n// Utilities\nimport { convertToUnit } from '../../util/helpers'\nimport mixins from '../../util/mixins'\n\n// TYpes\nimport { VNode } from 'vue/types/vnode'\nimport { PropValidator } from 'vue/types/options'\n\nexport default mixins(\n Applicationable('left', [\n 'miniVariant',\n 'right',\n 'width'\n ]),\n Dependent,\n Overlayable,\n SSRBootable,\n Themeable\n/* @vue/component */\n).extend({\n name: 'v-navigation-drawer',\n\n directives: {\n ClickOutside,\n Resize,\n Touch\n },\n\n props: {\n clipped: Boolean,\n disableRouteWatcher: Boolean,\n disableResizeWatcher: Boolean,\n height: {\n type: [Number, String],\n default: '100%'\n },\n floating: Boolean,\n miniVariant: Boolean,\n miniVariantWidth: {\n type: [Number, String],\n default: 80\n },\n mobileBreakPoint: {\n type: [Number, String],\n default: 1264\n },\n permanent: Boolean,\n right: Boolean,\n stateless: Boolean,\n temporary: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 300\n },\n value: { required: false } as PropValidator<any>\n },\n\n data: () => ({\n isActive: false,\n touchArea: {\n left: 0,\n right: 0\n }\n }),\n\n computed: {\n /**\n * Used for setting an app value from a dynamic\n * property. Called from applicationable.js\n */\n applicationProperty (): string {\n return this.right ? 'right' : 'left'\n },\n calculatedTransform (): number {\n if (this.isActive) return 0\n\n return this.right\n ? this.calculatedWidth\n : -this.calculatedWidth\n },\n calculatedWidth (): number {\n return parseInt(\n this.miniVariant\n ? this.miniVariantWidth\n : this.width\n )\n },\n classes (): object {\n return {\n 'v-navigation-drawer': true,\n 'v-navigation-drawer--absolute': this.absolute,\n 'v-navigation-drawer--clipped': this.clipped,\n 'v-navigation-drawer--close': !this.isActive,\n 'v-navigation-drawer--fixed': !this.absolute && (this.app || this.fixed),\n 'v-navigation-drawer--floating': this.floating,\n 'v-navigation-drawer--is-mobile': this.isMobile,\n 'v-navigation-drawer--mini-variant': this.miniVariant,\n 'v-navigation-drawer--open': this.isActive,\n 'v-navigation-drawer--right': this.right,\n 'v-navigation-drawer--temporary': this.temporary,\n ...this.themeClasses\n }\n },\n hasApp (): boolean {\n return this.app &&\n (!this.isMobile && !this.temporary)\n },\n isMobile (): boolean {\n return !this.stateless &&\n !this.permanent &&\n !this.temporary &&\n this.$vuetify.breakpoint.width < parseInt(this.mobileBreakPoint, 10)\n },\n marginTop (): number {\n if (!this.hasApp) return 0\n\n let marginTop = this.$vuetify.application.bar\n\n marginTop += this.clipped\n ? this.$vuetify.application.top\n : 0\n\n return marginTop\n },\n maxHeight (): number | null {\n if (!this.hasApp) return null\n\n const maxHeight = (\n this.$vuetify.application.bottom +\n this.$vuetify.application.footer +\n this.$vuetify.application.bar\n )\n\n if (!this.clipped) return maxHeight\n\n return maxHeight + this.$vuetify.application.top\n },\n reactsToClick (): boolean {\n return !this.stateless &&\n !this.permanent &&\n (this.isMobile || this.temporary)\n },\n reactsToMobile (): boolean {\n return !this.disableResizeWatcher &&\n !this.stateless &&\n !this.permanent &&\n !this.temporary\n },\n reactsToRoute (): boolean {\n return !this.disableRouteWatcher &&\n !this.stateless &&\n (this.temporary || this.isMobile)\n },\n resizeIsDisabled (): boolean {\n return this.disableResizeWatcher || this.stateless\n },\n showOverlay (): boolean {\n return this.isActive &&\n (this.isMobile || this.temporary)\n },\n styles (): object {\n const styles = {\n height: convertToUnit(this.height),\n marginTop: `${this.marginTop}px`,\n maxHeight: this.maxHeight != null ? `calc(100% - ${+this.maxHeight}px)` : undefined,\n transform: `translateX(${this.calculatedTransform}px)`,\n width: `${this.calculatedWidth}px`\n }\n\n return styles\n }\n },\n\n watch: {\n $route () {\n if (this.reactsToRoute && this.closeConditional()) {\n this.isActive = false\n }\n },\n isActive (val) {\n this.$emit('input', val)\n this.callUpdate()\n },\n /**\n * When mobile changes, adjust the active state\n * only when there has been a previous value\n */\n isMobile (val, prev) {\n !val &&\n this.isActive &&\n !this.temporary &&\n this.removeOverlay()\n\n if (prev == null ||\n this.resizeIsDisabled ||\n !this.reactsToMobile\n ) return\n\n this.isActive = !val\n this.callUpdate()\n },\n permanent (val) {\n // If enabling prop enable the drawer\n if (val) {\n this.isActive = true\n }\n this.callUpdate()\n },\n showOverlay (val) {\n if (val) this.genOverlay()\n else this.removeOverlay()\n },\n temporary () {\n this.callUpdate()\n },\n value (val) {\n if (this.permanent) return\n\n // TODO: referring to this directly causes type errors\n // all over the place for some reason\n const _this = this as any\n if (val == null) return _this.init()\n\n if (val !== this.isActive) this.isActive = val\n }\n },\n\n beforeMount () {\n this.init()\n },\n\n methods: {\n calculateTouchArea () {\n if (!this.$el.parentNode) return\n const parentRect = (this.$el.parentNode as Element).getBoundingClientRect()\n\n this.touchArea = {\n left: parentRect.left + 50,\n right: parentRect.right - 50\n }\n },\n closeConditional () {\n return this.isActive && this.reactsToClick\n },\n genDirectives () {\n const directives = [{\n name: 'click-outside',\n value: () => (this.isActive = false),\n args: {\n closeConditional: this.closeConditional,\n include: this.getOpenDependentElements\n }\n }]\n\n !this.touchless && directives.push({\n name: 'touch',\n value: {\n parent: true,\n left: this.swipeLeft,\n right: this.swipeRight\n }\n } as any)\n\n return directives\n },\n /**\n * Sets state before mount to avoid\n * entry transitions in SSR\n */\n init () {\n if (this.permanent) {\n this.isActive = true\n } else if (this.stateless ||\n this.value != null\n ) {\n this.isActive = this.value\n } else if (!this.temporary) {\n this.isActive = !this.isMobile\n }\n },\n swipeRight (e: TouchWrapper) {\n if (this.isActive && !this.right) return\n this.calculateTouchArea()\n\n if (Math.abs(e.touchendX - e.touchstartX) < 100) return\n if (!this.right &&\n e.touchstartX <= this.touchArea.left\n ) this.isActive = true\n else if (this.right && this.isActive) this.isActive = false\n },\n swipeLeft (e: TouchWrapper) {\n if (this.isActive && this.right) return\n this.calculateTouchArea()\n\n if (Math.abs(e.touchendX - e.touchstartX) < 100) return\n if (this.right &&\n e.touchstartX >= this.touchArea.right\n ) this.isActive = true\n else if (!this.right && this.isActive) this.isActive = false\n },\n /**\n * Update the application layout\n */\n updateApplication () {\n return !this.isActive ||\n this.temporary ||\n this.isMobile\n ? 0\n : this.calculatedWidth\n }\n },\n\n render (h): VNode {\n const data = {\n 'class': this.classes,\n style: this.styles,\n directives: this.genDirectives(),\n on: {\n click: () => {\n if (!this.miniVariant) return\n\n this.$emit('update:miniVariant', false)\n },\n transitionend: (e: Event) => {\n if (e.target !== e.currentTarget) return\n this.$emit('transitionend', e)\n\n // IE11 does not support new Event('resize')\n const resizeEvent = document.createEvent('UIEvents')\n resizeEvent.initUIEvent('resize', true, false, window, 0)\n window.dispatchEvent(resizeEvent)\n }\n }\n }\n\n return h('aside', data, [\n this.$slots.default,\n h('div', { 'class': 'v-navigation-drawer__border' })\n ])\n }\n})\n"],"sourceRoot":""}