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.

VStepperContent.js.map 6.4KB

1
  1. {"version":3,"sources":["../../../src/components/VStepper/VStepperContent.ts"],"names":[],"mappings":";;;;;;AACA;;AAMA;;AAGA;;AAGA;;;;;;AAJA;;kBAgBe,sBAOb,yBAAkB,SAAlB,EAA6B,mBAA7B,EAAkD,WAAlD;AACF;AARe,EASb,MATa,CASN;AACP,UAAM,mBADC;AAGP,YAAQ;AACN,4BAAoB;AAClB,kBAAM;AADY;AADd,KAHD;AASP,WAAO;AACL,cAAM;AACJ,kBAAM,CAAC,MAAD,EAAS,MAAT,CADF;AAEJ,sBAAU;AAFN;AADD,KATA;AAgBP,QAhBO,kBAgBH;AACF,eAAO;AACL,oBAAQ,CADH;AAEL;AACA;AACA,sBAAU,IAJL;AAKL,uBAAW,KALN;AAML,wBAAY,KAAK;AANZ,SAAP;AAQD,KAzBM;;AA2BP,cAAU;AACR,eADQ,qBACD;AACL,mBAAO;AACL,sCAAsB;AADjB,aAAP;AAGD,SALO;AAMR,0BANQ,gCAMU;AAChB,mBAAO,KAAK,SAAL,GACH,kCADG,GAEH,2BAFJ;AAGD,SAVO;AAWR,cAXQ,oBAWF;AACJ,gBAAI,CAAC,KAAK,UAAV,EAAsB,OAAO,EAAP;AAEtB,mBAAO;AACL,wBAAQ,4BAAc,KAAK,MAAnB;AADH,aAAP;AAGD,SAjBO;AAkBR,sBAlBQ,4BAkBM;AACZ,mBAAO;AACL,sCAAsB;AADjB,aAAP;AAGD;AAtBO,KA3BH;AAoDP,WAAO;AACL,gBADK,oBACK,OADL,EACc,QADd,EACsB;AACzB;AACA;AACA,gBAAI,WAAW,YAAY,IAA3B,EAAiC;AAC/B,qBAAK,MAAL,GAAc,MAAd;AACA;AACD;AAED,gBAAI,CAAC,KAAK,UAAV,EAAsB;AAEtB,gBAAI,KAAK,QAAT,EAAmB,KAAK,KAAL,GAAnB,KACK,KAAK,K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C,CArHD,EAqHE;AACP,YAAM,cAAyB;AAC7B,qBAAS,KAAK;AADe,SAA/B;AAGA,YAAM,cAAc;AAClB,qBAAS,KAAK,cADI;AAElB,mBAAO,KAAK,MAFM;AAGlB,iBAAK;AAHa,SAApB;AAMA,YAAI,CAAC,KAAK,UAAV,EAAsB;AACpB,wBAAY,UAAZ,GAAyB,CAAC;AACxB,sBAAM,MADkB;AAExB,uBAAO,KAAK;AAFY,aAAD,CAAzB;AAID;AAED,YAAM,UAAU,EAAE,KAAF,EAAS,WAAT,EAAsB,CAAC,KAAK,MAAL,CAAY,OAAb,CAAtB,CAAhB;AACA,YAAM,UAAU,EAAE,KAAF,EAAS,WAAT,EAAsB,CAAC,OAAD,CAAtB,CAAhB;AAEA,eAAO,EAAE,KAAK,kBAAP,EAA2B;AAChC,gBAAI,KAAK;AADuB,SAA3B,EAEJ,CAAC,OAAD,CAFI,CAAP;AAGD;AA5IM,CATM,C;AAbf;;AANA","sourcesContent":["// Components\nimport {\n VTabTransition,\n VTabReverseTransition\n} from '../transitions'\n\n// Mixins\nimport { Registrable, inject as RegistrableInject } from '../../mixins/registrable'\n\n// Helpers\nimport { convertToUnit } from '../../util/helpers'\n\n// Util\nimport mixins, { ExtractVue } from '../../util/mixins'\n\n// Types\nimport Vue, { VNode, FunctionalComponentOptions, VNodeData } from 'vue'\n\ninterface options extends Vue {\n $refs: {\n wrapper: HTMLElement\n }\n isVerticalProvided: boolean\n}\n\nexport default mixins<options &\n/* eslint-disable indent */\n ExtractVue<[\n Registrable<'stepper'>\n ]>\n/* eslint-enable indent */\n>(\n RegistrableInject('stepper', 'v-stepper-content', 'v-stepper')\n/* @vue/component */\n).extend({\n name: 'v-stepper-content',\n\n inject: {\n isVerticalProvided: {\n from: 'isVertical'\n }\n },\n\n props: {\n step: {\n type: [Number, String],\n required: true\n }\n },\n\n data () {\n return {\n height: 0 as number | string,\n // Must be null to allow\n // previous comparison\n isActive: null as boolean | null,\n isReverse: false,\n isVertical: this.isVerticalProvided\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-stepper__content': true\n }\n },\n computedTransition (): FunctionalComponentOptions {\n return this.isReverse\n ? VTabReverseTransition\n : VTabTransition\n },\n styles (): object {\n if (!this.isVertical) return {}\n\n return {\n height: convertToUnit(this.height)\n }\n },\n wrapperClasses (): object {\n return {\n 'v-stepper__wrapper': true\n }\n }\n },\n\n watch: {\n isActive (current, previous) {\n // If active and the previous state\n // was null, is just booting up\n if (current && previous == null) {\n this.height = 'auto'\n return\n }\n\n if (!this.isVertical) return\n\n if (this.isActive) this.enter()\n else this.leave()\n }\n },\n\n mounted () {\n this.$refs.wrapper.addEventListener(\n 'transitionend',\n this.onTransition,\n false\n )\n this.stepper && this.stepper.register(this)\n },\n\n beforeDestroy () {\n this.$refs.wrapper.removeEventListener(\n 'transitionend',\n this.onTransition,\n false\n )\n this.stepper && this.stepper.unregister(this)\n },\n\n methods: {\n onTransition (e: TransitionEvent) {\n if (!this.isActive ||\n e.propertyName !== 'height'\n ) return\n\n this.height = 'auto'\n },\n enter () {\n let scrollHeight = 0\n\n // Render bug with height\n requestAnimationFrame(() => {\n scrollHeight = this.$refs.wrapper.scrollHeight\n })\n\n this.height = 0\n\n // Give the collapsing element time to collapse\n setTimeout(() => this.isActive && (this.height = (scrollHeight || 'auto')), 450)\n },\n leave () {\n this.height = this.$refs.wrapper.clientHeight\n setTimeout(() => (this.height = 0), 10)\n },\n toggle (step: string | number, reverse: boolean) {\n this.isActive = step.toString() === this.step.toString()\n this.isReverse = reverse\n }\n },\n\n render (h): VNode {\n const contentData: VNodeData = {\n 'class': this.classes\n }\n const wrapperData = {\n 'class': this.wrapperClasses,\n style: this.styles,\n ref: 'wrapper'\n }\n\n if (!this.isVertical) {\n contentData.directives = [{\n name: 'show',\n value: this.isActive\n }]\n }\n\n const wrapper = h('div', wrapperData, [this.$slots.default])\n const content = h('div', contentData, [wrapper])\n\n return h(this.computedTransition, {\n on: this.$listeners\n }, [content])\n }\n})\n"],"sourceRoot":""}