bootstrap-table-materialize.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = global || self, factory(global.jQuery));
  5. }(this, function ($) { 'use strict';
  6. $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  7. var aFunction = function (it) {
  8. if (typeof it != 'function') {
  9. throw TypeError(String(it) + ' is not a function');
  10. } return it;
  11. };
  12. // optional / simple context binding
  13. var bindContext = function (fn, that, length) {
  14. aFunction(fn);
  15. if (that === undefined) return fn;
  16. switch (length) {
  17. case 0: return function () {
  18. return fn.call(that);
  19. };
  20. case 1: return function (a) {
  21. return fn.call(that, a);
  22. };
  23. case 2: return function (a, b) {
  24. return fn.call(that, a, b);
  25. };
  26. case 3: return function (a, b, c) {
  27. return fn.call(that, a, b, c);
  28. };
  29. }
  30. return function (/* ...args */) {
  31. return fn.apply(that, arguments);
  32. };
  33. };
  34. var fails = function (exec) {
  35. try {
  36. return !!exec();
  37. } catch (e) {
  38. return true;
  39. }
  40. };
  41. var toString = {}.toString;
  42. var classofRaw = function (it) {
  43. return toString.call(it).slice(8, -1);
  44. };
  45. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  46. var split = ''.split;
  47. var indexedObject = fails(function () {
  48. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  49. // eslint-disable-next-line no-prototype-builtins
  50. return !Object('z').propertyIsEnumerable(0);
  51. }) ? function (it) {
  52. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  53. } : Object;
  54. // `RequireObjectCoercible` abstract operation
  55. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  56. var requireObjectCoercible = function (it) {
  57. if (it == undefined) throw TypeError("Can't call method on " + it);
  58. return it;
  59. };
  60. // `ToObject` abstract operation
  61. // https://tc39.github.io/ecma262/#sec-toobject
  62. var toObject = function (argument) {
  63. return Object(requireObjectCoercible(argument));
  64. };
  65. var ceil = Math.ceil;
  66. var floor = Math.floor;
  67. // `ToInteger` abstract operation
  68. // https://tc39.github.io/ecma262/#sec-tointeger
  69. var toInteger = function (argument) {
  70. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  71. };
  72. var min = Math.min;
  73. // `ToLength` abstract operation
  74. // https://tc39.github.io/ecma262/#sec-tolength
  75. var toLength = function (argument) {
  76. return argument > 0 ? min(toInteger(argument), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  77. };
  78. var isObject = function (it) {
  79. return typeof it === 'object' ? it !== null : typeof it === 'function';
  80. };
  81. // `IsArray` abstract operation
  82. // https://tc39.github.io/ecma262/#sec-isarray
  83. var isArray = Array.isArray || function isArray(arg) {
  84. return classofRaw(arg) == 'Array';
  85. };
  86. function createCommonjsModule(fn, module) {
  87. return module = { exports: {} }, fn(module, module.exports), module.exports;
  88. }
  89. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  90. var global = typeof window == 'object' && window && window.Math == Math ? window
  91. : typeof self == 'object' && self && self.Math == Math ? self
  92. // eslint-disable-next-line no-new-func
  93. : Function('return this')();
  94. // Thank's IE8 for his funny defineProperty
  95. var descriptors = !fails(function () {
  96. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  97. });
  98. var document = global.document;
  99. // typeof document.createElement is 'object' in old IE
  100. var exist = isObject(document) && isObject(document.createElement);
  101. var documentCreateElement = function (it) {
  102. return exist ? document.createElement(it) : {};
  103. };
  104. // Thank's IE8 for his funny defineProperty
  105. var ie8DomDefine = !descriptors && !fails(function () {
  106. return Object.defineProperty(documentCreateElement('div'), 'a', {
  107. get: function () { return 7; }
  108. }).a != 7;
  109. });
  110. var anObject = function (it) {
  111. if (!isObject(it)) {
  112. throw TypeError(String(it) + ' is not an object');
  113. } return it;
  114. };
  115. // 7.1.1 ToPrimitive(input [, PreferredType])
  116. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  117. // and the second argument - flag - preferred type is a string
  118. var toPrimitive = function (it, S) {
  119. if (!isObject(it)) return it;
  120. var fn, val;
  121. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  122. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  123. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  124. throw TypeError("Can't convert object to primitive value");
  125. };
  126. var nativeDefineProperty = Object.defineProperty;
  127. var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  128. anObject(O);
  129. P = toPrimitive(P, true);
  130. anObject(Attributes);
  131. if (ie8DomDefine) try {
  132. return nativeDefineProperty(O, P, Attributes);
  133. } catch (e) { /* empty */ }
  134. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  135. if ('value' in Attributes) O[P] = Attributes.value;
  136. return O;
  137. };
  138. var objectDefineProperty = {
  139. f: f
  140. };
  141. var createPropertyDescriptor = function (bitmap, value) {
  142. return {
  143. enumerable: !(bitmap & 1),
  144. configurable: !(bitmap & 2),
  145. writable: !(bitmap & 4),
  146. value: value
  147. };
  148. };
  149. var hide = descriptors ? function (object, key, value) {
  150. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  151. } : function (object, key, value) {
  152. object[key] = value;
  153. return object;
  154. };
  155. var setGlobal = function (key, value) {
  156. try {
  157. hide(global, key, value);
  158. } catch (e) {
  159. global[key] = value;
  160. } return value;
  161. };
  162. var shared = createCommonjsModule(function (module) {
  163. var SHARED = '__core-js_shared__';
  164. var store = global[SHARED] || setGlobal(SHARED, {});
  165. (module.exports = function (key, value) {
  166. return store[key] || (store[key] = value !== undefined ? value : {});
  167. })('versions', []).push({
  168. version: '3.0.0',
  169. mode: 'global',
  170. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  171. });
  172. });
  173. var id = 0;
  174. var postfix = Math.random();
  175. var uid = function (key) {
  176. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));
  177. };
  178. // Chrome 38 Symbol has incorrect toString conversion
  179. var nativeSymbol = !fails(function () {
  180. });
  181. var store = shared('wks');
  182. var Symbol = global.Symbol;
  183. var wellKnownSymbol = function (name) {
  184. return store[name] || (store[name] = nativeSymbol && Symbol[name]
  185. || (nativeSymbol ? Symbol : uid)('Symbol.' + name));
  186. };
  187. var SPECIES = wellKnownSymbol('species');
  188. // `ArraySpeciesCreate` abstract operation
  189. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  190. var arraySpeciesCreate = function (originalArray, length) {
  191. var C;
  192. if (isArray(originalArray)) {
  193. C = originalArray.constructor;
  194. // cross-realm fallback
  195. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  196. else if (isObject(C)) {
  197. C = C[SPECIES];
  198. if (C === null) C = undefined;
  199. }
  200. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  201. };
  202. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  203. // 0 -> Array#forEach
  204. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  205. // 1 -> Array#map
  206. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  207. // 2 -> Array#filter
  208. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  209. // 3 -> Array#some
  210. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  211. // 4 -> Array#every
  212. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  213. // 5 -> Array#find
  214. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  215. // 6 -> Array#findIndex
  216. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  217. var arrayMethods = function (TYPE, specificCreate) {
  218. var IS_MAP = TYPE == 1;
  219. var IS_FILTER = TYPE == 2;
  220. var IS_SOME = TYPE == 3;
  221. var IS_EVERY = TYPE == 4;
  222. var IS_FIND_INDEX = TYPE == 6;
  223. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  224. var create = specificCreate || arraySpeciesCreate;
  225. return function ($this, callbackfn, that) {
  226. var O = toObject($this);
  227. var self = indexedObject(O);
  228. var boundFunction = bindContext(callbackfn, that, 3);
  229. var length = toLength(self.length);
  230. var index = 0;
  231. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  232. var value, result;
  233. for (;length > index; index++) if (NO_HOLES || index in self) {
  234. value = self[index];
  235. result = boundFunction(value, index, O);
  236. if (TYPE) {
  237. if (IS_MAP) target[index] = result; // map
  238. else if (result) switch (TYPE) {
  239. case 3: return true; // some
  240. case 5: return value; // find
  241. case 6: return index; // findIndex
  242. case 2: target.push(value); // filter
  243. } else if (IS_EVERY) return false; // every
  244. }
  245. }
  246. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  247. };
  248. };
  249. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  250. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  251. // Nashorn ~ JDK8 bug
  252. var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  253. var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  254. var descriptor = nativeGetOwnPropertyDescriptor(this, V);
  255. return !!descriptor && descriptor.enumerable;
  256. } : nativePropertyIsEnumerable;
  257. var objectPropertyIsEnumerable = {
  258. f: f$1
  259. };
  260. // toObject with fallback for non-array-like ES3 strings
  261. var toIndexedObject = function (it) {
  262. return indexedObject(requireObjectCoercible(it));
  263. };
  264. var hasOwnProperty = {}.hasOwnProperty;
  265. var has = function (it, key) {
  266. return hasOwnProperty.call(it, key);
  267. };
  268. var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  269. var f$2 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  270. O = toIndexedObject(O);
  271. P = toPrimitive(P, true);
  272. if (ie8DomDefine) try {
  273. return nativeGetOwnPropertyDescriptor$1(O, P);
  274. } catch (e) { /* empty */ }
  275. if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  276. };
  277. var objectGetOwnPropertyDescriptor = {
  278. f: f$2
  279. };
  280. var functionToString = shared('native-function-to-string', Function.toString);
  281. var WeakMap = global.WeakMap;
  282. var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
  283. var shared$1 = shared('keys');
  284. var sharedKey = function (key) {
  285. return shared$1[key] || (shared$1[key] = uid(key));
  286. };
  287. var hiddenKeys = {};
  288. var WeakMap$1 = global.WeakMap;
  289. var set, get, has$1;
  290. var enforce = function (it) {
  291. return has$1(it) ? get(it) : set(it, {});
  292. };
  293. var getterFor = function (TYPE) {
  294. return function (it) {
  295. var state;
  296. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  297. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  298. } return state;
  299. };
  300. };
  301. if (nativeWeakMap) {
  302. var store$1 = new WeakMap$1();
  303. var wmget = store$1.get;
  304. var wmhas = store$1.has;
  305. var wmset = store$1.set;
  306. set = function (it, metadata) {
  307. wmset.call(store$1, it, metadata);
  308. return metadata;
  309. };
  310. get = function (it) {
  311. return wmget.call(store$1, it) || {};
  312. };
  313. has$1 = function (it) {
  314. return wmhas.call(store$1, it);
  315. };
  316. } else {
  317. var STATE = sharedKey('state');
  318. hiddenKeys[STATE] = true;
  319. set = function (it, metadata) {
  320. hide(it, STATE, metadata);
  321. return metadata;
  322. };
  323. get = function (it) {
  324. return has(it, STATE) ? it[STATE] : {};
  325. };
  326. has$1 = function (it) {
  327. return has(it, STATE);
  328. };
  329. }
  330. var internalState = {
  331. set: set,
  332. get: get,
  333. has: has$1,
  334. enforce: enforce,
  335. getterFor: getterFor
  336. };
  337. var redefine = createCommonjsModule(function (module) {
  338. var getInternalState = internalState.get;
  339. var enforceInternalState = internalState.enforce;
  340. var TEMPLATE = String(functionToString).split('toString');
  341. shared('inspectSource', function (it) {
  342. return functionToString.call(it);
  343. });
  344. (module.exports = function (O, key, value, options) {
  345. var unsafe = options ? !!options.unsafe : false;
  346. var simple = options ? !!options.enumerable : false;
  347. var noTargetGet = options ? !!options.noTargetGet : false;
  348. if (typeof value == 'function') {
  349. if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
  350. enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  351. }
  352. if (O === global) {
  353. if (simple) O[key] = value;
  354. else setGlobal(key, value);
  355. return;
  356. } else if (!unsafe) {
  357. delete O[key];
  358. } else if (!noTargetGet && O[key]) {
  359. simple = true;
  360. }
  361. if (simple) O[key] = value;
  362. else hide(O, key, value);
  363. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  364. })(Function.prototype, 'toString', function toString() {
  365. return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
  366. });
  367. });
  368. var max = Math.max;
  369. var min$1 = Math.min;
  370. // Helper for a popular repeating case of the spec:
  371. // Let integer be ? ToInteger(index).
  372. // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
  373. var toAbsoluteIndex = function (index, length) {
  374. var integer = toInteger(index);
  375. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  376. };
  377. // `Array.prototype.{ indexOf, includes }` methods implementation
  378. // false -> Array#indexOf
  379. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  380. // true -> Array#includes
  381. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  382. var arrayIncludes = function (IS_INCLUDES) {
  383. return function ($this, el, fromIndex) {
  384. var O = toIndexedObject($this);
  385. var length = toLength(O.length);
  386. var index = toAbsoluteIndex(fromIndex, length);
  387. var value;
  388. // Array#includes uses SameValueZero equality algorithm
  389. // eslint-disable-next-line no-self-compare
  390. if (IS_INCLUDES && el != el) while (length > index) {
  391. value = O[index++];
  392. // eslint-disable-next-line no-self-compare
  393. if (value != value) return true;
  394. // Array#indexOf ignores holes, Array#includes - not
  395. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  396. if (O[index] === el) return IS_INCLUDES || index || 0;
  397. } return !IS_INCLUDES && -1;
  398. };
  399. };
  400. var arrayIndexOf = arrayIncludes(false);
  401. var objectKeysInternal = function (object, names) {
  402. var O = toIndexedObject(object);
  403. var i = 0;
  404. var result = [];
  405. var key;
  406. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  407. // Don't enum bug & hidden keys
  408. while (names.length > i) if (has(O, key = names[i++])) {
  409. ~arrayIndexOf(result, key) || result.push(key);
  410. }
  411. return result;
  412. };
  413. // IE8- don't enum bug keys
  414. var enumBugKeys = [
  415. 'constructor',
  416. 'hasOwnProperty',
  417. 'isPrototypeOf',
  418. 'propertyIsEnumerable',
  419. 'toLocaleString',
  420. 'toString',
  421. 'valueOf'
  422. ];
  423. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  424. var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
  425. var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  426. return objectKeysInternal(O, hiddenKeys$1);
  427. };
  428. var objectGetOwnPropertyNames = {
  429. f: f$3
  430. };
  431. var f$4 = Object.getOwnPropertySymbols;
  432. var objectGetOwnPropertySymbols = {
  433. f: f$4
  434. };
  435. var Reflect$1 = global.Reflect;
  436. // all object keys, includes non-enumerable and symbols
  437. var ownKeys = Reflect$1 && Reflect$1.ownKeys || function ownKeys(it) {
  438. var keys = objectGetOwnPropertyNames.f(anObject(it));
  439. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  440. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  441. };
  442. var copyConstructorProperties = function (target, source) {
  443. var keys = ownKeys(source);
  444. var defineProperty = objectDefineProperty.f;
  445. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  446. for (var i = 0; i < keys.length; i++) {
  447. var key = keys[i];
  448. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  449. }
  450. };
  451. var replacement = /#|\.prototype\./;
  452. var isForced = function (feature, detection) {
  453. var value = data[normalize(feature)];
  454. return value == POLYFILL ? true
  455. : value == NATIVE ? false
  456. : typeof detection == 'function' ? fails(detection)
  457. : !!detection;
  458. };
  459. var normalize = isForced.normalize = function (string) {
  460. return String(string).replace(replacement, '.').toLowerCase();
  461. };
  462. var data = isForced.data = {};
  463. var NATIVE = isForced.NATIVE = 'N';
  464. var POLYFILL = isForced.POLYFILL = 'P';
  465. var isForced_1 = isForced;
  466. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  467. /*
  468. options.target - name of the target object
  469. options.global - target is the global object
  470. options.stat - export as static methods of target
  471. options.proto - export as prototype methods of target
  472. options.real - real prototype method for the `pure` version
  473. options.forced - export even if the native feature is available
  474. options.bind - bind methods to the target, required for the `pure` version
  475. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  476. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  477. options.sham - add a flag to not completely full polyfills
  478. options.enumerable - export as enumerable property
  479. options.noTargetGet - prevent calling a getter on target
  480. */
  481. var _export = function (options, source) {
  482. var TARGET = options.target;
  483. var GLOBAL = options.global;
  484. var STATIC = options.stat;
  485. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  486. if (GLOBAL) {
  487. target = global;
  488. } else if (STATIC) {
  489. target = global[TARGET] || setGlobal(TARGET, {});
  490. } else {
  491. target = (global[TARGET] || {}).prototype;
  492. }
  493. if (target) for (key in source) {
  494. sourceProperty = source[key];
  495. if (options.noTargetGet) {
  496. descriptor = getOwnPropertyDescriptor(target, key);
  497. targetProperty = descriptor && descriptor.value;
  498. } else targetProperty = target[key];
  499. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  500. // contained in target
  501. if (!FORCED && targetProperty !== undefined) {
  502. if (typeof sourceProperty === typeof targetProperty) continue;
  503. copyConstructorProperties(sourceProperty, targetProperty);
  504. }
  505. // add a flag to not completely full polyfills
  506. if (options.sham || (targetProperty && targetProperty.sham)) {
  507. hide(sourceProperty, 'sham', true);
  508. }
  509. // extend global
  510. redefine(target, key, sourceProperty, options);
  511. }
  512. };
  513. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  514. var objectKeys = Object.keys || function keys(O) {
  515. return objectKeysInternal(O, enumBugKeys);
  516. };
  517. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  518. anObject(O);
  519. var keys = objectKeys(Properties);
  520. var length = keys.length;
  521. var i = 0;
  522. var key;
  523. while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]);
  524. return O;
  525. };
  526. var document$1 = global.document;
  527. var html = document$1 && document$1.documentElement;
  528. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  529. var IE_PROTO = sharedKey('IE_PROTO');
  530. var PROTOTYPE = 'prototype';
  531. var Empty = function () { /* empty */ };
  532. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  533. var createDict = function () {
  534. // Thrash, waste and sodomy: IE GC bug
  535. var iframe = documentCreateElement('iframe');
  536. var length = enumBugKeys.length;
  537. var lt = '<';
  538. var script = 'script';
  539. var gt = '>';
  540. var js = 'java' + script + ':';
  541. var iframeDocument;
  542. iframe.style.display = 'none';
  543. html.appendChild(iframe);
  544. iframe.src = String(js);
  545. iframeDocument = iframe.contentWindow.document;
  546. iframeDocument.open();
  547. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  548. iframeDocument.close();
  549. createDict = iframeDocument.F;
  550. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  551. return createDict();
  552. };
  553. var objectCreate = Object.create || function create(O, Properties) {
  554. var result;
  555. if (O !== null) {
  556. Empty[PROTOTYPE] = anObject(O);
  557. result = new Empty();
  558. Empty[PROTOTYPE] = null;
  559. // add "__proto__" for Object.getPrototypeOf polyfill
  560. result[IE_PROTO] = O;
  561. } else result = createDict();
  562. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  563. };
  564. hiddenKeys[IE_PROTO] = true;
  565. var UNSCOPABLES = wellKnownSymbol('unscopables');
  566. var ArrayPrototype = Array.prototype;
  567. // Array.prototype[@@unscopables]
  568. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  569. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  570. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  571. }
  572. // add a key to Array.prototype[@@unscopables]
  573. var addToUnscopables = function (key) {
  574. ArrayPrototype[UNSCOPABLES][key] = true;
  575. };
  576. var internalFind = arrayMethods(5);
  577. var FIND = 'find';
  578. var SKIPS_HOLES = true;
  579. // Shouldn't skip holes
  580. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  581. // `Array.prototype.find` method
  582. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  583. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  584. find: function find(callbackfn /* , that = undefined */) {
  585. return internalFind(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  586. }
  587. });
  588. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  589. addToUnscopables(FIND);
  590. function _classCallCheck(instance, Constructor) {
  591. if (!(instance instanceof Constructor)) {
  592. throw new TypeError("Cannot call a class as a function");
  593. }
  594. }
  595. function _defineProperties(target, props) {
  596. for (var i = 0; i < props.length; i++) {
  597. var descriptor = props[i];
  598. descriptor.enumerable = descriptor.enumerable || false;
  599. descriptor.configurable = true;
  600. if ("value" in descriptor) descriptor.writable = true;
  601. Object.defineProperty(target, descriptor.key, descriptor);
  602. }
  603. }
  604. function _createClass(Constructor, protoProps, staticProps) {
  605. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  606. if (staticProps) _defineProperties(Constructor, staticProps);
  607. return Constructor;
  608. }
  609. function _inherits(subClass, superClass) {
  610. if (typeof superClass !== "function" && superClass !== null) {
  611. throw new TypeError("Super expression must either be null or a function");
  612. }
  613. subClass.prototype = Object.create(superClass && superClass.prototype, {
  614. constructor: {
  615. value: subClass,
  616. writable: true,
  617. configurable: true
  618. }
  619. });
  620. if (superClass) _setPrototypeOf(subClass, superClass);
  621. }
  622. function _getPrototypeOf(o) {
  623. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  624. return o.__proto__ || Object.getPrototypeOf(o);
  625. };
  626. return _getPrototypeOf(o);
  627. }
  628. function _setPrototypeOf(o, p) {
  629. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  630. o.__proto__ = p;
  631. return o;
  632. };
  633. return _setPrototypeOf(o, p);
  634. }
  635. function _assertThisInitialized(self) {
  636. if (self === void 0) {
  637. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  638. }
  639. return self;
  640. }
  641. function _possibleConstructorReturn(self, call) {
  642. if (call && (typeof call === "object" || typeof call === "function")) {
  643. return call;
  644. }
  645. return _assertThisInitialized(self);
  646. }
  647. function _superPropBase(object, property) {
  648. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  649. object = _getPrototypeOf(object);
  650. if (object === null) break;
  651. }
  652. return object;
  653. }
  654. function _get(target, property, receiver) {
  655. if (typeof Reflect !== "undefined" && Reflect.get) {
  656. _get = Reflect.get;
  657. } else {
  658. _get = function _get(target, property, receiver) {
  659. var base = _superPropBase(target, property);
  660. if (!base) return;
  661. var desc = Object.getOwnPropertyDescriptor(base, property);
  662. if (desc.get) {
  663. return desc.get.call(receiver);
  664. }
  665. return desc.value;
  666. };
  667. }
  668. return _get(target, property, receiver || target);
  669. }
  670. /**
  671. * @author zhixin wen <wenzhixin2010@gmail.com>
  672. * https://github.com/wenzhixin/bootstrap-table/
  673. * theme: https://github.com/jgthms/bulma/
  674. */
  675. $.extend($.fn.bootstrapTable.defaults, {
  676. classes: 'table highlight',
  677. buttonsPrefix: '',
  678. buttonsClass: 'waves-effect waves-light btn',
  679. iconsPrefix: 'material-icons',
  680. icons: {
  681. paginationSwitchDown: 'grid_on',
  682. paginationSwitchUp: 'grid_off',
  683. refresh: 'refresh',
  684. toggleOff: 'tablet',
  685. toggleOn: 'tablet_android',
  686. columns: 'view_list',
  687. detailOpen: 'add',
  688. detailClose: 'remove',
  689. fullscreen: 'fullscreen',
  690. sort: 'sort'
  691. }
  692. });
  693. $.fn.bootstrapTable.theme = 'materialize';
  694. $.BootstrapTable =
  695. /*#__PURE__*/
  696. function (_$$BootstrapTable) {
  697. _inherits(_class, _$$BootstrapTable);
  698. function _class() {
  699. _classCallCheck(this, _class);
  700. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  701. }
  702. _createClass(_class, [{
  703. key: "initConstants",
  704. value: function initConstants() {
  705. _get(_getPrototypeOf(_class.prototype), "initConstants", this).call(this);
  706. this.constants.classes.buttonsGroup = 'button-group';
  707. this.constants.classes.buttonsDropdown = '';
  708. this.constants.classes.input = 'input-field';
  709. this.constants.classes.input = '';
  710. this.constants.classes.paginationDropdown = '';
  711. this.constants.classes.buttonActive = 'green';
  712. this.constants.html.toolbarDropdown = ['<ul id="toolbar-columns-id" class="dropdown-content">', '</ul>'];
  713. this.constants.html.toolbarDropdownItem = '<li><label>%s</label></li>';
  714. this.constants.html.toolbarDropdownSeperator = '<li class="divider" tabindex="-1"></li>';
  715. this.constants.html.pageDropdown = ['<ul id="pagination-list-id" class="dropdown-content">', '</ul>'];
  716. this.constants.html.pageDropdownItem = '<li><a class="%s" href="#">%s</a></li>';
  717. this.constants.html.dropdownCaret = '<i class="material-icons">arrow_drop_down</i>';
  718. this.constants.html.pagination = ['<ul class="pagination%s">', '</ul>'];
  719. this.constants.html.paginationItem = '<li class="waves-effect page-item%s" aria-label="%s"><a href="#">%s</a></li>';
  720. this.constants.html.icon = '<i class="%s">%s</i>';
  721. }
  722. }, {
  723. key: "initToolbar",
  724. value: function initToolbar() {
  725. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  726. this.handleToolbar();
  727. }
  728. }, {
  729. key: "handleToolbar",
  730. value: function handleToolbar() {
  731. if (this.$toolbar.find('.dropdown-toggle').length) {
  732. this.$toolbar.find('.dropdown-toggle').each(function (i, el) {
  733. $(el).attr('data-target', $(el).next().attr('id')).dropdown({
  734. alignment: 'right',
  735. constrainWidth: false,
  736. closeOnClick: false
  737. });
  738. });
  739. }
  740. }
  741. }, {
  742. key: "initPagination",
  743. value: function initPagination() {
  744. _get(_getPrototypeOf(_class.prototype), "initPagination", this).call(this);
  745. if (this.options.pagination && !this.options.onlyInfoPagination) {
  746. this.$pagination.find('.dropdown-toggle').attr('data-target', this.$pagination.find('.dropdown-content').attr('id')).dropdown();
  747. }
  748. }
  749. }]);
  750. return _class;
  751. }($.BootstrapTable);
  752. }));