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' ? factory(require('jquery')) :
3
3
  typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4
4
  (global = global || self, 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
 
@@ -121,12 +120,12 @@
121
120
  return hasOwnProperty.call(it, key);
122
121
  };
123
122
 
124
- var document = global_1.document;
123
+ var document$1 = global_1.document;
125
124
  // typeof document.createElement is 'object' in old IE
126
- var EXISTS = isObject(document) && isObject(document.createElement);
125
+ var EXISTS = isObject(document$1) && isObject(document$1.createElement);
127
126
 
128
127
  var documentCreateElement = function (it) {
129
- return EXISTS ? document.createElement(it) : {};
128
+ return EXISTS ? document$1.createElement(it) : {};
130
129
  };
131
130
 
132
131
  // Thank's IE8 for his funny defineProperty
@@ -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);
@@ -544,12 +550,21 @@
544
550
  return !String(Symbol());
545
551
  });
546
552
 
553
+ var useSymbolAsUid = nativeSymbol
554
+ // eslint-disable-next-line no-undef
555
+ && !Symbol.sham
556
+ // eslint-disable-next-line no-undef
557
+ && typeof Symbol() == 'symbol';
558
+
559
+ var WellKnownSymbolsStore = shared('wks');
547
560
  var Symbol$1 = global_1.Symbol;
548
- var store$1 = shared('wks');
561
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
549
562
 
550
563
  var wellKnownSymbol = function (name) {
551
- return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
552
- || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
564
+ if (!has(WellKnownSymbolsStore, name)) {
565
+ if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
566
+ else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
567
+ } return WellKnownSymbolsStore[name];
553
568
  };
554
569
 
555
570
  var SPECIES = wellKnownSymbol('species');
@@ -569,10 +584,33 @@
569
584
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
570
585
  };
571
586
 
587
+ var userAgent = getBuiltIn('navigator', 'userAgent') || '';
588
+
589
+ var process = global_1.process;
590
+ var versions = process && process.versions;
591
+ var v8 = versions && versions.v8;
592
+ var match, version;
593
+
594
+ if (v8) {
595
+ match = v8.split('.');
596
+ version = match[0] + match[1];
597
+ } else if (userAgent) {
598
+ match = userAgent.match(/Edge\/(\d+)/);
599
+ if (!match || match[1] >= 74) {
600
+ match = userAgent.match(/Chrome\/(\d+)/);
601
+ if (match) version = match[1];
602
+ }
603
+ }
604
+
605
+ var v8Version = version && +version;
606
+
572
607
  var SPECIES$1 = wellKnownSymbol('species');
573
608
 
574
609
  var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
