bootstrap-table-rails 1.17.0 → 1.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +30 -132
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/.DS_Store +0 -0
- data/vendor/assets/.DS_Store +0 -0
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +596 -228
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +183 -990
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +184 -991
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +26 -7
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1420 -1423
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +152 -40
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +173 -48
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +495 -908
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +199 -57
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +177 -487
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +66 -24
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +435 -977
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +534 -971
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +372 -161
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +196 -95
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +136 -48
- 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 +330 -559
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +45 -11
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +137 -36
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +232 -148
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +239 -561
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +136 -37
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +101 -58
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +529 -1045
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +155 -58
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +107 -33
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +283 -87
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +132 -43
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +537 -1061
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +278 -990
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +79 -24
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +53 -37
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +50 -34
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +47 -31
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +57 -40
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +57 -41
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +53 -37
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +36 -20
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +27 -6
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +114 -35
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +25 -6
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +110 -31
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +30 -6
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +119 -34
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +30 -6
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +115 -30
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +25 -6
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +107 -28
- metadata +6 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +0 -2668
@@ -1,10 +1,12 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
3
3
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
4
|
-
(global = global || self, global.BootstrapTable = factory(global.jQuery));
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BootstrapTable = factory(global.jQuery));
|
5
5
|
}(this, (function ($) { 'use strict';
|
6
6
|
|
7
|
-
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8
|
+
|
9
|
+
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
8
10
|
|
9
11
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
10
12
|
|
@@ -24,7 +26,7 @@
|
|
24
26
|
check(typeof self == 'object' && self) ||
|
25
27
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
26
28
|
// eslint-disable-next-line no-new-func
|
27
|
-
Function('return this')();
|
29
|
+
(function () { return this; })() || Function('return this')();
|
28
30
|
|
29
31
|
var fails = function (exec) {
|
30
32
|
try {
|
@@ -36,7 +38,7 @@
|
|
36
38
|
|
37
39
|
// Thank's IE8 for his funny defineProperty
|
38
40
|
var descriptors = !fails(function () {
|
39
|
-
return Object.defineProperty({},
|
41
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
40
42
|
});
|
41
43
|
|
42
44
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
@@ -217,9 +219,9 @@
|
|
217
219
|
(module.exports = function (key, value) {
|
218
220
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
219
221
|
})('versions', []).push({
|
220
|
-
version: '3.
|
222
|
+
version: '3.8.1',
|
221
223
|
mode: 'global',
|
222
|
-
copyright: '©
|
224
|
+
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
223
225
|
});
|
224
226
|
});
|
225
227
|
|
@@ -255,11 +257,12 @@
|
|
255
257
|
};
|
256
258
|
|
257
259
|
if (nativeWeakMap) {
|
258
|
-
var store$1 = new WeakMap$1();
|
260
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
259
261
|
var wmget = store$1.get;
|
260
262
|
var wmhas = store$1.has;
|
261
263
|
var wmset = store$1.set;
|
262
264
|
set = function (it, metadata) {
|
265
|
+
metadata.facade = it;
|
263
266
|
wmset.call(store$1, it, metadata);
|
264
267
|
return metadata;
|
265
268
|
};
|
@@ -273,6 +276,7 @@
|
|
273
276
|
var STATE = sharedKey('state');
|
274
277
|
hiddenKeys[STATE] = true;
|
275
278
|
set = function (it, metadata) {
|
279
|
+
metadata.facade = it;
|
276
280
|
createNonEnumerableProperty(it, STATE, metadata);
|
277
281
|
return metadata;
|
278
282
|
};
|
@@ -301,9 +305,15 @@
|
|
301
305
|
var unsafe = options ? !!options.unsafe : false;
|
302
306
|
var simple = options ? !!options.enumerable : false;
|
303
307
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
308
|
+
var state;
|
304
309
|
if (typeof value == 'function') {
|
305
|
-
if (typeof key == 'string' && !has(value, 'name'))
|
306
|
-
|
310
|
+
if (typeof key == 'string' && !has(value, 'name')) {
|
311
|
+
createNonEnumerableProperty(value, 'name', key);
|
312
|
+
}
|
313
|
+
state = enforceInternalState(value);
|
314
|
+
if (!state.source) {
|
315
|
+
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
316
|
+
}
|
307
317
|
}
|
308
318
|
if (O === global_1) {
|
309
319
|
if (simple) O[key] = value;
|
@@ -526,18 +536,6 @@
|
|
526
536
|
}
|
527
537
|
};
|
528
538
|
|
529
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
530
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
531
|
-
// eslint-disable-next-line no-undef
|
532
|
-
return !String(Symbol());
|
533
|
-
});
|
534
|
-
|
535
|
-
var useSymbolAsUid = nativeSymbol
|
536
|
-
// eslint-disable-next-line no-undef
|
537
|
-
&& !Symbol.sham
|
538
|
-
// eslint-disable-next-line no-undef
|
539
|
-
&& typeof Symbol() == 'symbol';
|
540
|
-
|
541
539
|
// `IsArray` abstract operation
|
542
540
|
// https://tc39.github.io/ecma262/#sec-isarray
|
543
541
|
var isArray = Array.isArray || function isArray(arg) {
|
@@ -550,126 +548,27 @@
|
|
550
548
|
return Object(requireObjectCoercible(argument));
|
551
549
|
};
|
552
550
|
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
};
|
558
|
-
|
559
|
-
// `Object.defineProperties` method
|
560
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
561
|
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
562
|
-
anObject(O);
|
563
|
-
var keys = objectKeys(Properties);
|
564
|
-
var length = keys.length;
|
565
|
-
var index = 0;
|
566
|
-
var key;
|
567
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
568
|
-
return O;
|
569
|
-
};
|
570
|
-
|
571
|
-
var html = getBuiltIn('document', 'documentElement');
|
572
|
-
|
573
|
-
var GT = '>';
|
574
|
-
var LT = '<';
|
575
|
-
var PROTOTYPE = 'prototype';
|
576
|
-
var SCRIPT = 'script';
|
577
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
578
|
-
|
579
|
-
var EmptyConstructor = function () { /* empty */ };
|
580
|
-
|
581
|
-
var scriptTag = function (content) {
|
582
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
583
|
-
};
|
584
|
-
|
585
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
586
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
587
|
-
activeXDocument.write(scriptTag(''));
|
588
|
-
activeXDocument.close();
|
589
|
-
var temp = activeXDocument.parentWindow.Object;
|
590
|
-
activeXDocument = null; // avoid memory leak
|
591
|
-
return temp;
|
592
|
-
};
|
593
|
-
|
594
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
595
|
-
var NullProtoObjectViaIFrame = function () {
|
596
|
-
// Thrash, waste and sodomy: IE GC bug
|
597
|
-
var iframe = documentCreateElement('iframe');
|
598
|
-
var JS = 'java' + SCRIPT + ':';
|
599
|
-
var iframeDocument;
|
600
|
-
iframe.style.display = 'none';
|
601
|
-
html.appendChild(iframe);
|
602
|
-
// https://github.com/zloirock/core-js/issues/475
|
603
|
-
iframe.src = String(JS);
|
604
|
-
iframeDocument = iframe.contentWindow.document;
|
605
|
-
iframeDocument.open();
|
606
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
607
|
-
iframeDocument.close();
|
608
|
-
return iframeDocument.F;
|
609
|
-
};
|
610
|
-
|
611
|
-
// Check for document.domain and active x support
|
612
|
-
// No need to use active x approach when document.domain is not set
|
613
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
614
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
615
|
-
// avoid IE GC bug
|
616
|
-
var activeXDocument;
|
617
|
-
var NullProtoObject = function () {
|
618
|
-
try {
|
619
|
-
/* global ActiveXObject */
|
620
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
621
|
-
} catch (error) { /* ignore */ }
|
622
|
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
623
|
-
var length = enumBugKeys.length;
|
624
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
625
|
-
return NullProtoObject();
|
626
|
-
};
|
627
|
-
|
628
|
-
hiddenKeys[IE_PROTO] = true;
|
629
|
-
|
630
|
-
// `Object.create` method
|
631
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
632
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
633
|
-
var result;
|
634
|
-
if (O !== null) {
|
635
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
636
|
-
result = new EmptyConstructor();
|
637
|
-
EmptyConstructor[PROTOTYPE] = null;
|
638
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
639
|
-
result[IE_PROTO] = O;
|
640
|
-
} else result = NullProtoObject();
|
641
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
642
|
-
};
|
643
|
-
|
644
|
-
var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
|
645
|
-
|
646
|
-
var toString$1 = {}.toString;
|
647
|
-
|
648
|
-
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
649
|
-
? Object.getOwnPropertyNames(window) : [];
|
650
|
-
|
651
|
-
var getWindowNames = function (it) {
|
652
|
-
try {
|
653
|
-
return nativeGetOwnPropertyNames(it);
|
654
|
-
} catch (error) {
|
655
|
-
return windowNames.slice();
|
656
|
-
}
|
551
|
+
var createProperty = function (object, key, value) {
|
552
|
+
var propertyKey = toPrimitive(key);
|
553
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
554
|
+
else object[propertyKey] = value;
|
657
555
|
};
|
658
556
|
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
};
|
557
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
558
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
559
|
+
// eslint-disable-next-line no-undef
|
560
|
+
return !String(Symbol());
|
561
|
+
});
|
665
562
|
|
666
|
-
var
|
667
|
-
|
668
|
-
|
563
|
+
var useSymbolAsUid = nativeSymbol
|
564
|
+
// eslint-disable-next-line no-undef
|
565
|
+
&& !Symbol.sham
|
566
|
+
// eslint-disable-next-line no-undef
|
567
|
+
&& typeof Symbol.iterator == 'symbol';
|
669
568
|
|
670
569
|
var WellKnownSymbolsStore = shared('wks');
|
671
570
|
var Symbol$1 = global_1.Symbol;
|
672
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
571
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
673
572
|
|
674
573
|
var wellKnownSymbol = function (name) {
|
675
574
|
if (!has(WellKnownSymbolsStore, name)) {
|
@@ -678,62 +577,6 @@
|
|
678
577
|
} return WellKnownSymbolsStore[name];
|
679
578
|
};
|
680
579
|
|
681
|
-
var f$6 = wellKnownSymbol;
|
682
|
-
|
683
|
-
var wrappedWellKnownSymbol = {
|
684
|
-
f: f$6
|
685
|
-
};
|
686
|
-
|
687
|
-
var defineProperty = objectDefineProperty.f;
|
688
|
-
|
689
|
-
var defineWellKnownSymbol = function (NAME) {
|
690
|
-
var Symbol = path.Symbol || (path.Symbol = {});
|
691
|
-
if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
|
692
|
-
value: wrappedWellKnownSymbol.f(NAME)
|
693
|
-
});
|
694
|
-
};
|
695
|
-
|
696
|
-
var defineProperty$1 = objectDefineProperty.f;
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
701
|
-
|
702
|
-
var setToStringTag = function (it, TAG, STATIC) {
|
703
|
-
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
|
704
|
-
defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
|
705
|
-
}
|
706
|
-
};
|
707
|
-
|
708
|
-
var aFunction$1 = function (it) {
|
709
|
-
if (typeof it != 'function') {
|
710
|
-
throw TypeError(String(it) + ' is not a function');
|
711
|
-
} return it;
|
712
|
-
};
|
713
|
-
|
714
|
-
// optional / simple context binding
|
715
|
-
var bindContext = function (fn, that, length) {
|
716
|
-
aFunction$1(fn);
|
717
|
-
if (that === undefined) return fn;
|
718
|
-
switch (length) {
|
719
|
-
case 0: return function () {
|
720
|
-
return fn.call(that);
|
721
|
-
};
|
722
|
-
case 1: return function (a) {
|
723
|
-
return fn.call(that, a);
|
724
|
-
};
|
725
|
-
case 2: return function (a, b) {
|
726
|
-
return fn.call(that, a, b);
|
727
|
-
};
|
728
|
-
case 3: return function (a, b, c) {
|
729
|
-
return fn.call(that, a, b, c);
|
730
|
-
};
|
731
|
-
}
|
732
|
-
return function (/* ...args */) {
|
733
|
-
return fn.apply(that, arguments);
|
734
|
-
};
|
735
|
-
};
|
736
|
-
|
737
580
|
var SPECIES = wellKnownSymbol('species');
|
738
581
|
|
739
582
|
// `ArraySpeciesCreate` abstract operation
|
@@ -745,400 +588,13 @@
|
|
745
588
|
// cross-realm fallback
|
746
589
|
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
747
590
|
else if (isObject(C)) {
|
748
|
-
C = C[SPECIES];
|
749
|
-
if (C === null) C = undefined;
|
750
|
-
}
|
751
|
-
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
752
|
-
};
|
753
|
-
|
754
|
-
var push = [].push;
|
755
|
-
|
756
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
757
|
-
var createMethod$1 = function (TYPE) {
|
758
|
-
var IS_MAP = TYPE == 1;
|
759
|
-
var IS_FILTER = TYPE == 2;
|
760
|
-
var IS_SOME = TYPE == 3;
|
761
|
-
var IS_EVERY = TYPE == 4;
|
762
|
-
var IS_FIND_INDEX = TYPE == 6;
|
763
|
-
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
764
|
-
return function ($this, callbackfn, that, specificCreate) {
|
765
|
-
var O = toObject($this);
|
766
|
-
var self = indexedObject(O);
|
767
|
-
var boundFunction = bindContext(callbackfn, that, 3);
|
768
|
-
var length = toLength(self.length);
|
769
|
-
var index = 0;
|
770
|
-
var create = specificCreate || arraySpeciesCreate;
|
771
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
772
|
-
var value, result;
|
773
|
-
for (;length > index; index++) if (NO_HOLES || index in self) {
|
774
|
-
value = self[index];
|
775
|
-
result = boundFunction(value, index, O);
|
776
|
-
if (TYPE) {
|
777
|
-
if (IS_MAP) target[index] = result; // map
|
778
|
-
else if (result) switch (TYPE) {
|
779
|
-
case 3: return true; // some
|
780
|
-
case 5: return value; // find
|
781
|
-
case 6: return index; // findIndex
|
782
|
-
case 2: push.call(target, value); // filter
|
783
|
-
} else if (IS_EVERY) return false; // every
|
784
|
-
}
|
785
|
-
}
|
786
|
-
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
787
|
-
};
|
788
|
-
};
|
789
|
-
|
790
|
-
var arrayIteration = {
|
791
|
-
// `Array.prototype.forEach` method
|
792
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
793
|
-
forEach: createMethod$1(0),
|
794
|
-
// `Array.prototype.map` method
|
795
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
796
|
-
map: createMethod$1(1),
|
797
|
-
// `Array.prototype.filter` method
|
798
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
799
|
-
filter: createMethod$1(2),
|
800
|
-
// `Array.prototype.some` method
|
801
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
802
|
-
some: createMethod$1(3),
|
803
|
-
// `Array.prototype.every` method
|
804
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.every
|
805
|
-
every: createMethod$1(4),
|
806
|
-
// `Array.prototype.find` method
|
807
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
808
|
-
find: createMethod$1(5),
|
809
|
-
// `Array.prototype.findIndex` method
|
810
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
811
|
-
findIndex: createMethod$1(6)
|
812
|
-
};
|
813
|
-
|
814
|
-
var $forEach = arrayIteration.forEach;
|
815
|
-
|
816
|
-
var HIDDEN = sharedKey('hidden');
|
817
|
-
var SYMBOL = 'Symbol';
|
818
|
-
var PROTOTYPE$1 = 'prototype';
|
819
|
-
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
820
|
-
var setInternalState = internalState.set;
|
821
|
-
var getInternalState = internalState.getterFor(SYMBOL);
|
822
|
-
var ObjectPrototype = Object[PROTOTYPE$1];
|
823
|
-
var $Symbol = global_1.Symbol;
|
824
|
-
var $stringify = getBuiltIn('JSON', 'stringify');
|
825
|
-
var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
826
|
-
var nativeDefineProperty$1 = objectDefineProperty.f;
|
827
|
-
var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
|
828
|
-
var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
|
829
|
-
var AllSymbols = shared('symbols');
|
830
|
-
var ObjectPrototypeSymbols = shared('op-symbols');
|
831
|
-
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
832
|
-
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
833
|
-
var WellKnownSymbolsStore$1 = shared('wks');
|
834
|
-
var QObject = global_1.QObject;
|
835
|
-
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
836
|
-
var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
|
837
|
-
|
838
|
-
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
839
|
-
var setSymbolDescriptor = descriptors && fails(function () {
|
840
|
-
return objectCreate(nativeDefineProperty$1({}, 'a', {
|
841
|
-
get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
|
842
|
-
})).a != 7;
|
843
|
-
}) ? function (O, P, Attributes) {
|
844
|
-
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
|
845
|
-
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
|
846
|
-
nativeDefineProperty$1(O, P, Attributes);
|
847
|
-
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
|
848
|
-
nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
|
849
|
-
}
|
850
|
-
} : nativeDefineProperty$1;
|
851
|
-
|
852
|
-
var wrap = function (tag, description) {
|
853
|
-
var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
|
854
|
-
setInternalState(symbol, {
|
855
|
-
type: SYMBOL,
|
856
|
-
tag: tag,
|
857
|
-
description: description
|
858
|
-
});
|
859
|
-
if (!descriptors) symbol.description = description;
|
860
|
-
return symbol;
|
861
|
-
};
|
862
|
-
|
863
|
-
var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
864
|
-
return typeof it == 'symbol';
|
865
|
-
} : function (it) {
|
866
|
-
return Object(it) instanceof $Symbol;
|
867
|
-
};
|
868
|
-
|
869
|
-
var $defineProperty = function defineProperty(O, P, Attributes) {
|
870
|
-
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
|
871
|
-
anObject(O);
|
872
|
-
var key = toPrimitive(P, true);
|
873
|
-
anObject(Attributes);
|
874
|
-
if (has(AllSymbols, key)) {
|
875
|
-
if (!Attributes.enumerable) {
|
876
|
-
if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
|
877
|
-
O[HIDDEN][key] = true;
|
878
|
-
} else {
|
879
|
-
if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
880
|
-
Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
881
|
-
} return setSymbolDescriptor(O, key, Attributes);
|
882
|
-
} return nativeDefineProperty$1(O, key, Attributes);
|
883
|
-
};
|
884
|
-
|
885
|
-
var $defineProperties = function defineProperties(O, Properties) {
|
886
|
-
anObject(O);
|
887
|
-
var properties = toIndexedObject(Properties);
|
888
|
-
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
889
|
-
$forEach(keys, function (key) {
|
890
|
-
if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
|
891
|
-
});
|
892
|
-
return O;
|
893
|
-
};
|
894
|
-
|
895
|
-
var $create = function create(O, Properties) {
|
896
|
-
return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
|
897
|
-
};
|
898
|
-
|
899
|
-
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
900
|
-
var P = toPrimitive(V, true);
|
901
|
-
var enumerable = nativePropertyIsEnumerable$1.call(this, P);
|
902
|
-
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
|
903
|
-
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
|
904
|
-
};
|
905
|
-
|
906
|
-
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
|
907
|
-
var it = toIndexedObject(O);
|
908
|
-
var key = toPrimitive(P, true);
|
909
|
-
if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
|
910
|
-
var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
|
911
|
-
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
|
912
|
-
descriptor.enumerable = true;
|
913
|
-
}
|
914
|
-
return descriptor;
|
915
|
-
};
|
916
|
-
|
917
|
-
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
|
918
|
-
var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
|
919
|
-
var result = [];
|
920
|
-
$forEach(names, function (key) {
|
921
|
-
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
|
922
|
-
});
|
923
|
-
return result;
|
924
|
-
};
|
925
|
-
|
926
|
-
var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
|
927
|
-
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
|
928
|
-
var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
929
|
-
var result = [];
|
930
|
-
$forEach(names, function (key) {
|
931
|
-
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
|
932
|
-
result.push(AllSymbols[key]);
|
933
|
-
}
|
934
|
-
});
|
935
|
-
return result;
|
936
|
-
};
|
937
|
-
|
938
|
-
// `Symbol` constructor
|
939
|
-
// https://tc39.github.io/ecma262/#sec-symbol-constructor
|
940
|
-
if (!nativeSymbol) {
|
941
|
-
$Symbol = function Symbol() {
|
942
|
-
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
943
|
-
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
|
944
|
-
var tag = uid(description);
|
945
|
-
var setter = function (value) {
|
946
|
-
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
|
947
|
-
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
948
|
-
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
949
|
-
};
|
950
|
-
if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
951
|
-
return wrap(tag, description);
|
952
|
-
};
|
953
|
-
|
954
|
-
redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
|
955
|
-
return getInternalState(this).tag;
|
956
|
-
});
|
957
|
-
|
958
|
-
objectPropertyIsEnumerable.f = $propertyIsEnumerable;
|
959
|
-
objectDefineProperty.f = $defineProperty;
|
960
|
-
objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
|
961
|
-
objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
962
|
-
objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
|
963
|
-
|
964
|
-
if (descriptors) {
|
965
|
-
// https://github.com/tc39/proposal-Symbol-description
|
966
|
-
nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
|
967
|
-
configurable: true,
|
968
|
-
get: function description() {
|
969
|
-
return getInternalState(this).description;
|
970
|
-
}
|
971
|
-
});
|
972
|
-
{
|
973
|
-
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
974
|
-
}
|
975
|
-
}
|
976
|
-
}
|
977
|
-
|
978
|
-
if (!useSymbolAsUid) {
|
979
|
-
wrappedWellKnownSymbol.f = function (name) {
|
980
|
-
return wrap(wellKnownSymbol(name), name);
|
981
|
-
};
|
982
|
-
}
|
983
|
-
|
984
|
-
_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
|
985
|
-
Symbol: $Symbol
|
986
|
-
});
|
987
|
-
|
988
|
-
$forEach(objectKeys(WellKnownSymbolsStore$1), function (name) {
|
989
|
-
defineWellKnownSymbol(name);
|
990
|
-
});
|
991
|
-
|
992
|
-
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
993
|
-
// `Symbol.for` method
|
994
|
-
// https://tc39.github.io/ecma262/#sec-symbol.for
|
995
|
-
'for': function (key) {
|
996
|
-
var string = String(key);
|
997
|
-
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
998
|
-
var symbol = $Symbol(string);
|
999
|
-
StringToSymbolRegistry[string] = symbol;
|
1000
|
-
SymbolToStringRegistry[symbol] = string;
|
1001
|
-
return symbol;
|
1002
|
-
},
|
1003
|
-
// `Symbol.keyFor` method
|
1004
|
-
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
|
1005
|
-
keyFor: function keyFor(sym) {
|
1006
|
-
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
1007
|
-
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
1008
|
-
},
|
1009
|
-
useSetter: function () { USE_SETTER = true; },
|
1010
|
-
useSimple: function () { USE_SETTER = false; }
|
1011
|
-
});
|
1012
|
-
|
1013
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
1014
|
-
// `Object.create` method
|
1015
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
1016
|
-
create: $create,
|
1017
|
-
// `Object.defineProperty` method
|
1018
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
1019
|
-
defineProperty: $defineProperty,
|
1020
|
-
// `Object.defineProperties` method
|
1021
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
1022
|
-
defineProperties: $defineProperties,
|
1023
|
-
// `Object.getOwnPropertyDescriptor` method
|
1024
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
|
1025
|
-
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
1026
|
-
});
|
1027
|
-
|
1028
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
1029
|
-
// `Object.getOwnPropertyNames` method
|
1030
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
1031
|
-
getOwnPropertyNames: $getOwnPropertyNames,
|
1032
|
-
// `Object.getOwnPropertySymbols` method
|
1033
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
|
1034
|
-
getOwnPropertySymbols: $getOwnPropertySymbols
|
1035
|
-
});
|
1036
|
-
|
1037
|
-
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
1038
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
1039
|
-
_export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
|
1040
|
-
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
1041
|
-
return objectGetOwnPropertySymbols.f(toObject(it));
|
1042
|
-
}
|
1043
|
-
});
|
1044
|
-
|
1045
|
-
// `JSON.stringify` method behavior with symbols
|
1046
|
-
// https://tc39.github.io/ecma262/#sec-json.stringify
|
1047
|
-
if ($stringify) {
|
1048
|
-
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
1049
|
-
var symbol = $Symbol();
|
1050
|
-
// MS Edge converts symbol values to JSON as {}
|
1051
|
-
return $stringify([symbol]) != '[null]'
|
1052
|
-
// WebKit converts symbol values to JSON as null
|
1053
|
-
|| $stringify({ a: symbol }) != '{}'
|
1054
|
-
// V8 throws on boxed symbols
|
1055
|
-
|| $stringify(Object(symbol)) != '{}';
|
1056
|
-
});
|
1057
|
-
|
1058
|
-
_export({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
1059
|
-
// eslint-disable-next-line no-unused-vars
|
1060
|
-
stringify: function stringify(it, replacer, space) {
|
1061
|
-
var args = [it];
|
1062
|
-
var index = 1;
|
1063
|
-
var $replacer;
|
1064
|
-
while (arguments.length > index) args.push(arguments[index++]);
|
1065
|
-
$replacer = replacer;
|
1066
|
-
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
1067
|
-
if (!isArray(replacer)) replacer = function (key, value) {
|
1068
|
-
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
1069
|
-
if (!isSymbol(value)) return value;
|
1070
|
-
};
|
1071
|
-
args[1] = replacer;
|
1072
|
-
return $stringify.apply(null, args);
|
1073
|
-
}
|
1074
|
-
});
|
1075
|
-
}
|
1076
|
-
|
1077
|
-
// `Symbol.prototype[@@toPrimitive]` method
|
1078
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
|
1079
|
-
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
|
1080
|
-
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
1081
|
-
}
|
1082
|
-
// `Symbol.prototype[@@toStringTag]` property
|
1083
|
-
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
|
1084
|
-
setToStringTag($Symbol, SYMBOL);
|
1085
|
-
|
1086
|
-
hiddenKeys[HIDDEN] = true;
|
1087
|
-
|
1088
|
-
var defineProperty$2 = objectDefineProperty.f;
|
1089
|
-
|
1090
|
-
|
1091
|
-
var NativeSymbol = global_1.Symbol;
|
1092
|
-
|
1093
|
-
if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
|
1094
|
-
// Safari 12 bug
|
1095
|
-
NativeSymbol().description !== undefined
|
1096
|
-
)) {
|
1097
|
-
var EmptyStringDescriptionStore = {};
|
1098
|
-
// wrap Symbol constructor for correct work with undefined description
|
1099
|
-
var SymbolWrapper = function Symbol() {
|
1100
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
|
1101
|
-
var result = this instanceof SymbolWrapper
|
1102
|
-
? new NativeSymbol(description)
|
1103
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
1104
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
1105
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
1106
|
-
return result;
|
1107
|
-
};
|
1108
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
1109
|
-
var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
|
1110
|
-
symbolPrototype.constructor = SymbolWrapper;
|
1111
|
-
|
1112
|
-
var symbolToString = symbolPrototype.toString;
|
1113
|
-
var native = String(NativeSymbol('test')) == 'Symbol(test)';
|
1114
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
1115
|
-
defineProperty$2(symbolPrototype, 'description', {
|
1116
|
-
configurable: true,
|
1117
|
-
get: function description() {
|
1118
|
-
var symbol = isObject(this) ? this.valueOf() : this;
|
1119
|
-
var string = symbolToString.call(symbol);
|
1120
|
-
if (has(EmptyStringDescriptionStore, symbol)) return '';
|
1121
|
-
var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
|
1122
|
-
return desc === '' ? undefined : desc;
|
591
|
+
C = C[SPECIES];
|
592
|
+
if (C === null) C = undefined;
|
1123
593
|
}
|
1124
|
-
});
|
1125
|
-
|
1126
|
-
_export({ global: true, forced: true }, {
|
1127
|
-
Symbol: SymbolWrapper
|
1128
|
-
});
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
// `Symbol.iterator` well-known symbol
|
1132
|
-
// https://tc39.github.io/ecma262/#sec-symbol.iterator
|
1133
|
-
defineWellKnownSymbol('iterator');
|
1134
|
-
|
1135
|
-
var createProperty = function (object, key, value) {
|
1136
|
-
var propertyKey = toPrimitive(key);
|
1137
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1138
|
-
else object[propertyKey] = value;
|
594
|
+
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
1139
595
|
};
|
1140
596
|
|
1141
|
-
var
|
597
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
1142
598
|
|
1143
599
|
var process = global_1.process;
|
1144
600
|
var versions = process && process.versions;
|
@@ -1148,15 +604,15 @@
|
|
1148
604
|
if (v8) {
|
1149
605
|
match = v8.split('.');
|
1150
606
|
version = match[0] + match[1];
|
1151
|
-
} else if (
|
1152
|
-
match =
|
607
|
+
} else if (engineUserAgent) {
|
608
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
1153
609
|
if (!match || match[1] >= 74) {
|
1154
|
-
match =
|
610
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
1155
611
|
if (match) version = match[1];
|
1156
612
|
}
|
1157
613
|
}
|
1158
614
|
|
1159
|
-
var
|
615
|
+
var engineV8Version = version && +version;
|
1160
616
|
|
1161
617
|
var SPECIES$1 = wellKnownSymbol('species');
|
1162
618
|
|
@@ -1164,7 +620,7 @@
|
|
1164
620
|
// We can't use this feature detection in V8 since it causes
|
1165
621
|
// deoptimization and serious performance degradation
|
1166
622
|
// https://github.com/zloirock/core-js/issues/677
|
1167
|
-
return
|
623
|
+
return engineV8Version >= 51 || !fails(function () {
|
1168
624
|
var array = [];
|
1169
625
|
var constructor = array.constructor = {};
|
1170
626
|
constructor[SPECIES$1] = function () {
|
@@ -1181,7 +637,7 @@
|
|
1181
637
|
// We can't use this feature detection in V8 since it causes
|
1182
638
|
// deoptimization and serious performance degradation
|
1183
639
|
// https://github.com/zloirock/core-js/issues/679
|
1184
|
-
var IS_CONCAT_SPREADABLE_SUPPORT =
|
640
|
+
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
1185
641
|
var array = [];
|
1186
642
|
array[IS_CONCAT_SPREADABLE] = false;
|
1187
643
|
return array.concat()[0] !== array;
|
@@ -1222,15 +678,133 @@
|
|
1222
678
|
}
|
1223
679
|
});
|
1224
680
|
|
681
|
+
var aFunction$1 = function (it) {
|
682
|
+
if (typeof it != 'function') {
|
683
|
+
throw TypeError(String(it) + ' is not a function');
|
684
|
+
} return it;
|
685
|
+
};
|
686
|
+
|
687
|
+
// optional / simple context binding
|
688
|
+
var functionBindContext = function (fn, that, length) {
|
689
|
+
aFunction$1(fn);
|
690
|
+
if (that === undefined) return fn;
|
691
|
+
switch (length) {
|
692
|
+
case 0: return function () {
|
693
|
+
return fn.call(that);
|
694
|
+
};
|
695
|
+
case 1: return function (a) {
|
696
|
+
return fn.call(that, a);
|
697
|
+
};
|
698
|
+
case 2: return function (a, b) {
|
699
|
+
return fn.call(that, a, b);
|
700
|
+
};
|
701
|
+
case 3: return function (a, b, c) {
|
702
|
+
return fn.call(that, a, b, c);
|
703
|
+
};
|
704
|
+
}
|
705
|
+
return function (/* ...args */) {
|
706
|
+
return fn.apply(that, arguments);
|
707
|
+
};
|
708
|
+
};
|
709
|
+
|
710
|
+
var push = [].push;
|
711
|
+
|
712
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
713
|
+
var createMethod$1 = function (TYPE) {
|
714
|
+
var IS_MAP = TYPE == 1;
|
715
|
+
var IS_FILTER = TYPE == 2;
|
716
|
+
var IS_SOME = TYPE == 3;
|
717
|
+
var IS_EVERY = TYPE == 4;
|
718
|
+
var IS_FIND_INDEX = TYPE == 6;
|
719
|
+
var IS_FILTER_OUT = TYPE == 7;
|
720
|
+
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
721
|
+
return function ($this, callbackfn, that, specificCreate) {
|
722
|
+
var O = toObject($this);
|
723
|
+
var self = indexedObject(O);
|
724
|
+
var boundFunction = functionBindContext(callbackfn, that, 3);
|
725
|
+
var length = toLength(self.length);
|
726
|
+
var index = 0;
|
727
|
+
var create = specificCreate || arraySpeciesCreate;
|
728
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
729
|
+
var value, result;
|
730
|
+
for (;length > index; index++) if (NO_HOLES || index in self) {
|
731
|
+
value = self[index];
|
732
|
+
result = boundFunction(value, index, O);
|
733
|
+
if (TYPE) {
|
734
|
+
if (IS_MAP) target[index] = result; // map
|
735
|
+
else if (result) switch (TYPE) {
|
736
|
+
case 3: return true; // some
|
737
|
+
case 5: return value; // find
|
738
|
+
case 6: return index; // findIndex
|
739
|
+
case 2: push.call(target, value); // filter
|
740
|
+
} else switch (TYPE) {
|
741
|
+
case 4: return false; // every
|
742
|
+
case 7: push.call(target, value); // filterOut
|
743
|
+
}
|
744
|
+
}
|
745
|
+
}
|
746
|
+
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
747
|
+
};
|
748
|
+
};
|
749
|
+
|
750
|
+
var arrayIteration = {
|
751
|
+
// `Array.prototype.forEach` method
|
752
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
753
|
+
forEach: createMethod$1(0),
|
754
|
+
// `Array.prototype.map` method
|
755
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
756
|
+
map: createMethod$1(1),
|
757
|
+
// `Array.prototype.filter` method
|
758
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
759
|
+
filter: createMethod$1(2),
|
760
|
+
// `Array.prototype.some` method
|
761
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
762
|
+
some: createMethod$1(3),
|
763
|
+
// `Array.prototype.every` method
|
764
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.every
|
765
|
+
every: createMethod$1(4),
|
766
|
+
// `Array.prototype.find` method
|
767
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
768
|
+
find: createMethod$1(5),
|
769
|
+
// `Array.prototype.findIndex` method
|
770
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
771
|
+
findIndex: createMethod$1(6),
|
772
|
+
// `Array.prototype.filterOut` method
|
773
|
+
// https://github.com/tc39/proposal-array-filtering
|
774
|
+
filterOut: createMethod$1(7)
|
775
|
+
};
|
776
|
+
|
777
|
+
var defineProperty = Object.defineProperty;
|
778
|
+
var cache = {};
|
779
|
+
|
780
|
+
var thrower = function (it) { throw it; };
|
781
|
+
|
782
|
+
var arrayMethodUsesToLength = function (METHOD_NAME, options) {
|
783
|
+
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
|
784
|
+
if (!options) options = {};
|
785
|
+
var method = [][METHOD_NAME];
|
786
|
+
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
|
787
|
+
var argument0 = has(options, 0) ? options[0] : thrower;
|
788
|
+
var argument1 = has(options, 1) ? options[1] : undefined;
|
789
|
+
|
790
|
+
return cache[METHOD_NAME] = !!method && !fails(function () {
|
791
|
+
if (ACCESSORS && !descriptors) return true;
|
792
|
+
var O = { length: -1 };
|
793
|
+
|
794
|
+
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
|
795
|
+
else O[1] = 1;
|
796
|
+
|
797
|
+
method.call(O, argument0, argument1);
|
798
|
+
});
|
799
|
+
};
|
800
|
+
|
1225
801
|
var $filter = arrayIteration.filter;
|
1226
802
|
|
1227
803
|
|
1228
804
|
|
1229
805
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
1230
806
|
// Edge 14- issue
|
1231
|
-
var USES_TO_LENGTH =
|
1232
|
-
[].filter.call({ length: -1, 0: 1 }, function (it) { throw it; });
|
1233
|
-
});
|
807
|
+
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
|
1234
808
|
|
1235
809
|
// `Array.prototype.filter` method
|
1236
810
|
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
|
@@ -1241,6 +815,97 @@
|
|
1241
815
|
}
|
1242
816
|
});
|
1243
817
|
|
818
|
+
// `Object.keys` method
|
819
|
+
// https://tc39.github.io/ecma262/#sec-object.keys
|
820
|
+
var objectKeys = Object.keys || function keys(O) {
|
821
|
+
return objectKeysInternal(O, enumBugKeys);
|
822
|
+
};
|
823
|
+
|
824
|
+
// `Object.defineProperties` method
|
825
|
+
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
826
|
+
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
827
|
+
anObject(O);
|
828
|
+
var keys = objectKeys(Properties);
|
829
|
+
var length = keys.length;
|
830
|
+
var index = 0;
|
831
|
+
var key;
|
832
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
833
|
+
return O;
|
834
|
+
};
|
835
|
+
|
836
|
+
var html = getBuiltIn('document', 'documentElement');
|
837
|
+
|
838
|
+
var GT = '>';
|
839
|
+
var LT = '<';
|
840
|
+
var PROTOTYPE = 'prototype';
|
841
|
+
var SCRIPT = 'script';
|
842
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
843
|
+
|
844
|
+
var EmptyConstructor = function () { /* empty */ };
|
845
|
+
|
846
|
+
var scriptTag = function (content) {
|
847
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
848
|
+
};
|
849
|
+
|
850
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
851
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
852
|
+
activeXDocument.write(scriptTag(''));
|
853
|
+
activeXDocument.close();
|
854
|
+
var temp = activeXDocument.parentWindow.Object;
|
855
|
+
activeXDocument = null; // avoid memory leak
|
856
|
+
return temp;
|
857
|
+
};
|
858
|
+
|
859
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
860
|
+
var NullProtoObjectViaIFrame = function () {
|
861
|
+
// Thrash, waste and sodomy: IE GC bug
|
862
|
+
var iframe = documentCreateElement('iframe');
|
863
|
+
var JS = 'java' + SCRIPT + ':';
|
864
|
+
var iframeDocument;
|
865
|
+
iframe.style.display = 'none';
|
866
|
+
html.appendChild(iframe);
|
867
|
+
// https://github.com/zloirock/core-js/issues/475
|
868
|
+
iframe.src = String(JS);
|
869
|
+
iframeDocument = iframe.contentWindow.document;
|
870
|
+
iframeDocument.open();
|
871
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
872
|
+
iframeDocument.close();
|
873
|
+
return iframeDocument.F;
|
874
|
+
};
|
875
|
+
|
876
|
+
// Check for document.domain and active x support
|
877
|
+
// No need to use active x approach when document.domain is not set
|
878
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
879
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
880
|
+
// avoid IE GC bug
|
881
|
+
var activeXDocument;
|
882
|
+
var NullProtoObject = function () {
|
883
|
+
try {
|
884
|
+
/* global ActiveXObject */
|
885
|
+
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
886
|
+
} catch (error) { /* ignore */ }
|
887
|
+
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
888
|
+
var length = enumBugKeys.length;
|
889
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
890
|
+
return NullProtoObject();
|
891
|
+
};
|
892
|
+
|
893
|
+
hiddenKeys[IE_PROTO] = true;
|
894
|
+
|
895
|
+
// `Object.create` method
|
896
|
+
// https://tc39.github.io/ecma262/#sec-object.create
|
897
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
898
|
+
var result;
|
899
|
+
if (O !== null) {
|
900
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
901
|
+
result = new EmptyConstructor();
|
902
|
+
EmptyConstructor[PROTOTYPE] = null;
|
903
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
904
|
+
result[IE_PROTO] = O;
|
905
|
+
} else result = NullProtoObject();
|
906
|
+
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
907
|
+
};
|
908
|
+
|
1244
909
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
1245
910
|
var ArrayPrototype = Array.prototype;
|
1246
911
|
|
@@ -1261,15 +926,18 @@
|
|
1261
926
|
var $find = arrayIteration.find;
|
1262
927
|
|
1263
928
|
|
929
|
+
|
1264
930
|
var FIND = 'find';
|
1265
931
|
var SKIPS_HOLES = true;
|
1266
932
|
|
933
|
+
var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND);
|
934
|
+
|
1267
935
|
// Shouldn't skip holes
|
1268
936
|
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
1269
937
|
|
1270
938
|
// `Array.prototype.find` method
|
1271
939
|
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
1272
|
-
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
940
|
+
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, {
|
1273
941
|
find: function find(callbackfn /* , that = undefined */) {
|
1274
942
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1275
943
|
}
|
@@ -1281,15 +949,18 @@
|
|
1281
949
|
var $findIndex = arrayIteration.findIndex;
|
1282
950
|
|
1283
951
|
|
952
|
+
|
1284
953
|
var FIND_INDEX = 'findIndex';
|
1285
954
|
var SKIPS_HOLES$1 = true;
|
1286
955
|
|
956
|
+
var USES_TO_LENGTH$2 = arrayMethodUsesToLength(FIND_INDEX);
|
957
|
+
|
1287
958
|
// Shouldn't skip holes
|
1288
959
|
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; });
|
1289
960
|
|
1290
961
|
// `Array.prototype.findIndex` method
|
1291
962
|
// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
|
1292
|
-
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 }, {
|
963
|
+
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$2 }, {
|
1293
964
|
findIndex: function findIndex(callbackfn /* , that = undefined */) {
|
1294
965
|
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1295
966
|
}
|
@@ -1298,12 +969,42 @@
|
|
1298
969
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1299
970
|
addToUnscopables(FIND_INDEX);
|
1300
971
|
|
972
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
973
|
+
var method = [][METHOD_NAME];
|
974
|
+
return !!method && fails(function () {
|
975
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
976
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
977
|
+
});
|
978
|
+
};
|
979
|
+
|
980
|
+
var $forEach = arrayIteration.forEach;
|
981
|
+
|
982
|
+
|
983
|
+
|
984
|
+
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
985
|
+
var USES_TO_LENGTH$3 = arrayMethodUsesToLength('forEach');
|
986
|
+
|
987
|
+
// `Array.prototype.forEach` method implementation
|
988
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
989
|
+
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$3) ? function forEach(callbackfn /* , thisArg */) {
|
990
|
+
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
991
|
+
} : [].forEach;
|
992
|
+
|
993
|
+
// `Array.prototype.forEach` method
|
994
|
+
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
995
|
+
_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
|
996
|
+
forEach: arrayForEach
|
997
|
+
});
|
998
|
+
|
1301
999
|
var $includes = arrayIncludes.includes;
|
1302
1000
|
|
1303
1001
|
|
1002
|
+
|
1003
|
+
var USES_TO_LENGTH$4 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
1004
|
+
|
1304
1005
|
// `Array.prototype.includes` method
|
1305
1006
|
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
1306
|
-
_export({ target: 'Array', proto: true }, {
|
1007
|
+
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$4 }, {
|
1307
1008
|
includes: function includes(el /* , fromIndex = 0 */) {
|
1308
1009
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
1309
1010
|
}
|
@@ -1312,25 +1013,19 @@
|
|
1312
1013
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
1313
1014
|
addToUnscopables('includes');
|
1314
1015
|
|
1315
|
-
var sloppyArrayMethod = function (METHOD_NAME, argument) {
|
1316
|
-
var method = [][METHOD_NAME];
|
1317
|
-
return !method || !fails(function () {
|
1318
|
-
// eslint-disable-next-line no-useless-call,no-throw-literal
|
1319
|
-
method.call(null, argument || function () { throw 1; }, 1);
|
1320
|
-
});
|
1321
|
-
};
|
1322
|
-
|
1323
1016
|
var $indexOf = arrayIncludes.indexOf;
|
1324
1017
|
|
1325
1018
|
|
1019
|
+
|
1326
1020
|
var nativeIndexOf = [].indexOf;
|
1327
1021
|
|
1328
1022
|
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
1329
|
-
var
|
1023
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');
|
1024
|
+
var USES_TO_LENGTH$5 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
1330
1025
|
|
1331
1026
|
// `Array.prototype.indexOf` method
|
1332
1027
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
1333
|
-
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO ||
|
1028
|
+
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$5 }, {
|
1334
1029
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
1335
1030
|
return NEGATIVE_ZERO
|
1336
1031
|
// convert -0 to +0
|
@@ -1346,7 +1041,7 @@
|
|
1346
1041
|
});
|
1347
1042
|
|
1348
1043
|
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
1349
|
-
var ObjectPrototype
|
1044
|
+
var ObjectPrototype = Object.prototype;
|
1350
1045
|
|
1351
1046
|
// `Object.getPrototypeOf` method
|
1352
1047
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
@@ -1355,7 +1050,7 @@
|
|
1355
1050
|
if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
|
1356
1051
|
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
1357
1052
|
return O.constructor.prototype;
|
1358
|
-
} return O instanceof Object ? ObjectPrototype
|
1053
|
+
} return O instanceof Object ? ObjectPrototype : null;
|
1359
1054
|
};
|
1360
1055
|
|
1361
1056
|
var ITERATOR = wellKnownSymbol('iterator');
|
@@ -1389,6 +1084,18 @@
|
|
1389
1084
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
1390
1085
|
};
|
1391
1086
|
|
1087
|
+
var defineProperty$1 = objectDefineProperty.f;
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1092
|
+
|
1093
|
+
var setToStringTag = function (it, TAG, STATIC) {
|
1094
|
+
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
|
1095
|
+
defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
|
1096
|
+
}
|
1097
|
+
};
|
1098
|
+
|
1392
1099
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
1393
1100
|
|
1394
1101
|
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
@@ -1503,8 +1210,8 @@
|
|
1503
1210
|
};
|
1504
1211
|
|
1505
1212
|
var ARRAY_ITERATOR = 'Array Iterator';
|
1506
|
-
var setInternalState
|
1507
|
-
var getInternalState
|
1213
|
+
var setInternalState = internalState.set;
|
1214
|
+
var getInternalState = internalState.getterFor(ARRAY_ITERATOR);
|
1508
1215
|
|
1509
1216
|
// `Array.prototype.entries` method
|
1510
1217
|
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
@@ -1517,7 +1224,7 @@
|
|
1517
1224
|
// `CreateArrayIterator` internal method
|
1518
1225
|
// https://tc39.github.io/ecma262/#sec-createarrayiterator
|
1519
1226
|
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
1520
|
-
setInternalState
|
1227
|
+
setInternalState(this, {
|
1521
1228
|
type: ARRAY_ITERATOR,
|
1522
1229
|
target: toIndexedObject(iterated), // target
|
1523
1230
|
index: 0, // next index
|
@@ -1526,7 +1233,7 @@
|
|
1526
1233
|
// `%ArrayIteratorPrototype%.next` method
|
1527
1234
|
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
|
1528
1235
|
}, function () {
|
1529
|
-
var state = getInternalState
|
1236
|
+
var state = getInternalState(this);
|
1530
1237
|
var target = state.target;
|
1531
1238
|
var kind = state.kind;
|
1532
1239
|
var index = state.index++;
|
@@ -1547,11 +1254,11 @@
|
|
1547
1254
|
var nativeJoin = [].join;
|
1548
1255
|
|
1549
1256
|
var ES3_STRINGS = indexedObject != Object;
|
1550
|
-
var
|
1257
|
+
var STRICT_METHOD$2 = arrayMethodIsStrict('join', ',');
|
1551
1258
|
|
1552
1259
|
// `Array.prototype.join` method
|
1553
1260
|
// https://tc39.github.io/ecma262/#sec-array.prototype.join
|
1554
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS ||
|
1261
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, {
|
1555
1262
|
join: function join(separator) {
|
1556
1263
|
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
1557
1264
|
}
|
@@ -1563,14 +1270,12 @@
|
|
1563
1270
|
|
1564
1271
|
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map');
|
1565
1272
|
// FF49- issue
|
1566
|
-
var USES_TO_LENGTH$
|
1567
|
-
[].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
|
1568
|
-
});
|
1273
|
+
var USES_TO_LENGTH$6 = arrayMethodUsesToLength('map');
|
1569
1274
|
|
1570
1275
|
// `Array.prototype.map` method
|
1571
1276
|
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
1572
1277
|
// with adding support of @@species
|
1573
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$
|
1278
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$6 }, {
|
1574
1279
|
map: function map(callbackfn /* , thisArg */) {
|
1575
1280
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1576
1281
|
}
|
@@ -1591,6 +1296,9 @@
|
|
1591
1296
|
}
|
1592
1297
|
});
|
1593
1298
|
|
1299
|
+
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
|
1300
|
+
var USES_TO_LENGTH$7 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
|
1301
|
+
|
1594
1302
|
var SPECIES$2 = wellKnownSymbol('species');
|
1595
1303
|
var nativeSlice = [].slice;
|
1596
1304
|
var max$1 = Math.max;
|
@@ -1598,7 +1306,7 @@
|
|
1598
1306
|
// `Array.prototype.slice` method
|
1599
1307
|
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
|
1600
1308
|
// fallback for not array-like ES3 strings and DOM objects
|
1601
|
-
_export({ target: 'Array', proto: true, forced: !
|
1309
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$7 }, {
|
1602
1310
|
slice: function slice(start, end) {
|
1603
1311
|
var O = toIndexedObject(this);
|
1604
1312
|
var length = toLength(O.length);
|
@@ -1638,9 +1346,9 @@
|
|
1638
1346
|
test$1.sort(null);
|
1639
1347
|
});
|
1640
1348
|
// Old WebKit
|
1641
|
-
var
|
1349
|
+
var STRICT_METHOD$3 = arrayMethodIsStrict('sort');
|
1642
1350
|
|
1643
|
-
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL ||
|
1351
|
+
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$3;
|
1644
1352
|
|
1645
1353
|
// `Array.prototype.sort` method
|
1646
1354
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
@@ -1652,6 +1360,9 @@
|
|
1652
1360
|
}
|
1653
1361
|
});
|
1654
1362
|
|
1363
|
+
var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice');
|
1364
|
+
var USES_TO_LENGTH$8 = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
|
1365
|
+
|
1655
1366
|
var max$2 = Math.max;
|
1656
1367
|
var min$2 = Math.min;
|
1657
1368
|
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
@@ -1660,7 +1371,7 @@
|
|
1660
1371
|
// `Array.prototype.splice` method
|
1661
1372
|
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
|
1662
1373
|
// with adding support of @@species
|
1663
|
-
_export({ target: 'Array', proto: true, forced: !
|
1374
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$8 }, {
|
1664
1375
|
splice: function splice(start, deleteCount /* , ...items */) {
|
1665
1376
|
var O = toObject(this);
|
1666
1377
|
var len = toLength(O.length);
|
@@ -1756,7 +1467,7 @@
|
|
1756
1467
|
|
1757
1468
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
1758
1469
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
1759
|
-
var defineProperty$
|
1470
|
+
var defineProperty$2 = objectDefineProperty.f;
|
1760
1471
|
var trim = stringTrim.trim;
|
1761
1472
|
|
1762
1473
|
var NUMBER = 'Number';
|
@@ -1811,10 +1522,12 @@
|
|
1811
1522
|
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
1812
1523
|
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
1813
1524
|
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
1814
|
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
|
1525
|
+
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
|
1526
|
+
// ESNext
|
1527
|
+
'fromString,range'
|
1815
1528
|
).split(','), j = 0, key; keys$1.length > j; j++) {
|
1816
1529
|
if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
|
1817
|
-
defineProperty$
|
1530
|
+
defineProperty$2(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
|
1818
1531
|
}
|
1819
1532
|
}
|
1820
1533
|
NumberWrapper.prototype = NumberPrototype;
|
@@ -1823,16 +1536,16 @@
|
|
1823
1536
|
}
|
1824
1537
|
|
1825
1538
|
var nativeAssign = Object.assign;
|
1826
|
-
var defineProperty$
|
1539
|
+
var defineProperty$3 = Object.defineProperty;
|
1827
1540
|
|
1828
1541
|
// `Object.assign` method
|
1829
1542
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
1830
1543
|
var objectAssign = !nativeAssign || fails(function () {
|
1831
1544
|
// should have correct order of operations (Edge bug)
|
1832
|
-
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$
|
1545
|
+
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$3({}, 'a', {
|
1833
1546
|
enumerable: true,
|
1834
1547
|
get: function () {
|
1835
|
-
defineProperty$
|
1548
|
+
defineProperty$3(this, 'b', {
|
1836
1549
|
value: 3,
|
1837
1550
|
enumerable: false
|
1838
1551
|
});
|
@@ -1957,43 +1670,52 @@
|
|
1957
1670
|
var trim$1 = stringTrim.trim;
|
1958
1671
|
|
1959
1672
|
|
1960
|
-
var
|
1961
|
-
var FORCED$2 = 1 /
|
1673
|
+
var $parseFloat = global_1.parseFloat;
|
1674
|
+
var FORCED$2 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
|
1962
1675
|
|
1963
1676
|
// `parseFloat` method
|
1964
1677
|
// https://tc39.github.io/ecma262/#sec-parsefloat-string
|
1965
|
-
var
|
1678
|
+
var numberParseFloat = FORCED$2 ? function parseFloat(string) {
|
1966
1679
|
var trimmedString = trim$1(String(string));
|
1967
|
-
var result =
|
1680
|
+
var result = $parseFloat(trimmedString);
|
1968
1681
|
return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
|
1969
|
-
} :
|
1682
|
+
} : $parseFloat;
|
1970
1683
|
|
1971
1684
|
// `parseFloat` method
|
1972
1685
|
// https://tc39.github.io/ecma262/#sec-parsefloat-string
|
1973
|
-
_export({ global: true, forced: parseFloat !=
|
1974
|
-
parseFloat:
|
1686
|
+
_export({ global: true, forced: parseFloat != numberParseFloat }, {
|
1687
|
+
parseFloat: numberParseFloat
|
1975
1688
|
});
|
1976
1689
|
|
1977
1690
|
var trim$2 = stringTrim.trim;
|
1978
1691
|
|
1979
1692
|
|
1980
|
-
var
|
1693
|
+
var $parseInt = global_1.parseInt;
|
1981
1694
|
var hex = /^[+-]?0[Xx]/;
|
1982
|
-
var FORCED$3 =
|
1695
|
+
var FORCED$3 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
|
1983
1696
|
|
1984
1697
|
// `parseInt` method
|
1985
1698
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
1986
|
-
var
|
1699
|
+
var numberParseInt = FORCED$3 ? function parseInt(string, radix) {
|
1987
1700
|
var S = trim$2(String(string));
|
1988
|
-
return
|
1989
|
-
} :
|
1701
|
+
return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
1702
|
+
} : $parseInt;
|
1990
1703
|
|
1991
1704
|
// `parseInt` method
|
1992
1705
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
1993
|
-
_export({ global: true, forced: parseInt !=
|
1994
|
-
parseInt:
|
1706
|
+
_export({ global: true, forced: parseInt != numberParseInt }, {
|
1707
|
+
parseInt: numberParseInt
|
1995
1708
|
});
|
1996
1709
|
|
1710
|
+
var MATCH = wellKnownSymbol('match');
|
1711
|
+
|
1712
|
+
// `IsRegExp` abstract operation
|
1713
|
+
// https://tc39.github.io/ecma262/#sec-isregexp
|
1714
|
+
var isRegexp = function (it) {
|
1715
|
+
var isRegExp;
|
1716
|
+
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1717
|
+
};
|
1718
|
+
|
1997
1719
|
// `RegExp.prototype.flags` getter implementation
|
1998
1720
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
1999
1721
|
var regexpFlags = function () {
|
@@ -2033,6 +1755,101 @@
|
|
2033
1755
|
BROKEN_CARET: BROKEN_CARET
|
2034
1756
|
};
|
2035
1757
|
|
1758
|
+
var SPECIES$3 = wellKnownSymbol('species');
|
1759
|
+
|
1760
|
+
var setSpecies = function (CONSTRUCTOR_NAME) {
|
1761
|
+
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
|
1762
|
+
var defineProperty = objectDefineProperty.f;
|
1763
|
+
|
1764
|
+
if (descriptors && Constructor && !Constructor[SPECIES$3]) {
|
1765
|
+
defineProperty(Constructor, SPECIES$3, {
|
1766
|
+
configurable: true,
|
1767
|
+
get: function () { return this; }
|
1768
|
+
});
|
1769
|
+
}
|
1770
|
+
};
|
1771
|
+
|
1772
|
+
var defineProperty$4 = objectDefineProperty.f;
|
1773
|
+
var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
|
1774
|
+
|
1775
|
+
|
1776
|
+
|
1777
|
+
|
1778
|
+
|
1779
|
+
var setInternalState$1 = internalState.set;
|
1780
|
+
|
1781
|
+
|
1782
|
+
|
1783
|
+
var MATCH$1 = wellKnownSymbol('match');
|
1784
|
+
var NativeRegExp = global_1.RegExp;
|
1785
|
+
var RegExpPrototype = NativeRegExp.prototype;
|
1786
|
+
var re1 = /a/g;
|
1787
|
+
var re2 = /a/g;
|
1788
|
+
|
1789
|
+
// "new" should create a new object, old webkit bug
|
1790
|
+
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
1791
|
+
|
1792
|
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y;
|
1793
|
+
|
1794
|
+
var FORCED$4 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y$1 || fails(function () {
|
1795
|
+
re2[MATCH$1] = false;
|
1796
|
+
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
1797
|
+
return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
|
1798
|
+
})));
|
1799
|
+
|
1800
|
+
// `RegExp` constructor
|
1801
|
+
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
1802
|
+
if (FORCED$4) {
|
1803
|
+
var RegExpWrapper = function RegExp(pattern, flags) {
|
1804
|
+
var thisIsRegExp = this instanceof RegExpWrapper;
|
1805
|
+
var patternIsRegExp = isRegexp(pattern);
|
1806
|
+
var flagsAreUndefined = flags === undefined;
|
1807
|
+
var sticky;
|
1808
|
+
|
1809
|
+
if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {
|
1810
|
+
return pattern;
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
if (CORRECT_NEW) {
|
1814
|
+
if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;
|
1815
|
+
} else if (pattern instanceof RegExpWrapper) {
|
1816
|
+
if (flagsAreUndefined) flags = regexpFlags.call(pattern);
|
1817
|
+
pattern = pattern.source;
|
1818
|
+
}
|
1819
|
+
|
1820
|
+
if (UNSUPPORTED_Y$1) {
|
1821
|
+
sticky = !!flags && flags.indexOf('y') > -1;
|
1822
|
+
if (sticky) flags = flags.replace(/y/g, '');
|
1823
|
+
}
|
1824
|
+
|
1825
|
+
var result = inheritIfRequired(
|
1826
|
+
CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),
|
1827
|
+
thisIsRegExp ? this : RegExpPrototype,
|
1828
|
+
RegExpWrapper
|
1829
|
+
);
|
1830
|
+
|
1831
|
+
if (UNSUPPORTED_Y$1 && sticky) setInternalState$1(result, { sticky: sticky });
|
1832
|
+
|
1833
|
+
return result;
|
1834
|
+
};
|
1835
|
+
var proxy = function (key) {
|
1836
|
+
key in RegExpWrapper || defineProperty$4(RegExpWrapper, key, {
|
1837
|
+
configurable: true,
|
1838
|
+
get: function () { return NativeRegExp[key]; },
|
1839
|
+
set: function (it) { NativeRegExp[key] = it; }
|
1840
|
+
});
|
1841
|
+
};
|
1842
|
+
var keys$2 = getOwnPropertyNames$1(NativeRegExp);
|
1843
|
+
var index = 0;
|
1844
|
+
while (keys$2.length > index) proxy(keys$2[index++]);
|
1845
|
+
RegExpPrototype.constructor = RegExpWrapper;
|
1846
|
+
RegExpWrapper.prototype = RegExpPrototype;
|
1847
|
+
redefine(global_1, 'RegExp', RegExpWrapper);
|
1848
|
+
}
|
1849
|
+
|
1850
|
+
// https://tc39.github.io/ecma262/#sec-get-regexp-@@species
|
1851
|
+
setSpecies('RegExp');
|
1852
|
+
|
2036
1853
|
var nativeExec = RegExp.prototype.exec;
|
2037
1854
|
// This always refers to the native implementation, because the
|
2038
1855
|
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
@@ -2049,18 +1866,18 @@
|
|
2049
1866
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
2050
1867
|
})();
|
2051
1868
|
|
2052
|
-
var UNSUPPORTED_Y$
|
1869
|
+
var UNSUPPORTED_Y$2 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
2053
1870
|
|
2054
1871
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
2055
1872
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
2056
1873
|
|
2057
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$
|
1874
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2;
|
2058
1875
|
|
2059
1876
|
if (PATCH) {
|
2060
1877
|
patchedExec = function exec(str) {
|
2061
1878
|
var re = this;
|
2062
1879
|
var lastIndex, reCopy, match, i;
|
2063
|
-
var sticky = UNSUPPORTED_Y$
|
1880
|
+
var sticky = UNSUPPORTED_Y$2 && re.sticky;
|
2064
1881
|
var flags = regexpFlags.call(re);
|
2065
1882
|
var source = re.source;
|
2066
1883
|
var charsAdded = 0;
|
@@ -2122,8 +1939,8 @@
|
|
2122
1939
|
});
|
2123
1940
|
|
2124
1941
|
var TO_STRING = 'toString';
|
2125
|
-
var RegExpPrototype = RegExp.prototype;
|
2126
|
-
var nativeToString = RegExpPrototype[TO_STRING];
|
1942
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
1943
|
+
var nativeToString = RegExpPrototype$1[TO_STRING];
|
2127
1944
|
|
2128
1945
|
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
2129
1946
|
// FF44- RegExp#toString has a wrong name
|
@@ -2136,37 +1953,28 @@
|
|
2136
1953
|
var R = anObject(this);
|
2137
1954
|
var p = String(R.source);
|
2138
1955
|
var rf = R.flags;
|
2139
|
-
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
|
1956
|
+
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$1) ? regexpFlags.call(R) : rf);
|
2140
1957
|
return '/' + p + '/' + f;
|
2141
1958
|
}, { unsafe: true });
|
2142
1959
|
}
|
2143
1960
|
|
2144
|
-
var MATCH = wellKnownSymbol('match');
|
2145
|
-
|
2146
|
-
// `IsRegExp` abstract operation
|
2147
|
-
// https://tc39.github.io/ecma262/#sec-isregexp
|
2148
|
-
var isRegexp = function (it) {
|
2149
|
-
var isRegExp;
|
2150
|
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
2151
|
-
};
|
2152
|
-
|
2153
1961
|
var notARegexp = function (it) {
|
2154
1962
|
if (isRegexp(it)) {
|
2155
1963
|
throw TypeError("The method doesn't accept regular expressions");
|
2156
1964
|
} return it;
|
2157
1965
|
};
|
2158
1966
|
|
2159
|
-
var MATCH$
|
1967
|
+
var MATCH$2 = wellKnownSymbol('match');
|
2160
1968
|
|
2161
1969
|
var correctIsRegexpLogic = function (METHOD_NAME) {
|
2162
1970
|
var regexp = /./;
|
2163
1971
|
try {
|
2164
1972
|
'/./'[METHOD_NAME](regexp);
|
2165
|
-
} catch (
|
1973
|
+
} catch (error1) {
|
2166
1974
|
try {
|
2167
|
-
regexp[MATCH$
|
1975
|
+
regexp[MATCH$2] = false;
|
2168
1976
|
return '/./'[METHOD_NAME](regexp);
|
2169
|
-
} catch (
|
1977
|
+
} catch (error2) { /* empty */ }
|
2170
1978
|
} return false;
|
2171
1979
|
};
|
2172
1980
|
|
@@ -2179,61 +1987,15 @@
|
|
2179
1987
|
}
|
2180
1988
|
});
|
2181
1989
|
|
2182
|
-
//
|
2183
|
-
var createMethod$4 = function (CONVERT_TO_STRING) {
|
2184
|
-
return function ($this, pos) {
|
2185
|
-
var S = String(requireObjectCoercible($this));
|
2186
|
-
var position = toInteger(pos);
|
2187
|
-
var size = S.length;
|
2188
|
-
var first, second;
|
2189
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
2190
|
-
first = S.charCodeAt(position);
|
2191
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
2192
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
2193
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
2194
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
2195
|
-
};
|
2196
|
-
};
|
1990
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
2197
1991
|
|
2198
|
-
var stringMultibyte = {
|
2199
|
-
// `String.prototype.codePointAt` method
|
2200
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
2201
|
-
codeAt: createMethod$4(false),
|
2202
|
-
// `String.prototype.at` method
|
2203
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
2204
|
-
charAt: createMethod$4(true)
|
2205
|
-
};
|
2206
1992
|
|
2207
|
-
var charAt = stringMultibyte.charAt;
|
2208
1993
|
|
2209
1994
|
|
2210
1995
|
|
2211
|
-
var STRING_ITERATOR = 'String Iterator';
|
2212
|
-
var setInternalState$2 = internalState.set;
|
2213
|
-
var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
|
2214
1996
|
|
2215
|
-
// `String.prototype[@@iterator]` method
|
2216
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
2217
|
-
defineIterator(String, 'String', function (iterated) {
|
2218
|
-
setInternalState$2(this, {
|
2219
|
-
type: STRING_ITERATOR,
|
2220
|
-
string: String(iterated),
|
2221
|
-
index: 0
|
2222
|
-
});
|
2223
|
-
// `%StringIteratorPrototype%.next` method
|
2224
|
-
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
2225
|
-
}, function next() {
|
2226
|
-
var state = getInternalState$2(this);
|
2227
|
-
var string = state.string;
|
2228
|
-
var index = state.index;
|
2229
|
-
var point;
|
2230
|
-
if (index >= string.length) return { value: undefined, done: true };
|
2231
|
-
point = charAt(string, index);
|
2232
|
-
state.index += point.length;
|
2233
|
-
return { value: point, done: false };
|
2234
|
-
});
|
2235
1997
|
|
2236
|
-
var SPECIES$
|
1998
|
+
var SPECIES$4 = wellKnownSymbol('species');
|
2237
1999
|
|
2238
2000
|
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
2239
2001
|
// #replace needs built-in support for named groups.
|
@@ -2254,6 +2016,15 @@
|
|
2254
2016
|
return 'a'.replace(/./, '$0') === '$0';
|
2255
2017
|
})();
|
2256
2018
|
|
2019
|
+
var REPLACE = wellKnownSymbol('replace');
|
2020
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
2021
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
2022
|
+
if (/./[REPLACE]) {
|
2023
|
+
return /./[REPLACE]('a', '$0') === '';
|
2024
|
+
}
|
2025
|
+
return false;
|
2026
|
+
})();
|
2027
|
+
|
2257
2028
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
2258
2029
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
2259
2030
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
@@ -2287,7 +2058,7 @@
|
|
2287
2058
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
2288
2059
|
// a new one. We need to return the patched regex when creating the new one.
|
2289
2060
|
re.constructor = {};
|
2290
|
-
re.constructor[SPECIES$
|
2061
|
+
re.constructor[SPECIES$4] = function () { return re; };
|
2291
2062
|
re.flags = '';
|
2292
2063
|
re[SYMBOL] = /./[SYMBOL];
|
2293
2064
|
}
|
@@ -2301,7 +2072,11 @@
|
|
2301
2072
|
if (
|
2302
2073
|
!DELEGATES_TO_SYMBOL ||
|
2303
2074
|
!DELEGATES_TO_EXEC ||
|
2304
|
-
(KEY === 'replace' && !(
|
2075
|
+
(KEY === 'replace' && !(
|
2076
|
+
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
2077
|
+
REPLACE_KEEPS_$0 &&
|
2078
|
+
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
2079
|
+
)) ||
|
2305
2080
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
2306
2081
|
) {
|
2307
2082
|
var nativeRegExpMethod = /./[SYMBOL];
|
@@ -2316,7 +2091,10 @@
|
|
2316
2091
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
2317
2092
|
}
|
2318
2093
|
return { done: false };
|
2319
|
-
}, {
|
2094
|
+
}, {
|
2095
|
+
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
2096
|
+
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
2097
|
+
});
|
2320
2098
|
var stringMethod = methods[0];
|
2321
2099
|
var regexMethod = methods[1];
|
2322
2100
|
|
@@ -2334,12 +2112,37 @@
|
|
2334
2112
|
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
2335
2113
|
};
|
2336
2114
|
|
2337
|
-
|
2115
|
+
// `String.prototype.{ codePointAt, at }` methods implementation
|
2116
|
+
var createMethod$4 = function (CONVERT_TO_STRING) {
|
2117
|
+
return function ($this, pos) {
|
2118
|
+
var S = String(requireObjectCoercible($this));
|
2119
|
+
var position = toInteger(pos);
|
2120
|
+
var size = S.length;
|
2121
|
+
var first, second;
|
2122
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
2123
|
+
first = S.charCodeAt(position);
|
2124
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
2125
|
+
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
2126
|
+
? CONVERT_TO_STRING ? S.charAt(position) : first
|
2127
|
+
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
2128
|
+
};
|
2129
|
+
};
|
2130
|
+
|
2131
|
+
var stringMultibyte = {
|
2132
|
+
// `String.prototype.codePointAt` method
|
2133
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
2134
|
+
codeAt: createMethod$4(false),
|
2135
|
+
// `String.prototype.at` method
|
2136
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
2137
|
+
charAt: createMethod$4(true)
|
2138
|
+
};
|
2139
|
+
|
2140
|
+
var charAt = stringMultibyte.charAt;
|
2338
2141
|
|
2339
2142
|
// `AdvanceStringIndex` abstract operation
|
2340
2143
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
2341
2144
|
var advanceStringIndex = function (S, index, unicode) {
|
2342
|
-
return index + (unicode ? charAt
|
2145
|
+
return index + (unicode ? charAt(S, index).length : 1);
|
2343
2146
|
};
|
2344
2147
|
|
2345
2148
|
// `RegExpExec` abstract operation
|
@@ -2373,6 +2176,10 @@
|
|
2373
2176
|
|
2374
2177
|
// @@replace logic
|
2375
2178
|
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
|
2179
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
|
2180
|
+
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
|
2181
|
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
2182
|
+
|
2376
2183
|
return [
|
2377
2184
|
// `String.prototype.replace` method
|
2378
2185
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
@@ -2386,7 +2193,10 @@
|
|
2386
2193
|
// `RegExp.prototype[@@replace]` method
|
2387
2194
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
2388
2195
|
function (regexp, replaceValue) {
|
2389
|
-
if (
|
2196
|
+
if (
|
2197
|
+
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
2198
|
+
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
|
2199
|
+
) {
|
2390
2200
|
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
2391
2201
|
if (res.done) return res.value;
|
2392
2202
|
}
|
@@ -2515,14 +2325,14 @@
|
|
2515
2325
|
];
|
2516
2326
|
});
|
2517
2327
|
|
2518
|
-
var SPECIES$
|
2328
|
+
var SPECIES$5 = wellKnownSymbol('species');
|
2519
2329
|
|
2520
2330
|
// `SpeciesConstructor` abstract operation
|
2521
2331
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
2522
2332
|
var speciesConstructor = function (O, defaultConstructor) {
|
2523
2333
|
var C = anObject(O).constructor;
|
2524
2334
|
var S;
|
2525
|
-
return C === undefined || (S = anObject(C)[SPECIES$
|
2335
|
+
return C === undefined || (S = anObject(C)[SPECIES$5]) == undefined ? defaultConstructor : aFunction$1(S);
|
2526
2336
|
};
|
2527
2337
|
|
2528
2338
|
var arrayPush = [].push;
|
@@ -2652,7 +2462,7 @@
|
|
2652
2462
|
|
2653
2463
|
// check that a method works with the correct list
|
2654
2464
|
// of whitespaces and has a correct name
|
2655
|
-
var
|
2465
|
+
var stringTrimForced = function (METHOD_NAME) {
|
2656
2466
|
return fails(function () {
|
2657
2467
|
return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
|
2658
2468
|
});
|
@@ -2663,7 +2473,7 @@
|
|
2663
2473
|
|
2664
2474
|
// `String.prototype.trim` method
|
2665
2475
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
2666
|
-
_export({ target: 'String', proto: true, forced:
|
2476
|
+
_export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
|
2667
2477
|
trim: function trim() {
|
2668
2478
|
return $trim(this);
|
2669
2479
|
}
|
@@ -2705,15 +2515,6 @@
|
|
2705
2515
|
TouchList: 0
|
2706
2516
|
};
|
2707
2517
|
|
2708
|
-
var $forEach$1 = arrayIteration.forEach;
|
2709
|
-
|
2710
|
-
|
2711
|
-
// `Array.prototype.forEach` method implementation
|
2712
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
2713
|
-
var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
|
2714
|
-
return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
2715
|
-
} : [].forEach;
|
2716
|
-
|
2717
2518
|
for (var COLLECTION_NAME in domIterables) {
|
2718
2519
|
var Collection = global_1[COLLECTION_NAME];
|
2719
2520
|
var CollectionPrototype = Collection && Collection.prototype;
|
@@ -2754,6 +2555,8 @@
|
|
2754
2555
|
}
|
2755
2556
|
|
2756
2557
|
function _typeof(obj) {
|
2558
|
+
"@babel/helpers - typeof";
|
2559
|
+
|
2757
2560
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
2758
2561
|
_typeof = function (obj) {
|
2759
2562
|
return typeof obj;
|
@@ -2790,19 +2593,15 @@
|
|
2790
2593
|
}
|
2791
2594
|
|
2792
2595
|
function _slicedToArray(arr, i) {
|
2793
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
2596
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
2794
2597
|
}
|
2795
2598
|
|
2796
2599
|
function _toConsumableArray(arr) {
|
2797
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
2600
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
2798
2601
|
}
|
2799
2602
|
|
2800
2603
|
function _arrayWithoutHoles(arr) {
|
2801
|
-
if (Array.isArray(arr))
|
2802
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
2803
|
-
|
2804
|
-
return arr2;
|
2805
|
-
}
|
2604
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
2806
2605
|
}
|
2807
2606
|
|
2808
2607
|
function _arrayWithHoles(arr) {
|
@@ -2810,14 +2609,11 @@
|
|
2810
2609
|
}
|
2811
2610
|
|
2812
2611
|
function _iterableToArray(iter) {
|
2813
|
-
if (Symbol.iterator in Object(iter)
|
2612
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
2814
2613
|
}
|
2815
2614
|
|
2816
2615
|
function _iterableToArrayLimit(arr, i) {
|
2817
|
-
if (!(Symbol.iterator in Object(arr)
|
2818
|
-
return;
|
2819
|
-
}
|
2820
|
-
|
2616
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
2821
2617
|
var _arr = [];
|
2822
2618
|
var _n = true;
|
2823
2619
|
var _d = false;
|
@@ -2843,19 +2639,95 @@
|
|
2843
2639
|
return _arr;
|
2844
2640
|
}
|
2845
2641
|
|
2642
|
+
function _unsupportedIterableToArray(o, minLen) {
|
2643
|
+
if (!o) return;
|
2644
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
2645
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
2646
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
2647
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
2648
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
2649
|
+
}
|
2650
|
+
|
2651
|
+
function _arrayLikeToArray(arr, len) {
|
2652
|
+
if (len == null || len > arr.length) len = arr.length;
|
2653
|
+
|
2654
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
2655
|
+
|
2656
|
+
return arr2;
|
2657
|
+
}
|
2658
|
+
|
2846
2659
|
function _nonIterableSpread() {
|
2847
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
2660
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
2848
2661
|
}
|
2849
2662
|
|
2850
2663
|
function _nonIterableRest() {
|
2851
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
2664
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
2665
|
+
}
|
2666
|
+
|
2667
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
2668
|
+
var it;
|
2669
|
+
|
2670
|
+
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
|
2671
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
2672
|
+
if (it) o = it;
|
2673
|
+
var i = 0;
|
2674
|
+
|
2675
|
+
var F = function () {};
|
2676
|
+
|
2677
|
+
return {
|
2678
|
+
s: F,
|
2679
|
+
n: function () {
|
2680
|
+
if (i >= o.length) return {
|
2681
|
+
done: true
|
2682
|
+
};
|
2683
|
+
return {
|
2684
|
+
done: false,
|
2685
|
+
value: o[i++]
|
2686
|
+
};
|
2687
|
+
},
|
2688
|
+
e: function (e) {
|
2689
|
+
throw e;
|
2690
|
+
},
|
2691
|
+
f: F
|
2692
|
+
};
|
2693
|
+
}
|
2694
|
+
|
2695
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
2696
|
+
}
|
2697
|
+
|
2698
|
+
var normalCompletion = true,
|
2699
|
+
didErr = false,
|
2700
|
+
err;
|
2701
|
+
return {
|
2702
|
+
s: function () {
|
2703
|
+
it = o[Symbol.iterator]();
|
2704
|
+
},
|
2705
|
+
n: function () {
|
2706
|
+
var step = it.next();
|
2707
|
+
normalCompletion = step.done;
|
2708
|
+
return step;
|
2709
|
+
},
|
2710
|
+
e: function (e) {
|
2711
|
+
didErr = true;
|
2712
|
+
err = e;
|
2713
|
+
},
|
2714
|
+
f: function () {
|
2715
|
+
try {
|
2716
|
+
if (!normalCompletion && it.return != null) it.return();
|
2717
|
+
} finally {
|
2718
|
+
if (didErr) throw err;
|
2719
|
+
}
|
2720
|
+
}
|
2721
|
+
};
|
2852
2722
|
}
|
2853
2723
|
|
2854
|
-
|
2724
|
+
/* eslint-disable no-unused-vars */
|
2725
|
+
|
2726
|
+
var VERSION = '1.18.2';
|
2855
2727
|
var bootstrapVersion = 4;
|
2856
2728
|
|
2857
2729
|
try {
|
2858
|
-
var rawVersion =
|
2730
|
+
var rawVersion = $__default['default'].fn.dropdown.Constructor.VERSION; // Only try to parse VERSION if it is defined.
|
2859
2731
|
// It is undefined in older versions of Bootstrap (tested with 3.1.1).
|
2860
2732
|
|
2861
2733
|
if (rawVersion !== undefined) {
|
@@ -2998,6 +2870,7 @@
|
|
2998
2870
|
buttonActive: 'active'
|
2999
2871
|
},
|
3000
2872
|
html: {
|
2873
|
+
dataToggle: 'data-bs-toggle',
|
3001
2874
|
toolbarDropdown: ['<div class="dropdown-menu dropdown-menu-right">', '</div>'],
|
3002
2875
|
toolbarDropdownItem: '<label class="dropdown-item dropdown-item-marker">%s</label>',
|
3003
2876
|
pageDropdown: ['<div class="dropdown-menu">', '</div>'],
|
@@ -3017,6 +2890,7 @@
|
|
3017
2890
|
var DEFAULTS = {
|
3018
2891
|
height: undefined,
|
3019
2892
|
classes: 'table table-bordered table-hover',
|
2893
|
+
buttons: {},
|
3020
2894
|
theadClasses: '',
|
3021
2895
|
headerStyle: function headerStyle(column) {
|
3022
2896
|
return {};
|
@@ -3061,6 +2935,7 @@
|
|
3061
2935
|
totalField: 'total',
|
3062
2936
|
totalNotFilteredField: 'totalNotFiltered',
|
3063
2937
|
dataField: 'rows',
|
2938
|
+
footerField: 'footer',
|
3064
2939
|
pagination: false,
|
3065
2940
|
paginationParts: ['pageInfo', 'pageSize', 'pageList'],
|
3066
2941
|
showExtendedPagination: false,
|
@@ -3087,8 +2962,10 @@
|
|
3087
2962
|
paginationUseIntermediate: false,
|
3088
2963
|
// Calculate intermediate pages for quick access
|
3089
2964
|
search: false,
|
2965
|
+
searchHighlight: false,
|
3090
2966
|
searchOnEnterKey: false,
|
3091
2967
|
strictSearch: false,
|
2968
|
+
searchSelector: false,
|
3092
2969
|
visibleSearch: false,
|
3093
2970
|
showButtonIcons: true,
|
3094
2971
|
showButtonText: false,
|
@@ -3104,6 +2981,7 @@
|
|
3104
2981
|
footerStyle: function footerStyle(column) {
|
3105
2982
|
return {};
|
3106
2983
|
},
|
2984
|
+
searchAccentNeutralise: false,
|
3107
2985
|
showColumns: false,
|
3108
2986
|
showColumnsToggleAll: false,
|
3109
2987
|
showColumnsSearch: false,
|
@@ -3148,7 +3026,6 @@
|
|
3148
3026
|
buttonsPrefix: CONSTANTS.classes.buttonsPrefix,
|
3149
3027
|
buttonsClass: CONSTANTS.classes.buttons,
|
3150
3028
|
icons: CONSTANTS.icons,
|
3151
|
-
html: CONSTANTS.html,
|
3152
3029
|
iconSize: undefined,
|
3153
3030
|
iconsPrefix: CONSTANTS.iconsPrefix,
|
3154
3031
|
// glyphicon or fa(font-awesome)
|
@@ -3314,7 +3191,7 @@
|
|
3314
3191
|
field: undefined,
|
3315
3192
|
title: undefined,
|
3316
3193
|
titleTooltip: undefined,
|
3317
|
-
|
3194
|
+
class: undefined,
|
3318
3195
|
width: undefined,
|
3319
3196
|
widthUnit: 'px',
|
3320
3197
|
rowspan: undefined,
|
@@ -3346,10 +3223,11 @@
|
|
3346
3223
|
footerFormatter: undefined,
|
3347
3224
|
detailFormatter: undefined,
|
3348
3225
|
searchFormatter: true,
|
3226
|
+
searchHighlightFormatter: false,
|
3349
3227
|
escape: false,
|
3350
3228
|
events: undefined
|
3351
3229
|
};
|
3352
|
-
var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', '
|
3230
|
+
var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandRowByUniqueId', 'collapseRowByUniqueId', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText'];
|
3353
3231
|
var EVENTS = {
|
3354
3232
|
'all.bs.table': 'onAll',
|
3355
3233
|
'click-row.bs.table': 'onClickRow',
|
@@ -3405,7 +3283,78 @@
|
|
3405
3283
|
}
|
3406
3284
|
});
|
3407
3285
|
|
3286
|
+
var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
|
3287
|
+
|
3288
|
+
|
3289
|
+
|
3290
|
+
|
3291
|
+
|
3292
|
+
|
3293
|
+
var nativeEndsWith = ''.endsWith;
|
3294
|
+
var min$5 = Math.min;
|
3295
|
+
|
3296
|
+
var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('endsWith');
|
3297
|
+
// https://github.com/zloirock/core-js/pull/702
|
3298
|
+
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
3299
|
+
var descriptor = getOwnPropertyDescriptor$3(String.prototype, 'endsWith');
|
3300
|
+
return descriptor && !descriptor.writable;
|
3301
|
+
}();
|
3302
|
+
|
3303
|
+
// `String.prototype.endsWith` method
|
3304
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
|
3305
|
+
_export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
3306
|
+
endsWith: function endsWith(searchString /* , endPosition = @length */) {
|
3307
|
+
var that = String(requireObjectCoercible(this));
|
3308
|
+
notARegexp(searchString);
|
3309
|
+
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
|
3310
|
+
var len = toLength(that.length);
|
3311
|
+
var end = endPosition === undefined ? len : min$5(toLength(endPosition), len);
|
3312
|
+
var search = String(searchString);
|
3313
|
+
return nativeEndsWith
|
3314
|
+
? nativeEndsWith.call(that, search, end)
|
3315
|
+
: that.slice(end - search.length, end) === search;
|
3316
|
+
}
|
3317
|
+
});
|
3318
|
+
|
3319
|
+
var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f;
|
3320
|
+
|
3321
|
+
|
3322
|
+
|
3323
|
+
|
3324
|
+
|
3325
|
+
|
3326
|
+
var nativeStartsWith = ''.startsWith;
|
3327
|
+
var min$6 = Math.min;
|
3328
|
+
|
3329
|
+
var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('startsWith');
|
3330
|
+
// https://github.com/zloirock/core-js/pull/702
|
3331
|
+
var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
|
3332
|
+
var descriptor = getOwnPropertyDescriptor$4(String.prototype, 'startsWith');
|
3333
|
+
return descriptor && !descriptor.writable;
|
3334
|
+
}();
|
3335
|
+
|
3336
|
+
// `String.prototype.startsWith` method
|
3337
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
|
3338
|
+
_export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
|
3339
|
+
startsWith: function startsWith(searchString /* , position = 0 */) {
|
3340
|
+
var that = String(requireObjectCoercible(this));
|
3341
|
+
notARegexp(searchString);
|
3342
|
+
var index = toLength(min$6(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
3343
|
+
var search = String(searchString);
|
3344
|
+
return nativeStartsWith
|
3345
|
+
? nativeStartsWith.call(that, search, index)
|
3346
|
+
: that.slice(index, index + search.length) === search;
|
3347
|
+
}
|
3348
|
+
});
|
3349
|
+
|
3408
3350
|
var Utils = {
|
3351
|
+
getSearchInput: function getSearchInput(that) {
|
3352
|
+
if (typeof that.options.searchSelector === 'string') {
|
3353
|
+
return $__default['default'](that.options.searchSelector);
|
3354
|
+
}
|
3355
|
+
|
3356
|
+
return that.$toolbar.find('.search input');
|
3357
|
+
},
|
3409
3358
|
// it only does '%s', and return '' when arguments are undefined
|
3410
3359
|
sprintf: function sprintf(_str) {
|
3411
3360
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
@@ -3428,6 +3377,9 @@
|
|
3428
3377
|
|
3429
3378
|
return flag ? str : '';
|
3430
3379
|
},
|
3380
|
+
isObject: function isObject(val) {
|
3381
|
+
return val instanceof Object && !Array.isArray(val);
|
3382
|
+
},
|
3431
3383
|
isEmptyObject: function isEmptyObject() {
|
3432
3384
|
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
3433
3385
|
return Object.entries(obj).length === 0 && obj.constructor === Object;
|
@@ -3436,12 +3388,11 @@
|
|
3436
3388
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
3437
3389
|
},
|
3438
3390
|
getFieldTitle: function getFieldTitle(list, value) {
|
3439
|
-
var
|
3440
|
-
|
3441
|
-
var _iteratorError = undefined;
|
3391
|
+
var _iterator = _createForOfIteratorHelper(list),
|
3392
|
+
_step;
|
3442
3393
|
|
3443
3394
|
try {
|
3444
|
-
for (
|
3395
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
3445
3396
|
var item = _step.value;
|
3446
3397
|
|
3447
3398
|
if (item.field === value) {
|
@@ -3449,18 +3400,9 @@
|
|
3449
3400
|
}
|
3450
3401
|
}
|
3451
3402
|
} catch (err) {
|
3452
|
-
|
3453
|
-
_iteratorError = err;
|
3403
|
+
_iterator.e(err);
|
3454
3404
|
} finally {
|
3455
|
-
|
3456
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
3457
|
-
_iterator.return();
|
3458
|
-
}
|
3459
|
-
} finally {
|
3460
|
-
if (_didIteratorError) {
|
3461
|
-
throw _iteratorError;
|
3462
|
-
}
|
3463
|
-
}
|
3405
|
+
_iterator.f();
|
3464
3406
|
}
|
3465
3407
|
|
3466
3408
|
return '';
|
@@ -3468,28 +3410,19 @@
|
|
3468
3410
|
setFieldIndex: function setFieldIndex(columns) {
|
3469
3411
|
var totalCol = 0;
|
3470
3412
|
var flag = [];
|
3471
|
-
|
3472
|
-
var
|
3473
|
-
|
3413
|
+
|
3414
|
+
var _iterator2 = _createForOfIteratorHelper(columns[0]),
|
3415
|
+
_step2;
|
3474
3416
|
|
3475
3417
|
try {
|
3476
|
-
for (
|
3418
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
3477
3419
|
var column = _step2.value;
|
3478
3420
|
totalCol += column.colspan || 1;
|
3479
3421
|
}
|
3480
3422
|
} catch (err) {
|
3481
|
-
|
3482
|
-
_iteratorError2 = err;
|
3423
|
+
_iterator2.e(err);
|
3483
3424
|
} finally {
|
3484
|
-
|
3485
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
3486
|
-
_iterator2.return();
|
3487
|
-
}
|
3488
|
-
} finally {
|
3489
|
-
if (_didIteratorError2) {
|
3490
|
-
throw _iteratorError2;
|
3491
|
-
}
|
3492
|
-
}
|
3425
|
+
_iterator2.f();
|
3493
3426
|
}
|
3494
3427
|
|
3495
3428
|
for (var i = 0; i < columns.length; i++) {
|
@@ -3501,12 +3434,11 @@
|
|
3501
3434
|
}
|
3502
3435
|
|
3503
3436
|
for (var _i = 0; _i < columns.length; _i++) {
|
3504
|
-
var
|
3505
|
-
|
3506
|
-
var _iteratorError3 = undefined;
|
3437
|
+
var _iterator3 = _createForOfIteratorHelper(columns[_i]),
|
3438
|
+
_step3;
|
3507
3439
|
|
3508
3440
|
try {
|
3509
|
-
for (
|
3441
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
3510
3442
|
var r = _step3.value;
|
3511
3443
|
var rowspan = r.rowspan || 1;
|
3512
3444
|
var colspan = r.colspan || 1;
|
@@ -3525,48 +3457,43 @@
|
|
3525
3457
|
r.colspanGroup = r.colspan;
|
3526
3458
|
}
|
3527
3459
|
|
3528
|
-
for (var
|
3529
|
-
|
3530
|
-
|
3531
|
-
|
3532
|
-
for (var _k = 0; _k < colspan; _k++) {
|
3533
|
-
flag[_i][index + _k] = true;
|
3460
|
+
for (var _j = 0; _j < rowspan; _j++) {
|
3461
|
+
for (var k = 0; k < colspan; k++) {
|
3462
|
+
flag[_i + _j][index + k] = true;
|
3463
|
+
}
|
3534
3464
|
}
|
3535
3465
|
}
|
3536
3466
|
} catch (err) {
|
3537
|
-
|
3538
|
-
_iteratorError3 = err;
|
3467
|
+
_iterator3.e(err);
|
3539
3468
|
} finally {
|
3540
|
-
|
3541
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
3542
|
-
_iterator3.return();
|
3543
|
-
}
|
3544
|
-
} finally {
|
3545
|
-
if (_didIteratorError3) {
|
3546
|
-
throw _iteratorError3;
|
3547
|
-
}
|
3548
|
-
}
|
3469
|
+
_iterator3.f();
|
3549
3470
|
}
|
3550
3471
|
}
|
3551
3472
|
},
|
3473
|
+
normalizeAccent: function normalizeAccent(value) {
|
3474
|
+
if (typeof value !== 'string') {
|
3475
|
+
return value;
|
3476
|
+
}
|
3477
|
+
|
3478
|
+
return value.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
3479
|
+
},
|
3552
3480
|
updateFieldGroup: function updateFieldGroup(columns) {
|
3553
3481
|
var _ref;
|
3554
3482
|
|
3555
3483
|
var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns));
|
3556
3484
|
|
3557
|
-
var
|
3558
|
-
|
3559
|
-
var _iteratorError4 = undefined;
|
3485
|
+
var _iterator4 = _createForOfIteratorHelper(columns),
|
3486
|
+
_step4;
|
3560
3487
|
|
3561
3488
|
try {
|
3562
|
-
for (
|
3489
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
3563
3490
|
var c = _step4.value;
|
3564
|
-
|
3565
|
-
var
|
3566
|
-
|
3491
|
+
|
3492
|
+
var _iterator5 = _createForOfIteratorHelper(c),
|
3493
|
+
_step5;
|
3567
3494
|
|
3568
3495
|
try {
|
3569
|
-
for (
|
3496
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
3570
3497
|
var r = _step5.value;
|
3571
3498
|
|
3572
3499
|
if (r.colspanGroup > 1) {
|
@@ -3591,41 +3518,23 @@
|
|
3591
3518
|
}
|
3592
3519
|
}
|
3593
3520
|
} catch (err) {
|
3594
|
-
|
3595
|
-
_iteratorError5 = err;
|
3521
|
+
_iterator5.e(err);
|
3596
3522
|
} finally {
|
3597
|
-
|
3598
|
-
if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
|
3599
|
-
_iterator5.return();
|
3600
|
-
}
|
3601
|
-
} finally {
|
3602
|
-
if (_didIteratorError5) {
|
3603
|
-
throw _iteratorError5;
|
3604
|
-
}
|
3605
|
-
}
|
3523
|
+
_iterator5.f();
|
3606
3524
|
}
|
3607
3525
|
}
|
3608
3526
|
} catch (err) {
|
3609
|
-
|
3610
|
-
_iteratorError4 = err;
|
3527
|
+
_iterator4.e(err);
|
3611
3528
|
} finally {
|
3612
|
-
|
3613
|
-
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
3614
|
-
_iterator4.return();
|
3615
|
-
}
|
3616
|
-
} finally {
|
3617
|
-
if (_didIteratorError4) {
|
3618
|
-
throw _iteratorError4;
|
3619
|
-
}
|
3620
|
-
}
|
3529
|
+
_iterator4.f();
|
3621
3530
|
}
|
3622
3531
|
},
|
3623
3532
|
getScrollBarWidth: function getScrollBarWidth() {
|
3624
3533
|
if (this.cachedWidth === undefined) {
|
3625
|
-
var $inner = $('<div/>').addClass('fixed-table-scroll-inner');
|
3626
|
-
var $outer = $('<div/>').addClass('fixed-table-scroll-outer');
|
3534
|
+
var $inner = $__default['default']('<div/>').addClass('fixed-table-scroll-inner');
|
3535
|
+
var $outer = $__default['default']('<div/>').addClass('fixed-table-scroll-outer');
|
3627
3536
|
$outer.append($inner);
|
3628
|
-
$('body').append($outer);
|
3537
|
+
$__default['default']('body').append($outer);
|
3629
3538
|
var w1 = $inner[0].offsetWidth;
|
3630
3539
|
$outer.css('overflow', 'scroll');
|
3631
3540
|
var w2 = $inner[0].offsetWidth;
|
@@ -3649,28 +3558,19 @@
|
|
3649
3558
|
|
3650
3559
|
if (names.length > 1) {
|
3651
3560
|
func = window;
|
3652
|
-
|
3653
|
-
var
|
3654
|
-
|
3561
|
+
|
3562
|
+
var _iterator6 = _createForOfIteratorHelper(names),
|
3563
|
+
_step6;
|
3655
3564
|
|
3656
3565
|
try {
|
3657
|
-
for (
|
3566
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
3658
3567
|
var f = _step6.value;
|
3659
3568
|
func = func[f];
|
3660
3569
|
}
|
3661
3570
|
} catch (err) {
|
3662
|
-
|
3663
|
-
_iteratorError6 = err;
|
3571
|
+
_iterator6.e(err);
|
3664
3572
|
} finally {
|
3665
|
-
|
3666
|
-
if (!_iteratorNormalCompletion6 && _iterator6.return != null) {
|
3667
|
-
_iterator6.return();
|
3668
|
-
}
|
3669
|
-
} finally {
|
3670
|
-
if (_didIteratorError6) {
|
3671
|
-
throw _iteratorError6;
|
3672
|
-
}
|
3673
|
-
}
|
3573
|
+
_iterator6.f();
|
3674
3574
|
}
|
3675
3575
|
} else {
|
3676
3576
|
func = window[name];
|
@@ -3747,28 +3647,19 @@
|
|
3747
3647
|
}
|
3748
3648
|
|
3749
3649
|
var props = field.split('.');
|
3750
|
-
|
3751
|
-
var
|
3752
|
-
|
3650
|
+
|
3651
|
+
var _iterator7 = _createForOfIteratorHelper(props),
|
3652
|
+
_step7;
|
3753
3653
|
|
3754
3654
|
try {
|
3755
|
-
for (
|
3655
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
3756
3656
|
var p = _step7.value;
|
3757
3657
|
value = value && value[p];
|
3758
3658
|
}
|
3759
3659
|
} catch (err) {
|
3760
|
-
|
3761
|
-
_iteratorError7 = err;
|
3660
|
+
_iterator7.e(err);
|
3762
3661
|
} finally {
|
3763
|
-
|
3764
|
-
if (!_iteratorNormalCompletion7 && _iterator7.return != null) {
|
3765
|
-
_iterator7.return();
|
3766
|
-
}
|
3767
|
-
} finally {
|
3768
|
-
if (_didIteratorError7) {
|
3769
|
-
throw _iteratorError7;
|
3770
|
-
}
|
3771
|
-
}
|
3662
|
+
_iterator7.f();
|
3772
3663
|
}
|
3773
3664
|
|
3774
3665
|
return escape ? this.escapeHTML(value) : value;
|
@@ -3777,12 +3668,11 @@
|
|
3777
3668
|
return navigator.userAgent.includes('MSIE ') || /Trident.*rv:11\./.test(navigator.userAgent);
|
3778
3669
|
},
|
3779
3670
|
findIndex: function findIndex(items, item) {
|
3780
|
-
var
|
3781
|
-
|
3782
|
-
var _iteratorError8 = undefined;
|
3671
|
+
var _iterator8 = _createForOfIteratorHelper(items),
|
3672
|
+
_step8;
|
3783
3673
|
|
3784
3674
|
try {
|
3785
|
-
for (
|
3675
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
3786
3676
|
var it = _step8.value;
|
3787
3677
|
|
3788
3678
|
if (JSON.stringify(it) === JSON.stringify(item)) {
|
@@ -3790,18 +3680,9 @@
|
|
3790
3680
|
}
|
3791
3681
|
}
|
3792
3682
|
} catch (err) {
|
3793
|
-
|
3794
|
-
_iteratorError8 = err;
|
3683
|
+
_iterator8.e(err);
|
3795
3684
|
} finally {
|
3796
|
-
|
3797
|
-
if (!_iteratorNormalCompletion8 && _iterator8.return != null) {
|
3798
|
-
_iterator8.return();
|
3799
|
-
}
|
3800
|
-
} finally {
|
3801
|
-
if (_didIteratorError8) {
|
3802
|
-
throw _iteratorError8;
|
3803
|
-
}
|
3804
|
-
}
|
3685
|
+
_iterator8.f();
|
3805
3686
|
}
|
3806
3687
|
|
3807
3688
|
return -1;
|
@@ -3812,18 +3693,21 @@
|
|
3812
3693
|
var data = [];
|
3813
3694
|
var m = [];
|
3814
3695
|
$els.each(function (y, el) {
|
3696
|
+
var $el = $__default['default'](el);
|
3815
3697
|
var row = {}; // save tr's id, class and data-* attributes
|
3816
3698
|
|
3817
|
-
row._id = $
|
3818
|
-
row._class = $
|
3819
|
-
row._data = _this.getRealDataAttr($
|
3820
|
-
$
|
3821
|
-
|
3822
|
-
var
|
3699
|
+
row._id = $el.attr('id');
|
3700
|
+
row._class = $el.attr('class');
|
3701
|
+
row._data = _this.getRealDataAttr($el.data());
|
3702
|
+
row._style = $el.attr('style');
|
3703
|
+
$el.find('>td,>th').each(function (_x, el) {
|
3704
|
+
var $el = $__default['default'](el);
|
3705
|
+
var cspan = +$el.attr('colspan') || 1;
|
3706
|
+
var rspan = +$el.attr('rowspan') || 1;
|
3823
3707
|
var x = _x; // skip already occupied cells in current row
|
3824
3708
|
|
3825
|
-
for (; m[y] && m[y][x]; x++) {
|
3826
|
-
// mark matrix elements occupied by current cell with true
|
3709
|
+
for (; m[y] && m[y][x]; x++) {// ignore
|
3710
|
+
} // mark matrix elements occupied by current cell with true
|
3827
3711
|
|
3828
3712
|
|
3829
3713
|
for (var tx = x; tx < x + cspan; tx++) {
|
@@ -3838,14 +3722,15 @@
|
|
3838
3722
|
}
|
3839
3723
|
|
3840
3724
|
var field = columns[x].field;
|
3841
|
-
row[field] = $
|
3842
|
-
|
3843
|
-
row["_".concat(field, "_id")] = $
|
3844
|
-
row["_".concat(field, "_class")] = $
|
3845
|
-
row["_".concat(field, "_rowspan")] = $
|
3846
|
-
row["_".concat(field, "_colspan")] = $
|
3847
|
-
row["_".concat(field, "_title")] = $
|
3848
|
-
row["_".concat(field, "_data")] = _this.getRealDataAttr($
|
3725
|
+
row[field] = $el.html().trim(); // save td's id, class and data-* attributes
|
3726
|
+
|
3727
|
+
row["_".concat(field, "_id")] = $el.attr('id');
|
3728
|
+
row["_".concat(field, "_class")] = $el.attr('class');
|
3729
|
+
row["_".concat(field, "_rowspan")] = $el.attr('rowspan');
|
3730
|
+
row["_".concat(field, "_colspan")] = $el.attr('colspan');
|
3731
|
+
row["_".concat(field, "_title")] = $el.attr('title');
|
3732
|
+
row["_".concat(field, "_data")] = _this.getRealDataAttr($el.data());
|
3733
|
+
row["_".concat(field, "_style")] = $el.attr('style');
|
3849
3734
|
});
|
3850
3735
|
data.push(row);
|
3851
3736
|
});
|
@@ -3897,22 +3782,54 @@
|
|
3897
3782
|
|
3898
3783
|
return order;
|
3899
3784
|
},
|
3900
|
-
|
3901
|
-
var id = arguments.length >
|
3785
|
+
getEventName: function getEventName(eventPrefix) {
|
3786
|
+
var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
3902
3787
|
id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000));
|
3903
|
-
return "
|
3788
|
+
return "".concat(eventPrefix, "-").concat(id);
|
3904
3789
|
},
|
3905
3790
|
hasDetailViewIcon: function hasDetailViewIcon(options) {
|
3906
3791
|
return options.detailView && options.detailViewIcon && !options.cardView;
|
3792
|
+
},
|
3793
|
+
getDetailViewIndexOffset: function getDetailViewIndexOffset(options) {
|
3794
|
+
return this.hasDetailViewIcon(options) && options.detailViewAlign !== 'right' ? 1 : 0;
|
3795
|
+
},
|
3796
|
+
checkAutoMergeCells: function checkAutoMergeCells(data) {
|
3797
|
+
var _iterator9 = _createForOfIteratorHelper(data),
|
3798
|
+
_step9;
|
3799
|
+
|
3800
|
+
try {
|
3801
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
3802
|
+
var row = _step9.value;
|
3803
|
+
|
3804
|
+
for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) {
|
3805
|
+
var key = _Object$keys[_i4];
|
3806
|
+
|
3807
|
+
if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) {
|
3808
|
+
return true;
|
3809
|
+
}
|
3810
|
+
}
|
3811
|
+
}
|
3812
|
+
} catch (err) {
|
3813
|
+
_iterator9.e(err);
|
3814
|
+
} finally {
|
3815
|
+
_iterator9.f();
|
3816
|
+
}
|
3817
|
+
|
3818
|
+
return false;
|
3819
|
+
},
|
3820
|
+
deepCopy: function deepCopy(arg) {
|
3821
|
+
if (arg === undefined) {
|
3822
|
+
return arg;
|
3823
|
+
}
|
3824
|
+
|
3825
|
+
return $__default['default'].extend(true, Array.isArray(arg) ? [] : {}, arg);
|
3907
3826
|
}
|
3908
3827
|
};
|
3909
3828
|
|
3910
3829
|
var BLOCK_ROWS = 50;
|
3911
3830
|
var CLUSTER_BLOCKS = 4;
|
3912
3831
|
|
3913
|
-
var VirtualScroll =
|
3914
|
-
/*#__PURE__*/
|
3915
|
-
function () {
|
3832
|
+
var VirtualScroll = /*#__PURE__*/function () {
|
3916
3833
|
function VirtualScroll(options) {
|
3917
3834
|
var _this = this;
|
3918
3835
|
|
@@ -4059,18 +3976,15 @@
|
|
4059
3976
|
return VirtualScroll;
|
4060
3977
|
}();
|
4061
3978
|
|
4062
|
-
var BootstrapTable =
|
4063
|
-
/*#__PURE__*/
|
4064
|
-
function () {
|
3979
|
+
var BootstrapTable = /*#__PURE__*/function () {
|
4065
3980
|
function BootstrapTable(el, options) {
|
4066
3981
|
_classCallCheck(this, BootstrapTable);
|
4067
3982
|
|
4068
3983
|
this.options = options;
|
4069
|
-
this.$el = $(el);
|
3984
|
+
this.$el = $__default['default'](el);
|
4070
3985
|
this.$el_ = this.$el.clone();
|
4071
3986
|
this.timeoutId_ = 0;
|
4072
3987
|
this.timeoutFooter_ = 0;
|
4073
|
-
this.init();
|
4074
3988
|
}
|
4075
3989
|
|
4076
3990
|
_createClass(BootstrapTable, [{
|
@@ -4094,15 +4008,25 @@
|
|
4094
4008
|
value: function initConstants() {
|
4095
4009
|
var opts = this.options;
|
4096
4010
|
this.constants = Constants.CONSTANTS;
|
4097
|
-
this.constants.theme =
|
4011
|
+
this.constants.theme = $__default['default'].fn.bootstrapTable.theme;
|
4012
|
+
this.constants.dataToggle = this.constants.html.dataToggle || 'data-toggle';
|
4098
4013
|
var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : '';
|
4099
4014
|
this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim();
|
4015
|
+
this.buttons = Utils.calculateObjectValue(this, opts.buttons, [], {});
|
4016
|
+
|
4017
|
+
if (_typeof(this.buttons) !== 'object') {
|
4018
|
+
this.buttons = {};
|
4019
|
+
}
|
4020
|
+
|
4021
|
+
if (typeof opts.icons === 'string') {
|
4022
|
+
opts.icons = Utils.calculateObjectValue(null, opts.icons);
|
4023
|
+
}
|
4100
4024
|
}
|
4101
4025
|
}, {
|
4102
4026
|
key: "initLocale",
|
4103
4027
|
value: function initLocale() {
|
4104
4028
|
if (this.options.locale) {
|
4105
|
-
var locales =
|
4029
|
+
var locales = $__default['default'].fn.bootstrapTable.locales;
|
4106
4030
|
var parts = this.options.locale.split(/-|_/);
|
4107
4031
|
parts[0] = parts[0].toLowerCase();
|
4108
4032
|
|
@@ -4111,11 +4035,11 @@
|
|
4111
4035
|
}
|
4112
4036
|
|
4113
4037
|
if (locales[this.options.locale]) {
|
4114
|
-
|
4038
|
+
$__default['default'].extend(this.options, locales[this.options.locale]);
|
4115
4039
|
} else if (locales[parts.join('-')]) {
|
4116
|
-
|
4040
|
+
$__default['default'].extend(this.options, locales[parts.join('-')]);
|
4117
4041
|
} else if (locales[parts[0]]) {
|
4118
|
-
|
4042
|
+
$__default['default'].extend(this.options, locales[parts[0]]);
|
4119
4043
|
}
|
4120
4044
|
}
|
4121
4045
|
}
|
@@ -4125,7 +4049,7 @@
|
|
4125
4049
|
var topPagination = ['top', 'both'].includes(this.options.paginationVAlign) ? '<div class="fixed-table-pagination clearfix"></div>' : '';
|
4126
4050
|
var bottomPagination = ['bottom', 'both'].includes(this.options.paginationVAlign) ? '<div class="fixed-table-pagination"></div>' : '';
|
4127
4051
|
var loadingTemplate = Utils.calculateObjectValue(this.options, this.options.loadingTemplate, [this.options.formatLoadingMessage()]);
|
4128
|
-
this.$container = $("\n <div class=\"bootstrap-table ".concat(this.constants.theme, "\">\n <div class=\"fixed-table-toolbar\"></div>\n ").concat(topPagination, "\n <div class=\"fixed-table-container\">\n <div class=\"fixed-table-header\"><table></table></div>\n <div class=\"fixed-table-body\">\n <div class=\"fixed-table-loading\">\n ").concat(loadingTemplate, "\n </div>\n </div>\n <div class=\"fixed-table-footer\"><table><thead><tr></tr></thead></table></div>\n </div>\n ").concat(bottomPagination, "\n </div>\n "));
|
4052
|
+
this.$container = $__default['default']("\n <div class=\"bootstrap-table ".concat(this.constants.theme, "\">\n <div class=\"fixed-table-toolbar\"></div>\n ").concat(topPagination, "\n <div class=\"fixed-table-container\">\n <div class=\"fixed-table-header\"><table></table></div>\n <div class=\"fixed-table-body\">\n <div class=\"fixed-table-loading\">\n ").concat(loadingTemplate, "\n </div>\n </div>\n <div class=\"fixed-table-footer\"><table><thead><tr></tr></thead></table></div>\n </div>\n ").concat(bottomPagination, "\n </div>\n "));
|
4129
4053
|
this.$container.insertAfter(this.$el);
|
4130
4054
|
this.$tableContainer = this.$container.find('.fixed-table-container');
|
4131
4055
|
this.$tableHeader = this.$container.find('.fixed-table-header');
|
@@ -4134,7 +4058,7 @@
|
|
4134
4058
|
this.$tableFooter = this.$el.find('tfoot'); // checking if custom table-toolbar exists or not
|
4135
4059
|
|
4136
4060
|
if (this.options.buttonsToolbar) {
|
4137
|
-
this.$toolbar = $('body').find(this.options.buttonsToolbar);
|
4061
|
+
this.$toolbar = $__default['default']('body').find(this.options.buttonsToolbar);
|
4138
4062
|
} else {
|
4139
4063
|
this.$toolbar = this.$container.find('.fixed-table-toolbar');
|
4140
4064
|
}
|
@@ -4170,25 +4094,26 @@
|
|
4170
4094
|
this.$header = this.$el.find('>thead');
|
4171
4095
|
|
4172
4096
|
if (!this.$header.length) {
|
4173
|
-
this.$header = $("<thead class=\"".concat(this.options.theadClasses, "\"></thead>")).appendTo(this.$el);
|
4097
|
+
this.$header = $__default['default']("<thead class=\"".concat(this.options.theadClasses, "\"></thead>")).appendTo(this.$el);
|
4174
4098
|
} else if (this.options.theadClasses) {
|
4175
4099
|
this.$header.addClass(this.options.theadClasses);
|
4176
4100
|
}
|
4177
4101
|
|
4178
4102
|
this._headerTrClasses = [];
|
4103
|
+
this._headerTrStyles = [];
|
4179
4104
|
this.$header.find('tr').each(function (i, el) {
|
4180
|
-
var $tr = $(el);
|
4105
|
+
var $tr = $__default['default'](el);
|
4181
4106
|
var column = [];
|
4182
4107
|
$tr.find('th').each(function (i, el) {
|
4183
|
-
var $th = $(el); // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not
|
4108
|
+
var $th = $__default['default'](el); // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not
|
4184
4109
|
|
4185
4110
|
if (typeof $th.data('field') !== 'undefined') {
|
4186
4111
|
$th.data('field', "".concat($th.data('field')));
|
4187
4112
|
}
|
4188
4113
|
|
4189
|
-
column.push(
|
4114
|
+
column.push($__default['default'].extend({}, {
|
4190
4115
|
title: $th.html(),
|
4191
|
-
|
4116
|
+
class: $th.attr('class'),
|
4192
4117
|
titleTooltip: $th.attr('title'),
|
4193
4118
|
rowspan: $th.attr('rowspan') ? +$th.attr('rowspan') : undefined,
|
4194
4119
|
colspan: $th.attr('colspan') ? +$th.attr('colspan') : undefined
|
@@ -4199,19 +4124,23 @@
|
|
4199
4124
|
if ($tr.attr('class')) {
|
4200
4125
|
_this._headerTrClasses.push($tr.attr('class'));
|
4201
4126
|
}
|
4127
|
+
|
4128
|
+
if ($tr.attr('style')) {
|
4129
|
+
_this._headerTrStyles.push($tr.attr('style'));
|
4130
|
+
}
|
4202
4131
|
});
|
4203
4132
|
|
4204
4133
|
if (!Array.isArray(this.options.columns[0])) {
|
4205
4134
|
this.options.columns = [this.options.columns];
|
4206
4135
|
}
|
4207
4136
|
|
4208
|
-
this.options.columns =
|
4137
|
+
this.options.columns = $__default['default'].extend(true, [], columns, this.options.columns);
|
4209
4138
|
this.columns = [];
|
4210
4139
|
this.fieldsColumnsIndex = [];
|
4211
4140
|
Utils.setFieldIndex(this.options.columns);
|
4212
4141
|
this.options.columns.forEach(function (columns, i) {
|
4213
4142
|
columns.forEach(function (_column, j) {
|
4214
|
-
var column =
|
4143
|
+
var column = $__default['default'].extend({}, BootstrapTable.COLUMN_DEFAULTS, _column);
|
4215
4144
|
|
4216
4145
|
if (typeof column.fieldIndex !== 'undefined') {
|
4217
4146
|
_this.columns[column.fieldIndex] = column;
|
@@ -4231,7 +4160,9 @@
|
|
4231
4160
|
}
|
4232
4161
|
}
|
4233
4162
|
|
4234
|
-
this.
|
4163
|
+
if (!(this.options.pagination && this.options.sidePagination !== 'server')) {
|
4164
|
+
this.footerData = Utils.trToData(this.columns, this.$el.find('>tfoot>tr'));
|
4165
|
+
}
|
4235
4166
|
|
4236
4167
|
if (this.footerData) {
|
4237
4168
|
this.$el.find('tfoot').html('<tr></tr>');
|
@@ -4249,7 +4180,7 @@
|
|
4249
4180
|
var _this2 = this;
|
4250
4181
|
|
4251
4182
|
var visibleColumns = {};
|
4252
|
-
var
|
4183
|
+
var headerHtml = [];
|
4253
4184
|
this.header = {
|
4254
4185
|
fields: [],
|
4255
4186
|
styles: [],
|
@@ -4264,11 +4195,13 @@
|
|
4264
4195
|
};
|
4265
4196
|
Utils.updateFieldGroup(this.options.columns);
|
4266
4197
|
this.options.columns.forEach(function (columns, i) {
|
4267
|
-
html
|
4198
|
+
var html = [];
|
4199
|
+
html.push("<tr".concat(Utils.sprintf(' class="%s"', _this2._headerTrClasses[i]), " ").concat(Utils.sprintf(' style="%s"', _this2._headerTrStyles[i]), ">"));
|
4268
4200
|
var detailViewTemplate = '';
|
4269
4201
|
|
4270
4202
|
if (i === 0 && Utils.hasDetailViewIcon(_this2.options)) {
|
4271
|
-
|
4203
|
+
var rowspan = _this2.options.columns.length > 1 ? " rowspan=\"".concat(_this2.options.columns.length, "\"") : '';
|
4204
|
+
detailViewTemplate = "<th class=\"detail\"".concat(rowspan, ">\n <div class=\"fht-cell\"></div>\n </th>");
|
4272
4205
|
}
|
4273
4206
|
|
4274
4207
|
if (detailViewTemplate && _this2.options.detailViewAlign !== 'right') {
|
@@ -4366,13 +4299,17 @@
|
|
4366
4299
|
}
|
4367
4300
|
|
4368
4301
|
html.push('</tr>');
|
4302
|
+
|
4303
|
+
if (html.length > 3) {
|
4304
|
+
headerHtml.push(html.join(''));
|
4305
|
+
}
|
4369
4306
|
});
|
4370
|
-
this.$header.html(
|
4307
|
+
this.$header.html(headerHtml.join(''));
|
4371
4308
|
this.$header.find('th[data-field]').each(function (i, el) {
|
4372
|
-
$(el).data(visibleColumns[$(el).data('field')]);
|
4309
|
+
$__default['default'](el).data(visibleColumns[$__default['default'](el).data('field')]);
|
4373
4310
|
});
|
4374
4311
|
this.$container.off('click', '.th-inner').on('click', '.th-inner', function (e) {
|
4375
|
-
var $this = $(e.currentTarget);
|
4312
|
+
var $this = $__default['default'](e.currentTarget);
|
4376
4313
|
|
4377
4314
|
if (_this2.options.detailView && !$this.parent().hasClass('bs-checkbox')) {
|
4378
4315
|
if ($this.closest('.bootstrap-table')[0] !== _this2.$container[0]) {
|
@@ -4385,7 +4322,7 @@
|
|
4385
4322
|
}
|
4386
4323
|
});
|
4387
4324
|
this.$header.children().children().off('keypress').on('keypress', function (e) {
|
4388
|
-
if (_this2.options.sortable && $(e.currentTarget).data().sortable) {
|
4325
|
+
if (_this2.options.sortable && $__default['default'](e.currentTarget).data().sortable) {
|
4389
4326
|
var code = e.keyCode || e.which;
|
4390
4327
|
|
4391
4328
|
if (code === 13) {
|
@@ -4394,8 +4331,8 @@
|
|
4394
4331
|
}
|
4395
4332
|
}
|
4396
4333
|
});
|
4397
|
-
var resizeEvent = Utils.
|
4398
|
-
$(window).off(resizeEvent);
|
4334
|
+
var resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id'));
|
4335
|
+
$__default['default'](window).off(resizeEvent);
|
4399
4336
|
|
4400
4337
|
if (!this.options.showHeader || this.options.cardView) {
|
4401
4338
|
this.$header.hide();
|
@@ -4407,7 +4344,7 @@
|
|
4407
4344
|
this.$tableLoading.css('top', this.$header.outerHeight() + 1); // Assign the correct sortable arrow
|
4408
4345
|
|
4409
4346
|
this.getCaret();
|
4410
|
-
$(window).on(resizeEvent, function () {
|
4347
|
+
$__default['default'](window).on(resizeEvent, function () {
|
4411
4348
|
return _this2.resetView();
|
4412
4349
|
});
|
4413
4350
|
}
|
@@ -4415,7 +4352,7 @@
|
|
4415
4352
|
this.$selectAll = this.$header.find('[name="btSelectAll"]');
|
4416
4353
|
this.$selectAll.off('click').on('click', function (e) {
|
4417
4354
|
e.stopPropagation();
|
4418
|
-
var checked = $(e.currentTarget).prop('checked');
|
4355
|
+
var checked = $__default['default'](e.currentTarget).prop('checked');
|
4419
4356
|
|
4420
4357
|
_this2[checked ? 'checkAll' : 'uncheckAll']();
|
4421
4358
|
|
@@ -4430,11 +4367,15 @@
|
|
4430
4367
|
} else if (type === 'prepend') {
|
4431
4368
|
this.options.data = [].concat(data).concat(this.options.data);
|
4432
4369
|
} else {
|
4433
|
-
|
4370
|
+
data = data || Utils.deepCopy(this.options.data);
|
4371
|
+
this.options.data = Array.isArray(data) ? data : data[this.options.dataField];
|
4434
4372
|
}
|
4435
4373
|
|
4436
|
-
this.data = this.options.data;
|
4437
|
-
|
4374
|
+
this.data = _toConsumableArray(this.options.data);
|
4375
|
+
|
4376
|
+
if (this.options.sortReset) {
|
4377
|
+
this.unsortedData = _toConsumableArray(this.data);
|
4378
|
+
}
|
4438
4379
|
|
4439
4380
|
if (this.options.sidePagination === 'server') {
|
4440
4381
|
return;
|
@@ -4495,8 +4436,8 @@
|
|
4495
4436
|
_this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass);
|
4496
4437
|
}, 250);
|
4497
4438
|
}
|
4498
|
-
} else {
|
4499
|
-
this.data = this.unsortedData;
|
4439
|
+
} else if (this.options.sortReset) {
|
4440
|
+
this.data = _toConsumableArray(this.unsortedData);
|
4500
4441
|
}
|
4501
4442
|
}
|
4502
4443
|
}, {
|
@@ -4504,7 +4445,7 @@
|
|
4504
4445
|
value: function onSort(_ref) {
|
4505
4446
|
var type = _ref.type,
|
4506
4447
|
currentTarget = _ref.currentTarget;
|
4507
|
-
var $this = type === 'keypress' ? $(currentTarget) : $(currentTarget).parent();
|
4448
|
+
var $this = type === 'keypress' ? $__default['default'](currentTarget) : $__default['default'](currentTarget).parent();
|
4508
4449
|
var $this_ = this.$header.find('th').eq($this.index());
|
4509
4450
|
this.$header.add(this.$header_).find('span.order').remove();
|
4510
4451
|
|
@@ -4558,105 +4499,185 @@
|
|
4558
4499
|
var switchableCount = 0;
|
4559
4500
|
|
4560
4501
|
if (this.$toolbar.find('.bs-bars').children().length) {
|
4561
|
-
$('body').append($(opts.toolbar));
|
4502
|
+
$__default['default']('body').append($__default['default'](opts.toolbar));
|
4562
4503
|
}
|
4563
4504
|
|
4564
4505
|
this.$toolbar.html('');
|
4565
4506
|
|
4566
4507
|
if (typeof opts.toolbar === 'string' || _typeof(opts.toolbar) === 'object') {
|
4567
|
-
$(Utils.sprintf('<div class="bs-bars %s-%s"></div>', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($(opts.toolbar));
|
4508
|
+
$__default['default'](Utils.sprintf('<div class="bs-bars %s-%s"></div>', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($__default['default'](opts.toolbar));
|
4568
4509
|
} // showColumns, showToggle, showRefresh
|
4569
4510
|
|
4570
4511
|
|
4571
4512
|
html = ["<div class=\"".concat(['columns', "columns-".concat(opts.buttonsAlign), this.constants.classes.buttonsGroup, "".concat(this.constants.classes.pull, "-").concat(opts.buttonsAlign)].join(' '), "\">")];
|
4572
4513
|
|
4573
|
-
if (typeof opts.
|
4574
|
-
opts.
|
4575
|
-
}
|
4514
|
+
if (typeof opts.buttonsOrder === 'string') {
|
4515
|
+
opts.buttonsOrder = opts.buttonsOrder.replace(/\[|\]| |'/g, '').split(',');
|
4516
|
+
}
|
4517
|
+
|
4518
|
+
this.buttons = Object.assign(this.buttons, {
|
4519
|
+
paginationSwitch: {
|
4520
|
+
text: opts.pagination ? opts.formatPaginationSwitchUp() : opts.formatPaginationSwitchDown(),
|
4521
|
+
icon: opts.pagination ? opts.icons.paginationSwitchDown : opts.icons.paginationSwitchUp,
|
4522
|
+
render: false,
|
4523
|
+
event: this.togglePagination,
|
4524
|
+
attributes: {
|
4525
|
+
'aria-label': opts.formatPaginationSwitch(),
|
4526
|
+
title: opts.formatPaginationSwitch()
|
4527
|
+
}
|
4528
|
+
},
|
4529
|
+
refresh: {
|
4530
|
+
text: opts.formatRefresh(),
|
4531
|
+
icon: opts.icons.refresh,
|
4532
|
+
render: false,
|
4533
|
+
event: this.refresh,
|
4534
|
+
attributes: {
|
4535
|
+
'aria-label': opts.formatRefresh(),
|
4536
|
+
title: opts.formatRefresh()
|
4537
|
+
}
|
4538
|
+
},
|
4539
|
+
toggle: {
|
4540
|
+
text: opts.formatToggle(),
|
4541
|
+
icon: opts.icons.toggleOff,
|
4542
|
+
render: false,
|
4543
|
+
event: this.toggleView,
|
4544
|
+
attributes: {
|
4545
|
+
'aria-label': opts.formatToggleOn(),
|
4546
|
+
title: opts.formatToggleOn()
|
4547
|
+
}
|
4548
|
+
},
|
4549
|
+
fullscreen: {
|
4550
|
+
text: opts.formatFullscreen(),
|
4551
|
+
icon: opts.icons.fullscreen,
|
4552
|
+
render: false,
|
4553
|
+
event: this.toggleFullscreen,
|
4554
|
+
attributes: {
|
4555
|
+
'aria-label': opts.formatFullscreen(),
|
4556
|
+
title: opts.formatFullscreen()
|
4557
|
+
}
|
4558
|
+
},
|
4559
|
+
columns: {
|
4560
|
+
render: false,
|
4561
|
+
html: function html() {
|
4562
|
+
var html = [];
|
4563
|
+
html.push("<div class=\"keep-open ".concat(_this4.constants.classes.buttonsDropdown, "\" title=\"").concat(opts.formatColumns(), "\">\n <button class=\"").concat(_this4.constants.buttonsClass, " dropdown-toggle\" type=\"button\" ").concat(_this4.constants.dataToggle, "=\"dropdown\"\n aria-label=\"Columns\" title=\"").concat(opts.formatColumns(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(_this4.constants.html.icon, opts.iconsPrefix, opts.icons.columns) : '', "\n ").concat(opts.showButtonText ? opts.formatColumns() : '', "\n ").concat(_this4.constants.html.dropdownCaret, "\n </button>\n ").concat(_this4.constants.html.toolbarDropdown[0]));
|
4564
|
+
|
4565
|
+
if (opts.showColumnsSearch) {
|
4566
|
+
html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="text" class="%s" name="columnsSearch" placeholder="%s" autocomplete="off">', _this4.constants.classes.input, opts.formatSearch())));
|
4567
|
+
html.push(_this4.constants.html.toolbarDropdownSeparator);
|
4568
|
+
}
|
4569
|
+
|
4570
|
+
if (opts.showColumnsToggleAll) {
|
4571
|
+
var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) {
|
4572
|
+
return !_this4.isSelectionColumn(column);
|
4573
|
+
}).length;
|
4574
|
+
|
4575
|
+
html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" class="toggle-all" %s> <span>%s</span>', allFieldsVisible ? 'checked="checked"' : '', opts.formatColumnsToggleAll())));
|
4576
|
+
html.push(_this4.constants.html.toolbarDropdownSeparator);
|
4577
|
+
}
|
4578
|
+
|
4579
|
+
var visibleColumns = 0;
|
4580
|
+
|
4581
|
+
_this4.columns.forEach(function (column) {
|
4582
|
+
if (column.visible) {
|
4583
|
+
visibleColumns++;
|
4584
|
+
}
|
4585
|
+
});
|
4586
|
+
|
4587
|
+
_this4.columns.forEach(function (column, i) {
|
4588
|
+
if (_this4.isSelectionColumn(column)) {
|
4589
|
+
return;
|
4590
|
+
}
|
4576
4591
|
|
4577
|
-
|
4578
|
-
|
4579
|
-
|
4580
|
-
|
4581
|
-
|
4582
|
-
|
4583
|
-
|
4584
|
-
|
4592
|
+
if (opts.cardView && !column.cardVisible) {
|
4593
|
+
return;
|
4594
|
+
}
|
4595
|
+
|
4596
|
+
var checked = column.visible ? ' checked="checked"' : '';
|
4597
|
+
var disabled = visibleColumns <= opts.minimumCountColumns && checked ? ' disabled="disabled"' : '';
|
4598
|
+
|
4599
|
+
if (column.switchable) {
|
4600
|
+
html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" data-field="%s" value="%s"%s%s> <span>%s</span>', column.field, i, checked, disabled, column.title)));
|
4601
|
+
switchableCount++;
|
4602
|
+
}
|
4603
|
+
});
|
4585
4604
|
|
4586
|
-
|
4587
|
-
html.
|
4588
|
-
html.push(_this4.constants.html.toolbarDropdownSeparator);
|
4605
|
+
html.push(_this4.constants.html.toolbarDropdown[1], '</div>');
|
4606
|
+
return html.join('');
|
4589
4607
|
}
|
4608
|
+
}
|
4609
|
+
});
|
4610
|
+
var buttonsHtml = {};
|
4611
|
+
|
4612
|
+
for (var _i2 = 0, _Object$entries2 = Object.entries(this.buttons); _i2 < _Object$entries2.length; _i2++) {
|
4613
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
|
4614
|
+
buttonName = _Object$entries2$_i[0],
|
4615
|
+
buttonConfig = _Object$entries2$_i[1];
|
4590
4616
|
|
4591
|
-
|
4592
|
-
var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) {
|
4593
|
-
return !_this4.isSelectionColumn(column);
|
4594
|
-
}).length;
|
4617
|
+
var buttonHtml = void 0;
|
4595
4618
|
|
4596
|
-
|
4597
|
-
|
4619
|
+
if (buttonConfig.hasOwnProperty('html')) {
|
4620
|
+
if (typeof buttonConfig.html === 'function') {
|
4621
|
+
buttonHtml = buttonConfig.html();
|
4622
|
+
} else if (typeof buttonConfig.html === 'string') {
|
4623
|
+
buttonHtml = buttonConfig.html;
|
4598
4624
|
}
|
4625
|
+
} else {
|
4626
|
+
buttonHtml = "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"").concat(buttonName, "\"");
|
4599
4627
|
|
4600
|
-
|
4628
|
+
if (buttonConfig.hasOwnProperty('attributes')) {
|
4629
|
+
for (var _i3 = 0, _Object$entries3 = Object.entries(buttonConfig.attributes); _i3 < _Object$entries3.length; _i3++) {
|
4630
|
+
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
|
4631
|
+
attributeName = _Object$entries3$_i[0],
|
4632
|
+
value = _Object$entries3$_i[1];
|
4601
4633
|
|
4602
|
-
|
4603
|
-
if (column.visible) {
|
4604
|
-
visibleColumns++;
|
4634
|
+
buttonHtml += " ".concat(attributeName, "=\"").concat(value, "\"");
|
4605
4635
|
}
|
4606
|
-
}
|
4636
|
+
}
|
4607
4637
|
|
4608
|
-
|
4609
|
-
if (_this4.isSelectionColumn(column)) {
|
4610
|
-
return;
|
4611
|
-
}
|
4638
|
+
buttonHtml += '>';
|
4612
4639
|
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4640
|
+
if (opts.showButtonIcons && buttonConfig.hasOwnProperty('icon')) {
|
4641
|
+
buttonHtml += "".concat(Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, buttonConfig.icon), " ");
|
4642
|
+
}
|
4616
4643
|
|
4617
|
-
|
4618
|
-
|
4644
|
+
if (opts.showButtonText && buttonConfig.hasOwnProperty('text')) {
|
4645
|
+
buttonHtml += buttonConfig.text;
|
4646
|
+
}
|
4619
4647
|
|
4620
|
-
|
4621
|
-
|
4622
|
-
switchableCount++;
|
4623
|
-
}
|
4624
|
-
});
|
4648
|
+
buttonHtml += '</button>';
|
4649
|
+
}
|
4625
4650
|
|
4626
|
-
|
4627
|
-
|
4628
|
-
|
4629
|
-
};
|
4651
|
+
buttonsHtml[buttonName] = buttonHtml;
|
4652
|
+
var optionName = "show".concat(buttonName.charAt(0).toUpperCase()).concat(buttonName.substring(1));
|
4653
|
+
var showOption = opts[optionName];
|
4630
4654
|
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4655
|
+
if ((!buttonConfig.hasOwnProperty('render') || buttonConfig.hasOwnProperty('render') && buttonConfig.render) && (showOption === undefined || showOption === true)) {
|
4656
|
+
opts[optionName] = true;
|
4657
|
+
}
|
4658
|
+
|
4659
|
+
if (!opts.buttonsOrder.includes(buttonName)) {
|
4660
|
+
opts.buttonsOrder.push(buttonName);
|
4661
|
+
}
|
4662
|
+
} // Adding the button html to the final toolbar html when the showOption is true
|
4634
4663
|
|
4635
|
-
|
4636
|
-
var
|
4637
|
-
|
4664
|
+
|
4665
|
+
var _iterator = _createForOfIteratorHelper(opts.buttonsOrder),
|
4666
|
+
_step;
|
4638
4667
|
|
4639
4668
|
try {
|
4640
|
-
for (
|
4669
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
4641
4670
|
var button = _step.value;
|
4671
|
+
var _showOption = opts["show".concat(button.charAt(0).toUpperCase()).concat(button.substring(1))];
|
4642
4672
|
|
4643
|
-
if (
|
4673
|
+
if (_showOption) {
|
4644
4674
|
html.push(buttonsHtml[button]);
|
4645
4675
|
}
|
4646
4676
|
}
|
4647
4677
|
} catch (err) {
|
4648
|
-
|
4649
|
-
_iteratorError = err;
|
4678
|
+
_iterator.e(err);
|
4650
4679
|
} finally {
|
4651
|
-
|
4652
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
4653
|
-
_iterator.return();
|
4654
|
-
}
|
4655
|
-
} finally {
|
4656
|
-
if (_didIteratorError) {
|
4657
|
-
throw _iteratorError;
|
4658
|
-
}
|
4659
|
-
}
|
4680
|
+
_iterator.f();
|
4660
4681
|
}
|
4661
4682
|
|
4662
4683
|
html.push('</div>'); // Fix #188: this.showToolbar is for extensions
|
@@ -4665,28 +4686,42 @@
|
|
4665
4686
|
this.$toolbar.append(html.join(''));
|
4666
4687
|
}
|
4667
4688
|
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
4671
|
-
|
4672
|
-
}
|
4689
|
+
for (var _i4 = 0, _Object$entries4 = Object.entries(this.buttons); _i4 < _Object$entries4.length; _i4++) {
|
4690
|
+
var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2),
|
4691
|
+
_buttonName = _Object$entries4$_i[0],
|
4692
|
+
_buttonConfig = _Object$entries4$_i[1];
|
4673
4693
|
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4678
|
-
}
|
4694
|
+
if (_buttonConfig.hasOwnProperty('event')) {
|
4695
|
+
if (typeof _buttonConfig.event === 'function' || typeof _buttonConfig.event === 'string') {
|
4696
|
+
var _ret = function () {
|
4697
|
+
var event = typeof _buttonConfig.event === 'string' ? window[_buttonConfig.event] : _buttonConfig.event;
|
4679
4698
|
|
4680
|
-
|
4681
|
-
|
4682
|
-
|
4683
|
-
});
|
4684
|
-
}
|
4699
|
+
_this4.$toolbar.find("button[name=\"".concat(_buttonName, "\"]")).off('click').on('click', function () {
|
4700
|
+
return event.call(_this4);
|
4701
|
+
});
|
4685
4702
|
|
4686
|
-
|
4687
|
-
|
4688
|
-
|
4689
|
-
|
4703
|
+
return "continue";
|
4704
|
+
}();
|
4705
|
+
|
4706
|
+
if (_ret === "continue") continue;
|
4707
|
+
}
|
4708
|
+
|
4709
|
+
var _loop = function _loop() {
|
4710
|
+
var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i5], 2),
|
4711
|
+
eventType = _Object$entries5$_i[0],
|
4712
|
+
eventFunction = _Object$entries5$_i[1];
|
4713
|
+
|
4714
|
+
var event = typeof eventFunction === 'string' ? window[eventFunction] : eventFunction;
|
4715
|
+
|
4716
|
+
_this4.$toolbar.find("button[name=\"".concat(_buttonName, "\"]")).off(eventType).on(eventType, function () {
|
4717
|
+
return event.call(_this4);
|
4718
|
+
});
|
4719
|
+
};
|
4720
|
+
|
4721
|
+
for (var _i5 = 0, _Object$entries5 = Object.entries(_buttonConfig.event); _i5 < _Object$entries5.length; _i5++) {
|
4722
|
+
_loop();
|
4723
|
+
}
|
4724
|
+
}
|
4690
4725
|
}
|
4691
4726
|
|
4692
4727
|
if (opts.showColumns) {
|
@@ -4703,7 +4738,7 @@
|
|
4703
4738
|
});
|
4704
4739
|
$checkboxes.off('click').on('click', function (_ref2) {
|
4705
4740
|
var currentTarget = _ref2.currentTarget;
|
4706
|
-
var $this = $(currentTarget);
|
4741
|
+
var $this = $__default['default'](currentTarget);
|
4707
4742
|
|
4708
4743
|
_this4._toggleColumn($this.val(), $this.prop('checked'), false);
|
4709
4744
|
|
@@ -4716,19 +4751,19 @@
|
|
4716
4751
|
$toggleAll.off('click').on('click', function (_ref3) {
|
4717
4752
|
var currentTarget = _ref3.currentTarget;
|
4718
4753
|
|
4719
|
-
_this4._toggleAllColumns($(currentTarget).prop('checked'));
|
4754
|
+
_this4._toggleAllColumns($__default['default'](currentTarget).prop('checked'));
|
4720
4755
|
});
|
4721
4756
|
|
4722
4757
|
if (opts.showColumnsSearch) {
|
4723
|
-
var $columnsSearch = $keepOpen.find('
|
4758
|
+
var $columnsSearch = $keepOpen.find('[name="columnsSearch"]');
|
4724
4759
|
var $listItems = $keepOpen.find('.dropdown-item-marker');
|
4725
4760
|
$columnsSearch.on('keyup paste change', function (_ref4) {
|
4726
4761
|
var currentTarget = _ref4.currentTarget;
|
4727
|
-
var $this = $(currentTarget);
|
4762
|
+
var $this = $__default['default'](currentTarget);
|
4728
4763
|
var searchValue = $this.val().toLowerCase();
|
4729
4764
|
$listItems.show();
|
4730
4765
|
$checkboxes.each(function (i, el) {
|
4731
|
-
var $checkbox = $(el);
|
4766
|
+
var $checkbox = $__default['default'](el);
|
4732
4767
|
var $listItem = $checkbox.parents('.dropdown-item-marker');
|
4733
4768
|
var text = $listItem.text().toLowerCase();
|
4734
4769
|
|
@@ -4738,14 +4773,35 @@
|
|
4738
4773
|
});
|
4739
4774
|
});
|
4740
4775
|
}
|
4741
|
-
}
|
4776
|
+
}
|
4777
|
+
|
4778
|
+
var handleInputEvent = function handleInputEvent($searchInput) {
|
4779
|
+
var eventTriggers = 'keyup drop blur mouseup';
|
4780
|
+
$searchInput.off(eventTriggers).on(eventTriggers, function (event) {
|
4781
|
+
if (opts.searchOnEnterKey && event.keyCode !== 13) {
|
4782
|
+
return;
|
4783
|
+
}
|
4784
|
+
|
4785
|
+
if ([37, 38, 39, 40].includes(event.keyCode)) {
|
4786
|
+
return;
|
4787
|
+
}
|
4788
|
+
|
4789
|
+
clearTimeout(timeoutId); // doesn't matter if it's 0
|
4790
|
+
|
4791
|
+
timeoutId = setTimeout(function () {
|
4792
|
+
_this4.onSearch({
|
4793
|
+
currentTarget: event.currentTarget
|
4794
|
+
});
|
4795
|
+
}, opts.searchTimeOut);
|
4796
|
+
});
|
4797
|
+
}; // Fix #4516: this.showSearchClearButton is for extensions
|
4742
4798
|
|
4743
4799
|
|
4744
|
-
if (opts.search || this.showSearchClearButton) {
|
4800
|
+
if ((opts.search || this.showSearchClearButton) && typeof opts.searchSelector !== 'string') {
|
4745
4801
|
html = [];
|
4746
4802
|
var showSearchButton = Utils.sprintf(this.constants.html.searchButton, this.constants.buttonsClass, opts.formatSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.search) : '', opts.showButtonText ? opts.formatSearch() : '');
|
4747
4803
|
var showSearchClearButton = Utils.sprintf(this.constants.html.searchClearButton, this.constants.buttonsClass, opts.formatClearSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.clearSearch) : '', opts.showButtonText ? opts.formatClearSearch() : '');
|
4748
|
-
var searchInputHtml = "<input class=\"".concat(this.constants.classes.input, "\n ").concat(Utils.sprintf(' %s%s', this.constants.classes.inputPrefix, opts.iconSize), "\n search-input\" type=\"
|
4804
|
+
var searchInputHtml = "<input class=\"".concat(this.constants.classes.input, "\n ").concat(Utils.sprintf(' %s%s', this.constants.classes.inputPrefix, opts.iconSize), "\n search-input\" type=\"search\" placeholder=\"").concat(opts.formatSearch(), "\" autocomplete=\"off\">");
|
4749
4805
|
var searchInputFinalHtml = searchInputHtml;
|
4750
4806
|
|
4751
4807
|
if (opts.showSearchButton || opts.showSearchClearButton) {
|
@@ -4756,31 +4812,10 @@
|
|
4756
4812
|
|
4757
4813
|
html.push(Utils.sprintf("\n <div class=\"".concat(this.constants.classes.pull, "-").concat(opts.searchAlign, " search ").concat(this.constants.classes.inputGroup, "\">\n %s\n </div>\n "), searchInputFinalHtml));
|
4758
4814
|
this.$toolbar.append(html.join(''));
|
4759
|
-
var $searchInput =
|
4760
|
-
|
4761
|
-
var handleInputEvent = function handleInputEvent() {
|
4762
|
-
var eventTriggers = "keyup drop blur ".concat(Utils.isIEBrowser() ? 'mouseup' : '');
|
4763
|
-
$searchInput.off(eventTriggers).on(eventTriggers, function (event) {
|
4764
|
-
if (opts.searchOnEnterKey && event.keyCode !== 13) {
|
4765
|
-
return;
|
4766
|
-
}
|
4767
|
-
|
4768
|
-
if ([37, 38, 39, 40].includes(event.keyCode)) {
|
4769
|
-
return;
|
4770
|
-
}
|
4771
|
-
|
4772
|
-
clearTimeout(timeoutId); // doesn't matter if it's 0
|
4773
|
-
|
4774
|
-
timeoutId = setTimeout(function () {
|
4775
|
-
_this4.onSearch({
|
4776
|
-
currentTarget: event.currentTarget
|
4777
|
-
});
|
4778
|
-
}, opts.searchTimeOut);
|
4779
|
-
});
|
4780
|
-
};
|
4815
|
+
var $searchInput = Utils.getSearchInput(this);
|
4781
4816
|
|
4782
4817
|
if (opts.showSearchButton) {
|
4783
|
-
this.$toolbar.find('.search button[name=search]').off('click').on('click', function (
|
4818
|
+
this.$toolbar.find('.search button[name=search]').off('click').on('click', function () {
|
4784
4819
|
clearTimeout(timeoutId); // doesn't matter if it's 0
|
4785
4820
|
|
4786
4821
|
timeoutId = setTimeout(function () {
|
@@ -4791,10 +4826,10 @@
|
|
4791
4826
|
});
|
4792
4827
|
|
4793
4828
|
if (opts.searchOnEnterKey) {
|
4794
|
-
handleInputEvent();
|
4829
|
+
handleInputEvent($searchInput);
|
4795
4830
|
}
|
4796
4831
|
} else {
|
4797
|
-
handleInputEvent();
|
4832
|
+
handleInputEvent($searchInput);
|
4798
4833
|
}
|
4799
4834
|
|
4800
4835
|
if (opts.showSearchClearButton) {
|
@@ -4802,6 +4837,10 @@
|
|
4802
4837
|
_this4.resetSearch();
|
4803
4838
|
});
|
4804
4839
|
}
|
4840
|
+
} else if (typeof opts.searchSelector === 'string') {
|
4841
|
+
var _$searchInput = Utils.getSearchInput(this);
|
4842
|
+
|
4843
|
+
handleInputEvent(_$searchInput);
|
4805
4844
|
}
|
4806
4845
|
}
|
4807
4846
|
}, {
|
@@ -4813,18 +4852,18 @@
|
|
4813
4852
|
|
4814
4853
|
var overwriteSearchText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
4815
4854
|
|
4816
|
-
if (currentTarget !== undefined && $(currentTarget).length && overwriteSearchText) {
|
4817
|
-
var text = $(currentTarget).val().trim();
|
4855
|
+
if (currentTarget !== undefined && $__default['default'](currentTarget).length && overwriteSearchText) {
|
4856
|
+
var text = $__default['default'](currentTarget).val().trim();
|
4818
4857
|
|
4819
|
-
if (this.options.trimOnSearch && $(currentTarget).val() !== text) {
|
4820
|
-
$(currentTarget).val(text);
|
4858
|
+
if (this.options.trimOnSearch && $__default['default'](currentTarget).val() !== text) {
|
4859
|
+
$__default['default'](currentTarget).val(text);
|
4821
4860
|
}
|
4822
4861
|
|
4823
|
-
if (this.searchText === text
|
4862
|
+
if (this.searchText === text) {
|
4824
4863
|
return;
|
4825
4864
|
}
|
4826
4865
|
|
4827
|
-
if ($(currentTarget).hasClass('search-input')) {
|
4866
|
+
if (currentTarget === Utils.getSearchInput(this)[0] || $__default['default'](currentTarget).hasClass('search-input')) {
|
4828
4867
|
this.searchText = text;
|
4829
4868
|
this.options.searchText = text;
|
4830
4869
|
}
|
@@ -4856,6 +4895,11 @@
|
|
4856
4895
|
if (this.options.sidePagination !== 'server') {
|
4857
4896
|
if (this.options.customSearch) {
|
4858
4897
|
this.data = Utils.calculateObjectValue(this.options, this.options.customSearch, [this.options.data, this.searchText, this.filterColumns]);
|
4898
|
+
|
4899
|
+
if (this.options.sortReset) {
|
4900
|
+
this.unsortedData = _toConsumableArray(this.data);
|
4901
|
+
}
|
4902
|
+
|
4859
4903
|
return;
|
4860
4904
|
}
|
4861
4905
|
|
@@ -4863,11 +4907,11 @@
|
|
4863
4907
|
var f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns; // Check filter
|
4864
4908
|
|
4865
4909
|
if (typeof this.filterOptions.filterAlgorithm === 'function') {
|
4866
|
-
this.data = this.options.data.filter(function (item
|
4910
|
+
this.data = this.options.data.filter(function (item) {
|
4867
4911
|
return _this5.filterOptions.filterAlgorithm.apply(null, [item, f]);
|
4868
4912
|
});
|
4869
4913
|
} else if (typeof this.filterOptions.filterAlgorithm === 'string') {
|
4870
|
-
this.data = f ? this.options.data.filter(function (item
|
4914
|
+
this.data = f ? this.options.data.filter(function (item) {
|
4871
4915
|
var filterAlgorithm = _this5.filterOptions.filterAlgorithm;
|
4872
4916
|
|
4873
4917
|
if (filterAlgorithm === 'and') {
|
@@ -4889,7 +4933,7 @@
|
|
4889
4933
|
}
|
4890
4934
|
|
4891
4935
|
return true;
|
4892
|
-
}) : this.options.data;
|
4936
|
+
}) : _toConsumableArray(this.options.data);
|
4893
4937
|
}
|
4894
4938
|
|
4895
4939
|
var visibleFields = this.getVisibleFields();
|
@@ -4907,13 +4951,17 @@
|
|
4907
4951
|
value = item;
|
4908
4952
|
var props = key.split('.');
|
4909
4953
|
|
4910
|
-
for (var
|
4911
|
-
if (value[props[
|
4912
|
-
value = value[props[
|
4954
|
+
for (var _i6 = 0; _i6 < props.length; _i6++) {
|
4955
|
+
if (value[props[_i6]] !== null) {
|
4956
|
+
value = value[props[_i6]];
|
4913
4957
|
}
|
4914
4958
|
}
|
4915
4959
|
} else {
|
4916
4960
|
value = item[key];
|
4961
|
+
}
|
4962
|
+
|
4963
|
+
if (_this5.options.searchAccentNeutralise) {
|
4964
|
+
value = Utils.normalizeAccent(value);
|
4917
4965
|
} // Fix #142: respect searchFormatter boolean
|
4918
4966
|
|
4919
4967
|
|
@@ -4973,7 +5021,11 @@
|
|
4973
5021
|
|
4974
5022
|
return false;
|
4975
5023
|
}) : this.data;
|
4976
|
-
|
5024
|
+
|
5025
|
+
if (this.options.sortReset) {
|
5026
|
+
this.unsortedData = _toConsumableArray(this.data);
|
5027
|
+
}
|
5028
|
+
|
4977
5029
|
this.initSort();
|
4978
5030
|
}
|
4979
5031
|
}
|
@@ -5067,9 +5119,9 @@
|
|
5067
5119
|
|
5068
5120
|
if (this.paginationParts.includes('pageSize')) {
|
5069
5121
|
html.push('<span class="page-list">');
|
5070
|
-
var pageNumber = ["<span class=\"".concat(this.constants.classes.paginationDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\"
|
5122
|
+
var pageNumber = ["<span class=\"".concat(this.constants.classes.paginationDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\" ").concat(this.constants.dataToggle, "=\"dropdown\">\n <span class=\"page-size\">\n ").concat(allSelected ? opts.formatAllRows() : opts.pageSize, "\n </span>\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n ").concat(this.constants.html.pageDropdown[0])];
|
5071
5123
|
pageList.forEach(function (page, i) {
|
5072
|
-
if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows) {
|
5124
|
+
if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows || page === opts.formatAllRows()) {
|
5073
5125
|
var active;
|
5074
5126
|
|
5075
5127
|
if (allSelected) {
|
@@ -5134,14 +5186,12 @@
|
|
5134
5186
|
if (from - 1 === max + 1) {
|
5135
5187
|
i = from - 1;
|
5136
5188
|
html.push(pageItem(i));
|
5137
|
-
} else {
|
5138
|
-
if (from -
|
5139
|
-
|
5140
|
-
|
5141
|
-
|
5142
|
-
|
5143
|
-
html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-first-separator disabled', '', '...'));
|
5144
|
-
}
|
5189
|
+
} else if (from - 1 > max) {
|
5190
|
+
if (from - opts.paginationPagesBySide * 2 > opts.paginationPagesBySide && opts.paginationUseIntermediate) {
|
5191
|
+
i = Math.round((from - middleSize) / 2 + middleSize);
|
5192
|
+
html.push(pageItem(i, ' page-intermediate'));
|
5193
|
+
} else {
|
5194
|
+
html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-first-separator disabled', '', '...'));
|
5145
5195
|
}
|
5146
5196
|
}
|
5147
5197
|
}
|
@@ -5157,14 +5207,12 @@
|
|
5157
5207
|
if (to + 1 === min - 1) {
|
5158
5208
|
i = to + 1;
|
5159
5209
|
html.push(pageItem(i));
|
5160
|
-
} else {
|
5161
|
-
if (
|
5162
|
-
|
5163
|
-
|
5164
|
-
|
5165
|
-
|
5166
|
-
html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-last-separator disabled', '', '...'));
|
5167
|
-
}
|
5210
|
+
} else if (min > to + 1) {
|
5211
|
+
if (this.totalPages - to > opts.paginationPagesBySide * 2 && opts.paginationUseIntermediate) {
|
5212
|
+
i = Math.round((this.totalPages - middleSize - to) / 2 + to);
|
5213
|
+
html.push(pageItem(i, ' page-intermediate'));
|
5214
|
+
} else {
|
5215
|
+
html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-last-separator disabled', '', '...'));
|
5168
5216
|
}
|
5169
5217
|
}
|
5170
5218
|
|
@@ -5233,7 +5281,7 @@
|
|
5233
5281
|
key: "updatePagination",
|
5234
5282
|
value: function updatePagination(event) {
|
5235
5283
|
// Fix #171: IE disabled button can be clicked bug.
|
5236
|
-
if (event && $(event.currentTarget).hasClass('disabled')) {
|
5284
|
+
if (event && $__default['default'](event.currentTarget).hasClass('disabled')) {
|
5237
5285
|
return;
|
5238
5286
|
}
|
5239
5287
|
|
@@ -5254,7 +5302,7 @@
|
|
5254
5302
|
key: "onPageListChange",
|
5255
5303
|
value: function onPageListChange(event) {
|
5256
5304
|
event.preventDefault();
|
5257
|
-
var $this = $(event.currentTarget);
|
5305
|
+
var $this = $__default['default'](event.currentTarget);
|
5258
5306
|
$this.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive);
|
5259
5307
|
this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text();
|
5260
5308
|
this.$toolbar.find('.page-size').text(this.options.pageSize);
|
@@ -5294,14 +5342,15 @@
|
|
5294
5342
|
value: function onPageNumber(event) {
|
5295
5343
|
event.preventDefault();
|
5296
5344
|
|
5297
|
-
if (this.options.pageNumber === +$(event.currentTarget).text()) {
|
5345
|
+
if (this.options.pageNumber === +$__default['default'](event.currentTarget).text()) {
|
5298
5346
|
return;
|
5299
5347
|
}
|
5300
5348
|
|
5301
|
-
this.options.pageNumber = +$(event.currentTarget).text();
|
5349
|
+
this.options.pageNumber = +$__default['default'](event.currentTarget).text();
|
5302
5350
|
this.updatePagination(event);
|
5303
5351
|
return false;
|
5304
|
-
}
|
5352
|
+
} // eslint-disable-next-line no-unused-vars
|
5353
|
+
|
5305
5354
|
}, {
|
5306
5355
|
key: "initRow",
|
5307
5356
|
value: function initRow(item, i, data, trFragments) {
|
@@ -5321,10 +5370,10 @@
|
|
5321
5370
|
style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
|
5322
5371
|
|
5323
5372
|
if (style && style.css) {
|
5324
|
-
for (var
|
5325
|
-
var _Object$
|
5326
|
-
key = _Object$
|
5327
|
-
value = _Object$
|
5373
|
+
for (var _i7 = 0, _Object$entries6 = Object.entries(style.css); _i7 < _Object$entries6.length; _i7++) {
|
5374
|
+
var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i7], 2),
|
5375
|
+
key = _Object$entries6$_i[0],
|
5376
|
+
value = _Object$entries6$_i[1];
|
5328
5377
|
|
5329
5378
|
csses.push("".concat(key, ": ").concat(value));
|
5330
5379
|
}
|
@@ -5333,20 +5382,20 @@
|
|
5333
5382
|
attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes);
|
5334
5383
|
|
5335
5384
|
if (attributes) {
|
5336
|
-
for (var
|
5337
|
-
var _Object$
|
5338
|
-
_key2 = _Object$
|
5339
|
-
_value = _Object$
|
5385
|
+
for (var _i8 = 0, _Object$entries7 = Object.entries(attributes); _i8 < _Object$entries7.length; _i8++) {
|
5386
|
+
var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2),
|
5387
|
+
_key2 = _Object$entries7$_i[0],
|
5388
|
+
_value = _Object$entries7$_i[1];
|
5340
5389
|
|
5341
5390
|
htmlAttributes.push("".concat(_key2, "=\"").concat(Utils.escapeHTML(_value), "\""));
|
5342
5391
|
}
|
5343
5392
|
}
|
5344
5393
|
|
5345
5394
|
if (item._data && !Utils.isEmptyObject(item._data)) {
|
5346
|
-
for (var
|
5347
|
-
var _Object$
|
5348
|
-
k = _Object$
|
5349
|
-
v = _Object$
|
5395
|
+
for (var _i9 = 0, _Object$entries8 = Object.entries(item._data); _i9 < _Object$entries8.length; _i9++) {
|
5396
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
|
5397
|
+
k = _Object$entries8$_i[0],
|
5398
|
+
v = _Object$entries8$_i[1];
|
5350
5399
|
|
5351
5400
|
// ignore data-index
|
5352
5401
|
if (k === 'index') {
|
@@ -5357,7 +5406,7 @@
|
|
5357
5406
|
}
|
5358
5407
|
}
|
5359
5408
|
|
5360
|
-
html.push('<tr', Utils.sprintf(' %s', htmlAttributes.length ? htmlAttributes.join(' ') : undefined), Utils.sprintf(' id="%s"', Array.isArray(item) ? undefined : item._id), Utils.sprintf(' class="%s"', style.classes || (Array.isArray(item) ? undefined : item._class)), " data-index=\"".concat(i, "\""), Utils.sprintf(' data-uniqueid="%s"', Utils.getItemField(item, this.options.uniqueId, false)), Utils.sprintf(' data-has-detail-view="%s"', this.options.detailView && Utils.calculateObjectValue(null, this.options.detailFilter, [i, item]) ? 'true' : undefined), Utils.sprintf('%s', data_), '>');
|
5409
|
+
html.push('<tr', Utils.sprintf(' %s', htmlAttributes.length ? htmlAttributes.join(' ') : undefined), Utils.sprintf(' id="%s"', Array.isArray(item) ? undefined : item._id), Utils.sprintf(' class="%s"', style.classes || (Array.isArray(item) ? undefined : item._class)), Utils.sprintf(' style="%s"', Array.isArray(item) ? undefined : item._style), " data-index=\"".concat(i, "\""), Utils.sprintf(' data-uniqueid="%s"', Utils.getItemField(item, this.options.uniqueId, false)), Utils.sprintf(' data-has-detail-view="%s"', this.options.detailView && Utils.calculateObjectValue(null, this.options.detailFilter, [i, item]) ? 'true' : undefined), Utils.sprintf('%s', data_), '>');
|
5361
5410
|
|
5362
5411
|
if (this.options.cardView) {
|
5363
5412
|
html.push("<td colspan=\"".concat(this.header.fields.length, "\"><div class=\"card-views\">"));
|
@@ -5388,13 +5437,14 @@
|
|
5388
5437
|
var id_ = '';
|
5389
5438
|
var class_ = _this7.header.classes[j];
|
5390
5439
|
var style_ = '';
|
5440
|
+
var styleToAdd_ = '';
|
5391
5441
|
var data_ = '';
|
5392
5442
|
var rowspan_ = '';
|
5393
5443
|
var colspan_ = '';
|
5394
5444
|
var title_ = '';
|
5395
5445
|
var column = _this7.columns[j];
|
5396
5446
|
|
5397
|
-
if (_this7.fromHtml && typeof value_ === 'undefined') {
|
5447
|
+
if ((_this7.fromHtml || _this7.autoMergeCells) && typeof value_ === 'undefined') {
|
5398
5448
|
if (!column.checkbox && !column.radio) {
|
5399
5449
|
return;
|
5400
5450
|
}
|
@@ -5410,11 +5460,21 @@
|
|
5410
5460
|
|
5411
5461
|
if (column.escape) {
|
5412
5462
|
value_ = Utils.escapeHTML(value_);
|
5413
|
-
}
|
5463
|
+
} // Style concat
|
5464
|
+
|
5414
5465
|
|
5415
5466
|
if (csses.concat([_this7.header.styles[j]]).length) {
|
5416
|
-
|
5417
|
-
}
|
5467
|
+
styleToAdd_ += "".concat(csses.concat([_this7.header.styles[j]]).join('; '));
|
5468
|
+
}
|
5469
|
+
|
5470
|
+
if (item["_".concat(field, "_style")]) {
|
5471
|
+
styleToAdd_ += "".concat(item["_".concat(field, "_style")]);
|
5472
|
+
}
|
5473
|
+
|
5474
|
+
if (styleToAdd_) {
|
5475
|
+
style_ = " style=\"".concat(styleToAdd_, "\"");
|
5476
|
+
} // Style concat
|
5477
|
+
// handle id and class of td
|
5418
5478
|
|
5419
5479
|
|
5420
5480
|
if (item["_".concat(field, "_id")]) {
|
@@ -5446,10 +5506,10 @@
|
|
5446
5506
|
if (cellStyle.css) {
|
5447
5507
|
var csses_ = [];
|
5448
5508
|
|
5449
|
-
for (var
|
5450
|
-
var _Object$
|
5451
|
-
_key3 = _Object$
|
5452
|
-
_value2 = _Object$
|
5509
|
+
for (var _i10 = 0, _Object$entries9 = Object.entries(cellStyle.css); _i10 < _Object$entries9.length; _i10++) {
|
5510
|
+
var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i10], 2),
|
5511
|
+
_key3 = _Object$entries9$_i[0],
|
5512
|
+
_value2 = _Object$entries9$_i[1];
|
5453
5513
|
|
5454
5514
|
csses_.push("".concat(_key3, ": ").concat(_value2));
|
5455
5515
|
}
|
@@ -5459,11 +5519,34 @@
|
|
5459
5519
|
|
5460
5520
|
value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_);
|
5461
5521
|
|
5522
|
+
if (!(column.checkbox || column.radio)) {
|
5523
|
+
value = typeof value === 'undefined' || value === null ? _this7.options.undefinedText : value;
|
5524
|
+
}
|
5525
|
+
|
5526
|
+
if (column.searchable && _this7.searchText && _this7.options.searchHighlight) {
|
5527
|
+
var defValue = '';
|
5528
|
+
var regExp = new RegExp("(".concat(_this7.searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), ")"), 'gim');
|
5529
|
+
var marker = '<mark>$1</mark>';
|
5530
|
+
var isHTML = value && /<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(value);
|
5531
|
+
|
5532
|
+
if (isHTML) {
|
5533
|
+
// value can contains a HTML tags
|
5534
|
+
var textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent;
|
5535
|
+
var textReplaced = textContent.replace(regExp, marker);
|
5536
|
+
defValue = value.replace(new RegExp("(>\\s*)(".concat(textContent, ")(\\s*)"), 'gm'), "$1".concat(textReplaced, "$3"));
|
5537
|
+
} else {
|
5538
|
+
// but usually not
|
5539
|
+
defValue = value.toString().replace(regExp, marker);
|
5540
|
+
}
|
5541
|
+
|
5542
|
+
value = Utils.calculateObjectValue(column, column.searchHighlightFormatter, [value, _this7.searchText], defValue);
|
5543
|
+
}
|
5544
|
+
|
5462
5545
|
if (item["_".concat(field, "_data")] && !Utils.isEmptyObject(item["_".concat(field, "_data")])) {
|
5463
|
-
for (var
|
5464
|
-
var _Object$
|
5465
|
-
_k = _Object$
|
5466
|
-
_v = _Object$
|
5546
|
+
for (var _i11 = 0, _Object$entries10 = Object.entries(item["_".concat(field, "_data")]); _i11 < _Object$entries10.length; _i11++) {
|
5547
|
+
var _Object$entries10$_i = _slicedToArray(_Object$entries10[_i11], 2),
|
5548
|
+
_k = _Object$entries10$_i[0],
|
5549
|
+
_v = _Object$entries10$_i[1];
|
5467
5550
|
|
5468
5551
|
// ignore data-index
|
5469
5552
|
if (_k === 'index') {
|
@@ -5478,23 +5561,19 @@
|
|
5478
5561
|
type = column.checkbox ? 'checkbox' : type;
|
5479
5562
|
type = column.radio ? 'radio' : type;
|
5480
5563
|
var c = column['class'] || '';
|
5481
|
-
var isChecked = (value
|
5564
|
+
var isChecked = Utils.isObject(value) && value.hasOwnProperty('checked') ? value.checked : (value === true || value_) && value !== false;
|
5482
5565
|
var isDisabled = !column.checkboxEnabled || value && value.disabled;
|
5483
5566
|
text = [_this7.options.cardView ? "<div class=\"card-view ".concat(c, "\">") : "<td class=\"bs-checkbox ".concat(c, "\"").concat(class_).concat(style_, ">"), "<label>\n <input\n data-index=\"".concat(i, "\"\n name=\"").concat(_this7.options.selectItemName, "\"\n type=\"").concat(type, "\"\n ").concat(Utils.sprintf('value="%s"', item[_this7.options.idField]), "\n ").concat(Utils.sprintf('checked="%s"', isChecked ? 'checked' : undefined), "\n ").concat(Utils.sprintf('disabled="%s"', isDisabled ? 'disabled' : undefined), " />\n <span></span>\n </label>"), _this7.header.formatters[j] && typeof value === 'string' ? value : '', _this7.options.cardView ? '</div>' : '</td>'].join('');
|
5484
5567
|
item[_this7.header.stateField] = value === true || !!value_ || value && value.checked;
|
5485
|
-
} else {
|
5486
|
-
|
5487
|
-
|
5488
|
-
if (_this7.options.cardView) {
|
5489
|
-
var cardTitle = _this7.options.showHeader ? "<span class=\"card-view-title\"".concat(style_, ">").concat(Utils.getFieldTitle(_this7.columns, field), "</span>") : '';
|
5490
|
-
text = "<div class=\"card-view\">".concat(cardTitle, "<span class=\"card-view-value\">").concat(value, "</span></div>");
|
5568
|
+
} else if (_this7.options.cardView) {
|
5569
|
+
var cardTitle = _this7.options.showHeader ? "<span class=\"card-view-title ".concat(cellStyle.classes, "\"").concat(style_, ">").concat(Utils.getFieldTitle(_this7.columns, field), "</span>") : '';
|
5570
|
+
text = "<div class=\"card-view\">".concat(cardTitle, "<span class=\"card-view-value ").concat(cellStyle.classes, "\"").concat(style_, ">").concat(value, "</span></div>");
|
5491
5571
|
|
5492
|
-
|
5493
|
-
|
5494
|
-
}
|
5495
|
-
} else {
|
5496
|
-
text = "<td".concat(id_).concat(class_).concat(style_).concat(data_).concat(rowspan_).concat(colspan_).concat(title_, ">").concat(value, "</td>");
|
5572
|
+
if (_this7.options.smartDisplay && value === '') {
|
5573
|
+
text = '<div class="card-view"></div>';
|
5497
5574
|
}
|
5575
|
+
} else {
|
5576
|
+
text = "<td".concat(id_).concat(class_).concat(style_).concat(data_).concat(rowspan_).concat(colspan_).concat(title_, ">").concat(value, "</td>");
|
5498
5577
|
}
|
5499
5578
|
|
5500
5579
|
html.push(text);
|
@@ -5521,7 +5600,7 @@
|
|
5521
5600
|
this.$body = this.$el.find('>tbody');
|
5522
5601
|
|
5523
5602
|
if (!this.$body.length) {
|
5524
|
-
this.$body = $('<tbody></tbody>').appendTo(this.$el);
|
5603
|
+
this.$body = $__default['default']('<tbody></tbody>').appendTo(this.$el);
|
5525
5604
|
} // Fix #389 Bootstrap-table-flatJSON is not working
|
5526
5605
|
|
5527
5606
|
|
@@ -5531,8 +5610,9 @@
|
|
5531
5610
|
}
|
5532
5611
|
|
5533
5612
|
var rows = [];
|
5534
|
-
var trFragments = $(document.createDocumentFragment());
|
5613
|
+
var trFragments = $__default['default'](document.createDocumentFragment());
|
5535
5614
|
var hasTr = false;
|
5615
|
+
this.autoMergeCells = Utils.checkAutoMergeCells(data.slice(this.pageFrom - 1, this.pageTo));
|
5536
5616
|
|
5537
5617
|
for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
|
5538
5618
|
var item = data[i];
|
@@ -5550,28 +5630,26 @@
|
|
5550
5630
|
|
5551
5631
|
|
5552
5632
|
if (!hasTr) {
|
5553
|
-
this.$body.html("<tr class=\"no-records-found\">".concat(Utils.sprintf('<td colspan="%s">%s</td>', this.getVisibleFields().length, this.options.formatNoMatches()), "</tr>"));
|
5633
|
+
this.$body.html("<tr class=\"no-records-found\">".concat(Utils.sprintf('<td colspan="%s">%s</td>', this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options), this.options.formatNoMatches()), "</tr>"));
|
5634
|
+
} else if (!this.options.virtualScroll) {
|
5635
|
+
this.$body.html(trFragments);
|
5554
5636
|
} else {
|
5555
|
-
if (
|
5556
|
-
this
|
5557
|
-
}
|
5558
|
-
if (this.virtualScroll) {
|
5559
|
-
this.virtualScroll.destroy();
|
5560
|
-
}
|
5637
|
+
if (this.virtualScroll) {
|
5638
|
+
this.virtualScroll.destroy();
|
5639
|
+
}
|
5561
5640
|
|
5562
|
-
|
5563
|
-
|
5564
|
-
|
5565
|
-
|
5566
|
-
|
5567
|
-
|
5568
|
-
|
5569
|
-
|
5641
|
+
this.virtualScroll = new VirtualScroll({
|
5642
|
+
rows: rows,
|
5643
|
+
fixedScroll: fixedScroll,
|
5644
|
+
scrollEl: this.$tableBody[0],
|
5645
|
+
contentEl: this.$body[0],
|
5646
|
+
itemHeight: this.options.virtualScrollItemHeight,
|
5647
|
+
callback: function callback() {
|
5648
|
+
_this8.fitHeader();
|
5570
5649
|
|
5571
|
-
|
5572
|
-
|
5573
|
-
|
5574
|
-
}
|
5650
|
+
_this8.initBodyEvent();
|
5651
|
+
}
|
5652
|
+
});
|
5575
5653
|
}
|
5576
5654
|
|
5577
5655
|
if (!fixedScroll) {
|
@@ -5596,17 +5674,17 @@
|
|
5596
5674
|
|
5597
5675
|
// click to select by column
|
5598
5676
|
this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) {
|
5599
|
-
var $td = $(e.currentTarget);
|
5677
|
+
var $td = $__default['default'](e.currentTarget);
|
5600
5678
|
var $tr = $td.parent();
|
5601
|
-
var $cardViewArr = $(e.target).parents('.card-views').children();
|
5602
|
-
var $cardViewTarget = $(e.target).parents('.card-view');
|
5679
|
+
var $cardViewArr = $__default['default'](e.target).parents('.card-views').children();
|
5680
|
+
var $cardViewTarget = $__default['default'](e.target).parents('.card-view');
|
5603
5681
|
var rowIndex = $tr.data('index');
|
5604
5682
|
var item = _this9.data[rowIndex];
|
5605
5683
|
var index = _this9.options.cardView ? $cardViewArr.index($cardViewTarget) : $td[0].cellIndex;
|
5606
5684
|
|
5607
5685
|
var fields = _this9.getVisibleFields();
|
5608
5686
|
|
5609
|
-
var field = fields[Utils.
|
5687
|
+
var field = fields[index - Utils.getDetailViewIndexOffset(_this9.options)];
|
5610
5688
|
var column = _this9.columns[_this9.fieldsColumnsIndex[field]];
|
5611
5689
|
var value = Utils.getItemField(item, field, _this9.options.escape);
|
5612
5690
|
|
@@ -5638,14 +5716,14 @@
|
|
5638
5716
|
this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function (e) {
|
5639
5717
|
e.preventDefault();
|
5640
5718
|
|
5641
|
-
_this9.toggleDetailView($(e.currentTarget).parent().parent().data('index'));
|
5719
|
+
_this9.toggleDetailView($__default['default'](e.currentTarget).parent().parent().data('index'));
|
5642
5720
|
|
5643
5721
|
return false;
|
5644
5722
|
});
|
5645
5723
|
this.$selectItem = this.$body.find(Utils.sprintf('[name="%s"]', this.options.selectItemName));
|
5646
5724
|
this.$selectItem.off('click').on('click', function (e) {
|
5647
5725
|
e.stopImmediatePropagation();
|
5648
|
-
var $this = $(e.currentTarget);
|
5726
|
+
var $this = $__default['default'](e.currentTarget);
|
5649
5727
|
|
5650
5728
|
_this9._toggleCheck($this.prop('checked'), $this.data('index'));
|
5651
5729
|
});
|
@@ -5669,11 +5747,9 @@
|
|
5669
5747
|
return;
|
5670
5748
|
}
|
5671
5749
|
|
5672
|
-
|
5673
|
-
fieldIndex += 1;
|
5674
|
-
}
|
5750
|
+
fieldIndex += Utils.getDetailViewIndexOffset(_this9.options);
|
5675
5751
|
|
5676
|
-
var
|
5752
|
+
var _loop2 = function _loop2(key) {
|
5677
5753
|
if (!events.hasOwnProperty(key)) {
|
5678
5754
|
return "continue";
|
5679
5755
|
}
|
@@ -5681,7 +5757,7 @@
|
|
5681
5757
|
var event = events[key];
|
5682
5758
|
|
5683
5759
|
_this9.$body.find('>tr:not(.no-records-found)').each(function (i, tr) {
|
5684
|
-
var $tr = $(tr);
|
5760
|
+
var $tr = $__default['default'](tr);
|
5685
5761
|
var $td = $tr.find(_this9.options.cardView ? '.card-views>.card-view' : '>td').eq(fieldIndex);
|
5686
5762
|
var index = key.indexOf(' ');
|
5687
5763
|
var name = key.substring(0, index);
|
@@ -5696,9 +5772,9 @@
|
|
5696
5772
|
};
|
5697
5773
|
|
5698
5774
|
for (var key in events) {
|
5699
|
-
var
|
5775
|
+
var _ret2 = _loop2(key);
|
5700
5776
|
|
5701
|
-
if (
|
5777
|
+
if (_ret2 === "continue") continue;
|
5702
5778
|
}
|
5703
5779
|
});
|
5704
5780
|
}
|
@@ -5749,12 +5825,12 @@
|
|
5749
5825
|
return !column.searchable;
|
5750
5826
|
}).length) {
|
5751
5827
|
params.searchable = [];
|
5752
|
-
|
5753
|
-
var
|
5754
|
-
|
5828
|
+
|
5829
|
+
var _iterator2 = _createForOfIteratorHelper(this.columns),
|
5830
|
+
_step2;
|
5755
5831
|
|
5756
5832
|
try {
|
5757
|
-
for (
|
5833
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
5758
5834
|
var column = _step2.value;
|
5759
5835
|
|
5760
5836
|
if (!column.checkbox && column.searchable && (this.options.visibleSearch && column.visible || !this.options.visibleSearch)) {
|
@@ -5762,18 +5838,9 @@
|
|
5762
5838
|
}
|
5763
5839
|
}
|
5764
5840
|
} catch (err) {
|
5765
|
-
|
5766
|
-
_iteratorError2 = err;
|
5841
|
+
_iterator2.e(err);
|
5767
5842
|
} finally {
|
5768
|
-
|
5769
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
5770
|
-
_iterator2.return();
|
5771
|
-
}
|
5772
|
-
} finally {
|
5773
|
-
if (_didIteratorError2) {
|
5774
|
-
throw _iteratorError2;
|
5775
|
-
}
|
5776
|
-
}
|
5843
|
+
_iterator2.f();
|
5777
5844
|
}
|
5778
5845
|
}
|
5779
5846
|
|
@@ -5781,7 +5848,7 @@
|
|
5781
5848
|
params.filter = JSON.stringify(this.filterColumnsPartial, null);
|
5782
5849
|
}
|
5783
5850
|
|
5784
|
-
|
5851
|
+
$__default['default'].extend(params, query || {});
|
5785
5852
|
data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data); // false to stop request
|
5786
5853
|
|
5787
5854
|
if (data === false) {
|
@@ -5792,7 +5859,7 @@
|
|
5792
5859
|
this.showLoading();
|
5793
5860
|
}
|
5794
5861
|
|
5795
|
-
var request =
|
5862
|
+
var request = $__default['default'].extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), {
|
5796
5863
|
type: this.options.method,
|
5797
5864
|
url: url || this.options.url,
|
5798
5865
|
data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data,
|
@@ -5838,7 +5905,7 @@
|
|
5838
5905
|
this._xhr.abort();
|
5839
5906
|
}
|
5840
5907
|
|
5841
|
-
this._xhr =
|
5908
|
+
this._xhr = $__default['default'].ajax(request);
|
5842
5909
|
}
|
5843
5910
|
|
5844
5911
|
return data;
|
@@ -5850,7 +5917,7 @@
|
|
5850
5917
|
this.searchText = '';
|
5851
5918
|
|
5852
5919
|
if (this.options.searchText !== '') {
|
5853
|
-
var $search =
|
5920
|
+
var $search = Utils.getSearchInput(this);
|
5854
5921
|
$search.val(this.options.searchText);
|
5855
5922
|
this.onSearch({
|
5856
5923
|
currentTarget: $search,
|
@@ -5865,7 +5932,7 @@
|
|
5865
5932
|
var _this11 = this;
|
5866
5933
|
|
5867
5934
|
this.$header.find('th').each(function (i, th) {
|
5868
|
-
$(th).find('.sortable').removeClass('desc asc').addClass($(th).data('field') === _this11.options.sortName ? _this11.options.sortOrder : 'both');
|
5935
|
+
$__default['default'](th).find('.sortable').removeClass('desc asc').addClass($__default['default'](th).data('field') === _this11.options.sortName ? _this11.options.sortOrder : 'both');
|
5869
5936
|
});
|
5870
5937
|
}
|
5871
5938
|
}, {
|
@@ -5874,7 +5941,7 @@
|
|
5874
5941
|
var checkAll = this.$selectItem.filter(':enabled').length && this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length;
|
5875
5942
|
this.$selectAll.add(this.$selectAll_).prop('checked', checkAll);
|
5876
5943
|
this.$selectItem.each(function (i, el) {
|
5877
|
-
$(el).closest('tr')[$(el).prop('checked') ? 'addClass' : 'removeClass']('selected');
|
5944
|
+
$__default['default'](el).closest('tr')[$__default['default'](el).prop('checked') ? 'addClass' : 'removeClass']('selected');
|
5878
5945
|
});
|
5879
5946
|
}
|
5880
5947
|
}, {
|
@@ -5883,18 +5950,17 @@
|
|
5883
5950
|
var _this12 = this;
|
5884
5951
|
|
5885
5952
|
this.$selectItem.each(function (i, el) {
|
5886
|
-
_this12.data[$(el).data('index')][_this12.header.stateField] = $(el).prop('checked');
|
5953
|
+
_this12.data[$__default['default'](el).data('index')][_this12.header.stateField] = $__default['default'](el).prop('checked');
|
5887
5954
|
});
|
5888
5955
|
}
|
5889
5956
|
}, {
|
5890
5957
|
key: "resetRows",
|
5891
5958
|
value: function resetRows() {
|
5892
|
-
var
|
5893
|
-
|
5894
|
-
var _iteratorError3 = undefined;
|
5959
|
+
var _iterator3 = _createForOfIteratorHelper(this.data),
|
5960
|
+
_step3;
|
5895
5961
|
|
5896
5962
|
try {
|
5897
|
-
for (
|
5963
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
5898
5964
|
var row = _step3.value;
|
5899
5965
|
this.$selectAll.prop('checked', false);
|
5900
5966
|
this.$selectItem.prop('checked', false);
|
@@ -5904,18 +5970,9 @@
|
|
5904
5970
|
}
|
5905
5971
|
}
|
5906
5972
|
} catch (err) {
|
5907
|
-
|
5908
|
-
_iteratorError3 = err;
|
5973
|
+
_iterator3.e(err);
|
5909
5974
|
} finally {
|
5910
|
-
|
5911
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
5912
|
-
_iterator3.return();
|
5913
|
-
}
|
5914
|
-
} finally {
|
5915
|
-
if (_didIteratorError3) {
|
5916
|
-
throw _iteratorError3;
|
5917
|
-
}
|
5918
|
-
}
|
5975
|
+
_iterator3.f();
|
5919
5976
|
}
|
5920
5977
|
|
5921
5978
|
this.initHiddenRows();
|
@@ -5923,7 +5980,7 @@
|
|
5923
5980
|
}, {
|
5924
5981
|
key: "trigger",
|
5925
5982
|
value: function trigger(_name) {
|
5926
|
-
var _this$options;
|
5983
|
+
var _this$options, _this$options2;
|
5927
5984
|
|
5928
5985
|
var name = "".concat(_name, ".bs.table");
|
5929
5986
|
|
@@ -5931,11 +5988,17 @@
|
|
5931
5988
|
args[_key4 - 1] = arguments[_key4];
|
5932
5989
|
}
|
5933
5990
|
|
5934
|
-
(_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, args);
|
5991
|
+
(_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, [].concat(args, [this]));
|
5992
|
+
|
5993
|
+
this.$el.trigger($__default['default'].Event(name, {
|
5994
|
+
sender: this
|
5995
|
+
}), args);
|
5935
5996
|
|
5936
|
-
this
|
5937
|
-
|
5938
|
-
this.$el.trigger(
|
5997
|
+
(_this$options2 = this.options).onAll.apply(_this$options2, [name].concat([].concat(args, [this])));
|
5998
|
+
|
5999
|
+
this.$el.trigger($__default['default'].Event('all.bs.table', {
|
6000
|
+
sender: this
|
6001
|
+
}), [name, args]);
|
5939
6002
|
}
|
5940
6003
|
}, {
|
5941
6004
|
key: "resetHeader",
|
@@ -5964,7 +6027,7 @@
|
|
5964
6027
|
var fixedBody = this.$tableBody.get(0);
|
5965
6028
|
var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0;
|
5966
6029
|
this.$el.css('margin-top', -this.$header.outerHeight());
|
5967
|
-
var focused = $(':focus');
|
6030
|
+
var focused = $__default['default'](':focus');
|
5968
6031
|
|
5969
6032
|
if (focused.length > 0) {
|
5970
6033
|
var $th = focused.parents('th');
|
@@ -5986,7 +6049,7 @@
|
|
5986
6049
|
this.$selectAll_ = this.$header_.find('[name="btSelectAll"]');
|
5987
6050
|
this.$tableHeader.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).html('').attr('class', this.$el.attr('class')).append(this.$header_);
|
5988
6051
|
this.$tableLoading.css('width', this.$el.outerWidth());
|
5989
|
-
var focusedTemp = $('.focus-temp:visible:eq(0)');
|
6052
|
+
var focusedTemp = $__default['default']('.focus-temp:visible:eq(0)');
|
5990
6053
|
|
5991
6054
|
if (focusedTemp.length > 0) {
|
5992
6055
|
focusedTemp.focus();
|
@@ -5995,7 +6058,7 @@
|
|
5995
6058
|
|
5996
6059
|
|
5997
6060
|
this.$header.find('th[data-field]').each(function (i, el) {
|
5998
|
-
_this14.$header_.find(Utils.sprintf('th[data-field="%s"]', $(el).data('field'))).data($(el).data());
|
6061
|
+
_this14.$header_.find(Utils.sprintf('th[data-field="%s"]', $__default['default'](el).data('field'))).data($__default['default'](el).data());
|
5999
6062
|
});
|
6000
6063
|
var visibleFields = this.getVisibleFields();
|
6001
6064
|
var $ths = this.$header_.find('th');
|
@@ -6007,7 +6070,7 @@
|
|
6007
6070
|
|
6008
6071
|
var trLength = $tr.find('> *').length;
|
6009
6072
|
$tr.find('> *').each(function (i, el) {
|
6010
|
-
var $this = $(el);
|
6073
|
+
var $this = $__default['default'](el);
|
6011
6074
|
|
6012
6075
|
if (Utils.hasDetailViewIcon(_this14.options)) {
|
6013
6076
|
if (i === 0 && _this14.options.detailViewAlign !== 'right' || i === trLength - 1 && _this14.options.detailViewAlign === 'right') {
|
@@ -6020,12 +6083,12 @@
|
|
6020
6083
|
}
|
6021
6084
|
}
|
6022
6085
|
|
6023
|
-
var index = Utils.
|
6086
|
+
var index = i - Utils.getDetailViewIndexOffset(_this14.options);
|
6024
6087
|
|
6025
6088
|
var $th = _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index]));
|
6026
6089
|
|
6027
6090
|
if ($th.length > 1) {
|
6028
|
-
$th = $($ths[$this[0].cellIndex]);
|
6091
|
+
$th = $__default['default']($ths[$this[0].cellIndex]);
|
6029
6092
|
}
|
6030
6093
|
|
6031
6094
|
var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width();
|
@@ -6054,12 +6117,11 @@
|
|
6054
6117
|
html.push(detailTemplate);
|
6055
6118
|
}
|
6056
6119
|
|
6057
|
-
var
|
6058
|
-
|
6059
|
-
var _iteratorError4 = undefined;
|
6120
|
+
var _iterator4 = _createForOfIteratorHelper(this.columns),
|
6121
|
+
_step4;
|
6060
6122
|
|
6061
6123
|
try {
|
6062
|
-
for (
|
6124
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
6063
6125
|
var column = _step4.value;
|
6064
6126
|
var falign = '';
|
6065
6127
|
var valign = '';
|
@@ -6067,7 +6129,7 @@
|
|
6067
6129
|
var style = {};
|
6068
6130
|
var class_ = Utils.sprintf(' class="%s"', column['class']);
|
6069
6131
|
|
6070
|
-
if (!column.visible) {
|
6132
|
+
if (!column.visible || this.footerData && this.footerData.length > 0 && !(column.field in this.footerData[0])) {
|
6071
6133
|
continue;
|
6072
6134
|
}
|
6073
6135
|
|
@@ -6080,12 +6142,12 @@
|
|
6080
6142
|
style = Utils.calculateObjectValue(null, this.options.footerStyle, [column]);
|
6081
6143
|
|
6082
6144
|
if (style && style.css) {
|
6083
|
-
for (var
|
6084
|
-
var _Object$
|
6085
|
-
key = _Object$
|
6086
|
-
|
6145
|
+
for (var _i12 = 0, _Object$entries11 = Object.entries(style.css); _i12 < _Object$entries11.length; _i12++) {
|
6146
|
+
var _Object$entries11$_i = _slicedToArray(_Object$entries11[_i12], 2),
|
6147
|
+
key = _Object$entries11$_i[0],
|
6148
|
+
_value3 = _Object$entries11$_i[1];
|
6087
6149
|
|
6088
|
-
csses.push("".concat(key, ": ").concat(
|
6150
|
+
csses.push("".concat(key, ": ").concat(_value3));
|
6089
6151
|
}
|
6090
6152
|
}
|
6091
6153
|
|
@@ -6093,27 +6155,35 @@
|
|
6093
6155
|
class_ = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], style.classes].join(' ') : style.classes);
|
6094
6156
|
}
|
6095
6157
|
|
6096
|
-
html.push('<th', class_, Utils.sprintf(' style="%s"', falign + valign + csses.concat().join('; '))
|
6158
|
+
html.push('<th', class_, Utils.sprintf(' style="%s"', falign + valign + csses.concat().join('; ')));
|
6159
|
+
var colspan = 0;
|
6160
|
+
|
6161
|
+
if (this.footerData && this.footerData.length > 0) {
|
6162
|
+
colspan = this.footerData[0]["_".concat(column.field, "_colspan")] || 0;
|
6163
|
+
}
|
6164
|
+
|
6165
|
+
if (colspan) {
|
6166
|
+
html.push(" colspan=\"".concat(colspan, "\" "));
|
6167
|
+
}
|
6168
|
+
|
6169
|
+
html.push('>');
|
6097
6170
|
html.push('<div class="th-inner">');
|
6098
|
-
|
6171
|
+
var value = '';
|
6172
|
+
|
6173
|
+
if (this.footerData && this.footerData.length > 0) {
|
6174
|
+
value = this.footerData[0][column.field] || '';
|
6175
|
+
}
|
6176
|
+
|
6177
|
+
html.push(Utils.calculateObjectValue(column, column.footerFormatter, [data, value], value));
|
6099
6178
|
html.push('</div>');
|
6100
6179
|
html.push('<div class="fht-cell"></div>');
|
6101
6180
|
html.push('</div>');
|
6102
6181
|
html.push('</th>');
|
6103
6182
|
}
|
6104
6183
|
} catch (err) {
|
6105
|
-
|
6106
|
-
_iteratorError4 = err;
|
6184
|
+
_iterator4.e(err);
|
6107
6185
|
} finally {
|
6108
|
-
|
6109
|
-
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
6110
|
-
_iterator4.return();
|
6111
|
-
}
|
6112
|
-
} finally {
|
6113
|
-
if (_didIteratorError4) {
|
6114
|
-
throw _iteratorError4;
|
6115
|
-
}
|
6116
|
-
}
|
6186
|
+
_iterator4.f();
|
6117
6187
|
}
|
6118
6188
|
|
6119
6189
|
if (detailTemplate && this.options.detailViewAlign === 'right') {
|
@@ -6143,9 +6213,9 @@
|
|
6143
6213
|
var fixedBody = this.$tableBody.get(0);
|
6144
6214
|
var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0;
|
6145
6215
|
this.$tableFooter.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).attr('class', this.$el.attr('class'));
|
6146
|
-
var visibleFields = this.getVisibleFields();
|
6147
6216
|
var $ths = this.$tableFooter.find('th');
|
6148
6217
|
var $tr = this.$body.find('>tr:first-child:not(.no-records-found)');
|
6218
|
+
$ths.find('.fht-cell').width('auto');
|
6149
6219
|
|
6150
6220
|
while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) {
|
6151
6221
|
$tr = $tr.next();
|
@@ -6153,7 +6223,7 @@
|
|
6153
6223
|
|
6154
6224
|
var trLength = $tr.find('> *').length;
|
6155
6225
|
$tr.find('> *').each(function (i, el) {
|
6156
|
-
var $this = $(el);
|
6226
|
+
var $this = $__default['default'](el);
|
6157
6227
|
|
6158
6228
|
if (Utils.hasDetailViewIcon(_this15.options)) {
|
6159
6229
|
if (i === 0 && _this15.options.detailViewAlign === 'left' || i === trLength - 1 && _this15.options.detailViewAlign === 'right') {
|
@@ -6197,12 +6267,12 @@
|
|
6197
6267
|
key: "getVisibleFields",
|
6198
6268
|
value: function getVisibleFields() {
|
6199
6269
|
var visibleFields = [];
|
6200
|
-
|
6201
|
-
var
|
6202
|
-
|
6270
|
+
|
6271
|
+
var _iterator5 = _createForOfIteratorHelper(this.header.fields),
|
6272
|
+
_step5;
|
6203
6273
|
|
6204
6274
|
try {
|
6205
|
-
for (
|
6275
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
6206
6276
|
var field = _step5.value;
|
6207
6277
|
var column = this.columns[this.fieldsColumnsIndex[field]];
|
6208
6278
|
|
@@ -6213,18 +6283,9 @@
|
|
6213
6283
|
visibleFields.push(field);
|
6214
6284
|
}
|
6215
6285
|
} catch (err) {
|
6216
|
-
|
6217
|
-
_iteratorError5 = err;
|
6286
|
+
_iterator5.e(err);
|
6218
6287
|
} finally {
|
6219
|
-
|
6220
|
-
if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
|
6221
|
-
_iterator5.return();
|
6222
|
-
}
|
6223
|
-
} finally {
|
6224
|
-
if (_didIteratorError5) {
|
6225
|
-
throw _iteratorError5;
|
6226
|
-
}
|
6227
|
-
}
|
6288
|
+
_iterator5.f();
|
6228
6289
|
}
|
6229
6290
|
|
6230
6291
|
return visibleFields;
|
@@ -6240,9 +6301,9 @@
|
|
6240
6301
|
key: "getOptions",
|
6241
6302
|
value: function getOptions() {
|
6242
6303
|
// deep copy and remove data
|
6243
|
-
var options =
|
6304
|
+
var options = $__default['default'].extend({}, this.options);
|
6244
6305
|
delete options.data;
|
6245
|
-
return
|
6306
|
+
return $__default['default'].extend(true, {}, options);
|
6246
6307
|
}
|
6247
6308
|
}, {
|
6248
6309
|
key: "refreshOptions",
|
@@ -6252,7 +6313,7 @@
|
|
6252
6313
|
return;
|
6253
6314
|
}
|
6254
6315
|
|
6255
|
-
this.options =
|
6316
|
+
this.options = $__default['default'].extend(this.options, options);
|
6256
6317
|
this.trigger('refresh-options', this.options);
|
6257
6318
|
this.destroy();
|
6258
6319
|
this.init();
|
@@ -6264,7 +6325,8 @@
|
|
6264
6325
|
|
6265
6326
|
var data = this.options.data;
|
6266
6327
|
|
6267
|
-
if ((this.searchText || this.options.customSearch || this.options.sortName ||
|
6328
|
+
if ((this.searchText || this.options.customSearch || this.options.sortName !== undefined || this.enableCustomSort || // Fix #4616: this.enableCustomSort is for extensions
|
6329
|
+
!Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) {
|
6268
6330
|
data = this.data;
|
6269
6331
|
}
|
6270
6332
|
|
@@ -6281,10 +6343,10 @@
|
|
6281
6343
|
|
6282
6344
|
if (params && params.formatted) {
|
6283
6345
|
data.forEach(function (row) {
|
6284
|
-
for (var
|
6285
|
-
var _Object$
|
6286
|
-
key = _Object$
|
6287
|
-
value = _Object$
|
6346
|
+
for (var _i13 = 0, _Object$entries12 = Object.entries(row); _i13 < _Object$entries12.length; _i13++) {
|
6347
|
+
var _Object$entries12$_i = _slicedToArray(_Object$entries12[_i13], 2),
|
6348
|
+
key = _Object$entries12$_i[0],
|
6349
|
+
value = _Object$entries12$_i[1];
|
6288
6350
|
|
6289
6351
|
var column = _this17.columns[_this17.fieldsColumnsIndex[key]];
|
6290
6352
|
|
@@ -6304,20 +6366,10 @@
|
|
6304
6366
|
value: function getSelections() {
|
6305
6367
|
var _this18 = this;
|
6306
6368
|
|
6307
|
-
|
6308
|
-
return this.data.filter(function (row) {
|
6369
|
+
return (this.options.maintainMetaData ? this.options.data : this.data).filter(function (row) {
|
6309
6370
|
return row[_this18.header.stateField] === true;
|
6310
6371
|
});
|
6311
6372
|
}
|
6312
|
-
}, {
|
6313
|
-
key: "getAllSelections",
|
6314
|
-
value: function getAllSelections() {
|
6315
|
-
var _this19 = this;
|
6316
|
-
|
6317
|
-
return this.options.data.filter(function (row) {
|
6318
|
-
return row[_this19.header.stateField] === true;
|
6319
|
-
});
|
6320
|
-
}
|
6321
6373
|
}, {
|
6322
6374
|
key: "load",
|
6323
6375
|
value: function load(_data) {
|
@@ -6326,10 +6378,8 @@
|
|
6326
6378
|
|
6327
6379
|
if (this.options.pagination && this.options.sidePagination === 'server') {
|
6328
6380
|
this.options.totalRows = data[this.options.totalField];
|
6329
|
-
}
|
6330
|
-
|
6331
|
-
if (this.options.pagination && this.options.sidePagination === 'server') {
|
6332
6381
|
this.options.totalNotFiltered = data[this.options.totalNotFilteredField];
|
6382
|
+
this.footerData = data[this.options.footerField] ? [data[this.options.footerField]] : undefined;
|
6333
6383
|
}
|
6334
6384
|
|
6335
6385
|
fixedScroll = data.fixedScroll;
|
@@ -6360,39 +6410,30 @@
|
|
6360
6410
|
}, {
|
6361
6411
|
key: "remove",
|
6362
6412
|
value: function remove(params) {
|
6363
|
-
var
|
6364
|
-
var i;
|
6365
|
-
var row;
|
6366
|
-
|
6367
|
-
if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) {
|
6368
|
-
return;
|
6369
|
-
}
|
6413
|
+
var removed = 0;
|
6370
6414
|
|
6371
|
-
for (i =
|
6372
|
-
var
|
6373
|
-
row = this.options.data[i];
|
6415
|
+
for (var i = this.options.data.length - 1; i >= 0; i--) {
|
6416
|
+
var row = this.options.data[i];
|
6374
6417
|
|
6375
6418
|
if (!row.hasOwnProperty(params.field) && params.field !== '$index') {
|
6376
6419
|
continue;
|
6377
|
-
} else if (!row.hasOwnProperty(params.field) && params.field === '$index') {
|
6378
|
-
exists = params.values.includes(i);
|
6379
|
-
} else {
|
6380
|
-
exists = params.values.includes(row[params.field]);
|
6381
6420
|
}
|
6382
6421
|
|
6383
|
-
if (
|
6422
|
+
if (!row.hasOwnProperty(params.field) && params.field === '$index' && params.values.includes(i) || params.values.includes(row[params.field])) {
|
6423
|
+
removed++;
|
6384
6424
|
this.options.data.splice(i, 1);
|
6385
|
-
|
6386
|
-
if (this.options.sidePagination === 'server') {
|
6387
|
-
this.options.totalRows -= 1;
|
6388
|
-
}
|
6389
6425
|
}
|
6390
6426
|
}
|
6391
6427
|
|
6392
|
-
if (
|
6428
|
+
if (!removed) {
|
6393
6429
|
return;
|
6394
6430
|
}
|
6395
6431
|
|
6432
|
+
if (this.options.sidePagination === 'server') {
|
6433
|
+
this.options.totalRows -= removed;
|
6434
|
+
this.data = _toConsumableArray(this.options.data);
|
6435
|
+
}
|
6436
|
+
|
6396
6437
|
this.initSearch();
|
6397
6438
|
this.initPagination();
|
6398
6439
|
this.initSort();
|
@@ -6425,12 +6466,12 @@
|
|
6425
6466
|
key: "updateRow",
|
6426
6467
|
value: function updateRow(params) {
|
6427
6468
|
var allParams = Array.isArray(params) ? params : [params];
|
6428
|
-
|
6429
|
-
var
|
6430
|
-
|
6469
|
+
|
6470
|
+
var _iterator6 = _createForOfIteratorHelper(allParams),
|
6471
|
+
_step6;
|
6431
6472
|
|
6432
6473
|
try {
|
6433
|
-
for (
|
6474
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
6434
6475
|
var _params = _step6.value;
|
6435
6476
|
|
6436
6477
|
if (!_params.hasOwnProperty('index') || !_params.hasOwnProperty('row')) {
|
@@ -6440,22 +6481,13 @@
|
|
6440
6481
|
if (_params.hasOwnProperty('replace') && _params.replace) {
|
6441
6482
|
this.options.data[_params.index] = _params.row;
|
6442
6483
|
} else {
|
6443
|
-
|
6484
|
+
$__default['default'].extend(this.options.data[_params.index], _params.row);
|
6444
6485
|
}
|
6445
6486
|
}
|
6446
6487
|
} catch (err) {
|
6447
|
-
|
6448
|
-
_iteratorError6 = err;
|
6488
|
+
_iterator6.e(err);
|
6449
6489
|
} finally {
|
6450
|
-
|
6451
|
-
if (!_iteratorNormalCompletion6 && _iterator6.return != null) {
|
6452
|
-
_iterator6.return();
|
6453
|
-
}
|
6454
|
-
} finally {
|
6455
|
-
if (_didIteratorError6) {
|
6456
|
-
throw _iteratorError6;
|
6457
|
-
}
|
6458
|
-
}
|
6490
|
+
_iterator6.f();
|
6459
6491
|
}
|
6460
6492
|
|
6461
6493
|
this.initSearch();
|
@@ -6509,12 +6541,12 @@
|
|
6509
6541
|
key: "updateByUniqueId",
|
6510
6542
|
value: function updateByUniqueId(params) {
|
6511
6543
|
var allParams = Array.isArray(params) ? params : [params];
|
6512
|
-
|
6513
|
-
var
|
6514
|
-
|
6544
|
+
|
6545
|
+
var _iterator7 = _createForOfIteratorHelper(allParams),
|
6546
|
+
_step7;
|
6515
6547
|
|
6516
6548
|
try {
|
6517
|
-
for (
|
6549
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
|
6518
6550
|
var _params2 = _step7.value;
|
6519
6551
|
|
6520
6552
|
if (!_params2.hasOwnProperty('id') || !_params2.hasOwnProperty('row')) {
|
@@ -6530,22 +6562,13 @@
|
|
6530
6562
|
if (_params2.hasOwnProperty('replace') && _params2.replace) {
|
6531
6563
|
this.options.data[rowId] = _params2.row;
|
6532
6564
|
} else {
|
6533
|
-
|
6565
|
+
$__default['default'].extend(this.options.data[rowId], _params2.row);
|
6534
6566
|
}
|
6535
6567
|
}
|
6536
6568
|
} catch (err) {
|
6537
|
-
|
6538
|
-
_iteratorError7 = err;
|
6569
|
+
_iterator7.e(err);
|
6539
6570
|
} finally {
|
6540
|
-
|
6541
|
-
if (!_iteratorNormalCompletion7 && _iterator7.return != null) {
|
6542
|
-
_iterator7.return();
|
6543
|
-
}
|
6544
|
-
} finally {
|
6545
|
-
if (_didIteratorError7) {
|
6546
|
-
throw _iteratorError7;
|
6547
|
-
}
|
6548
|
-
}
|
6571
|
+
_iterator7.f();
|
6549
6572
|
}
|
6550
6573
|
|
6551
6574
|
this.initSearch();
|
@@ -6567,6 +6590,11 @@
|
|
6567
6590
|
return;
|
6568
6591
|
}
|
6569
6592
|
|
6593
|
+
if (this.options.sidePagination === 'server') {
|
6594
|
+
this.options.totalRows -= 1;
|
6595
|
+
this.data = _toConsumableArray(this.options.data);
|
6596
|
+
}
|
6597
|
+
|
6570
6598
|
this.initSearch();
|
6571
6599
|
this.initPagination();
|
6572
6600
|
this.initBody(true);
|
@@ -6590,7 +6618,7 @@
|
|
6590
6618
|
}, {
|
6591
6619
|
key: "updateCellByUniqueId",
|
6592
6620
|
value: function updateCellByUniqueId(params) {
|
6593
|
-
var
|
6621
|
+
var _this19 = this;
|
6594
6622
|
|
6595
6623
|
var allParams = Array.isArray(params) ? params : [params];
|
6596
6624
|
allParams.forEach(function (_ref6) {
|
@@ -6598,13 +6626,13 @@
|
|
6598
6626
|
field = _ref6.field,
|
6599
6627
|
value = _ref6.value;
|
6600
6628
|
|
6601
|
-
var rowId =
|
6629
|
+
var rowId = _this19.options.data.indexOf(_this19.getRowByUniqueId(id));
|
6602
6630
|
|
6603
6631
|
if (rowId === -1) {
|
6604
6632
|
return;
|
6605
6633
|
}
|
6606
6634
|
|
6607
|
-
|
6635
|
+
_this19.options.data[rowId][field] = value;
|
6608
6636
|
});
|
6609
6637
|
|
6610
6638
|
if (params.reinit === false) {
|
@@ -6662,12 +6690,12 @@
|
|
6662
6690
|
|
6663
6691
|
var data = this.getData();
|
6664
6692
|
var rows = [];
|
6665
|
-
|
6666
|
-
var
|
6667
|
-
|
6693
|
+
|
6694
|
+
var _iterator8 = _createForOfIteratorHelper(data),
|
6695
|
+
_step8;
|
6668
6696
|
|
6669
6697
|
try {
|
6670
|
-
for (
|
6698
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
6671
6699
|
var row = _step8.value;
|
6672
6700
|
|
6673
6701
|
if (this.hiddenRows.includes(row)) {
|
@@ -6675,18 +6703,9 @@
|
|
6675
6703
|
}
|
6676
6704
|
}
|
6677
6705
|
} catch (err) {
|
6678
|
-
|
6679
|
-
_iteratorError8 = err;
|
6706
|
+
_iterator8.e(err);
|
6680
6707
|
} finally {
|
6681
|
-
|
6682
|
-
if (!_iteratorNormalCompletion8 && _iterator8.return != null) {
|
6683
|
-
_iterator8.return();
|
6684
|
-
}
|
6685
|
-
} finally {
|
6686
|
-
if (_didIteratorError8) {
|
6687
|
-
throw _iteratorError8;
|
6688
|
-
}
|
6689
|
-
}
|
6708
|
+
_iterator8.f();
|
6690
6709
|
}
|
6691
6710
|
|
6692
6711
|
this.hiddenRows = rows;
|
@@ -6695,21 +6714,21 @@
|
|
6695
6714
|
}, {
|
6696
6715
|
key: "showColumn",
|
6697
6716
|
value: function showColumn(field) {
|
6698
|
-
var
|
6717
|
+
var _this20 = this;
|
6699
6718
|
|
6700
6719
|
var fields = Array.isArray(field) ? field : [field];
|
6701
6720
|
fields.forEach(function (field) {
|
6702
|
-
|
6721
|
+
_this20._toggleColumn(_this20.fieldsColumnsIndex[field], true, true);
|
6703
6722
|
});
|
6704
6723
|
}
|
6705
6724
|
}, {
|
6706
6725
|
key: "hideColumn",
|
6707
6726
|
value: function hideColumn(field) {
|
6708
|
-
var
|
6727
|
+
var _this21 = this;
|
6709
6728
|
|
6710
6729
|
var fields = Array.isArray(field) ? field : [field];
|
6711
6730
|
fields.forEach(function (field) {
|
6712
|
-
|
6731
|
+
_this21._toggleColumn(_this21.fieldsColumnsIndex[field], false, true);
|
6713
6732
|
});
|
6714
6733
|
}
|
6715
6734
|
}, {
|
@@ -6740,10 +6759,10 @@
|
|
6740
6759
|
}, {
|
6741
6760
|
key: "getVisibleColumns",
|
6742
6761
|
value: function getVisibleColumns() {
|
6743
|
-
var
|
6762
|
+
var _this22 = this;
|
6744
6763
|
|
6745
6764
|
return this.columns.filter(function (column) {
|
6746
|
-
return column.visible && !
|
6765
|
+
return column.visible && !_this22.isSelectionColumn(column);
|
6747
6766
|
});
|
6748
6767
|
}
|
6749
6768
|
}, {
|
@@ -6772,14 +6791,13 @@
|
|
6772
6791
|
}, {
|
6773
6792
|
key: "_toggleAllColumns",
|
6774
6793
|
value: function _toggleAllColumns(visible) {
|
6775
|
-
var
|
6794
|
+
var _this23 = this;
|
6776
6795
|
|
6777
|
-
var
|
6778
|
-
|
6779
|
-
var _iteratorError9 = undefined;
|
6796
|
+
var _iterator9 = _createForOfIteratorHelper(this.columns.slice().reverse()),
|
6797
|
+
_step9;
|
6780
6798
|
|
6781
6799
|
try {
|
6782
|
-
for (
|
6800
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
|
6783
6801
|
var column = _step9.value;
|
6784
6802
|
|
6785
6803
|
if (column.switchable) {
|
@@ -6791,18 +6809,9 @@
|
|
6791
6809
|
}
|
6792
6810
|
}
|
6793
6811
|
} catch (err) {
|
6794
|
-
|
6795
|
-
_iteratorError9 = err;
|
6812
|
+
_iterator9.e(err);
|
6796
6813
|
} finally {
|
6797
|
-
|
6798
|
-
if (!_iteratorNormalCompletion9 && _iterator9.return != null) {
|
6799
|
-
_iterator9.return();
|
6800
|
-
}
|
6801
|
-
} finally {
|
6802
|
-
if (_didIteratorError9) {
|
6803
|
-
throw _iteratorError9;
|
6804
|
-
}
|
6805
|
-
}
|
6814
|
+
_iterator9.f();
|
6806
6815
|
}
|
6807
6816
|
|
6808
6817
|
this.initHeader();
|
@@ -6817,8 +6826,8 @@
|
|
6817
6826
|
$items.prop('checked', visible);
|
6818
6827
|
} else {
|
6819
6828
|
$items.get().reverse().forEach(function (item) {
|
6820
|
-
if ($items.filter(':checked').length >
|
6821
|
-
$(item).prop('checked', visible);
|
6829
|
+
if ($items.filter(':checked').length > _this23.options.minimumCountColumns) {
|
6830
|
+
$__default['default'](item).prop('checked', visible);
|
6822
6831
|
}
|
6823
6832
|
});
|
6824
6833
|
}
|
@@ -6838,11 +6847,7 @@
|
|
6838
6847
|
var i;
|
6839
6848
|
var j;
|
6840
6849
|
var $tr = this.$body.find('>tr');
|
6841
|
-
|
6842
|
-
if (Utils.hasDetailViewIcon(this.options)) {
|
6843
|
-
col += 1;
|
6844
|
-
}
|
6845
|
-
|
6850
|
+
col += Utils.getDetailViewIndexOffset(this.options);
|
6846
6851
|
var $td = $tr.eq(row).find('>td').eq(col);
|
6847
6852
|
|
6848
6853
|
if (row < 0 || col < 0 || row >= this.data.length) {
|
@@ -6874,6 +6879,7 @@
|
|
6874
6879
|
this.$selectAll.add(this.$selectAll_).prop('checked', checked);
|
6875
6880
|
this.$selectItem.filter(':enabled').prop('checked', checked);
|
6876
6881
|
this.updateRows();
|
6882
|
+
this.updateSelected();
|
6877
6883
|
var rowsAfter = this.getSelections();
|
6878
6884
|
|
6879
6885
|
if (checked) {
|
@@ -6889,7 +6895,7 @@
|
|
6889
6895
|
var $items = this.$selectItem.filter(':enabled');
|
6890
6896
|
var checked = $items.filter(':checked');
|
6891
6897
|
$items.each(function (i, el) {
|
6892
|
-
$(el).prop('checked', !$(el).prop('checked'));
|
6898
|
+
$__default['default'](el).prop('checked', !$__default['default'](el).prop('checked'));
|
6893
6899
|
});
|
6894
6900
|
this.updateRows();
|
6895
6901
|
this.updateSelected();
|
@@ -6914,28 +6920,18 @@
|
|
6914
6920
|
var row = this.data[index];
|
6915
6921
|
|
6916
6922
|
if ($el.is(':radio') || this.options.singleSelect || this.options.multipleSelectRow && !this.multipleSelectRowCtrlKey && !this.multipleSelectRowShiftKey) {
|
6917
|
-
var
|
6918
|
-
|
6919
|
-
var _iteratorError10 = undefined;
|
6923
|
+
var _iterator10 = _createForOfIteratorHelper(this.options.data),
|
6924
|
+
_step10;
|
6920
6925
|
|
6921
6926
|
try {
|
6922
|
-
for (
|
6927
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
|
6923
6928
|
var r = _step10.value;
|
6924
6929
|
r[this.header.stateField] = false;
|
6925
6930
|
}
|
6926
6931
|
} catch (err) {
|
6927
|
-
|
6928
|
-
_iteratorError10 = err;
|
6932
|
+
_iterator10.e(err);
|
6929
6933
|
} finally {
|
6930
|
-
|
6931
|
-
if (!_iteratorNormalCompletion10 && _iterator10.return != null) {
|
6932
|
-
_iterator10.return();
|
6933
|
-
}
|
6934
|
-
} finally {
|
6935
|
-
if (_didIteratorError10) {
|
6936
|
-
throw _iteratorError10;
|
6937
|
-
}
|
6938
|
-
}
|
6934
|
+
_iterator10.f();
|
6939
6935
|
}
|
6940
6936
|
|
6941
6937
|
this.$selectItem.filter(':checked').not($el).prop('checked', false);
|
@@ -6945,9 +6941,12 @@
|
|
6945
6941
|
|
6946
6942
|
if (this.options.multipleSelectRow) {
|
6947
6943
|
if (this.multipleSelectRowShiftKey && this.multipleSelectRowLastSelectedIndex >= 0) {
|
6948
|
-
var
|
6944
|
+
var _ref8 = this.multipleSelectRowLastSelectedIndex < index ? [this.multipleSelectRowLastSelectedIndex, index] : [index, this.multipleSelectRowLastSelectedIndex],
|
6945
|
+
_ref9 = _slicedToArray(_ref8, 2),
|
6946
|
+
fromIndex = _ref9[0],
|
6947
|
+
toIndex = _ref9[1];
|
6949
6948
|
|
6950
|
-
for (var i =
|
6949
|
+
for (var i = fromIndex + 1; i < toIndex; i++) {
|
6951
6950
|
this.data[i][this.header.stateField] = true;
|
6952
6951
|
this.$selectItem.filter("[data-index=\"".concat(i, "\"]")).prop('checked', true);
|
6953
6952
|
}
|
@@ -6975,7 +6974,7 @@
|
|
6975
6974
|
}, {
|
6976
6975
|
key: "_toggleCheckBy",
|
6977
6976
|
value: function _toggleCheckBy(checked, obj) {
|
6978
|
-
var
|
6977
|
+
var _this24 = this;
|
6979
6978
|
|
6980
6979
|
if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
|
6981
6980
|
return;
|
@@ -6988,7 +6987,7 @@
|
|
6988
6987
|
}
|
6989
6988
|
|
6990
6989
|
if (obj.values.includes(row[obj.field])) {
|
6991
|
-
var $el =
|
6990
|
+
var $el = _this24.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i));
|
6992
6991
|
|
6993
6992
|
$el = checked ? $el.not(':checked') : $el.filter(':checked');
|
6994
6993
|
|
@@ -6997,10 +6996,10 @@
|
|
6997
6996
|
}
|
6998
6997
|
|
6999
6998
|
$el.prop('checked', checked);
|
7000
|
-
row[
|
6999
|
+
row[_this24.header.stateField] = checked;
|
7001
7000
|
rows.push(row);
|
7002
7001
|
|
7003
|
-
|
7002
|
+
_this24.trigger(checked ? 'check' : 'uncheck', row, $el);
|
7004
7003
|
}
|
7005
7004
|
});
|
7006
7005
|
this.updateSelected();
|
@@ -7027,7 +7026,7 @@
|
|
7027
7026
|
key: "destroy",
|
7028
7027
|
value: function destroy() {
|
7029
7028
|
this.$el.insertBefore(this.$container);
|
7030
|
-
$(this.options.toolbar).insertBefore(this.$el);
|
7029
|
+
$__default['default'](this.options.toolbar).insertBefore(this.$el);
|
7031
7030
|
this.$container.next().remove();
|
7032
7031
|
this.$container.remove();
|
7033
7032
|
this.$el.html(this.$el_.html()).css('margin-top', '0').attr('class', this.$el_.attr('class') || ''); // reset the class
|
@@ -7106,7 +7105,7 @@
|
|
7106
7105
|
}, {
|
7107
7106
|
key: "showLoading",
|
7108
7107
|
value: function showLoading() {
|
7109
|
-
this.$tableLoading.
|
7108
|
+
this.$tableLoading.toggleClass('open', true);
|
7110
7109
|
var fontSize = this.options.loadingFontSize;
|
7111
7110
|
|
7112
7111
|
if (this.options.loadingFontSize === 'auto') {
|
@@ -7121,7 +7120,7 @@
|
|
7121
7120
|
}, {
|
7122
7121
|
key: "hideLoading",
|
7123
7122
|
value: function hideLoading() {
|
7124
|
-
this.$tableLoading.
|
7123
|
+
this.$tableLoading.toggleClass('open', false);
|
7125
7124
|
}
|
7126
7125
|
}, {
|
7127
7126
|
key: "togglePagination",
|
@@ -7129,7 +7128,7 @@
|
|
7129
7128
|
this.options.pagination = !this.options.pagination;
|
7130
7129
|
var icon = this.options.showButtonIcons ? this.options.pagination ? this.options.icons.paginationSwitchDown : this.options.icons.paginationSwitchUp : '';
|
7131
7130
|
var text = this.options.showButtonText ? this.options.pagination ? this.options.formatPaginationSwitchUp() : this.options.formatPaginationSwitchDown() : '';
|
7132
|
-
this.$toolbar.find('button[name="paginationSwitch"]').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon)
|
7131
|
+
this.$toolbar.find('button[name="paginationSwitch"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
|
7133
7132
|
this.updatePagination();
|
7134
7133
|
}
|
7135
7134
|
}, {
|
@@ -7145,14 +7144,14 @@
|
|
7145
7144
|
this.initHeader();
|
7146
7145
|
var icon = this.options.showButtonIcons ? this.options.cardView ? this.options.icons.toggleOn : this.options.icons.toggleOff : '';
|
7147
7146
|
var text = this.options.showButtonText ? this.options.cardView ? this.options.formatToggleOff() : this.options.formatToggleOn() : '';
|
7148
|
-
this.$toolbar.find('button[name="toggle"]').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon)
|
7147
|
+
this.$toolbar.find('button[name="toggle"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
|
7149
7148
|
this.initBody();
|
7150
7149
|
this.trigger('toggle', this.options.cardView);
|
7151
7150
|
}
|
7152
7151
|
}, {
|
7153
7152
|
key: "resetSearch",
|
7154
7153
|
value: function resetSearch(text) {
|
7155
|
-
var $search =
|
7154
|
+
var $search = Utils.getSearchInput(this);
|
7156
7155
|
$search.val(text || '');
|
7157
7156
|
this.onSearch({
|
7158
7157
|
currentTarget: $search
|
@@ -7161,7 +7160,7 @@
|
|
7161
7160
|
}, {
|
7162
7161
|
key: "filterBy",
|
7163
7162
|
value: function filterBy(columns, options) {
|
7164
|
-
this.filterOptions = Utils.isEmptyObject(options) ? this.options.filterOptions :
|
7163
|
+
this.filterOptions = Utils.isEmptyObject(options) ? this.options.filterOptions : $__default['default'].extend(this.options.filterOptions, options);
|
7165
7164
|
this.filterColumns = Utils.isEmptyObject(columns) ? {} : columns;
|
7166
7165
|
this.options.pageNumber = 1;
|
7167
7166
|
this.initSearch();
|
@@ -7170,10 +7169,6 @@
|
|
7170
7169
|
}, {
|
7171
7170
|
key: "scrollTo",
|
7172
7171
|
value: function scrollTo(params) {
|
7173
|
-
if (typeof params === 'undefined') {
|
7174
|
-
return this.$tableBody.scrollTop();
|
7175
|
-
}
|
7176
|
-
|
7177
7172
|
var options = {
|
7178
7173
|
unit: 'px',
|
7179
7174
|
value: 0
|
@@ -7192,7 +7187,7 @@
|
|
7192
7187
|
if (options.unit === 'rows') {
|
7193
7188
|
scrollTo = 0;
|
7194
7189
|
this.$body.find("> tr:lt(".concat(options.value, ")")).each(function (i, el) {
|
7195
|
-
scrollTo += $(el).outerHeight(true);
|
7190
|
+
scrollTo += $__default['default'](el).outerHeight(true);
|
7196
7191
|
});
|
7197
7192
|
}
|
7198
7193
|
|
@@ -7201,7 +7196,7 @@
|
|
7201
7196
|
}, {
|
7202
7197
|
key: "getScrollPosition",
|
7203
7198
|
value: function getScrollPosition() {
|
7204
|
-
return this.
|
7199
|
+
return this.$tableBody.scrollTop();
|
7205
7200
|
}
|
7206
7201
|
}, {
|
7207
7202
|
key: "selectPage",
|
@@ -7310,7 +7305,7 @@
|
|
7310
7305
|
var trs = this.$body.find('> tr[data-index][data-has-detail-view]');
|
7311
7306
|
|
7312
7307
|
for (var i = 0; i < trs.length; i++) {
|
7313
|
-
this.expandRow($(trs[i]).data('index'));
|
7308
|
+
this.expandRow($__default['default'](trs[i]).data('index'));
|
7314
7309
|
}
|
7315
7310
|
}
|
7316
7311
|
}, {
|
@@ -7319,7 +7314,7 @@
|
|
7319
7314
|
var trs = this.$body.find('> tr[data-index][data-has-detail-view]');
|
7320
7315
|
|
7321
7316
|
for (var i = 0; i < trs.length; i++) {
|
7322
|
-
this.collapseRow($(trs[i]).data('index'));
|
7317
|
+
this.collapseRow($__default['default'](trs[i]).data('index'));
|
7323
7318
|
}
|
7324
7319
|
}
|
7325
7320
|
}, {
|
@@ -7332,13 +7327,13 @@
|
|
7332
7327
|
this.columns[this.fieldsColumnsIndex[params.field]].title = this.options.escape ? Utils.escapeHTML(params.title) : params.title;
|
7333
7328
|
|
7334
7329
|
if (this.columns[this.fieldsColumnsIndex[params.field]].visible) {
|
7335
|
-
|
7336
|
-
|
7337
|
-
|
7338
|
-
$($(el).find('.th-inner')[0]).text(params.title);
|
7330
|
+
this.$header.find('th[data-field]').each(function (i, el) {
|
7331
|
+
if ($__default['default'](el).data('field') === params.field) {
|
7332
|
+
$__default['default']($__default['default'](el).find('.th-inner')[0]).text(params.title);
|
7339
7333
|
return false;
|
7340
7334
|
}
|
7341
7335
|
});
|
7336
|
+
this.resetView();
|
7342
7337
|
}
|
7343
7338
|
}
|
7344
7339
|
}, {
|
@@ -7373,17 +7368,17 @@
|
|
7373
7368
|
BootstrapTable.EVENTS = Constants.EVENTS; // BOOTSTRAP TABLE PLUGIN DEFINITION
|
7374
7369
|
// =======================
|
7375
7370
|
|
7376
|
-
|
7371
|
+
$__default['default'].BootstrapTable = BootstrapTable;
|
7377
7372
|
|
7378
|
-
|
7373
|
+
$__default['default'].fn.bootstrapTable = function (option) {
|
7379
7374
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key5 = 1; _key5 < _len2; _key5++) {
|
7380
7375
|
args[_key5 - 1] = arguments[_key5];
|
7381
7376
|
}
|
7382
7377
|
|
7383
7378
|
var value;
|
7384
7379
|
this.each(function (i, el) {
|
7385
|
-
var data = $(el).data('bootstrap.table');
|
7386
|
-
var options =
|
7380
|
+
var data = $__default['default'](el).data('bootstrap.table');
|
7381
|
+
var options = $__default['default'].extend({}, BootstrapTable.DEFAULTS, $__default['default'](el).data(), _typeof(option) === 'object' && option);
|
7387
7382
|
|
7388
7383
|
if (typeof option === 'string') {
|
7389
7384
|
var _data2;
|
@@ -7399,30 +7394,32 @@
|
|
7399
7394
|
value = (_data2 = data)[option].apply(_data2, args);
|
7400
7395
|
|
7401
7396
|
if (option === 'destroy') {
|
7402
|
-
$(el).removeData('bootstrap.table');
|
7397
|
+
$__default['default'](el).removeData('bootstrap.table');
|
7403
7398
|
}
|
7404
7399
|
}
|
7405
7400
|
|
7406
7401
|
if (!data) {
|
7407
|
-
|
7402
|
+
data = new $__default['default'].BootstrapTable(el, options);
|
7403
|
+
$__default['default'](el).data('bootstrap.table', data);
|
7404
|
+
data.init();
|
7408
7405
|
}
|
7409
7406
|
});
|
7410
7407
|
return typeof value === 'undefined' ? this : value;
|
7411
7408
|
};
|
7412
7409
|
|
7413
|
-
|
7414
|
-
|
7415
|
-
|
7416
|
-
|
7417
|
-
|
7418
|
-
|
7419
|
-
|
7420
|
-
|
7421
|
-
|
7410
|
+
$__default['default'].fn.bootstrapTable.Constructor = BootstrapTable;
|
7411
|
+
$__default['default'].fn.bootstrapTable.theme = Constants.THEME;
|
7412
|
+
$__default['default'].fn.bootstrapTable.VERSION = Constants.VERSION;
|
7413
|
+
$__default['default'].fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS;
|
7414
|
+
$__default['default'].fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS;
|
7415
|
+
$__default['default'].fn.bootstrapTable.events = BootstrapTable.EVENTS;
|
7416
|
+
$__default['default'].fn.bootstrapTable.locales = BootstrapTable.LOCALES;
|
7417
|
+
$__default['default'].fn.bootstrapTable.methods = BootstrapTable.METHODS;
|
7418
|
+
$__default['default'].fn.bootstrapTable.utils = Utils; // BOOTSTRAP TABLE INIT
|
7422
7419
|
// =======================
|
7423
7420
|
|
7424
|
-
$(function () {
|
7425
|
-
$('[data-toggle="table"]').bootstrapTable();
|
7421
|
+
$__default['default'](function () {
|
7422
|
+
$__default['default']('[data-toggle="table"]').bootstrapTable();
|
7426
7423
|
});
|
7427
7424
|
|
7428
7425
|
return BootstrapTable;
|