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

1 line
No EOL
19 KiB
Text

{"version":3,"sources":["../../../src/components/VSlideGroup/VSlideGroup.ts"],"names":[],"mappings":";;;;;;;AACA;;AAGA;;AACA;;AAGA;;AAGA;;AACA;;AAGA;;;;;;;;;;AAuBO,IAAM,cAAc,GAAG,qBAK5B;AACA;AAN4B,EAO5B,MAP4B,CAOrB;AACP,EAAA,IAAI,EAAE,kBADC;AAGP,EAAA,UAAU,EAAE;AACV,IAAA,MAAM,EAAN,eADU;AAEV,IAAA,KAAK,EAAL;AAFU,GAHL;AAQP,EAAA,KAAK,EAAE;AACL,IAAA,WAAW,EAAE;AACX,MAAA,IAAI,EAAE,MADK;AAEX,MAAA,OAAO,EAAE;AAFE,KADR;AAKL,IAAA,YAAY,EAAE,OALT;AAML,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,MADE;AAER,MAAA,OAAO,EAAE;AAFD,KANL;AAUL,IAAA,gBAAgB,EAAE;AAChB,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADU;AAEhB,MAAA,OAAO,EAAE,IAFO;AAGhB,MAAA,SAAS,EAAE,mBAAC,CAAD;AAAA,eAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAD,CAAT,CAAlB;AAAA;AAHK,KAVb;AAeL,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,MADE;AAER,MAAA,OAAO,EAAE;AAFD,KAfL;AAmBL,IAAA,UAAU,EAAE;AAnBP,GARA;AA8BP,EAAA,IAAI,EAAE;AAAA,WAAO;AACX,MAAA,aAAa,EAAE,KADJ;AAEX,MAAA,aAAa,EAAE,CAFJ;AAGX,MAAA,MAAM,EAAE,CAHG;AAIX,MAAA,YAAY,EAAE,CAJH;AAKX,MAAA,MAAM,EAAE;AACN,QAAA,OAA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MM;AAwMP,IAAA;AAAU;AAxMH,2BAwM6B;AAAA;;AAClC,MAAA,MAAM,CAAC,qBAAP,CAA6B,YAAK;AAAA,2BACH,MAAI,CAAC,KADF;AAAA,YACxB,OADwB,gBACxB,OADwB;AAAA,YACf,OADe,gBACf,OADe;AAGhC,QAAA,MAAI,CAAC,MAAL,GAAc;AACZ,UAAA,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAX,GAAyB,CAD7B;AAEZ,UAAA,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAX,GAAyB;AAF7B,SAAd;AAKA,QAAA,MAAI,CAAC,aAAL,GAAqB,MAAI,CAAC,MAAL,CAAY,OAAZ,GAAsB,MAAI,CAAC,MAAL,CAAY,OAAvD;;AAEA,QAAA,MAAI,CAAC,cAAL;AACD,OAXD;AAYD;AArNM,GAvFF;AA+SP,EAAA,MA/SO,kBA+SC,CA/SD,EA+SE;AACP,WAAO,CAAC,CAAC,KAAD,EAAQ,KAAK,OAAL,EAAR,EAAwB,CAC9B,KAAK,OAAL,EAD8B,EAE9B,KAAK,UAAL,EAF8B,EAG9B,KAAK,OAAL,EAH8B,CAAxB,CAAR;AAKD;AArTM,CAPqB,CAAvB;;;eA+TQ,cAAc,CAAC,MAAf,CAAsB;AACnC,EAAA,IAAI,EAAE,eAD6B;AAGnC,EAAA,OAHmC,qBAG5B;AACL,WAAO;AACL,MAAA,UAAU,EAAE;AADP,KAAP;AAGD;AAPkC,CAAtB,C","sourcesContent":["// Styles\nimport './VSlideGroup.sass'\n\n// Components\nimport VIcon from '../VIcon'\nimport { VFadeTransition } from '../transitions'\n\n// Extensions\nimport { BaseItemGroup } from '../VItemGroup/VItemGroup'\n\n// Directives\nimport Resize from '../../directives/resize'\nimport Touch from '../../directives/touch'\n\n// Utilities\nimport mixins, { ExtractVue } from '../../util/mixins'\n\n// Types\nimport Vue, { VNode } from 'vue'\n\ninterface TouchEvent {\n touchstartX: number\n touchmoveX: number\n stopPropagation: Function\n}\n\ninterface Widths {\n content: number\n wrapper: number\n}\n\ninterface options extends Vue {\n $refs: {\n content: HTMLElement\n wrapper: HTMLElement\n }\n}\n\nexport const BaseSlideGroup = mixins<options &\n/* eslint-disable indent */\n ExtractVue<typeof BaseItemGroup>\n/* eslint-enable indent */\n>(\n BaseItemGroup\n /* @vue/component */\n).extend({\n name: 'base-slide-group',\n\n directives: {\n Resize,\n Touch,\n },\n\n props: {\n activeClass: {\n type: String,\n default: 'v-slide-item--active',\n },\n centerActive: Boolean,\n nextIcon: {\n type: String,\n default: '$vuetify.icons.next',\n },\n mobileBreakPoint: {\n type: [Number, String],\n default: 1264,\n validator: (v: any) => !isNaN(parseInt(v)),\n },\n prevIcon: {\n type: String,\n default: '$vuetify.icons.prev',\n },\n showArrows: Boolean,\n },\n\n data: () => ({\n isOverflowing: false,\n resizeTimeout: 0,\n startX: 0,\n scrollOffset: 0,\n widths: {\n content: 0,\n wrapper: 0,\n },\n }),\n\n computed: {\n __cachedNext (): VNode {\n return this.genTransition('next')\n },\n __cachedPrev (): VNode {\n return this.genTransition('prev')\n },\n classes (): object {\n return {\n ...BaseItemGroup.options.computed.classes.call(this),\n 'v-slide-group': true,\n }\n },\n hasAffixes (): Boolean {\n return (\n (this.showArrows || !this.isMobile) &&\n this.isOverflowing\n )\n },\n hasNext (): boolean {\n if (!this.hasAffixes) return false\n\n const { content, wrapper } = this.widths\n\n // Check one scroll ahead to know the width of right-most item\n return content > Math.abs(this.scrollOffset) + wrapper\n },\n hasPrev (): boolean {\n return this.hasAffixes && this.scrollOffset !== 0\n },\n isMobile (): boolean {\n return this.$vuetify.breakpoint.width < this.mobileBreakPoint\n },\n },\n\n watch: {\n internalValue: 'setWidths',\n // When overflow changes, the arrows alter\n // the widths of the content and wrapper\n // and need to be recalculated\n isOverflowing: 'setWidths',\n scrollOffset (val) {\n this.$refs.content.style.transform = `translateX(${-val}px)`\n },\n },\n\n methods: {\n genNext (): VNode | null {\n if (!this.hasAffixes) return null\n\n const slot = this.$scopedSlots.next\n ? this.$scopedSlots.next({})\n : this.$slots.next || this.__cachedNext\n\n return this.$createElement('div', {\n staticClass: 'v-slide-group__next',\n class: {\n 'v-slide-group__next--disabled': !this.hasNext,\n },\n on: {\n click: () => this.onAffixClick('next'),\n },\n key: 'next',\n }, [slot])\n },\n genContent (): VNode {\n return this.$createElement('div', {\n staticClass: 'v-slide-group__content',\n ref: 'content',\n }, this.$slots.default)\n },\n genData (): object {\n return {\n class: this.classes,\n directives: [{\n name: 'resize',\n value: this.onResize,\n }],\n }\n },\n genIcon (location: 'prev' | 'next'): VNode | null {\n let icon = location\n\n if (this.$vuetify.rtl && location === 'prev') {\n icon = 'next'\n } else if (this.$vuetify.rtl && location === 'next') {\n icon = 'prev'\n }\n\n const upperLocation = `${location[0].toUpperCase()}${location.slice(1)}`\n const hasAffix = (this as any)[`has${upperLocation}`]\n\n if (\n !this.showArrows &&\n !hasAffix\n ) return null\n\n return this.$createElement(VIcon, {\n props: {\n disabled: !hasAffix,\n },\n }, (this as any)[`${icon}Icon`])\n },\n genPrev (): VNode | null {\n if (!this.hasAffixes) return null\n\n const slot = this.$scopedSlots.prev\n ? this.$scopedSlots.prev({})\n : this.$slots.prev || this.__cachedPrev\n\n return this.$createElement('div', {\n staticClass: 'v-slide-group__prev',\n class: {\n 'v-slide-group__prev--disabled': !this.hasPrev,\n },\n on: {\n click: () => this.onAffixClick('prev'),\n },\n key: 'prev',\n }, [slot])\n },\n genTransition (location: 'prev' | 'next') {\n return this.$createElement(VFadeTransition, [this.genIcon(location)])\n },\n genWrapper (): VNode {\n return this.$createElement('div', {\n staticClass: 'v-slide-group__wrapper',\n directives: [{\n name: 'touch',\n value: {\n start: (e: TouchEvent) => this.overflowCheck(e, this.onTouchStart),\n move: (e: TouchEvent) => this.overflowCheck(e, this.onTouchMove),\n end: (e: TouchEvent) => this.overflowCheck(e, this.onTouchEnd),\n },\n }],\n ref: 'wrapper',\n }, [this.genContent()])\n },\n calculateNewOffset (direction: 'prev' | 'next', widths: Widths, rtl: boolean, currentScrollOffset: number) {\n const sign = rtl ? -1 : 1\n const newAbosluteOffset = sign * currentScrollOffset +\n (direction === 'prev' ? -1 : 1) * widths.wrapper\n\n return sign * Math.max(Math.min(newAbosluteOffset, widths.content - widths.wrapper), 0)\n },\n onAffixClick (location: 'prev' | 'next') {\n this.$emit(`click:${location}`)\n this.scrollTo(location)\n },\n onResize () {\n /* istanbul ignore next */\n if (this._isDestroyed) return\n\n this.setWidths()\n },\n onTouchStart (e: TouchEvent) {\n const { content } = this.$refs\n\n this.startX = this.scrollOffset + e.touchstartX as number\n\n content.style.setProperty('transition', 'none')\n content.style.setProperty('willChange', 'transform')\n },\n onTouchMove (e: TouchEvent) {\n this.scrollOffset = this.startX - e.touchmoveX\n },\n onTouchEnd () {\n const { content, wrapper } = this.$refs\n const maxScrollOffset = content.clientWidth - wrapper.clientWidth\n\n content.style.setProperty('transition', null)\n content.style.setProperty('willChange', null)\n\n /* istanbul ignore else */\n if (this.scrollOffset < 0 || !this.isOverflowing) {\n this.scrollOffset = 0\n } else if (this.scrollOffset >= maxScrollOffset) {\n this.scrollOffset = maxScrollOffset\n }\n },\n overflowCheck (e: TouchEvent, fn: (e: TouchEvent) => void) {\n e.stopPropagation()\n this.isOverflowing && fn(e)\n },\n scrollIntoView /* istanbul ignore next */ () {\n if (!this.selectedItem) {\n return\n }\n\n if (this.centerActive) {\n this.scrollOffset = this.calculateCenteredOffset(\n this.selectedItem.$el as HTMLElement,\n this.widths,\n this.$vuetify.rtl\n )\n } else if (this.isOverflowing) {\n this.scrollOffset = this.calculateUpdatedOffset(\n this.selectedItem.$el as HTMLElement,\n this.widths,\n this.$vuetify.rtl,\n this.scrollOffset\n )\n } else {\n this.scrollOffset = 0\n }\n },\n calculateUpdatedOffset (selectedElement: HTMLElement, widths: Widths, rtl: boolean, currentScrollOffset: number): number {\n const clientWidth = selectedElement.clientWidth\n const offsetLeft = rtl\n ? (widths.content - selectedElement.offsetLeft - clientWidth)\n : selectedElement.offsetLeft\n\n if (rtl) {\n currentScrollOffset = -currentScrollOffset\n }\n\n const totalWidth = widths.wrapper + currentScrollOffset\n const itemOffset = clientWidth + offsetLeft\n const additionalOffset = clientWidth * 0.3\n\n if (offsetLeft < currentScrollOffset) {\n currentScrollOffset = Math.max(offsetLeft - additionalOffset, 0)\n } else if (totalWidth < itemOffset) {\n currentScrollOffset = Math.min(currentScrollOffset - (totalWidth - itemOffset - additionalOffset), widths.content - widths.wrapper)\n }\n\n return rtl ? -currentScrollOffset : currentScrollOffset\n },\n calculateCenteredOffset (selectedElement: HTMLElement, widths: Widths, rtl: boolean): number {\n const { offsetLeft, clientWidth } = selectedElement\n\n if (rtl) {\n const offsetCentered = widths.content - offsetLeft - clientWidth / 2 - widths.wrapper / 2\n return -Math.min(widths.content - widths.wrapper, Math.max(0, offsetCentered))\n } else {\n const offsetCentered = offsetLeft + clientWidth / 2 - widths.wrapper / 2\n return Math.min(widths.content - widths.wrapper, Math.max(0, offsetCentered))\n }\n },\n scrollTo /* istanbul ignore next */ (location: 'prev' | 'next') {\n this.scrollOffset = this.calculateNewOffset(location, {\n // Force reflow\n content: this.$refs.content ? this.$refs.content.clientWidth : 0,\n wrapper: this.$refs.wrapper ? this.$refs.wrapper.clientWidth : 0,\n }, this.$vuetify.rtl, this.scrollOffset)\n },\n setWidths /* istanbul ignore next */ () {\n window.requestAnimationFrame(() => {\n const { content, wrapper } = this.$refs\n\n this.widths = {\n content: content ? content.clientWidth : 0,\n wrapper: wrapper ? wrapper.clientWidth : 0,\n }\n\n this.isOverflowing = this.widths.wrapper < this.widths.content\n\n this.scrollIntoView()\n })\n },\n },\n\n render (h): VNode {\n return h('div', this.genData(), [\n this.genPrev(),\n this.genWrapper(),\n this.genNext(),\n ])\n },\n})\n\nexport default BaseSlideGroup.extend({\n name: 'v-slide-group',\n\n provide (): object {\n return {\n slideGroup: this,\n }\n },\n})\n"],"sourceRoot":"","file":"VSlideGroup.js"}