| 12345678910 |
- /**
- * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
- *
- * @version v1.23.0
- * @homepage https://bootstrap-table.com
- * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
- * @license MIT
- */
- !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.index-of.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.object.assign.js"),require("jquery")):"function"==typeof define&&define.amd?define(["core-js/modules/es.array.concat.js","core-js/modules/es.array.index-of.js","core-js/modules/es.array.splice.js","core-js/modules/es.object.assign.js","jquery"],o):o(null,null,null,null,(t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t,o,e,r,n){"use strict";function i(t,o){(null==o||o>t.length)&&(o=t.length);for(var e=0,r=Array(o);e<o;e++)r[e]=t[e];return r}function a(t,o,e){return o=l(o),function(t,o){if(o&&("object"==typeof o||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(o,e||[],l(t).constructor):o.apply(t,e))}function s(t,o,e){return o&&function(t,o){for(var e=0;e<o.length;e++){var r=o[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,o,e){var r=function(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=l(t)););return t}(t,o);if(r){var n=Object.getOwnPropertyDescriptor(r,o);return n.get?n.get.call(arguments.length<3?t:e):n.value}},u.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function f(t,o){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,o){return t.__proto__=o,t},f(t,o)}function p(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,o){if(t){if("string"==typeof t)return i(t,o);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?i(t,o):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t){var o=function(t,o){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,o);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof o?o:o+""}var y=function(t,o){return{id:"customId_".concat(o)}};Object.assign(n.fn.bootstrapTable.defaults,{reorderableRows:!1,onDragStyle:null,onDropStyle:null,onDragClass:"reorder-rows-on-drag-class",dragHandle:">tbody>tr>td:not(.bs-checkbox)",useRowAttrFunc:!1,onReorderRowsDrag:function(t){return!1},onReorderRowsDrop:function(t){return!1},onReorderRow:function(t){return!1},onDragStop:function(){},onAllowDrop:function(){return!0}}),Object.assign(n.fn.bootstrapTable.events,{"reorder-row.bs.table":"onReorderRow"}),n.BootstrapTable=function(t){function o(){return function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,o),a(this,o,arguments)}return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&f(t,o)}(o,t),s(o,[{key:"init",value:function(){for(var t,e=this,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];if(this.options.reorderableRows){this.options.useRowAttrFunc&&(this.options.rowAttributes=y);var a=this.options.onPostBody;this.options.onPostBody=function(){setTimeout((function(){e.makeRowsReorderable(),a.call(e.options,e.options.data)}),1)},(t=u(l(o.prototype),"init",this)).call.apply(t,[this].concat(n))}else{var s;(s=u(l(o.prototype),"init",this)).call.apply(s,[this].concat(n))}}},{key:"makeRowsReorderable",value:function(){var t=this;this.$el.tableDnD({onDragStyle:this.options.onDragStyle,onDropStyle:this.options.onDropStyle,onDragClass:this.options.onDragClass,onAllowDrop:function(o,e){return t.onAllowDrop(o,e)},onDragStop:function(o,e){return t.onDragStop(o,e)},onDragStart:function(o,e){return t.onDropStart(o,e)},onDrop:function(o,e){return t.onDrop(o,e)},dragHandle:this.options.dragHandle})}},{key:"onDropStart",value:function(t,o){this.$draggingTd=n(o).css("cursor","move"),this.draggingIndex=n(this.$draggingTd.parent()).data("index"),this.options.onReorderRowsDrag(this.data[this.draggingIndex])}},{key:"onDragStop",value:function(t,o){var e=n(o).data("index"),r=this.data[e];this.options.onDragStop(t,r,o)}},{key:"onAllowDrop",value:function(t,o){var e=n(o).data("index"),r=n(t).data("index"),i=this.data[e],a=this.data[r];return this.options.onAllowDrop(a,i,t,o)}},{key:"onDrop",value:function(t){this.$draggingTd.css("cursor","");for(var o=this.options.pageNumber,e=this.options.pageSize,r=[],i=0;i<t.tBodies[0].rows.length;i++){var a=n(t.tBodies[0].rows[i]);r.push(this.data[a.data("index")]),a.data("index",i)}var s=this.data[this.draggingIndex],u=r.indexOf(this.data[this.draggingIndex]),l=this.data[u],c=(o-1)*e+this.options.data.indexOf(this.data[u]);this.options.data.splice(this.options.data.indexOf(s),1),this.options.data.splice(c,0,s),this.initSearch(),"server"===this.options.sidePagination&&(this.data=p(this.options.data)),this.options.onReorderRowsDrop(l),this.trigger("reorder-row",r,s,l)}},{key:"initSearch",value:function(){this.ignoreInitSort=!0,u(l(o.prototype),"initSearch",this).call(this)}},{key:"initSort",value:function(){this.ignoreInitSort?this.ignoreInitSort=!1:u(l(o.prototype),"initSort",this).call(this)}}])}(n.BootstrapTable)}));
|