bootstrap-table
Version:
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
11 lines (9 loc) • 18.2 kB
JavaScript
/**
* 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.20.2
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
* @license MIT
*/
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=r(t);function n(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function o(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function u(t,r){return u=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},u(t,r)}function a(t,r){if(r&&("object"==typeof r||"function"==typeof r))return r;if(void 0!==r)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)}function c(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,n=i(t);if(r){var o=i(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return a(this,e)}}function f(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=i(t)););return t}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,r,e){var n=f(t,r);if(n){var o=Object.getOwnPropertyDescriptor(n,r);return o.get?o.get.call(arguments.length<3?t:e):o.value}},s.apply(this,arguments)}var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},p=function(t){return t&&t.Math==Math&&t},d=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof l&&l)||function(){return this}()||Function("return this")(),y={},h=function(t){try{return!!t()}catch(t){return!0}},g=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),b=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),v=b,w=Function.prototype.call,m=v?w.bind(w):function(){return w.apply(w,arguments)},O={},S={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,x=j&&!S.call({1:2},1);O.f=x?function(t){var r=j(this,t);return!!r&&r.enumerable}:S;var D,P,R=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},T=b,E=Function.prototype,A=E.bind,k=E.call,I=T&&A.bind(k,k),_=T?function(t){return t&&I(t)}:function(t){return t&&function(){return k.apply(t,arguments)}},C=_,F=C({}.toString),M=C("".slice),B=function(t){return M(F(t),8,-1)},z=_,L=h,N=B,G=d.Object,$=z("".split),q=L((function(){return!G("z").propertyIsEnumerable(0)}))?function(t){return"String"==N(t)?$(t,""):G(t)}:G,H=d.TypeError,U=function(t){if(null==t)throw H("Can't call method on "+t);return t},V=q,W=U,K=function(t){return V(W(t))},Q=function(t){return"function"==typeof t},X=Q,Y=function(t){return"object"==typeof t?null!==t:X(t)},J=d,Z=Q,tt=function(t){return Z(t)?t:void 0},rt=function(t,r){return arguments.length<2?tt(J[t]):J[t]&&J[t][r]},et=_({}.isPrototypeOf),nt=d,ot=rt("navigator","userAgent")||"",it=nt.process,ut=nt.Deno,at=it&&it.versions||ut&&ut.version,ct=at&&at.v8;ct&&(P=(D=ct.split("."))[0]>0&&D[0]<4?1:+(D[0]+D[1])),!P&&ot&&(!(D=ot.match(/Edge\/(\d+)/))||D[1]>=74)&&(D=ot.match(/Chrome\/(\d+)/))&&(P=+D[1]);var ft=P,st=ft,lt=h,pt=!!Object.getOwnPropertySymbols&&!lt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&st&&st<41})),dt=pt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,yt=rt,ht=Q,gt=et,bt=dt,vt=d.Object,wt=bt?function(t){return"symbol"==typeof t}:function(t){var r=yt("Symbol");return ht(r)&>(r.prototype,vt(t))},mt=d.String,Ot=Q,St=function(t){try{return mt(t)}catch(t){return"Object"}},jt=d.TypeError,xt=function(t){if(Ot(t))return t;throw jt(St(t)+" is not a function")},Dt=m,Pt=Q,Rt=Y,Tt=d.TypeError,Et={exports:{}},At=d,kt=Object.defineProperty,It=function(t,r){try{kt(At,t,{value:r,configurable:!0,writable:!0})}catch(e){At[t]=r}return r},_t=It,Ct="__core-js_shared__",Ft=d[Ct]||_t(Ct,{}),Mt=Ft;(Et.exports=function(t,r){return Mt[t]||(Mt[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.22.5",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE",source:"https://github.com/zloirock/core-js"});var Bt=U,zt=d.Object,Lt=function(t){return zt(Bt(t))},Nt=Lt,Gt=_({}.hasOwnProperty),$t=Object.hasOwn||function(t,r){return Gt(Nt(t),r)},qt=_,Ht=0,Ut=Math.random(),Vt=qt(1..toString),Wt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Vt(++Ht+Ut,36)},Kt=d,Qt=Et.exports,Xt=$t,Yt=Wt,Jt=pt,Zt=dt,tr=Qt("wks"),rr=Kt.Symbol,er=rr&&rr.for,nr=Zt?rr:rr&&rr.withoutSetter||Yt,or=function(t){if(!Xt(tr,t)||!Jt&&"string"!=typeof tr[t]){var r="Symbol."+t;Jt&&Xt(rr,t)?tr[t]=rr[t]:tr[t]=Zt&&er?er(r):nr(r)}return tr[t]},ir=m,ur=Y,ar=wt,cr=function(t,r){var e=t[r];return null==e?void 0:xt(e)},fr=function(t,r){var e,n;if("string"===r&&Pt(e=t.toString)&&!Rt(n=Dt(e,t)))return n;if(Pt(e=t.valueOf)&&!Rt(n=Dt(e,t)))return n;if("string"!==r&&Pt(e=t.toString)&&!Rt(n=Dt(e,t)))return n;throw Tt("Can't convert object to primitive value")},sr=or,lr=d.TypeError,pr=sr("toPrimitive"),dr=function(t,r){if(!ur(t)||ar(t))return t;var e,n=cr(t,pr);if(n){if(void 0===r&&(r="default"),e=ir(n,t,r),!ur(e)||ar(e))return e;throw lr("Can't convert object to primitive value")}return void 0===r&&(r="number"),fr(t,r)},yr=wt,hr=function(t){var r=dr(t,"string");return yr(r)?r:r+""},gr=Y,br=d.document,vr=gr(br)&&gr(br.createElement),wr=function(t){return vr?br.createElement(t):{}},mr=!g&&!h((function(){return 7!=Object.defineProperty(wr("div"),"a",{get:function(){return 7}}).a})),Or=g,Sr=m,jr=O,xr=R,Dr=K,Pr=hr,Rr=$t,Tr=mr,Er=Object.getOwnPropertyDescriptor;y.f=Or?Er:function(t,r){if(t=Dr(t),r=Pr(r),Tr)try{return Er(t,r)}catch(t){}if(Rr(t,r))return xr(!Sr(jr.f,t,r),t[r])};var Ar={},kr=g&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ir=d,_r=Y,Cr=Ir.String,Fr=Ir.TypeError,Mr=function(t){if(_r(t))return t;throw Fr(Cr(t)+" is not an object")},Br=g,zr=mr,Lr=kr,Nr=Mr,Gr=hr,$r=d.TypeError,qr=Object.defineProperty,Hr=Object.getOwnPropertyDescriptor,Ur="enumerable",Vr="configurable",Wr="writable";Ar.f=Br?Lr?function(t,r,e){if(Nr(t),r=Gr(r),Nr(e),"function"==typeof t&&"prototype"===r&&"value"in e&&Wr in e&&!e.writable){var n=Hr(t,r);n&&n.writable&&(t[r]=e.value,e={configurable:Vr in e?e.configurable:n.configurable,enumerable:Ur in e?e.enumerable:n.enumerable,writable:!1})}return qr(t,r,e)}:qr:function(t,r,e){if(Nr(t),r=Gr(r),Nr(e),zr)try{return qr(t,r,e)}catch(t){}if("get"in e||"set"in e)throw $r("Accessors not supported");return"value"in e&&(t[r]=e.value),t};var Kr=Ar,Qr=R,Xr=g?function(t,r,e){return Kr.f(t,r,Qr(1,e))}:function(t,r,e){return t[r]=e,t},Yr={exports:{}},Jr=g,Zr=$t,te=Function.prototype,re=Jr&&Object.getOwnPropertyDescriptor,ee=Zr(te,"name"),ne={EXISTS:ee,PROPER:ee&&"something"===function(){}.name,CONFIGURABLE:ee&&(!Jr||Jr&&re(te,"name").configurable)},oe=Q,ie=Ft,ue=_(Function.toString);oe(ie.inspectSource)||(ie.inspectSource=function(t){return ue(t)});var ae,ce,fe,se=ie.inspectSource,le=Q,pe=se,de=d.WeakMap,ye=le(de)&&/native code/.test(pe(de)),he=Et.exports,ge=Wt,be=he("keys"),ve={},we=ye,me=d,Oe=_,Se=Y,je=Xr,xe=$t,De=Ft,Pe=function(t){return be[t]||(be[t]=ge(t))},Re=ve,Te="Object already initialized",Ee=me.TypeError,Ae=me.WeakMap;if(we||De.state){var ke=De.state||(De.state=new Ae),Ie=Oe(ke.get),_e=Oe(ke.has),Ce=Oe(ke.set);ae=function(t,r){if(_e(ke,t))throw new Ee(Te);return r.facade=t,Ce(ke,t,r),r},ce=function(t){return Ie(ke,t)||{}},fe=function(t){return _e(ke,t)}}else{var Fe=Pe("state");Re[Fe]=!0,ae=function(t,r){if(xe(t,Fe))throw new Ee(Te);return r.facade=t,je(t,Fe,r),r},ce=function(t){return xe(t,Fe)?t[Fe]:{}},fe=function(t){return xe(t,Fe)}}var Me={set:ae,get:ce,has:fe,enforce:function(t){return fe(t)?ce(t):ae(t,{})},getterFor:function(t){return function(r){var e;if(!Se(r)||(e=ce(r)).type!==t)throw Ee("Incompatible receiver, "+t+" required");return e}}},Be=h,ze=Q,Le=$t,Ne=g,Ge=ne.CONFIGURABLE,$e=se,qe=Me.enforce,He=Me.get,Ue=Object.defineProperty,Ve=Ne&&!Be((function(){return 8!==Ue((function(){}),"length",{value:8}).length})),We=String(String).split("String"),Ke=Yr.exports=function(t,r,e){if("Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!Le(t,"name")||Ge&&t.name!==r)&&Ue(t,"name",{value:r,configurable:!0}),Ve&&e&&Le(e,"arity")&&t.length!==e.arity&&Ue(t,"length",{value:e.arity}),e&&Le(e,"constructor")&&e.constructor){if(Ne)try{Ue(t,"prototype",{writable:!1})}catch(t){}}else t.prototype=void 0;var n=qe(t);return Le(n,"source")||(n.source=We.join("string"==typeof r?r:"")),t};Function.prototype.toString=Ke((function(){return ze(this)&&He(this).source||$e(this)}),"toString");var Qe=d,Xe=Q,Ye=Xr,Je=Yr.exports,Ze=It,tn={},rn=Math.ceil,en=Math.floor,nn=function(t){var r=+t;return r!=r||0===r?0:(r>0?en:rn)(r)},on=nn,un=Math.max,an=Math.min,cn=function(t,r){var e=on(t);return e<0?un(e+r,0):an(e,r)},fn=nn,sn=Math.min,ln=function(t){return t>0?sn(fn(t),9007199254740991):0},pn=function(t){return ln(t.length)},dn=K,yn=cn,hn=pn,gn=function(t){return function(r,e,n){var o,i=dn(r),u=hn(i),a=yn(n,u);if(t&&e!=e){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===e)return t||a||0;return!t&&-1}},bn={includes:gn(!0),indexOf:gn(!1)},vn=$t,wn=K,mn=bn.indexOf,On=ve,Sn=_([].push),jn=function(t,r){var e,n=wn(t),o=0,i=[];for(e in n)!vn(On,e)&&vn(n,e)&&Sn(i,e);for(;r.length>o;)vn(n,e=r[o++])&&(~mn(i,e)||Sn(i,e));return i},xn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");tn.f=Object.getOwnPropertyNames||function(t){return jn(t,xn)};var Dn={};Dn.f=Object.getOwnPropertySymbols;var Pn=rt,Rn=tn,Tn=Dn,En=Mr,An=_([].concat),kn=Pn("Reflect","ownKeys")||function(t){var r=Rn.f(En(t)),e=Tn.f;return e?An(r,e(t)):r},In=$t,_n=kn,Cn=y,Fn=Ar,Mn=h,Bn=Q,zn=/#|\.prototype\./,Ln=function(t,r){var e=Gn[Nn(t)];return e==qn||e!=$n&&(Bn(r)?Mn(r):!!r)},Nn=Ln.normalize=function(t){return String(t).replace(zn,".").toLowerCase()},Gn=Ln.data={},$n=Ln.NATIVE="N",qn=Ln.POLYFILL="P",Hn=Ln,Un=d,Vn=y.f,Wn=Xr,Kn=function(t,r,e,n){var o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet,a=n&&void 0!==n.name?n.name:r;return Xe(e)&&Je(e,a,n),t===Qe?(i?t[r]=e:Ze(r,e),t):(o?!u&&t[r]&&(i=!0):delete t[r],i?t[r]=e:Ye(t,r,e),t)},Qn=It,Xn=function(t,r,e){for(var n=_n(r),o=Fn.f,i=Cn.f,u=0;u<n.length;u++){var a=n[u];In(t,a)||e&&In(e,a)||o(t,a,i(r,a))}},Yn=Hn,Jn=function(t,r){var e,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(e=c?Un:f?Un[a]||Qn(a,{}):(Un[a]||{}).prototype)for(n in r){if(i=r[n],o=t.noTargetGet?(u=Vn(e,n))&&u.value:e[n],!Yn(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Xn(i,o)}(t.sham||o&&o.sham)&&Wn(i,"sham",!0),Kn(e,n,i,t)}},Zn=B,to=Array.isArray||function(t){return"Array"==Zn(t)},ro=hr,eo=Ar,no=R,oo=function(t,r,e){var n=ro(r);n in t?eo.f(t,n,no(0,e)):t[n]=e},io={};io[or("toStringTag")]="z";var uo=d,ao="[object z]"===String(io),co=Q,fo=B,so=or("toStringTag"),lo=uo.Object,po="Arguments"==fo(function(){return arguments}()),yo=_,ho=h,go=Q,bo=ao?fo:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=lo(t),so))?e:po?fo(r):"Object"==(n=fo(r))&&co(r.callee)?"Arguments":n},vo=se,wo=function(){},mo=[],Oo=rt("Reflect","construct"),So=/^\s*(?:class|function)\b/,jo=yo(So.exec),xo=!So.exec(wo),Do=function(t){if(!go(t))return!1;try{return Oo(wo,mo,t),!0}catch(t){return!1}},Po=function(t){if(!go(t))return!1;switch(bo(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xo||!!jo(So,vo(t))}catch(t){return!0}};Po.sham=!0;var Ro=!Oo||ho((function(){var t;return Do(Do.call)||!Do(Object)||!Do((function(){t=!0}))||t}))?Po:Do,To=d,Eo=to,Ao=Ro,ko=Y,Io=or("species"),_o=To.Array,Co=function(t){var r;return Eo(t)&&(r=t.constructor,(Ao(r)&&(r===_o||Eo(r.prototype))||ko(r)&&null===(r=r[Io]))&&(r=void 0)),void 0===r?_o:r},Fo=function(t,r){return new(Co(t))(0===r?0:r)},Mo=h,Bo=ft,zo=or("species"),Lo=function(t){return Bo>=51||!Mo((function(){var r=[];return(r.constructor={})[zo]=function(){return{foo:1}},1!==r[t](Boolean).foo}))},No=Jn,Go=d,$o=h,qo=to,Ho=Y,Uo=Lt,Vo=pn,Wo=oo,Ko=Fo,Qo=Lo,Xo=ft,Yo=or("isConcatSpreadable"),Jo=9007199254740991,Zo="Maximum allowed index exceeded",ti=Go.TypeError,ri=Xo>=51||!$o((function(){var t=[];return t[Yo]=!1,t.concat()[0]!==t})),ei=Qo("concat"),ni=function(t){if(!Ho(t))return!1;var r=t[Yo];return void 0!==r?!!r:qo(t)};No({target:"Array",proto:!0,arity:1,forced:!ri||!ei},{concat:function(t){var r,e,n,o,i,u=Uo(this),a=Ko(u,0),c=0;for(r=-1,n=arguments.length;r<n;r++)if(ni(i=-1===r?u:arguments[r])){if(c+(o=Vo(i))>Jo)throw ti(Zo);for(e=0;e<o;e++,c++)e in i&&Wo(a,c,i[e])}else{if(c>=Jo)throw ti(Zo);Wo(a,c++,i)}return a.length=c,a}});var oi=h,ii=Jn,ui=bn.indexOf,ai=function(t,r){var e=[][t];return!!e&&oi((function(){e.call(null,r||function(){return 1},1)}))},ci=_([].indexOf),fi=!!ci&&1/ci([1],1,-0)<0,si=ai("indexOf");ii({target:"Array",proto:!0,forced:fi||!si},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return fi?ci(this,t,r)||0:ui(this,t,r)}});var li=Jn,pi=d,di=cn,yi=nn,hi=pn,gi=Lt,bi=Fo,vi=oo,wi=Lo("splice"),mi=pi.TypeError,Oi=Math.max,Si=Math.min,ji=9007199254740991,xi="Maximum allowed length exceeded";li({target:"Array",proto:!0,forced:!wi},{splice:function(t,r){var e,n,o,i,u,a,c=gi(this),f=hi(c),s=di(t,f),l=arguments.length;if(0===l?e=n=0:1===l?(e=0,n=f-s):(e=l-2,n=Si(Oi(yi(r),0),f-s)),f+e-n>ji)throw mi(xi);for(o=bi(c,n),i=0;i<n;i++)(u=s+i)in c&&vi(o,i,c[u]);if(o.length=n,e<n){for(i=s;i<f-n;i++)a=i+e,(u=i+n)in c?c[a]=c[u]:delete c[a];for(i=f;i>f-n+e;i--)delete c[i-1]}else if(e>n)for(i=f-n;i>s;i--)a=i+e-1,(u=i+n-1)in c?c[a]=c[u]:delete c[a];for(i=0;i<e;i++)c[i+s]=arguments[i+2];return c.length=f-n+e,o}});var Di=function(t,r){return{id:"customId_".concat(r)}};e.default.extend(e.default.fn.bootstrapTable.defaults,{reorderableRows:!1,onDragStyle:null,onDropStyle:null,onDragClass:"reorder_rows_onDragClass",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}}),e.default.extend(e.default.fn.bootstrapTable.Constructor.EVENTS,{"reorder-row.bs.table":"onReorderRow"}),e.default.BootstrapTable=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&u(t,r)}(p,t);var r,a,f,l=c(p);function p(){return n(this,p),l.apply(this,arguments)}return r=p,a=[{key:"init",value:function(){for(var t,r=this,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];if(this.options.reorderableRows){this.options.useRowAttrFunc&&(this.options.rowAttributes=Di);var u=this.options.onPostBody;this.options.onPostBody=function(){setTimeout((function(){r.makeRowsReorderable(),u.call(r.options,r.options.data)}),1)},(t=s(i(p.prototype),"init",this)).call.apply(t,[this].concat(n))}else{var a;(a=s(i(p.prototype),"init",this)).call.apply(a,[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(r,e){return t.onAllowDrop(r,e)},onDragStop:function(r,e){return t.onDragStop(r,e)},onDragStart:function(r,e){return t.onDropStart(r,e)},onDrop:function(r,e){return t.onDrop(r,e)},dragHandle:this.options.dragHandle})}},{key:"onDropStart",value:function(t,r){this.$draggingTd=e.default(r).css("cursor","move"),this.draggingIndex=e.default(this.$draggingTd.parent()).data("index"),this.options.onReorderRowsDrag(this.data[this.draggingIndex])}},{key:"onDragStop",value:function(t,r){var n=e.default(r).data("index"),o=this.data[n];this.options.onDragStop(t,o,r)}},{key:"onAllowDrop",value:function(t,r){var n=e.default(r).data("index"),o=e.default(t).data("index"),i=this.data[n],u=this.data[o];return this.options.onAllowDrop(u,i,t,r)}},{key:"onDrop",value:function(t){this.$draggingTd.css("cursor","");for(var r=[],n=0;n<t.tBodies[0].rows.length;n++){var o=e.default(t.tBodies[0].rows[n]);r.push(this.data[o.data("index")]),o.data("index",n)}var i=this.data[this.draggingIndex],u=r.indexOf(this.data[this.draggingIndex]),a=this.data[u],c=this.options.data.indexOf(this.data[u]);this.options.data.splice(this.options.data.indexOf(i),1),this.options.data.splice(c,0,i),this.initSearch(),this.options.onReorderRowsDrop(a),this.trigger("reorder-row",r,i,a)}},{key:"initSearch",value:function(){this.ignoreInitSort=!0,s(i(p.prototype),"initSearch",this).call(this)}},{key:"initSort",value:function(){this.ignoreInitSort?this.ignoreInitSort=!1:s(i(p.prototype),"initSort",this).call(this)}}],a&&o(r.prototype,a),f&&o(r,f),Object.defineProperty(r,"prototype",{writable:!1}),p}(e.default.BootstrapTable)}));