\n \n !c.hide)\"\n :separator=\"separator\"\n :rows-per-page-options=\"[0]\"\n :pagination.sync=\"pagination\"\n :flat=\"flat\"\n :grid=\"grid\"\n :filter=\"filter\"\n :filter-method=\"customFilter\"\n :virtual-scroll=\"vScroll\"\n :row-key=\"rowKey\"\n @row-click=\"handleClick\"\n @row-dblclick=\"handleDoubleClick\"\n :selected.sync=\"selected\"\n :selection=\"selection\"\n @selection=\"onSelection\"\n :hide-pagination=\"hidePagination\"\n :class=\"{\n sticky: sticky,\n darkDataTable: $q.dark.isActive\n }\"\n >\n \n \n \n {{ props.value }}\n \n \n \n \n !c.hide)\"\n :separator=\"separator\"\n :rows-per-page-options=\"[0]\"\n :pagination.sync=\"pagination\"\n :flat=\"flat\"\n :grid=\"grid\"\n :filter=\"filter\"\n :filter-method=\"customFilter\"\n :virtual-scroll=\"vScroll\"\n :row-key=\"rowKey\"\n @row-click=\"handleClick\"\n @row-dblclick=\"handleDoubleClick\"\n :selected.sync=\"selected\"\n :hide-pagination=\"hidePagination\"\n :class=\"{\n sticky: sticky,\n darkDataTable: $q.dark.isActive\n }\"\n >\n \n \n \n {{ props.value }}\n \n \n \n \n
\n\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-cli-plugin-quasar/lib/loader.transform-quasar-imports.js!../../../node_modules/vue-cli-plugin-quasar/lib/loader.auto-import.js?kebab!../../../node_modules/cache-loader/dist/cjs.js??ref--0-1!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./datatable.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-cli-plugin-quasar/lib/loader.transform-quasar-imports.js!../../../node_modules/vue-cli-plugin-quasar/lib/loader.auto-import.js?kebab!../../../node_modules/cache-loader/dist/cjs.js??ref--0-1!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./datatable.vue?vue&type=script&lang=js&\"","export default {\n computed: {\n marginalsScope () {\n return {\n pagination: this.computedPagination,\n pagesNumber: this.pagesNumber,\n isFirstPage: this.isFirstPage,\n isLastPage: this.isLastPage,\n firstPage: this.firstPage,\n prevPage: this.prevPage,\n nextPage: this.nextPage,\n lastPage: this.lastPage,\n\n inFullscreen: this.inFullscreen,\n toggleFullscreen: this.toggleFullscreen\n }\n }\n },\n\n methods: {\n __getTopDiv (h) {\n const\n top = this.$scopedSlots.top,\n topLeft = this.$scopedSlots['top-left'],\n topRight = this.$scopedSlots['top-right'],\n topSelection = this.$scopedSlots['top-selection'],\n hasSelection = this.hasSelectionMode === true &&\n topSelection !== void 0 &&\n this.rowsSelectedNumber > 0,\n staticClass = 'q-table__top relative-position row items-center'\n\n if (top !== void 0) {\n return h('div', { staticClass }, [ top(this.marginalsScope) ])\n }\n\n let child\n\n if (hasSelection === true) {\n child = topSelection(this.marginalsScope).slice()\n }\n else {\n child = []\n\n if (topLeft !== void 0) {\n child.push(\n h('div', { staticClass: 'q-table-control' }, [\n topLeft(this.marginalsScope)\n ])\n )\n }\n else if (this.title) {\n child.push(\n h('div', { staticClass: 'q-table__control' }, [\n h('div', { staticClass: 'q-table__title', class: this.titleClass }, this.title)\n ])\n )\n }\n }\n\n if (topRight !== void 0) {\n child.push(h('div', { staticClass: 'q-table__separator col' }))\n child.push(\n h('div', { staticClass: 'q-table__control' }, [\n topRight(this.marginalsScope)\n ])\n )\n }\n\n if (child.length === 0) {\n return\n }\n\n return h('div', { staticClass }, child)\n }\n }\n}\n","import Vue from 'vue'\n\nimport QIcon from '../icon/QIcon.js'\n\nimport ListenersMixin from '../../mixins/listeners.js'\n\nimport { slot, uniqueSlot } from '../../utils/slot.js'\n\nexport default Vue.extend({\n name: 'QTh',\n\n mixins: [ ListenersMixin ],\n\n props: {\n props: Object,\n autoWidth: Boolean\n },\n\n render (h) {\n const on = { ...this.qListeners }\n\n if (this.props === void 0) {\n return h('th', {\n on,\n class: this.autoWidth === true ? 'q-table--col-auto-width' : null\n }, slot(this, 'default'))\n }\n\n let col, child\n const name = this.$vnode.key\n\n if (name) {\n col = this.props.colsMap[name]\n if (col === void 0) { return }\n }\n else {\n col = this.props.col\n }\n\n if (col.sortable === true) {\n const action = col.align === 'right'\n ? 'unshift'\n : 'push'\n\n child = uniqueSlot(this, 'default', [])\n child[action](\n h(QIcon, {\n props: { name: this.$q.iconSet.table.arrowUp },\n staticClass: col.__iconClass\n })\n )\n }\n else {\n child = slot(this, 'default')\n }\n\n const evt = col.sortable === true\n ? {\n click: evt => {\n this.props.sort(col)\n this.$emit('click', evt)\n }\n }\n : {}\n\n return h('th', {\n on: { ...on, ...evt },\n style: col.headerStyle,\n class: col.__thClass +\n (this.autoWidth === true ? ' q-table--col-auto-width' : '')\n }, child)\n }\n})\n","import QCheckbox from '../checkbox/QCheckbox.js'\nimport QTh from './QTh.js'\n\nimport cache from '../../utils/cache.js'\n\nexport default {\n computed: {\n headerSelectedValue () {\n return this.someRowsSelected === true\n ? null\n : this.allRowsSelected\n }\n },\n\n methods: {\n __getTHead (h) {\n const child = this.__getTHeadTR(h)\n\n if (this.loading === true && this.$scopedSlots.loading === void 0) {\n child.push(\n h('tr', { staticClass: 'q-table__progress' }, [\n h('th', {\n staticClass: 'relative-position',\n attrs: { colspan: this.computedColspan }\n }, this.__getProgress(h))\n ])\n )\n }\n\n return h('thead', child)\n },\n\n __getTHeadTR (h) {\n const\n header = this.$scopedSlots.header,\n headerCell = this.$scopedSlots['header-cell']\n\n if (header !== void 0) {\n return header(\n this.__getHeaderScope({ header: true })\n ).slice()\n }\n\n const child = this.computedCols.map(col => {\n const\n headerCellCol = this.$scopedSlots[`header-cell-${col.name}`],\n slot = headerCellCol !== void 0 ? headerCellCol : headerCell,\n props = this.__getHeaderScope({ col })\n\n return slot !== void 0\n ? slot(props)\n : h(QTh, {\n key: col.name,\n props: { props }\n }, col.label)\n })\n\n if (this.singleSelection === true && this.grid !== true) {\n child.unshift(h('th', { staticClass: 'q-table--col-auto-width' }, [' ']))\n }\n else if (this.multipleSelection === true) {\n const slot = this.$scopedSlots['header-selection']\n const content = slot !== void 0\n ? slot(this.__getHeaderScope({}))\n : [\n h(QCheckbox, {\n props: {\n color: this.color,\n value: this.headerSelectedValue,\n dark: this.isDark,\n dense: this.dense\n },\n on: cache(this, 'inp', {\n input: this.__onMultipleSelectionSet\n })\n })\n ]\n\n child.unshift(\n h('th', { staticClass: 'q-table--col-auto-width' }, content)\n )\n }\n\n return [\n h('tr', {\n style: this.tableHeaderStyle,\n class: this.tableHeaderClass\n }, child)\n ]\n },\n\n __getHeaderScope (data) {\n Object.assign(data, {\n cols: this.computedCols,\n sort: this.sort,\n colsMap: this.computedColsMap,\n color: this.color,\n dark: this.isDark,\n dense: this.dense\n })\n\n if (this.multipleSelection === true) {\n Object.defineProperty(data, 'selected', {\n get: () => this.headerSelectedValue,\n set: this.__onMultipleSelectionSet,\n configurable: true,\n enumerable: true\n })\n\n // TODO: remove in v2\n data.partialSelected = this.someRowsSelected\n data.multipleSelect = true\n }\n\n return data\n },\n\n __onMultipleSelectionSet (val) {\n if (this.someRowsSelected === true) {\n val = false\n }\n this.__updateSelection(\n this.computedRows.map(this.getRowKey),\n this.computedRows,\n val\n )\n }\n }\n}\n","import QCheckbox from '../checkbox/QCheckbox.js'\n\nexport default {\n methods: {\n __getTBodyTR (h, row, bodySlot, pageIndex) {\n const\n key = this.getRowKey(row),\n selected = this.isRowSelected(key)\n\n if (bodySlot !== void 0) {\n return bodySlot(\n this.__getBodyScope({\n key,\n row,\n pageIndex,\n __trClass: selected ? 'selected' : ''\n })\n )\n }\n\n const\n bodyCell = this.$scopedSlots['body-cell'],\n child = this.computedCols.map(col => {\n const\n bodyCellCol = this.$scopedSlots[`body-cell-${col.name}`],\n slot = bodyCellCol !== void 0 ? bodyCellCol : bodyCell\n\n return slot !== void 0\n ? slot(this.__getBodyCellScope({ key, row, pageIndex, col }))\n : h('td', {\n class: col.__tdClass(row),\n style: col.__tdStyle(row)\n }, this.getCellValue(col, row))\n })\n\n if (this.hasSelectionMode === true) {\n const slot = this.$scopedSlots['body-selection']\n const content = slot !== void 0\n ? slot(this.__getBodySelectionScope({ key, row, pageIndex }))\n : [\n h(QCheckbox, {\n props: {\n value: selected,\n color: this.color,\n dark: this.isDark,\n dense: this.dense\n },\n on: {\n input: (adding, evt) => {\n this.__updateSelection([ key ], [ row ], adding, evt)\n }\n }\n })\n ]\n\n child.unshift(\n h('td', { staticClass: 'q-table--col-auto-width' }, content)\n )\n }\n\n const data = { key, class: { selected }, on: {} }\n\n if (this.qListeners['row-click'] !== void 0) {\n data.class['cursor-pointer'] = true\n data.on.click = evt => {\n this.$emit('row-click', evt, row, pageIndex)\n }\n }\n\n if (this.qListeners['row-dblclick'] !== void 0) {\n data.class['cursor-pointer'] = true\n data.on.dblclick = evt => {\n this.$emit('row-dblclick', evt, row, pageIndex)\n }\n }\n\n if (this.qListeners['row-contextmenu'] !== void 0) {\n data.class['cursor-pointer'] = true\n data.on.contextmenu = evt => {\n this.$emit('row-contextmenu', evt, row, pageIndex)\n }\n }\n\n return h('tr', data, child)\n },\n\n __getTBody (h) {\n const\n body = this.$scopedSlots.body,\n topRow = this.$scopedSlots['top-row'],\n bottomRow = this.$scopedSlots['bottom-row']\n\n let child = this.computedRows.map(\n (row, pageIndex) => this.__getTBodyTR(h, row, body, pageIndex)\n )\n\n if (topRow !== void 0) {\n child = topRow({ cols: this.computedCols }).concat(child)\n }\n if (bottomRow !== void 0) {\n child = child.concat(bottomRow({ cols: this.computedCols }))\n }\n\n return h('tbody', child)\n },\n\n __getVirtualTBodyTR (h) {\n const body = this.$scopedSlots.body\n return props => this.__getTBodyTR(h, props.item, body, props.index)\n },\n\n __getBodyScope (data) {\n this.__injectBodyCommonScope(data)\n\n data.cols = data.cols.map(col => {\n const c = { ...col }\n Object.defineProperty(c, 'value', {\n get: () => this.getCellValue(col, data.row),\n configurable: true,\n enumerable: true\n })\n return c\n })\n\n return data\n },\n\n __getBodyCellScope (data) {\n this.__injectBodyCommonScope(data)\n\n Object.defineProperty(data, 'value', {\n get: () => this.getCellValue(data.col, data.row),\n configurable: true,\n enumerable: true\n })\n\n return data\n },\n\n __getBodySelectionScope (data) {\n this.__injectBodyCommonScope(data)\n return data\n },\n\n __injectBodyCommonScope (data) {\n Object.assign(data, {\n cols: this.computedCols,\n colsMap: this.computedColsMap,\n sort: this.sort,\n rowIndex: this.firstRowIndex + data.pageIndex,\n color: this.color,\n dark: this.isDark,\n dense: this.dense\n })\n\n this.hasSelectionMode === true && Object.defineProperty(data, 'selected', {\n get: () => this.isRowSelected(data.key),\n set: (adding, evt) => {\n this.__updateSelection([ data.key ], [ data.row ], adding, evt)\n },\n configurable: true,\n enumerable: true\n })\n\n Object.defineProperty(data, 'expand', {\n get: () => this.isRowExpanded(data.key),\n set: adding => {\n this.__updateExpanded(data.key, adding)\n },\n configurable: true,\n enumerable: true\n })\n },\n\n getCellValue (col, row) {\n const val = typeof col.field === 'function' ? col.field(row) : row[col.field]\n return col.format !== void 0 ? col.format(val, row) : val\n }\n }\n}\n","import QSelect from '../select/QSelect.js'\nimport QBtn from '../btn/QBtn.js'\nimport QIcon from '../icon/QIcon.js'\n\nimport cache from '../../utils/cache.js'\n\nconst staticClass = 'q-table__bottom row items-center'\n\nexport default {\n props: {\n hideBottom: Boolean,\n hideSelectedBanner: Boolean,\n hideNoData: Boolean,\n hidePagination: Boolean\n },\n\n computed: {\n navIcon () {\n const ico = [\n this.iconFirstPage || this.$q.iconSet.table.firstPage,\n this.iconPrevPage || this.$q.iconSet.table.prevPage,\n this.iconNextPage || this.$q.iconSet.table.nextPage,\n this.iconLastPage || this.$q.iconSet.table.lastPage\n ]\n return this.$q.lang.rtl === true ? ico.reverse() : ico\n }\n },\n\n methods: {\n __getBottomDiv (h) {\n if (this.hideBottom === true) {\n return\n }\n\n if (this.nothingToDisplay === true) {\n if (this.hideNoData === true) {\n return\n }\n\n const message = this.loading === true\n ? this.loadingLabel || this.$q.lang.table.loading\n : (this.filter ? this.noResultsLabel || this.$q.lang.table.noResults : this.noDataLabel || this.$q.lang.table.noData)\n\n const noData = this.$scopedSlots['no-data']\n const children = noData !== void 0\n ? [ noData({ message, icon: this.$q.iconSet.table.warning, filter: this.filter }) ]\n : [\n h(QIcon, {\n staticClass: 'q-table__bottom-nodata-icon',\n props: { name: this.$q.iconSet.table.warning }\n }),\n message\n ]\n\n return h('div', {\n staticClass: staticClass + ' q-table__bottom--nodata'\n }, children)\n }\n\n const bottom = this.$scopedSlots.bottom\n\n if (bottom !== void 0) {\n return h('div', { staticClass }, [ bottom(this.marginalsScope) ])\n }\n\n const child = this.hideSelectedBanner !== true && this.hasSelectionMode === true && this.rowsSelectedNumber > 0\n ? [\n h('div', { staticClass: 'q-table__control' }, [\n h('div', [\n (this.selectedRowsLabel || this.$q.lang.table.selectedRecords)(this.rowsSelectedNumber)\n ])\n ])\n ]\n : []\n\n if (this.hidePagination !== true) {\n return h('div', {\n staticClass: staticClass + ' justify-end'\n }, this.__getPaginationDiv(h, child))\n }\n\n if (child.length > 0) {\n return h('div', { staticClass }, child)\n }\n },\n\n __getPaginationDiv (h, child) {\n let control\n const\n { rowsPerPage } = this.computedPagination,\n paginationLabel = this.paginationLabel || this.$q.lang.table.pagination,\n paginationSlot = this.$scopedSlots.pagination,\n hasOpts = this.rowsPerPageOptions.length > 1\n\n child.push(\n h('div', { staticClass: 'q-table__separator col' })\n )\n\n if (hasOpts === true) {\n child.push(\n h('div', { staticClass: 'q-table__control' }, [\n h('span', { staticClass: 'q-table__bottom-item' }, [\n this.rowsPerPageLabel || this.$q.lang.table.recordsPerPage\n ]),\n h(QSelect, {\n staticClass: 'q-table__select inline q-table__bottom-item',\n props: {\n color: this.color,\n value: rowsPerPage,\n options: this.computedRowsPerPageOptions,\n displayValue: rowsPerPage === 0\n ? this.$q.lang.table.allRows\n : rowsPerPage,\n dark: this.isDark,\n borderless: true,\n dense: true,\n optionsDense: true,\n optionsCover: true\n },\n on: cache(this, 'pgSize', {\n input: pag => {\n this.setPagination({\n page: 1,\n rowsPerPage: pag.value\n })\n }\n })\n })\n ])\n )\n }\n\n if (paginationSlot !== void 0) {\n control = paginationSlot(this.marginalsScope)\n }\n else {\n control = [\n h('span', rowsPerPage !== 0 ? { staticClass: 'q-table__bottom-item' } : {}, [\n rowsPerPage\n ? paginationLabel(this.firstRowIndex + 1, Math.min(this.lastRowIndex, this.computedRowsNumber), this.computedRowsNumber)\n : paginationLabel(1, this.filteredSortedRowsNumber, this.computedRowsNumber)\n ])\n ]\n\n if (rowsPerPage !== 0 && this.pagesNumber > 1) {\n const btnProps = {\n color: this.color,\n round: true,\n dense: true,\n flat: true\n }\n\n if (this.dense === true) {\n btnProps.size = 'sm'\n }\n\n this.pagesNumber > 2 && control.push(\n h(QBtn, {\n key: 'pgFirst',\n props: {\n ...btnProps,\n icon: this.navIcon[0],\n disable: this.isFirstPage\n },\n on: cache(this, 'pgFirst', { click: this.firstPage })\n })\n )\n\n control.push(\n h(QBtn, {\n key: 'pgPrev',\n props: {\n ...btnProps,\n icon: this.navIcon[1],\n disable: this.isFirstPage\n },\n on: cache(this, 'pgPrev', { click: this.prevPage })\n }),\n\n h(QBtn, {\n key: 'pgNext',\n props: {\n ...btnProps,\n icon: this.navIcon[2],\n disable: this.isLastPage\n },\n on: cache(this, 'pgNext', { click: this.nextPage })\n })\n )\n\n this.pagesNumber > 2 && control.push(\n h(QBtn, {\n key: 'pgLast',\n props: {\n ...btnProps,\n icon: this.navIcon[3],\n disable: this.isLastPage\n },\n on: cache(this, 'pgLast', { click: this.lastPage })\n })\n )\n }\n }\n\n child.push(\n h('div', { staticClass: 'q-table__control' }, control)\n )\n\n return child\n }\n }\n}\n","import QCheckbox from '../checkbox/QCheckbox.js'\nimport QSeparator from '../separator/QSeparator.js'\n\nexport default {\n methods: {\n __getGridHeader (h) {\n const child = this.gridHeader === true\n ? [\n h('table', { staticClass: 'q-table' }, [\n this.__getTHead(h)\n ])\n ]\n : (\n this.loading === true && this.$scopedSlots.loading === void 0\n ? this.__getProgress(h)\n : void 0\n )\n\n return h('div', { staticClass: 'q-table__middle' }, child)\n },\n\n __getGridBody (h) {\n const item = this.$scopedSlots.item !== void 0\n ? this.$scopedSlots.item\n : scope => {\n const child = scope.cols.map(\n col => h('div', { staticClass: 'q-table__grid-item-row' }, [\n h('div', { staticClass: 'q-table__grid-item-title' }, [ col.label ]),\n h('div', { staticClass: 'q-table__grid-item-value' }, [ col.value ])\n ])\n )\n\n if (this.hasSelectionMode === true) {\n const slot = this.$scopedSlots['body-selection']\n const content = slot !== void 0\n ? slot(scope)\n : [\n h(QCheckbox, {\n props: {\n value: scope.selected,\n color: this.color,\n dark: this.isDark,\n dense: this.dense\n },\n on: {\n input: (adding, evt) => {\n this.__updateSelection([ scope.key ], [ scope.row ], adding, evt)\n }\n }\n })\n ]\n\n child.unshift(\n h('div', { staticClass: 'q-table__grid-item-row' }, content),\n h(QSeparator, { props: { dark: this.isDark } })\n )\n }\n\n const data = {\n staticClass: 'q-table__grid-item-card' + this.cardDefaultClass,\n class: this.cardClass,\n style: this.cardStyle,\n on: {}\n }\n\n if (this.qListeners['row-click'] !== void 0 || this.qListeners['row-dblclick'] !== void 0) {\n data.staticClass += ' cursor-pointer'\n }\n\n if (this.qListeners['row-click'] !== void 0) {\n data.on.click = evt => {\n this.$emit('row-click', evt, scope.row, scope.pageIndex)\n }\n }\n\n if (this.qListeners['row-dblclick'] !== void 0) {\n data.on.dblclick = evt => {\n this.$emit('row-dblclick', evt, scope.row, scope.pageIndex)\n }\n }\n\n return h('div', {\n staticClass: 'q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3',\n class: scope.selected === true ? 'q-table__grid-item--selected' : ''\n }, [\n h('div', data, child)\n ])\n }\n\n return h('div', {\n staticClass: 'q-table__grid-content row',\n class: this.cardContainerClass,\n style: this.cardContainerStyle\n }, this.computedRows.map((row, pageIndex) => {\n return item(this.__getBodyScope({\n key: this.getRowKey(row),\n row,\n pageIndex\n }))\n }))\n }\n }\n}\n","import Vue from 'vue'\n\nimport DarkMixin from '../../mixins/dark.js'\nimport ListenersMixin from '../../mixins/listeners.js'\n\nimport { slot } from '../../utils/slot.js'\n\nexport default Vue.extend({\n name: 'QMarkupTable',\n\n mixins: [ DarkMixin, ListenersMixin ],\n\n props: {\n dense: Boolean,\n flat: Boolean,\n bordered: Boolean,\n square: Boolean,\n separator: {\n type: String,\n default: 'horizontal',\n validator: v => ['horizontal', 'vertical', 'cell', 'none'].includes(v)\n },\n wrapCells: Boolean\n },\n\n computed: {\n classes () {\n return `q-table--${this.separator}-separator` +\n (this.isDark === true ? ` q-table--dark q-table__card--dark q-dark` : '') +\n (this.dense === true ? ` q-table--dense` : '') +\n (this.flat === true ? ` q-table--flat` : '') +\n (this.bordered === true ? ` q-table--bordered` : '') +\n (this.square === true ? ` q-table--square` : '') +\n (this.wrapCells === false ? ` q-table--no-wrap` : '')\n }\n },\n\n render (h) {\n return h('div', {\n staticClass: 'q-markup-table q-table__container q-table__card',\n class: this.classes,\n on: { ...this.qListeners }\n }, [\n h('table', { staticClass: 'q-table' }, slot(this, 'default'))\n ])\n }\n})\n","export default function (h, conf, content) {\n return h('div', {\n ...conf,\n staticClass: 'q-table__middle' + (conf.staticClass !== void 0 ? ' ' + conf.staticClass : '')\n }, [\n h('table', { staticClass: 'q-table' }, content)\n ])\n}\n","import Vue from 'vue'\n\nimport QList from '../item/QList.js'\nimport QMarkupTable from '../markup-table/QMarkupTable.js'\nimport getTableMiddle from '../table/get-table-middle.js'\n\nimport VirtualScroll from '../../mixins/virtual-scroll.js'\nimport AttrsMixin from '../../mixins/attrs.js'\nimport ListenersMixin from '../../mixins/listeners.js'\n\nimport { getScrollTarget } from '../../utils/scroll.js'\nimport { listenOpts } from '../../utils/event.js'\nimport { mergeSlot } from '../../utils/slot.js'\n\nconst comps = {\n list: QList,\n table: QMarkupTable\n}\n\nexport default Vue.extend({\n name: 'QVirtualScroll',\n\n mixins: [ AttrsMixin, ListenersMixin, VirtualScroll ],\n\n props: {\n type: {\n type: String,\n default: 'list',\n validator: v => ['list', 'table', '__qtable'].includes(v)\n },\n\n items: {\n type: Array,\n default: () => []\n },\n\n itemsFn: Function,\n itemsSize: Number,\n\n scrollTarget: {\n default: void 0\n }\n },\n\n computed: {\n virtualScrollLength () {\n return this.itemsSize >= 0 && this.itemsFn !== void 0\n ? parseInt(this.itemsSize, 10)\n : (Array.isArray(this.items) ? this.items.length : 0)\n },\n\n virtualScrollScope () {\n if (this.virtualScrollLength === 0) {\n return []\n }\n\n const mapFn = (item, i) => ({\n index: this.virtualScrollSliceRange.from + i,\n item\n })\n\n if (this.itemsFn === void 0) {\n return this.items.slice(this.virtualScrollSliceRange.from, this.virtualScrollSliceRange.to).map(mapFn)\n }\n\n return this.itemsFn(this.virtualScrollSliceRange.from, this.virtualScrollSliceRange.to - this.virtualScrollSliceRange.from).map(mapFn)\n },\n\n classes () {\n return 'q-virtual-scroll q-virtual-scroll' + (this.virtualScrollHorizontal === true ? '--horizontal' : '--vertical') +\n (this.scrollTarget !== void 0 ? '' : ' scroll')\n },\n\n attrs () {\n return this.scrollTarget !== void 0 ? void 0 : { tabindex: 0 }\n }\n },\n\n watch: {\n virtualScrollLength () {\n this.__resetVirtualScroll()\n },\n\n scrollTarget () {\n this.__unconfigureScrollTarget()\n this.__configureScrollTarget()\n }\n },\n\n methods: {\n __getVirtualScrollEl () {\n return this.$el\n },\n\n __getVirtualScrollTarget () {\n return this.__scrollTarget\n },\n\n __configureScrollTarget () {\n this.__scrollTarget = getScrollTarget(this.$el, this.scrollTarget)\n this.__scrollTarget.addEventListener('scroll', this.__onVirtualScrollEvt, listenOpts.passive)\n },\n\n __unconfigureScrollTarget () {\n if (this.__scrollTarget !== void 0) {\n this.__scrollTarget.removeEventListener('scroll', this.__onVirtualScrollEvt, listenOpts.passive)\n this.__scrollTarget = void 0\n }\n }\n },\n\n beforeMount () {\n this.__resetVirtualScroll()\n },\n\n mounted () {\n this.__configureScrollTarget()\n },\n\n beforeDestroy () {\n this.__unconfigureScrollTarget()\n },\n\n render (h) {\n if (this.$scopedSlots.default === void 0) {\n console.error(`QVirtualScroll: default scoped slot is required for rendering`, this)\n return\n }\n\n let child = this.__padVirtualScroll(\n h,\n this.type === 'list' ? 'div' : 'tbody',\n this.virtualScrollScope.map(this.$scopedSlots.default)\n )\n\n if (this.$scopedSlots.before !== void 0) {\n child = this.$scopedSlots.before().concat(child)\n }\n\n child = mergeSlot(child, this, 'after')\n\n return this.type === '__qtable'\n ? getTableMiddle(h, { staticClass: this.classes }, child)\n : h(comps[this.type], {\n class: this.classes,\n attrs: this.attrs,\n props: this.qAttrs,\n on: { ...this.qListeners }\n }, child)\n }\n})\n","import Vue from 'vue'\n\nimport DarkMixin from '../../mixins/dark.js'\nimport { getSizeMixin } from '../../mixins/size.js'\nimport ListenersMixin from '../../mixins/listeners.js'\n\nimport { mergeSlot } from '../../utils/slot.js'\n\nfunction width (val, reverse, $q) {\n return {\n transform: reverse === true\n ? `translateX(${$q.lang.rtl === true ? '-' : ''}100%) scale3d(${-val},1,1)`\n : `scale3d(${val},1,1)`\n }\n}\n\nexport default Vue.extend({\n name: 'QLinearProgress',\n\n mixins: [\n ListenersMixin,\n DarkMixin,\n getSizeMixin({\n xs: 2,\n sm: 4,\n md: 6,\n lg: 10,\n xl: 14\n })\n ],\n\n props: {\n value: {\n type: Number,\n default: 0\n },\n buffer: Number,\n\n color: String,\n trackColor: String,\n\n reverse: Boolean,\n stripe: Boolean,\n indeterminate: Boolean,\n query: Boolean,\n rounded: Boolean,\n\n instantFeedback: Boolean\n },\n\n computed: {\n motion () {\n return this.indeterminate === true || this.query === true\n },\n\n classes () {\n return 'q-linear-progress' +\n (this.color !== void 0 ? ` text-${this.color}` : '') +\n (this.reverse === true || this.query === true ? ' q-linear-progress--reverse' : '') +\n (this.rounded === true ? ' rounded-borders' : '')\n },\n\n trackStyle () {\n return width(this.buffer !== void 0 ? this.buffer : 1, this.reverse, this.$q)\n },\n\n trackClass () {\n return `q-linear-progress__track--with${this.instantFeedback === true ? 'out' : ''}-transition` +\n ` q-linear-progress__track--${this.isDark === true ? 'dark' : 'light'}` +\n (this.trackColor !== void 0 ? ` bg-${this.trackColor}` : '')\n },\n\n modelStyle () {\n return width(this.motion === true ? 1 : this.value, this.reverse, this.$q)\n },\n\n modelClasses () {\n return `q-linear-progress__model--with${this.instantFeedback === true ? 'out' : ''}-transition` +\n ` q-linear-progress__model--${this.motion === true ? 'in' : ''}determinate`\n },\n\n stripeStyle () {\n return { width: (this.value * 100) + '%' }\n },\n\n stripeClass () {\n return this.reverse === true ? 'absolute-right' : 'absolute-left'\n },\n\n attrs () {\n return {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuemax': 1,\n 'aria-valuenow': this.indeterminate === true ? void 0 : this.value\n }\n }\n },\n\n render (h) {\n const child = [\n h('div', {\n staticClass: 'q-linear-progress__track absolute-full',\n style: this.trackStyle,\n class: this.trackClass\n }),\n\n h('div', {\n staticClass: 'q-linear-progress__model absolute-full',\n style: this.modelStyle,\n class: this.modelClasses\n })\n ]\n\n this.stripe === true && this.motion === false && child.push(\n h('div', {\n staticClass: 'q-linear-progress__stripe',\n style: this.stripeStyle,\n class: this.stripeClass\n })\n )\n\n return h('div', {\n style: this.sizeStyle,\n class: this.classes,\n attrs: this.attrs,\n on: { ...this.qListeners }\n }, mergeSlot(child, this, 'default'))\n }\n})\n","export function sortString (a, b) {\n if (typeof a !== 'string') {\n throw new TypeError('The value for sorting must be a String')\n }\n return a.localeCompare(b)\n}\n\nexport function sortNumber (a, b) {\n return a - b\n}\n\nexport function sortDate (a, b) {\n return (new Date(a)) - (new Date(b))\n}\n\nexport function sortBoolean (a, b) {\n return a && !b\n ? -1\n : (!a && b ? 1 : 0)\n}\n","import { sortDate } from '../../utils/sort.js'\nimport { isNumber, isDate } from '../../utils/is.js'\n\nexport default {\n props: {\n sortMethod: {\n type: Function,\n default (data, sortBy, descending) {\n const col = this.colList.find(def => def.name === sortBy)\n if (col === void 0 || col.field === void 0) {\n return data\n }\n\n const\n dir = descending === true ? -1 : 1,\n val = typeof col.field === 'function'\n ? v => col.field(v)\n : v => v[col.field]\n\n return data.sort((a, b) => {\n let\n A = val(a),\n B = val(b)\n\n if (A === null || A === void 0) {\n return -1 * dir\n }\n if (B === null || B === void 0) {\n return 1 * dir\n }\n if (col.sort !== void 0) {\n return col.sort(A, B, a, b) * dir\n }\n if (isNumber(A) === true && isNumber(B) === true) {\n return (A - B) * dir\n }\n if (isDate(A) === true && isDate(B) === true) {\n return sortDate(A, B) * dir\n }\n if (typeof A === 'boolean' && typeof B === 'boolean') {\n return (A - B) * dir\n }\n\n [A, B] = [A, B].map(s => (s + '').toLocaleString().toLowerCase())\n\n return A < B\n ? -1 * dir\n : (A === B ? 0 : dir)\n })\n }\n },\n\n columnSortOrder: {\n type: String,\n validator: v => v === 'ad' || v === 'da',\n default: 'ad'\n }\n },\n\n computed: {\n columnToSort () {\n const { sortBy } = this.computedPagination\n\n if (sortBy) {\n return this.colList.find(def => def.name === sortBy) || null\n }\n }\n },\n\n methods: {\n sort (col /* String(col name) or Object(col definition) */) {\n let sortOrder = this.columnSortOrder\n\n if (col === Object(col)) {\n if (col.sortOrder) {\n sortOrder = col.sortOrder\n }\n\n col = col.name\n }\n else {\n const def = this.colList.find(def => def.name === col)\n if (def !== void 0 && def.sortOrder) {\n sortOrder = def.sortOrder\n }\n }\n\n let { sortBy, descending } = this.computedPagination\n\n if (sortBy !== col) {\n sortBy = col\n descending = sortOrder === 'da'\n }\n else if (this.binaryStateSort === true) {\n descending = !descending\n }\n else if (descending === true) {\n if (sortOrder === 'ad') {\n sortBy = null\n }\n else {\n descending = false\n }\n }\n else { // ascending\n if (sortOrder === 'ad') {\n descending = true\n }\n else {\n sortBy = null\n }\n }\n\n this.setPagination({ sortBy, descending, page: 1 })\n }\n }\n}\n","export default {\n props: {\n filter: [String, Object],\n filterMethod: {\n type: Function,\n default (rows, terms, cols = this.computedCols, cellValue = this.getCellValue) {\n const lowerTerms = terms ? terms.toLowerCase() : ''\n return rows.filter(\n row => cols.some(col => {\n const val = cellValue(col, row) + ''\n const haystack = (val === 'undefined' || val === 'null') ? '' : val.toLowerCase()\n return haystack.indexOf(lowerTerms) !== -1\n })\n )\n }\n }\n },\n\n watch: {\n filter: {\n handler () {\n this.$nextTick(() => {\n this.setPagination({ page: 1 }, true)\n })\n },\n deep: true\n }\n }\n}\n","function samePagination (oldPag, newPag) {\n for (const prop in newPag) {\n if (newPag[prop] !== oldPag[prop]) {\n return false\n }\n }\n return true\n}\n\nfunction fixPagination (p) {\n if (p.page < 1) {\n p.page = 1\n }\n if (p.rowsPerPage !== void 0 && p.rowsPerPage < 1) {\n p.rowsPerPage = 0\n }\n return p\n}\n\nexport default {\n props: {\n pagination: Object,\n rowsPerPageOptions: {\n type: Array,\n default: () => [ 5, 7, 10, 15, 20, 25, 50, 0 ]\n }\n },\n\n computed: {\n computedPagination () {\n const pag = this.qListeners['update:pagination'] !== void 0\n ? { ...this.innerPagination, ...this.pagination }\n : this.innerPagination\n\n return fixPagination(pag)\n },\n\n firstRowIndex () {\n const { page, rowsPerPage } = this.computedPagination\n return (page - 1) * rowsPerPage\n },\n\n lastRowIndex () {\n const { page, rowsPerPage } = this.computedPagination\n return page * rowsPerPage\n },\n\n isFirstPage () {\n return this.computedPagination.page === 1\n },\n\n pagesNumber () {\n return this.computedPagination.rowsPerPage === 0\n ? 1\n : Math.max(\n 1,\n Math.ceil(this.computedRowsNumber / this.computedPagination.rowsPerPage)\n )\n },\n\n isLastPage () {\n return this.lastRowIndex === 0\n ? true\n : this.computedPagination.page >= this.pagesNumber\n },\n\n computedRowsPerPageOptions () {\n const opts = this.rowsPerPageOptions.includes(this.innerPagination.rowsPerPage)\n ? this.rowsPerPageOptions\n : [ this.innerPagination.rowsPerPage ].concat(this.rowsPerPageOptions)\n\n return opts.map(count => ({\n label: count === 0 ? this.$q.lang.table.allRows : '' + count,\n value: count\n }))\n }\n },\n\n watch: {\n pagesNumber (lastPage, oldLastPage) {\n if (lastPage === oldLastPage) {\n return\n }\n\n const currentPage = this.computedPagination.page\n if (lastPage && !currentPage) {\n this.setPagination({ page: 1 })\n }\n else if (lastPage < currentPage) {\n this.setPagination({ page: lastPage })\n }\n }\n },\n\n methods: {\n __sendServerRequest (pagination) {\n this.requestServerInteraction({\n pagination,\n filter: this.filter\n })\n },\n\n setPagination (val, forceServerRequest) {\n const newPagination = fixPagination({\n ...this.computedPagination,\n ...val\n })\n\n if (samePagination(this.computedPagination, newPagination)) {\n if (this.isServerSide === true && forceServerRequest === true) {\n this.__sendServerRequest(newPagination)\n }\n return\n }\n\n if (this.isServerSide === true) {\n this.__sendServerRequest(newPagination)\n return\n }\n\n if (this.pagination !== void 0 && this.qListeners['update:pagination'] !== void 0) {\n this.$emit('update:pagination', newPagination)\n }\n else {\n this.innerPagination = newPagination\n }\n },\n\n firstPage () {\n this.setPagination({ page: 1 })\n },\n\n prevPage () {\n const { page } = this.computedPagination\n if (page > 1) {\n this.setPagination({ page: page - 1 })\n }\n },\n\n nextPage () {\n const { page, rowsPerPage } = this.computedPagination\n if (this.lastRowIndex > 0 && page * rowsPerPage < this.computedRowsNumber) {\n this.setPagination({ page: page + 1 })\n }\n },\n\n lastPage () {\n this.setPagination({ page: this.pagesNumber })\n }\n },\n\n created () {\n if (this.qListeners['update:pagination'] !== void 0) {\n this.$emit('update:pagination', { ...this.computedPagination })\n }\n }\n}\n","export default {\n props: {\n selection: {\n type: String,\n default: 'none',\n validator: v => ['single', 'multiple', 'none'].includes(v)\n },\n selected: {\n type: Array,\n default: () => []\n }\n },\n\n computed: {\n selectedKeys () {\n const keys = {}\n this.selected.map(this.getRowKey).forEach(key => {\n keys[key] = true\n })\n return keys\n },\n\n hasSelectionMode () {\n return this.selection !== 'none'\n },\n\n singleSelection () {\n return this.selection === 'single'\n },\n\n multipleSelection () {\n return this.selection === 'multiple'\n },\n\n allRowsSelected () {\n return this.computedRows.length > 0 && this.computedRows.every(\n row => this.selectedKeys[ this.getRowKey(row) ] === true\n )\n },\n\n someRowsSelected () {\n return this.allRowsSelected !== true &&\n this.computedRows.some(row => this.selectedKeys[ this.getRowKey(row) ] === true)\n },\n\n rowsSelectedNumber () {\n return this.selected.length\n }\n },\n\n methods: {\n isRowSelected (key) {\n return this.selectedKeys[key] === true\n },\n\n clearSelection () {\n this.$emit('update:selected', [])\n },\n\n __updateSelection (keys, rows, added, evt) {\n this.$emit('selection', { rows, added, keys, evt })\n\n const payload = this.singleSelection === true\n ? (added === true ? rows : [])\n : (\n added === true\n ? this.selected.concat(rows)\n : this.selected.filter(\n row => keys.includes(this.getRowKey(row)) === false\n )\n )\n\n this.$emit('update:selected', payload)\n }\n }\n}\n","function getVal (val) {\n return Array.isArray(val)\n ? val.slice()\n : []\n}\n\nexport default {\n props: {\n expanded: Array // sync\n },\n\n data () {\n return {\n innerExpanded: getVal(this.expanded)\n }\n },\n\n watch: {\n expanded (val) {\n this.innerExpanded = getVal(val)\n }\n },\n\n methods: {\n isRowExpanded (key) {\n return this.innerExpanded.includes(key)\n },\n\n setExpanded (val) {\n if (this.expanded !== void 0) {\n this.$emit('update:expanded', val)\n }\n else {\n this.innerExpanded = val\n }\n },\n\n __updateExpanded (key, add) {\n const target = this.innerExpanded.slice()\n const index = target.indexOf(key)\n\n if (add === true) {\n if (index === -1) {\n target.push(key)\n this.setExpanded(target)\n }\n }\n else if (index !== -1) {\n target.splice(index, 1)\n this.setExpanded(target)\n }\n }\n }\n}\n","import { isNumber } from '../../utils/is.js'\n\nexport default {\n props: {\n visibleColumns: Array\n },\n\n computed: {\n colList () {\n if (this.columns !== void 0) {\n return this.columns\n }\n\n // we infer columns from first row\n const row = this.data[0]\n\n return row !== void 0\n ? Object.keys(row).map(name => ({\n name,\n label: name.toUpperCase(),\n field: name,\n align: isNumber(row[name]) ? 'right' : 'left',\n sortable: true\n }))\n : []\n },\n\n computedCols () {\n const { sortBy, descending } = this.computedPagination\n\n const cols = this.visibleColumns !== void 0\n ? this.colList.filter(col => col.required === true || this.visibleColumns.includes(col.name) === true)\n : this.colList\n\n return cols.map(col => {\n const align = col.align || 'right'\n const alignClass = `text-${align}`\n\n return {\n ...col,\n align,\n __iconClass: `q-table__sort-icon q-table__sort-icon--${align}`,\n __thClass: alignClass +\n (col.headerClasses !== void 0 ? ' ' + col.headerClasses : '') +\n (col.sortable === true ? ' sortable' : '') +\n (col.name === sortBy ? ` sorted ${descending === true ? 'sort-desc' : ''}` : ''),\n\n __tdStyle: col.style !== void 0\n ? (\n typeof col.style !== 'function'\n ? () => col.style\n : col.style\n )\n : () => null,\n\n __tdClass: col.classes !== void 0\n ? (\n typeof col.classes !== 'function'\n ? () => alignClass + ' ' + col.classes\n : row => alignClass + ' ' + col.classes(row)\n )\n : () => alignClass\n }\n })\n },\n\n computedColsMap () {\n const names = {}\n this.computedCols.forEach(col => {\n names[col.name] = col\n })\n return names\n },\n\n computedColspan () {\n return this.tableColspan !== void 0\n ? this.tableColspan\n : this.computedCols.length + (this.hasSelectionMode === true ? 1 : 0)\n }\n }\n}\n","import Vue from 'vue'\n\nimport Top from './table-top.js'\nimport TableHeader from './table-header.js'\nimport TableBody from './table-body.js'\nimport Bottom from './table-bottom.js'\nimport TableGrid from './table-grid.js'\nimport QVirtualScroll from '../virtual-scroll/QVirtualScroll.js'\nimport QLinearProgress from '../linear-progress/QLinearProgress.js'\nimport getTableMiddle from './get-table-middle.js'\n\nimport { commonVirtPropsList } from '../../mixins/virtual-scroll.js'\nimport DarkMixin from '../../mixins/dark.js'\nimport ListenersMixin from '../../mixins/listeners.js'\n\nimport Sort from './table-sort.js'\nimport Filter from './table-filter.js'\nimport Pagination from './table-pagination.js'\nimport RowSelection from './table-row-selection.js'\nimport RowExpand from './table-row-expand.js'\nimport ColumnSelection from './table-column-selection.js'\nimport FullscreenMixin from '../../mixins/fullscreen.js'\n\nimport cache from '../../utils/cache.js'\n\nconst commonVirtPropsObj = {}\ncommonVirtPropsList.forEach(p => { commonVirtPropsObj[p] = {} })\n\nexport default Vue.extend({\n name: 'QTable',\n\n mixins: [\n DarkMixin,\n ListenersMixin,\n\n FullscreenMixin,\n Top,\n TableHeader,\n TableBody,\n Bottom,\n TableGrid,\n Sort,\n Filter,\n Pagination,\n RowSelection,\n RowExpand,\n ColumnSelection\n ],\n\n props: {\n data: {\n type: Array,\n default: () => []\n },\n rowKey: {\n type: [ String, Function ],\n default: 'id'\n },\n\n columns: Array,\n loading: Boolean,\n binaryStateSort: Boolean,\n\n iconFirstPage: String,\n iconPrevPage: String,\n iconNextPage: String,\n iconLastPage: String,\n\n title: String,\n\n hideHeader: Boolean,\n\n grid: Boolean,\n gridHeader: Boolean,\n\n dense: Boolean,\n flat: Boolean,\n bordered: Boolean,\n square: Boolean,\n separator: {\n type: String,\n default: 'horizontal',\n validator: v => ['horizontal', 'vertical', 'cell', 'none'].includes(v)\n },\n wrapCells: Boolean,\n\n virtualScroll: Boolean,\n ...commonVirtPropsObj,\n\n noDataLabel: String,\n noResultsLabel: String,\n loadingLabel: String,\n selectedRowsLabel: Function,\n rowsPerPageLabel: String,\n paginationLabel: Function,\n\n color: {\n type: String,\n default: 'grey-8'\n },\n\n titleClass: [String, Array, Object],\n tableStyle: [String, Array, Object],\n tableClass: [String, Array, Object],\n tableHeaderStyle: [String, Array, Object],\n tableHeaderClass: [String, Array, Object],\n cardContainerClass: [String, Array, Object],\n cardContainerStyle: [String, Array, Object],\n cardStyle: [String, Array, Object],\n cardClass: [String, Array, Object]\n },\n\n data () {\n return {\n innerPagination: Object.assign({\n sortBy: null,\n descending: false,\n page: 1,\n rowsPerPage: this.rowsPerPageOptions.length > 0\n ? this.rowsPerPageOptions[0]\n : 5\n }, this.pagination)\n }\n },\n\n watch: {\n needsReset () {\n this.hasVirtScroll === true && this.$refs.virtScroll !== void 0 && this.$refs.virtScroll.reset()\n }\n },\n\n computed: {\n getRowKey () {\n return typeof this.rowKey === 'function'\n ? this.rowKey\n : row => row[this.rowKey]\n },\n\n hasVirtScroll () {\n return this.grid !== true && this.virtualScroll === true\n },\n\n needsReset () {\n return ['tableStyle', 'tableClass', 'tableHeaderStyle', 'tableHeaderClass', '__containerClass']\n .map(p => this[p]).join(';')\n },\n\n filteredSortedRows () {\n let rows = this.data\n\n if (this.isServerSide === true || rows.length === 0) {\n return rows\n }\n\n const { sortBy, descending } = this.computedPagination\n\n if (this.filter) {\n rows = this.filterMethod(rows, this.filter, this.computedCols, this.getCellValue)\n }\n\n if (this.columnToSort !== void 0) {\n rows = this.sortMethod(\n this.data === rows ? rows.slice() : rows,\n sortBy,\n descending\n )\n }\n\n return rows\n },\n\n filteredSortedRowsNumber () {\n return this.filteredSortedRows.length\n },\n\n computedRows () {\n let rows = this.filteredSortedRows\n\n if (this.isServerSide === true) {\n return rows\n }\n\n const { rowsPerPage } = this.computedPagination\n\n if (rowsPerPage !== 0) {\n if (this.firstRowIndex === 0 && this.data !== rows) {\n if (rows.length > this.lastRowIndex) {\n rows = rows.slice(0, this.lastRowIndex)\n }\n }\n else {\n rows = rows.slice(this.firstRowIndex, this.lastRowIndex)\n }\n }\n\n return rows\n },\n\n computedRowsNumber () {\n return this.isServerSide === true\n ? this.computedPagination.rowsNumber || 0\n : this.filteredSortedRowsNumber\n },\n\n nothingToDisplay () {\n return this.computedRows.length === 0\n },\n\n isServerSide () {\n return this.computedPagination.rowsNumber !== void 0\n },\n\n cardDefaultClass () {\n return ` q-table__card` +\n (this.isDark === true ? ' q-table__card--dark q-dark' : '') +\n (this.square === true ? ` q-table--square` : '') +\n (this.flat === true ? ` q-table--flat` : '') +\n (this.bordered === true ? ` q-table--bordered` : '')\n },\n\n __containerClass () {\n return `q-table__container q-table--${this.separator}-separator column no-wrap` +\n (this.grid === true ? ' q-table--grid' : this.cardDefaultClass) +\n (this.isDark === true ? ` q-table--dark` : '') +\n (this.dense === true ? ` q-table--dense` : '') +\n (this.wrapCells === false ? ` q-table--no-wrap` : '') +\n (this.inFullscreen === true ? ` fullscreen scroll` : '')\n },\n\n containerClass () {\n // do not trigger a refresh of the table when the loading status is changed\n return this.__containerClass +\n (this.loading === true ? ' q-table--loading' : '')\n },\n\n virtProps () {\n const props = {}\n\n commonVirtPropsList\n .forEach(p => { props[p] = this[p] })\n\n if (props.virtualScrollItemSize === void 0) {\n props.virtualScrollItemSize = this.dense === true ? 28 : 48\n }\n\n return props\n }\n },\n\n render (h) {\n const child = [ this.__getTopDiv(h) ]\n const data = { staticClass: this.containerClass }\n\n if (this.grid === true) {\n child.push(this.__getGridHeader(h))\n }\n else {\n Object.assign(data, {\n class: this.cardClass,\n style: this.cardStyle\n })\n }\n\n child.push(\n this.__getBody(h),\n this.__getBottomDiv(h)\n )\n\n if (this.loading === true && this.$scopedSlots.loading !== void 0) {\n child.push(\n this.$scopedSlots.loading()\n )\n }\n\n return h('div', data, child)\n },\n\n methods: {\n requestServerInteraction (prop = {}) {\n this.$nextTick(() => {\n this.$emit('request', {\n pagination: prop.pagination || this.computedPagination,\n filter: prop.filter || this.filter,\n getCellValue: this.getCellValue\n })\n })\n },\n\n resetVirtualScroll () {\n this.hasVirtScroll === true && this.$refs.virtScroll.reset()\n },\n\n __getBody (h) {\n if (this.grid === true) {\n return this.__getGridBody(h)\n }\n\n const header = this.hideHeader !== true ? this.__getTHead(h) : null\n\n if (this.hasVirtScroll === true) {\n const topRow = this.$scopedSlots['top-row']\n const bottomRow = this.$scopedSlots['bottom-row']\n\n const virtSlots = {\n default: this.__getVirtualTBodyTR(h)\n }\n\n if (topRow !== void 0) {\n const topContent = h('tbody', topRow({ cols: this.computedCols }))\n\n virtSlots.before = header === null\n ? () => [topContent]\n : () => [header].concat(topContent)\n }\n else if (header !== null) {\n virtSlots.before = () => header\n }\n\n if (bottomRow !== void 0) {\n virtSlots.after = () => h('tbody', bottomRow({ cols: this.computedCols }))\n }\n\n return h(QVirtualScroll, {\n ref: 'virtScroll',\n props: {\n ...this.virtProps,\n items: this.computedRows,\n type: '__qtable',\n tableColspan: this.computedColspan\n },\n on: cache(this, 'vs', {\n 'virtual-scroll': this.__onVScroll\n }),\n class: this.tableClass,\n style: this.tableStyle,\n scopedSlots: virtSlots\n })\n }\n\n return getTableMiddle(h, {\n staticClass: 'scroll',\n class: this.tableClass,\n style: this.tableStyle\n }, [\n header,\n this.__getTBody(h)\n ])\n },\n\n scrollTo (toIndex, edge) {\n if (this.$refs.virtScroll !== void 0) {\n this.$refs.virtScroll.scrollTo(toIndex, edge)\n return\n }\n\n toIndex = parseInt(toIndex, 10)\n const rowEl = this.$el.querySelector(`tbody tr:nth-of-type(${toIndex + 1})`)\n\n if (rowEl !== null) {\n const scrollTarget = this.$el.querySelector('.q-table__middle.scroll')\n const { offsetTop } = rowEl\n const direction = offsetTop < scrollTarget.scrollTop ? 'decrease' : 'increase'\n\n scrollTarget.scrollTop = offsetTop\n\n this.$emit('virtual-scroll', {\n index: toIndex,\n from: 0,\n to: this.pagination.rowsPerPage - 1,\n direction\n })\n }\n },\n\n __onVScroll (info) {\n this.$emit('virtual-scroll', info)\n },\n\n __getProgress (h) {\n return [\n h(QLinearProgress, {\n staticClass: 'q-table__linear-progress',\n props: {\n color: this.color,\n dark: this.isDark,\n indeterminate: true,\n trackColor: 'transparent'\n }\n })\n ]\n }\n }\n})\n","import { render, staticRenderFns } from \"./datatable.vue?vue&type=template&id=192e2602&\"\nimport script from \"./datatable.vue?vue&type=script&lang=js&\"\nexport * from \"./datatable.vue?vue&type=script&lang=js&\"\nimport style0 from \"./datatable.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\nimport QTable from 'quasar/src/components/table/QTable.js';\nimport QTd from 'quasar/src/components/table/QTd.js';\nimport QBtn from 'quasar/src/components/btn/QBtn.js';\nimport qInstall from \"../../../node_modules/vue-cli-plugin-quasar/lib/runtime.auto-import.js\";\nqInstall(component, 'components', {QTable,QTd,QBtn});\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/vue-cli-plugin-quasar/lib/loader.auto-import.js?kebab!../../../node_modules/cache-loader/dist/cjs.js??ref--0-1!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./datatable.vue?vue&type=style&index=0&lang=scss&\"","import History from '../history.js'\n\nexport default {\n props: {\n fullscreen: Boolean,\n noRouteFullscreenExit: Boolean\n },\n\n data () {\n return {\n inFullscreen: false\n }\n },\n\n watch: {\n $route () {\n this.noRouteFullscreenExit !== true && this.exitFullscreen()\n },\n\n fullscreen (v) {\n if (this.inFullscreen !== v) {\n this.toggleFullscreen()\n }\n },\n\n inFullscreen (v) {\n this.$emit('update:fullscreen', v)\n this.$emit('fullscreen', v)\n }\n },\n\n methods: {\n toggleFullscreen () {\n if (this.inFullscreen === true) {\n this.exitFullscreen()\n }\n else {\n this.setFullscreen()\n }\n },\n\n setFullscreen () {\n if (this.inFullscreen === true) {\n return\n }\n\n this.inFullscreen = true\n this.container = this.$el.parentNode\n this.container.replaceChild(this.fullscreenFillerNode, this.$el)\n document.body.appendChild(this.$el)\n document.body.classList.add('q-body--fullscreen-mixin')\n\n this.__historyFullscreen = {\n handler: this.exitFullscreen\n }\n History.add(this.__historyFullscreen)\n },\n\n exitFullscreen () {\n if (this.inFullscreen !== true) {\n return\n }\n\n if (this.__historyFullscreen !== void 0) {\n History.remove(this.__historyFullscreen)\n this.__historyFullscreen = void 0\n }\n this.container.replaceChild(this.$el, this.fullscreenFillerNode)\n document.body.classList.remove('q-body--fullscreen-mixin')\n this.inFullscreen = false\n\n if (this.$el.scrollIntoView !== void 0) {\n setTimeout(() => { this.$el.scrollIntoView() })\n }\n }\n },\n\n beforeMount () {\n this.fullscreenFillerNode = document.createElement('span')\n },\n\n mounted () {\n this.fullscreen === true && this.setFullscreen()\n },\n\n beforeDestroy () {\n this.exitFullscreen()\n }\n}\n","import Vue from 'vue'\n\nimport ListenersMixin from '../../mixins/listeners.js'\n\nimport { slot } from '../../utils/slot.js'\n\nexport default Vue.extend({\n name: 'QTd',\n\n mixins: [ ListenersMixin ],\n\n props: {\n props: Object,\n autoWidth: Boolean,\n noHover: Boolean\n },\n\n computed: {\n classes () {\n return 'q-td' + (this.autoWidth === true ? ' q-table--col-auto-width' : '') +\n (this.noHover === true ? ' q-td--no-hover' : '') + ' '\n }\n },\n\n render (h) {\n const on = this.qListeners\n\n if (this.props === void 0) {\n return h('td', {\n on,\n class: this.classes\n }, slot(this, 'default'))\n }\n\n const name = this.$vnode.key\n\n const col = this.props.colsMap !== void 0 && name\n ? this.props.colsMap[name]\n : this.props.col\n\n if (col === void 0) { return }\n\n const row = this.props.row\n\n return h('td', {\n on,\n style: col.__tdStyle(row),\n class: this.classes + col.__tdClass(row)\n }, slot(this, 'default'))\n }\n})\n"],"sourceRoot":""}