Skip to content

Commit

Permalink
Merge pull request #5169 from wenzhixin/develop
Browse files Browse the repository at this point in the history
1.17.1
  • Loading branch information
wenzhixin authored Jul 11, 2020
2 parents 5a11acb + 8dd84e1 commit e80b28e
Show file tree
Hide file tree
Showing 128 changed files with 402 additions and 3,072 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ jobs:
node_js:
- 12
name: "Lint src and check docs"
before_install:
- cd tools
- git clone --depth=1 https://github.com/wenzhixin/bootstrap-table-examples
script: npm run pre-commit
if: type = pull_request
if: branch != master AND type = pull_request

- stage: deploy
name: "Deploy docs"
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ChangeLog
---------

### 1.17.0
### 1.17.1

#### Core

Expand All @@ -20,6 +20,7 @@ ChangeLog
- **New:** Added `formatted` parameter for `getData` method to get formatted data.
- **New:** Added `paginationParts` option instead of `onlyInfoPagination`.
- **New:** Added `sortReset` option to reset sort on third click.
- **New:** Added support for auto merge the table body cells.
- **Update:** Fixed `updateByUniqueId` method cannot update multiple rows bug.
- **Update:** Fixed `insertRow` not write to source data array bug.
- **Update:** Fixed events bug with `detailViewIcon` option.
Expand All @@ -30,7 +31,9 @@ ChangeLog
- **Update:** Fixed `font-size` of the loading text.
- **Update:** Fixed table `border` bug when table is hidden.
- **Update:** Fixed `showRow` method show all hidden rows bug.
- **Update:** Fixed columnsSearch non-unique id warning.
- **Remove:** Removed the `onlyInfoPagination` option.
- **Remove:** Removed accent neutralise extension and moved it to core.

#### Extensions

Expand All @@ -49,6 +52,7 @@ ChangeLog
- **Update(accent-neutralise):** Fixed comparison with arrays.
- **Update(cookie):** Updated cookie columns to always visible when `switchable` is `false`.
- **Update(cookie):** Fixed cookie value from existing options bug.
- **Update(copy-rows):** Fixed copy rows bug with fixed-column.
- **Update(editable):** Fixed not handle quotation marks bug.
- **Update(editable):** Updated `noeditFormatter` to `noEditFormatter`.
- **Update(export):** Fixed export error with `maintainMetaData` and `clientSidePagination`.
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ algolia:
index_name: bootstrap-table

# Custom variables
current_version: 1.17.0
current_version: 1.17.1
title: "Bootstrap Table"
description: "An extended table to the integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)"
authors: "Zhixin Wen, and Bootstrap Table contributors"
Expand Down
2 changes: 1 addition & 1 deletion bootstrap-table.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-table",
"version": "1.17.0",
"version": "1.17.1",
"title": "Bootstrap Table",
"description": "An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion dist/bootstrap-table-locale-all.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/bootstrap-table-vue.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,10 @@ function _nonIterableSpread() {
var $ = window.jQuery;

var deepCopy = function deepCopy(arg) {
if (arg === undefined) {
return arg;
}

return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
};

Expand Down
4 changes: 2 additions & 2 deletions dist/bootstrap-table-vue.esm.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/bootstrap-table-vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2052,6 +2052,10 @@
var $ = window.jQuery;

var deepCopy = function deepCopy(arg) {
if (arg === undefined) {
return arg;
}

return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
};

Expand Down
4 changes: 2 additions & 2 deletions dist/bootstrap-table-vue.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bootstrap-table.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @author zhixin wen <[email protected]>
* version: 1.17.0
* version: 1.17.1
* https://github.com/wenzhixin/bootstrap-table/
*/
.bootstrap-table .fixed-table-toolbar::after {
Expand Down
138 changes: 126 additions & 12 deletions dist/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,7 @@
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}

var VERSION = '1.17.0';
var VERSION = '1.17.1';
var bootstrapVersion = 4;

try {
Expand Down Expand Up @@ -3104,6 +3104,7 @@
footerStyle: function footerStyle(column) {
return {};
},
searchAccentNeutralise: false,
showColumns: false,
showColumnsToggleAll: false,
showColumnsSearch: false,
Expand Down Expand Up @@ -3148,7 +3149,6 @@
buttonsPrefix: CONSTANTS.classes.buttonsPrefix,
buttonsClass: CONSTANTS.classes.buttons,
icons: CONSTANTS.icons,
html: CONSTANTS.html,
iconSize: undefined,
iconsPrefix: CONSTANTS.iconsPrefix,
// glyphicon or fa(font-awesome)
Expand Down Expand Up @@ -3405,6 +3405,70 @@
}
});

var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;






var nativeEndsWith = ''.endsWith;
var min$5 = Math.min;

var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('endsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
var descriptor = getOwnPropertyDescriptor$3(String.prototype, 'endsWith');
return descriptor && !descriptor.writable;
}();

// `String.prototype.endsWith` method
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
_export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = String(requireObjectCoercible(this));
notARegexp(searchString);
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
var len = toLength(that.length);
var end = endPosition === undefined ? len : min$5(toLength(endPosition), len);
var search = String(searchString);
return nativeEndsWith
? nativeEndsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});

var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f;






var nativeStartsWith = ''.startsWith;
var min$6 = Math.min;

var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('startsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
var descriptor = getOwnPropertyDescriptor$4(String.prototype, 'startsWith');
return descriptor && !descriptor.writable;
}();

