bootstrap-table-rails 1.15.5 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -4
  3. data/lib/bootstrap-table-rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +106 -64
  5. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +678 -208
  6. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +680 -210
  7. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +66 -10
  8. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +742 -489
  9. data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +1103 -213
  10. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +226 -80
  11. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +136 -64
  12. data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +338 -177
  13. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +402 -110
  14. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +133 -61
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +82 -41
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +243 -75
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +347 -179
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +1 -1
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +687 -358
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +12 -14
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +545 -422
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +488 -92
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +2 -2
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +216 -72
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +142 -65
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +345 -137
  27. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +136 -64
  28. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +86 -41
  29. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +218 -123
  30. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +640 -254
  31. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +347 -135
  32. data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +83 -43
  33. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +0 -1
  34. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +203 -75
  35. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +449 -199
  36. data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +207 -114
  37. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +82 -41
  38. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +82 -41
  39. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +82 -41
  40. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +82 -41
  41. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +82 -41
  42. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +82 -41
  43. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +82 -41
  44. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +82 -41
  45. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +104 -62
  46. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +82 -41
  47. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +82 -41
  48. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +82 -41
  49. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +82 -41
  50. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +82 -41
  51. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +82 -41
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +82 -41
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +82 -41
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +82 -41
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +82 -41
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +82 -41
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +82 -41
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +83 -42
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +82 -41
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +82 -41
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +82 -41
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +82 -41
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +82 -41
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +82 -41
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +82 -41
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +82 -41
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +82 -41
  68. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +82 -41
  69. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +82 -41
  70. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +82 -41
  71. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +82 -41
  72. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +82 -41
  73. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +83 -42
  74. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +82 -41
  75. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +82 -41
  76. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +82 -41
  77. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +82 -41
  78. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +82 -41
  79. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +82 -41
  80. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +82 -41
  81. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +82 -41
  82. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +82 -41
  83. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +82 -41
  84. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +82 -41
  85. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +82 -41
  86. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +82 -41
  87. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +82 -41
  88. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +82 -41
  89. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +80 -11
  90. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +106 -60
  91. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +79 -13
  92. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +111 -62
  93. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +74 -9
  94. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +109 -63
  95. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +80 -13
  96. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +110 -64
  97. metadata +1 -2
  98. data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
3
3
  typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4
4
  (global = global || self, global.BootstrapTable = factory(global.jQuery));
5
- }(this, function ($) { 'use strict';
5
+ }(this, (function ($) { 'use strict';
6
6
 
7
7
  $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
8
8
 
@@ -12,7 +12,6 @@
12
12
  return module = { exports: {} }, fn(module, module.exports), module.exports;
13
13
  }
14
14
 
15
- var O = 'object';
16
15
  var check = function (it) {
17
16
  return it && it.Math == Math && it;
18
17
  };
@@ -20,10 +19,10 @@
20
19
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
21
20
  var global_1 =
22
21
  // eslint-disable-next-line no-undef
23
- check(typeof globalThis == O && globalThis) ||
24
- check(typeof window == O && window) ||
25
- check(typeof self == O && self) ||
26
- check(typeof commonjsGlobal == O && commonjsGlobal) ||
22
+ check(typeof globalThis == 'object' && globalThis) ||
23
+ check(typeof window == 'object' && window) ||
24
+ check(typeof self == 'object' && self) ||
25
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
27
26
  // eslint-disable-next-line no-new-func
28
27
  Function('return this')();
29
28
 
@@ -179,7 +178,7 @@
179
178
  f: f$2
180
179
  };
181
180
 
182
- var hide = descriptors ? function (object, key, value) {
181
+ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
183
182
  return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
184
183
  } : function (object, key, value) {
185
184
  object[key] = value;
@@ -188,31 +187,42 @@
188
187
 
189
188
  var setGlobal = function (key, value) {
190
189
  try {
191
- hide(global_1, key, value);
190
+ createNonEnumerableProperty(global_1, key, value);
192
191
  } catch (error) {
193
192
  global_1[key] = value;
194
193
  } return value;
195
194
  };
196
195
 
197
- var shared = createCommonjsModule(function (module) {
198
196
  var SHARED = '__core-js_shared__';
199
197
  var store = global_1[SHARED] || setGlobal(SHARED, {});
200
198
 
199
+ var sharedStore = store;
200
+
201
+ var functionToString = Function.toString;
202
+
203
+ // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
204
+ if (typeof sharedStore.inspectSource != 'function') {
205
+ sharedStore.inspectSource = function (it) {
206
+ return functionToString.call(it);
207
+ };
208
+ }
209
+
210
+ var inspectSource = sharedStore.inspectSource;
211
+
212
+ var WeakMap = global_1.WeakMap;
213
+
214
+ var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
215
+
216
+ var shared = createCommonjsModule(function (module) {
201
217
  (module.exports = function (key, value) {
202
- return store[key] || (store[key] = value !== undefined ? value : {});
218
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
203
219
  })('versions', []).push({
204
- version: '3.1.3',
220
+ version: '3.6.0',
205
221
  mode: 'global',
206
222
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
207
223
  });
208
224
  });
209
225
 
210
- var functionToString = shared('native-function-to-string', Function.toString);
211
-
212
- var WeakMap = global_1.WeakMap;
213
-
214
- var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
215
-
216
226
  var id = 0;
217
227
  var postfix = Math.random();
218
228
 
@@ -245,25 +255,25 @@
245
255
  };
246
256
 
247
257
  if (nativeWeakMap) {
248
- var store = new WeakMap$1();
249
- var wmget = store.get;
250
- var wmhas = store.has;
251
- var wmset = store.set;
258
+ var store$1 = new WeakMap$1();
259
+ var wmget = store$1.get;
260
+ var wmhas = store$1.has;
261
+ var wmset = store$1.set;
252
262
  set = function (it, metadata) {
253
- wmset.call(store, it, metadata);
263
+ wmset.call(store$1, it, metadata);
254
264
  return metadata;
255
265
  };
256
266
  get = function (it) {
257
- return wmget.call(store, it) || {};
267
+ return wmget.call(store$1, it) || {};
258
268
  };
259
269
  has$1 = function (it) {
260
- return wmhas.call(store, it);
270
+ return wmhas.call(store$1, it);
261
271
  };
262
272
  } else {
263
273
  var STATE = sharedKey('state');
264
274
  hiddenKeys[STATE] = true;
265
275
  set = function (it, metadata) {
266
- hide(it, STATE, metadata);
276
+ createNonEnumerableProperty(it, STATE, metadata);
267
277
  return metadata;
268
278
  };
269
279
  get = function (it) {
@@ -285,18 +295,14 @@
285
295
  var redefine = createCommonjsModule(function (module) {
286
296
  var getInternalState = internalState.get;
287
297
  var enforceInternalState = internalState.enforce;
288
- var TEMPLATE = String(functionToString).split('toString');
289
-
290
- shared('inspectSource', function (it) {
291
- return functionToString.call(it);
292
- });
298
+ var TEMPLATE = String(String).split('String');
293
299
 
294
300
  (module.exports = function (O, key, value, options) {
295
301
  var unsafe = options ? !!options.unsafe : false;
296
302
  var simple = options ? !!options.enumerable : false;
297
303
  var noTargetGet = options ? !!options.noTargetGet : false;
298
304
  if (typeof value == 'function') {
299
- if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
305
+ if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
300
306
  enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
301
307
  }
302
308
  if (O === global_1) {
@@ -309,10 +315,10 @@
309
315
  simple = true;
310
316
  }
311
317
  if (simple) O[key] = value;
312
- else hide(O, key, value);
318
+ else createNonEnumerableProperty(O, key, value);
313
319
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
314
320
  })(Function.prototype, 'toString', function toString() {
315
- return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
321
+ return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
316
322
  });
317
323
  });
318
324
 
@@ -349,7 +355,7 @@
349
355
 
350
356
  // Helper for a popular repeating case of the spec:
351
357
  // Let integer be ? ToInteger(index).
352
- // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
358
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
353
359
  var toAbsoluteIndex = function (index, length) {
354
360
  var integer = toInteger(index);
355
361
  return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
@@ -513,7 +519,7 @@
513
519
  }
514
520
  // add a flag to not completely full polyfills
515
521
  if (options.sham || (targetProperty && targetProperty.sham)) {
516
- hide(sourceProperty, 'sham', true);
522
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
517
523
  }
518
524
  // extend global
519
525
  redefine(target, key, sourceProperty, options);
@@ -526,6 +532,12 @@
526
532
  return !String(Symbol());
527
533
  });
528
534
 
535
+ var useSymbolAsUid = nativeSymbol
536
+ // eslint-disable-next-line no-undef
537
+ && !Symbol.sham
538
+ // eslint-disable-next-line no-undef
539
+ && typeof Symbol() == 'symbol';
540
+
529
541
  // `IsArray` abstract operation
530
542
  // https://tc39.github.io/ecma262/#sec-isarray
531
543
  var isArray = Array.isArray || function isArray(arg) {
@@ -558,49 +570,77 @@
558
570
 
559
571
  var html = getBuiltIn('document', 'documentElement');
560
572
 
573
+ var GT = '>';
574
+ var LT = '<';
575
+ var PROTOTYPE = 'prototype';
576
+ var SCRIPT = 'script';
561
577
  var IE_PROTO = sharedKey('IE_PROTO');
562
578
 
563
- var PROTOTYPE = 'prototype';
564
- var Empty = function () { /* empty */ };
579
+ var EmptyConstructor = function () { /* empty */ };
580
+
581
+ var scriptTag = function (content) {
582
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
583
+ };
584
+
585
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
586
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
587
+ activeXDocument.write(scriptTag(''));
588
+ activeXDocument.close();
589
+ var temp = activeXDocument.parentWindow.Object;
590
+ activeXDocument = null; // avoid memory leak
591
+ return temp;
592
+ };
565
593
 
566
594
  // Create object with fake `null` prototype: use iframe Object with cleared prototype
567
- var createDict = function () {
595
+ var NullProtoObjectViaIFrame = function () {
568
596
  // Thrash, waste and sodomy: IE GC bug
569
597
  var iframe = documentCreateElement('iframe');
570
- var length = enumBugKeys.length;
571
- var lt = '<';
572
- var script = 'script';
573
- var gt = '>';
574
- var js = 'java' + script + ':';
598
+ var JS = 'java' + SCRIPT + ':';
575
599
  var iframeDocument;
576
600
  iframe.style.display = 'none';
577
601
  html.appendChild(iframe);
578
- iframe.src = String(js);
602
+ // https://github.com/zloirock/core-js/issues/475
603
+ iframe.src = String(JS);
579
604
  iframeDocument = iframe.contentWindow.document;
580
605
  iframeDocument.open();
581
- iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
606
+ iframeDocument.write(scriptTag('document.F=Object'));
582
607
  iframeDocument.close();
583
- createDict = iframeDocument.F;
584
- while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
585
- return createDict();
608
+ return iframeDocument.F;
586
609
  };
587
610
 
611
+ // Check for document.domain and active x support
612
+ // No need to use active x approach when document.domain is not set
613
+ // see https://github.com/es-shims/es5-shim/issues/150
614
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
615
+ // avoid IE GC bug
616
+ var activeXDocument;
617
+ var NullProtoObject = function () {
618
+ try {
619
+ /* global ActiveXObject */
620
+ activeXDocument = document.domain && new ActiveXObject('htmlfile');
621
+ } catch (error) { /* ignore */ }
622
+ NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
623
+ var length = enumBugKeys.length;
624
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
625
+ return NullProtoObject();
626
+ };
627
+
628
+ hiddenKeys[IE_PROTO] = true;
629
+
588
630
  // `Object.create` method
589
631
  // https://tc39.github.io/ecma262/#sec-object.create
590
632
  var objectCreate = Object.create || function create(O, Properties) {
591
633
  var result;
592
634
  if (O !== null) {
593
- Empty[PROTOTYPE] = anObject(O);
594
- result = new Empty();
595
- Empty[PROTOTYPE] = null;
635
+ EmptyConstructor[PROTOTYPE] = anObject(O);
636
+ result = new EmptyConstructor();
637
+ EmptyConstructor[PROTOTYPE] = null;
596
638
  // add "__proto__" for Object.getPrototypeOf polyfill
597
639
  result[IE_PROTO] = O;
598
- } else result = createDict();
640
+ } else result = NullProtoObject();
599
641
  return Properties === undefined ? result : objectDefineProperties(result, Properties);
600
642
  };
601
643
 
602
- hiddenKeys[IE_PROTO] = true;
603
-
604
644
  var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
605
645
 
606
646
  var toString$1 = {}.toString;
@@ -627,12 +667,15 @@
627
667
  f: f$5
628
668
  };
629
669
 
670
+ var WellKnownSymbolsStore = shared('wks');
630
671
  var Symbol$1 = global_1.Symbol;
631
- var store$1 = shared('wks');
672
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
632
673
 
633
674
  var wellKnownSymbol = function (name) {
634
- return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
635
- || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
675
+ if (!has(WellKnownSymbolsStore, name)) {
676
+ if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
677
+ else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
678
+ } return WellKnownSymbolsStore[name];
636
679
  };
637
680
 
638
681
  var f$6 = wellKnownSymbol;
@@ -778,8 +821,7 @@
778
821
  var getInternalState = internalState.getterFor(SYMBOL);
779
822
  var ObjectPrototype = Object[PROTOTYPE$1];
780
823
  var $Symbol = global_1.Symbol;
781
- var JSON$1 = global_1.JSON;
782
- var nativeJSONStringify = JSON$1 && JSON$1.stringify;
824
+ var $stringify = getBuiltIn('JSON', 'stringify');
783
825
  var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
784
826
  var nativeDefineProperty$1 = objectDefineProperty.f;
785
827
  var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
@@ -788,7 +830,7 @@
788
830
  var ObjectPrototypeSymbols = shared('op-symbols');
789
831
  var StringToSymbolRegistry = shared('string-to-symbol-registry');
790
832
  var SymbolToStringRegistry = shared('symbol-to-string-registry');
791
- var WellKnownSymbolsStore = shared('wks');
833
+ var WellKnownSymbolsStore$1 = shared('wks');
792
834
  var QObject = global_1.QObject;
793
835
  // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
794
836
  var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
@@ -931,7 +973,9 @@
931
973
  redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
932
974
  }
933
975
  }
976
+ }
934
977
 
