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

1 line
No EOL
10 KiB
Text

{"version":3,"sources":["../../../src/components/VPagination/VPagination.ts"],"names":[],"mappings":"AAAA,OAAO,sDAAP;AAEA,OAAO,KAAP,MAAkB,UAAlB,C,CAEA;;AACA,OAAO,MAAP,MAAmB,yBAAnB,C,CAEA;;AACA,OAAO,MAAP,MAAmB,mBAAnB;AACA,OAAO,SAAP,MAAsB,wBAAtB;AACA,OAAO,SAAP,MAAsB,wBAAtB;AAKA;;AACA,eAAe,MAAM,CAAC,SAAD,EAAY,SAAZ,CAAN,CAA6B,MAA7B,CAAoC;AACjD,EAAA,IAAI,EAAE,cAD2C;AAGjD,EAAA,UAAU,EAAE;AAAE,IAAA;AAAF,GAHqC;AAKjD,EAAA,KAAK,EAAE;AACL,IAAA,MAAM,EAAE,OADH;AAEL,IAAA,QAAQ,EAAE,OAFL;AAGL,IAAA,MAAM,EAAE;AACN,MAAA,IAAI,EAAE,MADA;AAEN,MAAA,OAAO,EAAE,CAFH;AAGN,MAAA,SAAS,EAAG,GAAD,IAAiB,GAAG,GAAG,CAAN,KAAY;AAHlC,KAHH;AAQL,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,MADE;AAER,MAAA,OAAO,EAAE;AAFD,KARL;AAYL,IAAA,QAAQ,EAAE;AACR,MAAA,IAAI,EAAE,MADE;AAER,MAAA,OAAO,EAAE;AAFD,KAZL;AAgBL,IAAA,YAAY,EAAE,CAAC,MAAD,EAAS,MAAT,CAhBT;AAiBL,IAAA,KAAK,EAAE;AACL,MAAA,IAAI,EAAE,MADD;AAEL,MAAA,OAAO,EAAE;AAFJ;AAjBF,GAL0C;;AA4BjD,EAAA,IAAI,GAAA;AACF,WAAO;AACL,MAAA,UAAU,EAAE,CADP;AAEL,MAAA,QAAQ,EAAE;AAFL,KAAP;AAID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,SAAS,EAAE;AAAE,UAAA,KAAK,EAAE;AAAT,SADA;AAEX,QAAA,IAAI,EAAE,QAFK;AAGX,QAAA,KAAK,EAAE,KAAK;AAHD,OAAD,CADC;AAMb,MAAA,KAAK,EAAE,KAAK;AANC,KAAP,EAOL,QAPK,CAAR;AAQD;;AA/KgD,CAApC,CAAf","sourcesContent":["import './VPagination.sass'\n\nimport VIcon from '../VIcon'\n\n// Directives\nimport Resize from '../../directives/resize'\n\n// Mixins\nimport mixins from '../../util/mixins'\nimport Colorable from '../../mixins/colorable'\nimport Themeable from '../../mixins/themeable'\n\n// Types\nimport { VNode, CreateElement } from 'vue'\n\n/* @vue/component */\nexport default mixins(Colorable, Themeable).extend({\n name: 'v-pagination',\n\n directives: { Resize },\n\n props: {\n circle: Boolean,\n disabled: Boolean,\n length: {\n type: Number,\n default: 0,\n validator: (val: number) => val % 1 === 0,\n },\n nextIcon: {\n type: String,\n default: '$vuetify.icons.next',\n },\n prevIcon: {\n type: String,\n default: '$vuetify.icons.prev',\n },\n totalVisible: [Number, String],\n value: {\n type: Number,\n default: 0,\n },\n },\n\n data () {\n return {\n maxButtons: 0,\n selected: null as number | null,\n }\n },\n\n computed: {\n classes (): object {\n return {\n 'v-pagination': true,\n 'v-pagination--circle': this.circle,\n 'v-pagination--disabled': this.disabled,\n ...this.themeClasses,\n }\n },\n\n items (): (string | number)[] {\n const maxLength = parseInt(this.totalVisible, 10) || this.maxButtons\n if (this.length <= maxLength) {\n return this.range(1, this.length)\n }\n\n const even = maxLength % 2 === 0 ? 1 : 0\n const left = Math.floor(maxLength / 2)\n const right = this.length - left + 1 + even\n\n if (this.value > left && this.value < right) {\n const start = this.value - left + 2\n const end = this.value + left - 2 - even\n\n return [1, '...', ...this.range(start, end), '...', this.length]\n } else if (this.value === left) {\n const end = this.value + left - 1 - even\n return [...this.range(1, end), '...', this.length]\n } else if (this.value === right) {\n const start = this.value - left + 1\n return [1, '...', ...this.range(start, this.length)]\n } else {\n return [\n ...this.range(1, left),\n '...',\n ...this.range(right, this.length),\n ]\n }\n },\n },\n\n watch: {\n value () {\n this.init()\n },\n },\n\n mounted () {\n this.init()\n },\n\n methods: {\n init () {\n this.selected = null\n\n this.$nextTick(this.onResize)\n // TODO: Change this (f75dee3a, cbdf7caa)\n setTimeout(() => (this.selected = this.value), 100)\n },\n onResize () {\n const width = this.$el && this.$el.parentElement\n ? this.$el.parentElement.clientWidth\n : window.innerWidth\n\n this.maxButtons = Math.floor((width - 96) / 42)\n },\n next (e: Event) {\n e.preventDefault()\n this.$emit('input', this.value + 1)\n this.$emit('next')\n },\n previous (e: Event) {\n e.preventDefault()\n this.$emit('input', this.value - 1)\n this.$emit('previous')\n },\n range (from: number, to: number) {\n const range = []\n\n from = from > 0 ? from : 1\n\n for (let i = from; i <= to; i++) {\n range.push(i)\n }\n\n return range\n },\n genIcon (h: CreateElement, icon: string, disabled: boolean, fn: EventListener): VNode {\n return h('li', [\n h('button', {\n staticClass: 'v-pagination__navigation',\n class: {\n 'v-pagination__navigation--disabled': disabled,\n },\n attrs: {\n type: 'button',\n },\n on: disabled ? {} : { click: fn },\n }, [h(VIcon, [icon])]),\n ])\n },\n genItem (h: CreateElement, i: string | number): VNode {\n const color: string | false = (i === this.value) && (this.color || 'primary')\n return h('button', this.setBackgroundColor(color, {\n staticClass: 'v-pagination__item',\n class: {\n 'v-pagination__item--active': i === this.value,\n },\n attrs: {\n type: 'button',\n },\n on: {\n click: () => this.$emit('input', i),\n },\n }), [i.toString()])\n },\n genItems (h: CreateElement): VNode[] {\n return this.items.map((i, index) => {\n return h('li', { key: index }, [\n isNaN(Number(i)) ? h('span', { class: 'v-pagination__more' }, [i.toString()]) : this.genItem(h, i),\n ])\n })\n },\n },\n\n render (h): VNode {\n const children = [\n this.genIcon(h, this.$vuetify.rtl ? this.nextIcon : this.prevIcon, this.value <= 1, this.previous),\n this.genItems(h),\n this.genIcon(h, this.$vuetify.rtl ? this.prevIcon : this.nextIcon, this.value >= this.length, this.next),\n ]\n\n return h('ul', {\n directives: [{\n modifiers: { quiet: true },\n name: 'resize',\n value: this.onResize,\n }],\n class: this.classes,\n }, children)\n },\n})\n"],"sourceRoot":"","file":"VPagination.js"}