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AAQ,KAAK,WAAL,CAAiB,IAAjB,EAAuB,KAAvB,CAAd;AACA,oBAAM,MAAM,KAAK,YAAL,CAAkB,KAAlB,CAAwB,KAAxB,CAAZ;AAEA,qBAAK,IAAL,CAAU,KAAK,MAAL,CAAY,GAAZ,EAAiB,IAAjB,IACN,KAAK,KAAL,CAAW,GAAX,EAAgB;AAChB,yBAAK,KAAK,OAAL,GAAe,mCAAqB,MAAM,IAA3B,EAAiC,KAAK,OAAtC,CAAf,GAAgE,KADrD;AAEhB,2BAAO,EAAE,QAAQ,KAAK,UAAL,CAAgB,IAAhB,CAAV;AAFS,iBAAhB,CADM,GAKN,GALJ;AAOA,oBAAI,KAAK,YAAL,CAAkB,MAAtB,EAA8B;AAC5B,wBAAM,YAAY,KAAK,cAAL,CAAoB,KAApB,CAAlB;AACA,yBAAK,IAAL,CAAU,SAAV;AACD;AACF;AAED,mBAAO,IAAP;AACD,SAtDM;AAuDP,qBAvDO,yBAuDQ,OAvDR,EAuDe;AACpB,gBAAI,KAAK,MAAL,CAAY,OAAZ,EAAqB,IAArB,CAAJ,EAAgC;AAC9B,uBAAO,OAAP;AACD,aAFD,MAEO,IAAI,KAAK,MAAL,CAAY,OAAZ,EAAqB,IAArB,CAAJ,EAAgC;AACrC,uBAAO,KAAK,KAAL,CAAW,OAAX,CAAP;AACD,aAFM,MAEA;AACL,uBAAO,KAAK,KAAL,CAAW,CAAC,KAAK,cAAL,CAAoB,IAApB,EAA0B;AAC3C,2BAAO;AACL,0CAAkB,OAAO,OAAP,KAAmB;AADhC,qBADoC;AAI3C,2BAAO,EAAE,SAAS,KAAK,aAAhB;AAJoC,iBAA1B,EAKhB,OALgB,CAAD,CAAX,CAAP;AAMD;AACF;AApEM;AADI,C","sourcesContent":["import ExpandTransitionGenerator from '../../transitions/expand-transition'\n\nimport { getObjectValueByPath } from '../../../util/helpers'\n\n/* @vue/component */\nexport default {\n methods: {\n genTBody () {\n const children = this.genItems()\n\n return this.$createElement('tbody', children)\n },\n genExpandedRow (props) {\n const children = []\n\n if (this.isExpanded(props.item)) {\n const expand = this.$createElement('div', {\n class: 'v-datatable__expand-content',\n key: getObjectValueByPath(props.item, this.itemKey)\n }, [this.$scopedSlots.expand(props)])\n\n children.push(expand)\n }\n\n const transition = this.$createElement('transition-group', {\n class: 'v-datatable__expand-col',\n attrs: { colspan: this.headerColumns },\n props: {\n tag: 'td'\n },\n on: ExpandTransitionGenerator('v-datatable__expand-col--expanded')\n }, children)\n\n return this.genTR([transition], { class: 'v-datatable__expand-row' })\n },\n genFilteredItems () {\n if (!this.$scopedSlots.items) {\n return null\n }\n\n const rows = []\n for (let index = 0, len = this.filteredItems.length; index < len; ++index) {\n const item = this.filteredItems[index]\n const props = this.createProps(item, index)\n const row = this.$scopedSlots.items(props)\n\n rows.push(this.hasTag(row, 'td')\n ? this.genTR(row, {\n key: this.itemKey ? getObjectValueByPath(props.item, this.itemKey) : index,\n attrs: { active: this.isSelected(item) }\n })\n : row)\n\n if (this.$scopedSlots.expand) {\n const expandRow = this.genExpandedRow(props)\n rows.push(expandRow)\n }\n }\n\n return rows\n },\n genEmptyItems (content) {\n if (this.hasTag(content, 'tr')) {\n return content\n } else if (this.hasTag(content, 'td')) {\n return this.genTR(content)\n } else {\n return this.genTR([this.$createElement('td', {\n class: {\n 'text-xs-center': typeof content === 'string'\n },\n attrs: { colspan: this.headerColumns }\n }, content)])\n }\n }\n }\n}\n"],"sourceRoot":""}
|