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