bootstrap-table-rails 1.15.4 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +147 -54
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +876 -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 +66 -11
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1347 -727
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +254 -88
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +139 -66
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1309 -258
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +139 -64
- data/vendor/assets/javascripts/bootstrap-table/extensions/{accent-neutralise/bootstrap-table-accent-neutralise.js → custom-view/bootstrap-table-custom-view.js} +582 -752
- 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 +409 -210
- 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 +1369 -904
- 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.js +494 -107
- 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 +217 -73
- 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 +374 -138
- 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 +388 -148
- 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 +209 -76
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +490 -202
- 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 +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +771 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +114 -63
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +93 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +107 -57
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +93 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +96 -45
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +771 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +771 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +92 -42
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +768 -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 +80 -12
- 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 +79 -14
- 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 +74 -10
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +165 -67
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +80 -14
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +165 -67
- metadata +13 -16
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.css +0 -3
- 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/group-by/bootstrap-table-group-by.css +0 -53
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +0 -257
- data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +0 -105
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +0 -85
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.css +0 -17
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +0 -143
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
- data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +0 -341
- data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +0 -142
@@ -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,31 +757,6 @@
|
|
652
757
|
findIndex: createMethod$1(6)
|
653
758
|
};
|
654
759
|
|
655
|
-
var SPECIES$1 = wellKnownSymbol('species');
|
656
|
-
|
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
|
-
|
668
|
-
var $filter = arrayIteration.filter;
|
669
|
-
|
670
|
-
|
671
|
-
// `Array.prototype.filter` method
|
672
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
673
|
-
// with adding support of @@species
|
674
|
-
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
|
675
|
-
filter: function filter(callbackfn /* , thisArg */) {
|
676
|
-
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
677
|
-
}
|
678
|
-
});
|
679
|
-
|
680
760
|
// `Object.keys` method
|
681
761
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
682
762
|
var objectKeys = Object.keys || function keys(O) {
|
@@ -697,56 +777,87 @@
|
|
697
777
|
|
698
778
|
var html = getBuiltIn('document', 'documentElement');
|
699
779
|
|
780
|
+
var GT = '>';
|
781
|
+
var LT = '<';
|
782
|
+
var PROTOTYPE = 'prototype';
|
783
|
+
var SCRIPT = 'script';
|
700
784
|
var IE_PROTO = sharedKey('IE_PROTO');
|
701
785
|
|
702
|
-
var
|
703
|
-
|
786
|
+
var EmptyConstructor = function () { /* empty */ };
|
787
|
+
|
788
|
+
var scriptTag = function (content) {
|
789
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
790
|
+
};
|
791
|
+
|
792
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
793
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
794
|
+
activeXDocument.write(scriptTag(''));
|
795
|
+
activeXDocument.close();
|
796
|
+
var temp = activeXDocument.parentWindow.Object;
|
797
|
+
activeXDocument = null; // avoid memory leak
|
798
|
+
return temp;
|
799
|
+
};
|
704
800
|
|
705
801
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
706
|
-
var
|
802
|
+
var NullProtoObjectViaIFrame = function () {
|
707
803
|
// Thrash, waste and sodomy: IE GC bug
|
708
804
|
var iframe = documentCreateElement('iframe');
|
709
|
-
var
|
710
|
-
var lt = '<';
|
711
|
-
var script = 'script';
|
712
|
-
var gt = '>';
|
713
|
-
var js = 'java' + script + ':';
|
805
|
+
var JS = 'java' + SCRIPT + ':';
|
714
806
|
var iframeDocument;
|
715
807
|
iframe.style.display = 'none';
|
716
808
|
html.appendChild(iframe);
|
717
|
-
|
809
|
+
// https://github.com/zloirock/core-js/issues/475
|
810
|
+
iframe.src = String(JS);
|
718
811
|
iframeDocument = iframe.contentWindow.document;
|
719
812
|
iframeDocument.open();
|
720
|
-
iframeDocument.write(
|
813
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
721
814
|
iframeDocument.close();
|
722
|
-
|
723
|
-
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
724
|
-
return createDict();
|
815
|
+
return iframeDocument.F;
|
725
816
|
};
|
726
817
|
|
818
|
+
// Check for document.domain and active x support
|
819
|
+
// No need to use active x approach when document.domain is not set
|
820
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
821
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
822
|
+
// avoid IE GC bug
|
823
|
+
var activeXDocument;
|
824
|
+
var NullProtoObject = function () {
|
825
|
+
try {
|
826
|
+
/* global ActiveXObject */
|
827
|
+
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
828
|
+
} catch (error) { /* ignore */ }
|
829
|
+
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
830
|
+
var length = enumBugKeys.length;
|
831
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
832
|
+
return NullProtoObject();
|
833
|
+
};
|
834
|
+
|
835
|
+
hiddenKeys[IE_PROTO] = true;
|
836
|
+
|
727
837
|
// `Object.create` method
|
728
838
|
// https://tc39.github.io/ecma262/#sec-object.create
|
729
839
|
var objectCreate = Object.create || function create(O, Properties) {
|
730
840
|
var result;
|
731
841
|
if (O !== null) {
|
732
|
-
|
733
|
-
result = new
|
734
|
-
|
842
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
843
|
+
result = new EmptyConstructor();
|
844
|
+
EmptyConstructor[PROTOTYPE] = null;
|
735
845
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
736
846
|
result[IE_PROTO] = O;
|
737
|
-
} else result =
|
847
|
+
} else result = NullProtoObject();
|
738
848
|
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
739
849
|
};
|
740
850
|
|
741
|
-
hiddenKeys[IE_PROTO] = true;
|
742
|
-
|
743
851
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
744
852
|
var ArrayPrototype = Array.prototype;
|
745
853
|
|
746
854
|
// Array.prototype[@@unscopables]
|
747
855
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
748
856
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
749
|
-
|
857
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
858
|
+
configurable: true,
|
859
|
+
value: objectCreate(null)
|
860
|
+
});
|
750
861
|
}
|
751
862
|
|
752
863
|
// add a key to Array.prototype[@@unscopables]
|
@@ -754,19 +865,25 @@
|
|
754
865
|
ArrayPrototype[UNSCOPABLES][key] = true;
|
755
866
|
};
|
756
867
|
|
757
|
-
var $
|
868
|
+
var $find = arrayIteration.find;
|
869
|
+
|
758
870
|
|
871
|
+
var FIND = 'find';
|
872
|
+
var SKIPS_HOLES = true;
|
759
873
|
|
760
|
-
//
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
874
|
+
// Shouldn't skip holes
|
875
|
+
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
876
|
+
|
877
|
+
// `Array.prototype.find` method
|
878
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
879
|
+
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
880
|
+
find: function find(callbackfn /* , that = undefined */) {
|
881
|
+
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
765
882
|
}
|
766
883
|
});
|
767
884
|
|
768
885
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
769
|
-
addToUnscopables(
|
886
|
+
addToUnscopables(FIND);
|
770
887
|
|
771
888
|
var sloppyArrayMethod = function (METHOD_NAME, argument) {
|
772
889
|
var method = [][METHOD_NAME];
|
@@ -776,150 +893,51 @@
|
|
776
893
|
});
|
777
894
|
};
|
778
895
|
|
779
|
-
var
|
780
|
-
|
896
|
+
var nativeJoin = [].join;
|
781
897
|
|
782
|
-
var
|
898
|
+
var ES3_STRINGS = indexedObject != Object;
|
899
|
+
var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
|
783
900
|
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
|
790
|
-
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
791
|
-
return NEGATIVE_ZERO
|
792
|
-
// convert -0 to +0
|
793
|
-
? nativeIndexOf.apply(this, arguments) || 0
|
794
|
-
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
901
|
+
// `Array.prototype.join` method
|
902
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.join
|
903
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
|
904
|
+
join: function join(separator) {
|
905
|
+
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
795
906
|
}
|
796
907
|
});
|
797
908
|
|
798
|
-
var
|
909
|
+
var SPECIES$2 = wellKnownSymbol('species');
|
910
|
+
var nativeSlice = [].slice;
|
911
|
+
var max$1 = Math.max;
|
799
912
|
|
800
|
-
// `
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
var
|
806
|
-
var
|
807
|
-
var
|
808
|
-
var
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
913
|
+
// `Array.prototype.slice` method
|
914
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
|
915
|
+
// fallback for not array-like ES3 strings and DOM objects
|
916
|
+
_export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
|
917
|
+
slice: function slice(start, end) {
|
918
|
+
var O = toIndexedObject(this);
|
919
|
+
var length = toLength(O.length);
|
920
|
+
var k = toAbsoluteIndex(start, length);
|
921
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
922
|
+
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
923
|
+
var Constructor, result, n;
|
924
|
+
if (isArray(O)) {
|
925
|
+
Constructor = O.constructor;
|
926
|
+
// cross-realm fallback
|
927
|
+
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
|
928
|
+
Constructor = undefined;
|
929
|
+
} else if (isObject(Constructor)) {
|
930
|
+
Constructor = Constructor[SPECIES$2];
|
931
|
+
if (Constructor === null) Constructor = undefined;
|
932
|
+
}
|
933
|
+
if (Constructor === Array || Constructor === undefined) {
|
934
|
+
return nativeSlice.call(O, k, fin);
|
813
935
|
}
|
814
936
|
}
|
937
|
+
result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
|
938
|
+
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
939
|
+
result.length = n;
|
815
940
|
return result;
|
816
|
-
};
|
817
|
-
};
|
818
|
-
|
819
|
-
var objectToArray = {
|
820
|
-
// `Object.entries` method
|
821
|
-
// https://tc39.github.io/ecma262/#sec-object.entries
|
822
|
-
entries: createMethod$2(true),
|
823
|
-
// `Object.values` method
|
824
|
-
// https://tc39.github.io/ecma262/#sec-object.values
|
825
|
-
values: createMethod$2(false)
|
826
|
-
};
|
827
|
-
|
828
|
-
var $entries = objectToArray.entries;
|
829
|
-
|
830
|
-
// `Object.entries` method
|
831
|
-
// https://tc39.github.io/ecma262/#sec-object.entries
|
832
|
-
_export({ target: 'Object', stat: true }, {
|
833
|
-
entries: function entries(O) {
|
834
|
-
return $entries(O);
|
835
|
-
}
|
836
|
-
});
|
837
|
-
|
838
|
-
// a string of all valid unicode whitespaces
|
839
|
-
// eslint-disable-next-line max-len
|
840
|
-
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';
|
841
|
-
|
842
|
-
var whitespace = '[' + whitespaces + ']';
|
843
|
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
844
|
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
845
|
-
|
846
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
847
|
-
var createMethod$3 = function (TYPE) {
|
848
|
-
return function ($this) {
|
849
|
-
var string = String(requireObjectCoercible($this));
|
850
|
-
if (TYPE & 1) string = string.replace(ltrim, '');
|
851
|
-
if (TYPE & 2) string = string.replace(rtrim, '');
|
852
|
-
return string;
|
853
|
-
};
|
854
|
-
};
|
855
|
-
|
856
|
-
var stringTrim = {
|
857
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
858
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
859
|
-
start: createMethod$3(1),
|
860
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
861
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
862
|
-
end: createMethod$3(2),
|
863
|
-
// `String.prototype.trim` method
|
864
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
865
|
-
trim: createMethod$3(3)
|
866
|
-
};
|
867
|
-
|
868
|
-
var trim = stringTrim.trim;
|
869
|
-
|
870
|
-
|
871
|
-
var nativeParseInt = global_1.parseInt;
|
872
|
-
var hex = /^[+-]?0[Xx]/;
|
873
|
-
var FORCED = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
874
|
-
|
875
|
-
// `parseInt` method
|
876
|
-
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
877
|
-
var _parseInt = FORCED ? function parseInt(string, radix) {
|
878
|
-
var S = trim(String(string));
|
879
|
-
return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
880
|
-
} : nativeParseInt;
|
881
|
-
|
882
|
-
// `parseInt` method
|
883
|
-
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
884
|
-
_export({ global: true, forced: parseInt != _parseInt }, {
|
885
|
-
parseInt: _parseInt
|
886
|
-
});
|
887
|
-
|
888
|
-
var MATCH = wellKnownSymbol('match');
|
889
|
-
|
890
|
-
// `IsRegExp` abstract operation
|
891
|
-
// https://tc39.github.io/ecma262/#sec-isregexp
|
892
|
-
var isRegexp = function (it) {
|
893
|
-
var isRegExp;
|
894
|
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
895
|
-
};
|
896
|
-
|
897
|
-
var notARegexp = function (it) {
|
898
|
-
if (isRegexp(it)) {
|
899
|
-
throw TypeError("The method doesn't accept regular expressions");
|
900
|
-
} return it;
|
901
|
-
};
|
902
|
-
|
903
|
-
var MATCH$1 = wellKnownSymbol('match');
|
904
|
-
|
905
|
-
var correctIsRegexpLogic = function (METHOD_NAME) {
|
906
|
-
var regexp = /./;
|
907
|
-
try {
|
908
|
-
'/./'[METHOD_NAME](regexp);
|
909
|
-
} catch (e) {
|
910
|
-
try {
|
911
|
-
regexp[MATCH$1] = false;
|
912
|
-
return '/./'[METHOD_NAME](regexp);
|
913
|
-
} catch (f) { /* empty */ }
|
914
|
-
} return false;
|
915
|
-
};
|
916
|
-
|
917
|
-
// `String.prototype.includes` method
|
918
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
919
|
-
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
920
|
-
includes: function includes(searchString /* , position = 0 */) {
|
921
|
-
return !!~String(requireObjectCoercible(this))
|
922
|
-
.indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
923
941
|
}
|
924
942
|
});
|
925
943
|
|
@@ -937,6 +955,31 @@
|
|
937
955
|
return result;
|
938
956
|
};
|
939
957
|
|
958
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
959
|
+
// so we use an intermediate function.
|
960
|
+
function RE(s, f) {
|
961
|
+
return RegExp(s, f);
|
962
|
+
}
|
963
|
+
|
964
|
+
var UNSUPPORTED_Y = fails(function () {
|
965
|
+
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
966
|
+
var re = RE('a', 'y');
|
967
|
+
re.lastIndex = 2;
|
968
|
+
return re.exec('abcd') != null;
|
969
|
+
});
|
970
|
+
|
971
|
+
var BROKEN_CARET = fails(function () {
|
972
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
973
|
+
var re = RE('^r', 'gy');
|
974
|
+
re.lastIndex = 2;
|
975
|
+
return re.exec('str') != null;
|
976
|
+
});
|
977
|
+
|
978
|
+
var regexpStickyHelpers = {
|
979
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
980
|
+
BROKEN_CARET: BROKEN_CARET
|
981
|
+
};
|
982
|
+
|
940
983
|
var nativeExec = RegExp.prototype.exec;
|
941
984
|
// This always refers to the native implementation, because the
|
942
985
|
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
@@ -953,24 +996,56 @@
|
|
953
996
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
954
997
|
})();
|
955
998
|
|
999
|
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
1000
|
+
|
956
1001
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
957
1002
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
958
1003
|
|
959
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
1004
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
960
1005
|
|
961
1006
|
if (PATCH) {
|
962
1007
|
patchedExec = function exec(str) {
|
963
1008
|
var re = this;
|
964
1009
|
var lastIndex, reCopy, match, i;
|
1010
|
+
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
1011
|
+
var flags = regexpFlags.call(re);
|
1012
|
+
var source = re.source;
|
1013
|
+
var charsAdded = 0;
|
1014
|
+
var strCopy = str;
|
1015
|
+
|
1016
|
+
if (sticky) {
|
1017
|
+
flags = flags.replace('y', '');
|
1018
|
+
if (flags.indexOf('g') === -1) {
|
1019
|
+
flags += 'g';
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
strCopy = String(str).slice(re.lastIndex);
|
1023
|
+
// Support anchored sticky behavior.
|
1024
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
1025
|
+
source = '(?: ' + source + ')';
|
1026
|
+
strCopy = ' ' + strCopy;
|
1027
|
+
charsAdded++;
|
1028
|
+
}
|
1029
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
1030
|
+
// simulate the 'y' flag.
|
1031
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
1032
|
+
}
|
965
1033
|
|
966
1034
|
if (NPCG_INCLUDED) {
|
967
|
-
reCopy = new RegExp('^' +
|
1035
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
968
1036
|
}
|
969
1037
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
970
1038
|
|
971
|
-
match = nativeExec.call(re,
|
1039
|
+
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
972
1040
|
|
973
|
-
if (
|
1041
|
+
if (sticky) {
|
1042
|
+
if (match) {
|
1043
|
+
match.input = match.input.slice(charsAdded);
|
1044
|
+
match[0] = match[0].slice(charsAdded);
|
1045
|
+
match.index = re.lastIndex;
|
1046
|
+
re.lastIndex += match[0].length;
|
1047
|
+
} else re.lastIndex = 0;
|
1048
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
974
1049
|
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
975
1050
|
}
|
976
1051
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
@@ -989,7 +1064,11 @@
|
|
989
1064
|
|
990
1065
|
var regexpExec = patchedExec;
|
991
1066
|
|
992
|
-
|
1067
|
+
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
1068
|
+
exec: regexpExec
|
1069
|
+
});
|
1070
|
+
|
1071
|
+
var SPECIES$3 = wellKnownSymbol('species');
|
993
1072
|
|
994
1073
|
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
995
1074
|
// #replace needs built-in support for named groups.
|
@@ -1004,6 +1083,12 @@
|
|
1004
1083
|
return ''.replace(re, '$<a>') !== '7';
|
1005
1084
|
});
|
1006
1085
|
|
1086
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1087
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1088
|
+
var REPLACE_KEEPS_$0 = (function () {
|
1089
|
+
return 'a'.replace(/./, '$0') === '$0';
|
1090
|
+
})();
|
1091
|
+
|
1007
1092
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1008
1093
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1009
1094
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
@@ -1028,15 +1113,22 @@
|
|
1028
1113
|
// Symbol-named RegExp methods call .exec
|
1029
1114
|
var execCalled = false;
|
1030
1115
|
var re = /a/;
|
1031
|
-
re.exec = function () { execCalled = true; return null; };
|
1032
1116
|
|
1033
1117
|
if (KEY === 'split') {
|
1118
|
+
// We can't use real regex here since it causes deoptimization
|
1119
|
+
// and serious performance degradation in V8
|
1120
|
+
// https://github.com/zloirock/core-js/issues/306
|
1121
|
+
re = {};
|
1034
1122
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
1035
1123
|
// a new one. We need to return the patched regex when creating the new one.
|
1036
1124
|
re.constructor = {};
|
1037
|
-
re.constructor[SPECIES$
|
1125
|
+
re.constructor[SPECIES$3] = function () { return re; };
|
1126
|
+
re.flags = '';
|
1127
|
+
re[SYMBOL] = /./[SYMBOL];
|
1038
1128
|
}
|
1039
1129
|
|
1130
|
+
re.exec = function () { execCalled = true; return null; };
|
1131
|
+
|
1040
1132
|
re[SYMBOL]('');
|
1041
1133
|
return !execCalled;
|
1042
1134
|
});
|
@@ -1044,7 +1136,7 @@
|
|
1044
1136
|
if (
|
1045
1137
|
!DELEGATES_TO_SYMBOL ||
|
1046
1138
|
!DELEGATES_TO_EXEC ||
|
1047
|
-
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
1139
|
+
(KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
|
1048
1140
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1049
1141
|
) {
|
1050
1142
|
var nativeRegExpMethod = /./[SYMBOL];
|
@@ -1059,7 +1151,7 @@
|
|
1059
1151
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
1060
1152
|
}
|
1061
1153
|
return { done: false };
|
1062
|
-
});
|
1154
|
+
}, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
|
1063
1155
|
var stringMethod = methods[0];
|
1064
1156
|
var regexMethod = methods[1];
|
1065
1157
|
|
@@ -1072,12 +1164,32 @@
|
|
1072
1164
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1073
1165
|
: function (string) { return regexMethod.call(string, this); }
|
1074
1166
|
);
|
1075
|
-
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
1076
1167
|
}
|
1168
|
+
|
1169
|
+
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1170
|
+
};
|
1171
|
+
|
1172
|
+
var MATCH = wellKnownSymbol('match');
|
1173
|
+
|
1174
|
+
// `IsRegExp` abstract operation
|
1175
|
+
// https://tc39.github.io/ecma262/#sec-isregexp
|
1176
|
+
var isRegexp = function (it) {
|
1177
|
+
var isRegExp;
|
1178
|
+
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1179
|
+
};
|
1180
|
+
|
1181
|
+
var SPECIES$4 = wellKnownSymbol('species');
|
1182
|
+
|
1183
|
+
// `SpeciesConstructor` abstract operation
|
1184
|
+
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
1185
|
+
var speciesConstructor = function (O, defaultConstructor) {
|
1186
|
+
var C = anObject(O).constructor;
|
1187
|
+
var S;
|
1188
|
+
return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S);
|
1077
1189
|
};
|
1078
1190
|
|
1079
1191
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
1080
|
-
var createMethod$
|
1192
|
+
var createMethod$2 = function (CONVERT_TO_STRING) {
|
1081
1193
|
return function ($this, pos) {
|
1082
1194
|
var S = String(requireObjectCoercible($this));
|
1083
1195
|
var position = toInteger(pos);
|
@@ -1095,10 +1207,10 @@
|
|
1095
1207
|
var stringMultibyte = {
|
1096
1208
|
// `String.prototype.codePointAt` method
|
1097
1209
|
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1098
|
-
codeAt: createMethod$
|
1210
|
+
codeAt: createMethod$2(false),
|
1099
1211
|
// `String.prototype.at` method
|
1100
1212
|
// https://github.com/mathiasbynens/String.prototype.at
|
1101
|
-
charAt: createMethod$
|
1213
|
+
charAt: createMethod$2(true)
|
1102
1214
|
};
|
1103
1215
|
|
1104
1216
|
var charAt = stringMultibyte.charAt;
|
@@ -1128,122 +1240,128 @@
|
|
1128
1240
|
return regexpExec.call(R, S);
|
1129
1241
|
};
|
1130
1242
|
|
1131
|
-
var
|
1243
|
+
var arrayPush = [].push;
|
1132
1244
|
var min$2 = Math.min;
|
1133
|
-
var
|
1134
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
1135
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
1245
|
+
var MAX_UINT32 = 0xFFFFFFFF;
|
1136
1246
|
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1247
|
+
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
1248
|
+
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
|
1249
|
+
|
1250
|
+
// @@split logic
|
1251
|
+
fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
|
1252
|
+
var internalSplit;
|
1253
|
+
if (
|
1254
|
+
'abbc'.split(/(b)*/)[1] == 'c' ||
|
1255
|
+
'test'.split(/(?:)/, -1).length != 4 ||
|
1256
|
+
'ab'.split(/(?:ab)*/).length != 2 ||
|
1257
|
+
'.'.split(/(.?)(.?)/).length != 4 ||
|
1258
|
+
'.'.split(/()()/).length > 1 ||
|
1259
|
+
''.split(/.?/).length
|
1260
|
+
) {
|
1261
|
+
// based on es5-shim implementation, need to rework it
|
1262
|
+
internalSplit = function (separator, limit) {
|
1263
|
+
var string = String(requireObjectCoercible(this));
|
1264
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1265
|
+
if (lim === 0) return [];
|
1266
|
+
if (separator === undefined) return [string];
|
1267
|
+
// If `separator` is not a regex, use native split
|
1268
|
+
if (!isRegexp(separator)) {
|
1269
|
+
return nativeSplit.call(string, separator, lim);
|
1270
|
+
}
|
1271
|
+
var output = [];
|
1272
|
+
var flags = (separator.ignoreCase ? 'i' : '') +
|
1273
|
+
(separator.multiline ? 'm' : '') +
|
1274
|
+
(separator.unicode ? 'u' : '') +
|
1275
|
+
(separator.sticky ? 'y' : '');
|
1276
|
+
var lastLastIndex = 0;
|
1277
|
+
// Make `global` and avoid `lastIndex` issues by working with a copy
|
1278
|
+
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
1279
|
+
var match, lastIndex, lastLength;
|
1280
|
+
while (match = regexpExec.call(separatorCopy, string)) {
|
1281
|
+
lastIndex = separatorCopy.lastIndex;
|
1282
|
+
if (lastIndex > lastLastIndex) {
|
1283
|
+
output.push(string.slice(lastLastIndex, match.index));
|
1284
|
+
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
1285
|
+
lastLength = match[0].length;
|
1286
|
+
lastLastIndex = lastIndex;
|
1287
|
+
if (output.length >= lim) break;
|
1288
|
+
}
|
1289
|
+
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
1290
|
+
}
|
1291
|
+
if (lastLastIndex === string.length) {
|
1292
|
+
if (lastLength || !separatorCopy.test('')) output.push('');
|
1293
|
+
} else output.push(string.slice(lastLastIndex));
|
1294
|
+
return output.length > lim ? output.slice(0, lim) : output;
|
1295
|
+
};
|
1296
|
+
// Chakra, V8
|
1297
|
+
} else if ('0'.split(undefined, 0).length) {
|
1298
|
+
internalSplit = function (separator, limit) {
|
1299
|
+
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
1300
|
+
};
|
1301
|
+
} else internalSplit = nativeSplit;
|
1140
1302
|
|
1141
|
-
// @@replace logic
|
1142
|
-
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
1143
1303
|
return [
|
1144
|
-
// `String.prototype.
|
1145
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.
|
1146
|
-
function
|
1304
|
+
// `String.prototype.split` method
|
1305
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.split
|
1306
|
+
function split(separator, limit) {
|
1147
1307
|
var O = requireObjectCoercible(this);
|
1148
|
-
var
|
1149
|
-
return
|
1150
|
-
?
|
1151
|
-
:
|
1308
|
+
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
1309
|
+
return splitter !== undefined
|
1310
|
+
? splitter.call(separator, O, limit)
|
1311
|
+
: internalSplit.call(String(O), separator, limit);
|
1152
1312
|
},
|
1153
|
-
// `RegExp.prototype[@@
|
1154
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@
|
1155
|
-
|
1156
|
-
|
1313
|
+
// `RegExp.prototype[@@split]` method
|
1314
|
+
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
|
1315
|
+
//
|
1316
|
+
// NOTE: This cannot be properly polyfilled in engines that don't support
|
1317
|
+
// the 'y' flag.
|
1318
|
+
function (regexp, limit) {
|
1319
|
+
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
|
1157
1320
|
if (res.done) return res.value;
|
1158
1321
|
|
1159
1322
|
var rx = anObject(regexp);
|
1160
1323
|
var S = String(this);
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
var matched = String(result[0]);
|
1188
|
-
var position = max$1(min$2(toInteger(result.index), S.length), 0);
|
1189
|
-
var captures = [];
|
1190
|
-
// NOTE: This is equivalent to
|
1191
|
-
// captures = result.slice(1).map(maybeToString)
|
1192
|
-
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1193
|
-
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1194
|
-
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1195
|
-
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
1196
|
-
var namedCaptures = result.groups;
|
1197
|
-
if (functionalReplace) {
|
1198
|
-
var replacerArgs = [matched].concat(captures, position, S);
|
1199
|
-
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
1200
|
-
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
1324
|
+
var C = speciesConstructor(rx, RegExp);
|
1325
|
+
|
1326
|
+
var unicodeMatching = rx.unicode;
|
1327
|
+
var flags = (rx.ignoreCase ? 'i' : '') +
|
1328
|
+
(rx.multiline ? 'm' : '') +
|
1329
|
+
(rx.unicode ? 'u' : '') +
|
1330
|
+
(SUPPORTS_Y ? 'y' : 'g');
|
1331
|
+
|
1332
|
+
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
1333
|
+
// simulate the 'y' flag.
|
1334
|
+
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
1335
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1336
|
+
if (lim === 0) return [];
|
1337
|
+
if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
|
1338
|
+
var p = 0;
|
1339
|
+
var q = 0;
|
1340
|
+
var A = [];
|
1341
|
+
while (q < S.length) {
|
1342
|
+
splitter.lastIndex = SUPPORTS_Y ? q : 0;
|
1343
|
+
var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
|
1344
|
+
var e;
|
1345
|
+
if (
|
1346
|
+
z === null ||
|
1347
|
+
(e = min$2(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
|
1348
|
+
) {
|
1349
|
+
q = advanceStringIndex(S, q, unicodeMatching);
|
1201
1350
|
} else {
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1351
|
+
A.push(S.slice(p, q));
|
1352
|
+
if (A.length === lim) return A;
|
1353
|
+
for (var i = 1; i <= z.length - 1; i++) {
|
1354
|
+
A.push(z[i]);
|
1355
|
+
if (A.length === lim) return A;
|
1356
|
+
}
|
1357
|
+
q = p = e;
|
1207
1358
|
}
|
1208
1359
|
}
|
1209
|
-
|
1360
|
+
A.push(S.slice(p));
|
1361
|
+
return A;
|
1210
1362
|
}
|
1211
1363
|
];
|
1212
|
-
|
1213
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
1214
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
1215
|
-
var tailPos = position + matched.length;
|
1216
|
-
var m = captures.length;
|
1217
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1218
|
-
if (namedCaptures !== undefined) {
|
1219
|
-
namedCaptures = toObject(namedCaptures);
|
1220
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
1221
|
-
}
|
1222
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
1223
|
-
var capture;
|
1224
|
-
switch (ch.charAt(0)) {
|
1225
|
-
case '$': return '$';
|
1226
|
-
case '&': return matched;
|
1227
|
-
case '`': return str.slice(0, position);
|
1228
|
-
case "'": return str.slice(tailPos);
|
1229
|
-
case '<':
|
1230
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
1231
|
-
break;
|
1232
|
-
default: // \d\d?
|
1233
|
-
var n = +ch;
|
1234
|
-
if (n === 0) return match;
|
1235
|
-
if (n > m) {
|
1236
|
-
var f = floor$1(n / 10);
|
1237
|
-
if (f === 0) return match;
|
1238
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1239
|
-
return match;
|
1240
|
-
}
|
1241
|
-
capture = captures[n - 1];
|
1242
|
-
}
|
1243
|
-
return capture === undefined ? '' : capture;
|
1244
|
-
});
|
1245
|
-
}
|
1246
|
-
});
|
1364
|
+
}, !SUPPORTS_Y);
|
1247
1365
|
|
1248
1366
|
function _classCallCheck(instance, Constructor) {
|
1249
1367
|
if (!(instance instanceof Constructor)) {
|
@@ -1344,332 +1462,45 @@
|
|
1344
1462
|
return _get(target, property, receiver || target);
|
1345
1463
|
}
|
1346
1464
|
|
1347
|
-
function _slicedToArray(arr, i) {
|
1348
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
1349
|
-
}
|
1350
|
-
|
1351
|
-
function _arrayWithHoles(arr) {
|
1352
|
-
if (Array.isArray(arr)) return arr;
|
1353
|
-
}
|
1354
|
-
|
1355
|
-
function _iterableToArrayLimit(arr, i) {
|
1356
|
-
var _arr = [];
|
1357
|
-
var _n = true;
|
1358
|
-
var _d = false;
|
1359
|
-
var _e = undefined;
|
1360
|
-
|
1361
|
-
try {
|
1362
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
1363
|
-
_arr.push(_s.value);
|
1364
|
-
|
1365
|
-
if (i && _arr.length === i) break;
|
1366
|
-
}
|
1367
|
-
} catch (err) {
|
1368
|
-
_d = true;
|
1369
|
-
_e = err;
|
1370
|
-
} finally {
|
1371
|
-
try {
|
1372
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
1373
|
-
} finally {
|
1374
|
-
if (_d) throw _e;
|
1375
|
-
}
|
1376
|
-
}
|
1377
|
-
|
1378
|
-
return _arr;
|
1379
|
-
}
|
1380
|
-
|
1381
|
-
function _nonIterableRest() {
|
1382
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
1383
|
-
}
|
1384
|
-
|
1385
1465
|
/**
|
1386
|
-
* @author:
|
1387
|
-
* @
|
1388
|
-
* @update: zhixin wen <wenzhixin2010@gmail.com>
|
1466
|
+
* @author: Dustin Utecht
|
1467
|
+
* @github: https://github.com/UtechtDustin
|
1389
1468
|
*/
|
1390
1469
|
|
1391
|
-
var
|
1392
|
-
var defaultAccentsDiacritics = [{
|
1393
|
-
base: 'A',
|
1394
|
-
letters: "A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"
|
1395
|
-
}, {
|
1396
|
-
base: 'AA',
|
1397
|
-
letters: "\uA732"
|
1398
|
-
}, {
|
1399
|
-
base: 'AE',
|
1400
|
-
letters: "\xC6\u01FC\u01E2"
|
1401
|
-
}, {
|
1402
|
-
base: 'AO',
|
1403
|
-
letters: "\uA734"
|
1404
|
-
}, {
|
1405
|
-
base: 'AU',
|
1406
|
-
letters: "\uA736"
|
1407
|
-
}, {
|
1408
|
-
base: 'AV',
|
1409
|
-
letters: "\uA738\uA73A"
|
1410
|
-
}, {
|
1411
|
-
base: 'AY',
|
1412
|
-
letters: "\uA73C"
|
1413
|
-
}, {
|
1414
|
-
base: 'B',
|
1415
|
-
letters: "B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"
|
1416
|
-
}, {
|
1417
|
-
base: 'C',
|
1418
|
-
letters: "C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"
|
1419
|
-
}, {
|
1420
|
-
base: 'D',
|
1421
|
-
letters: "D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"
|
1422
|
-
}, {
|
1423
|
-
base: 'DZ',
|
1424
|
-
letters: "\u01F1\u01C4"
|
1425
|
-
}, {
|
1426
|
-
base: 'Dz',
|
1427
|
-
letters: "\u01F2\u01C5"
|
1428
|
-
}, {
|
1429
|
-
base: 'E',
|
1430
|
-
letters: "E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"
|
1431
|
-
}, {
|
1432
|
-
base: 'F',
|
1433
|
-
letters: "F\u24BB\uFF26\u1E1E\u0191\uA77B"
|
1434
|
-
}, {
|
1435
|
-
base: 'G',
|
1436
|
-
letters: "G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"
|
1437
|
-
}, {
|
1438
|
-
base: 'H',
|
1439
|
-
letters: "H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"
|
1440
|
-
}, {
|
1441
|
-
base: 'I',
|
1442
|
-
letters: "I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"
|
1443
|
-
}, {
|
1444
|
-
base: 'J',
|
1445
|
-
letters: "J\u24BF\uFF2A\u0134\u0248"
|
1446
|
-
}, {
|
1447
|
-
base: 'K',
|
1448
|
-
letters: "K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"
|
1449
|
-
}, {
|
1450
|
-
base: 'L',
|
1451
|
-
letters: "L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"
|
1452
|
-
}, {
|
1453
|
-
base: 'LJ',
|
1454
|
-
letters: "\u01C7"
|
1455
|
-
}, {
|
1456
|
-
base: 'Lj',
|
1457
|
-
letters: "\u01C8"
|
1458
|
-
}, {
|
1459
|
-
base: 'M',
|
1460
|
-
letters: "M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"
|
1461
|
-
}, {
|
1462
|
-
base: 'N',
|
1463
|
-
letters: "N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"
|
1464
|
-
}, {
|
1465
|
-
base: 'NJ',
|
1466
|
-
letters: "\u01CA"
|
1467
|
-
}, {
|
1468
|
-
base: 'Nj',
|
1469
|
-
letters: "\u01CB"
|
1470
|
-
}, {
|
1471
|
-
base: 'O',
|
1472
|
-
letters: "O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"
|
1473
|
-
}, {
|
1474
|
-
base: 'OI',
|
1475
|
-
letters: "\u01A2"
|
1476
|
-
}, {
|
1477
|
-
base: 'OO',
|
1478
|
-
letters: "\uA74E"
|
1479
|
-
}, {
|
1480
|
-
base: 'OU',
|
1481
|
-
letters: "\u0222"
|
1482
|
-
}, {
|
1483
|
-
base: 'OE',
|
1484
|
-
letters: "\x8C\u0152"
|
1485
|
-
}, {
|
1486
|
-
base: 'oe',
|
1487
|
-
letters: "\x9C\u0153"
|
1488
|
-
}, {
|
1489
|
-
base: 'P',
|
1490
|
-
letters: "P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"
|
1491
|
-
}, {
|
1492
|
-
base: 'Q',
|
1493
|
-
letters: "Q\u24C6\uFF31\uA756\uA758\u024A"
|
1494
|
-
}, {
|
1495
|
-
base: 'R',
|
1496
|
-
letters: "R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"
|
1497
|
-
}, {
|
1498
|
-
base: 'S',
|
1499
|
-
letters: "S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"
|
1500
|
-
}, {
|
1501
|
-
base: 'T',
|
1502
|
-
letters: "T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"
|
1503
|
-
}, {
|
1504
|
-
base: 'TZ',
|
1505
|
-
letters: "\uA728"
|
1506
|
-
}, {
|
1507
|
-
base: 'U',
|
1508
|
-
letters: "U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"
|
1509
|
-
}, {
|
1510
|
-
base: 'V',
|
1511
|
-
letters: "V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"
|
1512
|
-
}, {
|
1513
|
-
base: 'VY',
|
1514
|
-
letters: "\uA760"
|
1515
|
-
}, {
|
1516
|
-
base: 'W',
|
1517
|
-
letters: "W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"
|
1518
|
-
}, {
|
1519
|
-
base: 'X',
|
1520
|
-
letters: "X\u24CD\uFF38\u1E8A\u1E8C"
|
1521
|
-
}, {
|
1522
|
-
base: 'Y',
|
1523
|
-
letters: "Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"
|
1524
|
-
}, {
|
1525
|
-
base: 'Z',
|
1526
|
-
letters: "Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"
|
1527
|
-
}, {
|
1528
|
-
base: 'a',
|
1529
|
-
letters: "a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"
|
1530
|
-
}, {
|
1531
|
-
base: 'aa',
|
1532
|
-
letters: "\uA733"
|
1533
|
-
}, {
|
1534
|
-
base: 'ae',
|
1535
|
-
letters: "\xE6\u01FD\u01E3"
|
1536
|
-
}, {
|
1537
|
-
base: 'ao',
|
1538
|
-
letters: "\uA735"
|
1539
|
-
}, {
|
1540
|
-
base: 'au',
|
1541
|
-
letters: "\uA737"
|
1542
|
-
}, {
|
1543
|
-
base: 'av',
|
1544
|
-
letters: "\uA739\uA73B"
|
1545
|
-
}, {
|
1546
|
-
base: 'ay',
|
1547
|
-
letters: "\uA73D"
|
1548
|
-
}, {
|
1549
|
-
base: 'b',
|
1550
|
-
letters: "b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"
|
1551
|
-
}, {
|
1552
|
-
base: 'c',
|
1553
|
-
letters: "c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"
|
1554
|
-
}, {
|
1555
|
-
base: 'd',
|
1556
|
-
letters: "d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"
|
1557
|
-
}, {
|
1558
|
-
base: 'dz',
|
1559
|
-
letters: "\u01F3\u01C6"
|
1560
|
-
}, {
|
1561
|
-
base: 'e',
|
1562
|
-
letters: "e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"
|
1563
|
-
}, {
|
1564
|
-
base: 'f',
|
1565
|
-
letters: "f\u24D5\uFF46\u1E1F\u0192\uA77C"
|
1566
|
-
}, {
|
1567
|
-
base: 'g',
|
1568
|
-
letters: "g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"
|
1569
|
-
}, {
|
1570
|
-
base: 'h',
|
1571
|
-
letters: "h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"
|
1572
|
-
}, {
|
1573
|
-
base: 'hv',
|
1574
|
-
letters: "\u0195"
|
1575
|
-
}, {
|
1576
|
-
base: 'i',
|
1577
|
-
letters: "i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"
|
1578
|
-
}, {
|
1579
|
-
base: 'j',
|
1580
|
-
letters: "j\u24D9\uFF4A\u0135\u01F0\u0249"
|
1581
|
-
}, {
|
1582
|
-
base: 'k',
|
1583
|
-
letters: "k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"
|
1584
|
-
}, {
|
1585
|
-
base: 'l',
|
1586
|
-
letters: "l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"
|
1587
|
-
}, {
|
1588
|
-
base: 'lj',
|
1589
|
-
letters: "\u01C9"
|
1590
|
-
}, {
|
1591
|
-
base: 'm',
|
1592
|
-
letters: "m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"
|
1593
|
-
}, {
|
1594
|
-
base: 'n',
|
1595
|
-
letters: "n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"
|
1596
|
-
}, {
|
1597
|
-
base: 'nj',
|
1598
|
-
letters: "\u01CC"
|
1599
|
-
}, {
|
1600
|
-
base: 'o',
|
1601
|
-
letters: "o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"
|
1602
|
-
}, {
|
1603
|
-
base: 'oi',
|
1604
|
-
letters: "\u01A3"
|
1605
|
-
}, {
|
1606
|
-
base: 'ou',
|
1607
|
-
letters: "\u0223"
|
1608
|
-
}, {
|
1609
|
-
base: 'oo',
|
1610
|
-
letters: "\uA74F"
|
1611
|
-
}, {
|
1612
|
-
base: 'p',
|
1613
|
-
letters: "p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"
|
1614
|
-
}, {
|
1615
|
-
base: 'q',
|
1616
|
-
letters: "q\u24E0\uFF51\u024B\uA757\uA759"
|
1617
|
-
}, {
|
1618
|
-
base: 'r',
|
1619
|
-
letters: "r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"
|
1620
|
-
}, {
|
1621
|
-
base: 's',
|
1622
|
-
letters: "s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"
|
1623
|
-
}, {
|
1624
|
-
base: 't',
|
1625
|
-
letters: "t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"
|
1626
|
-
}, {
|
1627
|
-
base: 'tz',
|
1628
|
-
letters: "\uA729"
|
1629
|
-
}, {
|
1630
|
-
base: 'u',
|
1631
|
-
letters: "u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"
|
1632
|
-
}, {
|
1633
|
-
base: 'v',
|
1634
|
-
letters: "v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"
|
1635
|
-
}, {
|
1636
|
-
base: 'vy',
|
1637
|
-
letters: "\uA761"
|
1638
|
-
}, {
|
1639
|
-
base: 'w',
|
1640
|
-
letters: "w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"
|
1641
|
-
}, {
|
1642
|
-
base: 'x',
|
1643
|
-
letters: "x\u24E7\uFF58\u1E8B\u1E8D"
|
1644
|
-
}, {
|
1645
|
-
base: 'y',
|
1646
|
-
letters: "y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"
|
1647
|
-
}, {
|
1648
|
-
base: 'z',
|
1649
|
-
letters: "z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"
|
1650
|
-
}];
|
1651
|
-
|
1652
|
-
var initNeutraliser = function initNeutraliser() {
|
1653
|
-
for (var _i = 0, _defaultAccentsDiacri = defaultAccentsDiacritics; _i < _defaultAccentsDiacri.length; _i++) {
|
1654
|
-
var diacritic = _defaultAccentsDiacri[_i];
|
1655
|
-
var letters = diacritic.letters;
|
1656
|
-
|
1657
|
-
for (var i = 0; i < letters.length; i++) {
|
1658
|
-
diacriticsMap[letters[i]] = diacritic.base;
|
1659
|
-
}
|
1660
|
-
}
|
1661
|
-
};
|
1662
|
-
/* eslint-disable no-control-regex */
|
1663
|
-
|
1664
|
-
|
1665
|
-
var removeDiacritics = function removeDiacritics(str) {
|
1666
|
-
return str.replace(/[^\u0000-\u007E]/g, function (a) {
|
1667
|
-
return diacriticsMap[a] || a;
|
1668
|
-
});
|
1669
|
-
};
|
1670
|
-
|
1470
|
+
var Utils = $.fn.bootstrapTable.utils;
|
1671
1471
|
$.extend($.fn.bootstrapTable.defaults, {
|
1672
|
-
|
1472
|
+
customView: false,
|
1473
|
+
showCustomView: false,
|
1474
|
+
showCustomViewButton: false
|
1475
|
+
});
|
1476
|
+
$.extend($.fn.bootstrapTable.defaults.icons, {
|
1477
|
+
customView: {
|
1478
|
+
bootstrap3: 'glyphicon glyphicon-eye-open',
|
1479
|
+
bootstrap4: 'fa fa-eye',
|
1480
|
+
semantic: 'fa fa-eye',
|
1481
|
+
foundation: 'fa fa-eye',
|
1482
|
+
bulma: 'fa fa-eye',
|
1483
|
+
materialize: 'remove_red_eye'
|
1484
|
+
}[$.fn.bootstrapTable.theme] || 'fa-eye'
|
1485
|
+
});
|
1486
|
+
$.extend($.fn.bootstrapTable.defaults, {
|
1487
|
+
onCustomViewPostBody: function onCustomViewPostBody() {
|
1488
|
+
return false;
|
1489
|
+
},
|
1490
|
+
onCustomViewPreBody: function onCustomViewPreBody() {
|
1491
|
+
return false;
|
1492
|
+
}
|
1493
|
+
});
|
1494
|
+
$.extend($.fn.bootstrapTable.locales, {
|
1495
|
+
formatToggleCustomView: function formatToggleCustomView() {
|
1496
|
+
return 'Toggle custom view';
|
1497
|
+
}
|
1498
|
+
});
|
1499
|
+
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
1500
|
+
$.fn.bootstrapTable.methods.push('toggleCustomView');
|
1501
|
+
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
1502
|
+
'custom-view-post-body.bs.table': 'onCustomViewPostBody',
|
1503
|
+
'custom-view-pre-body.bs.table': 'onCustomViewPreBody'
|
1673
1504
|
});
|
1674
1505
|
|
1675
1506
|
$.BootstrapTable =
|
@@ -1686,72 +1517,71 @@
|
|
1686
1517
|
_createClass(_class, [{
|
1687
1518
|
key: "init",
|
1688
1519
|
value: function init() {
|
1689
|
-
|
1690
|
-
initNeutraliser();
|
1691
|
-
}
|
1520
|
+
this.showCustomView = this.options.showCustomView;
|
1692
1521
|
|
1693
1522
|
_get(_getPrototypeOf(_class.prototype), "init", this).call(this);
|
1694
1523
|
}
|
1695
1524
|
}, {
|
1696
|
-
key: "
|
1697
|
-
value: function
|
1698
|
-
var
|
1699
|
-
|
1700
|
-
if (this.options.sidePagination !== 'server') {
|
1701
|
-
var s = this.searchText && this.searchText.toLowerCase();
|
1702
|
-
var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns; // Check filter
|
1703
|
-
|
1704
|
-
this.data = f ? this.options.data.filter(function (item, i) {
|
1705
|
-
for (var key in f) {
|
1706
|
-
if (item[key] !== f[key]) {
|
1707
|
-
return false;
|
1708
|
-
}
|
1709
|
-
}
|
1525
|
+
key: "initToolbar",
|
1526
|
+
value: function initToolbar() {
|
1527
|
+
var _get2;
|
1710
1528
|
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
if (_this.options.searchAccentNeutralise) {
|
1732
|
-
value = removeDiacritics(value);
|
1733
|
-
s = removeDiacritics(s);
|
1734
|
-
}
|
1735
|
-
|
1736
|
-
if (_this.options.strictSearch) {
|
1737
|
-
if ("".concat(value).toLowerCase() === s) {
|
1738
|
-
return true;
|
1739
|
-
}
|
1740
|
-
} else {
|
1741
|
-
if ("".concat(value).toLowerCase().includes(s)) {
|
1742
|
-
return true;
|
1743
|
-
}
|
1744
|
-
}
|
1745
|
-
}
|
1746
|
-
}
|
1529
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1530
|
+
args[_key] = arguments[_key];
|
1531
|
+
}
|
1532
|
+
|
1533
|
+
(_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args));
|
1534
|
+
|
1535
|
+
if (this.options.customView && this.options.showCustomViewButton) {
|
1536
|
+
var $btnGroup = this.$toolbar.find('>.' + this.constants.classes.buttonsGroup.split(' ').join('.')).first();
|
1537
|
+
var $btnToggleCustomView = $btnGroup.find('.toggle-custom-view');
|
1538
|
+
|
1539
|
+
if (!$btnToggleCustomView.length) {
|
1540
|
+
$btnToggleCustomView = $("\n <button class=\"toggle-custom-view ".concat(this.constants.buttonsClass, "\"\n type=\"button\" title=\"").concat(this.options.formatToggleCustomView(), "\">\n ").concat(this.options.showButtonIcons ? Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.customView) : '', "\n ").concat(this.options.showButtonText ? this.options.formatToggleCustomView() : '', "\n </button>\n ")).appendTo($btnGroup);
|
1541
|
+
$btnToggleCustomView.on('click', $.proxy(this.toggleCustomView, this));
|
1542
|
+
}
|
1543
|
+
}
|
1544
|
+
}
|
1545
|
+
}, {
|
1546
|
+
key: "initBody",
|
1547
|
+
value: function initBody() {
|
1548
|
+
_get(_getPrototypeOf(_class.prototype), "initBody", this).call(this);
|
1747
1549
|
|
1748
|
-
|
1749
|
-
|
1550
|
+
if (!this.options.customView) {
|
1551
|
+
return;
|
1750
1552
|
}
|
1553
|
+
|
1554
|
+
var $table = this.$el;
|
1555
|
+
var $customViewContainer = this.$container.find('.fixed-table-custom-view');
|
1556
|
+
$table.hide();
|
1557
|
+
$customViewContainer.hide();
|
1558
|
+
|
1559
|
+
if (!this.options.customView || !this.showCustomView) {
|
1560
|
+
$table.show();
|
1561
|
+
return;
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
var data = this.getData().slice(this.pageFrom - 1, this.pageTo);
|
1565
|
+
var value = Utils.calculateObjectValue(this, this.options.customView, [data], '');
|
1566
|
+
this.trigger('custom-view-pre-body', data, value);
|
1567
|
+
|
1568
|
+
if ($customViewContainer.length === 1) {
|
1569
|
+
$customViewContainer.show().html(value);
|
1570
|
+
} else {
|
1571
|
+
this.$tableBody.after("<div class=\"fixed-table-custom-view\">".concat(value, "</div>"));
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
this.trigger('custom-view-post-body', data, value);
|
1575
|
+
}
|
1576
|
+
}, {
|
1577
|
+
key: "toggleCustomView",
|
1578
|
+
value: function toggleCustomView() {
|
1579
|
+
this.showCustomView = !this.showCustomView;
|
1580
|
+
this.initBody();
|
1751
1581
|
}
|
1752
1582
|
}]);
|
1753
1583
|
|
1754
1584
|
return _class;
|
1755
1585
|
}($.BootstrapTable);
|
1756
1586
|
|
1757
|
-
}));
|
1587
|
+
})));
|