bootstrap-table-rails 1.15.5 → 1.18.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 +143 -36
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +1012 -83
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +684 -208
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +686 -210
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +75 -12
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1617 -763
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +280 -93
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +200 -78
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1349 -258
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +216 -77
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +1198 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1219 -208
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +458 -204
- 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 +1420 -901
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +2361 -0
- 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 +589 -423
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +3 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +552 -487
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +3 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +219 -74
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +143 -66
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +326 -462
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +137 -65
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +87 -42
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +452 -155
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +643 -255
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +348 -136
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +84 -44
- 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 +218 -76
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +558 -217
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +221 -115
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +777 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +120 -63
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +99 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +113 -57
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +99 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +102 -45
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +776 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1049 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.eot +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.svg +28 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.ttf +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.woff +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +89 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +161 -63
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +88 -15
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +166 -65
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +83 -11
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +164 -66
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +89 -15
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +164 -66
- metadata +10 -5
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +0 -1757
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +0 -12
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +0 -2087
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
@@ -2,9 +2,9 @@
|
|
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
|
+
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
|
8
8
|
|
9
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
10
10
|
|
@@ -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
|
|
@@ -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
|
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,40 +519,17 @@
|
|
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);
|
520
526
|
}
|
521
527
|
};
|
522
528
|
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
};
|
528
|
-
|
529
|
-
// optional / simple context binding
|
530
|
-
var bindContext = function (fn, that, length) {
|
531
|
-
aFunction$1(fn);
|
532
|
-
if (that === undefined) return fn;
|
533
|
-
switch (length) {
|
534
|
-
case 0: return function () {
|
535
|
-
return fn.call(that);
|
536
|
-
};
|
537
|
-
case 1: return function (a) {
|
538
|
-
return fn.call(that, a);
|
539
|
-
};
|
540
|
-
case 2: return function (a, b) {
|
541
|
-
return fn.call(that, a, b);
|
542
|
-
};
|
543
|
-
case 3: return function (a, b, c) {
|
544
|
-
return fn.call(that, a, b, c);
|
545
|
-
};
|
546
|
-
}
|
547
|
-
return function (/* ...args */) {
|
548
|
-
return fn.apply(that, arguments);
|
549
|
-
};
|
529
|
+
// `IsArray` abstract operation
|
530
|
+
// https://tc39.github.io/ecma262/#sec-isarray
|
531
|
+
var isArray = Array.isArray || function isArray(arg) {
|
532
|
+
return classofRaw(arg) == 'Array';
|
550
533
|
};
|
551
534
|
|
552
535
|
// `ToObject` abstract operation
|
@@ -555,10 +538,10 @@
|
|
555
538
|
return Object(requireObjectCoercible(argument));
|
556
539
|
};
|
557
540
|
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
541
|
+
var createProperty = function (object, key, value) {
|
542
|
+
var propertyKey = toPrimitive(key);
|
543
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
544
|
+
else object[propertyKey] = value;
|
562
545
|
};
|
563
546
|
|
564
547
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
@@ -567,12 +550,21 @@
|
|
567
550
|
return !String(Symbol());
|
568
551
|
});
|
569
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');
|
570
560
|
var Symbol$1 = global_1.Symbol;
|
571
|
-
var
|
561
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
572
562
|
|
573
563
|
var wellKnownSymbol = function (name) {
|
574
|
-
|
575
|
-
|
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];
|
576
568
|
};
|
577
569
|
|
578
570
|
var SPECIES = wellKnownSymbol('species');
|
@@ -592,6 +584,119 @@
|
|
592
584
|
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
593
585
|
};
|
594
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
|
+
|
607
|
+
var SPECIES$1 = wellKnownSymbol('species');
|
608
|
+
|
609
|
+
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
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 () {
|
614
|
+
var array = [];
|
615
|
+
var constructor = array.constructor = {};
|
616
|
+
constructor[SPECIES$1] = function () {
|
617
|
+
return { foo: 1 };
|
618
|
+
};
|
619
|
+
return array[METHOD_NAME](Boolean).foo !== 1;
|
620
|
+
});
|
621
|
+
};
|
622
|
+
|
623
|
+
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
624
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
625
|
+
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
626
|
+
|
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 () {
|
631
|
+
var array = [];
|
632
|
+
array[IS_CONCAT_SPREADABLE] = false;
|
633
|
+
return array.concat()[0] !== array;
|
634
|
+
});
|
635
|
+
|
636
|
+
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
637
|
+
|
638
|
+
var isConcatSpreadable = function (O) {
|
639
|
+
if (!isObject(O)) return false;
|
640
|
+
var spreadable = O[IS_CONCAT_SPREADABLE];
|
641
|
+
return spreadable !== undefined ? !!spreadable : isArray(O);
|
642
|
+
};
|
643
|
+
|
644
|
+
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
645
|
+
|
646
|
+
// `Array.prototype.concat` method
|
647
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
648
|
+
// with adding support of @@isConcatSpreadable and @@species
|
649
|
+
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
650
|
+
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
651
|
+
var O = toObject(this);
|
652
|
+
var A = arraySpeciesCreate(O, 0);
|
653
|
+
var n = 0;
|
654
|
+
var i, k, length, len, E;
|
655
|
+
for (i = -1, length = arguments.length; i < length; i++) {
|
656
|
+
E = i === -1 ? O : arguments[i];
|
657
|
+
if (isConcatSpreadable(E)) {
|
658
|
+
len = toLength(E.length);
|
659
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
660
|
+
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
661
|
+
} else {
|
662
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
663
|
+
createProperty(A, n++, E);
|
664
|
+
}
|
665
|
+
}
|
666
|
+
A.length = n;
|
667
|
+
return A;
|
668
|
+
}
|
669
|
+
});
|
670
|
+
|
671
|
+
var aFunction$1 = function (it) {
|
672
|
+
if (typeof it != 'function') {
|
673
|
+
throw TypeError(String(it) + ' is not a function');
|
674
|
+
} return it;
|
675
|
+
};
|
676
|
+
|
677
|
+
// optional / simple context binding
|
678
|
+
var bindContext = function (fn, that, length) {
|
679
|
+
aFunction$1(fn);
|
680
|
+
if (that === undefined) return fn;
|
681
|
+
switch (length) {
|
682
|
+
case 0: return function () {
|
683
|
+
return fn.call(that);
|
684
|
+
};
|
685
|
+
case 1: return function (a) {
|
686
|
+
return fn.call(that, a);
|
687
|
+
};
|
688
|
+
case 2: return function (a, b) {
|
689
|
+
return fn.call(that, a, b);
|
690
|
+
};
|
691
|
+
case 3: return function (a, b, c) {
|
692
|
+
return fn.call(that, a, b, c);
|
693
|
+
};
|
694
|
+
}
|
695
|
+
return function (/* ...args */) {
|
696
|
+
return fn.apply(that, arguments);
|
697
|
+
};
|
698
|
+
};
|
699
|
+
|
595
700
|
var push = [].push;
|
596
701
|
|
597
702
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
@@ -652,26 +757,20 @@
|
|
652
757
|
findIndex: createMethod$1(6)
|
653
758
|
};
|
654
759
|
|
655
|
-
var
|
760
|
+
var $filter = arrayIteration.filter;
|
656
761
|
|
657
|
-
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
658
|
-
return !fails(function () {
|
659
|
-
var array = [];
|
660
|
-
var constructor = array.constructor = {};
|
661
|
-
constructor[SPECIES$1] = function () {
|
662
|
-
return { foo: 1 };
|
663
|
-
};
|
664
|
-
return array[METHOD_NAME](Boolean).foo !== 1;
|
665
|
-
});
|
666
|
-
};
|
667
762
|
|
668
|
-
var $filter = arrayIteration.filter;
|
669
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
|
+
});
|
670
769
|
|
671
770
|
// `Array.prototype.filter` method
|
672
771
|
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
673
772
|
// with adding support of @@species
|
674
|
-
_export({ target: 'Array', proto: true, forced: !
|
773
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
675
774
|
filter: function filter(callbackfn /* , thisArg */) {
|
676
775
|
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
677
776
|
}
|
@@ -697,56 +796,87 @@
|
|
697
796
|
|
698
797
|
var html = getBuiltIn('document', 'documentElement');
|
699
798
|
|
799
|
+
var GT = '>';
|
800
|
+
var LT = '<';
|
801
|
+
var PROTOTYPE = 'prototype';
|
802
|
+
var SCRIPT = 'script';
|
700
803
|
var IE_PROTO = sharedKey('IE_PROTO');
|
701
804
|
|
702
|
-
var
|
703
|
-
|
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
|
+
};
|
704
819
|
|
705
820
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
706
|
-
var
|
821
|
+
var NullProtoObjectViaIFrame = function () {
|
707
822
|
// Thrash, waste and sodomy: IE GC bug
|
708
823
|
var iframe = documentCreateElement('iframe');
|
709
|
-
var
|
710
|
-
var lt = '<';
|
711
|
-
var script = 'script';
|
712
|
-
var gt = '>';
|
713
|
-
var js = 'java' + script + ':';
|
824
|
+
var JS = 'java' + SCRIPT + ':';
|
714
825
|
var iframeDocument;
|
715
826
|
iframe.style.display = 'none';
|
716
827
|
html.appendChild(iframe);
|
717
|
-
|
828
|
+
// https://github.com/zloirock/core-js/issues/475
|
829
|
+
iframe.src = String(JS);
|
718
830
|
iframeDocument = iframe.contentWindow.document;
|
719
831
|
iframeDocument.open();
|
720
|
-
iframeDocument.write(
|
832
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
721
833
|
iframeDocument.close();
|
722
|
-
|
723
|
-
|
724
|
-
|
834
|
+
return iframeDocument.F;
|
835
|
+
};
|
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();
|
725
852
|
};
|
726
853
|
|
854
|
+
hiddenKeys[IE_PROTO] = true;
|
855
|
+
|
727
856
|
// `Object.create` method
|
728
857
|
// https://tc39.github.io/ecma262/#sec-object.create
|
729
858
|
var objectCreate = Object.create || function create(O, Properties) {
|
730
859
|
var result;
|
731
860
|
if (O !== null) {
|
732
|
-
|
733
|
-
result = new
|
734
|
-
|
861
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
862
|
+
result = new EmptyConstructor();
|
863
|
+
EmptyConstructor[PROTOTYPE] = null;
|
735
864
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
736
865
|
result[IE_PROTO] = O;
|
737
|
-
} else result =
|
866
|
+
} else result = NullProtoObject();
|
738
867
|
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
739
868
|
};
|
740
869
|
|
741
|
-
hiddenKeys[IE_PROTO] = true;
|
742
|
-
|
743
870
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
744
871
|
var ArrayPrototype = Array.prototype;
|
745
872
|
|
746
873
|
// Array.prototype[@@unscopables]
|
747
874
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
748
875
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
749
|
-
|
876
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
877
|
+
configurable: true,
|
878
|
+
value: objectCreate(null)
|
879
|
+
});
|
750
880
|
}
|
751
881
|
|
752
882
|
// add a key to Array.prototype[@@unscopables]
|
@@ -774,53 +904,258 @@
|
|
774
904
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
775
905
|
addToUnscopables(FIND);
|
776
906
|
|
777
|
-
var
|
778
|
-
var propertyKey = toPrimitive(key);
|
779
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
780
|
-
else object[propertyKey] = value;
|
781
|
-
};
|
782
|
-
|
783
|
-
var SPECIES$2 = wellKnownSymbol('species');
|
784
|
-
var nativeSlice = [].slice;
|
785
|
-
var max$1 = Math.max;
|
907
|
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
786
908
|
|
787
|
-
// `
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
var
|
793
|
-
var
|
794
|
-
var
|
795
|
-
var
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
// cross-realm fallback
|
801
|
-
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
|
802
|
-
Constructor = undefined;
|
803
|
-
} else if (isObject(Constructor)) {
|
804
|
-
Constructor = Constructor[SPECIES$2];
|
805
|
-
if (Constructor === null) Constructor = undefined;
|
806
|
-
}
|
807
|
-
if (Constructor === Array || Constructor === undefined) {
|
808
|
-
return nativeSlice.call(O, k, fin);
|
909
|
+
// `Object.{ entries, values }` methods implementation
|
910
|
+
var createMethod$2 = function (TO_ENTRIES) {
|
911
|
+
return function (it) {
|
912
|
+
var O = toIndexedObject(it);
|
913
|
+
var keys = objectKeys(O);
|
914
|
+
var length = keys.length;
|
915
|
+
var i = 0;
|
916
|
+
var result = [];
|
917
|
+
var key;
|
918
|
+
while (length > i) {
|
919
|
+
key = keys[i++];
|
920
|
+
if (!descriptors || propertyIsEnumerable.call(O, key)) {
|
921
|
+
result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
|
809
922
|
}
|
810
923
|
}
|
811
|
-
result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
|
812
|
-
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
813
|
-
result.length = n;
|
814
924
|
return result;
|
925
|
+
};
|
926
|
+
};
|
927
|
+
|
928
|
+
var objectToArray = {
|
929
|
+
// `Object.entries` method
|
930
|
+
// https://tc39.github.io/ecma262/#sec-object.entries
|
931
|
+
entries: createMethod$2(true),
|
932
|
+
// `Object.values` method
|
933
|
+
// https://tc39.github.io/ecma262/#sec-object.values
|
934
|
+
values: createMethod$2(false)
|
935
|
+
};
|
936
|
+
|
937
|
+
var $entries = objectToArray.entries;
|
938
|
+
|
939
|
+
// `Object.entries` method
|
940
|
+
// https://tc39.github.io/ecma262/#sec-object.entries
|
941
|
+
_export({ target: 'Object', stat: true }, {
|
942
|
+
entries: function entries(O) {
|
943
|
+
return $entries(O);
|
815
944
|
}
|
816
945
|
});
|
817
946
|
|
947
|
+
// a string of all valid unicode whitespaces
|
948
|
+
// eslint-disable-next-line max-len
|
949
|
+
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';
|
950
|
+
|
951
|
+
var whitespace = '[' + whitespaces + ']';
|
952
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
953
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
954
|
+
|
955
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
956
|
+
var createMethod$3 = function (TYPE) {
|
957
|
+
return function ($this) {
|
958
|
+
var string = String(requireObjectCoercible($this));
|
959
|
+
if (TYPE & 1) string = string.replace(ltrim, '');
|
960
|
+
if (TYPE & 2) string = string.replace(rtrim, '');
|
961
|
+
return string;
|
962
|
+
};
|
963
|
+
};
|
964
|
+
|
965
|
+
var stringTrim = {
|
966
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
967
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
968
|
+
start: createMethod$3(1),
|
969
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
970
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
971
|
+
end: createMethod$3(2),
|
972
|
+
// `String.prototype.trim` method
|
973
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
974
|
+
trim: createMethod$3(3)
|
975
|
+
};
|
976
|
+
|
977
|
+
var trim = stringTrim.trim;
|
978
|
+
|
979
|
+
|
980
|
+
var nativeParseInt = global_1.parseInt;
|
981
|
+
var hex = /^[+-]?0[Xx]/;
|
982
|
+
var FORCED$1 = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
983
|
+
|
984
|
+
// `parseInt` method
|
985
|
+
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
986
|
+
var _parseInt = FORCED$1 ? function parseInt(string, radix) {
|
987
|
+
var S = trim(String(string));
|
988
|
+
return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
989
|
+
} : nativeParseInt;
|
990
|
+
|
991
|
+
// `parseInt` method
|
992
|
+
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
993
|
+
_export({ global: true, forced: parseInt != _parseInt }, {
|
994
|
+
parseInt: _parseInt
|
995
|
+
});
|
996
|
+
|
997
|
+
function _classCallCheck(instance, Constructor) {
|
998
|
+
if (!(instance instanceof Constructor)) {
|
999
|
+
throw new TypeError("Cannot call a class as a function");
|
1000
|
+
}
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
function _defineProperties(target, props) {
|
1004
|
+
for (var i = 0; i < props.length; i++) {
|
1005
|
+
var descriptor = props[i];
|
1006
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
1007
|
+
descriptor.configurable = true;
|
1008
|
+
if ("value" in descriptor) descriptor.writable = true;
|
1009
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
1014
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
1015
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
1016
|
+
return Constructor;
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
function _inherits(subClass, superClass) {
|
1020
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
1021
|
+
throw new TypeError("Super expression must either be null or a function");
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
1025
|
+
constructor: {
|
1026
|
+
value: subClass,
|
1027
|
+
writable: true,
|
1028
|
+
configurable: true
|
1029
|
+
}
|
1030
|
+
});
|
1031
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
function _getPrototypeOf(o) {
|
1035
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
1036
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
1037
|
+
};
|
1038
|
+
return _getPrototypeOf(o);
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
function _setPrototypeOf(o, p) {
|
1042
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
1043
|
+
o.__proto__ = p;
|
1044
|
+
return o;
|
1045
|
+
};
|
1046
|
+
|
1047
|
+
return _setPrototypeOf(o, p);
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
function _assertThisInitialized(self) {
|
1051
|
+
if (self === void 0) {
|
1052
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
return self;
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
function _possibleConstructorReturn(self, call) {
|
1059
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
1060
|
+
return call;
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
return _assertThisInitialized(self);
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
function _superPropBase(object, property) {
|
1067
|
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
1068
|
+
object = _getPrototypeOf(object);
|
1069
|
+
if (object === null) break;
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
return object;
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
function _get(target, property, receiver) {
|
1076
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
1077
|
+
_get = Reflect.get;
|
1078
|
+
} else {
|
1079
|
+
_get = function _get(target, property, receiver) {
|
1080
|
+
var base = _superPropBase(target, property);
|
1081
|
+
|
1082
|
+
if (!base) return;
|
1083
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
1084
|
+
|
1085
|
+
if (desc.get) {
|
1086
|
+
return desc.get.call(receiver);
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
return desc.value;
|
1090
|
+
};
|
1091
|
+
}
|
1092
|
+
|
1093
|
+
return _get(target, property, receiver || target);
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
function _slicedToArray(arr, i) {
|
1097
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
function _arrayWithHoles(arr) {
|
1101
|
+
if (Array.isArray(arr)) return arr;
|
1102
|
+
}
|
1103
|
+
|
1104
|
+
function _iterableToArrayLimit(arr, i) {
|
1105
|
+
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
1106
|
+
return;
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
var _arr = [];
|
1110
|
+
var _n = true;
|
1111
|
+
var _d = false;
|
1112
|
+
var _e = undefined;
|
1113
|
+
|
1114
|
+
try {
|
1115
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
1116
|
+
_arr.push(_s.value);
|
1117
|
+
|
1118
|
+
if (i && _arr.length === i) break;
|
1119
|
+
}
|
1120
|
+
} catch (err) {
|
1121
|
+
_d = true;
|
1122
|
+
_e = err;
|
1123
|
+
} finally {
|
1124
|
+
try {
|
1125
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
1126
|
+
} finally {
|
1127
|
+
if (_d) throw _e;
|
1128
|
+
}
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
return _arr;
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
function _nonIterableRest() {
|
1135
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
1136
|
+
}
|
1137
|
+
|
818
1138
|
/**
|
819
1139
|
* @author: Dennis Hernández
|
820
1140
|
* @webSite: http://djhvscf.github.io/Blog
|
821
|
-
* @
|
1141
|
+
* @update: https://github.com/wenzhixin
|
1142
|
+
* @version: v1.2.0
|
822
1143
|
*/
|
823
|
-
|
1144
|
+
|
1145
|
+
$.akottr.dragtable.prototype._restoreState = function (persistObj) {
|
1146
|
+
for (var _i = 0, _Object$entries = Object.entries(persistObj); _i < _Object$entries.length; _i++) {
|
1147
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
1148
|
+
field = _Object$entries$_i[0],
|
1149
|
+
value = _Object$entries$_i[1];
|
1150
|
+
|
1151
|
+
var $th = this.originalTable.el.find("th[data-field=\"".concat(field, "\"]"));
|
1152
|
+
this.originalTable.startIndex = $th.prevAll().length + 1;
|
1153
|
+
this.originalTable.endIndex = parseInt(value, 10) + 1;
|
1154
|
+
|
1155
|
+
this._bubbleCols();
|
1156
|
+
}
|
1157
|
+
}; // From MDN site, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
|
1158
|
+
|
824
1159
|
|
825
1160
|
var filterFn = function filterFn() {
|
826
1161
|
if (!Array.prototype.filter) {
|
@@ -846,7 +1181,7 @@
|
|
846
1181
|
var val = t[i]; // NOTE: Technically this should Object.defineProperty at
|
847
1182
|
// the next index, as push can be affected by
|
848
1183
|
// properties on Object.prototype and Array.prototype.
|
849
|
-
// But
|
1184
|
+
// But this method's new, and collisions should be
|
850
1185
|
// rare, so use the more-compatible alternative.
|
851
1186
|
|
852
1187
|
if (fun.call(thisArg, val, i, t)) {
|
@@ -871,145 +1206,198 @@
|
|
871
1206
|
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
872
1207
|
'reorder-column.bs.table': 'onReorderColumn'
|
873
1208
|
});
|
874
|
-
|
875
|
-
var _initHeader = BootstrapTable.prototype.initHeader;
|
876
|
-
var _toggleColumn = BootstrapTable.prototype._toggleColumn;
|
877
|
-
var _toggleView = BootstrapTable.prototype.toggleView;
|
878
|
-
var _resetView = BootstrapTable.prototype.resetView;
|
879
|
-
|
880
|
-
BootstrapTable.prototype.initHeader = function () {
|
881
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
882
|
-
args[_key] = arguments[_key];
|
883
|
-
}
|
1209
|
+
$.fn.bootstrapTable.methods.push('orderColumns');
|
884
1210
|
|
885
|
-
|
1211
|
+
$.BootstrapTable =
|
1212
|
+
/*#__PURE__*/
|
1213
|
+
function (_$$BootstrapTable) {
|
1214
|
+
_inherits(_class, _$$BootstrapTable);
|
886
1215
|
|
887
|
-
|
888
|
-
|
1216
|
+
function _class() {
|
1217
|
+
_classCallCheck(this, _class);
|
1218
|
+
|
1219
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
889
1220
|
}
|
890
1221
|
|
891
|
-
|
892
|
-
|
1222
|
+
_createClass(_class, [{
|
1223
|
+
key: "initHeader",
|
1224
|
+
value: function initHeader() {
|
1225
|
+
var _get2;
|
893
1226
|
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
}
|
1227
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1228
|
+
args[_key] = arguments[_key];
|
1229
|
+
}
|
898
1230
|
|
899
|
-
|
1231
|
+
(_get2 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get2, [this].concat(args));
|
900
1232
|
|
901
|
-
|
902
|
-
|
903
|
-
|
1233
|
+
if (!this.options.reorderableColumns) {
|
1234
|
+
return;
|
1235
|
+
}
|
904
1236
|
|
905
|
-
|
906
|
-
|
1237
|
+
this.makeRowsReorderable();
|
1238
|
+
}
|
1239
|
+
}, {
|
1240
|
+
key: "_toggleColumn",
|
1241
|
+
value: function _toggleColumn() {
|
1242
|
+
var _get3;
|
907
1243
|
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
}
|
1244
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
1245
|
+
args[_key2] = arguments[_key2];
|
1246
|
+
}
|
912
1247
|
|
913
|
-
|
1248
|
+
(_get3 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get3, [this].concat(args));
|
914
1249
|
|
915
|
-
|
916
|
-
|
917
|
-
|
1250
|
+
if (!this.options.reorderableColumns) {
|
1251
|
+
return;
|
1252
|
+
}
|
918
1253
|
|
919
|
-
|
920
|
-
|
921
|
-
}
|
1254
|
+
this.makeRowsReorderable();
|
1255
|
+
}
|
1256
|
+
}, {
|
1257
|
+
key: "toggleView",
|
1258
|
+
value: function toggleView() {
|
1259
|
+
var _get4;
|
922
1260
|
|
923
|
-
|
924
|
-
|
1261
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
1262
|
+
args[_key3] = arguments[_key3];
|
1263
|
+
}
|
925
1264
|
|
926
|
-
|
927
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
928
|
-
args[_key4] = arguments[_key4];
|
929
|
-
}
|
1265
|
+
(_get4 = _get(_getPrototypeOf(_class.prototype), "toggleView", this)).call.apply(_get4, [this].concat(args));
|
930
1266
|
|
931
|
-
|
1267
|
+
if (!this.options.reorderableColumns) {
|
1268
|
+
return;
|
1269
|
+
}
|
932
1270
|
|
933
|
-
|
934
|
-
|
935
|
-
|
1271
|
+
if (this.options.cardView) {
|
1272
|
+
return;
|
1273
|
+
}
|
936
1274
|
|
937
|
-
|
938
|
-
|
1275
|
+
this.makeRowsReorderable();
|
1276
|
+
}
|
1277
|
+
}, {
|
1278
|
+
key: "resetView",
|
1279
|
+
value: function resetView() {
|
1280
|
+
var _get5;
|
939
1281
|
|
940
|
-
|
941
|
-
|
1282
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
1283
|
+
args[_key4] = arguments[_key4];
|
1284
|
+
}
|
942
1285
|
|
943
|
-
|
944
|
-
$(this.$el).dragtable('destroy');
|
945
|
-
} catch (e) {//
|
946
|
-
}
|
1286
|
+
(_get5 = _get(_getPrototypeOf(_class.prototype), "resetView", this)).call.apply(_get5, [this].concat(args));
|
947
1287
|
|
948
|
-
|
949
|
-
|
950
|
-
dragaccept: that.options.dragaccept,
|
951
|
-
clickDelay: 200,
|
952
|
-
dragHandle: '.th-inner',
|
953
|
-
beforeStop: function beforeStop() {
|
954
|
-
var ths = [];
|
955
|
-
var formatters = [];
|
956
|
-
var columns = [];
|
957
|
-
var columnsHidden = [];
|
958
|
-
var columnIndex = -1;
|
959
|
-
var optionsColumns = [];
|
960
|
-
that.$header.find('th').each(function (i) {
|
961
|
-
ths.push($(this).data('field'));
|
962
|
-
formatters.push($(this).data('formatter'));
|
963
|
-
}); // Exist columns not shown
|
964
|
-
|
965
|
-
if (ths.length < that.columns.length) {
|
966
|
-
columnsHidden = that.columns.filter(function (column) {
|
967
|
-
return !column.visible;
|
968
|
-
});
|
969
|
-
|
970
|
-
for (var i = 0; i < columnsHidden.length; i++) {
|
971
|
-
ths.push(columnsHidden[i].field);
|
972
|
-
formatters.push(columnsHidden[i].formatter);
|
973
|
-
}
|
1288
|
+
if (!this.options.reorderableColumns) {
|
1289
|
+
return;
|
974
1290
|
}
|
975
1291
|
|
976
|
-
|
977
|
-
|
1292
|
+
this.makeRowsReorderable();
|
1293
|
+
}
|
1294
|
+
}, {
|
1295
|
+
key: "makeRowsReorderable",
|
1296
|
+
value: function makeRowsReorderable() {
|
1297
|
+
var _this = this;
|
978
1298
|
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
1299
|
+
var order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
1300
|
+
|
1301
|
+
try {
|
1302
|
+
$(this.$el).dragtable('destroy');
|
1303
|
+
} catch (e) {// do nothing
|
984
1304
|
}
|
985
1305
|
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
1306
|
+
$(this.$el).dragtable({
|
1307
|
+
maxMovingRows: this.options.maxMovingRows,
|
1308
|
+
dragaccept: this.options.dragaccept,
|
1309
|
+
clickDelay: 200,
|
1310
|
+
dragHandle: '.th-inner',
|
1311
|
+
restoreState: order ? order : this.columnsSortOrder,
|
1312
|
+
beforeStop: function beforeStop(table) {
|
1313
|
+
var sortOrder = {};
|
1314
|
+
table.el.find('th').each(function (i, el) {
|
1315
|
+
sortOrder[$(el).data('field')] = i;
|
1316
|
+
});
|
1317
|
+
_this.columnsSortOrder = sortOrder;
|
1318
|
+
|
1319
|
+
if (_this.options.cookie) {
|
1320
|
+
_this.persistReorderColumnsState(_this);
|
1321
|
+
}
|
1322
|
+
|
1323
|
+
var ths = [];
|
1324
|
+
var formatters = [];
|
1325
|
+
var columns = [];
|
1326
|
+
var columnsHidden = [];
|
1327
|
+
var columnIndex = -1;
|
1328
|
+
var optionsColumns = [];
|
1329
|
+
|
1330
|
+
_this.$header.find('th:not(.detail)').each(function (i) {
|
1331
|
+
ths.push($(this).data('field'));
|
1332
|
+
formatters.push($(this).data('formatter'));
|
1333
|
+
}); // Exist columns not shown
|
1334
|
+
|
1335
|
+
|
1336
|
+
if (ths.length < _this.columns.length) {
|
1337
|
+
columnsHidden = _this.columns.filter(function (column) {
|
1338
|
+
return !column.visible;
|
1339
|
+
});
|
1340
|
+
|
1341
|
+
for (var i = 0; i < columnsHidden.length; i++) {
|
1342
|
+
ths.push(columnsHidden[i].field);
|
1343
|
+
formatters.push(columnsHidden[i].formatter);
|
1344
|
+
}
|
997
1345
|
}
|
998
1346
|
|
999
|
-
|
1000
|
-
|
1347
|
+
for (var _i2 = 0; _i2 < ths.length; _i2++) {
|
1348
|
+
columnIndex = _this.fieldsColumnsIndex[ths[_i2]];
|
1349
|
+
|
1350
|
+
if (columnIndex !== -1) {
|
1351
|
+
_this.fieldsColumnsIndex[ths[_i2]] = _i2;
|
1352
|
+
_this.columns[columnIndex].fieldIndex = _i2;
|
1353
|
+
columns.push(_this.columns[columnIndex]);
|
1354
|
+
}
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
_this.columns = columns;
|
1358
|
+
filterFn(); // Support <IE9
|
1359
|
+
|
1360
|
+
$.each(_this.columns, function (i, column) {
|
1361
|
+
var found = false;
|
1362
|
+
var field = column.field;
|
1363
|
+
|
1364
|
+
_this.options.columns[0].filter(function (item) {
|
1365
|
+
if (!found && item['field'] === field) {
|
1366
|
+
optionsColumns.push(item);
|
1367
|
+
found = true;
|
1368
|
+
return false;
|
1369
|
+
}
|
1370
|
+
|
1371
|
+
return true;
|
1372
|
+
});
|
1373
|
+
});
|
1374
|
+
_this.options.columns[0] = optionsColumns;
|
1375
|
+
_this.header.fields = ths;
|
1376
|
+
_this.header.formatters = formatters;
|
1377
|
+
|
1378
|
+
_this.initHeader();
|
1379
|
+
|
1380
|
+
_this.initToolbar();
|
1381
|
+
|
1382
|
+
_this.initSearchText();
|
1383
|
+
|
1384
|
+
_this.initBody();
|
1385
|
+
|
1386
|
+
_this.resetView();
|
1387
|
+
|
1388
|
+
_this.trigger('reorder-column', ths);
|
1389
|
+
}
|
1001
1390
|
});
|
1002
|
-
that.options.columns[0] = optionsColumns;
|
1003
|
-
that.header.fields = ths;
|
1004
|
-
that.header.formatters = formatters;
|
1005
|
-
that.initHeader();
|
1006
|
-
that.initToolbar();
|
1007
|
-
that.initSearchText();
|
1008
|
-
that.initBody();
|
1009
|
-
that.resetView();
|
1010
|
-
that.trigger('reorder-column', ths);
|
1011
1391
|
}
|
1012
|
-
}
|
1013
|
-
|
1392
|
+
}, {
|
1393
|
+
key: "orderColumns",
|
1394
|
+
value: function orderColumns(order) {
|
1395
|
+
this.columnsSortOrder = order;
|
1396
|
+
this.makeRowsReorderable();
|
1397
|
+
}
|
1398
|
+
}]);
|
1399
|
+
|
1400
|
+
return _class;
|
1401
|
+
}($.BootstrapTable);
|
1014
1402
|
|
1015
|
-
}));
|
1403
|
+
})));
|