Skip to content

Commit

Permalink
bundle re-generated
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed Oct 12, 2018
1 parent 0f62ab7 commit 180c59c
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 1,904 deletions.
52 changes: 32 additions & 20 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.14.7
* vue-good-table v2.15.1
* (c) 2018-present xaksis <[email protected]>
* https://github.com/xaksis/vue-good-table
* Released under the MIT License.
Expand All @@ -12,13 +12,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var diacriticless = _interopDefault(require('diacriticless'));
var cloneDeep = _interopDefault(require('lodash.clonedeep'));
var clone = _interopDefault(require('lodash.clonedeep'));
var assign = _interopDefault(require('lodash.assign'));
var format = _interopDefault(require('date-fns/format'));
var parse = _interopDefault(require('date-fns/parse'));
var isValid = _interopDefault(require('date-fns/isValid'));
var compareAsc = _interopDefault(require('date-fns/compareAsc'));
var clone = _interopDefault(require('lodash.clone'));
var each = _interopDefault(require('lodash.foreach'));
var filter = _interopDefault(require('lodash.filter'));

Expand Down Expand Up @@ -65,17 +64,19 @@ var def = {
return x;
},
filterPredicate: function filterPredicate(rowval, filter$$1) {
var skipDiacritics = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

// take care of nulls
if (typeof rowval === 'undefined' || rowval === null) {
return false;
} // row value


var rowValue = diacriticless(String(rowval).toLowerCase()); // search term
var rowValue = skipDiacritics ? String(rowval).toLowerCase() : diacriticless(String(rowval).toLowerCase()); // search term

var searchTerm = diacriticless(escapeRegExp(filter$$1).toLowerCase()); // comparison
var searchTerm = skipDiacritics ? escapeRegExp(filter$$1).toLowerCase() : diacriticless(escapeRegExp(filter$$1).toLowerCase()); // comparison

return rowValue.search(searchTerm) > -1;
return rowValue.indexOf(searchTerm) > -1;
},
compare: function compare(x, y) {
function cook(d) {
Expand Down Expand Up @@ -416,7 +417,7 @@ var VgtPagination = {
this.rowsPerPageOptions = this.customRowsPerPageDropdown;
} else {
//* otherwise we use the default rows per page dropdown
this.rowsPerPageOptions = cloneDeep(DEFAULT_ROWS_PER_PAGE_DROPDOWN);
this.rowsPerPageOptions = clone(DEFAULT_ROWS_PER_PAGE_DROPDOWN);
}

if (this.perPage) {
Expand Down Expand Up @@ -815,6 +816,7 @@ var VgtTableHeader = {
},
data: function data() {
return {
timer: null,
checkBoxThStyle: {},
lineNumberThStyle: {},
columnStyles: []
Expand Down Expand Up @@ -859,7 +861,8 @@ var VgtTableHeader = {
var _this = this;

var colStyles = [];
setTimeout(function () {
if (this.timer) clearTimeout(this.timer);
this.timeout = setTimeout(function () {
for (var i = 0; i < _this.columns.length; i++) {
if (_this.tableRef) {
var skip = 0;
Expand Down Expand Up @@ -893,7 +896,13 @@ var VgtTableHeader = {
return styleObject;
}
},
mounted: function mounted() {},
mounted: function mounted() {
window.addEventListener('resize', this.setColumnStyles);
},
beforeDestroy: function beforeDestroy() {
if (this.timer) clearTimeout(this.timer);
window.removeEventListener('resize', this.setColumnStyles);
},
components: {
'vgt-filter-row': VgtFilterRow
}
Expand Down Expand Up @@ -1182,11 +1191,8 @@ var VueGoodTable = {
}, [_vm._v(" " + _vm._s(_vm.clearSelectionText) + " ")]), _vm._v(" "), _c('div', {
staticClass: "vgt-selection-info-row__actions vgt-pull-right"
}, [_vm._t("selected-row-actions")], 2)]) : _vm._e(), _vm._v(" "), _c('div', {
class: {
'vgt-responsive': _vm.responsive
}
staticClass: "vgt-fixed-header"
}, [_vm.fixedHeader ? _c('table', {
staticClass: "vgt-fixed-header",
class: _vm.tableStyleClasses
}, [_c("vgt-table-header", {
ref: "table-header-secondary",
Expand Down Expand Up @@ -1516,6 +1522,7 @@ var VueGoodTable = {
externalSearchQuery: null,
searchFn: null,
searchPlaceholder: 'Search Table',
searchSkipDiacritics: false,
// internal pagination options
perPage: null,
paginate: false,
Expand Down Expand Up @@ -1746,7 +1753,7 @@ var VueGoodTable = {
}
} else {
// comparison
var matched = def.filterPredicate(_this.collectFormatted(row, col), _this.searchTerm);
var matched = def.filterPredicate(_this.collectFormatted(row, col), _this.searchTerm, _this.searchSkipDiacritics);

if (matched) {
filteredRows.push(row);
Expand All @@ -1769,7 +1776,7 @@ var VueGoodTable = {
var children = filter(filteredRows, ['vgt_id', i]);

if (children.length) {
var newHeaderRow = cloneDeep(headerRow);
var newHeaderRow = clone(headerRow);
newHeaderRow.children = children;
computedRows.push(newHeaderRow);
}
Expand Down Expand Up @@ -1855,15 +1862,15 @@ var VueGoodTable = {
var children = filter(paginatedRows, ['vgt_id', i]);

if (children.length) {
var newHeaderRow = cloneDeep(headerRow);
var newHeaderRow = clone(headerRow);
newHeaderRow.children = children;
reconstructedRows.push(newHeaderRow);
}
});
return reconstructedRows;
},
originalRows: function originalRows() {
var rows = cloneDeep(this.rows);
var rows = clone(this.rows);
var nestedRows = [];

if (!this.groupOptions.enabled) {
Expand Down Expand Up @@ -2073,7 +2080,7 @@ var VueGoodTable = {
this.handleSearch(); // we reset the filteredRows here because
// we want to search across everything.

this.filteredRows = cloneDeep(this.originalRows);
this.filteredRows = clone(this.originalRows);
this.forceSearch = true;
this.sortChanged = true;
}
Expand Down Expand Up @@ -2192,7 +2199,7 @@ var VueGoodTable = {
// this is invoked either as a result of changing filters
// or as a result of modifying rows.
this.columnFilters = columnFilters;
var computedRows = cloneDeep(this.originalRows); // do we have a filter to care about?
var computedRows = clone(this.originalRows); // do we have a filter to care about?
// if not we don't need to do anything

if (this.columnFilters && Object.keys(this.columnFilters).length) {
Expand Down Expand Up @@ -2387,7 +2394,8 @@ var VueGoodTable = {
trigger = _this$searchOptions.trigger,
externalQuery = _this$searchOptions.externalQuery,
searchFn = _this$searchOptions.searchFn,
placeholder = _this$searchOptions.placeholder;
placeholder = _this$searchOptions.placeholder,
skipDiacritics = _this$searchOptions.skipDiacritics;

if (typeof enabled === 'boolean') {
this.searchEnabled = enabled;
Expand All @@ -2408,6 +2416,10 @@ var VueGoodTable = {
if (typeof placeholder === 'string') {
this.searchPlaceholder = placeholder;
}

if (typeof skipDiacritics === 'boolean') {
this.searchSkipDiacritics = skipDiacritics;
}
},
initializeSort: function initializeSort() {
var _this$sortOptions = this.sortOptions,
Expand Down
9 changes: 6 additions & 3 deletions dist/vue-good-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
.vgt-wrap {
position: relative; }

.vgt-fixed-header {
position: absolute;
z-index: 10;
width: 100%;
overflow-x: auto; }

table.vgt-table {
font-size: 16px;
border-collapse: collapse;
Expand All @@ -39,9 +45,6 @@ table.vgt-table {
max-width: 100%;
table-layout: auto;
border: 1px solid #DCDFE6; }
table.vgt-table.vgt-fixed-header {
position: absolute;
z-index: 10; }
table.vgt-table td {
padding: .75em .75em .75em .75em;
vertical-align: top;
Expand Down
52 changes: 32 additions & 20 deletions dist/vue-good-table.es.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
/**
* vue-good-table v2.14.7
* vue-good-table v2.15.1
* (c) 2018-present xaksis <[email protected]>
* https://github.com/xaksis/vue-good-table
* Released under the MIT License.
*/

import diacriticless from 'diacriticless';
import cloneDeep from 'lodash.clonedeep';
import clone from 'lodash.clonedeep';
import assign from 'lodash.assign';
import format from 'date-fns/format';
import parse from 'date-fns/parse';
import isValid from 'date-fns/isValid';
import compareAsc from 'date-fns/compareAsc';
import clone from 'lodash.clone';
import each from 'lodash.foreach';
import filter from 'lodash.filter';

Expand Down Expand Up @@ -59,17 +58,19 @@ var def = {
return x;
},
filterPredicate: function filterPredicate(rowval, filter$$1) {
var skipDiacritics = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

// take care of nulls
if (typeof rowval === 'undefined' || rowval === null) {
return false;
} // row value


var rowValue = diacriticless(String(rowval).toLowerCase()); // search term
var rowValue = skipDiacritics ? String(rowval).toLowerCase() : diacriticless(String(rowval).toLowerCase()); // search term

var searchTerm = diacriticless(escapeRegExp(filter$$1).toLowerCase()); // comparison
var searchTerm = skipDiacritics ? escapeRegExp(filter$$1).toLowerCase() : diacriticless(escapeRegExp(filter$$1).toLowerCase()); // comparison

return rowValue.search(searchTerm) > -1;
return rowValue.indexOf(searchTerm) > -1;
},
compare: function compare(x, y) {
function cook(d) {
Expand Down Expand Up @@ -410,7 +411,7 @@ var VgtPagination = {
this.rowsPerPageOptions = this.customRowsPerPageDropdown;
} else {
//* otherwise we use the default rows per page dropdown
this.rowsPerPageOptions = cloneDeep(DEFAULT_ROWS_PER_PAGE_DROPDOWN);
this.rowsPerPageOptions = clone(DEFAULT_ROWS_PER_PAGE_DROPDOWN);
}

if (this.perPage) {
Expand Down Expand Up @@ -809,6 +810,7 @@ var VgtTableHeader = {
},
data: function data() {
return {
timer: null,
checkBoxThStyle: {},
lineNumberThStyle: {},
columnStyles: []
Expand Down Expand Up @@ -853,7 +855,8 @@ var VgtTableHeader = {
var _this = this;

var colStyles = [];
setTimeout(function () {
if (this.timer) clearTimeout(this.timer);
this.timeout = setTimeout(function () {
for (var i = 0; i < _this.columns.length; i++) {
if (_this.tableRef) {
var skip = 0;
Expand Down Expand Up @@ -887,7 +890,13 @@ var VgtTableHeader = {
return styleObject;
}
},
mounted: function mounted() {},
mounted: function mounted() {
window.addEventListener('resize', this.setColumnStyles);
},
beforeDestroy: function beforeDestroy() {
if (this.timer) clearTimeout(this.timer);
window.removeEventListener('resize', this.setColumnStyles);
},
components: {
'vgt-filter-row': VgtFilterRow
}
Expand Down Expand Up @@ -1176,11 +1185,8 @@ var VueGoodTable = {
}, [_vm._v(" " + _vm._s(_vm.clearSelectionText) + " ")]), _vm._v(" "), _c('div', {
staticClass: "vgt-selection-info-row__actions vgt-pull-right"
}, [_vm._t("selected-row-actions")], 2)]) : _vm._e(), _vm._v(" "), _c('div', {
class: {
'vgt-responsive': _vm.responsive
}
staticClass: "vgt-fixed-header"
}, [_vm.fixedHeader ? _c('table', {
staticClass: "vgt-fixed-header",
class: _vm.tableStyleClasses
}, [_c("vgt-table-header", {
ref: "table-header-secondary",
Expand Down Expand Up @@ -1510,6 +1516,7 @@ var VueGoodTable = {
externalSearchQuery: null,
searchFn: null,
searchPlaceholder: 'Search Table',
searchSkipDiacritics: false,
// internal pagination options
perPage: null,
paginate: false,
Expand Down Expand Up @@ -1740,7 +1747,7 @@ var VueGoodTable = {
}
} else {
// comparison
var matched = def.filterPredicate(_this.collectFormatted(row, col), _this.searchTerm);
var matched = def.filterPredicate(_this.collectFormatted(row, col), _this.searchTerm, _this.searchSkipDiacritics);

if (matched) {
filteredRows.push(row);
Expand All @@ -1763,7 +1770,7 @@ var VueGoodTable = {
var children = filter(filteredRows, ['vgt_id', i]);

if (children.length) {
var newHeaderRow = cloneDeep(headerRow);
var newHeaderRow = clone(headerRow);
newHeaderRow.children = children;
computedRows.push(newHeaderRow);
}
Expand Down Expand Up @@ -1849,15 +1856,15 @@ var VueGoodTable = {
var children = filter(paginatedRows, ['vgt_id', i]);

if (children.length) {
var newHeaderRow = cloneDeep(headerRow);
var newHeaderRow = clone(headerRow);
newHeaderRow.children = children;
reconstructedRows.push(newHeaderRow);
}
});
return reconstructedRows;
},
originalRows: function originalRows() {
var rows = cloneDeep(this.rows);
var rows = clone(this.rows);
var nestedRows = [];

if (!this.groupOptions.enabled) {
Expand Down Expand Up @@ -2067,7 +2074,7 @@ var VueGoodTable = {
this.handleSearch(); // we reset the filteredRows here because
// we want to search across everything.

this.filteredRows = cloneDeep(this.originalRows);
this.filteredRows = clone(this.originalRows);
this.forceSearch = true;
this.sortChanged = true;
}
Expand Down Expand Up @@ -2186,7 +2193,7 @@ var VueGoodTable = {
// this is invoked either as a result of changing filters
// or as a result of modifying rows.
this.columnFilters = columnFilters;
var computedRows = cloneDeep(this.originalRows); // do we have a filter to care about?
var computedRows = clone(this.originalRows); // do we have a filter to care about?
// if not we don't need to do anything

if (this.columnFilters && Object.keys(this.columnFilters).length) {
Expand Down Expand Up @@ -2381,7 +2388,8 @@ var VueGoodTable = {
trigger = _this$searchOptions.trigger,
externalQuery = _this$searchOptions.externalQuery,
searchFn = _this$searchOptions.searchFn,
placeholder = _this$searchOptions.placeholder;
placeholder = _this$searchOptions.placeholder,
skipDiacritics = _this$searchOptions.skipDiacritics;

if (typeof enabled === 'boolean') {
this.searchEnabled = enabled;
Expand All @@ -2402,6 +2410,10 @@ var VueGoodTable = {
if (typeof placeholder === 'string') {
this.searchPlaceholder = placeholder;
}

if (typeof skipDiacritics === 'boolean') {
this.searchSkipDiacritics = skipDiacritics;
}
},
initializeSort: function initializeSort() {
var _this$sortOptions = this.sortOptions,
Expand Down
Loading

0 comments on commit 180c59c

Please sign in to comment.