978
+ if (!useSymbolAsUid) {
935
979
  wrappedWellKnownSymbol.f = function (name) {
936
980
  return wrap(wellKnownSymbol(name), name);
937
981
  };
@@ -941,7 +985,7 @@
941
985
  Symbol: $Symbol
942
986
  });
943
987
 
944
- $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
988
+ $forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {
945
989
  defineWellKnownSymbol(name);
946
990
  });
947
991
 
@@ -1000,34 +1044,41 @@
1000
1044
 
1001
1045
  // `JSON.stringify` method behavior with symbols
1002
1046
  // https://tc39.github.io/ecma262/#sec-json.stringify
1003
- JSON$1 && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
1004
- var symbol = $Symbol();
1005
- // MS Edge converts symbol values to JSON as {}
1006
- return nativeJSONStringify([symbol]) != '[null]'
1007
- // WebKit converts symbol values to JSON as null
1008
- || nativeJSONStringify({ a: symbol }) != '{}'
1009
- // V8 throws on boxed symbols
1010
- || nativeJSONStringify(Object(symbol)) != '{}';
1011
- }) }, {
1012
- stringify: function stringify(it) {
1013
- var args = [it];
1014
- var index = 1;
1015
- var replacer, $replacer;
1016
- while (arguments.length > index) args.push(arguments[index++]);
1017
- $replacer = replacer = args[1];
1018
- if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1019
- if (!isArray(replacer)) replacer = function (key, value) {
1020
- if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1021
- if (!isSymbol(value)) return value;
1022
- };
1023
- args[1] = replacer;
1024
- return nativeJSONStringify.apply(JSON$1, args);
1025
- }
1026
- });
1047
+ if ($stringify) {
1048
+ var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
1049
+ var symbol = $Symbol();
1050
+ // MS Edge converts symbol values to JSON as {}
1051
+ return $stringify([symbol]) != '[null]'
1052
+ // WebKit converts symbol values to JSON as null
1053
+ || $stringify({ a: symbol }) != '{}'
1054
+ // V8 throws on boxed symbols
1055
+ || $stringify(Object(symbol)) != '{}';
1056
+ });
1057
+
1058
+ _export({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
1059
+ // eslint-disable-next-line no-unused-vars
1060
+ stringify: function stringify(it, replacer, space) {
1061
+ var args = [it];
1062
+ var index = 1;
1063
+ var $replacer;
1064
+ while (arguments.length > index) args.push(arguments[index++]);
1065
+ $replacer = replacer;
1066
+ if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1067
+ if (!isArray(replacer)) replacer = function (key, value) {
1068
+ if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1069
+ if (!isSymbol(value)) return value;
1070
+ };
1071
+ args[1] = replacer;
1072
+ return $stringify.apply(null, args);
1073
+ }
1074
+ });
1075
+ }
1027
1076
 
1028
1077
  // `Symbol.prototype[@@toPrimitive]` method
1029
1078
  // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
1030
- if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
1079
+ if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
1080
+ createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
1081
+ }
1031
1082
  // `Symbol.prototype[@@toStringTag]` property
1032
1083
  // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
1033
1084
  setToStringTag($Symbol, SYMBOL);
@@ -1087,10 +1138,33 @@
1087
1138
  else object[propertyKey] = value;
1088
1139
  };
1089
1140
 
1141
+ var userAgent = getBuiltIn('navigator', 'userAgent') || '';
1142
+
1143
+ var process = global_1.process;
1144
+ var versions = process && process.versions;
1145
+ var v8 = versions && versions.v8;
1146
+ var match, version;
1147
+
1148
+ if (v8) {
1149
+ match = v8.split('.');
1150
+ version = match[0] + match[1];
1151
+ } else if (userAgent) {
1152
+ match = userAgent.match(/Edge\/(\d+)/);
1153
+ if (!match || match[1] >= 74) {
1154
+ match = userAgent.match(/Chrome\/(\d+)/);
1155
+ if (match) version = match[1];
1156
+ }
1157
+ }
1158
+
1159
+ var v8Version = version && +version;
1160
+
1090
1161
  var SPECIES$1 = wellKnownSymbol('species');
1091
1162
 
1092
1163
  var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1093
- return !fails(function () {
1164
+ // We can't use this feature detection in V8 since it causes
1165
+ // deoptimization and serious performance degradation
1166
+ // https://github.com/zloirock/core-js/issues/677
1167
+ return v8Version >= 51 || !fails(function () {
1094
1168
  var array = [];
1095
1169
  var constructor = array.constructor = {};
1096
1170
  constructor[SPECIES$1] = function () {
@@ -1104,7 +1178,10 @@
1104
1178
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1105
1179
  var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1106
1180
 
1107
- var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
1181
+ // We can't use this feature detection in V8 since it causes
1182
+ // deoptimization and serious performance degradation
1183
+ // https://github.com/zloirock/core-js/issues/679
1184
+ var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
1108
1185
  var array = [];
1109
1186
  array[IS_CONCAT_SPREADABLE] = false;
1110
1187
  return array.concat()[0] !== array;
@@ -1148,10 +1225,17 @@
1148
1225
  var $filter = arrayIteration.filter;
1149
1226
 
1150
1227
 
1228
+
1229
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
1230
+ // Edge 14- issue
1231
+ var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
1232
+ [].filter.call({ length: -1, 0: 1 }, function (it) { throw it; });
1233
+ });
1234
+
1151
1235
  // `Array.prototype.filter` method
1152
1236
  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
1153
1237
  // with adding support of @@species
1154
- _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
1238
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
1155
1239
  filter: function filter(callbackfn /* , thisArg */) {
1156
1240
  return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1157
1241
  }
@@ -1163,7 +1247,10 @@
1163
1247
  // Array.prototype[@@unscopables]
1164
1248
  // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1165
1249
  if (ArrayPrototype[UNSCOPABLES] == undefined) {
1166
- hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
1250
+ objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
1251
+ configurable: true,
1252
+ value: objectCreate(null)
1253
+ });
1167
1254
  }
1168
1255
 
1169
1256
  // add a key to Array.prototype[@@unscopables]
@@ -1293,7 +1380,9 @@
1293
1380
  if (IteratorPrototype == undefined) IteratorPrototype = {};
1294
1381
 
1295
1382
  // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
1296
- if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
1383
+ if ( !has(IteratorPrototype, ITERATOR)) {
1384
+ createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
1385
+ }
1297
1386
 
1298
1387
  var iteratorsCore = {
1299
1388
  IteratorPrototype: IteratorPrototype,
@@ -1377,7 +1466,7 @@
1377
1466
  if (objectSetPrototypeOf) {
1378
1467
  objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1379
1468
  } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
1380
- hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1469
+ createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1381
1470
  }
1382
1471
  }
1383
1472
  // Set @@toStringTag to native iterators
@@ -1393,7 +1482,7 @@
1393
1482
 
1394
1483
  // define iterator
1395
1484
  if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1396
- hide(IterablePrototype, ITERATOR$1, defaultIterator);
1485
+ createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator);
1397
1486
  }
1398
1487
 
1399
1488
  // export additional methods
@@ -1468,6 +1557,40 @@
1468
1557
  }
1469
1558
  });
1470
1559
 
1560
+ var $map = arrayIteration.map;
1561
+
1562
+
1563
+
1564
+ var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
1565
+ // FF49- issue
1566
+ var USES_TO_LENGTH$1 = HAS_SPECIES_SUPPORT$1 && !fails(function () {
1567
+ [].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
1568
+ });
1569
+
1570
+ // `Array.prototype.map` method
1571
+ // https://tc39.github.io/ecma262/#sec-array.prototype.map
1572
+ // with adding support of @@species
1573
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$1 }, {
1574
+ map: function map(callbackfn /* , thisArg */) {
1575
+ return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1576
+ }
1577
+ });
1578
+
1579
+ var nativeReverse = [].reverse;
1580
+ var test = [1, 2];
1581
+
1582
+ // `Array.prototype.reverse` method
1583
+ // https://tc39.github.io/ecma262/#sec-array.prototype.reverse
1584
+ // fix for Safari 12.0 bug
1585
+ // https://bugs.webkit.org/show_bug.cgi?id=188794
1586
+ _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
1587
+ reverse: function reverse() {
1588
+ // eslint-disable-next-line no-self-assign
1589
+ if (isArray(this)) this.length = this.length;
1590
+ return nativeReverse.call(this);
1591
+ }
1592
+ });
1593
+
1471
1594
  var SPECIES$2 = wellKnownSymbol('species');
1472
1595
  var nativeSlice = [].slice;
1473
1596
  var max$1 = Math.max;
@@ -1503,16 +1626,16 @@
1503
1626
  }
1504
1627
  });
1505
1628
 
1506
- var nativeSort = [].sort;
1507
- var test = [1, 2, 3];
1629
+ var test$1 = [];
1630
+ var nativeSort = test$1.sort;
1508
1631
 
1509
1632
  // IE8-
1510
1633
  var FAILS_ON_UNDEFINED = fails(function () {
1511
- test.sort(undefined);
1634
+ test$1.sort(undefined);
1512
1635
  });
1513
1636
  // V8 bug
1514
1637
  var FAILS_ON_NULL = fails(function () {
1515
- test.sort(null);
1638
+ test$1.sort(null);
1516
1639
  });
1517
1640
  // Old WebKit
1518
1641
  var SLOPPY_METHOD$2 = sloppyArrayMethod('sort');
@@ -1700,11 +1823,22 @@
1700
1823
  }
1701
1824
 
1702
1825
  var nativeAssign = Object.assign;
1826
+ var defineProperty$4 = Object.defineProperty;
1703
1827
 
1704
1828
  // `Object.assign` method
1705
1829
  // https://tc39.github.io/ecma262/#sec-object.assign
1706
- // should work with symbols and should have deterministic property order (V8 bug)
1707
1830
  var objectAssign = !nativeAssign || fails(function () {
1831
+ // should have correct order of operations (Edge bug)
1832
+ if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$4({}, 'a', {
1833
+ enumerable: true,
1834
+ get: function () {
1835
+ defineProperty$4(this, 'b', {
1836
+ value: 3,
1837
+ enumerable: false
1838
+ });
1839
+ }
1840
+ }), { b: 2 })).b !== 1) return true;
1841
+ // should work with symbols and should have deterministic property order (V8 bug)
1708
1842
  var A = {};
1709
1843
  var B = {};
1710
1844
  // eslint-disable-next-line no-undef
@@ -1779,6 +1913,13 @@
1779
1913
  });
1780
1914
 
1781
1915
  var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1916
+ var test$2 = {};
1917
+
1918
+ test$2[TO_STRING_TAG$1] = 'z';
1919
+
1920
+ var toStringTagSupport = String(test$2) === '[object z]';
1921
+
1922
+ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1782
1923
  // ES3 wrong here
1783
1924
  var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1784
1925
 
@@ -1790,34 +1931,27 @@
1790
1931
  };
1791
1932
 
1792
1933
  // getting tag from ES6+ `Object.prototype.toString`
1793
- var classof = function (it) {
1934
+ var classof = toStringTagSupport ? classofRaw : function (it) {
1794
1935
  var O, tag, result;
1795
1936
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1796
1937
  // @@toStringTag case
1797
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1938
+ : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$2)) == 'string' ? tag
1798
1939
  // builtinTag case
1799
1940
  : CORRECT_ARGUMENTS ? classofRaw(O)
1800
1941
  // ES3 arguments fallback
1801
1942
  : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1802
1943
  };
1803
1944
 
1804
- var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1805
- var test$1 = {};
1806
-
1807
- test$1[TO_STRING_TAG$2] = 'z';
1808
-
1809
1945
  // `Object.prototype.toString` method implementation
1810
1946
  // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1811
- var objectToString = String(test$1) !== '[object z]' ? function toString() {
1947
+ var objectToString = toStringTagSupport ? {}.toString : function toString() {
1812
1948
  return '[object ' + classof(this) + ']';
1813
- } : test$1.toString;
1814
-
1815
- var ObjectPrototype$2 = Object.prototype;
1949
+ };
1816
1950
 
1817
1951
  // `Object.prototype.toString` method
1818
1952
  // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1819
