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' ? factory(require('jquery')) :
|
3
3
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
4
|
-
(global = global || self, factory(global.jQuery));
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, 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;
|
@@ -554,11 +564,11 @@
|
|
554
564
|
// eslint-disable-next-line no-undef
|
555
565
|
&& !Symbol.sham
|
556
566
|
// eslint-disable-next-line no-undef
|
557
|
-
&& typeof Symbol
|
567
|
+
&& typeof Symbol.iterator == 'symbol';
|
558
568
|
|
559
569
|
var WellKnownSymbolsStore = shared('wks');
|
560
570
|
var Symbol$1 = global_1.Symbol;
|
561
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
571
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
562
572
|
|
563
573
|
var wellKnownSymbol = function (name) {
|
564
574
|
if (!has(WellKnownSymbolsStore, name)) {
|
@@ -584,7 +594,7 @@
|
|
584
594
|
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
585
595
|
};
|
586
596
|
|
587
|
-
var
|
597
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
588
598
|
|
589
599
|
var process = global_1.process;
|
590
600
|
var versions = process && process.versions;
|
@@ -594,15 +604,15 @@
|
|
594
604
|
if (v8) {
|
595
605
|
match = v8.split('.');
|
596
606
|
version = match[0] + match[1];
|
597
|
-
} else if (
|
598
|
-
match =
|
607
|
+
} else if (engineUserAgent) {
|
608
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
599
609
|
if (!match || match[1] >= 74) {
|
600
|
-
match =
|
610
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
601
611
|
if (match) version = match[1];
|
602
612
|
}
|
603
613
|
}
|
604
614
|
|
605
|
-
var
|
615
|
+
var engineV8Version = version && +version;
|
606
616
|
|
607
617
|
var SPECIES$1 = wellKnownSymbol('species');
|
608
618
|
|
@@ -610,7 +620,7 @@
|
|
610
620
|
// We can't use this feature detection in V8 since it causes
|
611
621
|
// deoptimization and serious performance degradation
|
612
622
|
// https://github.com/zloirock/core-js/issues/677
|
613
|
-
return
|
623
|
+
return engineV8Version >= 51 || !fails(function () {
|
614
624
|
var array = [];
|
615
625
|
var constructor = array.constructor = {};
|
616
626
|
constructor[SPECIES$1] = function () {
|
@@ -627,7 +637,7 @@
|
|
627
637
|
// We can't use this feature detection in V8 since it causes
|
628
638
|
// deoptimization and serious performance degradation
|
629
639
|
// https://github.com/zloirock/core-js/issues/679
|
630
|
-
var IS_CONCAT_SPREADABLE_SUPPORT =
|
640
|
+
var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
|
631
641
|
var array = [];
|
632
642
|
array[IS_CONCAT_SPREADABLE] = false;
|
633
643
|
return array.concat()[0] !== array;
|
@@ -675,7 +685,7 @@
|
|
675
685
|
};
|
676
686
|
|
677
687
|
// optional / simple context binding
|
678
|
-
var
|
688
|
+
var functionBindContext = function (fn, that, length) {
|
679
689
|
aFunction$1(fn);
|
680
690
|
if (that === undefined) return fn;
|
681
691
|
switch (length) {
|
@@ -699,22 +709,23 @@
|
|
699
709
|
|
700
710
|
var push = [].push;
|
701
711
|
|
702
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
712
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
703
713
|
var createMethod$1 = function (TYPE) {
|
704
714
|
var IS_MAP = TYPE == 1;
|
705
715
|
var IS_FILTER = TYPE == 2;
|
706
716
|
var IS_SOME = TYPE == 3;
|
707
717
|
var IS_EVERY = TYPE == 4;
|
708
718
|
var IS_FIND_INDEX = TYPE == 6;
|
719
|
+
var IS_FILTER_OUT = TYPE == 7;
|
709
720
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
710
721
|
return function ($this, callbackfn, that, specificCreate) {
|
711
722
|
var O = toObject($this);
|
712
723
|
var self = indexedObject(O);
|
713
|
-
var boundFunction =
|
724
|
+
var boundFunction = functionBindContext(callbackfn, that, 3);
|
714
725
|
var length = toLength(self.length);
|
715
726
|
var index = 0;
|
716
727
|
var create = specificCreate || arraySpeciesCreate;
|
717
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
728
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
718
729
|
var value, result;
|
719
730
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
720
731
|
value = self[index];
|
@@ -726,7 +737,10 @@
|
|
726
737
|
case 5: return value; // find
|
727
738
|
case 6: return index; // findIndex
|
728
739
|
case 2: push.call(target, value); // filter
|
729
|
-
} else
|
740
|
+
} else switch (TYPE) {
|
741
|
+
case 4: return false; // every
|
742
|
+
case 7: push.call(target, value); // filterOut
|
743
|
+
}
|
730
744
|
}
|
731
745
|
}
|
732
746
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
@@ -754,7 +768,10 @@
|
|
754
768
|
find: createMethod$1(5),
|
755
769
|
// `Array.prototype.findIndex` method
|
756
770
|
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
|
757
|
-
findIndex: createMethod$1(6)
|
771
|
+
findIndex: createMethod$1(6),
|
772
|
+
// `Array.prototype.filterOut` method
|
773
|
+
// https://github.com/tc39/proposal-array-filtering
|
774
|
+
filterOut: createMethod$1(7)
|
758
775
|
};
|
759
776
|
|
760
777
|
// `Object.keys` method
|
@@ -865,18 +882,45 @@
|
|
865
882
|
ArrayPrototype[UNSCOPABLES][key] = true;
|
866
883
|
};
|
867
884
|
|
885
|
+
var defineProperty = Object.defineProperty;
|
886
|
+
var cache = {};
|
887
|
+
|
888
|
+
var thrower = function (it) { throw it; };
|
889
|
+
|
890
|
+
var arrayMethodUsesToLength = function (METHOD_NAME, options) {
|
891
|
+
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
|
892
|
+
if (!options) options = {};
|
893
|
+
var method = [][METHOD_NAME];
|
894
|
+
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
|
895
|
+
var argument0 = has(options, 0) ? options[0] : thrower;
|
896
|
+
var argument1 = has(options, 1) ? options[1] : undefined;
|
897
|
+
|
898
|
+
return cache[METHOD_NAME] = !!method && !fails(function () {
|
899
|
+
if (ACCESSORS && !descriptors) return true;
|
900
|
+
var O = { length: -1 };
|
901
|
+
|
902
|
+
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
|
903
|
+
else O[1] = 1;
|
904
|
+
|
905
|
+
method.call(O, argument0, argument1);
|
906
|
+
});
|
907
|
+
};
|
908
|
+
|
868
909
|
var $find = arrayIteration.find;
|
869
910
|
|
870
911
|
|
912
|
+
|
871
913
|
var FIND = 'find';
|
872
914
|
var SKIPS_HOLES = true;
|
873
915
|
|
916
|
+
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND);
|
917
|
+
|
874
918
|
// Shouldn't skip holes
|
875
919
|
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
876
920
|
|
877
921
|
// `Array.prototype.find` method
|
878
922
|
// https://tc39.github.io/ecma262/#sec-array.prototype.find
|
879
|
-
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
923
|
+
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
|
880
924
|
find: function find(callbackfn /* , that = undefined */) {
|
881
925
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
882
926
|
}
|
@@ -885,9 +929,9 @@
|
|
885
929
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
886
930
|
addToUnscopables(FIND);
|
887
931
|
|
888
|
-
var
|
932
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
889
933
|
var method = [][METHOD_NAME];
|
890
|
-
return
|
934
|
+
return !!method && fails(function () {
|
891
935
|
// eslint-disable-next-line no-useless-call,no-throw-literal
|
892
936
|
method.call(null, argument || function () { throw 1; }, 1);
|
893
937
|
});
|
@@ -896,14 +940,16 @@
|
|
896
940
|
var $indexOf = arrayIncludes.indexOf;
|
897
941
|
|
898
942
|
|
943
|
+
|
899
944
|
var nativeIndexOf = [].indexOf;
|
900
945
|
|
901
946
|
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
902
|
-
var
|
947
|
+
var STRICT_METHOD = arrayMethodIsStrict('indexOf');
|
948
|
+
var USES_TO_LENGTH$1 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
903
949
|
|
904
950
|
// `Array.prototype.indexOf` method
|
905
951
|
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
906
|
-
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO ||
|
952
|
+
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH$1 }, {
|
907
953
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
908
954
|
return NEGATIVE_ZERO
|
909
955
|
// convert -0 to +0
|
@@ -912,38 +958,26 @@
|
|
912
958
|
}
|
913
959
|
});
|
914
960
|
|
915
|
-
var nativeJoin = [].join;
|
916
|
-
|
917
|
-
var ES3_STRINGS = indexedObject != Object;
|
918
|
-
var SLOPPY_METHOD$1 = sloppyArrayMethod('join', ',');
|
919
|
-
|
920
|
-
// `Array.prototype.join` method
|
921
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.join
|
922
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD$1 }, {
|
923
|
-
join: function join(separator) {
|
924
|
-
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
925
|
-
}
|
926
|
-
});
|
927
|
-
|
928
961
|
var $map = arrayIteration.map;
|
929
962
|
|
930
963
|
|
931
964
|
|
932
965
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
933
966
|
// FF49- issue
|
934
|
-
var USES_TO_LENGTH =
|
935
|
-
[].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
|
936
|
-
});
|
967
|
+
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('map');
|
937
968
|
|
938
969
|
// `Array.prototype.map` method
|
939
970
|
// https://tc39.github.io/ecma262/#sec-array.prototype.map
|
940
971
|
// with adding support of @@species
|
941
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
972
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$2 }, {
|
942
973
|
map: function map(callbackfn /* , thisArg */) {
|
943
974
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
944
975
|
}
|
945
976
|
});
|
946
977
|
|
978
|
+
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
|
979
|
+
var USES_TO_LENGTH$3 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
|
980
|
+
|
947
981
|
var SPECIES$2 = wellKnownSymbol('species');
|
948
982
|
var nativeSlice = [].slice;
|
949
983
|
var max$1 = Math.max;
|
@@ -951,7 +985,7 @@
|
|
951
985
|
// `Array.prototype.slice` method
|
952
986
|
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
|
953
987
|
// fallback for not array-like ES3 strings and DOM objects
|
954
|
-
_export({ target: 'Array', proto: true, forced: !
|
988
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, {
|
955
989
|
slice: function slice(start, end) {
|
956
990
|
var O = toIndexedObject(this);
|
957
991
|
var length = toLength(O.length);
|
@@ -991,9 +1025,9 @@
|
|
991
1025
|
test.sort(null);
|
992
1026
|
});
|
993
1027
|
// Old WebKit
|
994
|
-
var
|
1028
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('sort');
|
995
1029
|
|
996
|
-
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL ||
|
1030
|
+
var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1;
|
997
1031
|
|
998
1032
|
// `Array.prototype.sort` method
|
999
1033
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
@@ -1005,6 +1039,9 @@
|
|
1005
1039
|
}
|
1006
1040
|
});
|
1007
1041
|
|
1042
|
+
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('splice');
|
1043
|
+
var USES_TO_LENGTH$4 = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
|
1044
|
+
|
1008
1045
|
var max$2 = Math.max;
|
1009
1046
|
var min$2 = Math.min;
|
1010
1047
|
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
@@ -1013,7 +1050,7 @@
|
|
1013
1050
|
// `Array.prototype.splice` method
|
1014
1051
|
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
|
1015
1052
|
// with adding support of @@species
|
1016
|
-
_export({ target: 'Array', proto: true, forced: !
|
1053
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$4 }, {
|
1017
1054
|
splice: function splice(start, deleteCount /* , ...items */) {
|
1018
1055
|
var O = toObject(this);
|
1019
1056
|
var len = toLength(O.length);
|
@@ -1062,6 +1099,56 @@
|
|
1062
1099
|
}
|
1063
1100
|
});
|
1064
1101
|
|
1102
|
+
var nativeAssign = Object.assign;
|
1103
|
+
var defineProperty$1 = Object.defineProperty;
|
1104
|
+
|
1105
|
+
// `Object.assign` method
|
1106
|
+
// https://tc39.github.io/ecma262/#sec-object.assign
|
1107
|
+
var objectAssign = !nativeAssign || fails(function () {
|
1108
|
+
// should have correct order of operations (Edge bug)
|
1109
|
+
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
|
1110
|
+
enumerable: true,
|
1111
|
+
get: function () {
|
1112
|
+
defineProperty$1(this, 'b', {
|
1113
|
+
value: 3,
|
1114
|
+
enumerable: false
|
1115
|
+
});
|
1116
|
+
}
|
1117
|
+
}), { b: 2 })).b !== 1) return true;
|
1118
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
1119
|
+
var A = {};
|
1120
|
+
var B = {};
|
1121
|
+
// eslint-disable-next-line no-undef
|
1122
|
+
var symbol = Symbol();
|
1123
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
1124
|
+
A[symbol] = 7;
|
1125
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
1126
|
+
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
|
1127
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
1128
|
+
var T = toObject(target);
|
1129
|
+
var argumentsLength = arguments.length;
|
1130
|
+
var index = 1;
|
1131
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
1132
|
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1133
|
+
while (argumentsLength > index) {
|
1134
|
+
var S = indexedObject(arguments[index++]);
|
1135
|
+
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
|
1136
|
+
var length = keys.length;
|
1137
|
+
var j = 0;
|
1138
|
+
var key;
|
1139
|
+
while (length > j) {
|
1140
|
+
key = keys[j++];
|
1141
|
+
if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
|
1142
|
+
}
|
1143
|
+
} return T;
|
1144
|
+
} : nativeAssign;
|
1145
|
+
|
1146
|
+
// `Object.assign` method
|
1147
|
+
// https://tc39.github.io/ecma262/#sec-object.assign
|
1148
|
+
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
1149
|
+
assign: objectAssign
|
1150
|
+
});
|
1151
|
+
|
1065
1152
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1066
1153
|
var test$1 = {};
|
1067
1154
|
|
@@ -1137,21 +1224,21 @@
|
|
1137
1224
|
var trim = stringTrim.trim;
|
1138
1225
|
|
1139
1226
|
|
1140
|
-
var
|
1141
|
-
var FORCED$2 = 1 /
|
1227
|
+
var $parseFloat = global_1.parseFloat;
|
1228
|
+
var FORCED$2 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
|
1142
1229
|
|
1143
1230
|
// `parseFloat` method
|
1144
1231
|
// https://tc39.github.io/ecma262/#sec-parsefloat-string
|
1145
|
-
var
|
1232
|
+
var numberParseFloat = FORCED$2 ? function parseFloat(string) {
|
1146
1233
|
var trimmedString = trim(String(string));
|
1147
|
-
var result =
|
1234
|
+
var result = $parseFloat(trimmedString);
|
1148
1235
|
return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
|
1149
|
-
} :
|
1236
|
+
} : $parseFloat;
|
1150
1237
|
|
1151
1238
|
// `parseFloat` method
|
1152
1239
|
// https://tc39.github.io/ecma262/#sec-parsefloat-string
|
1153
|
-
_export({ global: true, forced: parseFloat !=
|
1154
|
-
parseFloat:
|
1240
|
+
_export({ global: true, forced: parseFloat != numberParseFloat }, {
|
1241
|
+
parseFloat: numberParseFloat
|
1155
1242
|
});
|
1156
1243
|
|
1157
1244
|
// `RegExp.prototype.flags` getter implementation
|
@@ -1168,119 +1255,6 @@
|
|
1168
1255
|
return result;
|
1169
1256
|
};
|
1170
1257
|
|
1171
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
1172
|
-
// so we use an intermediate function.
|
1173
|
-
function RE(s, f) {
|
1174
|
-
return RegExp(s, f);
|
1175
|
-
}
|
1176
|
-
|
1177
|
-
var UNSUPPORTED_Y = fails(function () {
|
1178
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1179
|
-
var re = RE('a', 'y');
|
1180
|
-
re.lastIndex = 2;
|
1181
|
-
return re.exec('abcd') != null;
|
1182
|
-
});
|
1183
|
-
|
1184
|
-
var BROKEN_CARET = fails(function () {
|
1185
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
1186
|
-
var re = RE('^r', 'gy');
|
1187
|
-
re.lastIndex = 2;
|
1188
|
-
return re.exec('str') != null;
|
1189
|
-
});
|
1190
|
-
|
1191
|
-
var regexpStickyHelpers = {
|
1192
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y,
|
1193
|
-
BROKEN_CARET: BROKEN_CARET
|
1194
|
-
};
|
1195
|
-
|
1196
|
-
var nativeExec = RegExp.prototype.exec;
|
1197
|
-
// This always refers to the native implementation, because the
|
1198
|
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
1199
|
-
// which loads this file before patching the method.
|
1200
|
-
var nativeReplace = String.prototype.replace;
|
1201
|
-
|
1202
|
-
var patchedExec = nativeExec;
|
1203
|
-
|
1204
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
1205
|
-
var re1 = /a/;
|
1206
|
-
var re2 = /b*/g;
|
1207
|
-
nativeExec.call(re1, 'a');
|
1208
|
-
nativeExec.call(re2, 'a');
|
1209
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
1210
|
-
})();
|
1211
|
-
|
1212
|
-
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
|
1213
|
-
|
1214
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
1215
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
1216
|
-
|
1217
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
1218
|
-
|
1219
|
-
if (PATCH) {
|
1220
|
-
patchedExec = function exec(str) {
|
1221
|
-
var re = this;
|
1222
|
-
var lastIndex, reCopy, match, i;
|
1223
|
-
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
1224
|
-
var flags = regexpFlags.call(re);
|
1225
|
-
var source = re.source;
|
1226
|
-
var charsAdded = 0;
|
1227
|
-
var strCopy = str;
|
1228
|
-
|
1229
|
-
if (sticky) {
|
1230
|
-
flags = flags.replace('y', '');
|
1231
|
-
if (flags.indexOf('g') === -1) {
|
1232
|
-
flags += 'g';
|
1233
|
-
}
|
1234
|
-
|
1235
|
-
strCopy = String(str).slice(re.lastIndex);
|
1236
|
-
// Support anchored sticky behavior.
|
1237
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
|
1238
|
-
source = '(?: ' + source + ')';
|
1239
|
-
strCopy = ' ' + strCopy;
|
1240
|
-
charsAdded++;
|
1241
|
-
}
|
1242
|
-
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
1243
|
-
// simulate the 'y' flag.
|
1244
|
-
reCopy = new RegExp('^(?:' + source + ')', flags);
|
1245
|
-
}
|
1246
|
-
|
1247
|
-
if (NPCG_INCLUDED) {
|
1248
|
-
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
1249
|
-
}
|
1250
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
1251
|
-
|
1252
|
-
match = nativeExec.call(sticky ? reCopy : re, strCopy);
|
1253
|
-
|
1254
|
-
if (sticky) {
|
1255
|
-
if (match) {
|
1256
|
-
match.input = match.input.slice(charsAdded);
|
1257
|
-
match[0] = match[0].slice(charsAdded);
|
1258
|
-
match.index = re.lastIndex;
|
1259
|
-
re.lastIndex += match[0].length;
|
1260
|
-
} else re.lastIndex = 0;
|
1261
|
-
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
1262
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
1263
|
-
}
|
1264
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
1265
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
1266
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
1267
|
-
nativeReplace.call(match[0], reCopy, function () {
|
1268
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
1269
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
1270
|
-
}
|
1271
|
-
});
|
1272
|
-
}
|
1273
|
-
|
1274
|
-
return match;
|
1275
|
-
};
|
1276
|
-
}
|
1277
|
-
|
1278
|
-
var regexpExec = patchedExec;
|
1279
|
-
|
1280
|
-
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
1281
|
-
exec: regexpExec
|
1282
|
-
});
|
1283
|
-
|
1284
1258
|
var TO_STRING = 'toString';
|
1285
1259
|
var RegExpPrototype = RegExp.prototype;
|
1286
1260
|
var nativeToString = RegExpPrototype[TO_STRING];
|
@@ -1301,302 +1275,9 @@
|
|
1301
1275
|
}, { unsafe: true });
|
1302
1276
|
}
|
1303
1277
|
|
1304
|
-
var SPECIES$3 = wellKnownSymbol('species');
|
1305
|
-
|
1306
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1307
|
-
// #replace needs built-in support for named groups.
|
1308
|
-
// #match works fine because it just return the exec results, even if it has
|
1309
|
-
// a "grops" property.
|
1310
|
-
var re = /./;
|
1311
|
-
re.exec = function () {
|
1312
|
-
var result = [];
|
1313
|
-
result.groups = { a: '7' };
|
1314
|
-
return result;
|
1315
|
-
};
|
1316
|
-
return ''.replace(re, '$<a>') !== '7';
|
1317
|
-
});
|
1318
|
-
|
1319
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1320
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1321
|
-
var REPLACE_KEEPS_$0 = (function () {
|
1322
|
-
return 'a'.replace(/./, '$0') === '$0';
|
1323
|
-
})();
|
1324
|
-
|
1325
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1326
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1327
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1328
|
-
var re = /(?:)/;
|
1329
|
-
var originalExec = re.exec;
|
1330
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
1331
|
-
var result = 'ab'.split(re);
|
1332
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1333
|
-
});
|
1334
|
-
|
1335
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
1336
|
-
var SYMBOL = wellKnownSymbol(KEY);
|
1337
|
-
|
1338
|
-
var DELEGATES_TO_SYMBOL = !fails(function () {
|
1339
|
-
// String methods call symbol-named RegEp methods
|
1340
|
-
var O = {};
|
1341
|
-
O[SYMBOL] = function () { return 7; };
|
1342
|
-
return ''[KEY](O) != 7;
|
1343
|
-
});
|
1344
|
-
|
1345
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
1346
|
-
// Symbol-named RegExp methods call .exec
|
1347
|
-
var execCalled = false;
|
1348
|
-
var re = /a/;
|
1349
|
-
|
1350
|
-
if (KEY === 'split') {
|
1351
|
-
// We can't use real regex here since it causes deoptimization
|
1352
|
-
// and serious performance degradation in V8
|
1353
|
-
// https://github.com/zloirock/core-js/issues/306
|
1354
|
-
re = {};
|
1355
|
-
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
1356
|
-
// a new one. We need to return the patched regex when creating the new one.
|
1357
|
-
re.constructor = {};
|
1358
|
-
re.constructor[SPECIES$3] = function () { return re; };
|
1359
|
-
re.flags = '';
|
1360
|
-
re[SYMBOL] = /./[SYMBOL];
|
1361
|
-
}
|
1362
|
-
|
1363
|
-
re.exec = function () { execCalled = true; return null; };
|
1364
|
-
|
1365
|
-
re[SYMBOL]('');
|
1366
|
-
return !execCalled;
|
1367
|
-
});
|
1368
|
-
|
1369
|
-
if (
|
1370
|
-
!DELEGATES_TO_SYMBOL ||
|
1371
|
-
!DELEGATES_TO_EXEC ||
|
1372
|
-
(KEY === 'replace' && !(REPLACE_SUPPORTS_NAMED_GROUPS && REPLACE_KEEPS_$0)) ||
|
1373
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1374
|
-
) {
|
1375
|
-
var nativeRegExpMethod = /./[SYMBOL];
|
1376
|
-
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
1377
|
-
if (regexp.exec === regexpExec) {
|
1378
|
-
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
1379
|
-
// The native String method already delegates to @@method (this
|
1380
|
-
// polyfilled function), leasing to infinite recursion.
|
1381
|
-
// We avoid it by directly calling the native @@method method.
|
1382
|
-
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
1383
|
-
}
|
1384
|
-
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
1385
|
-
}
|
1386
|
-
return { done: false };
|
1387
|
-
}, { REPLACE_KEEPS_$0: REPLACE_KEEPS_$0 });
|
1388
|
-
var stringMethod = methods[0];
|
1389
|
-
var regexMethod = methods[1];
|
1390
|
-
|
1391
|
-
redefine(String.prototype, KEY, stringMethod);
|
1392
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1393
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1394
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1395
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1396
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1397
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1398
|
-
: function (string) { return regexMethod.call(string, this); }
|
1399
|
-
);
|
1400
|
-
}
|
1401
|
-
|
1402
|
-
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1403
|
-
};
|
1404
|
-
|
1405
|
-
var MATCH = wellKnownSymbol('match');
|
1406
|
-
|
1407
|
-
// `IsRegExp` abstract operation
|
1408
|
-
// https://tc39.github.io/ecma262/#sec-isregexp
|
1409
|
-
var isRegexp = function (it) {
|
1410
|
-
var isRegExp;
|
1411
|
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1412
|
-
};
|
1413
|
-
|
1414
|
-
var SPECIES$4 = wellKnownSymbol('species');
|
1415
|
-
|
1416
|
-
// `SpeciesConstructor` abstract operation
|
1417
|
-
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
1418
|
-
var speciesConstructor = function (O, defaultConstructor) {
|
1419
|
-
var C = anObject(O).constructor;
|
1420
|
-
var S;
|
1421
|
-
return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S);
|
1422
|
-
};
|
1423
|
-
|
1424
|
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1425
|
-
var createMethod$3 = function (CONVERT_TO_STRING) {
|
1426
|
-
return function ($this, pos) {
|
1427
|
-
var S = String(requireObjectCoercible($this));
|
1428
|
-
var position = toInteger(pos);
|
1429
|
-
var size = S.length;
|
1430
|
-
var first, second;
|
1431
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1432
|
-
first = S.charCodeAt(position);
|
1433
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1434
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1435
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1436
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1437
|
-
};
|
1438
|
-
};
|
1439
|
-
|
1440
|
-
var stringMultibyte = {
|
1441
|
-
// `String.prototype.codePointAt` method
|
1442
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1443
|
-
codeAt: createMethod$3(false),
|
1444
|
-
// `String.prototype.at` method
|
1445
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
1446
|
-
charAt: createMethod$3(true)
|
1447
|
-
};
|
1448
|
-
|
1449
|
-
var charAt = stringMultibyte.charAt;
|
1450
|
-
|
1451
|
-
// `AdvanceStringIndex` abstract operation
|
1452
|
-
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
1453
|
-
var advanceStringIndex = function (S, index, unicode) {
|
1454
|
-
return index + (unicode ? charAt(S, index).length : 1);
|
1455
|
-
};
|
1456
|
-
|
1457
|
-
// `RegExpExec` abstract operation
|
1458
|
-
// https://tc39.github.io/ecma262/#sec-regexpexec
|
1459
|
-
var regexpExecAbstract = function (R, S) {
|
1460
|
-
var exec = R.exec;
|
1461
|
-
if (typeof exec === 'function') {
|
1462
|
-
var result = exec.call(R, S);
|
1463
|
-
if (typeof result !== 'object') {
|
1464
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1465
|
-
}
|
1466
|
-
return result;
|
1467
|
-
}
|
1468
|
-
|
1469
|
-
if (classofRaw(R) !== 'RegExp') {
|
1470
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1471
|
-
}
|
1472
|
-
|
1473
|
-
return regexpExec.call(R, S);
|
1474
|
-
};
|
1475
|
-
|
1476
|
-
var arrayPush = [].push;
|
1477
|
-
var min$3 = Math.min;
|
1478
|
-
var MAX_UINT32 = 0xFFFFFFFF;
|
1479
|
-
|
1480
|
-
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
1481
|
-
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
|
1482
|
-
|
1483
|
-
// @@split logic
|
1484
|
-
fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
|
1485
|
-
var internalSplit;
|
1486
|
-
if (
|
1487
|
-
'abbc'.split(/(b)*/)[1] == 'c' ||
|
1488
|
-
'test'.split(/(?:)/, -1).length != 4 ||
|
1489
|
-
'ab'.split(/(?:ab)*/).length != 2 ||
|
1490
|
-
'.'.split(/(.?)(.?)/).length != 4 ||
|
1491
|
-
'.'.split(/()()/).length > 1 ||
|
1492
|
-
''.split(/.?/).length
|
1493
|
-
) {
|
1494
|
-
// based on es5-shim implementation, need to rework it
|
1495
|
-
internalSplit = function (separator, limit) {
|
1496
|
-
var string = String(requireObjectCoercible(this));
|
1497
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1498
|
-
if (lim === 0) return [];
|
1499
|
-
if (separator === undefined) return [string];
|
1500
|
-
// If `separator` is not a regex, use native split
|
1501
|
-
if (!isRegexp(separator)) {
|
1502
|
-
return nativeSplit.call(string, separator, lim);
|
1503
|
-
}
|
1504
|
-
var output = [];
|
1505
|
-
var flags = (separator.ignoreCase ? 'i' : '') +
|
1506
|
-
(separator.multiline ? 'm' : '') +
|
1507
|
-
(separator.unicode ? 'u' : '') +
|
1508
|
-
(separator.sticky ? 'y' : '');
|
1509
|
-
var lastLastIndex = 0;
|
1510
|
-
// Make `global` and avoid `lastIndex` issues by working with a copy
|
1511
|
-
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
1512
|
-
var match, lastIndex, lastLength;
|
1513
|
-
while (match = regexpExec.call(separatorCopy, string)) {
|
1514
|
-
lastIndex = separatorCopy.lastIndex;
|
1515
|
-
if (lastIndex > lastLastIndex) {
|
1516
|
-
output.push(string.slice(lastLastIndex, match.index));
|
1517
|
-
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
1518
|
-
lastLength = match[0].length;
|
1519
|
-
lastLastIndex = lastIndex;
|
1520
|
-
if (output.length >= lim) break;
|
1521
|
-
}
|
1522
|
-
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
1523
|
-
}
|
1524
|
-
if (lastLastIndex === string.length) {
|
1525
|
-
if (lastLength || !separatorCopy.test('')) output.push('');
|
1526
|
-
} else output.push(string.slice(lastLastIndex));
|
1527
|
-
return output.length > lim ? output.slice(0, lim) : output;
|
1528
|
-
};
|
1529
|
-
// Chakra, V8
|
1530
|
-
} else if ('0'.split(undefined, 0).length) {
|
1531
|
-
internalSplit = function (separator, limit) {
|
1532
|
-
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
1533
|
-
};
|
1534
|
-
} else internalSplit = nativeSplit;
|
1535
|
-
|
1536
|
-
return [
|
1537
|
-
// `String.prototype.split` method
|
1538
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.split
|
1539
|
-
function split(separator, limit) {
|
1540
|
-
var O = requireObjectCoercible(this);
|
1541
|
-
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
1542
|
-
return splitter !== undefined
|
1543
|
-
? splitter.call(separator, O, limit)
|
1544
|
-
: internalSplit.call(String(O), separator, limit);
|
1545
|
-
},
|
1546
|
-
// `RegExp.prototype[@@split]` method
|
1547
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
|
1548
|
-
//
|
1549
|
-
// NOTE: This cannot be properly polyfilled in engines that don't support
|
1550
|
-
// the 'y' flag.
|
1551
|
-
function (regexp, limit) {
|
1552
|
-
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
|
1553
|
-
if (res.done) return res.value;
|
1554
|
-
|
1555
|
-
var rx = anObject(regexp);
|
1556
|
-
var S = String(this);
|
1557
|
-
var C = speciesConstructor(rx, RegExp);
|
1558
|
-
|
1559
|
-
var unicodeMatching = rx.unicode;
|
1560
|
-
var flags = (rx.ignoreCase ? 'i' : '') +
|
1561
|
-
(rx.multiline ? 'm' : '') +
|
1562
|
-
(rx.unicode ? 'u' : '') +
|
1563
|
-
(SUPPORTS_Y ? 'y' : 'g');
|
1564
|
-
|
1565
|
-
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
1566
|
-
// simulate the 'y' flag.
|
1567
|
-
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
1568
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1569
|
-
if (lim === 0) return [];
|
1570
|
-
if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
|
1571
|
-
var p = 0;
|
1572
|
-
var q = 0;
|
1573
|
-
var A = [];
|
1574
|
-
while (q < S.length) {
|
1575
|
-
splitter.lastIndex = SUPPORTS_Y ? q : 0;
|
1576
|
-
var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
|
1577
|
-
var e;
|
1578
|
-
if (
|
1579
|
-
z === null ||
|
1580
|
-
(e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
|
1581
|
-
) {
|
1582
|
-
q = advanceStringIndex(S, q, unicodeMatching);
|
1583
|
-
} else {
|
1584
|
-
A.push(S.slice(p, q));
|
1585
|
-
if (A.length === lim) return A;
|
1586
|
-
for (var i = 1; i <= z.length - 1; i++) {
|
1587
|
-
A.push(z[i]);
|
1588
|
-
if (A.length === lim) return A;
|
1589
|
-
}
|
1590
|
-
q = p = e;
|
1591
|
-
}
|
1592
|
-
}
|
1593
|
-
A.push(S.slice(p));
|
1594
|
-
return A;
|
1595
|
-
}
|
1596
|
-
];
|
1597
|
-
}, !SUPPORTS_Y);
|
1598
|
-
|
1599
1278
|
function _typeof(obj) {
|
1279
|
+
"@babel/helpers - typeof";
|
1280
|
+
|
1600
1281
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
1601
1282
|
_typeof = function (obj) {
|
1602
1283
|
return typeof obj;
|
@@ -1618,14 +1299,41 @@
|
|
1618
1299
|
*/
|
1619
1300
|
|
1620
1301
|
var isSingleSort = false;
|
1621
|
-
var Utils =
|
1622
|
-
|
1302
|
+
var Utils = $__default['default'].fn.bootstrapTable.utils;
|
1303
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, {
|
1304
|
+
plus: {
|
1305
|
+
bootstrap3: 'glyphicon-plus',
|
1306
|
+
bootstrap4: 'fa-plus',
|
1307
|
+
bootstrap5: 'fa-plus',
|
1308
|
+
semantic: 'fa-plus',
|
1309
|
+
materialize: 'plus',
|
1310
|
+
foundation: 'fa-plus',
|
1311
|
+
bulma: 'fa-plus',
|
1312
|
+
'bootstrap-table': 'icon-plus'
|
1313
|
+
}[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock',
|
1314
|
+
minus: {
|
1315
|
+
bootstrap3: 'glyphicon-minus',
|
1316
|
+
bootstrap4: 'fa-minus',
|
1317
|
+
bootstrap5: 'fa-minus',
|
1318
|
+
semantic: 'fa-minus',
|
1319
|
+
materialize: 'minus',
|
1320
|
+
foundation: 'fa-minus',
|
1321
|
+
bulma: 'fa-minus',
|
1322
|
+
'bootstrap-table': 'icon-minus'
|
1323
|
+
}[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock',
|
1324
|
+
sort: {
|
1325
|
+
bootstrap3: 'glyphicon-sort',
|
1326
|
+
bootstrap4: 'fa-sort',
|
1327
|
+
bootstrap5: 'fa-sort',
|
1328
|
+
semantic: 'fa-sort',
|
1329
|
+
materialize: 'sort',
|
1330
|
+
foundation: 'fa-sort',
|
1331
|
+
bulma: 'fa-sort',
|
1332
|
+
'bootstrap-table': 'icon-sort-amount-asc'
|
1333
|
+
}[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock'
|
1334
|
+
});
|
1335
|
+
var theme = {
|
1623
1336
|
bootstrap3: {
|
1624
|
-
icons: {
|
1625
|
-
plus: 'glyphicon-plus',
|
1626
|
-
minus: 'glyphicon-minus',
|
1627
|
-
sort: 'glyphicon-sort'
|
1628
|
-
},
|
1629
1337
|
html: {
|
1630
1338
|
multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
|
1631
1339
|
multipleSortButton: '<button class="multi-sort btn btn-default" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
|
@@ -1633,11 +1341,6 @@
|
|
1633
1341
|
}
|
1634
1342
|
},
|
1635
1343
|
bootstrap4: {
|
1636
|
-
icons: {
|
1637
|
-
'plus': 'fa-plus',
|
1638
|
-
'minus': 'fa-minus',
|
1639
|
-
'sort': 'fa-sort'
|
1640
|
-
},
|
1641
1344
|
html: {
|
1642
1345
|
multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
|
1643
1346
|
multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
|
@@ -1645,23 +1348,13 @@
|
|
1645
1348
|
}
|
1646
1349
|
},
|
1647
1350
|
bootstrap5: {
|
1648
|
-
icons: {
|
1649
|
-
'plus': 'fa-plus',
|
1650
|
-
'minus': 'fa-minus',
|
1651
|
-
'sort': 'fa-sort'
|
1652
|
-
},
|
1653
1351
|
html: {
|
1654
|
-
multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"
|
1655
|
-
multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
|
1352
|
+
multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
|
1353
|
+
multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-bs-toggle="modal" data-target="#%s" title="%s">%s</button>',
|
1656
1354
|
multipleSortSelect: '<select class="%s %s form-control">'
|
1657
1355
|
}
|
1658
1356
|
},
|
1659
1357
|
semantic: {
|
1660
|
-
icons: {
|
1661
|
-
'plus': 'fa-plus',
|
1662
|
-
'minus': 'fa-minus',
|
1663
|
-
'sort': 'fa-sort'
|
1664
|
-
},
|
1665
1358
|
html: {
|
1666
1359
|
multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
|
1667
1360
|
multipleSortButton: '<button class="multi-sort ui button" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
|
@@ -1669,11 +1362,6 @@
|
|
1669
1362
|
}
|
1670
1363
|
},
|
1671
1364
|
materialize: {
|
1672
|
-
icons: {
|
1673
|
-
'plus': 'plus',
|
1674
|
-
'minus': 'minus',
|
1675
|
-
'sort': 'sort'
|
1676
|
-
},
|
1677
1365
|
html: {
|
1678
1366
|
multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
|
1679
1367
|
multipleSortButton: '<a href="#%s" class="multi-sort waves-effect waves-light btn modal-trigger" type="button" data-toggle="modal" title="%s">%s</a>',
|
@@ -1681,11 +1369,6 @@
|
|
1681
1369
|
}
|
1682
1370
|
},
|
1683
1371
|
foundation: {
|
1684
|
-
icons: {
|
1685
|
-
'plus': 'fa-plus',
|
1686
|
-
'minus': 'fa-minus',
|
1687
|
-
'sort': 'fa-sort'
|
1688
|
-
},
|
1689
1372
|
html: {
|
1690
1373
|
multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
|
1691
1374
|
multipleSortButton: '<button class="button multi-sort" data-open="%s" title="%s">%s</button>',
|
@@ -1693,11 +1376,6 @@
|
|
1693
1376
|
}
|
1694
1377
|
},
|
1695
1378
|
bulma: {
|
1696
|
-
icons: {
|
1697
|
-
'plus': 'fa-plus',
|
1698
|
-
'minus': 'fa-minus',
|
1699
|
-
'sort': 'fa-sort'
|
1700
|
-
},
|
1701
1379
|
html: {
|
1702
1380
|
multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
|
1703
1381
|
multipleSortButton: '<button class="button multi-sort" data-target="%s" title="%s">%s</button>',
|
@@ -1705,20 +1383,13 @@
|
|
1705
1383
|
}
|
1706
1384
|
},
|
1707
1385
|
'bootstrap-table': {
|
1708
|
-
icons: {
|
1709
|
-
'plus': 'icon-plus',
|
1710
|
-
'minus': 'icon-minus',
|
1711
|
-
'sort': 'icon-sort-amount-asc'
|
1712
|
-
},
|
1713
1386
|
html: {
|
1714
|
-
multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button
|
1387
|
+
multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
|
1715
1388
|
multipleSortButton: '<button class="btn multi-sort" data-target="%s" title="%s">%s</button>',
|
1716
1389
|
multipleSortSelect: '<select class="%s %s browser-default">'
|
1717
1390
|
}
|
1718
1391
|
}
|
1719
|
-
}[
|
1720
|
-
$.extend($.fn.bootstrapTable.defaults.icons, bootstrap.icons);
|
1721
|
-
$.extend($.fn.bootstrapTable.defaults.html, bootstrap.html);
|
1392
|
+
}[$__default['default'].fn.bootstrapTable.theme];
|
1722
1393
|
|
1723
1394
|
var showSortModal = function showSortModal(that) {
|
1724
1395
|
var _selector = that.sortModalSelector;
|
@@ -1727,10 +1398,10 @@
|
|
1727
1398
|
|
1728
1399
|
var o = that.options;
|
1729
1400
|
|
1730
|
-
if (!$(_id).hasClass('modal')) {
|
1731
|
-
var sModal = Utils.sprintf(
|
1732
|
-
$('body').append($(sModal));
|
1733
|
-
that.$sortModal = $(_id);
|
1401
|
+
if (!$__default['default'](_id).hasClass('modal')) {
|
1402
|
+
var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
|
1403
|
+
$__default['default']('body').append($__default['default'](sModal));
|
1404
|
+
that.$sortModal = $__default['default'](_id);
|
1734
1405
|
var $rows = that.$sortModal.find('tbody > tr');
|
1735
1406
|
that.$sortModal.off('click', '#add').on('click', '#add', function () {
|
1736
1407
|
var total = that.$sortModal.find('.multi-sort-name:first option').length;
|
@@ -1757,8 +1428,8 @@
|
|
1757
1428
|
var $alert = that.$sortModal.find('div.alert');
|
1758
1429
|
var fields = [];
|
1759
1430
|
var results = [];
|
1760
|
-
var sortPriority =
|
1761
|
-
var $row = $(row);
|
1431
|
+
var sortPriority = $__default['default'].map($rows, function (row) {
|
1432
|
+
var $row = $__default['default'](row);
|
1762
1433
|
var name = $row.find('.multi-sort-name').val();
|
1763
1434
|
var order = $row.find('.multi-sort-order').val();
|
1764
1435
|
fields.push(name);
|
@@ -1778,14 +1449,14 @@
|
|
1778
1449
|
if (results.length > 0) {
|
1779
1450
|
if ($alert.length === 0) {
|
1780
1451
|
$alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
|
1781
|
-
$($alert).insertBefore(that.$sortModal.find('.bars'));
|
1452
|
+
$__default['default']($alert).insertBefore(that.$sortModal.find('.bars'));
|
1782
1453
|
}
|
1783
1454
|
} else {
|
1784
1455
|
if ($alert.length === 1) {
|
1785
|
-
$($alert).remove();
|
1456
|
+
$__default['default']($alert).remove();
|
1786
1457
|
}
|
1787
1458
|
|
1788
|
-
if (
|
1459
|
+
if ($__default['default'].inArray($__default['default'].fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
|
1789
1460
|
that.$sortModal.modal('hide');
|
1790
1461
|
}
|
1791
1462
|
|
@@ -1816,9 +1487,9 @@
|
|
1816
1487
|
}
|
1817
1488
|
};
|
1818
1489
|
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1490
|
+
$__default['default'].fn.bootstrapTable.methods.push('multipleSort');
|
1491
|
+
$__default['default'].fn.bootstrapTable.methods.push('multiSort');
|
1492
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
|
1822
1493
|
showMultiSort: false,
|
1823
1494
|
showMultiSortButton: true,
|
1824
1495
|
multiSortStrictSort: false,
|
@@ -1827,10 +1498,10 @@
|
|
1827
1498
|
return false;
|
1828
1499
|
}
|
1829
1500
|
});
|
1830
|
-
|
1501
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.Constructor.EVENTS, {
|
1831
1502
|
'multiple-sort.bs.table': 'onMultipleSort'
|
1832
1503
|
});
|
1833
|
-
|
1504
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.locales, {
|
1834
1505
|
formatMultipleSort: function formatMultipleSort() {
|
1835
1506
|
return 'Multiple Sort';
|
1836
1507
|
},
|
@@ -1871,8 +1542,8 @@
|
|
1871
1542
|
};
|
1872
1543
|
}
|
1873
1544
|
});
|
1874
|
-
|
1875
|
-
var BootstrapTable =
|
1545
|
+
$__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales);
|
1546
|
+
var BootstrapTable = $__default['default'].fn.bootstrapTable.Constructor;
|
1876
1547
|
var _initToolbar = BootstrapTable.prototype.initToolbar;
|
1877
1548
|
var _destroy = BootstrapTable.prototype.destroy;
|
1878
1549
|
|
@@ -1883,13 +1554,23 @@
|
|
1883
1554
|
var that = this;
|
1884
1555
|
var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
|
1885
1556
|
var sortModalId = "#".concat(sortModalSelector);
|
1886
|
-
|
1557
|
+
var $multiSortBtn = this.$toolbar.find('div.multi-sort');
|
1558
|
+
var o = this.options;
|
1559
|
+
this.$sortModal = $__default['default'](sortModalId);
|
1887
1560
|
this.sortModalSelector = sortModalSelector;
|
1888
1561
|
|
1889
1562
|
if (that.options.sortPriority !== null) {
|
1890
1563
|
that.onMultipleSort();
|
1891
1564
|
}
|
1892
1565
|
|
1566
|
+
if (this.options.showMultiSortButton) {
|
1567
|
+
this.buttons = Object.assign(this.buttons, {
|
1568
|
+
multipleSort: {
|
1569
|
+
html: Utils.sprintf(theme.html.multipleSortButton, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
|
1570
|
+
}
|
1571
|
+
});
|
1572
|
+
}
|
1573
|
+
|
1893
1574
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1894
1575
|
args[_key] = arguments[_key];
|
1895
1576
|
}
|
@@ -1906,42 +1587,35 @@
|
|
1906
1587
|
}
|
1907
1588
|
|
1908
1589
|
if (this.options.showMultiSort) {
|
1909
|
-
var $btnGroup = this.$toolbar.find('>.' + that.constants.classes.buttonsGroup.split(' ').join('.')).first();
|
1910
|
-
var $multiSortBtn = this.$toolbar.find('div.multi-sort');
|
1911
|
-
var o = that.options;
|
1912
|
-
|
1913
1590
|
if (!$multiSortBtn.length && this.options.showMultiSortButton) {
|
1914
|
-
|
1915
|
-
$btnGroup.append($multiSortBtn);
|
1916
|
-
|
1917
|
-
if ($.fn.bootstrapTable.theme === 'semantic') {
|
1591
|
+
if ($__default['default'].fn.bootstrapTable.theme === 'semantic') {
|
1918
1592
|
this.$toolbar.find('.multi-sort').on('click', function () {
|
1919
|
-
$(sortModalId).modal('show');
|
1593
|
+
$__default['default'](sortModalId).modal('show');
|
1920
1594
|
});
|
1921
|
-
} else if (
|
1595
|
+
} else if ($__default['default'].fn.bootstrapTable.theme === 'materialize') {
|
1922
1596
|
this.$toolbar.find('.multi-sort').on('click', function () {
|
1923
|
-
$(sortModalId).modal();
|
1597
|
+
$__default['default'](sortModalId).modal();
|
1924
1598
|
});
|
1925
|
-
} else if (
|
1599
|
+
} else if ($__default['default'].fn.bootstrapTable.theme === 'bootstrap-table') {
|
1926
1600
|
this.$toolbar.find('.multi-sort').on('click', function () {
|
1927
|
-
$(sortModalId).addClass('show');
|
1601
|
+
$__default['default'](sortModalId).addClass('show');
|
1928
1602
|
});
|
1929
|
-
} else if (
|
1603
|
+
} else if ($__default['default'].fn.bootstrapTable.theme === 'foundation') {
|
1930
1604
|
this.$toolbar.find('.multi-sort').on('click', function () {
|
1931
1605
|
if (!_this.foundationModal) {
|
1932
1606
|
// eslint-disable-next-line no-undef
|
1933
|
-
_this.foundationModal = new Foundation.Reveal($(sortModalId));
|
1607
|
+
_this.foundationModal = new Foundation.Reveal($__default['default'](sortModalId));
|
1934
1608
|
}
|
1935
1609
|
|
1936
1610
|
_this.foundationModal.open();
|
1937
1611
|
});
|
1938
|
-
} else if (
|
1612
|
+
} else if ($__default['default'].fn.bootstrapTable.theme === 'bulma') {
|
1939
1613
|
this.$toolbar.find('.multi-sort').on('click', function () {
|
1940
|
-
$('html').toggleClass('is-clipped');
|
1941
|
-
$(sortModalId).toggleClass('is-active');
|
1942
|
-
$('button[data-close]').one('click', function () {
|
1943
|
-
$('html').toggleClass('is-clipped');
|
1944
|
-
$(sortModalId).toggleClass('is-active');
|
1614
|
+
$__default['default']('html').toggleClass('is-clipped');
|
1615
|
+
$__default['default'](sortModalId).toggleClass('is-active');
|
1616
|
+
$__default['default']('button[data-close]').one('click', function () {
|
1617
|
+
$__default['default']('html').toggleClass('is-clipped');
|
1618
|
+
$__default['default'](sortModalId).toggleClass('is-active');
|
1945
1619
|
});
|
1946
1620
|
});
|
1947
1621
|
}
|
@@ -1987,6 +1661,7 @@
|
|
1987
1661
|
_destroy.apply(this, Array.prototype.slice.apply(args));
|
1988
1662
|
|
1989
1663
|
if (this.options.showMultiSort) {
|
1664
|
+
this.enableCustomSort = false;
|
1990
1665
|
this.$sortModal.remove();
|
1991
1666
|
}
|
1992
1667
|
};
|
@@ -2022,8 +1697,8 @@
|
|
2022
1697
|
var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
|
2023
1698
|
var aa = Utils.getItemField(a, fieldName);
|
2024
1699
|
var bb = Utils.getItemField(b, fieldName);
|
2025
|
-
var value1 =
|
2026
|
-
var value2 =
|
1700
|
+
var value1 = $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
|
1701
|
+
var value2 = $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
|
2027
1702
|
|
2028
1703
|
if (value1 !== undefined && value2 !== undefined) {
|
2029
1704
|
arr1.push(order * value1);
|
@@ -2034,7 +1709,7 @@
|
|
2034
1709
|
if (aa === undefined || aa === null) aa = '';
|
2035
1710
|
if (bb === undefined || bb === null) bb = '';
|
2036
1711
|
|
2037
|
-
if (
|
1712
|
+
if ($__default['default'].isNumeric(aa) && $__default['default'].isNumeric(bb)) {
|
2038
1713
|
aa = parseFloat(aa);
|
2039
1714
|
bb = parseFloat(bb);
|
2040
1715
|
} else {
|
@@ -2054,6 +1729,7 @@
|
|
2054
1729
|
return cmp(arr1, arr2);
|
2055
1730
|
};
|
2056
1731
|
|
1732
|
+
this.enableCustomSort = true;
|
2057
1733
|
this.data.sort(function (a, b) {
|
2058
1734
|
return arrayCmp(a, b);
|
2059
1735
|
});
|
@@ -2064,17 +1740,17 @@
|
|
2064
1740
|
|
2065
1741
|
BootstrapTable.prototype.addLevel = function (index, sortPriority) {
|
2066
1742
|
var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
|
2067
|
-
this.$sortModal.find('tbody').append($('<tr>').append($('<td>').text(text)).append($('<td>').append($(Utils.sprintf(
|
1743
|
+
this.$sortModal.find('tbody').append($__default['default']('<tr>').append($__default['default']('<td>').text(text)).append($__default['default']('<td>').append($__default['default'](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($__default['default']('<td>').append($__default['default'](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
|
2068
1744
|
var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
|
2069
1745
|
var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
|
2070
|
-
|
1746
|
+
$__default['default'].each(this.columns, function (i, column) {
|
2071
1747
|
if (column.sortable === false || column.visible === false) {
|
2072
1748
|
return true;
|
2073
1749
|
}
|
2074
1750
|
|
2075
1751
|
$multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
|
2076
1752
|
});
|
2077
|
-
|
1753
|
+
$__default['default'].each(this.options.formatSortOrders(), function (value, order) {
|
2078
1754
|
$multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
|
2079
1755
|
});
|
2080
1756
|
|
@@ -2090,8 +1766,8 @@
|
|
2090
1766
|
|
2091
1767
|
for (var i = 0; i < headers.length; i++) {
|
2092
1768
|
for (var c = 0; c < that.options.sortPriority.length; c++) {
|
2093
|
-
if ($(headers[i]).data('field') === that.options.sortPriority[c].sortName) {
|
2094
|
-
$(headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
|
1769
|
+
if ($__default['default'](headers[i]).data('field') === that.options.sortPriority[c].sortName) {
|
1770
|
+
$__default['default'](headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
|
2095
1771
|
}
|
2096
1772
|
}
|
2097
1773
|
}
|
@@ -2122,12 +1798,14 @@
|
|
2122
1798
|
var _this2 = this;
|
2123
1799
|
|
2124
1800
|
this.options.sortPriority = sortPriority;
|
2125
|
-
this.options.sortName =
|
1801
|
+
this.options.sortName = undefined;
|
2126
1802
|
|
2127
1803
|
if (this.options.sidePagination === 'server') {
|
1804
|
+
var queryParams = this.options.queryParams;
|
1805
|
+
|
2128
1806
|
this.options.queryParams = function (params) {
|
2129
1807
|
params.multiSort = _this2.options.sortPriority;
|
2130
|
-
return
|
1808
|
+
return $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
|
2131
1809
|
};
|
2132
1810
|
|
2133
1811
|
isSingleSort = false;
|