Socket
Socket
Sign inDemoInstall

bootstrap-table

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-table - npm Package Compare versions

Comparing version 1.13.1 to 1.13.2

.browserslistrc

5

.eslintrc.js

@@ -66,3 +66,3 @@ module.exports = {

'comma-dangle': ['error', 'never'],
'no-param-reassign': 'warn',
'no-param-reassign': 'off',
"space-before-function-paren": ["error", "always"]

@@ -72,4 +72,5 @@ },

'$': true,
'jQuery': true
'jQuery': true,
'adsbygoogle': true
}
}

4

bootstrap-table.jquery.json
{
"name": "bootstrap-table",
"version": "1.13.1",
"version": "1.13.2",
"title": "Bootstrap Table",

@@ -24,3 +24,3 @@ "description": "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features.",

"homepage": "https://github.com/wenzhixin/bootstrap-table",
"demo": "http://bootstrap-table.wenzhixin.net.cn",
"demo": "http://examples.bootstrap-table.com",
"bugs": {

@@ -27,0 +27,0 @@ "url": "https://github.com/wenzhixin/bootstrap-table/issues"

ChangeLog
---------
### 1.13.2
- **New(js):** Added `paginationSuccessivelySize`, `paginationPagesBySide` and `paginationUseIntermediate` pagination options.
- **New(cookie extension):** Rewrited cookie extension to ES6.
- **New(cookie extension):** Saved `filterBy` method.
- **New(filter-control extension):** Added `placeholder` as a empty option to the select controls.
- **New(filter-control extension):** Added `clearFilterControl` method in order to clear all filter controls.
- **New(docs)** Added algolia search.
- **Update(js):** Fixed sort column shows hidden rows in `server` side pagination bug.
- **Update(js):** Fixed `scrollTo` bug.
- **Update(css):** Fixed no-bordered problem of bootstrap v4.
- **Update(filter-control extension):** Added bootstrap v4 icon support.
### 1.13.1

@@ -5,0 +18,0 @@

# Contributing to Bootstrap Table
Looking to contribute something to Bootstrap Table?
Looking to contribute something to Bootstrap Table?

@@ -80,3 +80,3 @@ **Here's how you can help.**

3. **Isolate the problem** — ideally create a live example.
3. **Isolate the problem** — ideally create a live example.
The web tool [jsfiddle](http://jsfiddle.net/) is a very helpful for this. Consider to use these templates:

@@ -86,3 +86,2 @@ * [Table from html](http://jsfiddle.net/wenyi/e3nk137y/11/light/)

* [Table from url](http://jsfiddle.net/wenyi/e3nk137y/14/light/)
* Other templates can also be found at [jsFiddle Bootstrap](http://bootstrap-table.wenzhixin.net.cn/examples/#basic)

@@ -253,2 +252,2 @@

<a href="https://opencollective.com/bootstrap-table/sponsor/8/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-table/sponsor/9/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/bootstrap-table/sponsor/9/website" target="_blank"><img src="https://opencollective.com/bootstrap-table/sponsor/9/avatar.svg"></a>
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -35,3 +35,3 @@ * @license MIT

(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableIdID={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['id-ID']={formatLoadingMessage:function(){return'Memuat, mohon tunggu...'},formatRecordsPerPage:function(a){return a+' baris per halaman'},formatShowingRows:function(a,b,c){return'Menampilkan '+a+' sampai '+b+' dari '+c+' baris'},formatSearch:function(){return'Pencarian'},formatNoMatches:function(){return'Tidak ditemukan data yang cocok'},formatPaginationSwitch:function(){return'Sembunyikan/Tampilkan halaman'},formatRefresh:function(){return'Muat ulang'},formatToggle:function(){return'Beralih'},formatColumns:function(){return'kolom'},formatAllRows:function(){return'Semua'},formatExport:function(){return'Ekspor data'},formatClearFilters:function(){return'Bersihkan filter'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['id-ID'])})(jQuery)});
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableItIT={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['it-IT']={formatLoadingMessage:function(){return'Caricamento in corso...'},formatRecordsPerPage:function(a){return a+' elementi per pagina'},formatShowingRows:function(a,b,c){return'Elementi mostrati da '+a+' a '+b+' (Numero totali di elementi '+c+')'},formatSearch:function(){return'Cerca'},formatNoMatches:function(){return'Nessun elemento trovato'},formatPaginationSwitch:function(){return'Nascondi/Mostra paginazione'},formatRefresh:function(){return'Aggiorna'},formatToggle:function(){return'Attiva/Disattiva'},formatColumns:function(){return'Colonne'},formatAllRows:function(){return'Tutto'},formatExport:function(){return'Esporta dati'},formatClearFilters:function(){return'Pulisci filtri'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['it-IT'])})(jQuery)});
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableItIT={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['it-IT']={formatLoadingMessage:function(){return'Caricamento in corso...'},formatRecordsPerPage:function(a){return a+' elementi per pagina'},formatShowingRows:function(a,b,c){return'Visualizzazione da '+a+' a '+b+' di '+c+' elementi'},formatSearch:function(){return'Cerca'},formatNoMatches:function(){return'Nessun elemento trovato'},formatPaginationSwitch:function(){return'Nascondi/Mostra paginazione'},formatRefresh:function(){return'Aggiorna'},formatToggle:function(){return'Attiva/Disattiva'},formatColumns:function(){return'Colonne'},formatAllRows:function(){return'Tutto'},formatExport:function(){return'Esporta dati'},formatClearFilters:function(){return'Pulisci filtri'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['it-IT'])})(jQuery)});
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableJaJP={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['ja-JP']={formatLoadingMessage:function(){return'\u8AAD\u307F\u8FBC\u307F\u4E2D\u3067\u3059\u3002\u5C11\u3005\u304A\u5F85\u3061\u304F\u3060\u3055\u3044\u3002'},formatRecordsPerPage:function(a){return'\u30DA\u30FC\u30B8\u5F53\u305F\u308A\u6700\u5927'+a+'\u4EF6'},formatShowingRows:function(a,b,c){return'\u5168'+c+'\u4EF6\u304B\u3089\u3001'+a+'\u304B\u3089'+b+'\u4EF6\u76EE\u307E\u3067\u8868\u793A\u3057\u3066\u3044\u307E\u3059'},formatSearch:function(){return'\u691C\u7D22'},formatNoMatches:function(){return'\u8A72\u5F53\u3059\u308B\u30EC\u30B3\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093'},formatPaginationSwitch:function(){return'\u30DA\u30FC\u30B8\u6570\u3092\u8868\u793A\u30FB\u975E\u8868\u793A'},formatRefresh:function(){return'\u66F4\u65B0'},formatToggle:function(){return'\u30C8\u30B0\u30EB'},formatColumns:function(){return'\u5217'},formatAllRows:function(){return'\u3059\u3079\u3066'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['ja-JP'])})(jQuery)});

@@ -38,0 +38,0 @@ (function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableKaGE={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['ka-GE']={formatLoadingMessage:function(){return'\u10D8\u10E2\u10D5\u10D8\u10E0\u10D7\u10D4\u10D1\u10D0, \u10D2\u10D7\u10EE\u10DD\u10D5\u10D7 \u10DB\u10DD\u10D8\u10EA\u10D0\u10D3\u10DD\u10D7...'},formatRecordsPerPage:function(a){return a+' \u10E9\u10D0\u10DC\u10D0\u10EC\u10D4\u10E0\u10D8 \u10D7\u10D8\u10D7\u10DD \u10D2\u10D5\u10D4\u10E0\u10D3\u10D6\u10D4'},formatShowingRows:function(a,b,c){return'\u10DC\u10D0\u10E9\u10D5\u10D4\u10DC\u10D4\u10D1\u10D8\u10D0 '+a+'-\u10D3\u10D0\u10DC '+b+'-\u10DB\u10D3\u10D4 \u10E9\u10D0\u10DC\u10D0\u10EC\u10D4\u10E0\u10D8 \u10EF\u10D0\u10DB\u10E3\u10E0\u10D8 '+c+'-\u10D3\u10D0\u10DC'},formatSearch:function(){return'\u10EB\u10D4\u10D1\u10DC\u10D0'},formatNoMatches:function(){return'\u10DB\u10DD\u10DC\u10D0\u10EA\u10D4\u10DB\u10D4\u10D1\u10D8 \u10D0\u10E0 \u10D0\u10E0\u10D8\u10E1'},formatPaginationSwitch:function(){return'\u10D2\u10D5\u10D4\u10E0\u10D3\u10D4\u10D1\u10D8\u10E1 \u10D2\u10D0\u10D3\u10D0\u10DB\u10E0\u10D7\u10D5\u10D4\u10DA\u10D8\u10E1 \u10D3\u10D0\u10DB\u10D0\u10DA\u10D5\u10D0/\u10D2\u10D0\u10DB\u10DD\u10E9\u10D4\u10DC\u10D0'},formatRefresh:function(){return'\u10D2\u10D0\u10DC\u10D0\u10EE\u10DA\u10D4\u10D1\u10D0'},formatToggle:function(){return'\u10E9\u10D0\u10E0\u10D7\u10D5\u10D0/\u10D2\u10D0\u10DB\u10DD\u10E0\u10D7\u10D5\u10D0'},formatColumns:function(){return'\u10E1\u10D5\u10D4\u10E2\u10D4\u10D1\u10D8'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['ka-GE'])})(jQuery)});

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

