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4BAEA,0BAAY,MAAM,CAAC,KAAnB,CAFA,EADkC;AAKvC,QAAA,KAAK,EAAE;AACL,UAAA,KAAK,EAAE,MAAM,CAAC;AADT;AALgC,OAA3B,EAQX,CAAC,KAAK,YAAL,EAAD,CARW,CAAd;AASD;;AAED,IAAA,QAAQ,CAAC,IAAT,CAAc,KAAK,aAAL,EAAd;AAEA,QAAM,EAAE,GAAG,CAAC,CAAC,IAAD,EAAO;AACjB,MAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE,KAAK,OAAL,CAAa;AADjB;AADU,KAAP,EAIT,CAAC,CAAC,CAAC,KAAD,EAAQ;AAAE,MAAA,WAAW,EAAE;AAAf,KAAR,EAAgE,QAAhE,CAAF,CAJS,CAAZ;AAMA,QAAM,EAAE,GAAG,CAAC,CAAC,IAAD,EAAO,CAAC,EAAD,CAAP,CAAZ;AAEA,WAAO,CAAC,CAAC,OAAD,EAAU;AAChB,MAAA,WAAW,EAAE;AADG,KAAV,EAEL,CAAC,EAAD,CAFK,CAAR;AAGD;AAhFkC,CAAtB,C","sourcesContent":["import { VNode, VNodeChildrenArrayContents } from 'vue'\nimport mixins from '../../util/mixins'\nimport VSelect from '../VSelect/VSelect'\nimport VChip from '../VChip'\nimport header from './mixins/header'\nimport { wrapInArray } from '../../util/helpers'\n\nexport default mixins(header).extend({\n name: 'v-data-table-header-mobile',\n\n methods: {\n genSortChip (props: any) {\n const children: VNodeChildrenArrayContents = [props.item.text]\n\n const sortIndex = this.options.sortBy.findIndex(k => k === props.item.value)\n const beingSorted = sortIndex >= 0\n const isDesc = this.options.sortDesc[sortIndex]\n\n children.push(this.$createElement('div', {\n staticClass: 'v-chip__close',\n class: {\n sortable: true,\n active: beingSorted,\n asc: beingSorted && !isDesc,\n desc: beingSorted && isDesc,\n },\n }, [this.genSortIcon()]))\n\n return this.$createElement(VChip, {\n staticClass: 'sortable',\n nativeOn: {\n click: (e: MouseEvent) => {\n e.stopPropagation()\n this.$emit('sort', props.item.value)\n },\n },\n }, children)\n },\n genSortSelect () {\n return this.$createElement(VSelect, {\n props: {\n label: 'Sort by',\n items: this.headers.filter(h => h.value !== 'data-table-select'),\n hideDetails: true,\n multiple: this.options.multiSort,\n value: this.options.multiSort ? this.options.sortBy : this.options.sortBy[0],\n disabled: this.disableSort,\n },\n on: {\n change: (v: string | string[]) => this.$emit('sort', v),\n },\n scopedSlots: {\n selection: props => this.genSortChip(props) as any, // TODO: whyyy?\n },\n })\n },\n },\n\n render (h): VNode {\n const children: VNodeChildrenArrayContents = []\n\n const header = this.headers.find(h => h.value === 'data-table-select')\n if (header && !this.singleSelect) {\n children.push(this.$createElement('div', {\n class: [\n 'v-data-table-header-mobile__select',\n ...wrapInArray(header.class),\n ],\n attrs: {\n width: header.width,\n },\n }, [this.genSelectAll()]))\n }\n\n children.push(this.genSortSelect())\n\n const th = h('th', {\n attrs: {\n colspan: this.headers.length,\n },\n }, [h('div', { staticClass: 'v-data-table-header-mobile__wrapper' }, children)])\n\n const tr = h('tr', [th])\n\n return h('thead', {\n staticClass: 'v-data-table-header v-data-table-header-mobile',\n }, [tr])\n },\n})\n"],"sourceRoot":"","file":"VDataTableHeaderMobile.js"} |