575
- return !fails(function () {
610
+ // We can't use this feature detection in V8 since it causes
611
+ // deoptimization and serious performance degradation
612
+ // https://github.com/zloirock/core-js/issues/677
613
+ return v8Version >= 51 || !fails(function () {
576
614
  var array = [];
577
615
  var constructor = array.constructor = {};
578
616
  constructor[SPECIES$1] = function () {
@@ -586,7 +624,10 @@
586
624
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
587
625
  var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
588
626
 
589
- var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
627
+ // We can't use this feature detection in V8 since it causes
628
+ // deoptimization and serious performance degradation
629
+ // https://github.com/zloirock/core-js/issues/679
630
+ var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
590
631
  var array = [];
591
632
  array[IS_CONCAT_SPREADABLE] = false;
592
633
  return array.concat()[0] !== array;
@@ -736,56 +777,87 @@
736
777
 
737
778
  var html = getBuiltIn('document', 'documentElement');
738
779
 
780
+ var GT = '>';
781
+ var LT = '<';
782
+ var PROTOTYPE = 'prototype';
783
+ var SCRIPT = 'script';
739
784
  var IE_PROTO = sharedKey('IE_PROTO');
740
785
 
741
- var PROTOTYPE = 'prototype';
742
- var Empty = function () { /* empty */ };
786
+ var EmptyConstructor = function () { /* empty */ };
787
+
788
+ var scriptTag = function (content) {
789
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
790
+ };
791
+
792
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
793
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
794
+ activeXDocument.write(scriptTag(''));
795
+ activeXDocument.close();
796
+ var temp = activeXDocument.parentWindow.Object;
797
+ activeXDocument = null; // avoid memory leak
798
+ return temp;
799
+ };
743
800
 
744
801
  // Create object with fake `null` prototype: use iframe Object with cleared prototype
745
- var createDict = function () {
802
+ var NullProtoObjectViaIFrame = function () {
746
803
  // Thrash, waste and sodomy: IE GC bug
747
804
  var iframe = documentCreateElement('iframe');
748
- var length = enumBugKeys.length;
749
- var lt = '<';
750
- var script = 'script';
751
- var gt = '>';
752
- var js = 'java' + script + ':';
805
+ var JS = 'java' + SCRIPT + ':';
753
806
  var iframeDocument;
754
807
  iframe.style.display = 'none';
755
808
  html.appendChild(iframe);
756
- iframe.src = String(js);
809
+ // https://github.com/zloirock/core-js/issues/475
810
+ iframe.src = String(JS);
757
811
  iframeDocument = iframe.contentWindow.document;
758
812
  iframeDocument.open();
759
- iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
813
+ iframeDocument.write(scriptTag('document.F=Object'));
760
814
  iframeDocument.close();
761
- createDict = iframeDocument.F;
762
- while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
763
- return createDict();
815
+ return iframeDocument.F;
816
+ };
817
+
818
+ // Check for document.domain and active x support
819
+ // No need to use active x approach when document.domain is not set
820
+ // see https://github.com/es-shims/es5-shim/issues/150
821
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
822
+ // avoid IE GC bug
823
+ var activeXDocument;
824
+ var NullProtoObject = function () {
825
+ try {
826
+ /* global ActiveXObject */
827
+ activeXDocument = document.domain && new ActiveXObject('htmlfile');
828
+ } catch (error) { /* ignore */ }
829
+ NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
830
+ var length = enumBugKeys.length;
831
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
832
+ return NullProtoObject();
764
833
  };
765
834
 
835
+ hiddenKeys[IE_PROTO] = true;
836
+
766
837
  // `Object.create` method
767
838
  // https://tc39.github.io/ecma262/#sec-object.create
768
839
  var objectCreate = Object.create || function create(O, Properties) {
769
840
  var result;
770
841
  if (O !== null) {
771
- Empty[PROTOTYPE] = anObject(O);
772
- result = new Empty();
773
- Empty[PROTOTYPE] = null;
842
+ EmptyConstructor[PROTOTYPE] = anObject(O);
843
+ result = new EmptyConstructor();
844
+ EmptyConstructor[PROTOTYPE] = null;
774
845
  // add "__proto__" for Object.getPrototypeOf polyfill
775
846
  result[IE_PROTO] = O;
776
- } else result = createDict();
847
+ } else result = NullProtoObject();
777
848
  return Properties === undefined ? result : objectDefineProperties(result, Properties);
778
849
  };
779
850
 
780
- hiddenKeys[IE_PROTO] = true;
781
-
782
851
  var UNSCOPABLES = wellKnownSymbol('unscopables');
783
852
  var ArrayPrototype = Array.prototype;
784
853
 
785
854
  // Array.prototype[@@unscopables]
786
855
  // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
787
856
  if (ArrayPrototype[UNSCOPABLES] == undefined) {
788
- hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
857
+ objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
858
+ configurable: true,
859
+ value: objectCreate(null)
860
+ });
789
861
  }
790
862
 
791
863
  // add a key to Array.prototype[@@unscopables]
@@ -813,327 +885,111 @@
813
885
  // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
814
886
  addToUnscopables(FIND);
815
887
 
816
- // `RegExp.prototype.flags` getter implementation
817
- // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
818
- var regexpFlags = function () {
819
- var that = anObject(this);
820
- var result = '';
821
- if (that.global) result += 'g';
822
- if (that.ignoreCase) result += 'i';
823
- if (that.multiline) result += 'm';
824
- if (that.dotAll) result += 's';
825
- if (that.unicode) result += 'u';
826
- if (that.sticky) result += 'y';
827
- return result;
888
+ var sloppyArrayMethod = function (METHOD_NAME, argument) {
889
+ var method = [][METHOD_NAME];
890
+ return !method || !fails(function () {
891
+ // eslint-disable-next-line no-useless-call,no-throw-literal
892
+ method.call(null, argument || function () { throw 1; }, 1);
893
+ });
828
894
  };
829
895
 
830
- var nativeExec = RegExp.prototype.exec;
831
- // This always refers to the native implementation, because the
832
- // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
833
- // which loads this file before patching the method.
834
- var nativeReplace = String.prototype.replace;
835
-
836
- var patchedExec = nativeExec;
896
+ var $indexOf = arrayIncludes.indexOf;
837
897
 
838
- var UPDATES_LAST_INDEX_WRONG = (function () {
839
- var re1 = /a/;
840
- var re2 = /b*/g;
841
- nativeExec.call(re1, 'a');
842
- nativeExec.call(re2, 'a');
843
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
844
- })();
845
898
 
846
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
847
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
899
+ var nativeIndexOf = [].indexOf;
848
900
 
849
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
901
+ var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
902
+ var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
850
903
 
851
- if (PATCH) {
852
- patchedExec = function exec(str) {
853
- var re = this;
854
- var lastIndex, reCopy, match, i;
855
-
856
- if (NPCG_INCLUDED) {
857
- reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
858
- }
859
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
860
-
861
- match = nativeExec.call(re, str);
862
-
863
- if (UPDATES_LAST_INDEX_WRONG && match) {
864
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
865
- }
866
- if (NPCG_INCLUDED && match && match.length > 1) {
867
- // Fix browsers whose `exec` methods don't consistently return `undefined`
868
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
869
- nativeReplace.call(match[0], reCopy, function () {
870
- for (i = 1; i < arguments.length - 2; i++) {
871
- if (arguments[i] === undefined) match[i] = undefined;
872
- }
873
- });
874
- }
875
-
876
- return match;
877
- };
878
- }
879
-
880
- var regexpExec = patchedExec;
881
-
882
- var SPECIES$2 = wellKnownSymbol('species');
883
-
884
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
885
- // #replace needs built-in support for named groups.
886
- // #match works fine because it just return the exec results, even if it has
887
- // a "grops" property.
888
- var re = /./;
889
- re.exec = function () {
890
- var result = [];
891
- result.groups = { a: '7' };
892
- return result;
893
- };
894
- return ''.replace(re, '$<a>') !== '7';
895
- });
896
-
897
- // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
898
- // Weex JS has frozen built-in prototypes, so use try / catch wrapper
899
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
900
- var re = /(?:)/;
901
- var originalExec = re.exec;
902
- re.exec = function () { return originalExec.apply(this, arguments); };
903
- var result = 'ab'.split(re);
904
- return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
904
+ // `Array.prototype.indexOf` method
905
+ // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
906
+ _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
907
+ indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
908
+ return NEGATIVE_ZERO
909
+ // convert -0 to +0
910
+ ? nativeIndexOf.apply(this, arguments) || 0
911
+ : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
912
+ }
905
913
  });
