bootstrap-table-copy-rows.js 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260
  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 = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. }(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. return Constructor;
  26. }
  27. function _inherits(subClass, superClass) {
  28. if (typeof superClass !== "function" && superClass !== null) {
  29. throw new TypeError("Super expression must either be null or a function");
  30. }
  31. subClass.prototype = Object.create(superClass && superClass.prototype, {
  32. constructor: {
  33. value: subClass,
  34. writable: true,
  35. configurable: true
  36. }
  37. });
  38. if (superClass) _setPrototypeOf(subClass, superClass);
  39. }
  40. function _getPrototypeOf(o) {
  41. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  42. return o.__proto__ || Object.getPrototypeOf(o);
  43. };
  44. return _getPrototypeOf(o);
  45. }
  46. function _setPrototypeOf(o, p) {
  47. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  48. o.__proto__ = p;
  49. return o;
  50. };
  51. return _setPrototypeOf(o, p);
  52. }
  53. function _isNativeReflectConstruct() {
  54. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  55. if (Reflect.construct.sham) return false;
  56. if (typeof Proxy === "function") return true;
  57. try {
  58. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  59. return true;
  60. } catch (e) {
  61. return false;
  62. }
  63. }
  64. function _assertThisInitialized(self) {
  65. if (self === void 0) {
  66. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  67. }
  68. return self;
  69. }
  70. function _possibleConstructorReturn(self, call) {
  71. if (call && (typeof call === "object" || typeof call === "function")) {
  72. return call;
  73. }
  74. return _assertThisInitialized(self);
  75. }
  76. function _createSuper(Derived) {
  77. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  78. return function _createSuperInternal() {
  79. var Super = _getPrototypeOf(Derived),
  80. result;
  81. if (hasNativeReflectConstruct) {
  82. var NewTarget = _getPrototypeOf(this).constructor;
  83. result = Reflect.construct(Super, arguments, NewTarget);
  84. } else {
  85. result = Super.apply(this, arguments);
  86. }
  87. return _possibleConstructorReturn(this, result);
  88. };
  89. }
  90. function _superPropBase(object, property) {
  91. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  92. object = _getPrototypeOf(object);
  93. if (object === null) break;
  94. }
  95. return object;
  96. }
  97. function _get(target, property, receiver) {
  98. if (typeof Reflect !== "undefined" && Reflect.get) {
  99. _get = Reflect.get;
  100. } else {
  101. _get = function _get(target, property, receiver) {
  102. var base = _superPropBase(target, property);
  103. if (!base) return;
  104. var desc = Object.getOwnPropertyDescriptor(base, property);
  105. if (desc.get) {
  106. return desc.get.call(receiver);
  107. }
  108. return desc.value;
  109. };
  110. }
  111. return _get(target, property, receiver || target);
  112. }
  113. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  114. function createCommonjsModule(fn, module) {
  115. return module = { exports: {} }, fn(module, module.exports), module.exports;
  116. }
  117. var check = function (it) {
  118. return it && it.Math == Math && it;
  119. };
  120. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  121. var global_1 =
  122. // eslint-disable-next-line es/no-global-this -- safe
  123. check(typeof globalThis == 'object' && globalThis) ||
  124. check(typeof window == 'object' && window) ||
  125. // eslint-disable-next-line no-restricted-globals -- safe
  126. check(typeof self == 'object' && self) ||
  127. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  128. // eslint-disable-next-line no-new-func -- fallback
  129. (function () { return this; })() || Function('return this')();
  130. var fails = function (exec) {
  131. try {
  132. return !!exec();
  133. } catch (error) {
  134. return true;
  135. }
  136. };
  137. // Detect IE8's incomplete defineProperty implementation
  138. var descriptors = !fails(function () {
  139. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  140. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  141. });
  142. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  143. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  144. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  145. // Nashorn ~ JDK8 bug
  146. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  147. // `Object.prototype.propertyIsEnumerable` method implementation
  148. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  149. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  150. var descriptor = getOwnPropertyDescriptor$1(this, V);
  151. return !!descriptor && descriptor.enumerable;
  152. } : $propertyIsEnumerable;
  153. var objectPropertyIsEnumerable = {
  154. f: f$4
  155. };
  156. var createPropertyDescriptor = function (bitmap, value) {
  157. return {
  158. enumerable: !(bitmap & 1),
  159. configurable: !(bitmap & 2),
  160. writable: !(bitmap & 4),
  161. value: value
  162. };
  163. };
  164. var toString = {}.toString;
  165. var classofRaw = function (it) {
  166. return toString.call(it).slice(8, -1);
  167. };
  168. var split = ''.split;
  169. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  170. var indexedObject = fails(function () {
  171. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  172. // eslint-disable-next-line no-prototype-builtins -- safe
  173. return !Object('z').propertyIsEnumerable(0);
  174. }) ? function (it) {
  175. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  176. } : Object;
  177. // `RequireObjectCoercible` abstract operation
  178. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  179. var requireObjectCoercible = function (it) {
  180. if (it == undefined) throw TypeError("Can't call method on " + it);
  181. return it;
  182. };
  183. // toObject with fallback for non-array-like ES3 strings
  184. var toIndexedObject = function (it) {
  185. return indexedObject(requireObjectCoercible(it));
  186. };
  187. var isObject = function (it) {
  188. return typeof it === 'object' ? it !== null : typeof it === 'function';
  189. };
  190. // `ToPrimitive` abstract operation
  191. // https://tc39.es/ecma262/#sec-toprimitive
  192. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  193. // and the second argument - flag - preferred type is a string
  194. var toPrimitive = function (input, PREFERRED_STRING) {
  195. if (!isObject(input)) return input;
  196. var fn, val;
  197. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  198. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  199. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  200. throw TypeError("Can't convert object to primitive value");
  201. };
  202. var hasOwnProperty = {}.hasOwnProperty;
  203. var has$1 = function (it, key) {
  204. return hasOwnProperty.call(it, key);
  205. };
  206. var document$1 = global_1.document;
  207. // typeof document.createElement is 'object' in old IE
  208. var EXISTS = isObject(document$1) && isObject(document$1.createElement);
  209. var documentCreateElement = function (it) {
  210. return EXISTS ? document$1.createElement(it) : {};
  211. };
  212. // Thank's IE8 for his funny defineProperty
  213. var ie8DomDefine = !descriptors && !fails(function () {
  214. // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
  215. return Object.defineProperty(documentCreateElement('div'), 'a', {
  216. get: function () { return 7; }
  217. }).a != 7;
  218. });
  219. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  220. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  221. // `Object.getOwnPropertyDescriptor` method
  222. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  223. var f$3 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  224. O = toIndexedObject(O);
  225. P = toPrimitive(P, true);
  226. if (ie8DomDefine) try {
  227. return $getOwnPropertyDescriptor(O, P);
  228. } catch (error) { /* empty */ }
  229. if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  230. };
  231. var objectGetOwnPropertyDescriptor = {
  232. f: f$3
  233. };
  234. var anObject = function (it) {
  235. if (!isObject(it)) {
  236. throw TypeError(String(it) + ' is not an object');
  237. } return it;
  238. };
  239. // eslint-disable-next-line es/no-object-defineproperty -- safe
  240. var $defineProperty = Object.defineProperty;
  241. // `Object.defineProperty` method
  242. // https://tc39.es/ecma262/#sec-object.defineproperty
  243. var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
  244. anObject(O);
  245. P = toPrimitive(P, true);
  246. anObject(Attributes);
  247. if (ie8DomDefine) try {
  248. return $defineProperty(O, P, Attributes);
  249. } catch (error) { /* empty */ }
  250. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  251. if ('value' in Attributes) O[P] = Attributes.value;
  252. return O;
  253. };
  254. var objectDefineProperty = {
  255. f: f$2
  256. };
  257. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  258. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  259. } : function (object, key, value) {
  260. object[key] = value;
  261. return object;
  262. };
  263. var setGlobal = function (key, value) {
  264. try {
  265. createNonEnumerableProperty(global_1, key, value);
  266. } catch (error) {
  267. global_1[key] = value;
  268. } return value;
  269. };
  270. var SHARED = '__core-js_shared__';
  271. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  272. var sharedStore = store$1;
  273. var functionToString = Function.toString;
  274. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  275. if (typeof sharedStore.inspectSource != 'function') {
  276. sharedStore.inspectSource = function (it) {
  277. return functionToString.call(it);
  278. };
  279. }
  280. var inspectSource = sharedStore.inspectSource;
  281. var WeakMap$1 = global_1.WeakMap;
  282. var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
  283. var shared = createCommonjsModule(function (module) {
  284. (module.exports = function (key, value) {
  285. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  286. })('versions', []).push({
  287. version: '3.10.1',
  288. mode: 'global',
  289. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  290. });
  291. });
  292. var id = 0;
  293. var postfix = Math.random();
  294. var uid = function (key) {
  295. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  296. };
  297. var keys = shared('keys');
  298. var sharedKey = function (key) {
  299. return keys[key] || (keys[key] = uid(key));
  300. };
  301. var hiddenKeys$1 = {};
  302. var WeakMap = global_1.WeakMap;
  303. var set, get, has;
  304. var enforce = function (it) {
  305. return has(it) ? get(it) : set(it, {});
  306. };
  307. var getterFor = function (TYPE) {
  308. return function (it) {
  309. var state;
  310. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  311. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  312. } return state;
  313. };
  314. };
  315. if (nativeWeakMap) {
  316. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  317. var wmget = store.get;
  318. var wmhas = store.has;
  319. var wmset = store.set;
  320. set = function (it, metadata) {
  321. metadata.facade = it;
  322. wmset.call(store, it, metadata);
  323. return metadata;
  324. };
  325. get = function (it) {
  326. return wmget.call(store, it) || {};
  327. };
  328. has = function (it) {
  329. return wmhas.call(store, it);
  330. };
  331. } else {
  332. var STATE = sharedKey('state');
  333. hiddenKeys$1[STATE] = true;
  334. set = function (it, metadata) {
  335. metadata.facade = it;
  336. createNonEnumerableProperty(it, STATE, metadata);
  337. return metadata;
  338. };
  339. get = function (it) {
  340. return has$1(it, STATE) ? it[STATE] : {};
  341. };
  342. has = function (it) {
  343. return has$1(it, STATE);
  344. };
  345. }
  346. var internalState = {
  347. set: set,
  348. get: get,
  349. has: has,
  350. enforce: enforce,
  351. getterFor: getterFor
  352. };
  353. var redefine = createCommonjsModule(function (module) {
  354. var getInternalState = internalState.get;
  355. var enforceInternalState = internalState.enforce;
  356. var TEMPLATE = String(String).split('String');
  357. (module.exports = function (O, key, value, options) {
  358. var unsafe = options ? !!options.unsafe : false;
  359. var simple = options ? !!options.enumerable : false;
  360. var noTargetGet = options ? !!options.noTargetGet : false;
  361. var state;
  362. if (typeof value == 'function') {
  363. if (typeof key == 'string' && !has$1(value, 'name')) {
  364. createNonEnumerableProperty(value, 'name', key);
  365. }
  366. state = enforceInternalState(value);
  367. if (!state.source) {
  368. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  369. }
  370. }
  371. if (O === global_1) {
  372. if (simple) O[key] = value;
  373. else setGlobal(key, value);
  374. return;
  375. } else if (!unsafe) {
  376. delete O[key];
  377. } else if (!noTargetGet && O[key]) {
  378. simple = true;
  379. }
  380. if (simple) O[key] = value;
  381. else createNonEnumerableProperty(O, key, value);
  382. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  383. })(Function.prototype, 'toString', function toString() {
  384. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  385. });
  386. });
  387. var path = global_1;
  388. var aFunction$1 = function (variable) {
  389. return typeof variable == 'function' ? variable : undefined;
  390. };
  391. var getBuiltIn = function (namespace, method) {
  392. return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
  393. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  394. };
  395. var ceil = Math.ceil;
  396. var floor = Math.floor;
  397. // `ToInteger` abstract operation
  398. // https://tc39.es/ecma262/#sec-tointeger
  399. var toInteger = function (argument) {
  400. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  401. };
  402. var min$1 = Math.min;
  403. // `ToLength` abstract operation
  404. // https://tc39.es/ecma262/#sec-tolength
  405. var toLength = function (argument) {
  406. return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  407. };
  408. var max = Math.max;
  409. var min = Math.min;
  410. // Helper for a popular repeating case of the spec:
  411. // Let integer be ? ToInteger(index).
  412. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  413. var toAbsoluteIndex = function (index, length) {
  414. var integer = toInteger(index);
  415. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  416. };
  417. // `Array.prototype.{ indexOf, includes }` methods implementation
  418. var createMethod$1 = function (IS_INCLUDES) {
  419. return function ($this, el, fromIndex) {
  420. var O = toIndexedObject($this);
  421. var length = toLength(O.length);
  422. var index = toAbsoluteIndex(fromIndex, length);
  423. var value;
  424. // Array#includes uses SameValueZero equality algorithm
  425. // eslint-disable-next-line no-self-compare -- NaN check
  426. if (IS_INCLUDES && el != el) while (length > index) {
  427. value = O[index++];
  428. // eslint-disable-next-line no-self-compare -- NaN check
  429. if (value != value) return true;
  430. // Array#indexOf ignores holes, Array#includes - not
  431. } else for (;length > index; index++) {
  432. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  433. } return !IS_INCLUDES && -1;
  434. };
  435. };
  436. var arrayIncludes = {
  437. // `Array.prototype.includes` method
  438. // https://tc39.es/ecma262/#sec-array.prototype.includes
  439. includes: createMethod$1(true),
  440. // `Array.prototype.indexOf` method
  441. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  442. indexOf: createMethod$1(false)
  443. };
  444. var indexOf = arrayIncludes.indexOf;
  445. var objectKeysInternal = function (object, names) {
  446. var O = toIndexedObject(object);
  447. var i = 0;
  448. var result = [];
  449. var key;
  450. for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
  451. // Don't enum bug & hidden keys
  452. while (names.length > i) if (has$1(O, key = names[i++])) {
  453. ~indexOf(result, key) || result.push(key);
  454. }
  455. return result;
  456. };
  457. // IE8- don't enum bug keys
  458. var enumBugKeys = [
  459. 'constructor',
  460. 'hasOwnProperty',
  461. 'isPrototypeOf',
  462. 'propertyIsEnumerable',
  463. 'toLocaleString',
  464. 'toString',
  465. 'valueOf'
  466. ];
  467. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  468. // `Object.getOwnPropertyNames` method
  469. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  470. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  471. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  472. return objectKeysInternal(O, hiddenKeys);
  473. };
  474. var objectGetOwnPropertyNames = {
  475. f: f$1
  476. };
  477. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  478. var f = Object.getOwnPropertySymbols;
  479. var objectGetOwnPropertySymbols = {
  480. f: f
  481. };
  482. // all object keys, includes non-enumerable and symbols
  483. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  484. var keys = objectGetOwnPropertyNames.f(anObject(it));
  485. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  486. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  487. };
  488. var copyConstructorProperties = function (target, source) {
  489. var keys = ownKeys(source);
  490. var defineProperty = objectDefineProperty.f;
  491. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  492. for (var i = 0; i < keys.length; i++) {
  493. var key = keys[i];
  494. if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  495. }
  496. };
  497. var replacement = /#|\.prototype\./;
  498. var isForced = function (feature, detection) {
  499. var value = data[normalize(feature)];
  500. return value == POLYFILL ? true
  501. : value == NATIVE ? false
  502. : typeof detection == 'function' ? fails(detection)
  503. : !!detection;
  504. };
  505. var normalize = isForced.normalize = function (string) {
  506. return String(string).replace(replacement, '.').toLowerCase();
  507. };
  508. var data = isForced.data = {};
  509. var NATIVE = isForced.NATIVE = 'N';
  510. var POLYFILL = isForced.POLYFILL = 'P';
  511. var isForced_1 = isForced;
  512. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  513. /*
  514. options.target - name of the target object
  515. options.global - target is the global object
  516. options.stat - export as static methods of target
  517. options.proto - export as prototype methods of target
  518. options.real - real prototype method for the `pure` version
  519. options.forced - export even if the native feature is available
  520. options.bind - bind methods to the target, required for the `pure` version
  521. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  522. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  523. options.sham - add a flag to not completely full polyfills
  524. options.enumerable - export as enumerable property
  525. options.noTargetGet - prevent calling a getter on target
  526. */
  527. var _export = function (options, source) {
  528. var TARGET = options.target;
  529. var GLOBAL = options.global;
  530. var STATIC = options.stat;
  531. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  532. if (GLOBAL) {
  533. target = global_1;
  534. } else if (STATIC) {
  535. target = global_1[TARGET] || setGlobal(TARGET, {});
  536. } else {
  537. target = (global_1[TARGET] || {}).prototype;
  538. }
  539. if (target) for (key in source) {
  540. sourceProperty = source[key];
  541. if (options.noTargetGet) {
  542. descriptor = getOwnPropertyDescriptor(target, key);
  543. targetProperty = descriptor && descriptor.value;
  544. } else targetProperty = target[key];
  545. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  546. // contained in target
  547. if (!FORCED && targetProperty !== undefined) {
  548. if (typeof sourceProperty === typeof targetProperty) continue;
  549. copyConstructorProperties(sourceProperty, targetProperty);
  550. }
  551. // add a flag to not completely full polyfills
  552. if (options.sham || (targetProperty && targetProperty.sham)) {
  553. createNonEnumerableProperty(sourceProperty, 'sham', true);
  554. }
  555. // extend global
  556. redefine(target, key, sourceProperty, options);
  557. }
  558. };
  559. // `Object.keys` method
  560. // https://tc39.es/ecma262/#sec-object.keys
  561. // eslint-disable-next-line es/no-object-keys -- safe
  562. var objectKeys = Object.keys || function keys(O) {
  563. return objectKeysInternal(O, enumBugKeys);
  564. };
  565. // `ToObject` abstract operation
  566. // https://tc39.es/ecma262/#sec-toobject
  567. var toObject = function (argument) {
  568. return Object(requireObjectCoercible(argument));
  569. };
  570. // eslint-disable-next-line es/no-object-assign -- safe
  571. var $assign = Object.assign;
  572. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  573. var defineProperty = Object.defineProperty;
  574. // `Object.assign` method
  575. // https://tc39.es/ecma262/#sec-object.assign
  576. var objectAssign = !$assign || fails(function () {
  577. // should have correct order of operations (Edge bug)
  578. if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  579. enumerable: true,
  580. get: function () {
  581. defineProperty(this, 'b', {
  582. value: 3,
  583. enumerable: false
  584. });
  585. }
  586. }), { b: 2 })).b !== 1) return true;
  587. // should work with symbols and should have deterministic property order (V8 bug)
  588. var A = {};
  589. var B = {};
  590. // eslint-disable-next-line es/no-symbol -- safe
  591. var symbol = Symbol();
  592. var alphabet = 'abcdefghijklmnopqrst';
  593. A[symbol] = 7;
  594. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  595. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  596. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  597. var T = toObject(target);
  598. var argumentsLength = arguments.length;
  599. var index = 1;
  600. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  601. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  602. while (argumentsLength > index) {
  603. var S = indexedObject(arguments[index++]);
  604. var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
  605. var length = keys.length;
  606. var j = 0;
  607. var key;
  608. while (length > j) {
  609. key = keys[j++];
  610. if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
  611. }
  612. } return T;
  613. } : $assign;
  614. // `Object.assign` method
  615. // https://tc39.es/ecma262/#sec-object.assign
  616. // eslint-disable-next-line es/no-object-assign -- required for testing
  617. _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
  618. assign: objectAssign
  619. });
  620. // `IsArray` abstract operation
  621. // https://tc39.es/ecma262/#sec-isarray
  622. // eslint-disable-next-line es/no-array-isarray -- safe
  623. var isArray = Array.isArray || function isArray(arg) {
  624. return classofRaw(arg) == 'Array';
  625. };
  626. var createProperty = function (object, key, value) {
  627. var propertyKey = toPrimitive(key);
  628. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  629. else object[propertyKey] = value;
  630. };
  631. var engineIsNode = classofRaw(global_1.process) == 'process';
  632. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  633. var process = global_1.process;
  634. var versions = process && process.versions;
  635. var v8 = versions && versions.v8;
  636. var match, version;
  637. if (v8) {
  638. match = v8.split('.');
  639. version = match[0] + match[1];
  640. } else if (engineUserAgent) {
  641. match = engineUserAgent.match(/Edge\/(\d+)/);
  642. if (!match || match[1] >= 74) {
  643. match = engineUserAgent.match(/Chrome\/(\d+)/);
  644. if (match) version = match[1];
  645. }
  646. }
  647. var engineV8Version = version && +version;
  648. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  649. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  650. // eslint-disable-next-line es/no-symbol -- required for testing
  651. return !Symbol.sham &&
  652. // Chrome 38 Symbol has incorrect toString conversion
  653. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  654. (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
  655. });
  656. /* eslint-disable es/no-symbol -- required for testing */
  657. var useSymbolAsUid = nativeSymbol
  658. && !Symbol.sham
  659. && typeof Symbol.iterator == 'symbol';
  660. var WellKnownSymbolsStore = shared('wks');
  661. var Symbol$1 = global_1.Symbol;
  662. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  663. var wellKnownSymbol = function (name) {
  664. if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  665. if (nativeSymbol && has$1(Symbol$1, name)) {
  666. WellKnownSymbolsStore[name] = Symbol$1[name];
  667. } else {
  668. WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  669. }
  670. } return WellKnownSymbolsStore[name];
  671. };
  672. var SPECIES$1 = wellKnownSymbol('species');
  673. // `ArraySpeciesCreate` abstract operation
  674. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  675. var arraySpeciesCreate = function (originalArray, length) {
  676. var C;
  677. if (isArray(originalArray)) {
  678. C = originalArray.constructor;
  679. // cross-realm fallback
  680. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  681. else if (isObject(C)) {
  682. C = C[SPECIES$1];
  683. if (C === null) C = undefined;
  684. }
  685. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  686. };
  687. var SPECIES = wellKnownSymbol('species');
  688. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  689. // We can't use this feature detection in V8 since it causes
  690. // deoptimization and serious performance degradation
  691. // https://github.com/zloirock/core-js/issues/677
  692. return engineV8Version >= 51 || !fails(function () {
  693. var array = [];
  694. var constructor = array.constructor = {};
  695. constructor[SPECIES] = function () {
  696. return { foo: 1 };
  697. };
  698. return array[METHOD_NAME](Boolean).foo !== 1;
  699. });
  700. };
  701. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  702. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  703. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  704. // We can't use this feature detection in V8 since it causes
  705. // deoptimization and serious performance degradation
  706. // https://github.com/zloirock/core-js/issues/679
  707. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  708. var array = [];
  709. array[IS_CONCAT_SPREADABLE] = false;
  710. return array.concat()[0] !== array;
  711. });
  712. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  713. var isConcatSpreadable = function (O) {
  714. if (!isObject(O)) return false;
  715. var spreadable = O[IS_CONCAT_SPREADABLE];
  716. return spreadable !== undefined ? !!spreadable : isArray(O);
  717. };
  718. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  719. // `Array.prototype.concat` method
  720. // https://tc39.es/ecma262/#sec-array.prototype.concat
  721. // with adding support of @@isConcatSpreadable and @@species
  722. _export({ target: 'Array', proto: true, forced: FORCED }, {
  723. // eslint-disable-next-line no-unused-vars -- required for `.length`
  724. concat: function concat(arg) {
  725. var O = toObject(this);
  726. var A = arraySpeciesCreate(O, 0);
  727. var n = 0;
  728. var i, k, length, len, E;
  729. for (i = -1, length = arguments.length; i < length; i++) {
  730. E = i === -1 ? O : arguments[i];
  731. if (isConcatSpreadable(E)) {
  732. len = toLength(E.length);
  733. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  734. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  735. } else {
  736. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  737. createProperty(A, n++, E);
  738. }
  739. }
  740. A.length = n;
  741. return A;
  742. }
  743. });
  744. var aFunction = function (it) {
  745. if (typeof it != 'function') {
  746. throw TypeError(String(it) + ' is not a function');
  747. } return it;
  748. };
  749. // optional / simple context binding
  750. var functionBindContext = function (fn, that, length) {
  751. aFunction(fn);
  752. if (that === undefined) return fn;
  753. switch (length) {
  754. case 0: return function () {
  755. return fn.call(that);
  756. };
  757. case 1: return function (a) {
  758. return fn.call(that, a);
  759. };
  760. case 2: return function (a, b) {
  761. return fn.call(that, a, b);
  762. };
  763. case 3: return function (a, b, c) {
  764. return fn.call(that, a, b, c);
  765. };
  766. }
  767. return function (/* ...args */) {
  768. return fn.apply(that, arguments);
  769. };
  770. };
  771. var push = [].push;
  772. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  773. var createMethod = function (TYPE) {
  774. var IS_MAP = TYPE == 1;
  775. var IS_FILTER = TYPE == 2;
  776. var IS_SOME = TYPE == 3;
  777. var IS_EVERY = TYPE == 4;
  778. var IS_FIND_INDEX = TYPE == 6;
  779. var IS_FILTER_OUT = TYPE == 7;
  780. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  781. return function ($this, callbackfn, that, specificCreate) {
  782. var O = toObject($this);
  783. var self = indexedObject(O);
  784. var boundFunction = functionBindContext(callbackfn, that, 3);
  785. var length = toLength(self.length);
  786. var index = 0;
  787. var create = specificCreate || arraySpeciesCreate;
  788. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  789. var value, result;
  790. for (;length > index; index++) if (NO_HOLES || index in self) {
  791. value = self[index];
  792. result = boundFunction(value, index, O);
  793. if (TYPE) {
  794. if (IS_MAP) target[index] = result; // map
  795. else if (result) switch (TYPE) {
  796. case 3: return true; // some
  797. case 5: return value; // find
  798. case 6: return index; // findIndex
  799. case 2: push.call(target, value); // filter
  800. } else switch (TYPE) {
  801. case 4: return false; // every
  802. case 7: push.call(target, value); // filterOut
  803. }
  804. }
  805. }
  806. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  807. };
  808. };
  809. var arrayIteration = {
  810. // `Array.prototype.forEach` method
  811. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  812. forEach: createMethod(0),
  813. // `Array.prototype.map` method
  814. // https://tc39.es/ecma262/#sec-array.prototype.map
  815. map: createMethod(1),
  816. // `Array.prototype.filter` method
  817. // https://tc39.es/ecma262/#sec-array.prototype.filter
  818. filter: createMethod(2),
  819. // `Array.prototype.some` method
  820. // https://tc39.es/ecma262/#sec-array.prototype.some
  821. some: createMethod(3),
  822. // `Array.prototype.every` method
  823. // https://tc39.es/ecma262/#sec-array.prototype.every
  824. every: createMethod(4),
  825. // `Array.prototype.find` method
  826. // https://tc39.es/ecma262/#sec-array.prototype.find
  827. find: createMethod(5),
  828. // `Array.prototype.findIndex` method
  829. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  830. findIndex: createMethod(6),
  831. // `Array.prototype.filterOut` method
  832. // https://github.com/tc39/proposal-array-filtering
  833. filterOut: createMethod(7)
  834. };
  835. // `Object.defineProperties` method
  836. // https://tc39.es/ecma262/#sec-object.defineproperties
  837. // eslint-disable-next-line es/no-object-defineproperties -- safe
  838. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  839. anObject(O);
  840. var keys = objectKeys(Properties);
  841. var length = keys.length;
  842. var index = 0;
  843. var key;
  844. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  845. return O;
  846. };
  847. var html = getBuiltIn('document', 'documentElement');
  848. var GT = '>';
  849. var LT = '<';
  850. var PROTOTYPE = 'prototype';
  851. var SCRIPT = 'script';
  852. var IE_PROTO = sharedKey('IE_PROTO');
  853. var EmptyConstructor = function () { /* empty */ };
  854. var scriptTag = function (content) {
  855. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  856. };
  857. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  858. var NullProtoObjectViaActiveX = function (activeXDocument) {
  859. activeXDocument.write(scriptTag(''));
  860. activeXDocument.close();
  861. var temp = activeXDocument.parentWindow.Object;
  862. activeXDocument = null; // avoid memory leak
  863. return temp;
  864. };
  865. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  866. var NullProtoObjectViaIFrame = function () {
  867. // Thrash, waste and sodomy: IE GC bug
  868. var iframe = documentCreateElement('iframe');
  869. var JS = 'java' + SCRIPT + ':';
  870. var iframeDocument;
  871. iframe.style.display = 'none';
  872. html.appendChild(iframe);
  873. // https://github.com/zloirock/core-js/issues/475
  874. iframe.src = String(JS);
  875. iframeDocument = iframe.contentWindow.document;
  876. iframeDocument.open();
  877. iframeDocument.write(scriptTag('document.F=Object'));
  878. iframeDocument.close();
  879. return iframeDocument.F;
  880. };
  881. // Check for document.domain and active x support
  882. // No need to use active x approach when document.domain is not set
  883. // see https://github.com/es-shims/es5-shim/issues/150
  884. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  885. // avoid IE GC bug
  886. var activeXDocument;
  887. var NullProtoObject = function () {
  888. try {
  889. /* global ActiveXObject -- old IE */
  890. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  891. } catch (error) { /* ignore */ }
  892. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  893. var length = enumBugKeys.length;
  894. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  895. return NullProtoObject();
  896. };
  897. hiddenKeys$1[IE_PROTO] = true;
  898. // `Object.create` method
  899. // https://tc39.es/ecma262/#sec-object.create
  900. var objectCreate = Object.create || function create(O, Properties) {
  901. var result;
  902. if (O !== null) {
  903. EmptyConstructor[PROTOTYPE] = anObject(O);
  904. result = new EmptyConstructor();
  905. EmptyConstructor[PROTOTYPE] = null;
  906. // add "__proto__" for Object.getPrototypeOf polyfill
  907. result[IE_PROTO] = O;
  908. } else result = NullProtoObject();
  909. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  910. };
  911. var UNSCOPABLES = wellKnownSymbol('unscopables');
  912. var ArrayPrototype = Array.prototype;
  913. // Array.prototype[@@unscopables]
  914. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  915. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  916. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  917. configurable: true,
  918. value: objectCreate(null)
  919. });
  920. }
  921. // add a key to Array.prototype[@@unscopables]
  922. var addToUnscopables = function (key) {
  923. ArrayPrototype[UNSCOPABLES][key] = true;
  924. };
  925. var $find = arrayIteration.find;
  926. var FIND = 'find';
  927. var SKIPS_HOLES = true;
  928. // Shouldn't skip holes
  929. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  930. // `Array.prototype.find` method
  931. // https://tc39.es/ecma262/#sec-array.prototype.find
  932. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  933. find: function find(callbackfn /* , that = undefined */) {
  934. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  935. }
  936. });
  937. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  938. addToUnscopables(FIND);
  939. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  940. var method = [][METHOD_NAME];
  941. return !!method && fails(function () {
  942. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  943. method.call(null, argument || function () { throw 1; }, 1);
  944. });
  945. };
  946. var nativeJoin = [].join;
  947. var ES3_STRINGS = indexedObject != Object;
  948. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  949. // `Array.prototype.join` method
  950. // https://tc39.es/ecma262/#sec-array.prototype.join
  951. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  952. join: function join(separator) {
  953. return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  954. }
  955. });
  956. /**
  957. * @author Homer Glascock <HopGlascock@gmail.com>
  958. * @update zhixin wen <wenzhixin2010@gmail.com>
  959. */
  960. var Utils = $__default['default'].fn.bootstrapTable.utils;
  961. $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, {
  962. formatCopyRows: function formatCopyRows() {
  963. return 'Copy Rows';
  964. }
  965. });
  966. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales);
  967. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, {
  968. copy: {
  969. bootstrap3: 'glyphicon-copy icon-pencil',
  970. bootstrap5: 'bi-clipboard',
  971. materialize: 'content_copy',
  972. 'bootstrap-table': 'icon-copy'
  973. }[$__default['default'].fn.bootstrapTable.theme] || 'fa-copy'
  974. });
  975. var copyText = function copyText(text) {
  976. var textField = document.createElement('textarea');
  977. $__default['default'](textField).html(text);
  978. document.body.appendChild(textField);
  979. textField.select();
  980. try {
  981. document.execCommand('copy');
  982. } catch (e) {
  983. console.warn('Oops, unable to copy');
  984. }
  985. $__default['default'](textField).remove();
  986. };
  987. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
  988. showCopyRows: false,
  989. copyWithHidden: false,
  990. copyDelimiter: ', ',
  991. copyNewline: '\n'
  992. });
  993. $__default['default'].extend($__default['default'].fn.bootstrapTable.columnDefaults, {
  994. ignoreCopy: false,
  995. rawCopy: false
  996. });
  997. $__default['default'].fn.bootstrapTable.methods.push('copyColumnsToClipboard');
  998. $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  999. _inherits(_class, _$$BootstrapTable);
  1000. var _super = _createSuper(_class);
  1001. function _class() {
  1002. _classCallCheck(this, _class);
  1003. return _super.apply(this, arguments);
  1004. }
  1005. _createClass(_class, [{
  1006. key: "initToolbar",
  1007. value: function initToolbar() {
  1008. var _get2;
  1009. if (this.options.showCopyRows && this.header.stateField) {
  1010. this.buttons = Object.assign(this.buttons, {
  1011. copyRows: {
  1012. text: this.options.formatCopyRows(),
  1013. icon: this.options.icons.copy,
  1014. event: this.copyColumnsToClipboard,
  1015. attributes: {
  1016. 'aria-label': this.options.formatCopyRows(),
  1017. title: this.options.formatCopyRows()
  1018. }
  1019. }
  1020. });
  1021. }
  1022. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1023. args[_key] = arguments[_key];
  1024. }
  1025. (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args));
  1026. this.$copyButton = this.$toolbar.find('>.columns [name="copyRows"]');
  1027. if (this.options.showCopyRows && this.header.stateField) {
  1028. this.updateCopyButton();
  1029. }
  1030. }
  1031. }, {
  1032. key: "copyColumnsToClipboard",
  1033. value: function copyColumnsToClipboard() {
  1034. var _this = this;
  1035. var rows = [];
  1036. $__default['default'].each(this.getSelections(), function (index, row) {
  1037. var cols = [];
  1038. $__default['default'].each(_this.options.columns[0], function (indy, column) {
  1039. if (column.field !== _this.header.stateField && (!_this.options.copyWithHidden || _this.options.copyWithHidden && column.visible) && !column.ignoreCopy) {
  1040. if (row[column.field] !== null) {
  1041. var columnValue = column.rawCopy ? row[column.field] : Utils.calculateObjectValue(column, _this.header.formatters[indy], [row[column.field], row, index], row[column.field]);
  1042. cols.push(columnValue);
  1043. }
  1044. }
  1045. });
  1046. rows.push(cols.join(_this.options.copyDelimiter));
  1047. });
  1048. copyText(rows.join(this.options.copyNewline));
  1049. }
  1050. }, {
  1051. key: "updateSelected",
  1052. value: function updateSelected() {
  1053. _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
  1054. this.updateCopyButton();
  1055. }
  1056. }, {
  1057. key: "updateCopyButton",
  1058. value: function updateCopyButton() {
  1059. if (this.options.showCopyRows && this.header.stateField && this.$copyButton) {
  1060. this.$copyButton.prop('disabled', !this.getSelections().length);
  1061. }
  1062. }
  1063. }]);
  1064. return _class;
  1065. }($__default['default'].BootstrapTable);
  1066. })));