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BAAgB,KAAI,CAAC,KAAL,CAAW,mBAAX,EAAgC,CAAhC,CAAhB;AAAA;AADL;AALO,OAAb;;AAUA,UAAI,KAAK,YAAL,CAAkB,mBAAlB,CAAJ,EAA4C;AAC1C,eAAO,KAAK,YAAL,CAAkB,mBAAlB,EAAwC,IAAxC,CAAP;AACD;;AAED,aAAO,KAAK,cAAL,CAAoB,wBAApB;AACL,QAAA,WAAW,EAAE;AADR,SAEF,IAFE,EAAP;AAID,KApBM;AAqBP,IAAA,WArBO,yBAqBI;AACT,aAAO,KAAK,cAAL,CAAoB,cAApB,EAA2B;AAChC,QAAA,KAAK,EAAE;AACL,UAAA,IAAI,EAAE;AADD;AADyB,OAA3B,EAIJ,CAAC,KAAK,QAAN,CAJI,CAAP;AAKD;AA3BM;AAnC6B,CAAzB,C","sourcesContent":["import { VDataTable } from '../'\nimport { DataOptions } from '../../VData/VData'\nimport VIcon from '../../VIcon'\nimport VSimpleCheckbox from '../../VCheckbox/VSimpleCheckbox'\nimport ripple from '../../../directives/ripple'\n\nimport Vue, { PropType } from 'vue'\nimport mixins from '../../../util/mixins'\nimport { compareFn } from '../../../util/helpers'\n\nexport interface TableHeader {\n text: string\n value: string\n align?: 'start' | 'center' | 'end'\n sortable?: boolean\n divider?: boolean\n class?: string | string[]\n width?: string | number\n filter?: (value: any, search: string | null, item: any) => boolean\n sort?: compareFn\n}\n\ntype VDataTableInstance = InstanceType<typeof VDataTable>\n\ninterface options extends Vue {\n dataTable: VDataTableInstance\n}\n\nexport default mixins<options>().extend({\n // https://github.com/vuejs/vue/issues/6872\n directives: {\n ripple,\n },\n\n props: {\n headers: {\n type: Array as PropType<TableHeader[]>,\n required: true,\n },\n options: {\n type: Object as PropType<DataOptions>,\n default: () => ({\n page: 1,\n itemsPerPage: 10,\n sortBy: [],\n sortDesc: [],\n groupBy: [],\n groupDesc: [],\n multiSort: false,\n mustSort: false,\n }),\n },\n sortIcon: {\n type: String,\n default: '$vuetify.icons.sort',\n },\n everyItem: Boolean,\n someItems: Boolean,\n showGroupBy: Boolean,\n singleSelect: Boolean,\n disableSort: Boolean,\n },\n\n methods: {\n genSelectAll () {\n const data = {\n props: {\n value: this.everyItem,\n indeterminate: !this.everyItem && this.someItems,\n },\n on: {\n input: (v: boolean) => this.$emit('toggle-select-all', v),\n },\n }\n\n if (this.$scopedSlots['data-table-select']) {\n return this.$scopedSlots['data-table-select']!(data)\n }\n\n return this.$createElement(VSimpleCheckbox, {\n staticClass: 'v-data-table__checkbox',\n ...data,\n })\n },\n genSortIcon () {\n return this.$createElement(VIcon, {\n props: {\n size: 18,\n },\n }, [this.sortIcon])\n },\n },\n})\n"],"sourceRoot":"","file":"header.js"} |