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.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +106 -64
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +678 -208
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +680 -210
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +66 -10
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +742 -489
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +1103 -213
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +226 -80
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +136 -64
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +338 -177
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +402 -110
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +133 -61
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +243 -75
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +347 -179
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +687 -358
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +12 -14
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +545 -422
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +488 -92
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +2 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +216 -72
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +142 -65
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +345 -137
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +136 -64
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +86 -41
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +218 -123
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +640 -254
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +347 -135
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +83 -43
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +203 -75
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +449 -199
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +207 -114
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +104 -62
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +82 -41
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +80 -11
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +106 -60
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +79 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +111 -62
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +74 -9
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +109 -63
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +80 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +110 -64
- metadata +1 -2
- 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 ==
|
24
|
-
check(typeof window ==
|
25
|
-
check(typeof self ==
|
26
|
-
check(typeof commonjsGlobal ==
|
22
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
23
|
+
check(typeof window == 'object' && window) ||
|
24
|
+
check(typeof self == 'object' && self) ||
|
25
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
27
26
|
// eslint-disable-next-line no-new-func
|
28
27
|
Function('return this')();
|
29
28
|
|
@@ -179,7 +178,7 @@
|
|
179
178
|
f: f$2
|
180
179
|
};
|
181
180
|
|
182
|
-
var
|
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
|
-
|
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
|
218
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
203
219
|
})('versions', []).push({
|
204
|
-
version: '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
|
-
|
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(
|
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'))
|
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
|
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 ||
|
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(
|
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
|
-
|
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
|
561
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
549
562
|
|
550
563
|
var wellKnownSymbol = function (name) {
|
551
|
-
|
552
|
-
|
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
|
-
|
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
|
-
|
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;
|
@@ -719,10 +760,17 @@
|
|
719
760
|
var $filter = arrayIteration.filter;
|
720
761
|
|
721
762
|
|
763
|
+
|
764
|
+
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
765
|
+
// Edge 14- issue
|
766
|
+
var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
|
767
|
+
[].filter.call({ length: -1, 0: 1 }, function (it) { throw it; });
|
768
|
+
});
|
769
|
+
|
722
770
|
// `Array.prototype.filter` method
|
723
771
|
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
724
772
|
// with adding support of @@species
|
725
|
-
_export({ target: 'Array', proto: true, forced: !
|
773
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
726
774
|
filter: function filter(callbackfn /* , thisArg */) {
|
727
775
|
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
728
776
|
}
|
@@ -748,56 +796,87 @@
|
|
748
796
|
|
749
797
|
var html = getBuiltIn('document', 'documentElement');
|
750
798
|
|
799
|
+
var GT = '>';
|
800
|
+
var LT = '<';
|
801
|
+
var PROTOTYPE = 'prototype';
|
802
|
+
var SCRIPT = 'script';
|
751
803
|
var IE_PROTO = sharedKey('IE_PROTO');
|
752
804
|
|
753
|
-
var
|
754
|
-
|
805
|
+
var EmptyConstructor = function () { /* empty */ };
|
806
|
+
|
807
|
+
var scriptTag = function (content) {
|
808
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
809
|
+
};
|
810
|
+
|
811
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
812
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
813
|
+
activeXDocument.write(scriptTag(''));
|
814
|
+
activeXDocument.close();
|
815
|
+
var temp = activeXDocument.parentWindow.Object;
|
816
|
+
activeXDocument = null; // avoid memory leak
|
817
|
+
return temp;
|
818
|
+
};
|
755
819
|
|
756
820
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
757
|
-
var
|
821
|
+
var NullProtoObjectViaIFrame = function () {
|
758
822
|
// Thrash, waste and sodomy: IE GC bug
|
759
823
|
var iframe = documentCreateElement('iframe');
|
760
|
-
var
|
761
|
-
var lt = '<';
|
762
|
-
var script = 'script';
|
763
|
-
var gt = '>';
|
764
|
-
var js = 'java' + script + ':';
|
824
|
+
var JS = 'java' + SCRIPT + ':';
|
765
825
|
var iframeDocument;
|
766
826
|
iframe.style.display = 'none';
|
767
827
|
html.appendChild(iframe);
|
768
|
-
|
828
|
+
// https://github.com/zloirock/core-js/issues/475
|
829
|
+
iframe.src = String(JS);
|
769
830
|
iframeDocument = iframe.contentWindow.document;
|
770
831
|
iframeDocument.open();
|
771
|
-
iframeDocument.write(
|
832
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
772
833
|
iframeDocument.close();
|
773
|
-
|
774
|
-
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
775
|
-
return createDict();
|
834
|
+
return iframeDocument.F;
|
776
835
|
};
|
777
836
|
|
837
|
+
// Check for document.domain and active x support
|
838
|
+
// No need to use active x approach when document.domain is not set
|
839
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
840
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
841
|
+
// avoid IE GC bug
|
842
|
+
var activeXDocument;
|
843
|
+
var NullProtoObject = function () {
|
844
|
+
try {
|
845
|
+
/* global ActiveXObject */
|
846
|
+
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
847
|
+
} catch (error) { /* ignore */ }
|
848
|
+
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
849
|
+
var length = enumBugKeys.length;
|
850
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
851
|
+
return NullProtoObject();
|
852
|
+
};
|
853
|
+
|
854
|
+
hiddenKeys[IE_PROTO] = true;
|
855
|
+
|
778
856
|
// `Object.create` method
|
779
857
|
// https://tc39.github.io/ecma262/#sec-object.create
|
780
858
|
var objectCreate = Object.create || function create(O, Properties) {
|
781
859
|
var result;
|
782
860
|
if (O !== null) {
|
783
|
-
|
784
|
-
result = new
|
785
|
-
|
861
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
862
|
+
result = new EmptyConstructor();
|
863
|
+
EmptyConstructor[PROTOTYPE] = null;
|
786
864
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
787
865
|
result[IE_PROTO] = O;
|
788
|
-
} else result =
|
866
|
+
} else result = NullProtoObject();
|
789
867
|
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
790
868
|
};
|
791
869
|
|
792
|
-
hiddenKeys[IE_PROTO] = true;
|
793
|
-
|
794
870
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
795
871
|
var ArrayPrototype = Array.prototype;
|
796
872
|
|
797
873
|
// Array.prototype[@@unscopables]
|
798
874
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
799
875
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
800
|
-
|
876
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
877
|
+
configurable: true,
|
878
|
+
value: objectCreate(null)
|
879
|
+
});
|
801
880
|
}
|
802
881
|
|
803
882
|
// add a key to Array.prototype[@@unscopables]
|
@@ -860,6 +939,31 @@
|
|
860
939
|
return result;
|
861
940
|
};
|
862
941
|
|
942
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
943
|
+
// so we use an intermediate function.
|
944
|
+
function RE(s, f) {
|
945
|
+
return RegExp(s, f);
|
946
|
+
}
|
947
|
+
|
948
|
+
var UNSUPPORTED_Y = fails(function () {
|
949
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
950
|
+
var re = RE('a', 'y');
|
951
|
+
re.lastIndex = 2;
|
952
|
+
return re.exec('abcd') != null;
|
953
|
+
});
|
954
|
+
|
955
|
+
var BROKEN_CARET = fails(function () {
|
956
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
957
|
+
var re = RE('^r', 'gy');
|
958
|
+
re.lastIndex = 2;
|
959
|
+
return re.exec('str') != null;
|
960
|
+
});
|
961
|
+
|
962
|
+
var regexpStickyHelpers = {
|
963
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
964
|
+
BROKEN_CARET: BROKEN_CARET
|
965
|
+
};
|
966
|
+
|
863
967
|
var nativeExec = RegExp.prototype.exec;
|
864
968
|
// This always refers to the native implementation, because the
|
865
969
|
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
@@ -876,24 +980,56 @@
|
|
876
980
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
877
981
|
})();
|
878
982
|
|
983
|
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
984
|
+
|
879
985
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
880
986
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
881
987
|
|
882
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
988
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
883
989
|
|
884
990
|
if (PATCH) {
|
885
991
|
patchedExec = function exec(str) {
|
886
992
|
var re = this;
|
887
993
|
var lastIndex, reCopy, match, i;
|
994
|
+
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
995
|
+
var flags = regexpFlags.call(re);
|
996
|
+
var source = re.source;
|
997
|
+
var charsAdded = 0;
|
998
|
+
var strCopy = str;
|
999
|
+
|
1000
|
+
if (sticky) {
|
1001
|
+
flags = flags.replace('y', '');
|
1002
|
+
if (flags.indexOf('g') === -1) {
|
1003
|
+
flags += 'g';
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
strCopy = String(str).slice(re.lastIndex);
|
1007
|
+
// Support anchored sticky behavior.
|
1008
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
1009
|
+
source = '(?: ' + source + ')';
|
1010
|
+
strCopy = ' ' + strCopy;
|
1011
|
+
charsAdded++;
|
1012
|
+
}
|
1013
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
1014
|
+
// simulate the 'y' flag.
|
1015
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
1016
|
+
}
|
888
1017
|
|
889
1018
|
if (NPCG_INCLUDED) {
|
890
|
-
reCopy = new RegExp('^' +
|
1019
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
891
1020
|
}
|
892
1021
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
893
1022
|
|
894
|
-
match = nativeExec.call(re,
|
1023
|
+
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
895
1024
|
|
896
|
-
if (
|
1025
|
+
if (sticky) {
|
1026
|
+
if (match) {
|
1027
|
+
match.input = match.input.slice(charsAdded);
|
1028
|
+
match[0] = match[0].slice(charsAdded);
|
1029
|
+
match.index = re.lastIndex;
|
1030
|
+
re.lastIndex += match[0].length;
|
1031
|
+
} else re.lastIndex = 0;
|
1032
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
897
1033
|
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
898
1034
|
}
|
899
1035
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
@@ -912,6 +1048,10 @@
|
|
912
1048
|
|
913
1049
|
var regexpExec = patchedExec;
|
914
1050
|
|
1051
|
+
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
1052
|
+
exec: regexpExec
|
1053
|
+
});
|
1054
|
+
|
915
1055
|
var SPECIES$2 = wellKnownSymbol('species');
|
916
1056
|
|
917
1057
|
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
@@ -927,6 +1067,12 @@
|
|
927
1067
|
return ''.replace(re, '$<a>') !== '7';
|
928
1068
|
});
|
929
1069
|
|
1070
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1071
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1072
|
+
var REPLACE_KEEPS_$0 = (function () {
|
1073
|
+
return 'a'.replace(/./, '$0') === '$0';
|
1074
|
+
})();
|
1075
|
+
|
930
1076
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
931
1077
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
932
1078
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
@@ -951,15 +1097,22 @@
|
|
951
1097
|
// Symbol-named RegExp methods call .exec
|
952
1098
|
var execCalled = false;
|
953
1099
|
var re = /a/;
|
954
|
-
re.exec = function () { execCalled = true; return null; };
|
955
1100
|
|
956
1101
|
if (KEY === 'split') {
|
1102
|
+
// We can't use real regex here since it causes deoptimization
|
1103
|
+
// and serious performance degradation in V8
|
1104
|
+
// https://github.com/zloirock/core-js/issues/306
|
1105
|
+
re = {};
|
957
1106
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
958
1107
|
// a new one. We need to return the patched regex when creating the new one.
|
959
1108
|
re.constructor = {};
|
960
1109
|
re.constructor[SPECIES$2] = function () { return re; };
|
1110
|
+
re.flags = '';
|
1111
|
+
re[SYMBOL] = /./[SYMBOL];
|
961
1112
|
}
|
962
1113
|
|
1114
|
+
re.exec = function () { execCalled = true; return null; };
|
1115
|
+
|
963
1116
|
re[SYMBOL]('');
|
964
1117
|
return !execCalled;
|
965
1118
|
});
|
@@ -967,7 +1120,7 @@
|
|
967
1120
|
if (
|
968
1121
|
!DELEGATES_TO_SYMBOL ||
|
969
1122
|
!DELEGATES_TO_EXEC ||
|
970
|
-
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
1123
|
+
(KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
|
971
1124
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
972
1125
|
) {
|
973
1126
|
var nativeRegExpMethod = /./[SYMBOL];
|
@@ -982,7 +1135,7 @@
|
|
982
1135
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
983
1136
|
}
|
984
1137
|
return { done: false };
|
985
|
-
});
|
1138
|
+
}, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
|
986
1139
|
var stringMethod = methods[0];
|
987
1140
|
var regexMethod = methods[1];
|
988
1141
|
|
@@ -995,8 +1148,9 @@
|
|
995
1148
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
996
1149
|
: function (string) { return regexMethod.call(string, this); }
|
997
1150
|
);
|
998
|
-
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
999
1151
|
}
|
1152
|
+
|
1153
|
+
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1000
1154
|
};
|
1001
1155
|
|
1002
1156
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
@@ -1062,7 +1216,7 @@
|
|
1062
1216
|
};
|
1063
1217
|
|
1064
1218
|
// @@replace logic
|
1065
|
-
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
1219
|
+
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
|
1066
1220
|
return [
|
1067
1221
|
// `String.prototype.replace` method
|
1068
1222
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
@@ -1076,8 +1230,10 @@
|
|
1076
1230
|
// `RegExp.prototype[@@replace]` method
|
1077
1231
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
1078
1232
|
function (regexp, replaceValue) {
|
1079
|
-
|
1080
|
-
|
1233
|
+
if (reason.REPLACE_KEEPS_$0 || (typeof replaceValue === 'string' && replaceValue.indexOf('$0') === -1)) {
|
1234
|
+
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1235
|
+
if (res.done) return res.value;
|
1236
|
+
}
|
1081
1237
|
|
1082
1238
|
var rx = anObject(regexp);
|
1083
1239
|
var S = String(this);
|
@@ -1345,6 +1501,62 @@
|
|
1345
1501
|
];
|
1346
1502
|
}, !SUPPORTS_Y);
|
1347
1503
|
|
1504
|
+
// iterable DOM collections
|
1505
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
1506
|
+
var domIterables = {
|
1507
|
+
CSSRuleList: 0,
|
1508
|
+
CSSStyleDeclaration: 0,
|
1509
|
+
CSSValueList: 0,
|
1510
|
+
ClientRectList: 0,
|
1511
|
+
DOMRectList: 0,
|
1512
|
+
DOMStringList: 0,
|
1513
|
+
DOMTokenList: 1,
|
1514
|
+
DataTransferItemList: 0,
|
1515
|
+
FileList: 0,
|
1516
|
+
HTMLAllCollection: 0,
|
1517
|
+
HTMLCollection: 0,
|
1518
|
+
HTMLFormElement: 0,
|
1519
|
+
HTMLSelectElement: 0,
|
1520
|
+
MediaList: 0,
|
1521
|
+
MimeTypeArray: 0,
|
1522
|
+
NamedNodeMap: 0,
|
1523
|
+
NodeList: 1,
|
1524
|
+
PaintRequestList: 0,
|
1525
|
+
Plugin: 0,
|
1526
|
+
PluginArray: 0,
|
1527
|
+
SVGLengthList: 0,
|
1528
|
+
SVGNumberList: 0,
|
1529
|
+
SVGPathSegList: 0,
|
1530
|
+
SVGPointList: 0,
|
1531
|
+
SVGStringList: 0,
|
1532
|
+
SVGTransformList: 0,
|
1533
|
+
SourceBufferList: 0,
|
1534
|
+
StyleSheetList: 0,
|
1535
|
+
TextTrackCueList: 0,
|
1536
|
+
TextTrackList: 0,
|
1537
|
+
TouchList: 0
|
1538
|
+
};
|
1539
|
+
|
1540
|
+
var $forEach = arrayIteration.forEach;
|
1541
|
+
|
1542
|
+
|
1543
|
+
// `Array.prototype.forEach` method implementation
|
1544
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
1545
|
+
var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
|
1546
|
+
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1547
|
+
} : [].forEach;
|
1548
|
+
|
1549
|
+
for (var COLLECTION_NAME in domIterables) {
|
1550
|
+
var Collection = global_1[COLLECTION_NAME];
|
1551
|
+
var CollectionPrototype = Collection && Collection.prototype;
|
1552
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
1553
|
+
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
|
1554
|
+
createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
|
1555
|
+
} catch (error) {
|
1556
|
+
CollectionPrototype.forEach = arrayForEach;
|
1557
|
+
}
|
1558
|
+
}
|
1559
|
+
|
1348
1560
|
function _classCallCheck(instance, Constructor) {
|
1349
1561
|
if (!(instance instanceof Constructor)) {
|
1350
1562
|
throw new TypeError("Cannot call a class as a function");
|
@@ -1450,6 +1662,7 @@
|
|
1450
1662
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
1451
1663
|
*/
|
1452
1664
|
|
1665
|
+
var Utils = $.fn.bootstrapTable.utils;
|
1453
1666
|
var UtilsCookie = {
|
1454
1667
|
cookieIds: {
|
1455
1668
|
sortOrder: 'bs.table.sortOrder',
|
@@ -1458,6 +1671,7 @@
|
|
1458
1671
|
pageList: 'bs.table.pageList',
|
1459
1672
|
columns: 'bs.table.columns',
|
1460
1673
|
searchText: 'bs.table.searchText',
|
1674
|
+
reorderColumns: 'bs.table.reorderColumns',
|
1461
1675
|
filterControl: 'bs.table.filterControl',
|
1462
1676
|
filterBy: 'bs.table.filterBy'
|
1463
1677
|
},
|
@@ -1518,6 +1732,14 @@
|
|
1518
1732
|
sessionStorage.setItem(cookieName, cookieValue);
|
1519
1733
|
break;
|
1520
1734
|
|
1735
|
+
case 'customStorage':
|
1736
|
+
if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) {
|
1737
|
+
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
1738
|
+
}
|
1739
|
+
|
1740
|
+
Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
|
1741
|
+
break;
|
1742
|
+
|
1521
1743
|
default:
|
1522
1744
|
return false;
|
1523
1745
|
}
|
@@ -1547,6 +1769,13 @@
|
|
1547
1769
|
case 'sessionStorage':
|
1548
1770
|
return sessionStorage.getItem(cookieName);
|
1549
1771
|
|
1772
|
+
case 'customStorage':
|
1773
|
+
if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) {
|
1774
|
+
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
|
1778
|
+
|
1550
1779
|
default:
|
1551
1780
|
return null;
|
1552
1781
|
}
|
@@ -1567,6 +1796,14 @@
|
|
1567
1796
|
sessionStorage.removeItem(cookieName);
|
1568
1797
|
break;
|
1569
1798
|
|
1799
|
+
case 'customStorage':
|
1800
|
+
if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) {
|
1801
|
+
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
1802
|
+
}
|
1803
|
+
|
1804
|
+
Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
|
1805
|
+
break;
|
1806
|
+
|
1570
1807
|
default:
|
1571
1808
|
return false;
|
1572
1809
|
}
|
@@ -1626,9 +1863,16 @@
|
|
1626
1863
|
var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable);
|
1627
1864
|
|
1628
1865
|
var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
|
1629
|
-
|
1630
|
-
if (cookie.text !== '') {
|
1631
|
-
|
1866
|
+
filteredCookies.forEach(function (cookie) {
|
1867
|
+
if (cookie.text !== '' && element.tagName === 'INPUT') {
|
1868
|
+
element.value = cookie.text;
|
1869
|
+
cachedFilters[cookie.field] = cookie.text;
|
1870
|
+
} else if (cookie.text !== '' && element.tagName === 'SELECT') {
|
1871
|
+
var option = document.createElement('option');
|
1872
|
+
option.value = cookie.text;
|
1873
|
+
option.text = cookie.text;
|
1874
|
+
element.add(option, element[1]);
|
1875
|
+
element.selectedIndex = 1;
|
1632
1876
|
cachedFilters[cookie.field] = cookie.text;
|
1633
1877
|
}
|
1634
1878
|
});
|
@@ -1655,9 +1899,9 @@
|
|
1655
1899
|
cookieDomain: null,
|
1656
1900
|
cookieSecure: null,
|
1657
1901
|
cookieIdTable: '',
|
1658
|
-
cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy'],
|
1902
|
+
cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns'],
|
1659
1903
|
cookieStorage: 'cookieStorage',
|
1660
|
-
// localStorage, sessionStorage
|
1904
|
+
// localStorage, sessionStorage, customStorage
|
1661
1905
|
// internal variable
|
1662
1906
|
filterControls: [],
|
1663
1907
|
filterControlValuesLoaded: false
|
@@ -1683,36 +1927,51 @@
|
|
1683
1927
|
_createClass(_class, [{
|
1684
1928
|
key: "init",
|
1685
1929
|
value: function init() {
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1930
|
+
if (this.options.cookie) {
|
1931
|
+
// FilterBy logic
|
1932
|
+
var filterByCookieValue = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.filterBy);
|
1933
|
+
|
1934
|
+
if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) {
|
1935
|
+
throw new Error('The cookie value of filterBy must be a json!');
|
1936
|
+
}
|
1937
|
+
|
1938
|
+
var filterByCookie = {};
|
1939
|
+
|
1940
|
+
try {
|
1941
|
+
filterByCookie = JSON.parse(filterByCookieValue);
|
1942
|
+
} catch (e) {
|
1943
|
+
throw new Error('Could not parse the json of the filterBy cookie!');
|
1944
|
+
}
|
1945
|
+
|
1946
|
+
this.filterColumns = filterByCookie ? filterByCookie : {}; // FilterControl logic
|
1947
|
+
|
1948
|
+
this.options.filterControls = [];
|
1949
|
+
this.options.filterControlValuesLoaded = false;
|
1950
|
+
this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled;
|
1951
|
+
|
1952
|
+
if (this.options.filterControl) {
|
1953
|
+
var that = this;
|
1954
|
+
this.$el.on('column-search.bs.table', function (e, field, text) {
|
1955
|
+
var isNewField = true;
|
1956
|
+
|
1957
|
+
for (var i = 0; i < that.options.filterControls.length; i++) {
|
1958
|
+
if (that.options.filterControls[i].field === field) {
|
1959
|
+
that.options.filterControls[i].text = text;
|
1960
|
+
isNewField = false;
|
1961
|
+
break;
|
1962
|
+
}
|
1704
1963
|
}
|
1705
|
-
}
|
1706
1964
|
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1965
|
+
if (isNewField) {
|
1966
|
+
that.options.filterControls.push({
|
1967
|
+
field: field,
|
1968
|
+
text: text
|
1969
|
+
});
|
1970
|
+
}
|
1713
1971
|
|
1714
|
-
|
1715
|
-
|
1972
|
+
UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that.options.filterControls));
|
1973
|
+
}).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
|
1974
|
+
}
|
1716
1975
|
}
|
1717
1976
|
|
1718
1977
|
_get(_getPrototypeOf(_class.prototype), "init", this).call(this);
|
@@ -1854,15 +2113,35 @@
|
|
1854
2113
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
|
1855
2114
|
}
|
1856
2115
|
}, {
|
1857
|
-
key: "
|
1858
|
-
value: function
|
2116
|
+
key: "initHeader",
|
2117
|
+
value: function initHeader() {
|
1859
2118
|
var _get10;
|
1860
2119
|
|
2120
|
+
if (this.options.reorderableColumns) {
|
2121
|
+
this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.reorderColumns));
|
2122
|
+
}
|
2123
|
+
|
1861
2124
|
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
1862
2125
|
args[_key9] = arguments[_key9];
|
1863
2126
|
}
|
1864
2127
|
|
1865
|
-
(_get10 = _get(_getPrototypeOf(_class.prototype), "
|
2128
|
+
(_get10 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get10, [this].concat(args));
|
2129
|
+
}
|
2130
|
+
}, {
|
2131
|
+
key: "persistReorderColumnsState",
|
2132
|
+
value: function persistReorderColumnsState(that) {
|
2133
|
+
UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder));
|
2134
|
+
}
|
2135
|
+
}, {
|
2136
|
+
key: "filterBy",
|
2137
|
+
value: function filterBy() {
|
2138
|
+
var _get11;
|
2139
|
+
|
2140
|
+
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
2141
|
+
args[_key10] = arguments[_key10];
|
2142
|
+
}
|
2143
|
+
|
2144
|
+
(_get11 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get11, [this].concat(args));
|
1866
2145
|
|
1867
2146
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
|
1868
2147
|
}
|
@@ -1884,8 +2163,21 @@
|
|
1884
2163
|
var sortOrderNameCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortName);
|
1885
2164
|
var pageNumberCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageNumber);
|
1886
2165
|
var pageListCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageList);
|
1887
|
-
var
|
1888
|
-
var
|
2166
|
+
var searchTextCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.searchText);
|
2167
|
+
var columnsCookieValue = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.columns);
|
2168
|
+
|
2169
|
+
if (typeof columnsCookieValue === 'boolean' && !columnsCookieValue) {
|
2170
|
+
throw new Error('The cookie value of filterBy must be a json!');
|
2171
|
+
}
|
2172
|
+
|
2173
|
+
var columnsCookie = {};
|
2174
|
+
|
2175
|
+
try {
|
2176
|
+
columnsCookie = JSON.parse(columnsCookieValue);
|
2177
|
+
} catch (e) {
|
2178
|
+
throw new Error('Could not parse the json of the columns cookie!', columnsCookieValue);
|
2179
|
+
} // sortOrder
|
2180
|
+
|
1889
2181
|
|
1890
2182
|
this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; // sortName
|
1891
2183
|
|
@@ -1931,4 +2223,4 @@
|
|
1931
2223
|
return _class;
|
1932
2224
|
}($.BootstrapTable);
|
1933
2225
|
|
1934
|
-
}));
|
2226
|
+
})));
|