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AI,KAAK,UAAT,EAAqB;AACnB,oBAAM,kBAAkB,KAAK,MAAL,IAAe,IAAf,GAAsB,IAAtB,GAA6B,IAAI,KAAK,MAAT,CAArD;AACA,6BAAa,IAAb,CAAkB,KAAK,cAAL,CAAoB,MAApB,EAA4B,GAA5B,CAAlB;AACA,6BAAa,IAAb,CAAkB,KAAK,eAAL,CAAqB,WAArB,EAAkC,eAAe,MAAjD,EAAyD,eAAzD,EAA0E,KAAK,QAA/E,CAAlB;AACD;AACD,mBAAO,KAAK,cAAL,CAAoB,KAApB,EAA2B;AAChC,yBAAS;AADuB,aAA3B,EAEJ,YAFI,CAAP;AAGD,SAvBM;AAwBP,eAxBO,qBAwBA;AACL,mBAAO,KAAK,cAAL,CAAoB,KAApB,EAA2B;AAChC,6BAAa;AADmB,aAA3B,EAEJ,CACD,KAAK,eAAL,CAAqB,QAArB,EAA+B,IAA/B,EAAqC,IAArC,EAA2C,KAAK,QAAL,IAAiB,KAAK,QAAjE,CADC,EAED,KAAK,eAAL,CAAqB,QAArB,EAA+B,IAA/B,EAAqC,IAArC,EAA2C,KAAK,QAAL,IAAiB,KAAK,QAAjE,CAFC,CAFI,CAAP;AAMD;AA/BM,KAlBF;AAoDP,UApDO,kBAoDC,CApDD,EAoDE;AACP,YAAM,WAAW,CAAC,KAAK,OAAL,EAAD,CAAjB;AAEA,aAAK,IAAL,IAAa,SAAS,IAAT,CAAc,KAAK,OAAL,EAAd,CAAb;AAEA,eAAO,EAAE,KAAF,EAAS;AACd,yBAAa;AADC,SAAT,EAEJ,QAFI,CAAP;AAGD;AA5DM,CAHM,CAAf","sourcesContent":["import '../../stylus/components/_time-picker-title.styl'\n\n// Mixins\nimport PickerButton from '../../mixins/picker-button'\n\n// Utils\nimport { pad } from '../VDatePicker/util'\nimport mixins from '../../util/mixins'\n\nimport { selectingTimes } from './VTimePicker'\nimport { PropValidator } from 'vue/types/options'\nimport { VNode } from 'vue'\n\nexport default mixins(\n PickerButton\n/* @vue/component */\n).extend({\n name: 'v-time-picker-title',\n\n props: {\n ampm: Boolean,\n disabled: Boolean,\n hour: Number,\n minute: Number,\n second: Number,\n period: {\n type: String,\n validator: period => period === 'am' || period === 'pm'\n } as PropValidator<'am' | 'pm'>,\n readonly: Boolean,\n useSeconds: Boolean,\n selecting: Number\n },\n\n methods: {\n genTime () {\n let hour = this.hour\n if (this.ampm) {\n hour = hour ? ((hour - 1) % 12 + 1) : 12\n }\n\n const displayedHour = this.hour == null ? '--' : this.ampm ? String(hour) : pad(hour)\n const displayedMinute = this.minute == null ? '--' : pad(this.minute)\n const titleContent = [\n this.genPickerButton('selecting', selectingTimes.hour, displayedHour, this.disabled),\n this.$createElement('span', ':'),\n this.genPickerButton('selecting', selectingTimes.minute, displayedMinute, this.disabled)\n ]\n\n if (this.useSeconds) {\n const displayedSecond = this.second == null ? '--' : pad(this.second)\n titleContent.push(this.$createElement('span', ':'))\n titleContent.push(this.genPickerButton('selecting', selectingTimes.second, displayedSecond, this.disabled))\n }\n return this.$createElement('div', {\n 'class': 'v-time-picker-title__time'\n }, titleContent)\n },\n genAmPm () {\n return this.$createElement('div', {\n staticClass: 'v-time-picker-title__ampm'\n }, [\n this.genPickerButton('period', 'am', 'am', this.disabled || this.readonly),\n this.genPickerButton('period', 'pm', 'pm', this.disabled || this.readonly)\n ])\n }\n },\n\n render (h): VNode {\n const children = [this.genTime()]\n\n this.ampm && children.push(this.genAmPm())\n\n return h('div', {\n staticClass: 'v-time-picker-title'\n }, children)\n }\n})\n"],"sourceRoot":""}
|