- if (objectToString !== ObjectPrototype$2.toString) {
1820
- redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
1953
+ if (!toStringTagSupport) {
1954
+ redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
1821
1955
  }
1822
1956
 
1823
1957
  var trim$1 = stringTrim.trim;
@@ -1874,6 +2008,119 @@
1874
2008
  return result;
1875
2009
  };
1876
2010
 
2011
+ // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
2012
+ // so we use an intermediate function.
2013
+ function RE(s, f) {
2014
+ return RegExp(s, f);
2015
+ }
2016
+
2017
+ var UNSUPPORTED_Y = fails(function () {
2018
+ // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2019
+ var re = RE('a', 'y');
2020
+ re.lastIndex = 2;
2021
+ return re.exec('abcd') != null;
2022
+ });
2023
+
2024
+ var BROKEN_CARET = fails(function () {
2025
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2026
+ var re = RE('^r', 'gy');
2027
+ re.lastIndex = 2;
2028
+ return re.exec('str') != null;
2029
+ });
2030
+
2031
+ var regexpStickyHelpers = {
2032
+ UNSUPPORTED_Y: UNSUPPORTED_Y,
2033
+ BROKEN_CARET: BROKEN_CARET
2034
+ };
2035
+
2036
+ var nativeExec = RegExp.prototype.exec;
2037
+ // This always refers to the native implementation, because the
2038
+ // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
2039
+ // which loads this file before patching the method.
2040
+ var nativeReplace = String.prototype.replace;
2041
+
2042
+ var patchedExec = nativeExec;
2043
+
2044
+ var UPDATES_LAST_INDEX_WRONG = (function () {
2045
+ var re1 = /a/;
2046
+ var re2 = /b*/g;
2047
+ nativeExec.call(re1, 'a');
2048
+ nativeExec.call(re2, 'a');
2049
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2050
+ })();
2051
+
2052
+ var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
2053
+
2054
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
2055
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2056
+
2057
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
2058
+
2059
+ if (PATCH) {
2060
+ patchedExec = function exec(str) {
2061
+ var re = this;
2062
+ var lastIndex, reCopy, match, i;
2063
+ var sticky = UNSUPPORTED_Y$1 && re.sticky;
2064
+ var flags = regexpFlags.call(re);
2065
+ var source = re.source;
2066
+ var charsAdded = 0;
2067
+ var strCopy = str;
2068
+
2069
+ if (sticky) {
2070
+ flags = flags.replace('y', '');
2071
+ if (flags.indexOf('g') === -1) {
2072
+ flags += 'g';
2073
+ }
2074
+
2075
+ strCopy = String(str).slice(re.lastIndex);
2076
+ // Support anchored sticky behavior.
2077
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
2078
+ source = '(?: ' + source + ')';
2079
+ strCopy = ' ' + strCopy;
2080
+ charsAdded++;
2081
+ }
2082
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
2083
+ // simulate the 'y' flag.
2084
+ reCopy = new RegExp('^(?:' + source + ')', flags);
2085
+ }
2086
+
2087
+ if (NPCG_INCLUDED) {
2088
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2089
+ }
2090
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2091
+
2092
+ match = nativeExec.call(sticky ? reCopy : re, strCopy);
2093
+
2094
+ if (sticky) {
2095
+ if (match) {
2096
+ match.input = match.input.slice(charsAdded);
2097
+ match[0] = match[0].slice(charsAdded);
2098
+ match.index = re.lastIndex;
2099
+ re.lastIndex += match[0].length;
2100
+ } else re.lastIndex = 0;
2101
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
2102
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2103
+ }
2104
+ if (NPCG_INCLUDED && match && match.length > 1) {
2105
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
2106
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
2107
+ nativeReplace.call(match[0], reCopy, function () {
2108
+ for (i = 1; i < arguments.length - 2; i++) {
2109
+ if (arguments[i] === undefined) match[i] = undefined;
2110
+ }
2111
+ });
2112
+ }
2113
+
2114
+ return match;
2115
+ };
2116
+ }
2117
+
2118
+ var regexpExec = patchedExec;
2119
+
2120
+ _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
2121
+ exec: regexpExec
2122
+ });
2123
+
1877
2124
  var TO_STRING = 'toString';
1878
2125
  var RegExpPrototype = RegExp.prototype;
1879
2126
  var nativeToString = RegExpPrototype[TO_STRING];
@@ -1986,58 +2233,6 @@
1986
2233
  return { value: point, done: false };
1987
2234
  });
1988
2235
 
1989
- var nativeExec = RegExp.prototype.exec;
1990
- // This always refers to the native implementation, because the
1991
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
1992
- // which loads this file before patching the method.
1993
- var nativeReplace = String.prototype.replace;
1994
-
1995
- var patchedExec = nativeExec;
1996
-
1997
- var UPDATES_LAST_INDEX_WRONG = (function () {
1998
- var re1 = /a/;
1999
- var re2 = /b*/g;
2000
- nativeExec.call(re1, 'a');
2001
- nativeExec.call(re2, 'a');
2002
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2003
- })();
2004
-
2005
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
2006
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2007
-
2008
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
2009
-
2010
- if (PATCH) {
2011
- patchedExec = function exec(str) {
2012
- var re = this;
2013
- var lastIndex, reCopy, match, i;
2014
-
2015
- if (NPCG_INCLUDED) {
2016
- reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
2017
- }
2018
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2019
-
2020
- match = nativeExec.call(re, str);
2021
-
2022
- if (UPDATES_LAST_INDEX_WRONG && match) {
2023
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2024
- }
2025
- if (NPCG_INCLUDED && match && match.length > 1) {
2026
- // Fix browsers whose `exec` methods don't consistently return `undefined`
2027
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
2028
- nativeReplace.call(match[0], reCopy, function () {
2029
- for (i = 1; i < arguments.length - 2; i++) {
2030
- if (arguments[i] === undefined) match[i] = undefined;
2031
- }
2032
- });
2033
- }
2034
-
2035
- return match;
2036
- };
2037
- }
2038
-
2039
- var regexpExec = patchedExec;
2040
-
2041
2236
  var SPECIES$3 = wellKnownSymbol('species');
2042
2237
 
2043
2238
  var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
@@ -2053,6 +2248,12 @@
2053
2248
  return ''.replace(re, '$<a>') !== '7';
2054
2249
  });
2055
2250
 
2251
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
2252
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
2253
+ var REPLACE_KEEPS_$0 = (function () {
2254
+ return 'a'.replace(/./, '$0') === '$0';
2255
+ })();
2256
+
2056
2257
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
2057
2258
  // Weex JS has frozen built-in prototypes, so use try / catch wrapper
2058
2259
  var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
@@ -2077,15 +2278,22 @@
2077
2278
  // Symbol-named RegExp methods call .exec
2078
2279
  var execCalled = false;
2079
2280
  var re = /a/;
2080
- re.exec = function () { execCalled = true; return null; };
2081
2281
 
2082
2282
  if (KEY === 'split') {
2283
+ // We can't use real regex here since it causes deoptimization
2284
+ // and serious performance degradation in V8
2285
+ // https://github.com/zloirock/core-js/issues/306
2286
+ re = {};
2083
2287
  // RegExp[@@split] doesn't call the regex's exec method, but first creates
2084
2288
  // a new one. We need to return the patched regex when creating the new one.
2085
2289
  re.constructor = {};
2086
2290
  re.constructor[SPECIES$3] = function () { return re; };
2291
+ re.flags = '';
2292
+ re[SYMBOL] = /./[SYMBOL];
2087
2293
  }
2088
2294
 
2295
+ re.exec = function () { execCalled = true; return null; };
2296
+
2089
2297
  re[SYMBOL]('');
2090
2298
  return !execCalled;
2091
2299
  });
@@ -2093,7 +2301,7 @@
2093
2301
  if (
2094
2302
  !DELEGATES_TO_SYMBOL ||
2095
2303
  !DELEGATES_TO_EXEC ||
2096
- (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
2304
+ (KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
2097
2305
  (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
2098
2306
  ) {
2099
2307
  var nativeRegExpMethod = /./[SYMBOL];
@@ -2108,7 +2316,7 @@
2108
2316
  return { done: true, value: nativeMethod.call(str, regexp, arg2) };
2109
2317
  }
2110
2318
  return { done: false };
2111
- });
2319
+ }, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
2112
2320
  var stringMethod = methods[0];
2113
2321
  var regexMethod = methods[1];
2114
2322
 
@@ -2121,8 +2329,9 @@
2121
2329
  // 21.2.5.9 RegExp.prototype[@@search](string)
2122
2330
  : function (string) { return regexMethod.call(string, this); }
2123
2331
  );
2124
- if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
2125
2332
  }
2333
+
2334
+ if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
2126
2335
  };
2127
2336
 
2128
2337
  var charAt$1 = stringMultibyte.charAt;
@@ -2163,7 +2372,7 @@
2163
2372
  };
2164
2373
 
2165
2374
  // @@replace logic
2166
- fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
2375
+ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
2167
2376
  return [
2168
2377
  // `String.prototype.replace` method
2169
2378
  // https://tc39.github.io/ecma262/#sec-string.prototype.replace
@@ -2177,8 +2386,10 @@
2177
2386
  // `RegExp.prototype[@@replace]` method
2178
2387
  // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
2179
2388
  function (regexp, replaceValue) {
2180
- var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
2181
- if (res.done) return res.value;
2389
+ if (reason.REPLACE_KEEPS_$0 || (typeof replaceValue === 'string' && replaceValue.indexOf('$0') === -1)) {
2390
+ var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
2391
+ if (res.done) return res.value;
2392
+ }
2182
2393
 
2183
2394
  var rx = anObject(regexp);
2184
2395
  var S = String(this);
@@ -2508,7 +2719,7 @@
2508
2719
  var CollectionPrototype = Collection && Collection.prototype;
2509
2720
  // some Chrome versions have non-configurable methods on DOMTokenList
2510
2721
  if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
2511
- hide(CollectionPrototype, 'forEach', arrayForEach);
2722
+ createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
2512
2723
  } catch (error) {
2513
2724
  CollectionPrototype.forEach = arrayForEach;
2514
2725
  }
@@ -2524,15 +2735,17 @@
2524
2735
  if (CollectionPrototype$1) {
2525
2736
  // some Chrome versions have non-configurable methods on DOMTokenList
2526
2737
  if (CollectionPrototype$1[ITERATOR$2] !== ArrayValues) try {
2527
- hide(CollectionPrototype$1, ITERATOR$2, ArrayValues);
2738
+ createNonEnumerableProperty(CollectionPrototype$1, ITERATOR$2, ArrayValues);
2528
2739
  } catch (error) {
2529
2740
  CollectionPrototype$1[ITERATOR$2] = ArrayValues;
2530
2741
  }
2531
- if (!CollectionPrototype$1[TO_STRING_TAG$3]) hide(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
2742
+ if (!CollectionPrototype$1[TO_STRING_TAG$3]) {
2743
+ createNonEnumerableProperty(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
2744
+ }
2532
2745
  if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {
2533
2746
  // some Chrome versions have non-configurable methods on DOMTokenList
2534
2747
  if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
2535
- hide(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
2748
+ createNonEnumerableProperty(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
2536
2749
  } catch (error) {
2537
2750
  CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];
2538
2751
  }
@@ -2601,6 +2814,10 @@
2601
2814
  }
2602
2815
 
2603
2816
  function _iterableToArrayLimit(arr, i) {
2817
+ if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
2818
+ return;
2819
+ }
2820
+
2604
2821
  var _arr = [];
2605
2822
  var _n = true;
2606
2823
  var _d = false;
@@ -2634,7 +2851,7 @@
2634
2851
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
2635
2852
  }
2636
2853
 
2637
- var VERSION = '1.15.5';
2854
+ var VERSION = '1.16.0';
2638
2855
  var bootstrapVersion = 4;
2639
2856
 
2640
2857
  try {
@@ -2680,7 +2897,7 @@
2680
2897
  },
2681
2898
  html: {
2682
2899
  toolbarDropdown: ['<ul class="dropdown-menu" role="menu">', '</ul>'],
2683
- toolbarDropdownItem: '<li role="menuitem"><label>%s</label></li>',
2900
+ toolbarDropdownItem: '<li class="dropdown-item-marker" role="menuitem"><label>%s</label></li>',
2684
2901
  toolbarDropdownSeparator: '<li class="divider"></li>',
2685
2902
  pageDropdown: ['<ul class="dropdown-menu" role="menu">', '</ul>'],
2686
2903
  pageDropdownItem: '<li role="menuitem" class="%s"><a href="#">%s</a></li>',
@@ -2726,7 +2943,7 @@
2726
2943
  },
2727
2944
  html: {
2728
2945
  toolbarDropdown: ['<div class="dropdown-menu dropdown-menu-right">', '</div>'],
2729
- toolbarDropdownItem: '<label class="dropdown-item">%s</label>',
2946
+ toolbarDropdownItem: '<label class="dropdown-item dropdown-item-marker">%s</label>',
2730
2947
  pageDropdown: ['<div class="dropdown-menu">', '</div>'],
2731
2948
  pageDropdownItem: '<a class="dropdown-item %s" href="#">%s</a>',
2732
2949
  toolbarDropdownSeparator: '<div class="dropdown-divider"></div>',
@@ -2745,6 +2962,9 @@
2745
2962
  height: undefined,
2746
2963
  classes: 'table table-bordered table-hover',
2747
2964
  theadClasses: '',
2965
+ headerStyle: function headerStyle(column) {
2966
+ return {};
2967
+ },
2748
2968
  rowStyle: function rowStyle(row, index) {
2749
2969
  return {};
2750
2970
  },
@@ -2762,6 +2982,7 @@
2762
2982
  sortOrder: 'asc',
2763
2983
  sortStable: false,
2764
2984
  rememberOrder: false,
2985
+ serverSort: true,
2765
2986
  customSort: undefined,
2766
2987
  columns: [[]],
2767
2988
  data: [],
@@ -2823,11 +3044,12 @@
2823
3044
  customSearch: undefined,
2824
3045
  showHeader: true,
2825
3046
  showFooter: false,
2826
- footerStyle: function footerStyle(row, index) {
3047
+ footerStyle: function footerStyle(column) {
2827
3048
  return {};
2828
3049
  },
2829
3050
  showColumns: false,
2830
3051
  showColumnsToggleAll: false,
3052
+ showColumnsSearch: false,
2831
3053
  minimumCountColumns: 1,
2832
3054
  showPaginationSwitch: false,
2833
3055
  showRefresh: false,
@@ -2864,6 +3086,7 @@
2864
3086
  toolbarAlign: 'left',
2865
3087
  buttonsToolbar: undefined,
2866
3088
  buttonsAlign: 'right',
3089
+ buttonsOrder: ['paginationSwitch', 'refresh', 'toggle', 'fullscreen', 'columns'],
2867
3090
  buttonsPrefix: CONSTANTS.classes.buttonsPrefix,
2868
3091
  buttonsClass: CONSTANTS.classes.buttons,
2869
3092
  icons: CONSTANTS.icons,
@@ -3064,7 +3287,7 @@
3064
3287
  escape: false,
3065
3288
  events: undefined
3066
3289
  };
3067
- var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'getAllSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'resetWidth', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText'];
3290
+ var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'getAllSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText'];
3068
3291
  var EVENTS = {
3069
3292
  'all.bs.table': 'onAll',
3070
3293
  'click-row.bs.table': 'onClickRow',
@@ -3110,53 +3333,6 @@
3110
3333
  }
3111
3334
  };
3112
3335
 
3113
- // `FlattenIntoArray` abstract operation
3114
- // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
3115
- var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
3116
- var targetIndex = start;
3117
- var sourceIndex = 0;
3118
- var mapFn = mapper ? bindContext(mapper, thisArg, 3) : false;
3119
- var element;
3120
-
3121
- while (sourceIndex < sourceLen) {
3122
- if (sourceIndex in source) {
3123
- element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
3124
-
3125
- if (depth > 0 && isArray(element)) {
3126
- targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
3127
- } else {
3128
- if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
3129
- target[targetIndex] = element;
3130
- }
3131
-
3132
- targetIndex++;
3133
- }
3134
- sourceIndex++;
3135
- }
3136
- return targetIndex;
3137
- };
3138
-
3139
- var flattenIntoArray_1 = flattenIntoArray;
3140
-
3141
- // `Array.prototype.flat` method
3142
- // https://github.com/tc39/proposal-flatMap
3143
- _export({ target: 'Array', proto: true }, {
3144
- flat: function flat(/* depthArg = 1 */) {
3145
- var depthArg = arguments.length ? arguments[0] : undefined;
3146
- var O = toObject(this);
3147
- var sourceLen = toLength(O.length);
3148
- var A = arraySpeciesCreate(O, 0);
3149
- A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
3150
- return A;
3151
- }
3152
- });
3153
-
3154
- // this method was added to unscopables after implementation
3155
- // in popular engines, so it's moved to a separate module
3156
-
3157
-
3158
- addToUnscopables('flat');
3159
-
3160
3336
  var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
