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AAQ,CAAC,IAAT,CAAc,KAAd;AACD;;AAED,aAAO,CAAC,CAAC,IAAD,EAAO;AACb,QAAA,KAAK,EAAE;AADM,OAAP,EAEL,CACD,CAAC,CAAC,KAAD,EAAQ;AAAE,QAAA,WAAW,EAAE;AAAf,OAAR,EAA8D,CAC7D,MAAM,CAAC,KAAP,KAAiB,iBAAjB,IAAsC,CAAC,CAAC,KAAD,EAAQ;AAAE,QAAA,WAAW,EAAE;AAAf,OAAR,EAA6D,CAAC,MAAM,CAAC,IAAR,CAA7D,CADsB,EAE7D,CAAC,CAAC,KAAD,EAAQ;AAAE,QAAA,WAAW,EAAE;AAAf,OAAR,EAA2D,QAA3D,CAF4D,CAA9D,CADA,CAFK,CAAR;AAQD,KA5BwB,CAAzB;AA8BA,WAAO,CAAC,CAAC,IAAD,EAAO,IAAP,EAAa,OAAb,CAAR;AACD;AA7CuB,CAAX,C","sourcesContent":["import Vue, { VNode } from 'vue'\nimport { PropValidator } from 'vue/types/options'\nimport { TableHeader } from './mixins/header'\nimport { getObjectValueByPath } from '../../util/helpers'\n\nexport default Vue.extend({\n name: 'row',\n\n functional: true,\n\n props: {\n headers: Array as PropValidator<TableHeader[]>,\n item: Object,\n rtl: Boolean,\n },\n\n render (h, { props, slots, data }): VNode {\n const computedSlots = slots()\n\n const columns: VNode[] = props.headers.map((header: TableHeader) => {\n const classes = {\n 'v-data-table__mobile-row': true,\n }\n\n const children = []\n const value = getObjectValueByPath(props.item, header.value)\n\n const slotName = header.value\n const scopedSlot = data.scopedSlots && data.scopedSlots[slotName]\n const regularSlot = computedSlots[slotName]\n\n if (scopedSlot) {\n children.push(scopedSlot({ item: props.item, header, value }))\n } else if (regularSlot) {\n children.push(regularSlot)\n } else {\n children.push(value)\n }\n\n return h('td', {\n class: classes,\n }, [\n h('div', { staticClass: 'v-data-table__mobile-row__wrapper' }, [\n header.value !== 'dataTableSelect' && h('div', { staticClass: 'v-data-table__mobile-row__header' }, [header.text]),\n h('div', { staticClass: 'v-data-table__mobile-row__cell' }, children),\n ]),\n ])\n })\n\n return h('tr', data, columns)\n },\n})\n"],"sourceRoot":"","file":"MobileRow.js"} |