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