3161
3337
 
3162
3338
  // `Object.keys` method
@@ -3312,7 +3488,10 @@
3312
3488
  }
3313
3489
  },
3314
3490
  updateFieldGroup: function updateFieldGroup(columns) {
3315
- var allColumns = columns.flat();
3491
+ var _ref;
3492
+
3493
+ var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns));
3494
+
3316
3495
  var _iteratorNormalCompletion4 = true;
3317
3496
  var _didIteratorError4 = false;
3318
3497
  var _iteratorError4 = undefined;
@@ -3603,7 +3782,7 @@
3603
3782
  });
3604
3783
  return data;
3605
3784
  },
3606
- sort: function sort(a, b, order, sortStable) {
3785
+ sort: function sort(a, b, order, sortStable, aPosition, bPosition) {
3607
3786
  if (a === undefined || a === null) {
3608
3787
  a = '';
3609
3788
  }
@@ -3613,8 +3792,8 @@
3613
3792
  }
3614
3793
 
3615
3794
  if (sortStable && a === b) {
3616
- a = a._position;
3617
- b = b._position;
3795
+ a = aPosition;
3796
+ b = bPosition;
3618
3797
  } // If both values are numeric, do a numeric comparison
3619
3798
 
3620
3799
 
@@ -3648,6 +3827,11 @@
3648
3827
  }
3649
3828
 
3650
3829
  return order;
3830
+ },
3831
+ getResizeEventName: function getResizeEventName() {
3832
+ var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3833
+ id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000));
3834
+ return "resize.bootstrap-table-".concat(id);
3651
3835
  }
3652
3836
  };
3653
3837
 
@@ -3836,11 +4020,11 @@
3836
4020
  }, {
3837
4021
  key: "initConstants",
3838
4022
  value: function initConstants() {
3839
- var o = this.options;
4023
+ var opts = this.options;
3840
4024
  this.constants = Constants.CONSTANTS;
3841
4025
  this.constants.theme = $.fn.bootstrapTable.theme;
3842
- var buttonsPrefix = o.buttonsPrefix ? "".concat(o.buttonsPrefix, "-") : '';
3843
- this.constants.buttonsClass = [o.buttonsPrefix, buttonsPrefix + o.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), o.iconSize)].join(' ').trim();
4026
+ var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : '';
4027
+ this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim();
3844
4028
  }
3845
4029
  }, {
3846
4030
  key: "initLocale",
@@ -3902,11 +4086,6 @@
3902
4086
  }
3903
4087
 
3904
4088
  this.$tableFooter = this.$container.find('.fixed-table-footer');
3905
- } else {
3906
- if (!this.$tableFooter.length) {
3907
- this.$el.append('<tfoot><tr></tr></tfoot>');
3908
- this.$tableFooter = this.$el.find('tfoot');
3909
- }
3910
4089
  }
3911
4090
  }
3912
4091
  }, {
@@ -3915,7 +4094,6 @@
3915
4094
  var _this = this;
3916
4095
 
3917
4096
  var columns = [];
3918
- var data = [];
3919
4097
  this.$header = this.$el.find('>thead');
3920
4098
 
3921
4099
  if (!this.$header.length) {
@@ -3967,7 +4145,7 @@
3967
4145
  if (!this.options.data.length) {
3968
4146
  this.options.data = Utils.trToData(this.columns, this.$el.find('>tbody>tr'));
3969
4147
 
3970
- if (data.length) {
4148
+ if (this.options.data.length) {
3971
4149
  this.fromHtml = true;
3972
4150
  }
3973
4151
  }
@@ -4024,6 +4202,24 @@
4024
4202
  return;
4025
4203
  }
4026
4204
 
4205
+ var headerStyle = Utils.calculateObjectValue(null, _this2.options.headerStyle, [column]);
4206
+ var csses = [];
4207
+ var classes = '';
4208
+
4209
+ if (headerStyle && headerStyle.css) {
4210
+ for (var _i = 0, _Object$entries = Object.entries(headerStyle.css); _i < _Object$entries.length; _i++) {
4211
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
4212
+ key = _Object$entries$_i[0],
4213
+ value = _Object$entries$_i[1];
4214
+
4215
+ csses.push("".concat(key, ": ").concat(value));
4216
+ }
4217
+ }
4218
+
4219
+ if (headerStyle && headerStyle.classes) {
4220
+ classes = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], headerStyle.classes].join(' ') : headerStyle.classes);
4221
+ }
4222
+
4027
4223
  if (typeof column.fieldIndex !== 'undefined') {
4028
4224
  _this2.header.fields[column.fieldIndex] = column.field;
4029
4225
  _this2.header.styles[column.fieldIndex] = align + style;
@@ -4047,7 +4243,7 @@
4047
4243
  visibleColumns[column.field] = column;
4048
4244
  }
4049
4245
 
4050
- html.push("<th".concat(Utils.sprintf(' title="%s"', column.titleTooltip)), column.checkbox || column.radio ? Utils.sprintf(' class="bs-checkbox %s"', column['class'] || '') : class_, Utils.sprintf(' style="%s"', halign + style), Utils.sprintf(' rowspan="%s"', column.rowspan), Utils.sprintf(' colspan="%s"', column.colspan), Utils.sprintf(' data-field="%s"', column.field), // If `column` is not the first element of `this.options.columns[0]`, then className 'data-not-first-th' should be added.
4246
+ html.push("<th".concat(Utils.sprintf(' title="%s"', column.titleTooltip)), column.checkbox || column.radio ? Utils.sprintf(' class="bs-checkbox %s"', column['class'] || '') : classes || class_, Utils.sprintf(' style="%s"', halign + style + csses.join('; ')), Utils.sprintf(' rowspan="%s"', column.rowspan), Utils.sprintf(' colspan="%s"', column.colspan), Utils.sprintf(' data-field="%s"', column.field), // If `column` is not the first element of `this.options.columns[0]`, then className 'data-not-first-th' should be added.
4051
4247
  j === 0 && i > 0 ? ' data-not-first-th' : '', '>');
4052
4248
  html.push(Utils.sprintf('<div class="th-inner %s">', _this2.options.sortable && column.sortable ? 'sortable both' : ''));
4053
4249
  var text = _this2.options.escape ? Utils.escapeHTML(column.title) : column.title;
@@ -4066,7 +4262,6 @@
4066
4262
  if (column.radio) {
4067
4263
  text = '';
4068
4264
  _this2.header.stateField = column.field;
4069
- _this2.options.singleSelect = true;
4070
4265
  }
4071
4266
 
4072
4267
  if (!text && column.showSelectTitle) {
@@ -4108,7 +4303,7 @@
4108
4303
  }
4109
4304
  }
4110
4305
  });
4111
- var resizeEvent = "resize.bootstrap-table".concat(this.$el.attr('id') || '');
4306
+ var resizeEvent = Utils.getResizeEventName(this.$el.attr('id'));
4112
4307
  $(window).off(resizeEvent);
4113
4308
 
