vendor/assets/javascripts/bootstrap-table/bootstrap-table.js in bootstrap-table-rails-1.20.0 vs vendor/assets/javascripts/bootstrap-table/bootstrap-table.js in bootstrap-table-rails-1.20.1
- old
+ new
@@ -185,11 +185,11 @@
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global_1 =
- // eslint-disable-next-line es/no-global-this -- safe
+ // eslint-disable-next-line es-x/no-global-this -- safe
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
@@ -204,15 +204,16 @@
}
};
// Detect IE8's incomplete defineProperty implementation
var descriptors = !fails(function () {
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
var functionBindNative = !fails(function () {
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
var test = (function () { /* empty */ }).bind();
// eslint-disable-next-line no-prototype-builtins -- safe
return typeof test != 'function' || test.hasOwnProperty('prototype');
});
@@ -221,11 +222,11 @@
var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
return call$2.apply(call$2, arguments);
};
var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
@@ -343,25 +344,25 @@
}
}
var engineV8Version = version;
- /* eslint-disable es/no-symbol -- required for testing */
+ /* eslint-disable es-x/no-symbol -- required for testing */
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && engineV8Version && engineV8Version < 41;
});
- /* eslint-disable es/no-symbol -- required for testing */
+ /* eslint-disable es-x/no-symbol -- required for testing */
var useSymbolAsUid = nativeSymbol
&& !Symbol.sham
&& typeof Symbol.iterator == 'symbol';
@@ -410,11 +411,11 @@
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
throw TypeError$c("Can't convert object to primitive value");
};
- // eslint-disable-next-line es/no-object-defineproperty -- safe
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
var defineProperty$5 = Object.defineProperty;
var setGlobal = function (key, value) {
try {
defineProperty$5(global_1, key, { value: value, configurable: true, writable: true });
@@ -430,14 +431,14 @@
var shared = createCommonjsModule(function (module) {
(module.exports = function (key, value) {
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
})('versions', []).push({
- version: '3.21.1',
+ version: '3.22.4',
mode: 'global',
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
- license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
source: 'https://github.com/zloirock/core-js'
});
});
var Object$3 = global_1.Object;
@@ -450,10 +451,11 @@
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
return hasOwnProperty(toObject(it), key);
};
var id = 0;
@@ -516,17 +518,17 @@
return EXISTS$1 ? document$1.createElement(it) : {};
};
// Thanks to IE8 for its funny defineProperty
var ie8DomDefine = !descriptors && !fails(function () {
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
return Object.defineProperty(documentCreateElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
@@ -543,11 +545,11 @@
};
// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
var v8PrototypeDefineBug = descriptors && fails(function () {
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
value: 42,
writable: false
}).prototype != 42;
});
@@ -560,13 +562,13 @@
if (isObject(argument)) return argument;
throw TypeError$a(String$3(argument) + ' is not an object');
};
var TypeError$9 = global_1.TypeError;
- // eslint-disable-next-line es/no-object-defineproperty -- safe
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE$1 = 'configurable';
var WRITABLE = 'writable';
@@ -608,10 +610,25 @@
} : function (object, key, value) {
object[key] = value;
return object;
};
+ var FunctionPrototype$1 = Function.prototype;
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
+ var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
+
+ var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
+ // additional protection from minified / mangled / dropped function names
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
+ var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
+
+ var functionName = {
+ EXISTS: EXISTS,
+ PROPER: PROPER,
+ CONFIGURABLE: CONFIGURABLE
+ };
+
var functionToString = functionUncurryThis(Function.toString);
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(sharedStore.inspectSource)) {
sharedStore.inspectSource = function (it) {
@@ -691,66 +708,69 @@
has: has,
enforce: enforce,
getterFor: getterFor
};
- var FunctionPrototype$1 = Function.prototype;
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
- var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
+ var makeBuiltIn_1 = createCommonjsModule(function (module) {
+ var defineProperty = objectDefineProperty.f;
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
- var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
- // additional protection from minified / mangled / dropped function names
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
- var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
- var functionName = {
- EXISTS: EXISTS,
- PROPER: PROPER,
- CONFIGURABLE: CONFIGURABLE
- };
- var redefine = createCommonjsModule(function (module) {
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
-
- var getInternalState = internalState.get;
var enforceInternalState = internalState.enforce;
+ var getInternalState = internalState.get;
+
+ var CONFIGURABLE_LENGTH = !fails(function () {
+ return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
+ });
+
var TEMPLATE = String(String).split('String');
- (module.exports = function (O, key, value, options) {
+ var makeBuiltIn = module.exports = function (value, name, options) {
+ if (String(name).slice(0, 7) === 'Symbol(') {
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
+ }
+ if (options && options.getter) name = 'get ' + name;
+ if (options && options.setter) name = 'set ' + name;
+ if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
+ defineProperty(value, 'name', { value: name, configurable: true });
+ }
+ if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
+ defineProperty(value, 'length', { value: options.arity });
+ }
+ var state = enforceInternalState(value);
+ if (!hasOwnProperty_1(state, 'source')) {
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
+ } return value;
+ };
+
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
+ // eslint-disable-next-line no-extend-native -- required
+ Function.prototype.toString = makeBuiltIn(function toString() {
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
+ }, 'toString');
+ });
+
+ var defineBuiltIn = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
var name = options && options.name !== undefined ? options.name : key;
- var state;
- if (isCallable(value)) {
- if (String(name).slice(0, 7) === 'Symbol(') {
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
- }
- if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
- createNonEnumerableProperty(value, 'name', name);
- }
- state = enforceInternalState(value);
- if (!state.source) {
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
- }
- }
+ if (isCallable(value)) makeBuiltIn_1(value, name, options);
if (O === global_1) {
if (simple) O[key] = value;
else setGlobal(key, value);
- return;
+ return O;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
- })(Function.prototype, 'toString', function toString() {
- return isCallable(this) && getInternalState(this).source || inspectSource(this);
- });
- });
+ return O;
+ };
var ceil = Math.ceil;
var floor$2 = Math.floor;
// `ToIntegerOrInfinity` abstract operation
@@ -846,20 +866,20 @@
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return objectKeysInternal(O, hiddenKeys);
};
var objectGetOwnPropertyNames = {
f: f$2
};
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
var f$1 = Object.getOwnPropertySymbols;
var objectGetOwnPropertySymbols = {
f: f$1
};
@@ -953,25 +973,24 @@
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
- // extend global
- redefine(target, key, sourceProperty, options);
+ defineBuiltIn(target, key, sourceProperty, options);
}
};
// `Object.keys` method
// https://tc39.es/ecma262/#sec-object.keys
- // eslint-disable-next-line es/no-object-keys -- safe
+ // eslint-disable-next-line es-x/no-object-keys -- safe
var objectKeys = Object.keys || function keys(O) {
return objectKeysInternal(O, enumBugKeys);
};
- // eslint-disable-next-line es/no-object-assign -- safe
+ // eslint-disable-next-line es-x/no-object-assign -- safe
var $assign = Object.assign;
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
var defineProperty$4 = Object.defineProperty;
var concat$1 = functionUncurryThis([].concat);
// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
@@ -987,11 +1006,11 @@
}
}), { b: 2 })).b !== 1) return true;
// should work with symbols and should have deterministic property order (V8 bug)
var A = {};
var B = {};
- // eslint-disable-next-line es/no-symbol -- safe
+ // eslint-disable-next-line es-x/no-symbol -- safe
var symbol = Symbol();
var alphabet = 'abcdefghijklmnopqrst';
A[symbol] = 7;
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
@@ -1014,12 +1033,12 @@
} return T;
} : $assign;
// `Object.assign` method
// https://tc39.es/ecma262/#sec-object.assign
- // eslint-disable-next-line es/no-object-assign -- required for testing
- _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
+ _export({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== objectAssign }, {
assign: objectAssign
});
var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
var test$2 = {};
@@ -1142,10 +1161,11 @@
// `RegExp.prototype.flags` getter implementation
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
var regexpFlags = function () {
var that = anObject(this);
var result = '';
+ if (that.hasIndices) result += 'd';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.dotAll) result += 's';
if (that.unicode) result += 'u';
@@ -1181,11 +1201,11 @@
UNSUPPORTED_Y: UNSUPPORTED_Y$3
};
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
- // eslint-disable-next-line es/no-object-defineproperties -- safe
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var props = toIndexedObject(Properties);
var keys = objectKeys(Properties);
var length = keys.length;
@@ -1270,10 +1290,11 @@
hiddenKeys$1[IE_PROTO$1] = true;
// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
+ // eslint-disable-next-line es-x/no-object-create -- safe
var objectCreate = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
@@ -1426,11 +1447,11 @@
var FunctionPrototype = Function.prototype;
var apply = FunctionPrototype.apply;
var call = FunctionPrototype.call;
- // eslint-disable-next-line es/no-reflect -- safe
+ // eslint-disable-next-line es-x/no-reflect -- safe
var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
return call.apply(apply, arguments);
});
// TODO: Remove from `core-js@4` since it's moved to entry points
@@ -1441,11 +1462,11 @@
var SPECIES$5 = wellKnownSymbol('species');
- var RegExpPrototype$2 = RegExp.prototype;
+ var RegExpPrototype$3 = RegExp.prototype;
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
var SYMBOL = wellKnownSymbol(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
@@ -1486,11 +1507,11 @@
) {
var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
var $exec = regexp.exec;
- if ($exec === regexpExec || $exec === RegExpPrototype$2.exec) {
+ if ($exec === regexpExec || $exec === RegExpPrototype$3.exec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
@@ -1498,15 +1519,15 @@
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
}
return { done: false };
});
- redefine(String.prototype, KEY, methods[0]);
- redefine(RegExpPrototype$2, SYMBOL, methods[1]);
+ defineBuiltIn(String.prototype, KEY, methods[0]);
+ defineBuiltIn(RegExpPrototype$3, SYMBOL, methods[1]);
}
- if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype$3[SYMBOL], 'sham', true);
};
var MATCH$2 = wellKnownSymbol('match');
// `IsRegExp` abstract operation
@@ -1853,24 +1874,30 @@
};
var $includes = arrayIncludes.includes;
+
+ // FF99+ bug
+ var BROKEN_ON_SPARSE = fails(function () {
+ return !Array(1).includes();
+ });
+
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
- _export({ target: 'Array', proto: true }, {
+ _export({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('includes');
// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
- // eslint-disable-next-line es/no-array-isarray -- safe
+ // eslint-disable-next-line es-x/no-array-isarray -- safe
var isArray = Array.isArray || function isArray(argument) {
return classofRaw(argument) == 'Array';
};
var SPECIES$3 = wellKnownSymbol('species');
@@ -1938,11 +1965,11 @@
var FORCED$3 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
// `Array.prototype.concat` method
// https://tc39.es/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
- _export({ target: 'Array', proto: true, forced: FORCED$3 }, {
+ _export({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
// eslint-disable-next-line no-unused-vars -- required for `.length`
concat: function concat(arg) {
var O = toObject(this);
var A = arraySpeciesCreate(O, 0);
var n = 0;
@@ -2067,11 +2094,11 @@
};
// `Object.prototype.toString` method
// https://tc39.es/ecma262/#sec-object.prototype.tostring
if (!toStringTagSupport) {
- redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
+ defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
}
var TypeError$4 = global_1.TypeError;
var notARegexp = function (it) {
@@ -2159,11 +2186,11 @@
// `Array.prototype.forEach` method implementation
// https://tc39.es/ecma262/#sec-array.prototype.foreach
var arrayForEach = !STRICT_METHOD$2 ? function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- // eslint-disable-next-line es/no-array-prototype-foreach -- safe
+ // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
} : [].forEach;
var handlePrototype$1 = function (CollectionPrototype) {
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
@@ -2204,11 +2231,11 @@
// https://tc39.es/ecma262/#sec-parsefloat-string
_export({ global: true, forced: parseFloat != numberParseFloat }, {
parseFloat: numberParseFloat
});
- /* eslint-disable es/no-array-prototype-indexof -- required for testing */
+ /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
var $IndexOf = arrayIncludes.indexOf;
@@ -2548,11 +2575,11 @@
}
});
// `SameValue` abstract operation
// https://tc39.es/ecma262/#sec-samevalue
- // eslint-disable-next-line es/no-object-is -- safe
+ // eslint-disable-next-line es-x/no-object-is -- safe
var sameValue = Object.is || function is(x, y) {
// eslint-disable-next-line no-self-compare -- NaN check
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
@@ -2657,17 +2684,17 @@
// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
setter(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
@@ -2692,10 +2719,28 @@
NewTargetPrototype !== Wrapper.prototype
) objectSetPrototypeOf($this, NewTargetPrototype);
return $this;
};
+ var RegExpPrototype$2 = RegExp.prototype;
+
+ var regexpGetFlags = function (R) {
+ var flags = R.flags;
+ return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwnProperty_1(R, 'flags') && objectIsPrototypeOf(RegExpPrototype$2, R)
+ ? functionCall(regexpFlags, R) : flags;
+ };
+
+ var defineProperty$3 = objectDefineProperty.f;
+
+ var proxyAccessor = function (Target, Source, key) {
+ key in Target || defineProperty$3(Target, key, {
+ configurable: true,
+ get: function () { return Source[key]; },
+ set: function (it) { Source[key] = it; }
+ });
+ };
+
var SPECIES$1 = wellKnownSymbol('species');
var setSpecies = function (CONSTRUCTOR_NAME) {
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
var defineProperty = objectDefineProperty.f;
@@ -2706,31 +2751,30 @@
get: function () { return this; }
});
}
};
- var defineProperty$3 = objectDefineProperty.f;
var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
+
var enforceInternalState = internalState.enforce;
var MATCH = wellKnownSymbol('match');
var NativeRegExp = global_1.RegExp;
var RegExpPrototype$1 = NativeRegExp.prototype;
var SyntaxError = global_1.SyntaxError;
- var getFlags$1 = functionUncurryThis(regexpFlags);
var exec = functionUncurryThis(RegExpPrototype$1.exec);
var charAt = functionUncurryThis(''.charAt);
var replace = functionUncurryThis(''.replace);
var stringIndexOf = functionUncurryThis(''.indexOf);
var stringSlice$1 = functionUncurryThis(''.slice);
@@ -2835,11 +2879,11 @@
return pattern;
}
if (patternIsRegExp || objectIsPrototypeOf(RegExpPrototype$1, pattern)) {
pattern = pattern.source;
- if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags : getFlags$1(rawPattern);
+ if (flagsAreUndefined) flags = regexpGetFlags(rawPattern);
}
pattern = pattern === undefined ? '' : toString_1(pattern);
flags = flags === undefined ? '' : toString_1(flags);
rawPattern = pattern;
@@ -2880,25 +2924,17 @@
} catch (error) { /* empty */ }
return result;
};
- var proxy = function (key) {
- key in RegExpWrapper || defineProperty$3(RegExpWrapper, key, {
- configurable: true,
- get: function () { return NativeRegExp[key]; },
- set: function (it) { NativeRegExp[key] = it; }
- });
- };
-
for (var keys$1 = getOwnPropertyNames$1(NativeRegExp), index = 0; keys$1.length > index;) {
- proxy(keys$1[index++]);
+ proxyAccessor(RegExpWrapper, NativeRegExp, keys$1[index++]);
}
RegExpPrototype$1.constructor = RegExpWrapper;
RegExpWrapper.prototype = RegExpPrototype$1;
- redefine(global_1, 'RegExp', RegExpWrapper);
+ defineBuiltIn(global_1, 'RegExp', RegExpWrapper);
}
// https://tc39.es/ecma262/#sec-get-regexp-@@species
setSpecies('RegExp');
@@ -2907,29 +2943,26 @@
-
var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var n$ToString = RegExpPrototype[TO_STRING];
- var getFlags = functionUncurryThis(regexpFlags);
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && n$ToString.name != TO_STRING;
// `RegExp.prototype.toString` method
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
- redefine(RegExp.prototype, TO_STRING, function toString() {
+ defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
var R = anObject(this);
- var p = toString_1(R.source);
- var rf = R.flags;
- var f = toString_1(rf === undefined && objectIsPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf);
- return '/' + p + '/' + f;
+ var pattern = toString_1(R.source);
+ var flags = toString_1(regexpGetFlags(R));
+ return '/' + pattern + '/' + flags;
}, { unsafe: true });
}
var arraySlice$1 = functionUncurryThis([].slice);
@@ -2973,11 +3006,11 @@
var iterators = {};
var correctPrototypeGetter = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
return Object.getPrototypeOf(new F()) !== F.prototype;
});
var IE_PROTO = sharedKey('IE_PROTO');
var Object$1 = global_1.Object;
@@ -2999,11 +3032,11 @@
// `%IteratorPrototype%` object
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
- /* eslint-disable es/no-array-prototype-keys -- safe */
+ /* eslint-disable es-x/no-array-prototype-keys -- safe */
if ([].keys) {
arrayIterator = [].keys();
// Safari 8 has buggy iterators w/o `next`
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
else {
@@ -3021,11 +3054,11 @@
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
// `%IteratorPrototype%[@@iterator]()` method
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
if (!isCallable(IteratorPrototype$2[ITERATOR$2])) {
- redefine(IteratorPrototype$2, ITERATOR$2, function () {
+ defineBuiltIn(IteratorPrototype$2, ITERATOR$2, function () {
return this;
});
}
var iteratorsCore = {
@@ -3102,11 +3135,11 @@
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
if (objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
if (objectSetPrototypeOf) {
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
- redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
}
}
// Set @@toStringTag to native iterators
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
}
@@ -3129,18 +3162,18 @@
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
entries: getIterationMethod(ENTRIES)
};
if (FORCED) for (KEY in methods) {
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
- redefine(IterablePrototype, KEY, methods[KEY]);
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
}
} else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
}
// define iterator
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
- redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
}
iterators[NAME] = defaultIterator;
return methods;
};
@@ -3370,11 +3403,11 @@
defineProperty(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
}
}
NumberWrapper.prototype = NumberPrototype;
NumberPrototype.constructor = NumberWrapper;
- redefine(global_1, NUMBER, NumberWrapper);
+ defineBuiltIn(global_1, NUMBER, NumberWrapper);
}
var un$Reverse = functionUncurryThis([].reverse);
var test = [1, 2];
@@ -3443,11 +3476,11 @@
- // eslint-disable-next-line es/no-string-prototype-startswith -- safe
+ // eslint-disable-next-line es-x/no-string-prototype-startswith -- safe
var un$StartsWith = functionUncurryThis(''.startsWith);
var stringSlice = functionUncurryThis(''.slice);
var min$1 = Math.min;
var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('startsWith');
@@ -3477,11 +3510,11 @@
- // eslint-disable-next-line es/no-string-prototype-endswith -- safe
+ // eslint-disable-next-line es-x/no-string-prototype-endswith -- safe
var un$EndsWith = functionUncurryThis(''.endsWith);
var slice = functionUncurryThis(''.slice);
var min = Math.min;
var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('endsWith');
@@ -3742,11 +3775,11 @@
return value;
}
return value.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
},
- updateFieldGroup: function updateFieldGroup(columns) {
+ updateFieldGroup: function updateFieldGroup(columns, fieldColumns) {
var _ref;
var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns));
var _iterator4 = _createForOfIteratorHelper(columns),
@@ -3754,16 +3787,16 @@
try {
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
var c = _step4.value;
- var _iterator5 = _createForOfIteratorHelper(c),
- _step5;
+ var _iterator6 = _createForOfIteratorHelper(c),
+ _step6;
try {
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
- var r = _step5.value;
+ for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
+ var r = _step6.value;
if (r.colspanGroup > 1) {
var colspan = 0;
var _loop = function _loop(i) {
@@ -3783,20 +3816,60 @@
r.colspan = colspan;
r.visible = colspan > 0;
}
}
} catch (err) {
- _iterator5.e(err);
+ _iterator6.e(err);
} finally {
- _iterator5.f();
+ _iterator6.f();
}
}
} catch (err) {
_iterator4.e(err);
} finally {
_iterator4.f();
}
+
+ if (columns.length < 2) {
+ return;
+ }
+
+ var _iterator5 = _createForOfIteratorHelper(fieldColumns),
+ _step5;
+
+ try {
+ var _loop2 = function _loop2() {
+ var column = _step5.value;
+ var sameColumns = allColumns.filter(function (col) {
+ return col.fieldIndex === column.fieldIndex;
+ });
+
+ if (sameColumns.length > 1) {
+ var _iterator7 = _createForOfIteratorHelper(sameColumns),
+ _step7;
+
+ try {
+ for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
+ var _c = _step7.value;
+ _c.visible = column.visible;
+ }
+ } catch (err) {
+ _iterator7.e(err);
+ } finally {
+ _iterator7.f();
+ }
+ }
+ };
+
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
+ _loop2();
+ }
+ } catch (err) {
+ _iterator5.e(err);
+ } finally {
+ _iterator5.f();
+ }
},
getScrollBarWidth: function getScrollBarWidth() {
if (this.cachedWidth === undefined) {
var $inner = $__default["default"]('<div/>').addClass('fixed-table-scroll-inner');
var $outer = $__default["default"]('<div/>').addClass('fixed-table-scroll-outer');
@@ -3824,22 +3897,22 @@
var names = name.split('.');
if (names.length > 1) {
func = window;
- var _iterator6 = _createForOfIteratorHelper(names),
- _step6;
+ var _iterator8 = _createForOfIteratorHelper(names),
+ _step8;
try {
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
- var f = _step6.value;
+ for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
+ var f = _step8.value;
func = func[f];
}
} catch (err) {
- _iterator6.e(err);
+ _iterator8.e(err);
} finally {
- _iterator6.f();
+ _iterator8.f();
}
} else {
func = window[name];
}
}
@@ -3936,45 +4009,45 @@
return escape ? this.escapeHTML(item[field]) : item[field];
}
var props = field.split('.');
- var _iterator7 = _createForOfIteratorHelper(props),
- _step7;
+ var _iterator9 = _createForOfIteratorHelper(props),
+ _step9;
try {
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
- var p = _step7.value;
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
+ var p = _step9.value;
value = value && value[p];
}
} catch (err) {
- _iterator7.e(err);
+ _iterator9.e(err);
} finally {
- _iterator7.f();
+ _iterator9.f();
}
return escape ? this.escapeHTML(value) : value;
},
isIEBrowser: function isIEBrowser() {
return navigator.userAgent.includes('MSIE ') || /Trident.*rv:11\./.test(navigator.userAgent);
},
findIndex: function findIndex(items, item) {
- var _iterator8 = _createForOfIteratorHelper(items),
- _step8;
+ var _iterator10 = _createForOfIteratorHelper(items),
+ _step10;
try {
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
- var it = _step8.value;
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
+ var it = _step10.value;
if (JSON.stringify(it) === JSON.stringify(item)) {
return items.indexOf(it);
}
}
} catch (err) {
- _iterator8.e(err);
+ _iterator10.e(err);
} finally {
- _iterator8.f();
+ _iterator10.f();
}
return -1;
},
trToData: function trToData(columns, $els) {
@@ -4082,29 +4155,29 @@
},
getDetailViewIndexOffset: function getDetailViewIndexOffset(options) {
return this.hasDetailViewIcon(options) && options.detailViewAlign !== 'right' ? 1 : 0;
},
checkAutoMergeCells: function checkAutoMergeCells(data) {
- var _iterator9 = _createForOfIteratorHelper(data),
- _step9;
+ var _iterator11 = _createForOfIteratorHelper(data),
+ _step11;
try {
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
- var row = _step9.value;
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
+ var row = _step11.value;
for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) {
var key = _Object$keys[_i4];
if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) {
return true;
}
}
}
} catch (err) {
- _iterator9.e(err);
+ _iterator11.e(err);
} finally {
- _iterator9.f();
+ _iterator11.f();
}
return false;
},
deepCopy: function deepCopy(arg) {
@@ -4131,11 +4204,11 @@
if (callNow) func.apply(context, args);
};
}
};
- var VERSION = '1.20.0';
+ var VERSION = '1.20.1';
var bootstrapVersion = Utils.getBootstrapVersion();
var CONSTANTS = {
3: {
classes: {
buttonsPrefix: 'btn',
@@ -4826,24 +4899,25 @@
this.constants.theme = $__default["default"].fn.bootstrapTable.theme;
this.constants.dataToggle = this.constants.html.dataToggle || 'data-toggle'; // init iconsPrefix and icons
var iconsPrefix = Utils.getIconsPrefix($__default["default"].fn.bootstrapTable.theme);
var icons = Utils.getIcons(iconsPrefix);
+
+ if (typeof opts.icons === 'string') {
+ opts.icons = Utils.calculateObjectValue(null, opts.icons);
+ }
+
opts.iconsPrefix = opts.iconsPrefix || $__default["default"].fn.bootstrapTable.defaults.iconsPrefix || iconsPrefix;
opts.icons = Object.assign(icons, $__default["default"].fn.bootstrapTable.defaults.icons, opts.icons); // init buttons class
var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : '';
this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim();
this.buttons = Utils.calculateObjectValue(this, opts.buttons, [], {});
if (_typeof(this.buttons) !== 'object') {
this.buttons = {};
}
-
- if (typeof opts.icons === 'string') {
- opts.icons = Utils.calculateObjectValue(null, opts.icons);
- }
}
}, {
key: "initLocale",
value: function initLocale() {
if (this.options.locale) {
@@ -5026,11 +5100,11 @@
sorters: [],
sortNames: [],
cellStyles: [],
searchables: []
};
- Utils.updateFieldGroup(this.options.columns);
+ Utils.updateFieldGroup(this.options.columns, this.columns);
this.options.columns.forEach(function (columns, i) {
var html = [];
html.push("<tr".concat(Utils.sprintf(' class="%s"', _this2._headerTrClasses[i]), " ").concat(Utils.sprintf(' style="%s"', _this2._headerTrStyles[i]), ">"));
var detailViewTemplate = '';
@@ -7208,10 +7282,10 @@
var _this17 = this;
var data = this.options.data;
if ((this.searchText || this.options.customSearch || this.options.sortName !== undefined || this.enableCustomSort || // Fix #4616: this.enableCustomSort is for extensions
- !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) {
+ !Utils.isEmptyObject(this.filterColumns) || typeof this.options.filterOptions.filterAlgorithm === 'function' || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) {
data = this.data;
}
if (params && params.useCurrentPage) {
data = data.slice(this.pageFrom - 1, this.pageTo);