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

1 line
No EOL
8.7 KiB
Text

{"version":3,"sources":["../../../src/components/VDatePicker/VDatePickerDateTable.ts"],"names":[],"mappings":"AAAA;AACA,OAAO,eAAP,MAA4B,4BAA5B,C,CAEA;;AACA,SAAS,GAAT,EAAc,2BAAd,EAA2C,WAA3C,QAA8D,QAA9D;AACA,SAAS,WAAT,QAA4B,oBAA5B;AACA,OAAO,MAAP,MAAmB,mBAAnB;AAOA,eAAe,MAAM,CACnB;AACF;AAFqB,CAAN,CAGb,MAHa,CAGN;AACP,EAAA,IAAI,EAAE,0BADC;AAGP,EAAA,KAAK,EAAE;AACL,IAAA,cAAc,EAAE;AACd,MAAA,IAAI,EAAE,CAAC,MAAD,EAAS,MAAT,CADQ;AAEd,MAAA,OAAO,EAAE;AAFK,KADX;AAKL,IAAA,QAAQ,EAAE,OALL;AAML,IAAA,aAAa,EAAE;AANV,GAHA;AAYP,EAAA,QAAQ,EAAE;AACR,IAAA,SAAS,GAAA;AACP,aAAO,KAAK,MAAL,IAAe,2BAA2B,CAAC,KAAK,aAAN,EAAqB;AAAE,QAAA,GAAG,EAAE,SAAP;AAAkB,QAAA,QAAQ,EAAE;AAA5B,OAArB,EAA0D;AAAE,QAAA,KAAK,EAAE,CAAT;AAAY,QAAA,MAAM,EAAE;AAApB,OAA1D,CAAjD;AACD,KAHO;;AAIR,IAAA,gBAAgB,GAAA;AACd,aAAO,KAAK,aAAL,IAAsB,2BAA2B,CAAC,KAAK,aAAN,EAAqB;AAAE,QAAA,OAAO,EAAE,QAAX;AAAqB,QAAA,QAAQ,EAAE;AAA/B,OAArB,CAAxD;AACD,KANO;;AAOR,IAAA,QAAQ,GAAA;AACN,YAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,cAAN,EAAsB,EAAtB,CAAtB;AAEA,aA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7B,CAAP;AACD,KAnEM;;AAoEP,IAAA,KAAK,CAAE,QAAF,EAAyB;AAC5B,aAAO,CAAC,KAAK,cAAL,CAAoB,IAApB,EAA0B,QAA1B,CAAD,CAAP;AACD;;AAtEM,GA5BF;;AAqGP,EAAA,MAAM,GAAA;AACJ,WAAO,KAAK,QAAL,CAAc,+CAAd,EAA+D,CACpE,KAAK,QAAL,EADoE,EAEpE,KAAK,QAAL,EAFoE,CAA/D,EAGJ,KAAK,kBAHD,CAAP;AAID;;AA1GM,CAHM,CAAf","sourcesContent":["// Mixins\nimport DatePickerTable from './mixins/date-picker-table'\n\n// Utils\nimport { pad, createNativeLocaleFormatter, monthChange } from './util'\nimport { createRange } from '../../util/helpers'\nimport mixins from '../../util/mixins'\n\n// Types\nimport { DatePickerFormatter } from './util/createNativeLocaleFormatter'\nimport { PropValidator } from 'vue/types/options'\nimport { VNode, VNodeChildren } from 'vue'\n\nexport default mixins(\n DatePickerTable\n/* @vue/component */\n).extend({\n name: 'v-date-picker-date-table',\n\n props: {\n firstDayOfWeek: {\n type: [String, Number],\n default: 0,\n },\n showWeek: Boolean,\n weekdayFormat: Function as PropValidator<DatePickerFormatter | undefined>,\n },\n\n computed: {\n formatter (): DatePickerFormatter {\n return this.format || createNativeLocaleFormatter(this.currentLocale, { day: 'numeric', timeZone: 'UTC' }, { start: 8, length: 2 })\n },\n weekdayFormatter (): DatePickerFormatter | undefined {\n return this.weekdayFormat || createNativeLocaleFormatter(this.currentLocale, { weekday: 'narrow', timeZone: 'UTC' })\n },\n weekDays (): string[] {\n const first = parseInt(this.firstDayOfWeek, 10)\n\n return this.weekdayFormatter\n ? createRange(7).map(i => this.weekdayFormatter!(`2017-01-${first + i + 15}`)) // 2017-01-15 is Sunday\n : createRange(7).map(i => ['S', 'M', 'T', 'W', 'T', 'F', 'S'][(i + first) % 7])\n },\n },\n\n methods: {\n calculateTableDate (delta: number) {\n return monthChange(this.tableDate, Math.sign(delta || 1))\n },\n genTHead () {\n const days = this.weekDays.map(day => this.$createElement('th', day))\n this.showWeek && days.unshift(this.$createElement('th'))\n return this.$createElement('thead', this.genTR(days))\n },\n // Returns number of the days from the firstDayOfWeek to the first day of the current month\n weekDaysBeforeFirstDayOfTheMonth () {\n const firstDayOfTheMonth = new Date(`${this.displayedYear}-${pad(this.displayedMonth + 1)}-01T00:00:00+00:00`)\n const weekDay = firstDayOfTheMonth.getUTCDay()\n return (weekDay - parseInt(this.firstDayOfWeek) + 7) % 7\n },\n getWeekNumber () {\n let dayOfYear = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334][this.displayedMonth]\n if (this.displayedMonth > 1 &&\n (((this.displayedYear % 4 === 0) && (this.displayedYear % 100 !== 0)) || (this.displayedYear % 400 === 0))\n ) {\n dayOfYear++\n }\n const offset = (\n this.displayedYear +\n ((this.displayedYear - 1) >> 2) -\n Math.floor((this.displayedYear - 1) / 100) +\n Math.floor((this.displayedYear - 1) / 400) -\n Number(this.firstDayOfWeek)\n ) % 7 // https://en.wikipedia.org/wiki/Zeller%27s_congruence\n return Math.floor((dayOfYear + offset) / 7) + 1\n },\n genWeekNumber (weekNumber: number) {\n return this.$createElement('td', [\n this.$createElement('small', {\n staticClass: 'v-date-picker-table--date__week',\n }, String(weekNumber).padStart(2, '0')),\n ])\n },\n genTBody () {\n const children = []\n const daysInMonth = new Date(this.displayedYear, this.displayedMonth + 1, 0).getDate()\n let rows = []\n let day = this.weekDaysBeforeFirstDayOfTheMonth()\n let weekNumber = this.getWeekNumber()\n\n this.showWeek && rows.push(this.genWeekNumber(weekNumber++))\n\n while (day--) rows.push(this.$createElement('td'))\n for (day = 1; day <= daysInMonth; day++) {\n const date = `${this.displayedYear}-${pad(this.displayedMonth + 1)}-${pad(day)}`\n\n rows.push(this.$createElement('td', [\n this.genButton(date, true, 'date', this.formatter),\n ]))\n\n if (rows.length % (this.showWeek ? 8 : 7) === 0) {\n children.push(this.genTR(rows))\n rows = []\n day < daysInMonth && this.showWeek && rows.push(this.genWeekNumber(weekNumber++))\n }\n }\n\n if (rows.length) {\n children.push(this.genTR(rows))\n }\n\n return this.$createElement('tbody', children)\n },\n genTR (children: VNodeChildren) {\n return [this.$createElement('tr', children)]\n },\n },\n\n render (): VNode {\n return this.genTable('v-date-picker-table v-date-picker-table--date', [\n this.genTHead(),\n this.genTBody(),\n ], this.calculateTableDate)\n },\n})\n"],"sourceRoot":"","file":"VDatePickerDateTable.js"}