4114
4309
  if (!this.options.showHeader || this.options.cardView) {
@@ -4121,15 +4316,15 @@
4121
4316
  this.$tableLoading.css('top', this.$header.outerHeight() + 1); // Assign the correct sortable arrow
4122
4317
 
4123
4318
  this.getCaret();
4124
- $(window).on(resizeEvent, function (e) {
4125
- return _this2.resetWidth(e);
4319
+ $(window).on(resizeEvent, function () {
4320
+ return _this2.resetView();
4126
4321
  });
4127
4322
  }
4128
4323
 
4129
4324
  this.$selectAll = this.$header.find('[name="btSelectAll"]');
4130
- this.$selectAll.off('click').on('click', function (_ref) {
4131
- var currentTarget = _ref.currentTarget;
4132
- var checked = $(currentTarget).prop('checked');
4325
+ this.$selectAll.off('click').on('click', function (e) {
4326
+ e.stopPropagation();
4327
+ var checked = $(e.currentTarget).prop('checked');
4133
4328
 
4134
4329
  _this2[checked ? 'checkAll' : 'uncheckAll']();
4135
4330
 
@@ -4194,7 +4389,7 @@
4194
4389
  return order * value;
4195
4390
  }
4196
4391
 
4197
- return Utils.sort(aa, bb, order, _this3.options.sortStable);
4392
+ return Utils.sort(aa, bb, order, _this3.options.sortStable, a._position, b._position);
4198
4393
  });
4199
4394
  }
4200
4395
 
@@ -4212,9 +4407,9 @@
4212
4407
  }
4213
4408
  }, {
4214
4409
  key: "onSort",
4215
- value: function onSort(_ref2) {
4216
- var type = _ref2.type,
4217
- currentTarget = _ref2.currentTarget;
4410
+ value: function onSort(_ref) {
4411
+ var type = _ref.type,
4412
+ currentTarget = _ref.currentTarget;
4218
4413
  var $this = type === 'keypress' ? $(currentTarget) : $(currentTarget).parent();
4219
4414
  var $this_ = this.$header.find('th').eq($this.index());
4220
4415
  this.$header.add(this.$header_).find('span.order').remove();
@@ -4236,7 +4431,7 @@
4236
4431
 
4237
4432
  this.getCaret();
4238
4433
 
4239
- if (this.options.sidePagination === 'server') {
4434
+ if (this.options.sidePagination === 'server' && this.options.serverSort) {
4240
4435
  this.options.pageNumber = 1;
4241
4436
  this.initServer(this.options.silentSort);
4242
4437
  return;
@@ -4250,71 +4445,112 @@
4250
4445
  value: function initToolbar() {
4251
4446
  var _this4 = this;
4252
4447
 
4253
- var o = this.options;
4448
+ var opts = this.options;
4254
4449
  var html = [];
4255
4450
  var timeoutId = 0;
4256
4451
  var $keepOpen;
4257
4452
  var switchableCount = 0;
4258
4453
 
4259
4454
  if (this.$toolbar.find('.bs-bars').children().length) {
4260
- $('body').append($(o.toolbar));
4455
+ $('body').append($(opts.toolbar));
4261
4456
  }
4262
4457
 
4263
4458
  this.$toolbar.html('');
4264
4459
 
4265
- if (typeof o.toolbar === 'string' || _typeof(o.toolbar) === 'object') {
4266
- $(Utils.sprintf('<div class="bs-bars %s-%s"></div>', this.constants.classes.pull, o.toolbarAlign)).appendTo(this.$toolbar).append($(o.toolbar));
4460
+ if (typeof opts.toolbar === 'string' || _typeof(opts.toolbar) === 'object') {
4461
+ $(Utils.sprintf('<div class="bs-bars %s-%s"></div>', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($(opts.toolbar));
4267
4462
  } // showColumns, showToggle, showRefresh
4268
4463
 
4269
4464
 
4270
- html = ["<div class=\"".concat(['columns', "columns-".concat(o.buttonsAlign), this.constants.classes.buttonsGroup, "".concat(this.constants.classes.pull, "-").concat(o.buttonsAlign)].join(' '), "\">")];
4465
+ html = ["<div class=\"".concat(['columns', "columns-".concat(opts.buttonsAlign), this.constants.classes.buttonsGroup, "".concat(this.constants.classes.pull, "-").concat(opts.buttonsAlign)].join(' '), "\">")];
4271
4466
 
4272
- if (typeof o.icons === 'string') {
4273
- o.icons = Utils.calculateObjectValue(null, o.icons);
4467
+ if (typeof opts.icons === 'string') {
4468
+ opts.icons = Utils.calculateObjectValue(null, opts.icons);
4274
4469
  }
4275
4470
 
4276
- if (o.showPaginationSwitch) {
4277
- html.push("<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"paginationSwitch\"\n aria-label=\"Pagination Switch\" title=\"").concat(o.formatPaginationSwitch(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.paginationSwitchDown) : '', "\n ").concat(o.showButtonText ? o.formatPaginationSwitchUp() : '', "\n </button>"));
4278
- }
4471
+ var buttonsHtml = {
4472
+ paginationSwitch: "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"paginationSwitch\"\n aria-label=\"Pagination Switch\" title=\"").concat(opts.formatPaginationSwitch(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.paginationSwitchDown) : '', "\n ").concat(opts.showButtonText ? opts.formatPaginationSwitchUp() : '', "\n </button>"),
4473
+ refresh: "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"refresh\"\n aria-label=\"Refresh\" title=\"").concat(opts.formatRefresh(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.refresh) : '', "\n ").concat(opts.showButtonText ? opts.formatRefresh() : '', "\n </button>"),
4474
+ toggle: "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"toggle\"\n aria-label=\"Toggle\" title=\"").concat(opts.formatToggle(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.toggleOff) : '', "\n ").concat(opts.showButtonText ? opts.formatToggleOn() : '', "\n </button>"),
4475
+ fullscreen: "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"fullscreen\"\n aria-label=\"Fullscreen\" title=\"").concat(opts.formatFullscreen(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.fullscreen) : '', "\n ").concat(opts.showButtonText ? opts.formatFullscreen() : '', "\n </button>"),
4476
+ columns: function () {
4477
+ var html = [];
4478
+ html.push("<div class=\"keep-open ".concat(_this4.constants.classes.buttonsDropdown, "\" title=\"").concat(opts.formatColumns(), "\">\n <button class=\"").concat(_this4.constants.buttonsClass, " dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\"\n aria-label=\"Columns\" title=\"").concat(opts.formatColumns(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(_this4.constants.html.icon, opts.iconsPrefix, opts.icons.columns) : '', "\n ").concat(opts.showButtonText ? opts.formatColumns() : '', "\n ").concat(_this4.constants.html.dropdownCaret, "\n </button>\n ").concat(_this4.constants.html.toolbarDropdown[0]));
4279
4479
 
4280
- if (o.showRefresh) {
4281
- html.push("<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"refresh\"\n aria-label=\"Refresh\" title=\"").concat(o.formatRefresh(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.refresh) : '', "\n ").concat(o.showButtonText ? o.formatRefresh() : '', "\n </button>"));
4282
- }
4480
+ if (opts.showColumnsSearch) {
4481
+ html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="text" class="%s" id="columnsSearch" placeholder="%s" autocomplete="off">', _this4.constants.classes.input, opts.formatSearch())));
4482
+ html.push(_this4.constants.html.toolbarDropdownSeparator);
4483
+ }
4283
4484
 
4284
- if (o.showToggle) {
4285
- html.push("<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"toggle\"\n aria-label=\"Toggle\" title=\"").concat(o.formatToggle(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.toggleOff) : '', "\n ").concat(o.showButtonText ? o.formatToggleOn() : '', "\n </button>"));
4286
- }
4485
+ if (opts.showColumnsToggleAll) {
4486
+ var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) {
4487
+ return !_this4.isSelectionColumn(column);
4488
+ }).length;
4287
4489
 
4288
- if (o.showFullscreen) {
4289
- html.push("<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"fullscreen\"\n aria-label=\"Fullscreen\" title=\"").concat(o.formatFullscreen(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.fullscreen) : '', "\n ").concat(o.showButtonText ? o.formatFullscreen() : '', "\n </button>"));
4290
- }
4490
+ html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" class="toggle-all" %s> <span>%s</span>', allFieldsVisible ? 'checked="checked"' : '', opts.formatColumnsToggleAll())));
4491
+ html.push(_this4.constants.html.toolbarDropdownSeparator);
4492
+ }
4291
4493
 
4292
- if (o.showColumns) {
4293
- html.push("<div class=\"keep-open ".concat(this.constants.classes.buttonsDropdown, "\" title=\"").concat(o.formatColumns(), "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\"\n aria-label=\"Columns\" title=\"").concat(o.formatColumns(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.columns) : '', "\n ").concat(o.showButtonText ? o.formatColumns() : '', "\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n ").concat(this.constants.html.toolbarDropdown[0]));
4494
+ var visibleColumns = 0;
4294
4495
 
4295
- if (o.showColumnsToggleAll) {
4296
- var allFieldsVisible = this.getVisibleColumns().length === this.columns.length;
4297
- html.push(Utils.sprintf(this.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" class="toggle-all" %s> <span>%s</span>', allFieldsVisible ? 'checked="checked"' : '', o.formatColumnsToggleAll())));
4298
- html.push(this.constants.html.toolbarDropdownSeparator);
4299
- }
4496
+ _this4.columns.forEach(function (column, i) {
4497
+ if (column.visible) {
4498
+ visibleColumns++;
4499
+ }
4500
+ });
4300
4501
 
4301
- this.columns.forEach(function (column, i) {
4302
- if (column.radio || column.checkbox) {
4303
- return;
4304
- }
4502
+ _this4.columns.forEach(function (column, i) {
4503
+ if (_this4.isSelectionColumn(column)) {
4504
+ return;
4505
+ }
4305
4506
 
4306
- if (o.cardView && !column.cardVisible) {
4307
- return;
4308
- }
4507
+ if (opts.cardView && !column.cardVisible) {
4508
+ return;
4509
+ }
4309
4510
 
4310
- var checked = column.visible ? ' checked="checked"' : '';
4511
+ var checked = column.visible ? ' checked="checked"' : '';
4512
+ var disabled = visibleColumns <= _this4.options.minimumCountColumns && checked ? ' disabled="disabled"' : '';
4311
4513
 
4312
- if (column.switchable) {
4313
- html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" data-field="%s" value="%s"%s> <span>%s</span>', column.field, i, checked, column.title)));
4314
- switchableCount++;
4514
+ if (column.switchable) {
4515
+ html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" data-field="%s" value="%s"%s%s> <span>%s</span>', column.field, i, checked, disabled, column.title)));
4516
+ switchableCount++;
4517
+ }
4518
+ });
4519
+
4520
+ html.push(_this4.constants.html.toolbarDropdown[1], '</div>');
4521
+ return html.join('');
4522
+ }()
4523
+ };
4524
+
4525
+ if (typeof opts.buttonsOrder === 'string') {
4526
+ opts.buttonsOrder = opts.buttonsOrder.replace(/\[|\]| |'/g, '').toLowerCase().split(',');
4527
+ }
4528
+
4529
+ var _iteratorNormalCompletion = true;
4530
+ var _didIteratorError = false;
4531
+ var _iteratorError = undefined;
4532
+
4533
+ try {
4534
+ for (var _iterator = opts.buttonsOrder[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
4535
+ var button = _step.value;
4536
+
4537
+ if (opts['show' + button.charAt(0).toUpperCase() + button.substring(1)]) {
4538
+ html.push(buttonsHtml[button]);
4315
4539
  }
4316
- });
4317
- html.push(this.constants.html.toolbarDropdown[1], '</div>');
4540
+ }
4541
+ } catch (err) {
4542
+ _didIteratorError = true;
4543
+ _iteratorError = err;
4544
+ } finally {
4545
+ try {
4546
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
4547
+ _iterator.return();
4548
+ }
4549
+ } finally {
4550
+ if (_didIteratorError) {
4551
+ throw _iteratorError;
4552
+ }
4553
+ }
4318
4554
  }
4319
4555
 
4320
4556
  html.push('</div>'); // Fix #188: this.showToolbar is for extensions
@@ -4323,80 +4559,103 @@
4323
4559
  this.$toolbar.append(html.join(''));
4324
4560
  }
4325
4561
 
4326
- if (o.showPaginationSwitch) {
4562
+ if (opts.showPaginationSwitch) {
4327
4563
  this.$toolbar.find('button[name="paginationSwitch"]').off('click').on('click', function () {
4328
4564
  return _this4.togglePagination();
4329
4565
  });
4330
4566
  }
4331
4567
 
4332
- if (o.showFullscreen) {
4568
+ if (opts.showFullscreen) {
4333
4569
  this.$toolbar.find('button[name="fullscreen"]').off('click').on('click', function () {
4334
4570
  return _this4.toggleFullscreen();
4335
4571
  });
4336
4572
  }
4337
4573
 
4338
- if (o.showRefresh) {
4574
+ if (opts.showRefresh) {
4339
4575
  this.$toolbar.find('button[name="refresh"]').off('click').on('click', function () {
4340
4576
  return _this4.refresh();
4341
4577
  });
4342
4578
  }
4343
4579
 
4344
- if (o.showToggle) {
4580
+ if (opts.showToggle) {
4345
4581
  this.$toolbar.find('button[name="toggle"]').off('click').on('click', function () {
4346
4582
  _this4.toggleView();
4347
4583
  });
4348
4584
  }
4349
4585
 
4350
- if (o.showColumns) {
4586
+ if (opts.showColumns) {
4351
4587
  $keepOpen = this.$toolbar.find('.keep-open');
4352
- var $checkboxes = $keepOpen.find('input:not(".toggle-all")');
4353
- var $toggleAll = $keepOpen.find('input.toggle-all');
4588
+ var $checkboxes = $keepOpen.find('input[type="checkbox"]:not(".toggle-all")');
4589
+ var $toggleAll = $keepOpen.find('input[type="checkbox"].toggle-all');
4354
4590
 
4355
- if (switchableCount <= o.minimumCountColumns) {
4591
+ if (switchableCount <= opts.minimumCountColumns) {
4356
4592
  $keepOpen.find('input').prop('disabled', true);
4357
4593
  }
4358
4594
 
4359
4595
  $keepOpen.find('li, label').off('click').on('click', function (e) {
4360
4596
  e.stopImmediatePropagation();
4361
4597
  });
4362
- $checkboxes.off('click').on('click', function (_ref3) {
4363
- var currentTarget = _ref3.currentTarget;
4598
+ $checkboxes.off('click').on('click', function (_ref2) {
4599
+ var currentTarget = _ref2.currentTarget;
4364
4600
  var $this = $(currentTarget);
4365
4601
 
4366
4602
  _this4._toggleColumn($this.val(), $this.prop('checked'), false);
4367
4603
 
4368
4604
  _this4.trigger('column-switch', $this.data('field'), $this.prop('checked'));
4369
4605
 
4370
- $toggleAll.prop('checked', $checkboxes.filter(':checked').length === _this4.columns.length);
4606
+ $toggleAll.prop('checked', $checkboxes.filter(':checked').length === _this4.columns.filter(function (column) {
4607
+ return !_this4.isSelectionColumn(column);
4608
+ }).length);
4371
4609
  });
4372
- $toggleAll.off('click').on('click', function (_ref4) {
4373
- var currentTarget = _ref4.currentTarget;
4610
+ $toggleAll.off('click').on('click', function (_ref3) {
4611
+ var currentTarget = _ref3.currentTarget;
4374
4612
 
4375
4613
  _this4._toggleAllColumns($(currentTarget).prop('checked'));
4376
4614
  });
4615
+
4616
+ if (opts.showColumnsSearch) {
4617
+ var $columnsSearch = $keepOpen.find('#columnsSearch');
4618
+ var $listItems = $keepOpen.find('.dropdown-item-marker');
4619
+ $columnsSearch.on('keyup paste change', function (_ref4) {
4620
+ var currentTarget = _ref4.currentTarget;
4621
+ var $this = $(currentTarget);
4622
+ var searchValue = $this.val().toLowerCase();
4623
+ $listItems.show();
4624
+ $checkboxes.each(function (i, el) {
4625
+ var $checkbox = $(el);
4626
+ var $listItem = $checkbox.parents('.dropdown-item-marker');
4627
+ var text = $listItem.text().toLowerCase();
4628
+
4629
+ if (!text.includes(searchValue)) {
4630
+ $listItem.hide();
4631
+ }
4632
+ });
4633
+ });
4634
+ }
4377
4635
  } // Fix #4516: this.showSearchClearButton is for extensions
4378
4636
 
4379
4637
 
4380
- if (o.search || this.showSearchClearButton) {
4638
+ if (opts.search || this.showSearchClearButton) {
4381
4639
  html = [];
4382
- var showSearchButton = Utils.sprintf(this.constants.html.searchButton, this.constants.buttonsClass, o.formatSearch(), o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.search) : '', o.showButtonText ? o.formatSearch() : '');
4383
- var showSearchClearButton = Utils.sprintf(this.constants.html.searchClearButton, this.constants.buttonsClass, o.formatClearSearch(), o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.clearSearch) : '', o.showButtonText ? o.formatClearSearch() : '');
4384
- var searchInputHtml = "<input class=\"".concat(this.constants.classes.input, "\n ").concat(Utils.sprintf(' %s%s', this.constants.classes.inputPrefix, o.iconSize), "\n search-input\" type=\"text\" placeholder=\"").concat(o.formatSearch(), "\">");
4640
+ var showSearchButton = Utils.sprintf(this.constants.html.searchButton, this.constants.buttonsClass, opts.formatSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.search) : '', opts.showButtonText ? opts.formatSearch() : '');
4641
+ var showSearchClearButton = Utils.sprintf(this.constants.html.searchClearButton, this.constants.buttonsClass, opts.formatClearSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.clearSearch) : '', opts.showButtonText ? opts.formatClearSearch() : '');
4642
+ var searchInputHtml = "<input class=\"".concat(this.constants.classes.input, "\n ").concat(Utils.sprintf(' %s%s', this.constants.classes.inputPrefix, opts.iconSize), "\n search-input\" type=\"text\" placeholder=\"").concat(opts.formatSearch(), "\" autocomplete=\"off\">");
4385
4643
  var searchInputFinalHtml = searchInputHtml;
4386
4644
 
4387
- if (o.showSearchButton || o.showSearchClearButton) {
4388
- var buttonsHtml = (o.showSearchButton ? showSearchButton : '') + (o.showSearchClearButton ? showSearchClearButton : '');
4389
- searchInputFinalHtml = o.search ? Utils.sprintf(this.constants.html.inputGroup, searchInputHtml, buttonsHtml) : buttonsHtml;
4645
+ if (opts.showSearchButton || opts.showSearchClearButton) {
4646
+ var _buttonsHtml = (opts.showSearchButton ? showSearchButton : '') + (opts.showSearchClearButton ? showSearchClearButton : '');
4647
+
4648
+ searchInputFinalHtml = opts.search ? Utils.sprintf(this.constants.html.inputGroup, searchInputHtml, _buttonsHtml) : _buttonsHtml;
4390
4649
  }
4391
4650
 
4392
- html.push(Utils.sprintf("\n <div class=\"".concat(this.constants.classes.pull, "-").concat(o.searchAlign, " search ").concat(this.constants.classes.inputGroup, "\">\n %s\n </div>\n "), searchInputFinalHtml));
4651
+ html.push(Utils.sprintf("\n <div class=\"".concat(this.constants.classes.pull, "-").concat(opts.searchAlign, " search ").concat(this.constants.classes.inputGroup, "\">\n %s\n </div>\n "), searchInputFinalHtml));
4393
4652
  this.$toolbar.append(html.join(''));
4394
4653
  var $searchInput = this.$toolbar.find('.search input');
4395
4654
 
4396
4655
  var handleInputEvent = function handleInputEvent() {
4397
- var eventTriggers = Utils.isIEBrowser() ? 'mouseup' : 'keyup drop blur';
4656
+ var eventTriggers = "keyup drop blur ".concat(Utils.isIEBrowser() ? 'mouseup' : '');
4398
4657
  $searchInput.off(eventTriggers).on(eventTriggers, function (event) {
4399
- if (o.searchOnEnterKey && event.keyCode !== 13) {
4658
+ if (opts.searchOnEnterKey && event.keyCode !== 13) {
4400
4659
  return;
4401
4660
  }
4402
4661
 
@@ -4407,12 +4666,14 @@
4407
4666
  clearTimeout(timeoutId); // doesn't matter if it's 0
4408
4667
 
4409
4668
  timeoutId = setTimeout(function () {
4410
- _this4.onSearch(event);
4411
- }, o.searchTimeOut);
4669
+ _this4.onSearch({
4670
+ currentTarget: event.currentTarget
4671
+ });
4672
+ }, opts.searchTimeOut);
4412
4673
  });
4413
4674
  };
4414
4675
 
4415
- if (o.showSearchButton) {
4676
+ if (opts.showSearchButton) {
4416
4677
  this.$toolbar.find('.search button[name=search]').off('click').on('click', function (event) {
4417
4678
  clearTimeout(timeoutId); // doesn't matter if it's 0
4418
4679
 
@@ -4420,17 +4681,17 @@
4420
4681
  _this4.onSearch({
4421
4682
  currentTarget: $searchInput
4422
4683
  });
4423
- }, o.searchTimeOut);
4684
+ }, opts.searchTimeOut);
4424
4685
  });
4425
4686
 
4426
- if (o.searchOnEnterKey) {
4687
+ if (opts.searchOnEnterKey) {
4427
4688
  handleInputEvent();
4428
4689
  }
4429
4690
  } else {
4430
4691
  handleInputEvent();
4431
4692
  }
4432
4693
 
4433
- if (o.showSearchClearButton) {
4694
+ if (opts.showSearchClearButton) {
4434
4695
  this.$toolbar.find('.search button[name=clearSearch]').click(function () {
4435
4696
  _this4.resetSearch();
4436
4697
  });
@@ -4453,7 +4714,7 @@
4453
4714
  $(currentTarget).val(text);
4454
4715
  }
4455
4716
 
4456
- if (this.searchText === text) {
4717
+ if (this.searchText === text && text.length > 0) {
4457
4718
  return;
4458
4719
  }
4459
4720
 
@@ -4492,7 +4753,7 @@
4492
4753
  return;
4493
4754
  }
4494
4755
 
4495
- var s = this.searchText && (this.options.escape ? Utils.escapeHTML(this.searchText) : this.searchText).toLowerCase();
4756
+ var s = this.searchText && (this.fromHtml ? Utils.escapeHTML(this.searchText) : this.searchText).toLowerCase();
4496
4757
  var f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns; // Check filter
4497
4758
 
4498
4759
  if (typeof this.filterOptions.filterAlgorithm === 'function') {
@@ -4540,9 +4801,9 @@
4540
4801
  value = item;
4541
4802
  var props = key.split('.');
4542
4803
 
4543
- for (var _i = 0; _i < props.length; _i++) {
4544
- if (value[props[_i]] !== null) {
4545
- value = value[props[_i]];
4804
+ for (var _i2 = 0; _i2 < props.length; _i2++) {
4805
+ if (value[props[_i2]] !== null) {
4806
+ value = value[props[_i2]];
4546
4807
  }
4547
4808
  }
4548
4809
  } else {
@@ -4594,9 +4855,6 @@
4594
4855
  case '=<l':
4595
4856
  comparisonCheck = int >= comparisonInt;
4596
4857
  break;
4597
-
4598
- default:
4599
- break;
4600
4858
  }
4601
4859
  }
4602
4860
 
@@ -4610,22 +4868,24 @@
4610
4868
  return false;
4611
4869
  }) : this.data;
4612
4870
  }
4871
+
4872
+ this.initSort();
4613
4873
  }
4614
4874
  }, {
4615
4875
  key: "initPagination",
4616
4876
  value: function initPagination() {
4617
4877
  var _this6 = this;
4618
4878
 
4619
- var o = this.options;
4879
+ var opts = this.options;
4620
4880
 
4621
- if (!o.pagination) {
4881
+ if (!opts.pagination) {
4622
4882
  this.$pagination.hide();
4623
4883
  return;
4624
4884
  }
4625
4885
 
4626
4886
  this.$pagination.show();
4627
4887
  var html = [];
4628
- var $allSelected = false;
4888
+ var allSelected = false;
4629
4889
  var i;
4630
4890
  var from;
4631
4891
  var to;
@@ -4636,41 +4896,45 @@
4636
4896
  var data = this.getData({
4637
4897
  includeHiddenRows: false
4638
4898
  });
4639
- var pageList = o.pageList;
4899
+ var pageList = opts.pageList;
4640
4900
 
4641
- if (o.sidePagination !== 'server') {
4642
- o.totalRows = data.length;
4901
+ if (typeof pageList === 'string') {
4902
+ pageList = pageList.replace(/\[|\]| /g, '').toLowerCase().split(',');
4903
+ }
4904
+
4905
+ pageList = pageList.map(function (value) {
4906
+ if (typeof value === 'string') {
4907
+ return value.toLowerCase() === opts.formatAllRows().toLowerCase() || ['all', 'unlimited'].includes(value.toLowerCase()) ? opts.formatAllRows() : +value;
4908
+ }
4909
+
4910
+ return value;
4911
+ });
4912
+
4913
+ if (opts.sidePagination !== 'server') {
4914
+ opts.totalRows = data.length;
4643
4915
  }
4644
4916
 
4645
4917
  this.totalPages = 0;
4646
4918
 
4647
- if (o.totalRows) {
4648
- if (o.pageSize === o.formatAllRows()) {
4649
- o.pageSize = o.totalRows;
4650
- $allSelected = true;
4651
- } else if (o.pageSize === o.totalRows) {
4652
- // Fix #667 Table with pagination,
4653
- // multiple pages and a search this matches to one page throws exception
4654
- var pageLst = typeof o.pageList === 'string' ? o.pageList.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',') : o.pageList;
4655
-
4656
- if (pageLst.includes(o.formatAllRows().toLowerCase())) {
4657
- $allSelected = true;
4658
- }
4919
+ if (opts.totalRows) {
4920
+ if (opts.pageSize === opts.formatAllRows()) {
4921
+ opts.pageSize = opts.totalRows;
4922
+ allSelected = true;
4659
4923
  }
4660
4924
 
4661
- this.totalPages = ~~((o.totalRows - 1) / o.pageSize) + 1;
4662
- o.totalPages = this.totalPages;
4925
+ this.totalPages = ~~((opts.totalRows - 1) / opts.pageSize) + 1;
4926
+ opts.totalPages = this.totalPages;
4663
4927
  }
4664
4928
 
4665
- if (this.totalPages > 0 && o.pageNumber > this.totalPages) {
4666
- o.pageNumber = this.totalPages;
4929
+ if (this.totalPages > 0 && opts.pageNumber > this.totalPages) {
4930
+ opts.pageNumber = this.totalPages;
4667
4931
  }
4668
4932
 
4669
- this.pageFrom = (o.pageNumber - 1) * o.pageSize + 1;
4670
- this.pageTo = o.pageNumber * o.pageSize;
4933
+ this.pageFrom = (opts.pageNumber - 1) * opts.pageSize + 1;
4934
+ this.pageTo = opts.pageNumber * opts.pageSize;
4671
4935
 
4672
- if (this.pageTo > o.totalRows) {
4673
- this.pageTo = o.totalRows;
4936
+ if (this.pageTo > opts.totalRows) {
4937
+ this.pageTo = opts.totalRows;
4674
4938
  }
4675
4939
 
4676
4940
  if (this.options.pagination && this.options.sidePagination !== 'server') {
@@ -4681,73 +4945,44 @@
4681
4945
  this.options.totalNotFiltered = undefined;
4682
4946
  }
4683
4947
 
4684
- var paginationInfo = o.onlyInfoPagination ? o.formatDetailPagination(o.totalRows) : o.formatShowingRows(this.pageFrom, this.pageTo, o.totalRows, o.totalNotFiltered);
4685
- html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(o.paginationDetailHAlign, " pagination-detail\">\n <span class=\"pagination-info\">\n ").concat(paginationInfo, "\n </span>"));
4948
+ var paginationInfo = opts.onlyInfoPagination ? opts.formatDetailPagination(opts.totalRows) : opts.formatShowingRows(this.pageFrom, this.pageTo, opts.totalRows, opts.totalNotFiltered);
4949
+ html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(opts.paginationDetailHAlign, " pagination-detail\">\n <span class=\"pagination-info\">\n ").concat(paginationInfo, "\n </span>"));
4686
4950
 
4687
- if (!o.onlyInfoPagination) {
4951
+ if (!opts.onlyInfoPagination) {
4688
4952
  html.push('<span class="page-list">');
4689
- var pageNumber = ["<span class=\"".concat(this.constants.classes.paginationDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">\n <span class=\"page-size\">\n ").concat($allSelected ? o.formatAllRows() : o.pageSize, "\n </span>\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n ").concat(this.constants.html.pageDropdown[0])];
4690
-
4691
- if (typeof o.pageList === 'string') {
4692
- var list = o.pageList.replace('[', '').replace(']', '').replace(/ /g, '').split(',');
4693
- pageList = [];
4694
- var _iteratorNormalCompletion = true;
4695
- var _didIteratorError = false;
4696
- var _iteratorError = undefined;
4697
-
4698
- try {
4699
- for (var _iterator = list[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
4700
- var value = _step.value;
4701
- pageList.push(value.toLowerCase() === o.formatAllRows().toLowerCase() || ['all', 'unlimited'].includes(value.toLowerCase()) ? o.formatAllRows() : +value);
4702
- }
4703
- } catch (err) {
4704
- _didIteratorError = true;
4705
- _iteratorError = err;
4706
- } finally {
4707
- try {
4708
- if (!_iteratorNormalCompletion && _iterator.return != null) {
4709
- _iterator.return();
4710
- }
4711
- } finally {
4712
- if (_didIteratorError) {
4713
- throw _iteratorError;
4714
- }
4715
- }
4716
- }
4717
- }
4718
-
4953
+ var pageNumber = ["<span class=\"".concat(this.constants.classes.paginationDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">\n <span class=\"page-size\">\n ").concat(allSelected ? opts.formatAllRows() : opts.pageSize, "\n </span>\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n ").concat(this.constants.html.pageDropdown[0])];
4719
4954
  pageList.forEach(function (page, i) {
4720
- if (!o.smartDisplay || i === 0 || pageList[i - 1] < o.totalRows) {
4955
+ if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows) {
4721
4956
  var active;
4722
4957
 
4723
- if ($allSelected) {
4724
- active = page === o.formatAllRows() ? _this6.constants.classes.dropdownActive : '';
4958
+ if (allSelected) {
4959
+ active = page === opts.formatAllRows() ? _this6.constants.classes.dropdownActive : '';
4725
4960
  } else {
4726
- active = page === o.pageSize ? _this6.constants.classes.dropdownActive : '';
4961
+ active = page === opts.pageSize ? _this6.constants.classes.dropdownActive : '';
4727
4962
  }
4728
4963
 
4729
4964
  pageNumber.push(Utils.sprintf(_this6.constants.html.pageDropdownItem, active, page));
4730
4965
  }
4731
4966
  });
4732
4967
  pageNumber.push("".concat(this.constants.html.pageDropdown[1], "</span>"));
4733
- html.push(o.formatRecordsPerPage(pageNumber.join('')));
4968
+ html.push(opts.formatRecordsPerPage(pageNumber.join('')));
4734
4969
  html.push('</span></div>');
4735
- html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(o.paginationHAlign, " pagination\">"), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', o.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', o.formatSRPaginationPreText(), o.paginationPreText));
4970
+ html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(opts.paginationHAlign, " pagination\">"), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', opts.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', opts.formatSRPaginationPreText(), opts.paginationPreText));
4736
4971
 
4737
- if (this.totalPages < o.paginationSuccessivelySize) {
4972
+ if (this.totalPages < opts.paginationSuccessivelySize) {
4738
4973
  from = 1;
4739
4974
  to = this.totalPages;
4740
4975
  } else {
4741
- from = o.pageNumber - o.paginationPagesBySide;
4742
- to = from + o.paginationPagesBySide * 2;
4976
+ from = opts.pageNumber - opts.paginationPagesBySide;
4977
+ to = from + opts.paginationPagesBySide * 2;
4743
4978
  }
4744
4979
 
4745
- if (o.pageNumber < o.paginationSuccessivelySize - 1) {
4746
- to = o.paginationSuccessivelySize;
4980
+ if (opts.pageNumber < opts.paginationSuccessivelySize - 1) {
4981
+ to = opts.paginationSuccessivelySize;
4747
4982
  }
4748
4983
 
4749
- if (o.paginationSuccessivelySize > this.totalPages - from) {
4750
- from = from - (o.paginationSuccessivelySize - (this.totalPages - from)) + 1;
4984
+ if (opts.paginationSuccessivelySize > this.totalPages - from) {
4985
+ from = from - (opts.paginationSuccessivelySize - (this.totalPages - from)) + 1;
4751
4986
  }
4752
4987
 
4753
4988
  if (from < 1) {
@@ -4758,15 +4993,15 @@
4758
4993
  to = this.totalPages;
4759
4994
  }
4760
4995
 
4761
- var middleSize = Math.round(o.paginationPagesBySide / 2);
4996
+ var middleSize = Math.round(opts.paginationPagesBySide / 2);
4762
4997
 
4763
4998
  var pageItem = function pageItem(i) {
4764
4999
  var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
4765
- return Utils.sprintf(_this6.constants.html.paginationItem, classes + (i === o.pageNumber ? " ".concat(_this6.constants.classes.paginationActive) : ''), o.formatSRPaginationPageText(i), i);
5000
+ return Utils.sprintf(_this6.constants.html.paginationItem, classes + (i === opts.pageNumber ? " ".concat(_this6.constants.classes.paginationActive) : ''), opts.formatSRPaginationPageText(i), i);
4766
5001
  };
4767
5002
 
4768
5003
  if (from > 1) {
4769
- var max = o.paginationPagesBySide;
5004
+ var max = opts.paginationPagesBySide;
4770
5005
  if (max >= from) max = from - 1;
4771
5006
 
4772
5007
  for (i = 1; i <= max; i++) {
@@ -4778,7 +5013,7 @@
4778
5013
  html.push(pageItem(i));
4779
5014
  } else {
4780
5015
  if (from - 1 > max) {
4781
- if (from - o.paginationPagesBySide * 2 > o.paginationPagesBySide && o.paginationUseIntermediate) {
5016
+ if (from - opts.paginationPagesBySide * 2 > opts.paginationPagesBySide && opts.paginationUseIntermediate) {
4782
5017
  i = Math.round((from - middleSize) / 2 + middleSize);
4783
5018
  html.push(pageItem(i, ' page-intermediate'));
4784
5019
  } else {
@@ -4793,7 +5028,7 @@
4793
5028
  }
4794
5029
 
4795
5030
  if (this.totalPages > to) {
4796
- var min = this.totalPages - (o.paginationPagesBySide - 1);
5031
+ var min = this.totalPages - (opts.paginationPagesBySide - 1);
4797
5032
  if (to >= min) min = to + 1;
4798
5033
 
4799
5034
  if (to + 1 === min - 1) {
@@ -4801,7 +5036,7 @@
4801
5036
  html.push(pageItem(i));
4802
5037
  } else {
4803
5038
  if (min > to + 1) {
4804
- if (this.totalPages - to > o.paginationPagesBySide * 2 && o.paginationUseIntermediate) {
5039
+ if (this.totalPages - to > opts.paginationPagesBySide * 2 && opts.paginationUseIntermediate) {
4805
5040
  i = Math.round((this.totalPages - middleSize - to) / 2 + to);
4806
5041
  html.push(pageItem(i, ' page-intermediate'));
4807
5042
  } else {
@@ -4815,15 +5050,15 @@
4815
5050
  }
4816
5051
  }
4817
5052
 
4818
- html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-next', o.formatSRPaginationNextText(), o.paginationNextText));
5053
+ html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-next', opts.formatSRPaginationNextText(), opts.paginationNextText));
4819
5054
  html.push(this.constants.html.pagination[1], '</div>');
4820
5055
  }
4821
5056
 
4822
5057
  this.$pagination.html(html.join(''));
4823
- var dropupClass = ['bottom', 'both'].includes(o.paginationVAlign) ? " ".concat(this.constants.classes.dropup) : '';
5058
+ var dropupClass = ['bottom', 'both'].includes(opts.paginationVAlign) ? " ".concat(this.constants.classes.dropup) : '';
4824
5059
  this.$pagination.last().find('.page-list > span').addClass(dropupClass);
4825
5060
 
4826
- if (!o.onlyInfoPagination) {
5061
+ if (!opts.onlyInfoPagination) {
4827
5062
  $pageList = this.$pagination.find('.page-list a');
4828
5063
  $pre = this.$pagination.find('.page-pre');
4829
5064
  $next = this.$pagination.find('.page-next');
@@ -4833,8 +5068,8 @@
4833
5068
  this.$pagination.find('div.pagination').hide();
4834
5069
  }
4835
5070
 
4836
- if (o.smartDisplay) {
4837
- if (pageList.length < 2 || o.totalRows <= pageList[0]) {
5071
+ if (opts.smartDisplay) {
5072
+ if (pageList.length < 2 || opts.totalRows <= pageList[0]) {
4838
5073
  this.$pagination.find('span.page-list').hide();
4839
5074
  }
4840
5075
  } // when data is empty, hide the pagination
@@ -4842,18 +5077,18 @@
4842
5077
 
4843
5078
  this.$pagination[this.getData().length ? 'show' : 'hide']();
4844
5079
 
4845
- if (!o.paginationLoop) {
4846
- if (o.pageNumber === 1) {
5080
+ if (!opts.paginationLoop) {
5081
+ if (opts.pageNumber === 1) {
4847
5082
  $pre.addClass('disabled');
4848
5083
  }
4849
5084
 
4850
- if (o.pageNumber === this.totalPages) {
5085
+ if (opts.pageNumber === this.totalPages) {
4851
5086
  $next.addClass('disabled');
4852
5087
  }
4853
5088
  }
4854
5089
 
4855
- if ($allSelected) {
4856
- o.pageSize = o.formatAllRows();
5090
+ if (allSelected) {
5091
+ opts.pageSize = opts.formatAllRows();
4857
5092
  } // removed the events for last and first, onPageNumber executeds the same logic
4858
5093
 
4859
5094
 
@@ -4964,10 +5199,10 @@
4964
5199
  style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
4965
5200
 
4966
5201
  if (style && style.css) {
4967
- for (var _i2 = 0, _Object$entries = Object.entries(style.css); _i2 < _Object$entries.length; _i2++) {
4968
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
4969
- key = _Object$entries$_i[0],
4970
- value = _Object$entries$_i[1];
5202
+ for (var _i3 = 0, _Object$entries2 = Object.entries(style.css); _i3 < _Object$entries2.length; _i3++) {
5203
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i3], 2),
5204
+ key = _Object$entries2$_i[0],
5205
+ value = _Object$entries2$_i[1];
4971
5206
 
4972
5207
  csses.push("".concat(key, ": ").concat(value));
4973
5208
  }
@@ -4976,20 +5211,20 @@
4976
5211
  attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes);
4977
5212
 
4978
5213
  if (attributes) {
4979
- for (var _i3 = 0, _Object$entries2 = Object.entries(attributes); _i3 < _Object$entries2.length; _i3++) {
4980
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i3], 2),
4981
- key = _Object$entries2$_i[0],
4982
- value = _Object$entries2$_i[1];
5214
+ for (var _i4 = 0, _Object$entries3 = Object.entries(attributes); _i4 < _Object$entries3.length; _i4++) {
5215
+ var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i4], 2),
5216
+ _key2 = _Object$entries3$_i[0],
5217
+ _value = _Object$entries3$_i[1];
4983
5218
 
4984
- htmlAttributes.push("".concat(key, "=\"").concat(Utils.escapeHTML(value), "\""));
5219
+ htmlAttributes.push("".concat(_key2, "=\"").concat(Utils.escapeHTML(_value), "\""));
4985
5220
  }
4986
5221
  }
4987
5222
 
4988
5223
  if (item._data && !Utils.isEmptyObject(item._data)) {
4989
- for (var _i4 = 0, _Object$entries3 = Object.entries(item._data); _i4 < _Object$entries3.length; _i4++) {
4990
- var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i4], 2),
4991
- k = _Object$entries3$_i[0],
4992
- v = _Object$entries3$_i[1];
5224
+ for (var _i5 = 0, _Object$entries4 = Object.entries(item._data); _i5 < _Object$entries4.length; _i5++) {
5225
+ var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i5], 2),
5226
+ k = _Object$entries4$_i[0],
5227
+ v = _Object$entries4$_i[1];
4993
5228
 
4994
5229
  // ignore data-index
4995
5230
  if (k === 'index') {
@@ -5083,12 +5318,12 @@
5083
5318
  if (cellStyle.css) {
5084
5319
  var csses_ = [];
5085
5320
 
5086
- for (var _i5 = 0, _Object$entries4 = Object.entries(cellStyle.css); _i5 < _Object$entries4.length; _i5++) {
5087
- var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i5], 2),
5088
- key = _Object$entries4$_i[0],
5089
- _value = _Object$entries4$_i[1];
5321
+ for (var _i6 = 0, _Object$entries5 = Object.entries(cellStyle.css); _i6 < _Object$entries5.length; _i6++) {
5322
+ var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i6], 2),
5323
+ _key3 = _Object$entries5$_i[0],
5324
+ _value2 = _Object$entries5$_i[1];
5090
5325
 
5091
- csses_.push("".concat(key, ": ").concat(_value));
5326
+ csses_.push("".concat(_key3, ": ").concat(_value2));
5092
5327
  }
5093
5328
 
5094
5329
  style_ = " style=\"".concat(csses_.concat(_this7.header.styles[j]).join('; '), "\"");
@@ -5097,17 +5332,17 @@
5097
5332
  value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_);
5098
5333
 
5099
5334
  if (item["_".concat(field, "_data")] && !Utils.isEmptyObject(item["_".concat(field, "_data")])) {
5100
- for (var _i6 = 0, _Object$entries5 = Object.entries(item["_".concat(field, "_data")]); _i6 < _Object$entries5.length; _i6++) {
5101
- var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i6], 2),
5102
- k = _Object$entries5$_i[0],
5103
- v = _Object$entries5$_i[1];
5335
+ for (var _i7 = 0, _Object$entries6 = Object.entries(item["_".concat(field, "_data")]); _i7 < _Object$entries6.length; _i7++) {
5336
+ var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i7], 2),
5337
+ _k = _Object$entries6$_i[0],
5338
+ _v = _Object$entries6$_i[1];
5104
5339
 
5105
5340
  // ignore data-index
5106
- if (k === 'index') {
5341
+ if (_k === 'index') {
5107
5342
  return;
5108
5343
  }
5109
5344
 
5110
- data_ += " data-".concat(k, "=\"").concat(v, "\"");
5345
+ data_ += " data-".concat(_k, "=\"").concat(_v, "\"");
5111
5346
  }
5112
5347
  }
5113
5348
 
@@ -5405,11 +5640,15 @@
5405
5640
 
5406
5641
  _this10.load(res);
5407
5642
 
5408
- _this10.trigger('load-success', res, jqXHR.status, jqXHR);
5643
+ _this10.trigger('load-success', res, jqXHR && jqXHR.status, jqXHR);
5409
5644
 
5410
5645
  if (!silent) {
5411
5646
  _this10.hideLoading();
5412
5647
  }
5648
+
5649
+ if (_this10.options.sidePagination === 'server' && res[_this10.options.totalField] > 0 && !res[_this10.options.dataField].length) {
5650
+ _this10.updatePagination();
5651
+ }
5413
5652
  },
5414
5653
  error: function error(jqXHR) {
5415
5654
  var data = [];
@@ -5422,7 +5661,7 @@
5422
5661
 
5423
5662
  _this10.load(data);
5424
5663
 
5425
- _this10.trigger('load-error', jqXHR.status, jqXHR);
5664
+ _this10.trigger('load-error', jqXHR && jqXHR.status, jqXHR);
5426
5665
 
5427
5666
  if (!silent) _this10.$tableLoading.hide();
5428
5667
  }
@@ -5524,8 +5763,8 @@
5524
5763
 
5525
5764
  var name = "".concat(_name, ".bs.table");
5526
5765
 
5527
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
5528
- args[_key2 - 1] = arguments[_key2];
5766
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key4 = 1; _key4 < _len; _key4++) {
5767
+ args[_key4 - 1] = arguments[_key4];
5529
5768
  }
5530
5769
 
5531
5770
  (_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, args);
@@ -5675,10 +5914,10 @@
5675
5914
  style = Utils.calculateObjectValue(null, this.options.footerStyle, [column]);
5676
5915
 
5677
5916
  if (style && style.css) {
5678
- for (var _i7 = 0, _Object$entries6 = Object.entries(style.css); _i7 < _Object$entries6.length; _i7++) {
5679
- var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i7], 2),
5680
- key = _Object$entries6$_i[0],
5681
- value = _Object$entries6$_i[1];
5917
+ for (var _i8 = 0, _Object$entries7 = Object.entries(style.css); _i8 < _Object$entries7.length; _i8++) {
5918
+ var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2),
5919
+ key = _Object$entries7$_i[0],
5920
+ value = _Object$entries7$_i[1];
5682
5921
 
5683
5922
  csses.push("".concat(key, ": ").concat(value));
5684
5923
  }
@@ -5711,6 +5950,11 @@
5711
5950
  }
5712
5951
  }
5713
5952
 
5953
+ if (!this.options.height && !this.$tableFooter.length) {
5954
+ this.$el.append('<tfoot><tr></tr></tfoot>');
5955
+ this.$tableFooter = this.$el.find('tfoot');
5956
+ }
5957
+
5714
5958
  this.$tableFooter.find('tr').html(html.join(''));
5715
5959
  this.trigger('post-footer', this.$tableFooter);
5716
5960
  }
@@ -5770,18 +6014,18 @@
5770
6014
 
5771
6015
  // horizontal scroll event
5772
6016
  // TODO: it's probably better improving the layout than binding to scroll event
5773
- this.$tableBody.off('scroll').on('scroll', function (_ref6) {
5774
- var currentTarget = _ref6.currentTarget;
6017
+ this.$tableBody.off('scroll').on('scroll', function () {
6018
+ var scrollLeft = _this16.$tableBody.scrollLeft();
5775
6019
 
5776
6020
  if (_this16.options.showHeader && _this16.options.height) {
5777
- _this16.$tableHeader.scrollLeft($(currentTarget).scrollLeft());
6021
+ _this16.$tableHeader.scrollLeft(scrollLeft);
5778
6022
  }
5779
6023
 
5780
6024
  if (_this16.options.showFooter && !_this16.options.cardView) {
5781
- _this16.$tableFooter.scrollLeft($(currentTarget).scrollLeft());
6025
+ _this16.$tableFooter.scrollLeft(scrollLeft);
5782
6026
  }
5783
6027
 
5784
- _this16.trigger('scroll-body', $(currentTarget));
6028
+ _this16.trigger('scroll-body', _this16.$tableBody);
5785
6029
  });
5786
6030
  }
5787
6031
  }, {
@@ -5853,7 +6097,7 @@
5853
6097
  value: function getData(params) {
5854
6098
  var data = this.options.data;
5855
6099
 
5856
- if (this.searchText || this.options.sortName || !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) {
6100
+ if ((this.searchText || this.options.customSearch || this.options.sortName || !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) {
5857
6101
  data = this.data;
5858
6102
  }
5859
6103
 
@@ -6165,10 +6409,10 @@
6165
6409
  }
6166
6410
 
6167
6411
  var allParams = Array.isArray(params) ? params : [params];
6168
- allParams.forEach(function (_ref7) {
6169
- var id = _ref7.id,
6170
- field = _ref7.field,
6171
- value = _ref7.value;
6412
+ allParams.forEach(function (_ref6) {
6413
+ var id = _ref6.id,
6414
+ field = _ref6.field,
6415
+ value = _ref6.value;
6172
6416
 
6173
6417
  var rowId = _this19.options.data.indexOf(_this19.getRowByUniqueId(id));
6174
6418
 
@@ -6301,7 +6545,7 @@
6301
6545
  this.initBody();
6302
6546
 
6303
6547
  if (this.options.showColumns) {
6304
- var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
6548
+ var $items = this.$toolbar.find('.keep-open input:not(".toggle-all")').prop('disabled', false);
6305
6549
 
6306
6550
  if (needUpdate) {
6307
6551
  $items.filter(Utils.sprintf('[value="%s"]', index)).prop('checked', checked);
@@ -6315,19 +6559,25 @@
6315
6559
  }, {
6316
6560
  key: "getVisibleColumns",
6317
6561
  value: function getVisibleColumns() {
6318
- return this.columns.filter(function (_ref8) {
6319
- var visible = _ref8.visible;
6320
- return visible;
6562
+ var _this22 = this;
6563
+
6564
+ return this.columns.filter(function (column) {
6565
+ return column.visible && !_this22.isSelectionColumn(column);
6321
6566
  });
6322
6567
  }
6323
6568
  }, {
6324
6569
  key: "getHiddenColumns",
6325
6570
  value: function getHiddenColumns() {
6326
- return this.columns.filter(function (_ref9) {
6327
- var visible = _ref9.visible;
6571
+ return this.columns.filter(function (_ref7) {
6572
+ var visible = _ref7.visible;
6328
6573
  return !visible;
6329
6574
  });
6330
6575
  }
6576
+ }, {
6577
+ key: "isSelectionColumn",
6578
+ value: function isSelectionColumn(column) {
6579
+ return column.radio || column.checkbox;
6580
+ }
6331
6581
  }, {
6332
6582
  key: "showAllColumns",
6333
6583
  value: function showAllColumns() {
@@ -6341,7 +6591,7 @@
6341
6591
  }, {
6342
6592
  key: "_toggleAllColumns",
6343
6593
  value: function _toggleAllColumns(visible) {
6344
- var _this22 = this;
6594
+ var _this23 = this;
6345
6595
 
6346
6596
  var _iteratorNormalCompletion8 = true;
6347
6597
  var _didIteratorError8 = false;
@@ -6380,13 +6630,13 @@
6380
6630
  this.initBody();
6381
6631
 
6382
6632
  if (this.options.showColumns) {
6383
- var $items = this.$toolbar.find('.keep-open input:not(".toggle-all")').prop('disabled', false);
6633
+ var $items = this.$toolbar.find('.keep-open input[type="checkbox"]:not(".toggle-all")').prop('disabled', false);
6384
6634
 
6385
6635
  if (visible) {
6386
6636
  $items.prop('checked', visible);
6387
6637
  } else {
6388
6638
  $items.get().reverse().forEach(function (item) {
6389
- if ($items.filter(':checked').length > _this22.options.minimumCountColumns) {
6639
+ if ($items.filter(':checked').length > _this23.options.minimumCountColumns) {
6390
6640
  $(item).prop('checked', visible);
6391
6641
  }
6392
6642
  });
@@ -6544,7 +6794,7 @@
6544
6794
  }, {
6545
6795
  key: "_toggleCheckBy",
6546
6796
  value: function _toggleCheckBy(checked, obj) {
6547
- var _this23 = this;
6797
+ var _this24 = this;
6548
6798
 
6549
6799
  if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
6550
6800
  return;
@@ -6557,7 +6807,7 @@
6557
6807
  }
6558
6808
 
6559
6809
  if (obj.values.includes(row[obj.field])) {
6560
- var $el = _this23.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i));
6810
+ var $el = _this24.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i));
6561
6811
 
6562
6812
  $el = checked ? $el.not(':checked') : $el.filter(':checked');
6563
6813
 
@@ -6566,10 +6816,10 @@
6566
6816
  }
6567
6817
 
6568
6818
  $el.prop('checked', checked);
6569
- row[_this23.header.stateField] = checked;
6819
+ row[_this24.header.stateField] = checked;
6570
6820
  rows.push(row);
6571
6821
 
6572
- _this23.trigger(checked ? 'check' : 'uncheck', row, $el);
6822
+ _this24.trigger(checked ? 'check' : 'uncheck', row, $el);
6573
6823
  }
6574
6824
  });
6575
6825
  this.updateSelected();
@@ -6631,13 +6881,27 @@
6631
6881
  }
6632
6882
  }
6633
6883
 
6634
- if (this.options.height) {
6884
+ if (this.$container.hasClass('fullscreen')) {
6885
+ this.$tableContainer.css('height', '');
6886
+ this.$tableContainer.css('width', '');
6887
+ } else if (this.options.height) {
6635
6888
  var toolbarHeight = this.$toolbar.outerHeight(true);
6636
6889
  var paginationHeight = this.$pagination.outerHeight(true);
6637
6890
  var height = this.options.height - toolbarHeight - paginationHeight;
6638
- var tableHeight = this.$tableBody.find('table').outerHeight(true);
6891
+ var $bodyTable = this.$tableBody.find('>table');
6892
+ var tableHeight = $bodyTable.outerHeight();
6639
6893
  this.$tableContainer.css('height', "".concat(height, "px"));
6640
- this.$tableBorder && this.$tableBorder.css('height', "".concat(height - tableHeight - padding - 1, "px"));
6894
+
6895
+ if (this.$tableBorder) {
6896
+ var tableBorderHeight = height - tableHeight - 2;
6897
+
6898
+ if (this.$tableBody[0].scrollWidth - this.$tableBody.innerWidth()) {
6899
+ tableBorderHeight -= Utils.getScrollBarWidth();
6900
+ }
6901
+
6902
+ this.$tableBorder.css('width', "".concat($bodyTable.outerWidth(), "px"));
6903
+ this.$tableBorder.css('height', "".concat(tableBorderHeight, "px"));
6904
+ }
6641
6905
  }
6642
6906
 
6643
6907
  if (this.options.cardView) {
@@ -6653,17 +6917,6 @@
6653
6917
 
6654
6918
  this.trigger('reset-view');
6655
6919
  }
6656
- }, {
6657
- key: "resetWidth",
6658
- value: function resetWidth() {
6659
- if (this.options.showHeader && this.options.height) {
6660
- this.fitHeader();
6661
- }
6662
-
6663
- if (this.options.showFooter && !this.options.cardView) {
6664
- this.fitFooter();
6665
- }
6666
- }
6667
6920
  }, {
6668
6921
  key: "showLoading",
6669
6922
  value: function showLoading() {
@@ -6905,8 +7158,8 @@
6905
7158
  $.BootstrapTable = BootstrapTable;
6906
7159
 
6907
7160
  $.fn.bootstrapTable = function (option) {
6908
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
6909
- args[_key3 - 1] = arguments[_key3];
7161
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key5 = 1; _key5 < _len2; _key5++) {
7162
+ args[_key5 - 1] = arguments[_key5];
6910
7163
  }
6911
7164
 
6912
7165
  var value;
@@ -6956,4 +7209,4 @@
6956
7209
 
6957
7210
  return BootstrapTable;
6958
7211
 
6959
- }));
7212
+ })));