UNPKG

14.5 kBJavaScriptView Raw
1/**
2 * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
3 *
4 * @version v1.20.1
5 * @homepage https://bootstrap-table.com
6 * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
7 * @license MIT
8 */
9
10!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: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 f(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 a(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,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}},l.apply(this,arguments)}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t,e){return t(e={exports:{}},e.exports),e.exports}var y,b,h=function(t){return t&&t.Math==Math&&t},g=h("object"==typeof globalThis&&globalThis)||h("object"==typeof window&&window)||h("object"==typeof self&&self)||h("object"==typeof s&&s)||function(){return this}()||Function("return this")(),v=function(t){try{return!!t()}catch(t){return!0}},d=!v((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),w=Function.prototype.call,O=m?w.bind(w):function(){return w.apply(w,arguments)},j={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,P={f:S&&!j.call({1:2},1)?function(t){var e=S(this,t);return!!e&&e.enumerable}:j},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},E=Function.prototype,x=E.bind,A=E.call,z=m&&x.bind(A,A),R=m?function(t){return t&&z(t)}:function(t){return t&&function(){return A.apply(t,arguments)}},_=R({}.toString),C=R("".slice),F=function(t){return C(_(t),8,-1)},k=g.Object,M=R("".split),I=v((function(){return!k("z").propertyIsEnumerable(0)}))?function(t){return"String"==F(t)?M(t,""):k(t)}:k,B=g.TypeError,D=function(t){if(null==t)throw B("Can't call method on "+t);return t},L=function(t){return I(D(t))},N=function(t){return"function"==typeof t},V=function(t){return"object"==typeof t?null!==t:N(t)},G=function(t){return N(t)?t:void 0},$=function(t,e){return arguments.length<2?G(g[t]):g[t]&&g[t][e]},q=R({}.isPrototypeOf),U=$("navigator","userAgent")||"",W=g.process,K=g.Deno,Q=W&&W.versions||K&&K.version,X=Q&&Q.v8;X&&(b=(y=X.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!b&&U&&(!(y=U.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=U.match(/Chrome\/(\d+)/))&&(b=+y[1]);var Y=b,H=!!Object.getOwnPropertySymbols&&!v((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),J=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=g.Object,tt=J?function(t){return"symbol"==typeof t}:function(t){var e=$("Symbol");return N(e)&&q(e.prototype,Z(t))},et=g.String,nt=g.TypeError,rt=function(t){if(N(t))return t;throw nt(function(t){try{return et(t)}catch(t){return"Object"}}(t)+" is not a function")},ot=g.TypeError,it=Object.defineProperty,ut=function(t,e){try{it(g,t,{value:e,configurable:!0,writable:!0})}catch(n){g[t]=e}return e},ct="__core-js_shared__",ft=g[ct]||ut(ct,{}),at=p((function(t){(t.exports=function(t,e){return ft[t]||(ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),lt=g.Object,st=function(t){return lt(D(t))},pt=R({}.hasOwnProperty),yt=Object.hasOwn||function(t,e){return pt(st(t),e)},bt=0,ht=Math.random(),gt=R(1..toString),vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+gt(++bt+ht,36)},dt=at("wks"),mt=g.Symbol,wt=mt&&mt.for,Ot=J?mt:mt&&mt.withoutSetter||vt,jt=function(t){if(!yt(dt,t)||!H&&"string"!=typeof dt[t]){var e="Symbol."+t;H&&yt(mt,t)?dt[t]=mt[t]:dt[t]=J&&wt?wt(e):Ot(e)}return dt[t]},St=g.TypeError,Pt=jt("toPrimitive"),Tt=function(t,e){if(!V(t)||tt(t))return t;var n,r,o=null==(n=t[Pt])?void 0:rt(n);if(o){if(void 0===e&&(e="default"),r=O(o,t,e),!V(r)||tt(r))return r;throw St("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&N(n=t.toString)&&!V(r=O(n,t)))return r;if(N(n=t.valueOf)&&!V(r=O(n,t)))return r;if("string"!==e&&N(n=t.toString)&&!V(r=O(n,t)))return r;throw ot("Can't convert object to primitive value")}(t,e)},Et=function(t){var e=Tt(t,"string");return tt(e)?e:e+""},xt=g.document,At=V(xt)&&V(xt.createElement),zt=!d&&!v((function(){return 7!=Object.defineProperty((t="div",At?xt.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),Rt=Object.getOwnPropertyDescriptor,_t={f:d?Rt:function(t,e){if(t=L(t),e=Et(e),zt)try{return Rt(t,e)}catch(t){}if(yt(t,e))return T(!O(P.f,t,e),t[e])}},Ct=d&&v((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ft=g.String,kt=g.TypeError,Mt=function(t){if(V(t))return t;throw kt(Ft(t)+" is not an object")},It=g.TypeError,Bt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Lt="enumerable",Nt="configurable",Vt="writable",Gt={f:d?Ct?function(t,e,n){if(Mt(t),e=Et(e),Mt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Vt in n&&!n.writable){var r=Dt(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:Nt in n?n.configurable:r.configurable,enumerable:Lt in n?n.enumerable:r.enumerable,writable:!1})}return Bt(t,e,n)}:Bt:function(t,e,n){if(Mt(t),e=Et(e),Mt(n),zt)try{return Bt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw It("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},$t=d?function(t,e,n){return Gt.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},qt=Function.prototype,Ut=d&&Object.getOwnPropertyDescriptor,Wt=yt(qt,"name"),Kt={EXISTS:Wt,PROPER:Wt&&"something"===function(){}.name,CONFIGURABLE:Wt&&(!d||d&&Ut(qt,"name").configurable)},Qt=R(Function.toString);N(ft.inspectSource)||(ft.inspectSource=function(t){return Qt(t)});var Xt,Yt,Ht,Jt,Zt=ft.inspectSource,te=g.WeakMap,ee=N(te)&&/native code/.test(Zt(te)),ne=at("keys"),re={},oe="Object already initialized",ie=g.TypeError,ue=g.WeakMap;if(ee||ft.state){var ce=ft.state||(ft.state=new ue),fe=R(ce.get),ae=R(ce.has),le=R(ce.set);Xt=function(t,e){if(ae(ce,t))throw new ie(oe);return e.facade=t,le(ce,t,e),e},Yt=function(t){return fe(ce,t)||{}},Ht=function(t){return ae(ce,t)}}else{var se=ne[Jt="state"]||(ne[Jt]=vt(Jt));re[se]=!0,Xt=function(t,e){if(yt(t,se))throw new ie(oe);return e.facade=t,$t(t,se,e),e},Yt=function(t){return yt(t,se)?t[se]:{}},Ht=function(t){return yt(t,se)}}var pe={set:Xt,get:Yt,has:Ht,enforce:function(t){return Ht(t)?Yt(t):Xt(t,{})},getterFor:function(t){return function(e){var n;if(!V(e)||(n=Yt(e)).type!==t)throw ie("Incompatible receiver, "+t+" required");return n}}},ye=p((function(t){var e=Gt.f,n=Kt.CONFIGURABLE,r=pe.enforce,o=pe.get,i=!v((function(){return 8!==e((function(){}),"length",{value:8}).length})),u=String(String).split("String"),c=t.exports=function(t,o,c){"Symbol("===String(o).slice(0,7)&&(o="["+String(o).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),c&&c.getter&&(o="get "+o),c&&c.setter&&(o="set "+o),(!yt(t,"name")||n&&t.name!==o)&&e(t,"name",{value:o,configurable:!0}),i&&c&&yt(c,"arity")&&t.length!==c.arity&&e(t,"length",{value:c.arity});var f=r(t);return yt(f,"source")||(f.source=u.join("string"==typeof o?o:"")),t};Function.prototype.toString=c((function(){return N(this)&&o(this).source||Zt(this)}),"toString")})),be=function(t,e,n,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet,c=r&&void 0!==r.name?r.name:e;return N(n)&&ye(n,c,r),t===g?(i?t[e]=n:ut(e,n),t):(o?!u&&t[e]&&(i=!0):delete t[e],i?t[e]=n:$t(t,e,n),t)},he=Math.ceil,ge=Math.floor,ve=function(t){var e=+t;return e!=e||0===e?0:(e>0?ge:he)(e)},de=Math.max,me=Math.min,we=Math.min,Oe=function(t){return(e=t.length)>0?we(ve(e),9007199254740991):0;var e},je=function(t){return function(e,n,r){var o,i=L(e),u=Oe(i),c=function(t,e){var n=ve(t);return n<0?de(n+e,0):me(n,e)}(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}},Se={includes:je(!0),indexOf:je(!1)}.indexOf,Pe=R([].push),Te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),Ee=Object.getOwnPropertyNames||function(t){return function(t,e){var n,r=L(t),o=0,i=[];for(n in r)!yt(re,n)&&yt(r,n)&&Pe(i,n);for(;e.length>o;)yt(r,n=e[o++])&&(~Se(i,n)||Pe(i,n));return i}(t,Te)},xe={f:Ee},Ae={f:Object.getOwnPropertySymbols},ze=R([].concat),Re=$("Reflect","ownKeys")||function(t){var e=xe.f(Mt(t)),n=Ae.f;return n?ze(e,n(t)):e},_e=function(t,e,n){for(var r=Re(e),o=Gt.f,i=_t.f,u=0;u<r.length;u++){var c=r[u];yt(t,c)||n&&yt(n,c)||o(t,c,i(e,c))}},Ce=/#|\.prototype\./,Fe=function(t,e){var n=Me[ke(t)];return n==Be||n!=Ie&&(N(e)?v(e):!!e)},ke=Fe.normalize=function(t){return String(t).replace(Ce,".").toLowerCase()},Me=Fe.data={},Ie=Fe.NATIVE="N",Be=Fe.POLYFILL="P",De=Fe,Le=_t.f,Ne=Array.isArray||function(t){return"Array"==F(t)},Ve=function(t,e,n){var r=Et(e);r in t?Gt.f(t,r,T(0,n)):t[r]=n},Ge={};Ge[jt("toStringTag")]="z";var $e="[object z]"===String(Ge),qe=jt("toStringTag"),Ue=g.Object,We="Arguments"==F(function(){return arguments}()),Ke=$e?F: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=Ue(t),qe))?n:We?F(e):"Object"==(r=F(e))&&N(e.callee)?"Arguments":r},Qe=function(){},Xe=[],Ye=$("Reflect","construct"),He=/^\s*(?:class|function)\b/,Je=R(He.exec),Ze=!He.exec(Qe),tn=function(t){if(!N(t))return!1;try{return Ye(Qe,Xe,t),!0}catch(t){return!1}},en=function(t){if(!N(t))return!1;switch(Ke(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ze||!!Je(He,Zt(t))}catch(t){return!0}};en.sham=!0;var nn,rn=!Ye||v((function(){var t;return tn(tn.call)||!tn(Object)||!tn((function(){t=!0}))||t}))?en:tn,on=jt("species"),un=g.Array,cn=function(t,e){return new(function(t){var e;return Ne(t)&&(e=t.constructor,(rn(e)&&(e===un||Ne(e.prototype))||V(e)&&null===(e=e[on]))&&(e=void 0)),void 0===e?un:e}(t))(0===e?0:e)},fn=jt("species"),an=jt("isConcatSpreadable"),ln=9007199254740991,sn="Maximum allowed index exceeded",pn=g.TypeError,yn=Y>=51||!v((function(){var t=[];return t[an]=!1,t.concat()[0]!==t})),bn=(nn="concat",Y>=51||!v((function(){var t=[];return(t.constructor={})[fn]=function(){return{foo:1}},1!==t[nn](Boolean).foo}))),hn=function(t){if(!V(t))return!1;var e=t[an];return void 0!==e?!!e:Ne(t)};!function(t,e){var n,r,o,i,u,c=t.target,f=t.global,a=t.stat;if(n=f?g:a?g[c]||ut(c,{}):(g[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=Le(n,r))&&u.value:n[r],!De(f?r:c+(a?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;_e(i,o)}(t.sham||o&&o.sham)&&$t(i,"sham",!0),be(n,r,i,t)}}({target:"Array",proto:!0,arity:1,forced:!yn||!bn},{concat:function(t){var e,n,r,o,i,u=st(this),c=cn(u,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(hn(i=-1===e?u:arguments[e])){if(f+(o=Oe(i))>ln)throw pn(sn);for(n=0;n<o;n++,f++)n in i&&Ve(c,f,i[n])}else{if(f>=ln)throw pn(sn);Ve(c,f++,i)}return c.length=f,c}});var gn=function(t){return void 0!==t.$el.data("resizableColumns")},vn=function(t){t.options.resizable&&!t.options.cardView&&!gn(t)&&t.$el.is(":visible")&&t.$el.resizableColumns({store:window.store})},dn=function(t){gn(t)&&t.$el.data("resizableColumns").destroy()},mn=function(t){dn(t),vn(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,a=f(s);function s(){return r(this,s),a.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(){mn(e)})),mn(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&&dn(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(){vn(e)}),100)}}],n&&o(e.prototype,n),c&&o(e,c),Object.defineProperty(e,"prototype",{writable:!1}),s}(n.default.BootstrapTable)}));