906
914
 
907
- var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
908
- var SYMBOL = wellKnownSymbol(KEY);
909
-
910
- var DELEGATES_TO_SYMBOL = !fails(function () {
911
- // String methods call symbol-named RegEp methods
912
- var O = {};
913
- O[SYMBOL] = function () { return 7; };
914
- return ''[KEY](O) != 7;
915
- });
916
-
917
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
918
- // Symbol-named RegExp methods call .exec
919
- var execCalled = false;
920
- var re = /a/;
921
- re.exec = function () { execCalled = true; return null; };
922
-
923
- if (KEY === 'split') {
924
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
925
- // a new one. We need to return the patched regex when creating the new one.
926
- re.constructor = {};
927
- re.constructor[SPECIES$2] = function () { return re; };
928
- }
929
-
930
- re[SYMBOL]('');
931
- return !execCalled;
932
- });
933
-
934
- if (
935
- !DELEGATES_TO_SYMBOL ||
936
- !DELEGATES_TO_EXEC ||
937
- (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
938
- (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
939
- ) {
940
- var nativeRegExpMethod = /./[SYMBOL];
941
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
942
- if (regexp.exec === regexpExec) {
943
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
944
- // The native String method already delegates to @@method (this
945
- // polyfilled function), leasing to infinite recursion.
946
- // We avoid it by directly calling the native @@method method.
947
- return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
948
- }
949
- return { done: true, value: nativeMethod.call(str, regexp, arg2) };
950
- }
951
- return { done: false };
952
- });
953
- var stringMethod = methods[0];
954
- var regexMethod = methods[1];
955
-
956
- redefine(String.prototype, KEY, stringMethod);
957
- redefine(RegExp.prototype, SYMBOL, length == 2
958
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
959
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
960
- ? function (string, arg) { return regexMethod.call(string, this, arg); }
961
- // 21.2.5.6 RegExp.prototype[@@match](string)
962
- // 21.2.5.9 RegExp.prototype[@@search](string)
963
- : function (string) { return regexMethod.call(string, this); }
964
- );
965
- if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
915
+ var nativeReverse = [].reverse;
916
+ var test = [1, 2];
917
+
918
+ // `Array.prototype.reverse` method
919
+ // https://tc39.github.io/ecma262/#sec-array.prototype.reverse
920
+ // fix for Safari 12.0 bug
921
+ // https://bugs.webkit.org/show_bug.cgi?id=188794
922
+ _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
923
+ reverse: function reverse() {
924
+ // eslint-disable-next-line no-self-assign
925
+ if (isArray(this)) this.length = this.length;
926
+ return nativeReverse.call(this);
966
927
  }
967
- };
928
+ });
968
929
 
969
- // `String.prototype.{ codePointAt, at }` methods implementation
970
- var createMethod$2 = function (CONVERT_TO_STRING) {
971
- return function ($this, pos) {
972
- var S = String(requireObjectCoercible($this));
973
- var position = toInteger(pos);
974
- var size = S.length;
975
- var first, second;
976
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
977
- first = S.charCodeAt(position);
978
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
979
- || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
980
- ? CONVERT_TO_STRING ? S.charAt(position) : first
981
- : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
930
+ // a string of all valid unicode whitespaces
931
+ // eslint-disable-next-line max-len
932
+ var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
933
+
934
+ var whitespace = '[' + whitespaces + ']';
935
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
936
+ var rtrim = RegExp(whitespace + whitespace + '*$');
937
+
938
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
939
+ var createMethod$2 = function (TYPE) {
940
+ return function ($this) {
941
+ var string = String(requireObjectCoercible($this));
942
+ if (TYPE & 1) string = string.replace(ltrim, '');
943
+ if (TYPE & 2) string = string.replace(rtrim, '');
944
+ return string;
982
945
  };
983
946
  };
984
947
 
985
- var stringMultibyte = {
986
- // `String.prototype.codePointAt` method
987
- // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
988
- codeAt: createMethod$2(false),
989
- // `String.prototype.at` method
990
- // https://github.com/mathiasbynens/String.prototype.at
991
- charAt: createMethod$2(true)
948
+ var stringTrim = {
949
+ // `String.prototype.{ trimLeft, trimStart }` methods
950
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
951
+ start: createMethod$2(1),
952
+ // `String.prototype.{ trimRight, trimEnd }` methods
953
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
954
+ end: createMethod$2(2),
955
+ // `String.prototype.trim` method
956
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trim
957
+ trim: createMethod$2(3)
992
958
  };
993
959
 
994
- var charAt = stringMultibyte.charAt;
960
+ var trim = stringTrim.trim;
995
961
 
996
- // `AdvanceStringIndex` abstract operation
997
- // https://tc39.github.io/ecma262/#sec-advancestringindex
998
- var advanceStringIndex = function (S, index, unicode) {
999
- return index + (unicode ? charAt(S, index).length : 1);
1000
- };
1001
962
 
1002
- // `RegExpExec` abstract operation
1003
- // https://tc39.github.io/ecma262/#sec-regexpexec
1004
- var regexpExecAbstract = function (R, S) {
1005
- var exec = R.exec;
1006
- if (typeof exec === 'function') {
1007
- var result = exec.call(R, S);
1008
- if (typeof result !== 'object') {
1009
- throw TypeError('RegExp exec method returned something other than an Object or null');
1010
- }
1011
- return result;
1012
- }
963
+ var nativeParseInt = global_1.parseInt;
964
+ var hex = /^[+-]?0[Xx]/;
965
+ var FORCED$1 = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
1013
966
 
1014
- if (classofRaw(R) !== 'RegExp') {
1015
- throw TypeError('RegExp#exec called on incompatible receiver');
1016
- }
1017
-
1018
- return regexpExec.call(R, S);
1019
- };
1020
-
1021
- var max$1 = Math.max;
1022
- var min$2 = Math.min;
1023
- var floor$1 = Math.floor;
1024
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
1025
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
1026
-
1027
- var maybeToString = function (it) {
1028
- return it === undefined ? it : String(it);
1029
- };
967
+ // `parseInt` method
968
+ // https://tc39.github.io/ecma262/#sec-parseint-string-radix
969
+ var _parseInt = FORCED$1 ? function parseInt(string, radix) {
970
+ var S = trim(String(string));
971
+ return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
972
+ } : nativeParseInt;
1030
973
 
1031
- // @@replace logic
1032
- fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
1033
- return [
1034
- // `String.prototype.replace` method
1035
- // https://tc39.github.io/ecma262/#sec-string.prototype.replace
1036
- function replace(searchValue, replaceValue) {
1037
- var O = requireObjectCoercible(this);
1038
- var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
1039
- return replacer !== undefined
1040
- ? replacer.call(searchValue, O, replaceValue)
1041
- : nativeReplace.call(String(O), searchValue, replaceValue);
1042
- },
1043
- // `RegExp.prototype[@@replace]` method
1044
- // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
1045
- function (regexp, replaceValue) {
1046
- var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
1047
- if (res.done) return res.value;
1048
-
1049
- var rx = anObject(regexp);
1050
- var S = String(this);
1051
-
1052
- var functionalReplace = typeof replaceValue === 'function';
1053
- if (!functionalReplace) replaceValue = String(replaceValue);
1054
-
1055
- var global = rx.global;
1056
- if (global) {
1057
- var fullUnicode = rx.unicode;
1058
- rx.lastIndex = 0;
1059
- }
1060
- var results = [];
1061
- while (true) {
1062
- var result = regexpExecAbstract(rx, S);
1063
- if (result === null) break;
1064
-
1065
- results.push(result);
1066
- if (!global) break;
1067
-
1068
- var matchStr = String(result[0]);
1069
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1070
- }
974
+ // `parseInt` method
975
+ // https://tc39.github.io/ecma262/#sec-parseint-string-radix
976
+ _export({ global: true, forced: parseInt != _parseInt }, {
977
+ parseInt: _parseInt
978
+ });
1071
979
 
1072
- var accumulatedResult = '';
1073
- var nextSourcePosition = 0;
1074
- for (var i = 0; i < results.length; i++) {
1075
- result = results[i];
1076
-
1077
- var matched = String(result[0]);
1078
- var position = max$1(min$2(toInteger(result.index), S.length), 0);
1079
- var captures = [];
1080
- // NOTE: This is equivalent to
1081
- // captures = result.slice(1).map(maybeToString)
1082
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1083
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1084
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1085
- for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
1086
- var namedCaptures = result.groups;
1087
- if (functionalReplace) {
1088
- var replacerArgs = [matched].concat(captures, position, S);
1089
- if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
1090
- var replacement = String(replaceValue.apply(undefined, replacerArgs));
1091
- } else {
1092
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1093
- }
1094
- if (position >= nextSourcePosition) {
1095
- accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
1096
- nextSourcePosition = position + matched.length;
1097
- }
1098
- }
1099
- return accumulatedResult + S.slice(nextSourcePosition);
1100
- }
1101
- ];
1102
-
1103
- // https://tc39.github.io/ecma262/#sec-getsubstitution
1104
- function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
1105
- var tailPos = position + matched.length;
1106
- var m = captures.length;
1107
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1108
- if (namedCaptures !== undefined) {
1109
- namedCaptures = toObject(namedCaptures);
1110
- symbols = SUBSTITUTION_SYMBOLS;
1111
- }
1112
- return nativeReplace.call(replacement, symbols, function (match, ch) {
1113
- var capture;
1114
- switch (ch.charAt(0)) {
1115
- case '$': return '$';
1116
- case '&': return matched;
1117
- case '`': return str.slice(0, position);
1118
- case "'": return str.slice(tailPos);
1119
- case '<':
1120
- capture = namedCaptures[ch.slice(1, -1)];
1121
- break;
1122
- default: // \d\d?
1123
- var n = +ch;
1124
- if (n === 0) return match;
1125
- if (n > m) {
1126
- var f = floor$1(n / 10);
1127
- if (f === 0) return match;
1128
- if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
1129
- return match;
1130
- }
1131
- capture = captures[n - 1];
1132
- }
1133
- return capture === undefined ? '' : capture;
1134
- });
980
+ function _typeof(obj) {
981
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
982
+ _typeof = function (obj) {
983
+ return typeof obj;
984
+ };
985
+ } else {
986
+ _typeof = function (obj) {
987
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
988
+ };
1135
989
  }
1136
- });
990
+
991
+ return _typeof(obj);
992
+ }
1137
993
 
1138
994
  function _classCallCheck(instance, Constructor) {
1139
995
  if (!(instance instanceof Constructor)) {
@@ -1238,9 +1094,88 @@
1238
1094
  * @author zhixin wen <wenzhixin2010@gmail.com>
1239
1095
  */
1240
1096
 
1097
+ var Utils = $.fn.bootstrapTable.utils; // Reasonable defaults
1098
+
1099
+ var PIXEL_STEP = 10;
1100
+ var LINE_HEIGHT = 40;
1101
+ var PAGE_HEIGHT = 800;
1102
+
1103
+ function normalizeWheel(event) {
1104
+ var sX = 0; // spinX
1105
+
1106
+ var sY = 0; // spinY
1107
+
1108
+ var pX = 0; // pixelX
1109
+
1110
+ var pY = 0; // pixelY
1111
+ // Legacy
1112
+
1113
+ if ('detail' in event) {
1114
+ sY = event.detail;
1115
+ }
1116
+
1117
+ if ('wheelDelta' in event) {
1118
+ sY = -event.wheelDelta / 120;
1119
+ }
1120
+
1121
+ if ('wheelDeltaY' in event) {
1122
+ sY = -event.wheelDeltaY / 120;
1123
+ }
1124
+
1125
+ if ('wheelDeltaX' in event) {
1126
+ sX = -event.wheelDeltaX / 120;
1127
+ } // side scrolling on FF with DOMMouseScroll
1128
+
1129
+
1130
+ if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {
1131
+ sX = sY;
1132
+ sY = 0;
1133
+ }
1134
+
1135
+ pX = sX * PIXEL_STEP;
1136
+ pY = sY * PIXEL_STEP;
1137
+
1138
+ if ('deltaY' in event) {
1139
+ pY = event.deltaY;
1140
+ }
1141
+
1142
+ if ('deltaX' in event) {
1143
+ pX = event.deltaX;
1144
+ }
1145
+
1146
+ if ((pX || pY) && event.deltaMode) {
1147
+ if (event.deltaMode === 1) {
1148
+ // delta in LINE units
1149
+ pX *= LINE_HEIGHT;
1150
+ pY *= LINE_HEIGHT;
1151
+ } else {
1152
+ // delta in PAGE units
1153
+ pX *= PAGE_HEIGHT;
1154
+ pY *= PAGE_HEIGHT;
1155
+ }
1156
+ } // Fall-back if spin cannot be determined
1157
+
1158
+
1159
+ if (pX && !sX) {
1160
+ sX = pX < 1 ? -1 : 1;
1161
+ }
1162
+
1163
+ if (pY && !sY) {
1164
+ sY = pY < 1 ? -1 : 1;
1165
+ }
1166
+
1167
+ return {
1168
+ spinX: sX,
1169
+ spinY: sY,
1170
+ pixelX: pX,
1171
+ pixelY: pY
1172
+ };
1173
+ }
1174
+
1241
1175
  $.extend($.fn.bootstrapTable.defaults, {
1242
1176
  fixedColumns: false,
1243
- fixedNumber: 1
1177
+ fixedNumber: 0,
1178
+ fixedRightNumber: 0
1244
1179
  });
1245
1180
 
1246
1181
  $.BootstrapTable =
@@ -1255,124 +1190,312 @@
1255
1190
  }
1256
1191
 
1257
1192
  _createClass(_class, [{
1258
- key: "fitHeader",
1259
- value: function fitHeader() {
1193
+ key: "fixedColumnsSupported",
1194
+ value: function fixedColumnsSupported() {
1195
+ return this.options.fixedColumns && !this.options.detailView && !this.options.cardView;
1196
+ }
1197
+ }, {
1198
+ key: "initContainer",
1199
+ value: function initContainer() {
1200
+ _get(_getPrototypeOf(_class.prototype), "initContainer", this).call(this);
1201
+
1202
+ if (!this.fixedColumnsSupported()) {
1203
+ return;
1204
+ }
1205
+
1206
+ if (this.options.fixedNumber) {
1207
+ this.$tableContainer.append('<div class="fixed-columns"></div>');
1208
+ this.$fixedColumns = this.$tableContainer.find('.fixed-columns');
1209
+ }
1210
+
1211
+ if (this.options.fixedRightNumber) {
1212
+ this.$tableContainer.append('<div class="fixed-columns-right"></div>');
1213
+ this.$fixedColumnsRight = this.$tableContainer.find('.fixed-columns-right');
1214
+ }
1215
+ }
1216
+ }, {
1217
+ key: "initBody",
1218
+ value: function initBody() {
1260
1219
  var _get2;
1261
1220
 
1262
1221
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1263
1222
  args[_key] = arguments[_key];
1264
1223
  }
1265
1224
 
1266
- (_get2 = _get(_getPrototypeOf(_class.prototype), "fitHeader", this)).call.apply(_get2, [this].concat(args));
1225
+ (_get2 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get2, [this].concat(args));
1267
1226
 
1268
- if (!this.options.fixedColumns) {
1227
+ if (!this.fixedColumnsSupported()) {
1269
1228
  return;
1270
1229
  }
1271
1230
 
1272
- if (this.$el.is(':hidden')) {
1231
+ if (this.options.showHeader && this.options.height) {
1273
1232
  return;
1274
1233
  }
1275
1234
 
1276
- this.$container.find('.fixed-table-header-columns').remove();
1277
- this.$fixedHeader = $('<div class="fixed-table-header-columns"></div>');
1278
- this.$fixedHeader.append(this.$tableHeader.find('>table').clone(true));
1279
- this.$tableHeader.after(this.$fixedHeader);
1280
- var width = this.getFixedColumnsWidth();
1281
- this.$fixedHeader.css({
1282
- top: 0,
1283
- width: width,
1284
- height: this.$tableHeader.outerHeight(true)
1285
- });
1286
1235
  this.initFixedColumnsBody();
1287
- this.$fixedBody.css({
1288
- top: this.$tableHeader.outerHeight(true),
1289
- width: width,
1290
- height: this.$tableBody.outerHeight(true) - 1
1291
- });
1292
1236
  this.initFixedColumnsEvents();
1293
1237
  }
1294
1238
  }, {
1295
- key: "initBody",
1296
- value: function initBody() {
1239
+ key: "trigger",
1240
+ value: function trigger() {
1297
1241
  var _get3;
1298
1242
 
1299
1243
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1300
1244
  args[_key2] = arguments[_key2];
1301
1245
  }
1302
1246
 
1303
- (_get3 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get3, [this].concat(args));
1247
+ (_get3 = _get(_getPrototypeOf(_class.prototype), "trigger", this)).call.apply(_get3, [this].concat(args));
1304
1248
 
1305
- if (!this.options.fixedColumns) {
1249
+ if (!this.fixedColumnsSupported()) {
1306
1250
  return;
1307
1251
  }
1308
1252
 
1309
- if (this.options.showHeader && this.options.height) {
1253
+ if (args[0] === 'post-header') {
1254
+ this.initFixedColumnsHeader();
1255
+ } else if (args[0] === 'scroll-body') {
1256
+ if (this.needFixedColumns && this.options.fixedNumber) {
1257
+ this.$fixedBody.scrollTop(this.$tableBody.scrollTop());
1258
+ }
1259
+
1260
+ if (this.needFixedColumns && this.options.fixedRightNumber) {
1261
+ this.$fixedBodyRight.scrollTop(this.$tableBody.scrollTop());
1262
+ }
1263
+ }
1264
+ }
1265
+ }, {
1266
+ key: "updateSelected",
1267
+ value: function updateSelected() {
1268
+ var _this = this;
1269
+
1270
+ _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
1271
+
1272
+ if (!this.fixedColumnsSupported()) {
1310
1273
  return;
1311
1274
  }
1312
1275
 
1313
- this.initFixedColumnsBody();
1314
- this.$fixedBody.css({
1315
- top: 0,
1316
- width: this.getFixedColumnsWidth(),
1317
- height: this.$tableHeader.outerHeight(true) + this.$tableBody.outerHeight(true)
1276
+ this.$tableBody.find('tr').each(function (i, el) {
1277
+ var $el = $(el);
1278
+ var index = $el.data('index');
1279
+ var classes = $el.attr('class');
1280
+ var inputSelector = "[name=\"".concat(_this.options.selectItemName, "\"]");
1281
+ var $input = $el.find(inputSelector);
1282
+
1283
+ if (_typeof(index) === undefined) {
1284
+ return;
1285
+ }
1286
+
1287
+ var updateFixedBody = function updateFixedBody($fixedHeader, $fixedBody) {
1288
+ var $tr = $fixedBody.find("tr[data-index=\"".concat(index, "\"]"));
1289
+ $tr.attr('class', classes);
1290
+
1291
+ if ($input.length) {
1292
+ $tr.find(inputSelector).prop('checked', $input.prop('checked'));
1293
+ }
1294
+
1295
+ if (_this.$selectAll.length) {
1296
+ $fixedHeader.add($fixedBody).find('[name="btSelectAll"]').prop('checked', _this.$selectAll.prop('checked'));
1297
+ }
1298
+ };
1299
+
1300
+ if (_this.$fixedBody && _this.options.fixedNumber) {
1301
+ updateFixedBody(_this.$fixedHeader, _this.$fixedBody);
1302
+ }
1303
+
1304
+ if (_this.$fixedBodyRight && _this.options.fixedRightNumber) {
1305
+ updateFixedBody(_this.$fixedHeaderRight, _this.$fixedBodyRight);
1306
+ }
1318
1307
  });
1308
+ }
1309
+ }, {
1310
+ key: "initFixedColumnsHeader",
1311
+ value: function initFixedColumnsHeader() {
1312
+ var _this2 = this;
1313
+
1314
+ if (this.options.height) {
1315
+ this.needFixedColumns = this.$tableHeader.outerWidth(true) < this.$tableHeader.find('table').outerWidth(true);
1316
+ } else {
1317
+ this.needFixedColumns = this.$tableBody.outerWidth(true) < this.$tableBody.find('table').outerWidth(true);
1318
+ }
1319
+
1320
+ var initFixedHeader = function initFixedHeader($fixedColumns, isRight) {
1321
+ $fixedColumns.find('.fixed-table-header').remove();
1322
+ $fixedColumns.append(_this2.$tableHeader.clone(true));
1323
+ $fixedColumns.css({
1324
+ width: _this2.getFixedColumnsWidth(isRight)
1325
+ });
1326
+ return $fixedColumns.find('.fixed-table-header');
1327
+ };
1328
+
1329
+ if (this.needFixedColumns && this.options.fixedNumber) {
1330
+ this.$fixedHeader = initFixedHeader(this.$fixedColumns);
1331
+ this.$fixedHeader.css('margin-right', '');
1332
+ } else if (this.$fixedColumns) {
1333
+ this.$fixedColumns.html('').css('width', '');
1334
+ }
1335
+
1336
+ if (this.needFixedColumns && this.options.fixedRightNumber) {
1337
+ this.$fixedHeaderRight = initFixedHeader(this.$fixedColumnsRight, true);
1338
+ this.$fixedHeaderRight.scrollLeft(this.$fixedHeaderRight.find('table').width());
1339
+ } else if (this.$fixedColumnsRight) {
1340
+ this.$fixedColumnsRight.html('').css('width', '');
1341
+ }
1342
+
1343
+ this.initFixedColumnsBody();
1319
1344
  this.initFixedColumnsEvents();
1320
1345
  }
1321
1346
  }, {
1322
1347
  key: "initFixedColumnsBody",
1323
1348
  value: function initFixedColumnsBody() {
1324
- this.$container.find('.fixed-table-body-columns').remove();
1325
- this.$fixedBody = $('<div class="fixed-table-body-columns"></div>');
1326
- this.$fixedBody.append(this.$tableBody.find('>table').clone(true));
1327
- this.$tableBody.after(this.$fixedBody);
1349
+ var _this3 = this;
1350
+
1351
+ var initFixedBody = function initFixedBody($fixedColumns, $fixedHeader) {
1352
+ $fixedColumns.find('.fixed-table-body').remove();
1353
+ $fixedColumns.append(_this3.$tableBody.clone(true));
1354
+ var $fixedBody = $fixedColumns.find('.fixed-table-body');
1355
+
1356
+ var tableBody = _this3.$tableBody.get(0);
1357
+
1358
+ var scrollHeight = tableBody.scrollWidth > tableBody.clientWidth ? Utils.getScrollBarWidth() : 0;
1359
+ var height = _this3.$tableContainer.outerHeight(true) - scrollHeight - 1;
1360
+ $fixedColumns.css({
1361
+ height: height
1362
+ });
1363
+ $fixedBody.css({
1364
+ height: height - $fixedHeader.height()
1365
+ });
1366
+ return $fixedBody;
1367
+ };
1368
+
1369
+ if (this.needFixedColumns && this.options.fixedNumber) {
1370
+ this.$fixedBody = initFixedBody(this.$fixedColumns, this.$fixedHeader);
1371
+ }
1372
+
1373
+ if (this.needFixedColumns && this.options.fixedRightNumber) {
1374
+ this.$fixedBodyRight = initFixedBody(this.$fixedColumnsRight, this.$fixedHeaderRight);
1375
+ this.$fixedBodyRight.scrollLeft(this.$fixedBodyRight.find('table').width());
1376
+ this.$fixedBodyRight.css('overflow-y', this.options.height ? 'auto' : 'hidden');
1377
+ }
1328
1378
  }
1329
1379
  }, {
1330
1380
  key: "getFixedColumnsWidth",
1331
- value: function getFixedColumnsWidth() {
1381
+ value: function getFixedColumnsWidth(isRight) {
1332
1382
  var visibleFields = this.getVisibleFields();
1333
1383
  var width = 0;
1384
+ var fixedNumber = this.options.fixedNumber;
1385
+ var marginRight = 0;
1334
1386
 
1335
- for (var i = 0; i < this.options.fixedNumber; i++) {
1387
+ if (isRight) {
1388
+ visibleFields = visibleFields.reverse();
1389
+ fixedNumber = this.options.fixedRightNumber;
1390
+ marginRight = parseInt(this.$tableHeader.css('margin-right'), 10);
1391
+ }
1392
+
1393
+ for (var i = 0; i < fixedNumber; i++) {
1336
1394
  width += this.$header.find("th[data-field=\"".concat(visibleFields[i], "\"]")).outerWidth(true);
1337
1395
  }
1338
1396
 
1339
- return width + 1;
1397
+ return width + marginRight + 1;
1340
1398
  }
1341
1399
  }, {
1342
1400
  key: "initFixedColumnsEvents",
1343
1401
  value: function initFixedColumnsEvents() {
1344
- var _this = this;
1402
+ var _this4 = this;
1345
1403
 
1346
- // events
1347
- this.$tableBody.off('scroll.fixed-columns').on('scroll.fixed-columns', function (e) {
1348
- _this.$fixedBody.find('table').css('top', -$(e.currentTarget).scrollTop());
1349
- });
1350
- this.$body.find('> tr[data-index]').off('hover').hover(function (e) {
1351
- var index = $(e.currentTarget).data('index');
1404
+ var toggleHover = function toggleHover(e, toggle) {
1405
+ var tr = "tr[data-index=\"".concat($(e.currentTarget).data('index'), "\"]");
1352
1406
 
1353
- _this.$fixedBody.find("tr[data-index=\"".concat(index, "\"]")).css('background-color', $(e.currentTarget).css('background-color'));
1354
- }, function (e) {
1355
- var index = $(e.currentTarget).data('index');
1407
+ var $trs = _this4.$tableBody.find(tr);
1356
1408
 
1357
- var $tr = _this.$fixedBody.find("tr[data-index=\"".concat(index, "\"]"));
1409
+ if (_this4.$fixedBody) {
1410
+ $trs = $trs.add(_this4.$fixedBody.find(tr));
1411
+ }
1358
1412
 
1359
- $tr.attr('style', $tr.attr('style').replace(/background-color:.*;/, ''));
1360
- });
1361
- this.$fixedBody.find('tr[data-index]').off('hover').hover(function (e) {
1362
- var index = $(e.currentTarget).data('index');
1413
+ if (_this4.$fixedBodyRight) {
1414
+ $trs = $trs.add(_this4.$fixedBodyRight.find(tr));
1415
+ }
1416
+
1417
+ $trs.css('background-color', toggle ? $(e.currentTarget).css('background-color') : '');
1418
+ };
1363
1419
 
1364
- _this.$body.find("tr[data-index=\"".concat(index, "\"]")).css('background-color', $(e.currentTarget).css('background-color'));
1420
+ this.$tableBody.find('tr').hover(function (e) {
1421
+ toggleHover(e, true);
1365
1422
  }, function (e) {
1366
- var index = $(e.currentTarget).data('index');
1423
+ toggleHover(e, false);
1424
+ });
1425
+ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
1426
+ var mousewheel = isFirefox ? 'DOMMouseScroll' : 'mousewheel';
1367
1427
 
1368
- var $tr = _this.$body.find("> tr[data-index=\"".concat(index, "\"]"));
1428
+ var updateScroll = function updateScroll(e, fixedBody) {
1429
+ var normalized = normalizeWheel(e);
1430
+ var deltaY = Math.ceil(normalized.pixelY);
1431
+ var top = _this4.$tableBody.scrollTop() + deltaY;
1369
1432
 
1370
- $tr.attr('style', $tr.attr('style').replace(/background-color:.*;/, ''));
1371
- });
1433
+ if (deltaY < 0 && top > 0 || deltaY > 0 && top < fixedBody.scrollHeight - fixedBody.clientHeight) {
1434
+ e.preventDefault();
1435
+ }
1436
+
1437
+ _this4.$tableBody.scrollTop(top);
1438
+
1439
+ if (_this4.$fixedBody) {
1440
+ _this4.$fixedBody.scrollTop(top);
1441
+ }
1442
+
1443
+ if (_this4.$fixedBodyRight) {
1444
+ _this4.$fixedBodyRight.scrollTop(top);
1445
+ }
1446
+ };
1447
+
1448
+ if (this.needFixedColumns && this.options.fixedNumber) {
1449
+ this.$fixedBody.find('tr').hover(function (e) {
1450
+ toggleHover(e, true);
1451
+ }, function (e) {
1452
+ toggleHover(e, false);
1453
+ });
1454
+ this.$fixedBody[0].addEventListener(mousewheel, function (e) {
1455
+ updateScroll(e, _this4.$fixedBody[0]);
1456
+ });
1457
+ }
1458
+
1459
+ if (this.needFixedColumns && this.options.fixedRightNumber) {
1460
+ this.$fixedBodyRight.find('tr').hover(function (e) {
1461
+ toggleHover(e, true);
1462
+ }, function (e) {
1463
+ toggleHover(e, false);
1464
+ });
1465
+ this.$fixedBodyRight.off('scroll').on('scroll', function () {
1466
+ var top = _this4.$fixedBodyRight.scrollTop();
1467
+
1468
+ _this4.$tableBody.scrollTop(top);
1469
+
1470
+ if (_this4.$fixedBody) {
1471
+ _this4.$fixedBody.scrollTop(top);
1472
+ }
1473
+ });
1474
+ }
1475
+
1476
+ if (this.options.filterControl) {
1477
+ $(this.$fixedColumns).off('keyup change').on('keyup change', function (e) {
1478
+ var $target = $(e.target);
1479
+ var value = $target.val();
1480
+ var field = $target.parents('th').data('field');
1481
+
1482
+ var $coreTh = _this4.$header.find("th[data-field=\"".concat(field, "\"]"));
1483
+
1484
+ if ($target.is('input')) {
1485
+ $coreTh.find('input').val(value);
1486
+ } else if ($target.is('select')) {
1487
+ var $select = $coreTh.find('select');
1488
+ $select.find('option[selected]').removeAttr('selected');
1489
+ $select.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
1490
+ }
1491
+
1492
+ _this4.triggerSearch();
1493
+ });
1494
+ }
1372
1495
  }
1373
1496
  }]);
1374
1497
 
1375
1498
  return _class;
1376
1499
  }($.BootstrapTable);
1377
1500
 
1378
- }));
1501
+ })));