(function (global, factory) {
if (typeof define === "function" && define.amd) {
define([], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.bootstrapTableCookie = mod.exports;
}
if (typeof define === "function" && define.amd) {
define([], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.bootstrapTableCookie = mod.exports;
}
})(this, function () {
'use strict';
'use strict';
/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
* @version: v1.2.3
*
* @update zhixin wen <wenzhixin2010@gmail.com>
*/
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
(function ($) {
'use strict';
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
var cookieIds = {
sortOrder: 'bs.table.sortOrder',
sortName: 'bs.table.sortName',
pageNumber: 'bs.table.pageNumber',
pageList: 'bs.table.pageList',
columns: 'bs.table.columns',
searchText: 'bs.table.searchText',
filterControl: 'bs.table.filterControl'
};
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var getCurrentHeader = function getCurrentHeader(that) {
var header = that.$header;
if (that.options.height) {
header = that.$tableHeader;
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return header;
};
return call && (typeof call === "object" || typeof call === "function") ? call : self;
}
var getCurrentSearchControls = function getCurrentSearchControls(that) {
var searchControls = 'select, input';
if (that.options.height) {
searchControls = 'table select, table input';
}
var _get = function get(object, property, receiver) {
if (object === null) object = Function.prototype;
var desc = Object.getOwnPropertyDescriptor(object, property);
return searchControls;
};
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
var cookieEnabled = function cookieEnabled() {
return !!navigator.cookieEnabled;
};
if (parent === null) {
return undefined;
} else {
return get(parent, property, receiver);
}
} else if ("value" in desc) {
return desc.value;
} else {
var getter = desc.get;
var inArrayCookiesEnabled = function inArrayCookiesEnabled(cookieName, cookiesEnabled) {
var index = -1;
if (getter === undefined) {
return undefined;
}
for (var i = 0; i < cookiesEnabled.length; i++) {
if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) {
index = i;
break;
}
}
return getter.call(receiver);
}
};
return index;
};
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
var setCookie = function setCookie(that, cookieName, cookieValue) {
if (!that.options.cookie || !cookieEnabled() || that.options.cookieIdTable === '') {
return;
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return;
}
/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
* @version: v1.2.4
*
* @update zhixin wen <wenzhixin2010@gmail.com>
*/
cookieName = that.options.cookieIdTable + '.' + cookieName;
(function ($) {
var UtilsCookie = {
cookieIds: {
sortOrder: 'bs.table.sortOrder',
sortName: 'bs.table.sortName',
pageNumber: 'bs.table.pageNumber',
pageList: 'bs.table.pageList',
columns: 'bs.table.columns',
searchText: 'bs.table.searchText',
filterControl: 'bs.table.filterControl',
filterBy: 'bs.table.filterBy'
},
getCurrentHeader: function getCurrentHeader(that) {
var header = that.$header;
if (that.options.height) {
header = that.$tableHeader;
}
switch (that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [cookieName, '=', cookieValue, '; expires=' + calculateExpiration(that.options.cookieExpire), that.options.cookiePath ? '; path=' + that.options.cookiePath : '', that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '', that.options.cookieSecure ? '; secure' : ''].join('');
case 'localStorage':
localStorage.setItem(cookieName, cookieValue);
break;
case 'sessionStorage':
sessionStorage.setItem(cookieName, cookieValue);
break;
default:
return false;
}
return header;
},
getCurrentSearchControls: function getCurrentSearchControls(that) {
var searchControls = 'select, input';
if (that.options.height) {
searchControls = 'table select, table input';
}
return true;
};
return searchControls;
},
cookieEnabled: function cookieEnabled() {
return !!navigator.cookieEnabled;
},
inArrayCookiesEnabled: function inArrayCookiesEnabled(cookieName, cookiesEnabled) {
var index = -1;
var getCookie = function getCookie(that, tableName, cookieName) {
if (!cookieName) {
return null;
}
for (var i = 0; i < cookiesEnabled.length; i++) {
if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) {
index = i;
break;
}
}
if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return null;
}
return index;
},
setCookie: function setCookie(that, cookieName, cookieValue) {
if (!that.options.cookie || !UtilsCookie.cookieEnabled() || that.options.cookieIdTable === '') {
return;
}
cookieName = tableName + '.' + cookieName;
if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return;
}
switch (that.options.cookieStorage) {
case 'cookieStorage':
var value = '; ' + document.cookie;
var parts = value.split('; ' + cookieName + '=');
return parts.length === 2 ? parts.pop().split(';').shift() : null;
case 'localStorage':
return localStorage.getItem(cookieName);
case 'sessionStorage':
return sessionStorage.getItem(cookieName);
default:
return null;
}
};
cookieName = that.options.cookieIdTable + '.' + cookieName;
var deleteCookie = function deleteCookie(that, tableName, cookieName) {
cookieName = tableName + '.' + cookieName;
switch (that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [cookieName, '=', cookieValue, '; expires=' + UtilsCookie.calculateExpiration(that.options.cookieExpire), that.options.cookiePath ? '; path=' + that.options.cookiePath : '', that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '', that.options.cookieSecure ? '; secure' : ''].join('');
break;
case 'localStorage':
localStorage.setItem(cookieName, cookieValue);
break;
case 'sessionStorage':
sessionStorage.setItem(cookieName, cookieValue);
break;
default:
return false;
}
switch (that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? '; path=' + that.options.cookiePath : '', that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : ''].join('');
break;
case 'localStorage':
localStorage.removeItem(cookieName);
break;
case 'sessionStorage':
sessionStorage.removeItem(cookieName);
break;
return true;
},
getCookie: function getCookie(that, tableName, cookieName) {
if (!cookieName) {
return null;
}
}
return true;
};
if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return null;
}
var calculateExpiration = function calculateExpiration(cookieExpire) {
var time = cookieExpire.replace(/[0-9]*/, ''); //s,mi,h,d,m,y
cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); //number
cookieName = tableName + '.' + cookieName;
switch (time.toLowerCase()) {
case 's':
cookieExpire = +cookieExpire;
break;
case 'mi':
cookieExpire = cookieExpire * 60;
break;
case 'h':
cookieExpire = cookieExpire * 60 * 60;
break;
case 'd':
cookieExpire = cookieExpire * 24 * 60 * 60;
break;
case 'm':
cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
break;
case 'y':
cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
break;
default:
cookieExpire = undefined;
break;
}
if (!cookieExpire) {
return '';
}
var d = new Date();
d.setTime(d.getTime() + cookieExpire * 1000);
return d.toGMTString();
};
switch (that.options.cookieStorage) {
case 'cookieStorage':
var value = '; ' + document.cookie;
var parts = value.split('; ' + cookieName + '=');
return parts.length === 2 ? parts.pop().split(';').shift() : null;
case 'localStorage':
return localStorage.getItem(cookieName);
case 'sessionStorage':
return sessionStorage.getItem(cookieName);
default:
return null;
}
},
deleteCookie: function deleteCookie(that, tableName, cookieName) {
cookieName = tableName + '.' + cookieName;
var initCookieFilters = function initCookieFilters(bootstrapTable) {
setTimeout(function () {
var parsedCookieFilters = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
switch (that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? '; path=' + that.options.cookiePath : '', that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : ''].join('');
break;
case 'localStorage':
localStorage.removeItem(cookieName);
break;
case 'sessionStorage':
sessionStorage.removeItem(cookieName);
break;
default:
return false;
}
return true;
},
calculateExpiration: function calculateExpiration(cookieExpire) {
var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y
cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number
if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) {
switch (time.toLowerCase()) {
case 's':
cookieExpire = +cookieExpire;
break;
case 'mi':
cookieExpire *= 60;
break;
case 'h':
cookieExpire = cookieExpire * 60 * 60;
break;
case 'd':
cookieExpire = cookieExpire * 24 * 60 * 60;
break;
case 'm':
cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
break;
case 'y':
cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
break;
default:
cookieExpire = undefined;
break;
}
if (!cookieExpire) {
return '';
}
var d = new Date();
d.setTime(d.getTime() + cookieExpire * 1000);
return d.toGMTString();
},
initCookieFilters: function initCookieFilters(bootstrapTable) {
setTimeout(function () {
var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, UtilsCookie.cookieIds.filterControl));
var cachedFilters = {},
header = getCurrentHeader(bootstrapTable),
searchControls = getCurrentSearchControls(bootstrapTable),
applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
$(filteredCookies).each(function (i, cookie) {
if (cookie.text !== '') {
$(element).val(cookie.text);
cachedFilters[cookie.field] = cookie.text;
}
});
};
if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) {
header.find(searchControls).each(function () {
var field = $(this).closest('[data-field]').data('field'),
filteredCookies = $.grep(parsedCookieFilters, function (cookie) {
return cookie.field === field;
});
var cachedFilters = {};
var header = UtilsCookie.getCurrentHeader(bootstrapTable);
var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable);
applyCookieFilters(this, filteredCookies);
});
bootstrapTable.initColumnSearch(cachedFilters);
bootstrapTable.options.filterControlValuesLoaded = true;
bootstrapTable.initServer();
var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
$(filteredCookies).each(function (i, cookie) {
if (cookie.text !== '') {
$(element).val(cookie.text);
cachedFilters[cookie.field] = cookie.text;
}
}, 250);
};
});
};
$.extend($.fn.bootstrapTable.defaults, {
cookie: false,
cookieExpire: '2h',
cookiePath: null,
cookieDomain: null,
cookieSecure: null,
cookieIdTable: '',
cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl'],
cookieStorage: 'cookieStorage', //localStorage, sessionStorage
//internal variable
filterControls: [],
filterControlValuesLoaded: false
});
header.find(searchControls).each(function () {
var field = $(this).closest('[data-field]').data('field');
var filteredCookies = $.grep(parsedCookieFilters, function (cookie) {
return cookie.field === field;
});
$.fn.bootstrapTable.methods.push('getCookies');
$.fn.bootstrapTable.methods.push('deleteCookie');
applyCookieFilters(this, filteredCookies);
});
$.extend($.fn.bootstrapTable.utils, {
setCookie: setCookie,
getCookie: getCookie
});
bootstrapTable.initColumnSearch(cachedFilters);
bootstrapTable.options.filterControlValuesLoaded = true;
bootstrapTable.initServer();
}
}, 250);
}
};
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_init = BootstrapTable.prototype.init,
_initTable = BootstrapTable.prototype.initTable,
_initServer = BootstrapTable.prototype.initServer,
_onSort = BootstrapTable.prototype.onSort,
_onPageNumber = BootstrapTable.prototype.onPageNumber,
_onPageListChange = BootstrapTable.prototype.onPageListChange,
_onPagePre = BootstrapTable.prototype.onPagePre,
_onPageNext = BootstrapTable.prototype.onPageNext,
_toggleColumn = BootstrapTable.prototype.toggleColumn,
_selectPage = BootstrapTable.prototype.selectPage,
_onSearch = BootstrapTable.prototype.onSearch;
$.extend($.fn.bootstrapTable.defaults, {
cookie: false,
cookieExpire: '2h',
cookiePath: null,
cookieDomain: null,
cookieSecure: null,
cookieIdTable: '',
cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy'],
cookieStorage: 'cookieStorage', // localStorage, sessionStorage
// internal variable
filterControls: [],
filterControlValuesLoaded: false
});
BootstrapTable.prototype.init = function () {
this.options.filterControls = [];
this.options.filterControlValuesLoaded = false;
$.fn.bootstrapTable.methods.push('getCookies');
$.fn.bootstrapTable.methods.push('deleteCookie');
this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled;
$.extend($.fn.bootstrapTable.utils, {
setCookie: UtilsCookie.setCookie,
getCookie: UtilsCookie.getCookie
});
if (this.options.filterControl) {
var that = this;
this.$el.on('column-search.bs.table', function (e, field, text) {
var isNewField = true;
$.BootstrapTable = function (_$$BootstrapTable) {
_inherits(_class, _$$BootstrapTable);
for (var i = 0; i < that.options.filterControls.length; i++) {
if (that.options.filterControls[i].field === field) {
that.options.filterControls[i].text = text;
isNewField = false;
break;
}
}
if (isNewField) {
that.options.filterControls.push({
field: field,
text: text
});
}
function _class() {
_classCallCheck(this, _class);
setCookie(that, cookieIds.filterControl, JSON.stringify(that.options.filterControls));
}).on('created-controls.bs.table', initCookieFilters(that));
}
_init.apply(this, Array.prototype.slice.apply(arguments));
};
return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
}
BootstrapTable.prototype.initServer = function () {
var bootstrapTable = this;
if (bootstrapTable.options.cookie && bootstrapTable.options.filterControl && !bootstrapTable.options.filterControlValuesLoaded) {
var cookie = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
if (cookie) return;
}
_initServer.apply(this, Array.prototype.slice.apply(arguments));
};
_createClass(_class, [{
key: 'init',
value: function init() {
// FilterBy logic
var filterByCookie = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.filterBy));
this.filterColumns = filterByCookie ? filterByCookie : {};
BootstrapTable.prototype.initTable = function () {
_initTable.apply(this, Array.prototype.slice.apply(arguments));
this.initCookie();
};
// FilterControl logic
this.options.filterControls = [];
this.options.filterControlValuesLoaded = false;
BootstrapTable.prototype.initCookie = function () {
if (!this.options.cookie) {
return;
}
this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled;
if (this.options.cookieIdTable === '' || this.options.cookieExpire === '' || !cookieEnabled()) {
console.error("Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies");
this.options.cookie = false; //Make sure that the cookie extension is disabled
return;
}
if (this.options.filterControl) {
var that = this;
this.$el.on('column-search.bs.table', function (e, field, text) {
var isNewField = true;
var sortOrderCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortOrder),
sortOrderNameCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortName),
pageNumberCookie = getCookie(this, this.options.cookieIdTable, cookieIds.pageNumber),
pageListCookie = getCookie(this, this.options.cookieIdTable, cookieIds.pageList),
columnsCookie = JSON.parse(getCookie(this, this.options.cookieIdTable, cookieIds.columns)),
searchTextCookie = getCookie(this, this.options.cookieIdTable, cookieIds.searchText);
for (var i = 0; i < that.options.filterControls.length; i++) {
if (that.options.filterControls[i].field === field) {
that.options.filterControls[i].text = text;
isNewField = false;
break;
}
}
if (isNewField) {
that.options.filterControls.push({
field: field,
text: text
});
}
//sortOrder
this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder;
//sortName
this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
//pageNumber
this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber;
//pageSize
this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize;
//searchText
this.options.searchText = searchTextCookie ? searchTextCookie : '';
if (columnsCookie) {
$.each(this.columns, function (i, column) {
column.visible = $.inArray(column.field, columnsCookie) !== -1;
});
UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that.options.filterControls));
}).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
}
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'init', this).call(this);
}
}, {
key: 'initServer',
value: function initServer() {
var bootstrapTable = this;
if (bootstrapTable.options.cookie && bootstrapTable.options.filterControl && !bootstrapTable.options.filterControlValuesLoaded) {
var cookie = JSON.parse(UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, UtilsCookie.cookieIds.filterControl));
if (cookie) {
return;
}
};
}
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'initServer', this).call(this);
}
}, {
key: 'initTable',
value: function initTable() {
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'initTable', this).call(this);
this.initCookie();
}
}, {
key: 'onSort',
value: function onSort() {
var event = arguments[0];
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onSort', this).call(this, event);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
}
}, {
key: 'onPageNumber',
value: function onPageNumber() {
var event = arguments[0];
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onPageNumber', this).call(this, event);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
return false;
}
}, {
key: 'onPageListChange',
value: function onPageListChange() {
var event = arguments[0];
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onPageListChange', this).call(this, event);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
return false;
}
}, {
key: 'onPagePre',
value: function onPagePre() {
var event = arguments[0];
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onPagePre', this).call(this, event);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
return false;
}
}, {
key: 'onPageNext',
value: function onPageNext() {
var event = arguments[0];
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onPageNext', this).call(this, event);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
return false;
}
}, {
key: 'toggleColumn',
value: function toggleColumn() {
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'toggleColumn', this).call(this);
BootstrapTable.prototype.onSort = function () {
_onSort.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.sortOrder, this.options.sortOrder);
setCookie(this, cookieIds.sortName, this.options.sortName);
};
var visibleColumns = [];
BootstrapTable.prototype.onPageNumber = function () {
_onPageNumber.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
$.each(this.columns, function (i, column) {
if (column.visible) {
visibleColumns.push(column.field);
}
});
BootstrapTable.prototype.onPageListChange = function () {
_onPageListChange.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageList, this.options.pageSize);
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(visibleColumns));
}
}, {
key: 'selectPage',
value: function selectPage(page) {
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'selectPage', this).call(this);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page);
}
}, {
key: 'onSearch',
value: function onSearch() {
var target = Array.prototype.slice.apply(arguments);
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'onSearch', this).call(this, this, target);
BootstrapTable.prototype.onPagePre = function () {
_onPagePre.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
if ($(target[0].currentTarget).parent().hasClass('search')) {
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText);
}
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
}
}, {
key: 'filterBy',
value: function filterBy() {
_get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'filterBy', this).call(this);
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
}
}, {
key: 'initCookie',
value: function initCookie() {
if (!this.options.cookie) {
return;
}
BootstrapTable.prototype.onPageNext = function () {
_onPageNext.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
if (this.options.cookieIdTable === '' || this.options.cookieExpire === '' || !UtilsCookie.cookieEnabled()) {
console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.');
this.options.cookie = false; // Make sure that the cookie extension is disabled
return;
}
BootstrapTable.prototype.toggleColumn = function () {
_toggleColumn.apply(this, Array.prototype.slice.apply(arguments));
var sortOrderCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortOrder);
var sortOrderNameCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortName);
var pageNumberCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageNumber);
var pageListCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageList);
var columnsCookie = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.columns));
var searchTextCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.searchText);
var visibleColumns = [];
// sortOrder
this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder;
// sortName
this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
// pageNumber
this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber;
// pageSize
this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize;
// searchText
this.options.searchText = searchTextCookie ? searchTextCookie : '';
if (columnsCookie) {
$.each(this.columns, function (i, column) {
if (column.visible) {
visibleColumns.push(column.field);
}
column.visible = $.inArray(column.field, columnsCookie) !== -1;
});
setCookie(this, cookieIds.columns, JSON.stringify(visibleColumns));
};
BootstrapTable.prototype.selectPage = function (page) {
_selectPage.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, page);
};
BootstrapTable.prototype.onSearch = function () {
var target = Array.prototype.slice.apply(arguments);
_onSearch.apply(this, target);
if ($(target[0].currentTarget).parent().hasClass('search')) {
setCookie(this, cookieIds.searchText, this.searchText);
}
}
}, {
key: 'getCookies',
value: function getCookies() {
var bootstrapTable = this;
var cookies = {};
$.each(UtilsCookie.cookieIds, function (key, value) {
cookies[key] = UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value);
if (key === 'columns') {
cookies[key] = JSON.parse(cookies[key]);
}
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
};
});
return cookies;
}
}, {
key: 'deleteCookie',
value: function deleteCookie(cookieName) {
if (cookieName === '' || !UtilsCookie.cookieEnabled()) {
return;
}
BootstrapTable.prototype.getCookies = function () {
var bootstrapTable = this;
var cookies = {};
$.each(cookieIds, function (key, value) {
cookies[key] = getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value);
if (key === 'columns') {
cookies[key] = JSON.parse(cookies[key]);
}
});
return cookies;
};
UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds[cookieName]);
}
}]);
BootstrapTable.prototype.deleteCookie = function (cookieName) {
if (cookieName === '' || !cookieEnabled()) {
return;
}
deleteCookie(this, this.options.cookieIdTable, cookieIds[cookieName]);
};
})(jQuery);
return _class;
}($.BootstrapTable);
})(jQuery);
});
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -10,2 +10,2 @@ * @license MIT

