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