Skip to content

Commit

Permalink
version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed Jul 22, 2020
1 parent 7cf9f17 commit ce68b00
Show file tree
Hide file tree
Showing 42 changed files with 502 additions and 174 deletions.
143 changes: 126 additions & 17 deletions dist/vue-good-table.cjs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* vue-good-table v2.19.5
* vue-good-table v2.20.0
* (c) 2018-present xaksis <[email protected]>
* https://github.com/xaksis/vue-good-table
* Released under the MIT License.
Expand Down Expand Up @@ -8645,6 +8645,32 @@ var VgtTableHeader = normalizeComponent_1({
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var script$5 = {
name: 'VgtHeaderRow',
props: {
Expand All @@ -8660,6 +8686,9 @@ var script$5 = {
selectable: {
type: Boolean
},
selectAllByGroup: {
type: Boolean
},
collapsable: {
type: [Boolean, Number],
"default": false
Expand All @@ -8675,19 +8704,36 @@ var script$5 = {
},
fullColspan: {
type: Number
},
groupIndex: {
type: Number
}
},
data: function data() {
return {};
},
computed: {},
computed: {
allSelected: function allSelected() {
var headerRow = this.headerRow,
groupChildObject = this.groupChildObject;
return headerRow.children.filter(function (row) {
return row.vgtSelected;
}).length === headerRow.children.length;
}
},
methods: {
columnCollapsable: function columnCollapsable(currentIndex) {
if (this.collapsable === true) {
return currentIndex === 0;
}

return currentIndex === this.collapsable;
},
toggleSelectGroup: function toggleSelectGroup(event) {
this.$emit('on-select-group-change', {
groupIndex: this.groupIndex,
checked: event.target.checked
});
}
},
mounted: function mounted() {},
Expand All @@ -8709,7 +8755,23 @@ var __vue_render__$5 = function __vue_render__() {
staticClass: "vgt-left-align vgt-row-header",
attrs: {
"colspan": _vm.fullColspan
}
}, [_vm.selectAllByGroup ? [_vm._t("table-header-group-select", [_c('input', {
attrs: {
"type": "checkbox"
},
domProps: {
"checked": _vm.allSelected
},
on: {
"change": function change($event) {
return _vm.toggleSelectGroup($event);
}
}
})], {
"columns": _vm.columns,
"row": _vm.headerRow
})] : _vm._e(), _vm._v(" "), _c('span', {
on: {
"click": function click($event) {
_vm.collapsable ? _vm.$emit('vgtExpand', !_vm.headerRow.vgtIsExpanded) : function () {};
Expand All @@ -8724,13 +8786,28 @@ var __vue_render__$5 = function __vue_render__() {
domProps: {
"innerHTML": _vm._s(_vm.headerRow.label)
}
}) : _c('span', [_vm._v("\n " + _vm._s(_vm.headerRow.label) + "\n ")])], {
}) : _c('span', [_vm._v("\n " + _vm._s(_vm.headerRow.label) + "\n ")])], {
"row": _vm.headerRow
})], 2) : _vm._e(), _vm._v(" "), _vm.headerRow.mode !== 'span' && _vm.lineNumbers ? _c('th', {
})], 2)], 2) : _vm._e(), _vm._v(" "), _vm.headerRow.mode !== 'span' && _vm.lineNumbers ? _c('th', {
staticClass: "vgt-row-header"
}) : _vm._e(), _vm._v(" "), _vm.headerRow.mode !== 'span' && _vm.selectable ? _c('th', {
staticClass: "vgt-row-header"
}) : _vm._e(), _vm._v(" "), _vm._l(_vm.columns, function (column, i) {
}, [_vm.selectAllByGroup ? [_vm._t("table-header-group-select", [_c('input', {
attrs: {
"type": "checkbox"
},
domProps: {
"checked": _vm.allSelected
},
on: {
"change": function change($event) {
return _vm.toggleSelectGroup($event);
}
}
})], {
"columns": _vm.columns,
"row": _vm.headerRow
})] : _vm._e()], 2) : _vm._e(), _vm._v(" "), _vm._l(_vm.columns, function (column, i) {
return _vm.headerRow.mode !== 'span' && !column.hidden ? _c('th', {
key: i,
staticClass: "vgt-row-header",
Expand Down Expand Up @@ -13528,7 +13605,8 @@ var script$6 = {
selectionInfoClass: '',
selectionText: 'rows selected',
clearSelectionText: 'clear',
disableSelectInfo: false
disableSelectInfo: false,
selectAllByGroup: false
};
}
},
Expand Down Expand Up @@ -14134,6 +14212,13 @@ var script$6 = {
});
this.emitSelectedRows();
},
toggleSelectGroup: function toggleSelectGroup(event, headerRow) {
var _this8 = this;

lodash_foreach(headerRow.children, function (row) {
_this8.$set(row, 'vgtSelected', event.checked);
});
},
changePage: function changePage(value) {
if (this.paginationOptions.enabled) {
var paginationWidget = this.$refs.paginationBottom;
Expand Down Expand Up @@ -14411,7 +14496,7 @@ var script$6 = {
},
// method to filter rows
filterRows: function filterRows(columnFilters) {
var _this8 = this;
var _this9 = this;

var fromFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
// if (!this.rows.length) return;
Expand Down Expand Up @@ -14452,25 +14537,25 @@ var script$6 = {
}

var _loop = function _loop(i) {
var col = _this8.typedColumns[i];
var col = _this9.typedColumns[i];

if (_this8.columnFilters[col.field]) {
if (_this9.columnFilters[col.field]) {
computedRows = lodash_foreach(computedRows, function (headerRow) {
var newChildren = headerRow.children.filter(function (row) {
// If column has a custom filter, use that.
if (col.filterOptions && typeof col.filterOptions.filterFn === 'function') {
return col.filterOptions.filterFn(_this8.collect(row, col.field), _this8.columnFilters[col.field]);
return col.filterOptions.filterFn(_this9.collect(row, col.field), _this9.columnFilters[col.field]);
}

var filterMultiselect = _this8.filterMultiselectItems(col, row);
var filterMultiselect = _this9.filterMultiselectItems(col, row);

if (filterMultiselect !== undefined) {
return filterMultiselect;
} // Otherwise Use default filters


var typeDef = col.typeDef;
return typeDef.filterPredicate(_this8.collect(row, col.field), _this8.columnFilters[col.field], false, col.filterOptions && _typeof(col.filterOptions.filterDropdownItems) === 'object');
return typeDef.filterPredicate(_this9.collect(row, col.field), _this9.columnFilters[col.field], false, col.filterOptions && _typeof(col.filterOptions.filterDropdownItems) === 'object');
}); // should we remove the header?

headerRow.children = newChildren;
Expand Down Expand Up @@ -14506,16 +14591,23 @@ var script$6 = {
return classes;
},
handleGrouped: function handleGrouped(originalRows) {
var _this10 = this;

lodash_foreach(originalRows, function (headerRow, i) {
headerRow.vgt_header_id = i;

if (_this10.groupOptions.maintainExpanded && _this10.expandedRowKeys.has(headerRow[_this10.groupOptions.rowKey])) {
_this10.$set(headerRow, 'vgtIsExpanded', true);
}

lodash_foreach(headerRow.children, function (childRow) {
childRow.vgt_id = i;
});
});
return originalRows;
},
initializePagination: function initializePagination() {
var _this9 = this;
var _this11 = this;

var _this$paginationOptio = this.paginationOptions,
enabled = _this$paginationOptio.enabled,
Expand Down Expand Up @@ -14593,7 +14685,7 @@ var script$6 = {

if (typeof setCurrentPage === 'number') {
setTimeout(function () {
_this9.changePage(setCurrentPage);
_this11.changePage(setCurrentPage);
}, 500);
}
},
Expand Down Expand Up @@ -14659,7 +14751,8 @@ var script$6 = {
clearSelectionText = _this$selectOptions.clearSelectionText,
selectOnCheckboxOnly = _this$selectOptions.selectOnCheckboxOnly,
selectAllByPage = _this$selectOptions.selectAllByPage,
disableSelectInfo = _this$selectOptions.disableSelectInfo;
disableSelectInfo = _this$selectOptions.disableSelectInfo,
selectAllByGroup = _this$selectOptions.selectAllByGroup;

if (typeof enabled === 'boolean') {
this.selectable = enabled;
Expand All @@ -14673,6 +14766,10 @@ var script$6 = {
this.selectAllByPage = selectAllByPage;
}

if (typeof selectAllByGroup === 'boolean') {
this.selectAllByGroup = selectAllByGroup;
}

if (typeof disableSelectInfo === 'boolean') {
this.disableSelectInfo = disableSelectInfo;
}
Expand Down Expand Up @@ -14864,15 +14961,20 @@ var __vue_render__$6 = function __vue_render__() {
"columns": _vm.columns,
"line-numbers": _vm.lineNumbers,
"selectable": _vm.selectable,
"select-all-by-group": _vm.selectAllByGroup,
"collapsable": _vm.groupOptions.collapsable,
"collect-formatted": _vm.collectFormatted,
"formatted-row": _vm.formattedRow,
"get-classes": _vm.getClasses,
"full-colspan": _vm.fullColspan
"full-colspan": _vm.fullColspan,
"groupIndex": index
},
on: {
"vgtExpand": function vgtExpand($event) {
return _vm.toggleExpand(headerRow[_vm.rowKeyField]);
},
"on-select-group-change": function onSelectGroupChange($event) {
return _vm.toggleSelectGroup($event, headerRow);
}
},
scopedSlots: _vm._u([{
Expand Down Expand Up @@ -14952,10 +15054,17 @@ var __vue_render__$6 = function __vue_render__() {
"columns": _vm.columns,
"line-numbers": _vm.lineNumbers,
"selectable": _vm.selectable,
"select-all-by-group": _vm.selectAllByGroup,
"collect-formatted": _vm.collectFormatted,
"formatted-row": _vm.formattedRow,
"get-classes": _vm.getClasses,
"full-colspan": _vm.fullColspan
"full-colspan": _vm.fullColspan,
"groupIndex": index
},
on: {
"on-select-group-change": function onSelectGroupChange($event) {
return _vm.toggleSelectGroup($event, headerRow);
}
},
scopedSlots: _vm._u([{
key: "table-header-row",
Expand Down
Loading

0 comments on commit ce68b00

Please sign in to comment.