(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableCookie={exports:{}}.exports}})(this,function(){'use strict';(function(a){var b={sortOrder:'bs.table.sortOrder',sortName:'bs.table.sortName',pageNumber:'bs.table.pageNumber',pageList:'bs.table.pageList',columns:'bs.table.columns',searchText:'bs.table.searchText',filterControl:'bs.table.filterControl'},c=function(a){var b=a.$header;return a.options.height&&(b=a.$tableHeader),b},d=function(a){var b='select, input';return a.options.height&&(b='table select, table input'),b},e=function(){return!!navigator.cookieEnabled},f=function(a,b){for(var c=-1,d=0;d<b.length;d++)if(a.toLowerCase()===b[d].toLowerCase()){c=d;break}return c},g=function(a,b,c){if(a.options.cookie&&e()&&''!==a.options.cookieIdTable&&-1!==f(b,a.options.cookiesEnabled)){switch(b=a.options.cookieIdTable+'.'+b,a.options.cookieStorage){case'cookieStorage':document.cookie=[b,'=',c,'; expires='+j(a.options.cookieExpire),a.options.cookiePath?'; path='+a.options.cookiePath:'',a.options.cookieDomain?'; domain='+a.options.cookieDomain:'',a.options.cookieSecure?'; secure':''].join('');case'localStorage':localStorage.setItem(b,c);break;case'sessionStorage':sessionStorage.setItem(b,c);break;default:return!1;}return!0}},h=function(a,b,c){if(!c)return null;if(-1===f(c,a.options.cookiesEnabled))return null;switch(c=b+'.'+c,a.options.cookieStorage){case'cookieStorage':var d='; '+document.cookie,e=d.split('; '+c+'=');return 2===e.length?e.pop().split(';').shift():null;case'localStorage':return localStorage.getItem(c);case'sessionStorage':return sessionStorage.getItem(c);default:return null;}},i=function(a,b,c){switch(c=b+'.'+c,a.options.cookieStorage){case'cookieStorage':document.cookie=[encodeURIComponent(c),'=','; expires=Thu, 01 Jan 1970 00:00:00 GMT',a.options.cookiePath?'; path='+a.options.cookiePath:'',a.options.cookieDomain?'; domain='+a.options.cookieDomain:''].join('');break;case'localStorage':localStorage.removeItem(c);break;case'sessionStorage':sessionStorage.removeItem(c);}return!0},j=function(a){var b=a.replace(/[0-9]*/,'');switch(a=a.replace(/[A-Za-z]{1,2}/,''),b.toLowerCase()){case's':a=+a;break;case'mi':a*=60;break;case'h':a=60*(60*a);break;case'd':a=60*(60*(24*a));break;case'm':a=60*(60*(24*(30*a)));break;case'y':a=60*(60*(24*(365*a)));break;default:a=void 0;}if(!a)return'';var c=new Date;return c.setTime(c.getTime()+1e3*a),c.toGMTString()},k=function(e){setTimeout(function(){var f=JSON.parse(h(e,e.options.cookieIdTable,b.filterControl));if(!e.options.filterControlValuesLoaded&&f){var g={},i=c(e),j=d(e),k=function(b,c){a(c).each(function(c,d){''!==d.text&&(a(b).val(d.text),g[d.field]=d.text)})};i.find(j).each(function(){var b=a(this).closest('[data-field]').data('field'),c=a.grep(f,function(a){return a.field===b});k(this,c)}),e.initColumnSearch(g),e.options.filterControlValuesLoaded=!0,e.initServer()}},250)};a.extend(a.fn.bootstrapTable.defaults,{cookie:!1,cookieExpire:'2h',cookiePath:null,cookieDomain:null,cookieSecure:null,cookieIdTable:'',cookiesEnabled:['bs.table.sortOrder','bs.table.sortName','bs.table.pageNumber','bs.table.pageList','bs.table.columns','bs.table.searchText','bs.table.filterControl'],cookieStorage:'cookieStorage',filterControls:[],filterControlValuesLoaded:!1}),a.fn.bootstrapTable.methods.push('getCookies'),a.fn.bootstrapTable.methods.push('deleteCookie'),a.extend(a.fn.bootstrapTable.utils,{setCookie:g,getCookie:h});var l=a.fn.bootstrapTable.Constructor,m=l.prototype.init,n=l.prototype.initTable,o=l.prototype.initServer,p=l.prototype.onSort,q=l.prototype.onPageNumber,r=l.prototype.onPageListChange,s=l.prototype.onPagePre,t=l.prototype.onPageNext,u=l.prototype.toggleColumn,v=l.prototype.selectPage,w=l.prototype.onSearch;l.prototype.init=function(){if(this.options.filterControls=[],this.options.filterControlValuesLoaded=!1,this.options.cookiesEnabled='string'==typeof this.options.cookiesEnabled?this.options.cookiesEnabled.replace('[','').replace(']','').replace(/ /g,'').toLowerCase().split(','):this.options.cookiesEnabled,this.options.filterControl){var a=this;this.$el.on('column-search.bs.table',function(c,d,e){for(var f=!0,h=0;h<a.options.filterControls.length;h++)if(a.options.filterControls[h].field===d){a.options.filterControls[h].text=e,f=!1;break}f&&a.options.filterControls.push({field:d,text:e}),g(a,b.filterControl,JSON.stringify(a.options.filterControls))}).on('created-controls.bs.table',k(a))}m.apply(this,Array.prototype.slice.apply(arguments))},l.prototype.initServer=function(){var a=this;if(a.options.cookie&&a.options.filterControl&&!a.options.filterControlValuesLoaded){var c=JSON.parse(h(a,a.options.cookieIdTable,b.filterControl));if(c)return}o.apply(this,Array.prototype.slice.apply(arguments))},l.prototype.initTable=function(){n.apply(this,Array.prototype.slice.apply(arguments)),this.initCookie()},l.prototype.initCookie=function(){if(this.options.cookie){if(''===this.options.cookieIdTable||''===this.options.cookieExpire||!e())return console.error('Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies'),void(this.options.cookie=!1);var c=h(this,this.options.cookieIdTable,b.sortOrder),d=h(this,this.options.cookieIdTable,b.sortName),f=h(this,this.options.cookieIdTable,b.pageNumber),g=h(this,this.options.cookieIdTable,b.pageList),j=JSON.parse(h(this,this.options.cookieIdTable,b.columns)),i=h(this,this.options.cookieIdTable,b.searchText);this.options.sortOrder=c?c:this.options.sortOrder,this.options.sortName=d?d:this.options.sortName,this.options.pageNumber=f?+f:this.options.pageNumber,this.options.pageSize=g?g===this.options.formatAllRows()?g:+g:this.options.pageSize,this.options.searchText=i?i:'',j&&a.each(this.columns,function(b,c){c.visible=-1!==a.inArray(c.field,j)})}},l.prototype.onSort=function(){p.apply(this,Array.prototype.slice.apply(arguments)),g(this,b.sortOrder,this.options.sortOrder),g(this,b.sortName,this.options.sortName)},l.prototype.onPageNumber=function(){return q.apply(this,Array.prototype.slice.apply(arguments)),g(this,b.pageNumber,this.options.pageNumber),!1},l.prototype.onPageListChange=function(){return r.apply(this,Array.prototype.slice.apply(arguments)),g(this,b.pageList,this.options.pageSize),g(this,b.pageNumber,this.options.pageNumber),!1},l.prototype.onPagePre=function(){return s.apply(this,Array.prototype.slice.apply(arguments)),g(this,b.pageNumber,this.options.pageNumber),!1},l.prototype.onPageNext=function(){return t.apply(this,Array.prototype.slice.apply(arguments)),g(this,b.pageNumber,this.options.pageNumber),!1},l.prototype.toggleColumn=function(){u.apply(this,Array.prototype.slice.apply(arguments));var c=[];a.each(this.columns,function(a,b){b.visible&&c.push(b.field)}),g(this,b.columns,JSON.stringify(c))},l.prototype.selectPage=function(a){v.apply(this,Array.prototype.slice.apply(arguments)),g(this,b.pageNumber,a)},l.prototype.onSearch=function(){var c=Array.prototype.slice.apply(arguments);w.apply(this,c),a(c[0].currentTarget).parent().hasClass('search')&&g(this,b.searchText,this.searchText),g(this,b.pageNumber,this.options.pageNumber)},l.prototype.getCookies=function(){var c=this,d={};return a.each(b,function(a,b){d[a]=h(c,c.options.cookieIdTable,b),'columns'===a&&(d[a]=JSON.parse(d[a]))}),d},l.prototype.deleteCookie=function(a){''!==a&&e()&&i(this,this.options.cookieIdTable,b[a])}})(jQuery)});
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableCookie={exports:{}}.exports}})(this,function(){'use strict';function a(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function b(a,b){if(!a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function c(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var d=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(e===void 0){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if('value'in e)return e.value;var g=e.get;return void 0===g?void 0:g.call(d)};(function(f){var g={cookieIds:{sortOrder:'bs.table.sortOrder',sortName:'bs.table.sortName',pageNumber:'bs.table.pageNumber',pageList:'bs.table.pageList',columns:'bs.table.columns',searchText:'bs.table.searchText',filterControl:'bs.table.filterControl',filterBy:'bs.table.filterBy'},getCurrentHeader:function(a){var b=a.$header;return a.options.height&&(b=a.$tableHeader),b},getCurrentSearchControls:function(a){var b='select, input';return a.options.height&&(b='table select, table input'),b},cookieEnabled:function(){return!!navigator.cookieEnabled},inArrayCookiesEnabled:function(a,b){for(var c=-1,d=0;d<b.length;d++)if(a.toLowerCase()===b[d].toLowerCase()){c=d;break}return c},setCookie:function(a,b,c){if(a.options.cookie&&g.cookieEnabled()&&''!==a.options.cookieIdTable&&-1!==g.inArrayCookiesEnabled(b,a.options.cookiesEnabled)){switch(b=a.options.cookieIdTable+'.'+b,a.options.cookieStorage){case'cookieStorage':document.cookie=[b,'=',c,'; expires='+g.calculateExpiration(a.options.cookieExpire),a.options.cookiePath?'; path='+a.options.cookiePath:'',a.options.cookieDomain?'; domain='+a.options.cookieDomain:'',a.options.cookieSecure?'; secure':''].join('');break;case'localStorage':localStorage.setItem(b,c);break;case'sessionStorage':sessionStorage.setItem(b,c);break;default:return!1;}return!0}},getCookie:function(a,b,c){if(!c)return null;if(-1===g.inArrayCookiesEnabled(c,a.options.cookiesEnabled))return null;switch(c=b+'.'+c,a.options.cookieStorage){case'cookieStorage':var d='; '+document.cookie,e=d.split('; '+c+'=');return 2===e.length?e.pop().split(';').shift():null;case'localStorage':return localStorage.getItem(c);case'sessionStorage':return sessionStorage.getItem(c);default:return null;}},deleteCookie:function(a,b,c){switch(c=b+'.'+c,a.options.cookieStorage){case'cookieStorage':document.cookie=[encodeURIComponent(c),'=','; expires=Thu, 01 Jan 1970 00:00:00 GMT',a.options.cookiePath?'; path='+a.options.cookiePath:'',a.options.cookieDomain?'; domain='+a.options.cookieDomain:''].join('');break;case'localStorage':localStorage.removeItem(c);break;case'sessionStorage':sessionStorage.removeItem(c);break;default:return!1;}return!0},calculateExpiration:function(a){var b=a.replace(/[0-9]*/,'');switch(a=a.replace(/[A-Za-z]{1,2}/,''),b.toLowerCase()){case's':a=+a;break;case'mi':a*=60;break;case'h':a=60*(60*a);break;case'd':a=60*(60*(24*a));break;case'm':a=60*(60*(24*(30*a)));break;case'y':a=60*(60*(24*(365*a)));break;default:a=void 0;}if(!a)return'';var c=new Date;return c.setTime(c.getTime()+1e3*a),c.toGMTString()},initCookieFilters:function(a){setTimeout(function(){var b=JSON.parse(g.getCookie(a,a.options.cookieIdTable,g.cookieIds.filterControl));if(!a.options.filterControlValuesLoaded&&b){var c={},d=g.getCurrentHeader(a),e=g.getCurrentSearchControls(a),h=function(a,b){f(b).each(function(b,d){''!==d.text&&(f(a).val(d.text),c[d.field]=d.text)})};d.find(e).each(function(){var a=f(this).closest('[data-field]').data('field'),c=f.grep(b,function(b){return b.field===a});h(this,c)}),a.initColumnSearch(c),a.options.filterControlValuesLoaded=!0,a.initServer()}},250)}};f.extend(f.fn.bootstrapTable.defaults,{cookie:!1,cookieExpire:'2h',cookiePath:null,cookieDomain:null,cookieSecure:null,cookieIdTable:'',cookiesEnabled:['bs.table.sortOrder','bs.table.sortName','bs.table.pageNumber','bs.table.pageList','bs.table.columns','bs.table.searchText','bs.table.filterControl','bs.table.filterBy'],cookieStorage:'cookieStorage',filterControls:[],filterControlValuesLoaded:!1}),f.fn.bootstrapTable.methods.push('getCookies'),f.fn.bootstrapTable.methods.push('deleteCookie'),f.extend(f.fn.bootstrapTable.utils,{setCookie:g.setCookie,getCookie:g.getCookie}),f.BootstrapTable=function(h){function i(){return a(this,i),b(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return c(i,h),d(i,[{key:'init',value:function(){var a=JSON.parse(g.getCookie(this,this.options.cookieIdTable,g.cookieIds.filterBy));if(this.filterColumns=a?a:{},this.options.filterControls=[],this.options.filterControlValuesLoaded=!1,this.options.cookiesEnabled='string'==typeof this.options.cookiesEnabled?this.options.cookiesEnabled.replace('[','').replace(']','').replace(/ /g,'').toLowerCase().split(','):this.options.cookiesEnabled,this.options.filterControl){var b=this;this.$el.on('column-search.bs.table',function(a,c,d){for(var e=!0,f=0;f<b.options.filterControls.length;f++)if(b.options.filterControls[f].field===c){b.options.filterControls[f].text=d,e=!1;break}e&&b.options.filterControls.push({field:c,text:d}),g.setCookie(b,g.cookieIds.filterControl,JSON.stringify(b.options.filterControls))}).on('created-controls.bs.table',g.initCookieFilters(b))}e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'init',this).call(this)}},{key:'initServer',value:function(){var a=this;if(a.options.cookie&&a.options.filterControl&&!a.options.filterControlValuesLoaded){var b=JSON.parse(g.getCookie(a,a.options.cookieIdTable,g.cookieIds.filterControl));if(b)return}e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'initServer',this).call(this)}},{key:'initTable',value:function(){e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'initTable',this).call(this),this.initCookie()}},{key:'onSort',value:function(){var a=arguments[0];e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'onSort',this).call(this,a),g.setCookie(this,g.cookieIds.sortOrder,this.options.sortOrder),g.setCookie(this,g.cookieIds.sortName,this.options.sortName)}},{key:'onPageNumber',value:function(){var a=arguments[0];return e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'onPageNumber',this).call(this,a),g.setCookie(this,g.cookieIds.pageNumber,this.options.pageNumber),!1}},{key:'onPageListChange',value:function(){var a=arguments[0];return e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'onPageListChange',this).call(this,a),g.setCookie(this,g.cookieIds.pageList,this.options.pageSize),g.setCookie(this,g.cookieIds.pageNumber,this.options.pageNumber),!1}},{key:'onPagePre',value:function(){var a=arguments[0];return e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'onPagePre',this).call(this,a),g.setCookie(this,g.cookieIds.pageNumber,this.options.pageNumber),!1}},{key:'onPageNext',value:function(){var a=arguments[0];return e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'onPageNext',this).call(this,a),g.setCookie(this,g.cookieIds.pageNumber,this.options.pageNumber),!1}},{key:'toggleColumn',value:function(){e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'toggleColumn',this).call(this);var a=[];f.each(this.columns,function(b,c){c.visible&&a.push(c.field)}),g.setCookie(this,g.cookieIds.columns,JSON.stringify(a))}},{key:'selectPage',value:function(a){e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'selectPage',this).call(this),g.setCookie(this,g.cookieIds.pageNumber,a)}},{key:'onSearch',value:function(){var a=Array.prototype.slice.apply(arguments);e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'onSearch',this).call(this,this,a),f(a[0].currentTarget).parent().hasClass('search')&&g.setCookie(this,g.cookieIds.searchText,this.searchText),g.setCookie(this,g.cookieIds.pageNumber,this.options.pageNumber)}},{key:'filterBy',value:function(){e(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),'filterBy',this).call(this),g.setCookie(this,g.cookieIds.filterBy,JSON.stringify(this.filterColumns))}},{key:'initCookie',value:function(){if(this.options.cookie){if(''===this.options.cookieIdTable||''===this.options.cookieExpire||!g.cookieEnabled())return console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.'),void(this.options.cookie=!1);var a=g.getCookie(this,this.options.cookieIdTable,g.cookieIds.sortOrder),b=g.getCookie(this,this.options.cookieIdTable,g.cookieIds.sortName),c=g.getCookie(this,this.options.cookieIdTable,g.cookieIds.pageNumber),d=g.getCookie(this,this.options.cookieIdTable,g.cookieIds.pageList),e=JSON.parse(g.getCookie(this,this.options.cookieIdTable,g.cookieIds.columns)),h=g.getCookie(this,this.options.cookieIdTable,g.cookieIds.searchText);this.options.sortOrder=a?a:this.options.sortOrder,this.options.sortName=b?b:this.options.sortName,this.options.pageNumber=c?+c:this.options.pageNumber,this.options.pageSize=d?d===this.options.formatAllRows()?d:+d:this.options.pageSize,this.options.searchText=h?h:'',e&&f.each(this.columns,function(a,b){b.visible=-1!==f.inArray(b.field,e)})}}},{key:'getCookies',value:function(){var a=this,b={};return f.each(g.cookieIds,function(c,d){b[c]=g.getCookie(a,a.options.cookieIdTable,d),'columns'===c&&(b[c]=JSON.parse(b[c]))}),b}},{key:'deleteCookie',value:function(a){''!==a&&g.cookieEnabled()&&g.deleteCookie(this,this.options.cookieIdTable,g.cookieIds[a])}}]),i}(f.BootstrapTable)})(jQuery)});
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

@@ -299,3 +299,3 @@ (function (global, factory) {

// Added the default option
UtilsFilterControl.addOptionToSelectControl(selectControl, '', '');
UtilsFilterControl.addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder);
}

@@ -381,3 +381,3 @@

UtilsFilterControl.addOptionToSelectControl(selectControl, '', '');
UtilsFilterControl.addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder);
filterDataType(filterDataSource, selectControl);

@@ -495,3 +495,3 @@ } else {

$(Utils.sprintf('#%s', currentTarget.id)).val(currentTarget.value);
$(currentTarget).val(currentTarget.value);
// Fired the keyup event

@@ -554,2 +554,15 @@ $(currentTarget).keyup();

var bootstrap = {
3: {
icons: {
clear: 'glyphicon-trash icon-clear'
}
},
4: {
icons: {
clear: 'fa-trash icon-clear'
}
}
}[Utils.bootstrapVersion];
$.extend($.fn.bootstrapTable.defaults, {

@@ -600,3 +613,3 @@ filterControl: false,

$.extend($.fn.bootstrapTable.defaults.icons, {
clear: 'glyphicon-trash icon-clear'
clear: bootstrap.icons.clear
});

@@ -613,2 +626,3 @@

$.fn.bootstrapTable.methods.push('triggerSearch');
$.fn.bootstrapTable.methods.push('clearFilterControl');

@@ -615,0 +629,0 @@ $.BootstrapTable = function (_$$BootstrapTable) {

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -10,2 +10,2 @@ * @license MIT

(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableFilterControl={exports:{}}.exports}})(this,function(){'use strict';function a(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function b(a,b){if(!a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function c(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var d=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(e===void 0){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if('value'in e)return e.value;var g=e.get;return void 0===g?void 0:g.call(d)};(function(f){var g=f.fn.bootstrapTable.utils,h={getOptionsFromSelectControl:function(a){return a.get(a.length-1).options},hideUnusedSelectOptions:function(a,b){for(var c=h.getOptionsFromSelectControl(a),d=0;d<c.length;d++)''!==c[d].value&&(b.hasOwnProperty(c[d].value)?a.find(g.sprintf('option[value=\'%s\']',c[d].value)).show():a.find(g.sprintf('option[value=\'%s\']',c[d].value)).hide())},addOptionToSelectControl:function(a,b,c){var d=f.trim(b),e=f(a.get(a.length-1));h.existOptionInSelectControl(a,d)||e.append(f('<option></option>').attr('value',d).text(f('<div />').html(c).text()))},sortSelectControl:function(a){var b=f(a.get(a.length-1)),c=b.find('option:gt(0)');c.sort(function(c,a){var b=f(c).text().toLowerCase(),d=f(a).text().toLowerCase();return f.isNumeric(c)&&f.isNumeric(a)&&(b=parseFloat(b),d=parseFloat(d)),b>d?1:b<d?-1:0}),b.find('option:gt(0)').remove(),b.append(c)},existOptionInSelectControl:function(a,b){for(var c=h.getOptionsFromSelectControl(a),d=0;d<c.length;d++)if(c[d].value===b.toString())return!0;return!1},fixHeaderCSS:function(a){var b=a.$tableHeader;b.css('height','77px')},getCurrentHeader:function(a){var b=a.$header,c=a.options,d=a.$tableHeader,e=b;return c.height&&(e=d),e},getCurrentSearchControls:function(a){var b=a.options,c='select, input';return b.height&&(c='table select, table input'),c},getCursorPosition:function(a){if(g.isIEBrowser()){if(f(a).is('input[type=text]')){var d=0;if('selectionStart'in a)d=a.selectionStart;else if('selection'in document){a.focus();var b=document.selection.createRange(),c=document.selection.createRange().text.length;b.moveStart('character',-a.value.length),d=b.text.length-c}return d}return-1}return-1},setCursorPosition:function(a){f(a).val(a.value)},copyValues:function(a){var b=h.getCurrentHeader(a),c=h.getCurrentSearchControls(a);a.options.valuesFilterControl=[],b.find(c).each(function(){a.options.valuesFilterControl.push({field:f(this).closest('[data-field]').data('field'),value:f(this).val(),position:h.getCursorPosition(f(this).get(0)),hasFocus:f(this).is(':focus')})})},setValues:function(a){var b=null,c=[],d=h.getCurrentHeader(a),e=h.getCurrentSearchControls(a);if(0<a.options.valuesFilterControl.length){var g=null;d.find(e).each(function(){b=f(this).closest('[data-field]').data('field'),c=f.grep(a.options.valuesFilterControl,function(a){return a.field===b}),0<c.length&&(f(this).val(c[0].value),c[0].hasFocus&&(g=function(a,b){return function closedCallback(){a.focus(),h.setCursorPosition(a,b)}}(f(this).get(0),c[0].position)))}),null!==g&&g()}},collectBootstrapCookies:function(){var a=[],b=document.cookie.match(/(?:bs.table.)(\w*)/g);if(b)return f.each(b,function(b,c){var d=c;/./.test(d)&&(d=d.split('.').pop()),-1===f.inArray(d,a)&&a.push(d)}),a},escapeID:function(a){return(a+'').replace(/(:|\.|\[|\]|,)/g,'\\$1')},isColumnSearchableViaSelect:function(a){var b=a.filterControl,c=a.searchable;return b&&'select'===b.toLowerCase()&&c},isFilterDataNotGiven:function(a){var b=a.filterData;return b===void 0||'column'===b.toLowerCase()},hasSelectControlElement:function(a){return a&&0<a.length},initFilterSelectControls:function(a){var b=a.data,c=a.pageTo<a.options.data.length?a.options.data.length:a.pageTo,d=a.options.pagination?'server'===a.options.sidePagination?a.pageTo:a.options.totalRows:a.pageTo;f.each(a.header.fields,function(c,e){var j=a.columns[a.fieldsColumnsIndex[e]],k=f('.bootstrap-table-filter-control-'+h.escapeID(j.field));if(h.isColumnSearchableViaSelect(j)&&h.isFilterDataNotGiven(j)&&h.hasSelectControlElement(k)){0===k.get(k.length-1).options.length&&h.addOptionToSelectControl(k,'','');for(var l={},m=0;m<d;m++){var i=b[m][e],n=g.calculateObjectValue(a.header,a.header.formatters[c],[i,b[m],m],i);l[n]=i}for(var o in l)h.addOptionToSelectControl(k,l[o],o);h.sortSelectControl(k),a.options.hideUnusedSelectOptions&&h.hideUnusedSelectOptions(k,l)}}),a.trigger('created-controls')},getFilterDataMethod:function(a,b){for(var c=Object.keys(a),d=0;d<c.length;d++)if(c[d]===b)return a[b];return null},createControls:function(a,b){var c=!1,d=void 0,e=void 0;f.each(a.columns,function(g,j){if(d='hidden',e=[],!!j.visible){if(!j.filterControl)e.push('<div class="no-filter-control"></div>');else{e.push('<div class="filter-control">');var p=j.filterControl.toLowerCase();j.searchable&&a.options.filterTemplate[p]&&(c=!0,d='visible',e.push(a.options.filterTemplate[p](a,j.field,d,j.filterControlPlaceholder?j.filterControlPlaceholder:'','filter-control-'+g)))}if(f.each(b.children().children(),function(a,b){var c=f(b);if(c.data('field')===j.field)return c.find('.fht-cell').append(e.join('')),!1}),void 0!==j.filterData&&'column'!==j.filterData.toLowerCase()){var k=h.getFilterDataMethod(i,j.filterData.substring(0,j.filterData.indexOf(':'))),l=void 0,m=void 0;if(null!==k)l=j.filterData.substring(j.filterData.indexOf(':')+1,j.filterData.length),m=f('.bootstrap-table-filter-control-'+h.escapeID(j.field)),h.addOptionToSelectControl(m,'',''),k(l,m);else throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, json, url. Use like this: var: {key: "value"}');var n=void 0,o=void 0;switch(k){case'url':f.ajax({url:l,dataType:'json',success:function(a){for(var b in a)h.addOptionToSelectControl(m,b,a[b]);h.sortSelectControl(m)}});break;case'var':for(o in n=window[l],n)h.addOptionToSelectControl(m,o,n[o]);h.sortSelectControl(m);break;case'jso':for(o in n=JSON.parse(l),n)h.addOptionToSelectControl(m,o,n[o]);h.sortSelectControl(m);}}}}),c?(b.off('keyup','input').on('keyup','input',function(b,c){if((b.keyCode=c?c.keyCode:b.keyCode,!(a.options.searchOnEnterKey&&13!==b.keyCode))&&!(-1<f.inArray(b.keyCode,[37,38,39,40]))){var d=f(b.currentTarget);d.is(':checkbox')||d.is(':radio')||(clearTimeout(b.currentTarget.timeoutId||0),b.currentTarget.timeoutId=setTimeout(function(){a.onColumnSearch(b)},a.options.searchTimeOut))}}),b.off('change','select').on('change','select',function(b){a.options.searchOnEnterKey&&13!==b.keyCode||-1<f.inArray(b.keyCode,[37,38,39,40])||(clearTimeout(b.currentTarget.timeoutId||0),b.currentTarget.timeoutId=setTimeout(function(){a.onColumnSearch(b)},a.options.searchTimeOut))}),b.off('mouseup','input').on('mouseup','input',function(b){var c=f(this),d=c.val();''===d||setTimeout(function(){var d=c.val();''===d&&(clearTimeout(b.currentTarget.timeoutId||0),b.currentTarget.timeoutId=setTimeout(function(){a.onColumnSearch(b)},a.options.searchTimeOut))},1)}),0<b.find('.date-filter-control').length&&f.each(a.columns,function(a,c){var d=c.filterControl,e=c.field,h=c.filterDatepickerOptions;d!==void 0&&'datepicker'===d.toLowerCase()&&b.find('.date-filter-control.bootstrap-table-filter-control-'+e).datepicker(h).on('changeDate',function(a){var b=a.currentTarget;f(g.sprintf('#%s',b.id)).val(b.value),f(b).keyup()})})):b.find('.filterControl').hide()},getDirectionOfSelectOptions:function(a){var b=a===void 0?'left':a.toLowerCase();return'left'===b?'ltr':'right'===b?'rtl':'auto'===b?'auto':'ltr'}},i={var:function(a,b){var c=window[a];for(var d in c)h.addOptionToSelectControl(b,d,c[d]);h.sortSelectControl(b)},url:function(a,b){f.ajax({url:a,dataType:'json',success:function(a){for(var c in a)h.addOptionToSelectControl(b,c,a[c]);h.sortSelectControl(b)}})},json:function(a,b){var c=JSON.parse(a);for(var d in c)h.addOptionToSelectControl(b,d,c[d]);h.sortSelectControl(b)}};f.extend(f.fn.bootstrapTable.defaults,{filterControl:!1,onColumnSearch:function(){return!1},onCreatedControls:function(){return!0},filterShowClear:!1,alignmentSelectControlOptions:void 0,filterTemplate:{input:function(a,b,c,d){return g.sprintf('<input type="text" class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" placeholder="%s">',b,c,d)},select:function(a,b,c){var d=a.options;return g.sprintf('<select class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" dir="%s"></select>',b,c,h.getDirectionOfSelectOptions(d.alignmentSelectControlOptions))},datepicker:function(a,b,c){return g.sprintf('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">',b,c)}},disableControlWhenSearch:!1,searchOnEnterKey:!1,valuesFilterControl:[]}),f.extend(f.fn.bootstrapTable.columnDefaults,{filterControl:void 0,filterData:void 0,filterDatepickerOptions:void 0,filterStrictSearch:!1,filterStartsWithSearch:!1,filterControlPlaceholder:''}),f.extend(f.fn.bootstrapTable.Constructor.EVENTS,{"column-search.bs.table":'onColumnSearch',"created-controls.bs.table":'onCreatedControls'}),f.extend(f.fn.bootstrapTable.defaults.icons,{clear:'glyphicon-trash icon-clear'}),f.extend(f.fn.bootstrapTable.locales,{formatClearFilters:function(){return'Clear Filters'}}),f.extend(f.fn.bootstrapTable.defaults,f.fn.bootstrapTable.locales),f.fn.bootstrapTable.methods.push('triggerSearch'),f.BootstrapTable=function(i){function j(){return a(this,j),b(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return c(j,i),d(j,[{key:'init',value:function(){if(this.options.filterControl){var a=this;this.options.valuesFilterControl=[],this.$el.on('reset-view.bs.table',function(){!a.options.height||0<a.$tableHeader.find('select').length||0<a.$tableHeader.find('input').length||h.createControls(a,a.$tableHeader)}).on('post-header.bs.table',function(){h.setValues(a)}).on('post-body.bs.table',function(){a.options.height&&h.fixHeaderCSS(a)}).on('column-switch.bs.table',function(){h.setValues(a)}).on('load-success.bs.table',function(){a.EnableControls(!0)}).on('load-error.bs.table',function(){a.EnableControls(!0)})}e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'init',this).call(this)}},{key:'initToolbar',value:function(){if(this.showToolbar=this.showToolbar||this.options.filterControl&&this.options.filterShowClear,e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initToolbar',this).call(this),this.options.filterControl&&this.options.filterShowClear){var a=this.$toolbar.find('>.btn-group'),b=a.find('.filter-show-clear');b.length||(b=f([g.sprintf('<button class="btn btn-%s filter-show-clear" ',this.options.buttonsClass),g.sprintf('type="button" title="%s">',this.options.formatClearFilters()),g.sprintf('<i class="%s %s"></i> ',this.options.iconsPrefix,this.options.icons.clear),'</button>'].join('')).appendTo(a),b.off('click').on('click',f.proxy(this.clearFilterControl,this)))}}},{key:'initHeader',value:function(){e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initHeader',this).call(this),this.options.filterControl&&h.createControls(this,this.$header)}},{key:'initBody',value:function(){e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initBody',this).call(this),h.initFilterSelectControls(this)}},{key:'initSearch',value:function(){var a=this,b=f.isEmptyObject(a.filterColumnsPartial)?null:a.filterColumnsPartial;(null===b||1>=Object.keys(b).length)&&e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initSearch',this).call(this),'server'===this.options.sidePagination||null===b||(a.data=b?a.options.data.filter(function(c,d){var e=[];return Object.keys(c).forEach(function(g){var h=a.columns[a.fieldsColumnsIndex[g]],i=(b[g]||'').toLowerCase(),j=c[g];''===i?e.push(!0):(h&&h.searchFormatter&&(j=f.fn.bootstrapTable.utils.calculateObjectValue(a.header,a.header.formatters[f.inArray(g,a.header.fields)],[j,c,d],j)),-1!==f.inArray(g,a.header.fields)&&('string'==typeof j||'number'==typeof j)&&(h.filterStrictSearch?j.toString().toLowerCase()===i.toString().toLowerCase()?e.push(!0):e.push(!1):h.filterStartsWithSearch?0===(''+j).toLowerCase().indexOf(i)?e.push(!0):e.push(!1):(''+j).toLowerCase().includes(i)?e.push(!0):e.push(!1)))}),!e.includes(!1)}):a.data)}},{key:'initColumnSearch',value:function(a){if(h.copyValues(this),a)for(var b in this.filterColumnsPartial=a,this.updatePagination(),a)this.trigger('column-search',b,a[b])}},{key:'onColumnSearch',value:function(a){if(!(-1<f.inArray(a.keyCode,[37,38,39,40]))){h.copyValues(this);var b=f.trim(f(a.currentTarget).val()),c=f(a.currentTarget).closest('[data-field]').data('field');f.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),b?this.filterColumnsPartial[c]=b:delete this.filterColumnsPartial[c],this.searchText+='randomText',this.options.pageNumber=1,this.EnableControls(!1),this.onSearch(a),this.trigger('column-search',c,b)}}},{key:'clearFilterControl',value:function(){if(this.options.filterControl&&this.options.filterShowClear){var a=this,b=h.collectBootstrapCookies(),c=h.getCurrentHeader(a),d=c.closest('table'),e=c.find(h.getCurrentSearchControls(a)),i=a.$toolbar.find('.search input'),j=!1,k=0;if(f.each(a.options.valuesFilterControl,function(a,b){j=!!j||''!==b.value,b.value=''}),h.setValues(a),clearTimeout(k),k=setTimeout(function(){b&&0<b.length&&f.each(b,function(b,c){void 0!==a.deleteCookie&&a.deleteCookie(c)})},a.options.searchTimeOut),!j)return;if(0<e.length)this.filterColumnsPartial={},f(e[0]).trigger('INPUT'===e[0].tagName?'keyup':'change',{keyCode:13});else return;if(0<i.length&&a.resetSearch(),a.options.sortName!==d.data('sortName')||a.options.sortOrder!==d.data('sortOrder')){var l=c.find(g.sprintf('[data-field="%s"]',f(e[0]).closest('table').data('sortName')));0<l.length&&(a.onSort({type:'keypress',currentTarget:l}),f(l).find('.sortable').trigger('click'))}}}},{key:'triggerSearch',value:function(){var a=h.getCurrentHeader(this),b=h.getCurrentSearchControls(this);a.find(b).each(function(){var a=f(this);a.is('select')?a.change():a.keyup()})}},{key:'EnableControls',value:function(a){if(this.options.disableControlWhenSearch&&'server'===this.options.sidePagination){var b=h.getCurrentHeader(this),c=h.getCurrentSearchControls(this);a?b.find(c).removeProp('disabled'):b.find(c).prop('disabled','disabled')}}}]),j}(f.BootstrapTable)})(jQuery)});
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableFilterControl={exports:{}}.exports}})(this,function(){'use strict';function a(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}function b(a,b){if(!a)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return b&&('object'==typeof b||'function'==typeof b)?b:a}function c(a,b){if('function'!=typeof b&&null!==b)throw new TypeError('Super expression must either be null or a function, not '+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var d=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,'value'in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),e=function a(b,c,d){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,c);if(e===void 0){var f=Object.getPrototypeOf(b);return null===f?void 0:a(f,c,d)}if('value'in e)return e.value;var g=e.get;return void 0===g?void 0:g.call(d)};(function(f){var g=f.fn.bootstrapTable.utils,h={getOptionsFromSelectControl:function(a){return a.get(a.length-1).options},hideUnusedSelectOptions:function(a,b){for(var c=h.getOptionsFromSelectControl(a),d=0;d<c.length;d++)''!==c[d].value&&(b.hasOwnProperty(c[d].value)?a.find(g.sprintf('option[value=\'%s\']',c[d].value)).show():a.find(g.sprintf('option[value=\'%s\']',c[d].value)).hide())},addOptionToSelectControl:function(a,b,c){var d=f.trim(b),e=f(a.get(a.length-1));h.existOptionInSelectControl(a,d)||e.append(f('<option></option>').attr('value',d).text(f('<div />').html(c).text()))},sortSelectControl:function(a){var b=f(a.get(a.length-1)),c=b.find('option:gt(0)');c.sort(function(c,a){var b=f(c).text().toLowerCase(),d=f(a).text().toLowerCase();return f.isNumeric(c)&&f.isNumeric(a)&&(b=parseFloat(b),d=parseFloat(d)),b>d?1:b<d?-1:0}),b.find('option:gt(0)').remove(),b.append(c)},existOptionInSelectControl:function(a,b){for(var c=h.getOptionsFromSelectControl(a),d=0;d<c.length;d++)if(c[d].value===b.toString())return!0;return!1},fixHeaderCSS:function(a){var b=a.$tableHeader;b.css('height','77px')},getCurrentHeader:function(a){var b=a.$header,c=a.options,d=a.$tableHeader,e=b;return c.height&&(e=d),e},getCurrentSearchControls:function(a){var b=a.options,c='select, input';return b.height&&(c='table select, table input'),c},getCursorPosition:function(a){if(g.isIEBrowser()){if(f(a).is('input[type=text]')){var d=0;if('selectionStart'in a)d=a.selectionStart;else if('selection'in document){a.focus();var b=document.selection.createRange(),c=document.selection.createRange().text.length;b.moveStart('character',-a.value.length),d=b.text.length-c}return d}return-1}return-1},setCursorPosition:function(a){f(a).val(a.value)},copyValues:function(a){var b=h.getCurrentHeader(a),c=h.getCurrentSearchControls(a);a.options.valuesFilterControl=[],b.find(c).each(function(){a.options.valuesFilterControl.push({field:f(this).closest('[data-field]').data('field'),value:f(this).val(),position:h.getCursorPosition(f(this).get(0)),hasFocus:f(this).is(':focus')})})},setValues:function(a){var b=null,c=[],d=h.getCurrentHeader(a),e=h.getCurrentSearchControls(a);if(0<a.options.valuesFilterControl.length){var g=null;d.find(e).each(function(){b=f(this).closest('[data-field]').data('field'),c=f.grep(a.options.valuesFilterControl,function(a){return a.field===b}),0<c.length&&(f(this).val(c[0].value),c[0].hasFocus&&(g=function(a,b){return function closedCallback(){a.focus(),h.setCursorPosition(a,b)}}(f(this).get(0),c[0].position)))}),null!==g&&g()}},collectBootstrapCookies:function(){var a=[],b=document.cookie.match(/(?:bs.table.)(\w*)/g);if(b)return f.each(b,function(b,c){var d=c;/./.test(d)&&(d=d.split('.').pop()),-1===f.inArray(d,a)&&a.push(d)}),a},escapeID:function(a){return(a+'').replace(/(:|\.|\[|\]|,)/g,'\\$1')},isColumnSearchableViaSelect:function(a){var b=a.filterControl,c=a.searchable;return b&&'select'===b.toLowerCase()&&c},isFilterDataNotGiven:function(a){var b=a.filterData;return b===void 0||'column'===b.toLowerCase()},hasSelectControlElement:function(a){return a&&0<a.length},initFilterSelectControls:function(a){var b=a.data,c=a.pageTo<a.options.data.length?a.options.data.length:a.pageTo,d=a.options.pagination?'server'===a.options.sidePagination?a.pageTo:a.options.totalRows:a.pageTo;f.each(a.header.fields,function(c,e){var j=a.columns[a.fieldsColumnsIndex[e]],k=f('.bootstrap-table-filter-control-'+h.escapeID(j.field));if(h.isColumnSearchableViaSelect(j)&&h.isFilterDataNotGiven(j)&&h.hasSelectControlElement(k)){0===k.get(k.length-1).options.length&&h.addOptionToSelectControl(k,'',j.filterControlPlaceholder);for(var l={},m=0;m<d;m++){var i=b[m][e],n=g.calculateObjectValue(a.header,a.header.formatters[c],[i,b[m],m],i);l[n]=i}for(var o in l)h.addOptionToSelectControl(k,l[o],o);h.sortSelectControl(k),a.options.hideUnusedSelectOptions&&h.hideUnusedSelectOptions(k,l)}}),a.trigger('created-controls')},getFilterDataMethod:function(a,b){for(var c=Object.keys(a),d=0;d<c.length;d++)if(c[d]===b)return a[b];return null},createControls:function(a,b){var c=!1,d=void 0,e=void 0;f.each(a.columns,function(g,j){if(d='hidden',e=[],!!j.visible){if(!j.filterControl)e.push('<div class="no-filter-control"></div>');else{e.push('<div class="filter-control">');var p=j.filterControl.toLowerCase();j.searchable&&a.options.filterTemplate[p]&&(c=!0,d='visible',e.push(a.options.filterTemplate[p](a,j.field,d,j.filterControlPlaceholder?j.filterControlPlaceholder:'','filter-control-'+g)))}if(f.each(b.children().children(),function(a,b){var c=f(b);if(c.data('field')===j.field)return c.find('.fht-cell').append(e.join('')),!1}),void 0!==j.filterData&&'column'!==j.filterData.toLowerCase()){var k=h.getFilterDataMethod(i,j.filterData.substring(0,j.filterData.indexOf(':'))),l=void 0,m=void 0;if(null!==k)l=j.filterData.substring(j.filterData.indexOf(':')+1,j.filterData.length),m=f('.bootstrap-table-filter-control-'+h.escapeID(j.field)),h.addOptionToSelectControl(m,'',j.filterControlPlaceholder),k(l,m);else throw new SyntaxError('Error. You should use any of these allowed filter data methods: var, json, url. Use like this: var: {key: "value"}');var n=void 0,o=void 0;switch(k){case'url':f.ajax({url:l,dataType:'json',success:function(a){for(var b in a)h.addOptionToSelectControl(m,b,a[b]);h.sortSelectControl(m)}});break;case'var':for(o in n=window[l],n)h.addOptionToSelectControl(m,o,n[o]);h.sortSelectControl(m);break;case'jso':for(o in n=JSON.parse(l),n)h.addOptionToSelectControl(m,o,n[o]);h.sortSelectControl(m);}}}}),c?(b.off('keyup','input').on('keyup','input',function(b,c){if((b.keyCode=c?c.keyCode:b.keyCode,!(a.options.searchOnEnterKey&&13!==b.keyCode))&&!(-1<f.inArray(b.keyCode,[37,38,39,40]))){var d=f(b.currentTarget);d.is(':checkbox')||d.is(':radio')||(clearTimeout(b.currentTarget.timeoutId||0),b.currentTarget.timeoutId=setTimeout(function(){a.onColumnSearch(b)},a.options.searchTimeOut))}}),b.off('change','select').on('change','select',function(b){a.options.searchOnEnterKey&&13!==b.keyCode||-1<f.inArray(b.keyCode,[37,38,39,40])||(clearTimeout(b.currentTarget.timeoutId||0),b.currentTarget.timeoutId=setTimeout(function(){a.onColumnSearch(b)},a.options.searchTimeOut))}),b.off('mouseup','input').on('mouseup','input',function(b){var c=f(this),d=c.val();''===d||setTimeout(function(){var d=c.val();''===d&&(clearTimeout(b.currentTarget.timeoutId||0),b.currentTarget.timeoutId=setTimeout(function(){a.onColumnSearch(b)},a.options.searchTimeOut))},1)}),0<b.find('.date-filter-control').length&&f.each(a.columns,function(a,c){var d=c.filterControl,e=c.field,g=c.filterDatepickerOptions;d!==void 0&&'datepicker'===d.toLowerCase()&&b.find('.date-filter-control.bootstrap-table-filter-control-'+e).datepicker(g).on('changeDate',function(a){var b=a.currentTarget;f(b).val(b.value),f(b).keyup()})})):b.find('.filterControl').hide()},getDirectionOfSelectOptions:function(a){var b=a===void 0?'left':a.toLowerCase();return'left'===b?'ltr':'right'===b?'rtl':'auto'===b?'auto':'ltr'}},i={var:function(a,b){var c=window[a];for(var d in c)h.addOptionToSelectControl(b,d,c[d]);h.sortSelectControl(b)},url:function(a,b){f.ajax({url:a,dataType:'json',success:function(a){for(var c in a)h.addOptionToSelectControl(b,c,a[c]);h.sortSelectControl(b)}})},json:function(a,b){var c=JSON.parse(a);for(var d in c)h.addOptionToSelectControl(b,d,c[d]);h.sortSelectControl(b)}},j={3:{icons:{clear:'glyphicon-trash icon-clear'}},4:{icons:{clear:'fa-trash icon-clear'}}}[g.bootstrapVersion];f.extend(f.fn.bootstrapTable.defaults,{filterControl:!1,onColumnSearch:function(){return!1},onCreatedControls:function(){return!0},filterShowClear:!1,alignmentSelectControlOptions:void 0,filterTemplate:{input:function(a,b,c,d){return g.sprintf('<input type="text" class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" placeholder="%s">',b,c,d)},select:function(a,b,c){var d=a.options;return g.sprintf('<select class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" dir="%s"></select>',b,c,h.getDirectionOfSelectOptions(d.alignmentSelectControlOptions))},datepicker:function(a,b,c){return g.sprintf('<input type="text" class="form-control date-filter-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s">',b,c)}},disableControlWhenSearch:!1,searchOnEnterKey:!1,valuesFilterControl:[]}),f.extend(f.fn.bootstrapTable.columnDefaults,{filterControl:void 0,filterData:void 0,filterDatepickerOptions:void 0,filterStrictSearch:!1,filterStartsWithSearch:!1,filterControlPlaceholder:''}),f.extend(f.fn.bootstrapTable.Constructor.EVENTS,{"column-search.bs.table":'onColumnSearch',"created-controls.bs.table":'onCreatedControls'}),f.extend(f.fn.bootstrapTable.defaults.icons,{clear:j.icons.clear}),f.extend(f.fn.bootstrapTable.locales,{formatClearFilters:function(){return'Clear Filters'}}),f.extend(f.fn.bootstrapTable.defaults,f.fn.bootstrapTable.locales),f.fn.bootstrapTable.methods.push('triggerSearch'),f.fn.bootstrapTable.methods.push('clearFilterControl'),f.BootstrapTable=function(i){function j(){return a(this,j),b(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}return c(j,i),d(j,[{key:'init',value:function(){if(this.options.filterControl){var a=this;this.options.valuesFilterControl=[],this.$el.on('reset-view.bs.table',function(){!a.options.height||0<a.$tableHeader.find('select').length||0<a.$tableHeader.find('input').length||h.createControls(a,a.$tableHeader)}).on('post-header.bs.table',function(){h.setValues(a)}).on('post-body.bs.table',function(){a.options.height&&h.fixHeaderCSS(a)}).on('column-switch.bs.table',function(){h.setValues(a)}).on('load-success.bs.table',function(){a.EnableControls(!0)}).on('load-error.bs.table',function(){a.EnableControls(!0)})}e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'init',this).call(this)}},{key:'initToolbar',value:function(){if(this.showToolbar=this.showToolbar||this.options.filterControl&&this.options.filterShowClear,e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initToolbar',this).call(this),this.options.filterControl&&this.options.filterShowClear){var a=this.$toolbar.find('>.btn-group'),b=a.find('.filter-show-clear');b.length||(b=f([g.sprintf('<button class="btn btn-%s filter-show-clear" ',this.options.buttonsClass),g.sprintf('type="button" title="%s">',this.options.formatClearFilters()),g.sprintf('<i class="%s %s"></i> ',this.options.iconsPrefix,this.options.icons.clear),'</button>'].join('')).appendTo(a),b.off('click').on('click',f.proxy(this.clearFilterControl,this)))}}},{key:'initHeader',value:function(){e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initHeader',this).call(this),this.options.filterControl&&h.createControls(this,this.$header)}},{key:'initBody',value:function(){e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initBody',this).call(this),h.initFilterSelectControls(this)}},{key:'initSearch',value:function(){var a=this,b=f.isEmptyObject(a.filterColumnsPartial)?null:a.filterColumnsPartial;(null===b||1>=Object.keys(b).length)&&e(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),'initSearch',this).call(this),'server'===this.options.sidePagination||null===b||(a.data=b?a.options.data.filter(function(c,d){var e=[];return Object.keys(c).forEach(function(g){var h=a.columns[a.fieldsColumnsIndex[g]],i=(b[g]||'').toLowerCase(),j=c[g];''===i?e.push(!0):(h&&h.searchFormatter&&(j=f.fn.bootstrapTable.utils.calculateObjectValue(a.header,a.header.formatters[f.inArray(g,a.header.fields)],[j,c,d],j)),-1!==f.inArray(g,a.header.fields)&&('string'==typeof j||'number'==typeof j)&&(h.filterStrictSearch?j.toString().toLowerCase()===i.toString().toLowerCase()?e.push(!0):e.push(!1):h.filterStartsWithSearch?0===(''+j).toLowerCase().indexOf(i)?e.push(!0):e.push(!1):(''+j).toLowerCase().includes(i)?e.push(!0):e.push(!1)))}),!e.includes(!1)}):a.data)}},{key:'initColumnSearch',value:function(a){if(h.copyValues(this),a)for(var b in this.filterColumnsPartial=a,this.updatePagination(),a)this.trigger('column-search',b,a[b])}},{key:'onColumnSearch',value:function(a){if(!(-1<f.inArray(a.keyCode,[37,38,39,40]))){h.copyValues(this);var b=f.trim(f(a.currentTarget).val()),c=f(a.currentTarget).closest('[data-field]').data('field');f.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),b?this.filterColumnsPartial[c]=b:delete this.filterColumnsPartial[c],this.searchText+='randomText',this.options.pageNumber=1,this.EnableControls(!1),this.onSearch(a),this.trigger('column-search',c,b)}}},{key:'clearFilterControl',value:function(){if(this.options.filterControl&&this.options.filterShowClear){var a=this,b=h.collectBootstrapCookies(),c=h.getCurrentHeader(a),d=c.closest('table'),e=c.find(h.getCurrentSearchControls(a)),i=a.$toolbar.find('.search input'),j=!1,k=0;if(f.each(a.options.valuesFilterControl,function(a,b){j=!!j||''!==b.value,b.value=''}),h.setValues(a),clearTimeout(k),k=setTimeout(function(){b&&0<b.length&&f.each(b,function(b,c){void 0!==a.deleteCookie&&a.deleteCookie(c)})},a.options.searchTimeOut),!j)return;if(0<e.length)this.filterColumnsPartial={},f(e[0]).trigger('INPUT'===e[0].tagName?'keyup':'change',{keyCode:13});else return;if(0<i.length&&a.resetSearch(),a.options.sortName!==d.data('sortName')||a.options.sortOrder!==d.data('sortOrder')){var l=c.find(g.sprintf('[data-field="%s"]',f(e[0]).closest('table').data('sortName')));0<l.length&&(a.onSort({type:'keypress',currentTarget:l}),f(l).find('.sortable').trigger('click'))}}}},{key:'triggerSearch',value:function(){var a=h.getCurrentHeader(this),b=h.getCurrentSearchControls(this);a.find(b).each(function(){var a=f(this);a.is('select')?a.change():a.keyup()})}},{key:'EnableControls',value:function(a){if(this.options.disableControlWhenSearch&&'server'===this.options.sidePagination){var b=h.getCurrentHeader(this),c=h.getCurrentSearchControls(this);a?b.find(c).removeProp('disabled'):b.find(c).prop('disabled','disabled')}}}]),j}(f.BootstrapTable)})(jQuery)});
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

@@ -31,3 +31,3 @@ (function (global, factory) {

formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows) {
return 'Elementi mostrati da ' + pageFrom + ' a ' + pageTo + ' (Numero totali di elementi ' + totalRows + ')';
return 'Visualizzazione da ' + pageFrom + ' a ' + pageTo + ' di ' + totalRows + ' elementi';
},

@@ -34,0 +34,0 @@ formatSearch: function formatSearch() {

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -10,2 +10,2 @@ * @license MIT

(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableItIT={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['it-IT']={formatLoadingMessage:function(){return'Caricamento in corso...'},formatRecordsPerPage:function(a){return a+' elementi per pagina'},formatShowingRows:function(a,b,c){return'Elementi mostrati da '+a+' a '+b+' (Numero totali di elementi '+c+')'},formatSearch:function(){return'Cerca'},formatNoMatches:function(){return'Nessun elemento trovato'},formatPaginationSwitch:function(){return'Nascondi/Mostra paginazione'},formatRefresh:function(){return'Aggiorna'},formatToggle:function(){return'Attiva/Disattiva'},formatColumns:function(){return'Colonne'},formatAllRows:function(){return'Tutto'},formatExport:function(){return'Esporta dati'},formatClearFilters:function(){return'Pulisci filtri'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['it-IT'])})(jQuery)});
(function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableItIT={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['it-IT']={formatLoadingMessage:function(){return'Caricamento in corso...'},formatRecordsPerPage:function(a){return a+' elementi per pagina'},formatShowingRows:function(a,b,c){return'Visualizzazione da '+a+' a '+b+' di '+c+' elementi'},formatSearch:function(){return'Cerca'},formatNoMatches:function(){return'Nessun elemento trovato'},formatPaginationSwitch:function(){return'Nascondi/Mostra paginazione'},formatRefresh:function(){return'Aggiorna'},formatToggle:function(){return'Attiva/Disattiva'},formatColumns:function(){return'Colonne'},formatAllRows:function(){return'Tutto'},formatExport:function(){return'Esporta dati'},formatClearFilters:function(){return'Pulisci filtri'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['it-IT'])})(jQuery)});
/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

/**
* bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
*
* @version v1.13.1
* @homepage http://bootstrap-table.wenzhixin.net.cn
* @version v1.13.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)

@@ -7,0 +7,0 @@ * @license MIT

{
"name": "bootstrap-table",
"description": "An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).",
"version": "1.13.1",
"version": "1.13.2",
"main": "./dist/bootstrap-table.js",

@@ -17,8 +17,6 @@ "directories": {

"headr": "^0.0.4",
"npm-run-all": "^4.1.5",
"opencollective": "^1.0.3"
"npm-run-all": "^4.1.5"
},
"scripts": {
"postinstall": "opencollective postinstall || exit 0",
"lint": "eslint src/bootstrap-table.js src/locale src/extensions/export src/extensions/editable src/extensions/toolbar src/extension/filter-control",
"lint": "eslint src/bootstrap-table.js src/locale src/extensions/export src/extensions/editable src/extensions/toolbar src/extensions/filter-control src/extensions/cookie",
"js:build:min": "NODE_ENV=production babel src -d dist -q && find dist -name '*.js' | sed -e 'p;s/.js/.min.js/' | xargs -n2 mv",

@@ -34,3 +32,5 @@ "js:build:base": "babel src -d dist -q",

"clean": "rm -rf dist",
"build": "run-s clean *:build"
"build": "run-s lint clean *:build",
"docs": "bundle exec jekyll build",
"docs-serve": "bundle exec jekyll serve"
},

@@ -55,3 +55,3 @@ "repository": {

},
"homepage": "http://bootstrap-table.wenzhixin.net.cn",
"homepage": "https://bootstrap-table.com",
"config": {

@@ -62,8 +62,3 @@ "commitizen": {

},
"types": "./index.d.ts",
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/bootstrap-table",
"logo": "https://opencollective.com/bootstrap-table/logo.txt"
}
"types": "./index.d.ts"
}

@@ -1,2 +0,2 @@

# [Bootstrap Table](http://bootstrap-table.wenzhixin.net.cn)
# [Bootstrap Table](https://bootstrap-table.com)

@@ -17,3 +17,3 @@ [![Build Status](https://travis-ci.org/wenzhixin/bootstrap-table.svg)](https://travis-ci.org/wenzhixin/bootstrap-table)

* [Docs](http://bootstrap-table.wenzhixin.net.cn)
* [Docs](https://bootstrap-table.com)
* [Examples](https://github.com/wenzhixin/bootstrap-table-examples)

@@ -32,3 +32,3 @@ * [Questions/Helps](http://stackoverflow.com/questions/tagged/bootstrap-table)

* Created for Bootstrap 3 (Bootstrap 2 supported)
* Created for Twitter Bootstrap (All versions supported)
* Responsive web design

@@ -89,3 +89,3 @@ * Scrollable Table with fixed headers

[jsFiddle Bootstrap Table](http://bootstrap-table.wenzhixin.net.cn/examples/#basic)
[jsFiddle Bootstrap Table](https://github.com/wenzhixin/bootstrap-table/issues/1765)

@@ -92,0 +92,0 @@ Your feedback is very appreciated!

/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
* @version: v1.2.3
* @version: v1.2.4
*

@@ -9,406 +9,405 @@ * @update zhixin wen <wenzhixin2010@gmail.com>

(function ($) {
'use strict';
($ => {
const UtilsCookie = {
cookieIds: {
sortOrder: 'bs.table.sortOrder',
sortName: 'bs.table.sortName',
pageNumber: 'bs.table.pageNumber',
pageList: 'bs.table.pageList',
columns: 'bs.table.columns',
searchText: 'bs.table.searchText',
filterControl: 'bs.table.filterControl',
filterBy: 'bs.table.filterBy'
},
getCurrentHeader (that) {
let header = that.$header
if (that.options.height) {
header = that.$tableHeader
}
var cookieIds = {
sortOrder: 'bs.table.sortOrder',
sortName: 'bs.table.sortName',
pageNumber: 'bs.table.pageNumber',
pageList: 'bs.table.pageList',
columns: 'bs.table.columns',
searchText: 'bs.table.searchText',
filterControl: 'bs.table.filterControl'
};
return header
},
getCurrentSearchControls (that) {
let searchControls = 'select, input'
if (that.options.height) {
searchControls = 'table select, table input'
}
var getCurrentHeader = function (that) {
var header = that.$header;
if (that.options.height) {
header = that.$tableHeader;
}
return searchControls
},
cookieEnabled () {
return !!(navigator.cookieEnabled)
},
inArrayCookiesEnabled (cookieName, cookiesEnabled) {
let index = -1
return header;
};
var getCurrentSearchControls = function (that) {
var searchControls = 'select, input';
if (that.options.height) {
searchControls = 'table select, table input';
for (let i = 0; i < cookiesEnabled.length; i++) {
if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) {
index = i
break
}
}
return searchControls;
};
return index
},
setCookie (that, cookieName, cookieValue) {
if ((!that.options.cookie) || (!UtilsCookie.cookieEnabled()) || (that.options.cookieIdTable === '')) {
return
}
var cookieEnabled = function () {
return !!(navigator.cookieEnabled);
};
if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return
}
var inArrayCookiesEnabled = function (cookieName, cookiesEnabled) {
var index = -1;
cookieName = that.options.cookieIdTable + '.' + cookieName
for (var i = 0; i < cookiesEnabled.length; i++) {
if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) {
index = i;
break;
}
}
switch (that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [
cookieName, '=', cookieValue,
'; expires=' + UtilsCookie.calculateExpiration(that.options.cookieExpire),
that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
that.options.cookieSecure ? '; secure' : ''
].join('')
break
case 'localStorage':
localStorage.setItem(cookieName, cookieValue)
break
case 'sessionStorage':
sessionStorage.setItem(cookieName, cookieValue)
break
default:
return false
}
return index;
};
return true
},
getCookie (that, tableName, cookieName) {
if (!cookieName) {
return null
}
var setCookie = function (that, cookieName, cookieValue) {
if ((!that.options.cookie) || (!cookieEnabled()) || (that.options.cookieIdTable === '')) {
return;
}
if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return null
}
if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return;
}
cookieName = tableName + '.' + cookieName
cookieName = that.options.cookieIdTable + '.' + cookieName;
switch (that.options.cookieStorage) {
case 'cookieStorage':
const value = '; ' + document.cookie
const parts = value.split('; ' + cookieName + '=')
return parts.length === 2 ? parts.pop().split(';').shift() : null
case 'localStorage':
return localStorage.getItem(cookieName)
case 'sessionStorage':
return sessionStorage.getItem(cookieName)
default:
return null
}
},
deleteCookie (that, tableName, cookieName) {
cookieName = tableName + '.' + cookieName
switch(that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [
cookieName, '=', cookieValue,
'; expires=' + calculateExpiration(that.options.cookieExpire),
that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
that.options.cookieSecure ? '; secure' : ''
].join('');
case 'localStorage':
localStorage.setItem(cookieName, cookieValue);
break;
case 'sessionStorage':
sessionStorage.setItem(cookieName, cookieValue);
break;
default:
return false;
}
switch (that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [
encodeURIComponent(cookieName), '=',
'; expires=Thu, 01 Jan 1970 00:00:00 GMT',
that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : ''
].join('')
break
case 'localStorage':
localStorage.removeItem(cookieName)
break
case 'sessionStorage':
sessionStorage.removeItem(cookieName)
break
default:
return false
}
return true
},
calculateExpiration (cookieExpire) {
const time = cookieExpire.replace(/[0-9]*/, '') // s,mi,h,d,m,y
cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, '') // number
return true;
};
switch (time.toLowerCase()) {
case 's':
cookieExpire = +cookieExpire
break
case 'mi':
cookieExpire *= 60
break
case 'h':
cookieExpire = cookieExpire * 60 * 60
break
case 'd':
cookieExpire = cookieExpire * 24 * 60 * 60
break
case 'm':
cookieExpire = cookieExpire * 30 * 24 * 60 * 60
break
case 'y':
cookieExpire = cookieExpire * 365 * 24 * 60 * 60
break
default:
cookieExpire = undefined
break
}
if (!cookieExpire) {
return ''
}
const d = new Date()
d.setTime(d.getTime() + cookieExpire * 1000)
return d.toGMTString()
},
initCookieFilters (bootstrapTable) {
setTimeout(function () {
const parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, UtilsCookie.cookieIds.filterControl))
var getCookie = function (that, tableName, cookieName) {
if (!cookieName) {
return null;
}
if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) {
if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
return null;
}
const cachedFilters = {}
const header = UtilsCookie.getCurrentHeader(bootstrapTable)
const searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable)
cookieName = tableName + '.' + cookieName;
const applyCookieFilters = function (element, filteredCookies) {
$(filteredCookies).each(function (i, cookie) {
if (cookie.text !== '') {
$(element).val(cookie.text)
cachedFilters[cookie.field] = cookie.text
}
})
}
switch(that.options.cookieStorage) {
case 'cookieStorage':
var value = '; ' + document.cookie;
var parts = value.split('; ' + cookieName + '=');
return parts.length === 2 ? parts.pop().split(';').shift() : null;
case 'localStorage':
return localStorage.getItem(cookieName);
case 'sessionStorage':
return sessionStorage.getItem(cookieName);
default:
return null;
}
};
header.find(searchControls).each(function () {
const field = $(this).closest('[data-field]').data('field')
const filteredCookies = $.grep(parsedCookieFilters, function (cookie) {
return cookie.field === field
})
var deleteCookie = function (that, tableName, cookieName) {
cookieName = tableName + '.' + cookieName;
applyCookieFilters(this, filteredCookies)
})
switch(that.options.cookieStorage) {
case 'cookieStorage':
document.cookie = [
encodeURIComponent(cookieName), '=',
'; expires=Thu, 01 Jan 1970 00:00:00 GMT',
that.options.cookiePath ? '; path=' + that.options.cookiePath : '',
that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '',
].join('');
break;
case 'localStorage':
localStorage.removeItem(cookieName);
break;
case 'sessionStorage':
sessionStorage.removeItem(cookieName);
break;
bootstrapTable.initColumnSearch(cachedFilters)
bootstrapTable.options.filterControlValuesLoaded = true
bootstrapTable.initServer()
}
return true;
};
}, 250)
}
}
var calculateExpiration = function(cookieExpire) {
var time = cookieExpire.replace(/[0-9]*/, ''); //s,mi,h,d,m,y
cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); //number
$.extend($.fn.bootstrapTable.defaults, {
cookie: false,
cookieExpire: '2h',
cookiePath: null,
cookieDomain: null,
cookieSecure: null,
cookieIdTable: '',
cookiesEnabled: [
'bs.table.sortOrder', 'bs.table.sortName',
'bs.table.pageNumber', 'bs.table.pageList',
'bs.table.columns', 'bs.table.searchText',
'bs.table.filterControl', 'bs.table.filterBy'
],
cookieStorage: 'cookieStorage', // localStorage, sessionStorage
// internal variable
filterControls: [],
filterControlValuesLoaded: false
})
switch (time.toLowerCase()) {
case 's':
cookieExpire = +cookieExpire;
break;
case 'mi':
cookieExpire = cookieExpire * 60;
break;
case 'h':
cookieExpire = cookieExpire * 60 * 60;
break;
case 'd':
cookieExpire = cookieExpire * 24 * 60 * 60;
break;
case 'm':
cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
break;
case 'y':
cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
break;
default:
cookieExpire = undefined;
break;
}
if (!cookieExpire) {
return '';
}
var d = new Date();
d.setTime(d.getTime() + cookieExpire * 1000);
return d.toGMTString();
};
$.fn.bootstrapTable.methods.push('getCookies')
$.fn.bootstrapTable.methods.push('deleteCookie')
var initCookieFilters = function (bootstrapTable) {
setTimeout(function () {
var parsedCookieFilters = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
$.extend($.fn.bootstrapTable.utils, {
setCookie: UtilsCookie.setCookie,
getCookie: UtilsCookie.getCookie
})
if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) {
$.BootstrapTable = class extends $.BootstrapTable {
init () {
// FilterBy logic
const filterByCookie = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.filterBy))
this.filterColumns = filterByCookie ? filterByCookie : {}
var cachedFilters = {},
header = getCurrentHeader(bootstrapTable),
searchControls = getCurrentSearchControls(bootstrapTable),
// FilterControl logic
this.options.filterControls = []
this.options.filterControlValuesLoaded = false
applyCookieFilters = function (element, filteredCookies) {
$(filteredCookies).each(function (i, cookie) {
if (cookie.text !== '') {
$(element).val(cookie.text);
cachedFilters[cookie.field] = cookie.text;
}
});
};
this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ?
this.options.cookiesEnabled.replace('[', '').replace(']', '')
.replace(/ /g, '').toLowerCase().split(',') :
this.options.cookiesEnabled
header.find(searchControls).each(function () {
var field = $(this).closest('[data-field]').data('field'),
filteredCookies = $.grep(parsedCookieFilters, function (cookie) {
return cookie.field === field;
});
if (this.options.filterControl) {
const that = this
this.$el.on('column-search.bs.table', function (e, field, text) {
let isNewField = true
applyCookieFilters(this, filteredCookies);
});
bootstrapTable.initColumnSearch(cachedFilters);
bootstrapTable.options.filterControlValuesLoaded = true;
bootstrapTable.initServer();
for (let i = 0; i < that.options.filterControls.length; i++) {
if (that.options.filterControls[i].field === field) {
that.options.filterControls[i].text = text
isNewField = false
break
}
}, 250);
};
}
if (isNewField) {
that.options.filterControls.push({
field: field,
text: text
})
}
$.extend($.fn.bootstrapTable.defaults, {
cookie: false,
cookieExpire: '2h',
cookiePath: null,
cookieDomain: null,
cookieSecure: null,
cookieIdTable: '',
cookiesEnabled: [
'bs.table.sortOrder', 'bs.table.sortName',
'bs.table.pageNumber', 'bs.table.pageList',
'bs.table.columns', 'bs.table.searchText',
'bs.table.filterControl'
],
cookieStorage: 'cookieStorage', //localStorage, sessionStorage
//internal variable
filterControls: [],
filterControlValuesLoaded: false
});
UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that.options.filterControls))
}).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that))
}
super.init()
}
$.fn.bootstrapTable.methods.push('getCookies');
$.fn.bootstrapTable.methods.push('deleteCookie');
initServer () {
const bootstrapTable = this
if (bootstrapTable.options.cookie && bootstrapTable.options.filterControl && !bootstrapTable.options.filterControlValuesLoaded) {
const cookie = JSON.parse(UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, UtilsCookie.cookieIds.filterControl))
if (cookie) {
return
}
}
super.initServer()
}
$.extend($.fn.bootstrapTable.utils, {
setCookie: setCookie,
getCookie: getCookie
});
initTable () {
super.initTable()
this.initCookie()
}
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_init = BootstrapTable.prototype.init,
_initTable = BootstrapTable.prototype.initTable,
_initServer = BootstrapTable.prototype.initServer,
_onSort = BootstrapTable.prototype.onSort,
_onPageNumber = BootstrapTable.prototype.onPageNumber,
_onPageListChange = BootstrapTable.prototype.onPageListChange,
_onPagePre = BootstrapTable.prototype.onPagePre,
_onPageNext = BootstrapTable.prototype.onPageNext,
_toggleColumn = BootstrapTable.prototype.toggleColumn,
_selectPage = BootstrapTable.prototype.selectPage,
_onSearch = BootstrapTable.prototype.onSearch;
onSort () {
const event = arguments[0]
super.onSort(event)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName)
}
BootstrapTable.prototype.init = function () {
this.options.filterControls = [];
this.options.filterControlValuesLoaded = false;
onPageNumber () {
const event = arguments[0]
super.onPageNumber(event)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)
return false
}
this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ?
this.options.cookiesEnabled.replace('[', '').replace(']', '')
.replace(/ /g, '').toLowerCase().split(',') :
this.options.cookiesEnabled;
onPageListChange () {
const event = arguments[0]
super.onPageListChange(event)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)
return false
}
if (this.options.filterControl) {
var that = this;
this.$el.on('column-search.bs.table', function (e, field, text) {
var isNewField = true;
onPagePre () {
const event = arguments[0]
super.onPagePre(event)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)
return false
}
for (var i = 0; i < that.options.filterControls.length; i++) {
if (that.options.filterControls[i].field === field) {
that.options.filterControls[i].text = text;
isNewField = false;
break;
}
}
if (isNewField) {
that.options.filterControls.push({
field: field,
text: text
});
}
onPageNext () {
const event = arguments[0]
super.onPageNext(event)
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)
return false
}
setCookie(that, cookieIds.filterControl, JSON.stringify(that.options.filterControls));
}).on('created-controls.bs.table', initCookieFilters(that));
}
_init.apply(this, Array.prototype.slice.apply(arguments));
};
toggleColumn () {
super.toggleColumn()
BootstrapTable.prototype.initServer = function () {
var bootstrapTable = this;
if (bootstrapTable.options.cookie && bootstrapTable.options.filterControl && !bootstrapTable.options.filterControlValuesLoaded) {
var cookie = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl));
if (cookie)
return;
}
_initServer.apply(this, Array.prototype.slice.apply(arguments));
};
const visibleColumns = []
BootstrapTable.prototype.initTable = function () {
_initTable.apply(this, Array.prototype.slice.apply(arguments));
this.initCookie();
};
BootstrapTable.prototype.initCookie = function () {
if (!this.options.cookie) {
return;
$.each(this.columns, function (i, column) {
if (column.visible) {
visibleColumns.push(column.field)
}
})
if ((this.options.cookieIdTable === '') || (this.options.cookieExpire === '') || (!cookieEnabled())) {
console.error("Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies");
this.options.cookie = false; //Make sure that the cookie extension is disabled
return;
}
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(visibleColumns))
}
var sortOrderCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortOrder),
sortOrderNameCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortName),
pageNumberCookie = getCookie(this, this.options.cookieIdTable, cookieIds.pageNumber),
pageListCookie = getCookie(this, this.options.cookieIdTable, cookieIds.pageList),
columnsCookie = JSON.parse(getCookie(this, this.options.cookieIdTable, cookieIds.columns)),
searchTextCookie = getCookie(this, this.options.cookieIdTable, cookieIds.searchText);
selectPage (page) {
super.selectPage()
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page)
}
//sortOrder
this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder;
//sortName
this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
//pageNumber
this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber;
//pageSize
this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize;
//searchText
this.options.searchText = searchTextCookie ? searchTextCookie : '';
onSearch () {
const target = Array.prototype.slice.apply(arguments)
super.onSearch(this, target)
if (columnsCookie) {
$.each(this.columns, function (i, column) {
column.visible = $.inArray(column.field, columnsCookie) !== -1;
});
}
};
if ($(target[0].currentTarget).parent().hasClass('search')) {
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText)
}
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber)
}
BootstrapTable.prototype.onSort = function () {
_onSort.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.sortOrder, this.options.sortOrder);
setCookie(this, cookieIds.sortName, this.options.sortName);
};
filterBy () {
super.filterBy()
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns))
}
BootstrapTable.prototype.onPageNumber = function () {
_onPageNumber.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
initCookie () {
if (!this.options.cookie) {
return
}
BootstrapTable.prototype.onPageListChange = function () {
_onPageListChange.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageList, this.options.pageSize);
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
if ((this.options.cookieIdTable === '') || (this.options.cookieExpire === '') || (!UtilsCookie.cookieEnabled())) {
console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.')
this.options.cookie = false // Make sure that the cookie extension is disabled
return
}
BootstrapTable.prototype.onPagePre = function () {
_onPagePre.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
const sortOrderCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortOrder)
const sortOrderNameCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortName)
const pageNumberCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageNumber)
const pageListCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageList)
const columnsCookie = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.columns))
const searchTextCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.searchText)
BootstrapTable.prototype.onPageNext = function () {
_onPageNext.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
return false;
};
// sortOrder
this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder
// sortName
this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName
// pageNumber
this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber
// pageSize
this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize
// searchText
this.options.searchText = searchTextCookie ? searchTextCookie : ''
BootstrapTable.prototype.toggleColumn = function () {
_toggleColumn.apply(this, Array.prototype.slice.apply(arguments));
var visibleColumns = [];
if (columnsCookie) {
$.each(this.columns, function (i, column) {
if (column.visible) {
visibleColumns.push(column.field);
}
});
column.visible = $.inArray(column.field, columnsCookie) !== -1
})
}
}
setCookie(this, cookieIds.columns, JSON.stringify(visibleColumns));
};
BootstrapTable.prototype.selectPage = function (page) {
_selectPage.apply(this, Array.prototype.slice.apply(arguments));
setCookie(this, cookieIds.pageNumber, page);
};
BootstrapTable.prototype.onSearch = function () {
var target = Array.prototype.slice.apply(arguments);
_onSearch.apply(this, target);
if ($(target[0].currentTarget).parent().hasClass('search')) {
setCookie(this, cookieIds.searchText, this.searchText);
getCookies () {
const bootstrapTable = this
const cookies = {}
$.each(UtilsCookie.cookieIds, function (key, value) {
cookies[key] = UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value)
if (key === 'columns') {
cookies[key] = JSON.parse(cookies[key])
}
setCookie(this, cookieIds.pageNumber, this.options.pageNumber);
};
})
return cookies
}
BootstrapTable.prototype.getCookies = function () {
var bootstrapTable = this;
var cookies = {};
$.each(cookieIds, function(key, value) {
cookies[key] = getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value);
if (key === 'columns') {
cookies[key] = JSON.parse(cookies[key]);
}
});
return cookies;
};
deleteCookie (cookieName) {
if ((cookieName === '') || (!UtilsCookie.cookieEnabled())) {
return
}
BootstrapTable.prototype.deleteCookie = function (cookieName) {
if ((cookieName === '') || (!cookieEnabled())) {
return;
}
UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds[cookieName])
}
}
deleteCookie(this, this.options.cookieIdTable, cookieIds[cookieName]);
};
})(jQuery);
})(jQuery)

