UNPKG

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