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/es5/components/VTabs/VTabs.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
15 KiB
Text

{"version":3,"sources":["../../../src/components/VTabs/VTabs.ts"],"names":[],"mappings":";;;;;;;AACA;;AAGA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AAGA;;AAGA;;AAEA;;;;;;;;;;AAKA,IAAM,UAAU,GAAG,qBACjB,kBADiB,EAEjB,kBAFiB,EAGjB,kBAHiB,CAAnB;;eAYe,UAAU,CAAC,MAAX,GAA6B,MAA7B,CAAoC;AACjD,EAAA,IAAI,EAAE,QAD2C;AAGjD,EAAA,UAAU,EAAE;AACV,IAAA,MAAM,EAAN;AADU,GAHqC;AAOjD,EAAA,KAAK,EAAE;AACL,IAAA,WAAW,EAAE;AACX,MAAA,IAAI,EAAE,MADK;AAEX,MAAA,OAAO,EAAE;AAFE,KADR;AAKL,IAAA,cAAc,EAAE,OALX;AAML,IAAA,eAAe,EAAE,MANZ;AAOL,IAAA,YAAY,EAAE,OAPT;AAQL,IAAA,QAAQ,EAAE,OARL;AASL,IAAA,SAAS,EAAE,OATN;AAUL,IAAA,IAAI,EAAE,OAVD;AAWL,IAAA,MAAM,EAAE;AACN,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADA;AAEN,MAAA,OAAO,EAAE;AAFH,KAXH;AAeL,IAAA,UAAU,EAAE,OAfP;AAgBL,IAAA,YAAY,EAAE,OAhBT;AAiBL,IAAA,gBAAgB,EAAE;AAChB,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADU;AAEhB,MAAA,OAAO,EAAE;AAFO,KAjBb;AAqBL,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,MADE;AAER,MAAA,OAAO,EAAE;AAFD,KArBL;AAyBL,IAAA,QAAQ,EAAE,OAzBL;AA0BL,IAAA,QAAQ,EAAE;AACR,MAAA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ACjB;AACF;;AACA;AAAS,cAAA,GAAG,CAAC,IAAJ,CAAS,KAAT;AARX;AAUD,SAXD,MAWO;AACL,UAAA,GAAG,CAAC,IAAJ,CAAS,KAAT;AACD;AACF;AAED;;;;;;;;AAMA,aAAO;AAAE,QAAA,GAAG,EAAH,GAAF;AAAO,QAAA,MAAM,EAAN,MAAP;AAAe,QAAA,KAAK,EAAL,KAAf;AAAsB,QAAA,IAAI,EAAJ;AAAtB,OAAP;AACD;AA7IM,GAlHwC;AAkQjD,EAAA,MAlQiD,kBAkQzC,CAlQyC,EAkQxC;AAAA,2BAC8B,KAAK,UAAL,EAD9B;AAAA,QACC,GADD,oBACC,GADD;AAAA,QACM,MADN,oBACM,MADN;AAAA,QACc,KADd,oBACc,KADd;AAAA,QACqB,IADrB,oBACqB,IADrB;;AAGP,WAAO,CAAC,CAAC,KAAD,EAAQ;AACd,MAAA,WAAW,EAAE,QADC;AAEd,MAAA,KAAK,EAAE,KAAK,OAFE;AAGd,MAAA,UAAU,EAAE,CAAC;AACX,QAAA,IAAI,EAAE,QADK;AAEX,QAAA,SAAS,EAAE;AAAE,UAAA,KAAK,EAAE;AAAT,SAFA;AAGX,QAAA,KAAK,EAAE,KAAK;AAHD,OAAD;AAHE,KAAR,EAQL,CACD,KAAK,MAAL,CAAY,GAAZ,EAAiB,MAAjB,CADC,EAED,KAAK,QAAL,CAAc,KAAd,EAAqB,IAArB,CAFC,CARK,CAAR;AAYD;AAjRgD,CAApC,C","sourcesContent":["// Styles\nimport './VTabs.sass'\n\n// Components\nimport VTabsBar from './VTabsBar'\nimport VTabsItems from './VTabsItems'\nimport VTabsSlider from './VTabsSlider'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Proxyable from '../../mixins/proxyable'\nimport Themeable from '../../mixins/themeable'\n\n// Directives\nimport Resize from '../../directives/resize'\n\n// Utilities\nimport { convertToUnit } from '../../util/helpers'\nimport { ExtractVue } from './../../util/mixins'\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue/types'\n\nconst baseMixins = mixins(\n Colorable,\n Proxyable,\n Themeable\n)\n\ninterface options extends ExtractVue<typeof baseMixins> {\n $refs: {\n items: InstanceType<typeof VTabsBar>\n }\n}\n\nexport default baseMixins.extend<options>().extend({\n name: 'v-tabs',\n\n directives: {\n Resize,\n },\n\n props: {\n activeClass: {\n type: String,\n default: '',\n },\n alignWithTitle: Boolean,\n backgroundColor: String,\n centerActive: Boolean,\n centered: Boolean,\n fixedTabs: Boolean,\n grow: Boolean,\n height: {\n type: [Number, String],\n default: undefined,\n },\n hideSlider: Boolean,\n iconsAndText: Boolean,\n mobileBreakPoint: {\n type: [Number, String],\n default: 1264,\n },\n nextIcon: {\n type: String,\n default: '$vuetify.icons.next',\n },\n optional: Boolean,\n prevIcon: {\n type: String,\n default: '$vuetify.icons.prev',\n },\n right: Boolean,\n showArrows: Boolean,\n sliderColor: String,\n sliderSize: {\n type: [Number, String],\n default: 2,\n },\n vertical: Boolean,\n },\n\n data () {\n return {\n resizeTimeout: 0,\n slider: {\n height: null as null | number,\n left: null as null | number,\n right: null as null | number,\n top: null as null | number,\n width: null as null | number,\n },\n transitionTime: 300,\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-tabs--align-with-title': this.alignWithTitle,\n 'v-tabs--centered': this.centered,\n 'v-tabs--fixed-tabs': this.fixedTabs,\n 'v-tabs--grow': this.grow,\n 'v-tabs--icons-and-text': this.iconsAndText,\n 'v-tabs--right': this.right,\n 'v-tabs--vertical': this.vertical,\n ...this.themeClasses,\n }\n },\n isReversed (): boolean {\n return this.$vuetify.rtl && this.vertical\n },\n sliderStyles (): object {\n return {\n height: convertToUnit(this.slider.height),\n left: this.isReversed ? undefined : convertToUnit(this.slider.left),\n right: this.isReversed ? convertToUnit(this.slider.right) : undefined,\n top: this.vertical ? convertToUnit(this.slider.top) : undefined,\n transition: this.slider.left != null ? null : 'none',\n width: convertToUnit(this.slider.width),\n }\n },\n computedColor (): string {\n if (this.color) return this.color\n else if (this.isDark && !this.appIsDark) return 'white'\n else return 'primary'\n },\n },\n\n watch: {\n alignWithTitle: 'callSlider',\n centered: 'callSlider',\n centerActive: 'callSlider',\n fixedTabs: 'callSlider',\n grow: 'callSlider',\n right: 'callSlider',\n showArrows: 'callSlider',\n vertical: 'callSlider',\n '$vuetify.application.left': 'onResize',\n '$vuetify.application.right': 'onResize',\n '$vuetify.rtl': 'onResize',\n },\n\n mounted () {\n this.$nextTick(() => {\n window.setTimeout(this.callSlider, 30)\n })\n },\n\n methods: {\n callSlider () {\n if (\n this.hideSlider ||\n !this.$refs.items ||\n !this.$refs.items.selectedItems.length\n ) {\n this.slider.width = 0\n return false\n }\n\n this.$nextTick(() => {\n // Give screen time to paint\n const activeTab = this.$refs.items.selectedItems[0]\n /* istanbul ignore if */\n if (!activeTab || !activeTab.$el) {\n this.slider.width = 0\n this.slider.left = 0\n return\n }\n const el = activeTab.$el as HTMLElement\n\n this.slider = {\n height: !this.vertical ? Number(this.sliderSize) : el.scrollHeight,\n left: this.vertical ? 0 : el.offsetLeft,\n right: this.vertical ? 0 : el.offsetLeft + el.offsetWidth,\n top: el.offsetTop,\n width: this.vertical ? Number(this.sliderSize) : el.scrollWidth,\n }\n })\n\n return true\n },\n genBar (items: VNode[], slider: VNode | null) {\n const data = {\n style: {\n height: convertToUnit(this.height),\n },\n props: {\n activeClass: this.activeClass,\n centerActive: this.centerActive,\n dark: this.dark,\n light: this.light,\n mandatory: !this.optional,\n mobileBreakPoint: this.mobileBreakPoint,\n nextIcon: this.nextIcon,\n prevIcon: this.prevIcon,\n showArrows: this.showArrows,\n value: this.internalValue,\n },\n on: {\n 'call:slider': this.callSlider,\n change: (val: any) => {\n this.internalValue = val\n },\n },\n ref: 'items',\n }\n\n this.setTextColor(this.computedColor, data)\n this.setBackgroundColor(this.backgroundColor, data)\n\n return this.$createElement(VTabsBar, data, [\n this.genSlider(slider),\n items,\n ])\n },\n genItems (items: VNode | null, item: VNode[]) {\n // If user provides items\n // opt to use theirs\n if (items) return items\n\n // If no tabs are provided\n // render nothing\n if (!item.length) return null\n\n return this.$createElement(VTabsItems, {\n props: {\n value: this.internalValue,\n },\n on: {\n change: (val: any) => {\n this.internalValue = val\n },\n },\n }, item)\n },\n genSlider (slider: VNode | null) {\n if (this.hideSlider) return null\n\n if (!slider) {\n slider = this.$createElement(VTabsSlider, {\n props: { color: this.sliderColor },\n })\n }\n\n return this.$createElement('div', {\n staticClass: 'v-tabs-slider-wrapper',\n style: this.sliderStyles,\n }, [slider])\n },\n onResize () {\n if (this._isDestroyed) return\n\n clearTimeout(this.resizeTimeout)\n this.resizeTimeout = window.setTimeout(this.callSlider, 0)\n },\n parseNodes () {\n let items = null\n let slider = null\n const item = []\n const tab = []\n const slot = this.$slots.default || []\n const length = slot.length\n\n for (let i = 0; i < length; i++) {\n const vnode = slot[i]\n\n if (vnode.componentOptions) {\n switch (vnode.componentOptions.Ctor.options.name) {\n case 'v-tabs-slider': slider = vnode\n break\n case 'v-tabs-items': items = vnode\n break\n case 'v-tab-item': item.push(vnode)\n break\n // case 'v-tab' - intentionally omitted\n default: tab.push(vnode)\n }\n } else {\n tab.push(vnode)\n }\n }\n\n /**\n * tab: array of `v-tab`\n * slider: single `v-tabs-slider`\n * items: single `v-tabs-items`\n * item: array of `v-tab-item`\n */\n return { tab, slider, items, item }\n },\n },\n\n render (h): VNode {\n const { tab, slider, items, item } = this.parseNodes()\n\n return h('div', {\n staticClass: 'v-tabs',\n class: this.classes,\n directives: [{\n name: 'resize',\n modifiers: { quiet: true },\n value: this.onResize,\n }],\n }, [\n this.genBar(tab, slider),\n this.genItems(items, item),\n ])\n },\n})\n"],"sourceRoot":"","file":"VTabs.js"}