@@ -82,6 +82,6 @@ /**

},
fixHeaderCSS ({$tableHeader}) {
fixHeaderCSS ({ $tableHeader }) {
$tableHeader.css('height', '77px')
},
getCurrentHeader ({$header, options, $tableHeader}) {
getCurrentHeader ({ $header, options, $tableHeader }) {
let header = $header

@@ -94,3 +94,3 @@ if (options.height) {

},
getCurrentSearchControls ({options}) {
getCurrentSearchControls ({ options }) {
let searchControls = 'select, input'

@@ -201,10 +201,10 @@ if (options.height) {

},
isColumnSearchableViaSelect ({filterControl, searchable}) {
isColumnSearchableViaSelect ({ filterControl, searchable }) {
return filterControl &&
filterControl.toLowerCase() === 'select' &&
searchable
filterControl.toLowerCase() === 'select' &&
searchable
},
isFilterDataNotGiven ({filterData}) {
isFilterDataNotGiven ({ filterData }) {
return filterData === undefined ||
filterData.toLowerCase() === 'column'
filterData.toLowerCase() === 'column'
},

@@ -234,3 +234,3 @@ hasSelectControlElement (selectControl) {

// Added the default option
UtilsFilterControl.addOptionToSelectControl(selectControl, '', '')
UtilsFilterControl.addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder)
}

@@ -336,3 +336,3 @@

UtilsFilterControl.addOptionToSelectControl(selectControl, '', '')
UtilsFilterControl.addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder)
filterDataType(filterDataSource, selectControl)

@@ -444,3 +444,3 @@ } else {

if (header.find('.date-filter-control').length > 0) {
$.each(that.columns, (i, {filterControl, field, filterDatepickerOptions}) => {
$.each(that.columns, (i, { filterControl, field, filterDatepickerOptions }) => {
if (

@@ -455,4 +455,4 @@ filterControl !== undefined &&

.datepicker(filterDatepickerOptions)
.on('changeDate', ({currentTarget}) => {
$(Utils.sprintf('#%s', currentTarget.id)).val(
.on('changeDate', ({ currentTarget }) => {
$(currentTarget).val(
currentTarget.value

@@ -517,2 +517,15 @@ )

const bootstrap = {
3: {
icons: {
clear: 'glyphicon-trash icon-clear'
}
},
4: {
icons: {
clear: 'fa-trash icon-clear'
}
}
}[Utils.bootstrapVersion]
$.extend($.fn.bootstrapTable.defaults, {

@@ -537,3 +550,3 @@ filterControl: false,

},
select ({options}, field, isVisible) {
select ({ options }, field, isVisible) {
return Utils.sprintf(

@@ -577,3 +590,3 @@ '<select class="form-control bootstrap-table-filter-control-%s" style="width: 100%; visibility: %s" dir="%s"></select>',

$.extend($.fn.bootstrapTable.defaults.icons, {
clear: 'glyphicon-trash icon-clear'
clear: bootstrap.icons.clear
})

@@ -590,2 +603,3 @@

$.fn.bootstrapTable.methods.push('triggerSearch')
$.fn.bootstrapTable.methods.push('clearFilterControl')

@@ -592,0 +606,0 @@ $.BootstrapTable = class extends $.BootstrapTable {

@@ -16,3 +16,3 @@ /**

formatShowingRows (pageFrom, pageTo, totalRows) {
return `Elementi mostrati da ${pageFrom} a ${pageTo} (Numero totali di elementi ${totalRows})`
return `Visualizzazione da ${pageFrom} a ${pageTo} di ${totalRows} elementi`
},

@@ -19,0 +19,0 @@ formatSearch () {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc