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;
764
816
  };
765
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();
833
+ };
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]
@@ -821,14 +893,33 @@
821
893
  });
822
894
  };
823
895
 
896
+ var $indexOf = arrayIncludes.indexOf;
897
+
898
+
899
+ var nativeIndexOf = [].indexOf;
900
+
901
+ var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
902
+ var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
903
+
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
+ }
913
+ });
914
+
824
915
  var nativeJoin = [].join;
825
916
 
826
917
  var ES3_STRINGS = indexedObject != Object;
827
- var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
918
+ var SLOPPY_METHOD$1 = sloppyArrayMethod('join', ',');
828
919
 
829
920
  // `Array.prototype.join` method
830
921
  // https://tc39.github.io/ecma262/#sec-array.prototype.join
831
- _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
922
+ _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD$1 }, {
832
923
  join: function join(separator) {
833
924
  return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
834
925
  }
@@ -837,10 +928,17 @@
837
928
  var $map = arrayIteration.map;
838
929
 
839
930
 
931
+
932
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
933
+ // FF49- issue
934
+ var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
935
+ [].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
936
+ });
937
+
840
938
  // `Array.prototype.map` method
841
939
  // https://tc39.github.io/ecma262/#sec-array.prototype.map
842
940
  // with adding support of @@species
843
- _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
941
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
844
942
  map: function map(callbackfn /* , thisArg */) {
845
943
  return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
846
944
  }
@@ -881,8 +979,8 @@
881
979
  }
882
980
  });
883
981
 
884
- var nativeSort = [].sort;
885
- var test = [1, 2, 3];
982
+ var test = [];
983
+ var nativeSort = test.sort;
886
984
 
887
985
  // IE8-
888
986
  var FAILS_ON_UNDEFINED = fails(function () {
@@ -893,9 +991,9 @@
893
991
  test.sort(null);
894
992
  });
895
993
  // Old WebKit
896
- var SLOPPY_METHOD$1 = sloppyArrayMethod('sort');
994
+ var SLOPPY_METHOD$2 = sloppyArrayMethod('sort');
897
995
 
898
- var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$1;
996
+ var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$2;
899
997
 
900
998
  // `Array.prototype.sort` method
901
999
  // https://tc39.github.io/ecma262/#sec-array.prototype.sort
@@ -965,6 +1063,13 @@
965
1063
  });
966
1064
 
967
1065
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1066
+ var test$1 = {};
1067
+
1068
+ test$1[TO_STRING_TAG] = 'z';
1069
+
1070
+ var toStringTagSupport = String(test$1) === '[object z]';
1071
+
1072
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
968
1073
  // ES3 wrong here
969
1074
  var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
970
1075
 
@@ -976,34 +1081,27 @@
976
1081
  };
977
1082
 
978
1083
  // getting tag from ES6+ `Object.prototype.toString`
979
- var classof = function (it) {
1084
+ var classof = toStringTagSupport ? classofRaw : function (it) {
980
1085
  var O, tag, result;
981
1086
  return it === undefined ? 'Undefined' : it === null ? 'Null'
982
1087
  // @@toStringTag case
983
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
1088
+ : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
984
1089
  // builtinTag case
985
1090
  : CORRECT_ARGUMENTS ? classofRaw(O)
986
1091
  // ES3 arguments fallback
987
1092
  : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
988
1093
  };
989
1094
 
990
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
991
- var test$1 = {};
992
-
993
- test$1[TO_STRING_TAG$1] = 'z';
994
-
995
1095
  // `Object.prototype.toString` method implementation
996
1096
  // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
997
- var objectToString = String(test$1) !== '[object z]' ? function toString() {
1097
+ var objectToString = toStringTagSupport ? {}.toString : function toString() {
998
1098
  return '[object ' + classof(this) + ']';
999
- } : test$1.toString;
1000
-
1001
- var ObjectPrototype = Object.prototype;
1099
+ };
1002
1100
 
1003
1101
  // `Object.prototype.toString` method
1004
1102
  // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1005
- if (objectToString !== ObjectPrototype.toString) {
1006
- redefine(ObjectPrototype, 'toString', objectToString, { unsafe: true });
1103
+ if (!toStringTagSupport) {
1104
+ redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
1007
1105
  }
1008
1106
 
1009
1107
  // a string of all valid unicode whitespaces
@@ -1070,25 +1168,30 @@
1070
1168
  return result;
1071
1169
  };
1072
1170
 
1073
- var TO_STRING = 'toString';
1074
- var RegExpPrototype = RegExp.prototype;
1075
- var nativeToString = RegExpPrototype[TO_STRING];
1171
+ // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
1172
+ // so we use an intermediate function.
1173
+ function RE(s, f) {
1174
+ return RegExp(s, f);
1175
+ }
1076
1176
 
1077
- var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1078
- // FF44- RegExp#toString has a wrong name
1079
- var INCORRECT_NAME = nativeToString.name != TO_STRING;
1177
+ var UNSUPPORTED_Y = fails(function () {
1178
+ // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1179
+ var re = RE('a', 'y');
1180
+ re.lastIndex = 2;
1181
+ return re.exec('abcd') != null;
1182
+ });
1080
1183
 
1081
- // `RegExp.prototype.toString` method
1082
- // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
1083
- if (NOT_GENERIC || INCORRECT_NAME) {
1084
- redefine(RegExp.prototype, TO_STRING, function toString() {
1085
- var R = anObject(this);
1086
- var p = String(R.source);
1087
- var rf = R.flags;
1088
- var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
1089
- return '/' + p + '/' + f;
1090
- }, { unsafe: true });
1091
- }
1184
+ var BROKEN_CARET = fails(function () {
1185
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1186
+ var re = RE('^r', 'gy');
1187
+ re.lastIndex = 2;
1188
+ return re.exec('str') != null;
1189
+ });
1190
+
1191
+ var regexpStickyHelpers = {
1192
+ UNSUPPORTED_Y: UNSUPPORTED_Y,
1193
+ BROKEN_CARET: BROKEN_CARET
1194
+ };
1092
1195
 
1093
1196
  var nativeExec = RegExp.prototype.exec;
1094
1197
  // This always refers to the native implementation, because the
@@ -1106,24 +1209,56 @@
1106
1209
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1107
1210
  })();
1108
1211
 
1212
+ var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
1213
+
1109
1214
  // nonparticipating capturing group, copied from es5-shim's String#split patch.
1110
1215
  var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1111
1216
 
1112
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
1217
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
1113
1218
 
1114
1219
  if (PATCH) {
1115
1220
  patchedExec = function exec(str) {
1116
1221
  var re = this;
1117
1222
  var lastIndex, reCopy, match, i;
1223
+ var sticky = UNSUPPORTED_Y$1 && re.sticky;
1224
+ var flags = regexpFlags.call(re);
1225
+ var source = re.source;
1226
+ var charsAdded = 0;
1227
+ var strCopy = str;
1228
+
1229
+ if (sticky) {
1230
+ flags = flags.replace('y', '');
1231
+ if (flags.indexOf('g') === -1) {
1232
+ flags += 'g';
1233
+ }
1234
+
1235
+ strCopy = String(str).slice(re.lastIndex);
1236
+ // Support anchored sticky behavior.
1237
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
1238
+ source = '(?: ' + source + ')';
1239
+ strCopy = ' ' + strCopy;
1240
+ charsAdded++;
1241
+ }
1242
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1243
+ // simulate the 'y' flag.
1244
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1245
+ }
1118
1246
 
1119
1247
  if (NPCG_INCLUDED) {
1120
- reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
1248
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1121
1249
  }
1122
1250
  if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1123
1251
 
1124
- match = nativeExec.call(re, str);
1252
+ match = nativeExec.call(sticky ? reCopy : re, strCopy);
1125
1253
 
1126
- if (UPDATES_LAST_INDEX_WRONG && match) {
1254
+ if (sticky) {
1255
+ if (match) {
1256
+ match.input = match.input.slice(charsAdded);
1257
+ match[0] = match[0].slice(charsAdded);
1258
+ match.index = re.lastIndex;
1259
+ re.lastIndex += match[0].length;
1260
+ } else re.lastIndex = 0;
1261
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1127
1262
  re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1128
1263
  }
1129
1264
  if (NPCG_INCLUDED && match && match.length > 1) {
@@ -1142,6 +1277,30 @@
1142
1277
 
1143
1278
  var regexpExec = patchedExec;
1144
1279
 
1280
+ _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
1281
+ exec: regexpExec
1282
+ });
1283
+
1284
+ var TO_STRING = 'toString';
1285
+ var RegExpPrototype = RegExp.prototype;
1286
+ var nativeToString = RegExpPrototype[TO_STRING];
1287
+
1288
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1289
+ // FF44- RegExp#toString has a wrong name
1290
+ var INCORRECT_NAME = nativeToString.name != TO_STRING;
1291
+
1292
+ // `RegExp.prototype.toString` method
1293
+ // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
1294
+ if (NOT_GENERIC || INCORRECT_NAME) {
1295
+ redefine(RegExp.prototype, TO_STRING, function toString() {
1296
+ var R = anObject(this);
1297
+ var p = String(R.source);
1298
+ var rf = R.flags;
1299
+ var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
1300
+ return '/' + p + '/' + f;
1301
+ }, { unsafe: true });
1302
+ }
1303
+
1145
1304
  var SPECIES$3 = wellKnownSymbol('species');
1146
1305
 
1147
1306
  var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
@@ -1157,6 +1316,12 @@
1157
1316
  return ''.replace(re, '$<a>') !== '7';
1158
1317
  });
1159
1318
 
1319
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
1320
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1321
+ var REPLACE_KEEPS_$0 = (function () {
1322
+ return 'a'.replace(/./, '$0') === '$0';
1323
+ })();
1324
+
1160
1325
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
1161
1326
  // Weex JS has frozen built-in prototypes, so use try / catch wrapper
1162
1327
  var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
@@ -1181,15 +1346,22 @@
1181
1346
  // Symbol-named RegExp methods call .exec
1182
1347
  var execCalled = false;
1183
1348
  var re = /a/;
1184
- re.exec = function () { execCalled = true; return null; };
1185
1349
 
1186
1350
  if (KEY === 'split') {
1351
+ // We can't use real regex here since it causes deoptimization
1352
+ // and serious performance degradation in V8
1353
+ // https://github.com/zloirock/core-js/issues/306
1354
+ re = {};
1187
1355
  // RegExp[@@split] doesn't call the regex's exec method, but first creates
1188
1356
  // a new one. We need to return the patched regex when creating the new one.
1189
1357
  re.constructor = {};
1190
1358
  re.constructor[SPECIES$3] = function () { return re; };
1359
+ re.flags = '';
1360
+ re[SYMBOL] = /./[SYMBOL];
1191
1361
  }
1192
1362
 
1363
+ re.exec = function () { execCalled = true; return null; };
1364
+
1193
1365
  re[SYMBOL]('');
1194
1366
  return !execCalled;
1195
1367
  });
@@ -1197,7 +1369,7 @@
1197
1369
  if (
1198
1370
  !DELEGATES_TO_SYMBOL ||
1199
1371
  !DELEGATES_TO_EXEC ||
1200
- (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
1372
+ (KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
1201
1373
  (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
1202
1374
  ) {
1203
1375
  var nativeRegExpMethod = /./[SYMBOL];
@@ -1212,7 +1384,7 @@
1212
1384
  return { done: true, value: nativeMethod.call(str, regexp, arg2) };
1213
1385
  }
1214
1386
  return { done: false };
1215
- });
1387
+ }, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
1216
1388
  var stringMethod = methods[0];
1217
1389
  var regexMethod = methods[1];
1218
1390
 
@@ -1225,8 +1397,9 @@
1225
1397
  // 21.2.5.9 RegExp.prototype[@@search](string)
1226
1398
  : function (string) { return regexMethod.call(string, this); }
1227
1399
  );
1228
- if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
1229
1400
  }
1401
+
1402
+ if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
1230
1403
  };
1231
1404
 
1232
1405
  var MATCH = wellKnownSymbol('match');
@@ -1502,7 +1675,7 @@
1502
1675
  'sort': 'fa-sort'
1503
1676
  },
1504
1677
  html: {
1505
- multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n \n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
1678
+ multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
1506
1679
  multipleSortButton: '<button class="button multi-sort" data-open="%s" title="%s">%s</button>',
1507
1680
  multipleSortSelect: '<select class="%s %s browser-default">'
1508
1681
  }
@@ -1560,7 +1733,7 @@
1560
1733
  var $alert = that.$sortModal.find('div.alert');
1561
1734
  var fields = [];
1562
1735
  var results = [];
1563
- that.options.sortPriority = $.map($rows, function (row) {
1736
+ var sortPriority = $.map($rows, function (row) {
1564
1737
  var $row = $(row);
1565
1738
  var name = $row.find('.multi-sort-name').val();
1566
1739
  var order = $row.find('.multi-sort-order').val();
@@ -1592,22 +1765,7 @@
1592
1765
  that.$sortModal.modal('hide');
1593
1766
  }
1594
1767
 
1595
- that.options.sortName = '';
1596
-
1597
- if (that.options.sidePagination === 'server') {
1598
- var t = that.options.queryParams;
1599
-
1600
- that.options.queryParams = function (params) {
1601
- params.multiSort = that.options.sortPriority;
1602
- return $.fn.bootstrapTable.utils.calculateObjectValue(that.options, t, [params]);
1603
- };
1604
-
1605
- isSingleSort = false;
1606
- that.initServer(that.options.silentSort);
1607
- return;
1608
- }
1609
-
1610
- that.onMultipleSort();
1768
+ that.multiSort(sortPriority);
1611
1769
  }
1612
1770
  });
1613
1771
 
@@ -1635,9 +1793,11 @@
1635
1793
  };
1636
1794
 
1637
1795
  $.fn.bootstrapTable.methods.push('multipleSort');
1796
+ $.fn.bootstrapTable.methods.push('multiSort');
1638
1797
  $.extend($.fn.bootstrapTable.defaults, {
1639
1798
  showMultiSort: false,
1640
1799
  showMultiSortButton: true,
1800
+ multiSortStrictSort: false,
1641
1801
  sortPriority: null,
1642
1802
  onMultipleSort: function onMultipleSort() {
1643
1803
  return false;
@@ -1690,6 +1850,7 @@
1690
1850
  $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
1691
1851
  var BootstrapTable = $.fn.bootstrapTable.Constructor;
1692
1852
  var _initToolbar = BootstrapTable.prototype.initToolbar;
1853
+ var _destroy = BootstrapTable.prototype.destroy;
1693
1854
 
1694
1855
  BootstrapTable.prototype.initToolbar = function () {
1695
1856
  var _this = this;
@@ -1790,6 +1951,18 @@
1790
1951
  }
1791
1952
  };
1792
1953
 
1954
+ BootstrapTable.prototype.destroy = function () {
1955
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1956
+ args[_key2] = arguments[_key2];
1957
+ }
1958
+
1959
+ _destroy.apply(this, Array.prototype.slice.apply(args));
1960
+
1961
+ if (this.options.showMultiSort) {
1962
+ this.$sortModal.remove();
1963
+ }
1964
+ };
1965
+
1793
1966
  BootstrapTable.prototype.multipleSort = function () {
1794
1967
  var that = this;
1795
1968
 
@@ -1810,25 +1983,40 @@
1810
1983
  var arr2 = [];
1811
1984
 
1812
1985
  for (var i = 0; i < that.options.sortPriority.length; i++) {
1813
- var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
1814
- var aa = a[that.options.sortPriority[i].sortName];
1815
- var bb = b[that.options.sortPriority[i].sortName];
1986
+ var fieldName = that.options.sortPriority[i].sortName;
1987
+ var fieldIndex = that.header.fields.indexOf(fieldName);
1988
+ var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
1816
1989
 
1817
- if (aa === undefined || aa === null) {
1818
- aa = '';
1990
+ if (that.header.sortNames[fieldIndex]) {
1991
+ fieldName = that.header.sortNames[fieldIndex];
1819
1992
  }
1820
1993
 
1821
- if (bb === undefined || bb === null) {
1822
- bb = '';
1994
+ var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
1995
+ var aa = a[fieldName];
1996
+ var bb = b[fieldName];
1997
+ var value1 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
1998
+ var value2 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
1999
+
2000
+ if (value1 !== undefined && value2 !== undefined) {
2001
+ arr1.push(order * value1);
2002
+ arr2.push(order * value2);
2003
+ continue;
1823
2004
  }
1824
2005
 
2006
+ if (aa === undefined || aa === null) aa = '';
2007
+ if (bb === undefined || bb === null) bb = '';
2008
+
1825
2009
  if ($.isNumeric(aa) && $.isNumeric(bb)) {
1826
2010
  aa = parseFloat(aa);
1827
2011
  bb = parseFloat(bb);
1828
- }
1829
-
1830
- if (typeof aa !== 'string') {
2012
+ } else {
1831
2013
  aa = aa.toString();
2014
+ bb = bb.toString();
2015
+
2016
+ if (that.options.multiSortStrictSort) {
2017
+ aa = aa.toLowerCase();
2018
+ bb = bb.toLowerCase();
2019
+ }
1832
2020
  }
1833
2021
 
1834
2022
  arr1.push(order * cmp(aa, bb));
@@ -1902,4 +2090,24 @@
1902
2090
  }
1903
2091
  };
1904
2092
 
1905
- }));
2093
+ BootstrapTable.prototype.multiSort = function (sortPriority) {
2094
+ var _this2 = this;
2095
+
2096
+ this.options.sortPriority = sortPriority;
2097
+ this.options.sortName = '';
2098
+
2099
+ if (this.options.sidePagination === 'server') {
2100
+ this.options.queryParams = function (params) {
2101
+ params.multiSort = _this2.options.sortPriority;
2102
+ return $.fn.bootstrapTable.utils.calculateObjectValue(_this2.options, _this2.options.queryParams, [params]);
2103
+ };
2104
+
2105
+ isSingleSort = false;
2106
+ this.initServer(this.options.silentSort);
2107
+ return;
2108
+ }
2109
+
2110
+ this.onMultipleSort();
2111
+ };
2112
+
2113
+ })));