// `String.prototype.startsWith` method
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
_export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = String(requireObjectCoercible(this));
notARegexp(searchString);
var index = toLength(min$6(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return nativeStartsWith
? nativeStartsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});

var Utils = {
// it only does '%s', and return '' when arguments are undefined
sprintf: function sprintf(_str) {
Expand Down Expand Up @@ -3549,6 +3613,9 @@
}
}
},
normalizeAccent: function normalizeAccent(string) {
return string.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
},
updateFieldGroup: function updateFieldGroup(columns) {
var _ref;

Expand Down Expand Up @@ -3904,6 +3971,40 @@
},
hasDetailViewIcon: function hasDetailViewIcon(options) {
return options.detailView && options.detailViewIcon && !options.cardView;
},
checkAutoMergeCells: function checkAutoMergeCells(data) {
var _iteratorNormalCompletion9 = true;
var _didIteratorError9 = false;
var _iteratorError9 = undefined;

try {
for (var _iterator9 = data[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {
var row = _step9.value;

for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) {
var key = _Object$keys[_i4];

if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) {
return true;
}
}
}
} catch (err) {
_didIteratorError9 = true;
_iteratorError9 = err;
} finally {
try {
if (!_iteratorNormalCompletion9 && _iterator9.return != null) {
_iterator9.return();
}
} finally {
if (_didIteratorError9) {
throw _iteratorError9;
}
}
}

return false;
}
};

Expand Down Expand Up @@ -4430,11 +4531,15 @@
} else if (type === 'prepend') {
this.options.data = [].concat(data).concat(this.options.data);
} else {
this.options.data = data || this.options.data;
data = data || this.options.data;
this.options.data = Array.isArray(data) ? data : data[this.options.dataField];
}

this.data = this.options.data;
this.unsortedData = _toConsumableArray(this.data);
this.data = _toConsumableArray(this.options.data);

if (this.options.sortReset) {
this.unsortedData = _toConsumableArray(this.data);
}

if (this.options.sidePagination === 'server') {
return;
Expand Down Expand Up @@ -4495,8 +4600,8 @@
_this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass);
}, 250);
}
} else {
this.data = this.unsortedData;
} else if (this.options.sortReset) {
this.data = _toConsumableArray(this.unsortedData);
}
}
}, {
Expand Down Expand Up @@ -4584,7 +4689,7 @@
html.push("<div class=\"keep-open ".concat(_this4.constants.classes.buttonsDropdown, "\" title=\"").concat(opts.formatColumns(), "\">\n <button class=\"").concat(_this4.constants.buttonsClass, " dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\"\n aria-label=\"Columns\" title=\"").concat(opts.formatColumns(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(_this4.constants.html.icon, opts.iconsPrefix, opts.icons.columns) : '', "\n ").concat(opts.showButtonText ? opts.formatColumns() : '', "\n ").concat(_this4.constants.html.dropdownCaret, "\n </button>\n ").concat(_this4.constants.html.toolbarDropdown[0]));

if (opts.showColumnsSearch) {
html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="text" class="%s" id="columnsSearch" placeholder="%s" autocomplete="off">', _this4.constants.classes.input, opts.formatSearch())));
html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="text" class="%s" name="columnsSearch" placeholder="%s" autocomplete="off">', _this4.constants.classes.input, opts.formatSearch())));
html.push(_this4.constants.html.toolbarDropdownSeparator);
}

Expand Down Expand Up @@ -4720,7 +4825,7 @@
});

if (opts.showColumnsSearch) {
var $columnsSearch = $keepOpen.find('#columnsSearch');
var $columnsSearch = $keepOpen.find('[name="columnsSearch"]');
var $listItems = $keepOpen.find('.dropdown-item-marker');
$columnsSearch.on('keyup paste change', function (_ref4) {
var currentTarget = _ref4.currentTarget;
Expand Down Expand Up @@ -4889,7 +4994,7 @@
}

return true;
}) : this.options.data;
}) : _toConsumableArray(this.options.data);
}

var visibleFields = this.getVisibleFields();
Expand All @@ -4914,6 +5019,10 @@
}
} else {
value = item[key];
}

if (_this5.options.searchAccentNeutralise) {
value = Utils.normalizeAccent(value);
} // Fix #142: respect searchFormatter boolean


Expand Down Expand Up @@ -4973,7 +5082,11 @@

return false;
}) : this.data;
this.unsortedData = _toConsumableArray(this.data);

if (this.options.sortReset) {
this.unsortedData = _toConsumableArray(this.data);
}

this.initSort();
}
}
Expand Down Expand Up @@ -5394,7 +5507,7 @@
var title_ = '';
var column = _this7.columns[j];

if (_this7.fromHtml && typeof value_ === 'undefined') {
if ((_this7.fromHtml || _this7.autoMergeCells) && typeof value_ === 'undefined') {
if (!column.checkbox && !column.radio) {
return;
}
Expand Down Expand Up @@ -5533,6 +5646,7 @@
var rows = [];
var trFragments = $(document.createDocumentFragment());
var hasTr = false;
this.autoMergeCells = Utils.checkAutoMergeCells(data.slice(this.pageFrom - 1, this.pageTo));

for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
var item = data[i];
Expand Down
2 changes: 1 addition & 1 deletion dist/bootstrap-table.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/bootstrap-table.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit e80b28e

Please sign in to comment.