UNPKG

12.9 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.15.5
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=t||self).jQuery)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e){return t(e={exports:{}},e.exports),e.exports}var r,o,i,u="object",c=function(t){return t&&t.Math==Math&&t},f=c(typeof globalThis==u&&globalThis)||c(typeof window==u&&window)||c(typeof self==u&&self)||c(typeof e==u&&e)||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},s=!a((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,h={f:p&&!l.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:l},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d={}.toString,b=function(t){return d.call(t).slice(8,-1)},v="".split,g=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==b(t)?v.call(t,""):Object(t)}:Object,m=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},w=function(t){return g(m(t))},O=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=function(t,e){if(!O(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!O(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!O(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!O(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},S={}.hasOwnProperty,R=function(t,e){return S.call(t,e)},T=f.document,P=O(T)&&O(T.createElement),x=function(t){return P?T.createElement(t):{}},A=!s&&!a((function(){return 7!=Object.defineProperty(x("div"),"a",{get:function(){return 7}}).a})),_=Object.getOwnPropertyDescriptor,E={f:s?_:function(t,e){if(t=w(t),e=j(e,!0),A)try{return _(t,e)}catch(t){}if(R(t,e))return y(!h.f.call(t,e),t[e])}},I=function(t){if(!O(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,M={f:s?k:function(t,e,n){if(I(t),e=j(e,!0),I(n),A)try{return k(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},F=s?function(t,e,n){return M.f(t,e,y(1,n))}:function(t,e,n){return t[e]=n,t},C=function(t,e){try{F(f,t,e)}catch(n){f[t]=e}return e},B=n((function(t){var e=f["__core-js_shared__"]||C("__core-js_shared__",{});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.1.3",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),L=B("native-function-to-string",Function.toString),N=f.WeakMap,q="function"==typeof N&&/native code/.test(L.call(N)),z=0,D=Math.random(),W=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++z+D).toString(36)},$=B("keys"),G=function(t){return $[t]||($[t]=W(t))},K={},Q=f.WeakMap;if(q){var V=new Q,Y=V.get,H=V.has,J=V.set;r=function(t,e){return J.call(V,t,e),e},o=function(t){return Y.call(V,t)||{}},i=function(t){return H.call(V,t)}}else{var U=G("state");K[U]=!0,r=function(t,e){return F(t,U,e),e},o=function(t){return R(t,U)?t[U]:{}},i=function(t){return R(t,U)}}var X,Z={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!O(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},tt=n((function(t){var e=Z.get,n=Z.enforce,r=String(L).split("toString");B("inspectSource",(function(t){return L.call(t)})),(t.exports=function(t,e,o,i){var u=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,a=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||R(o,"name")||F(o,"name",e),n(o).source=r.join("string"==typeof e?e:"")),t!==f?(u?!a&&t[e]&&(c=!0):delete t[e],c?t[e]=o:F(t,e,o)):c?t[e]=o:C(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||L.call(this)}))})),et=f,nt=function(t){return"function"==typeof t?t:void 0},rt=function(t,e){return arguments.length<2?nt(et[t])||nt(f[t]):et[t]&&et[t][e]||f[t]&&f[t][e]},ot=Math.ceil,it=Math.floor,ut=function(t){return isNaN(t=+t)?0:(t>0?it:ot)(t)},ct=Math.min,ft=function(t){return t>0?ct(ut(t),9007199254740991):0},at=Math.max,st=Math.min,lt=function(t){return function(e,n,r){var o,i=w(e),u=ft(i.length),c=function(t,e){var n=ut(t);return n<0?at(n+e,0):st(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}},pt={includes:lt(!0),indexOf:lt(!1)}.indexOf,ht=function(t,e){var n,r=w(t),o=0,i=[];for(n in r)!R(K,n)&&R(r,n)&&i.push(n);for(;e.length>o;)R(r,n=e[o++])&&(~pt(i,n)||i.push(n));return i},yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dt=yt.concat("length","prototype"),bt={f:Object.getOwnPropertyNames||function(t){return ht(t,dt)}},vt={f:Object.getOwnPropertySymbols},gt=rt("Reflect","ownKeys")||function(t){var e=bt.f(I(t)),n=vt.f;return n?e.concat(n(t)):e},mt=function(t,e){for(var n=gt(e),r=M.f,o=E.f,i=0;i<n.length;i++){var u=n[i];R(t,u)||r(t,u,o(e,u))}},wt=/#|\.prototype\./,Ot=function(t,e){var n=St[jt(t)];return n==Tt||n!=Rt&&("function"==typeof e?a(e):!!e)},jt=Ot.normalize=function(t){return String(t).replace(wt,".").toLowerCase()},St=Ot.data={},Rt=Ot.NATIVE="N",Tt=Ot.POLYFILL="P",Pt=Ot,xt=E.f,At=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,s=t.stat;if(n=a?f:s?f[c]||C(c,{}):(f[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=xt(n,r))&&u.value:n[r],!Pt(a?r:c+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;mt(i,o)}(t.sham||o&&o.sham)&&F(i,"sham",!0),tt(n,r,i,t)}},_t=Array.isArray||function(t){return"Array"==b(t)},Et=function(t){return Object(m(t))},It=function(t,e,n){var r=j(e);r in t?M.f(t,r,y(0,n)):t[r]=n},kt=!!Object.getOwnPropertySymbols&&!a((function(){return!String(Symbol())})),Mt=f.Symbol,Ft=B("wks"),Ct=function(t){return Ft[t]||(Ft[t]=kt&&Mt[t]||(kt?Mt:W)("Symbol."+t))},Bt=Ct("species"),Lt=function(t,e){var n;return _t(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!_t(n.prototype)?O(n)&&null===(n=n[Bt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},Nt=Ct("species"),qt=Ct("isConcatSpreadable"),zt=!a((function(){var t=[];return t[qt]=!1,t.concat()[0]!==t})),Dt=(X="concat",!a((function(){var t=[];return(t.constructor={})[Nt]=function(){return{foo:1}},1!==t[X](Boolean).foo}))),Wt=function(t){if(!O(t))return!1;var e=t[qt];return void 0!==e?!!e:_t(t)};At({target:"Array",proto:!0,forced:!zt||!Dt},{concat:function(t){var e,n,r,o,i,u=Et(this),c=Lt(u,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(i=-1===e?u:arguments[e],Wt(i)){if(f+(o=ft(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,f++)n in i&&It(c,f,i[n])}else{if(f>=9007199254740991)throw TypeError("Maximum allowed index exceeded");It(c,f++,i)}return c.length=f,c}});var $t=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Gt=[].push,Kt=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=5==t||i;return function(c,f,a,s){for(var l,p,h=Et(c),y=g(h),d=$t(f,a,3),b=ft(y.length),v=0,m=s||Lt,w=e?m(c,b):n?m(c,0):void 0;b>v;v++)if((u||v in y)&&(p=d(l=y[v],v,h),t))if(e)w[v]=p;else if(p)switch(t){case 3:return!0;case 5:return l;case 6:return v;case 2:Gt.call(w,l)}else if(o)return!1;return i?-1:r||o?o:w}},Qt={forEach:Kt(0),map:Kt(1),filter:Kt(2),some:Kt(3),every:Kt(4),find:Kt(5),findIndex:Kt(6)},Vt=Object.keys||function(t){return ht(t,yt)},Yt=s?Object.defineProperties:function(t,e){I(t);for(var n,r=Vt(e),o=r.length,i=0;o>i;)M.f(t,n=r[i++],e[n]);return t},Ht=rt("document","documentElement"),Jt=G("IE_PROTO"),Ut=function(){},Xt=function(){var t,e=x("iframe"),n=yt.length;for(e.style.display="none",Ht.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Xt=t.F;n--;)delete Xt.prototype[yt[n]];return Xt()},Zt=Object.create||function(t,e){var n;return null!==t?(Ut.prototype=I(t),n=new Ut,Ut.prototype=null,n[Jt]=t):n=Xt(),void 0===e?n:Yt(n,e)};K[Jt]=!0;var te=Ct("unscopables"),ee=Array.prototype;null==ee[te]&&F(ee,te,Zt(null));var ne,re=Qt.find,oe=!0;function ie(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 ue(t){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ce(t,e){return(ce=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fe(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ae(t,e,n){return(ae="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ue(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}"find"in[]&&Array(1).find((function(){oe=!1})),At({target:"Array",proto:!0,forced:oe},{find:function(t){return re(this,t,arguments.length>1?arguments[1]:void 0)}}),ne="find",ee[te][ne]=!0;var se=t.fn.bootstrapTable.utils;t.extend(t.fn.bootstrapTable.defaults,{autoRefresh:!1,autoRefreshInterval:60,autoRefreshSilent:!0,autoRefreshStatus:!0,autoRefreshFunction:null}),t.extend(t.fn.bootstrapTable.defaults.icons,{autoRefresh:{bootstrap3:"glyphicon-time icon-time",materialize:"access_time"}[t.fn.bootstrapTable.theme]||"fa-clock"}),t.extend(t.fn.bootstrapTable.locales,{formatAutoRefresh:function(){return"Auto Refresh"}}),t.extend(t.fn.bootstrapTable.defaults,t.fn.bootstrapTable.locales),t.BootstrapTable=function(e){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),fe(this,ue(n).apply(this,arguments))}var r,o,i;return 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}}),e&&ce(t,e)}(n,e),r=n,(o=[{key:"init",value:function(){for(var t,e=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];(t=ae(ue(n.prototype),"init",this)).call.apply(t,[this].concat(o)),this.options.autoRefresh&&this.options.autoRefreshStatus&&(this.options.autoRefreshFunction=setInterval((function(){e.refresh({silent:e.options.autoRefreshSilent})}),1e3*this.options.autoRefreshInterval))}},{key:"initToolbar",value:function(){for(var e,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];if((e=ae(ue(n.prototype),"initToolbar",this)).call.apply(e,[this].concat(o)),this.options.autoRefresh){var u=this.$toolbar.find(">.columns"),c=u.find(".auto-refresh");c.length||(c=t('\n <button class="auto-refresh '.concat(this.constants.buttonsClass,"\n ").concat(this.options.autoRefreshStatus?" ".concat(this.constants.classes.buttonActive):"",'"\n type="button" title="').concat(this.options.formatAutoRefresh(),'">\n ').concat(this.options.showButtonIcons?se.sprintf(this.constants.html.icon,this.options.iconsPrefix,this.options.icons.autoRefresh):"","\n ").concat(this.options.showButtonText?this.options.formatAutoRefresh():"","\n </button>\n ")).appendTo(u)).on("click",t.proxy(this.toggleAutoRefresh,this))}}},{key:"toggleAutoRefresh",value:function(){var t=this;this.options.autoRefresh&&(this.options.autoRefreshStatus?(clearInterval(this.options.autoRefreshFunction),this.$toolbar.find(">.columns").find(".auto-refresh").removeClass(this.constants.classes.buttonActive)):(this.options.autoRefreshFunction=setInterval((function(){t.refresh({silent:t.options.autoRefreshSilent})}),1e3*this.options.autoRefreshInterval),this.$toolbar.find(">.columns").find(".auto-refresh").addClass(this.constants.classes.buttonActive)),this.options.autoRefreshStatus=!this.options.autoRefreshStatus)}}])&&ie(r.prototype,o),i&&ie(r,i),n}(t.BootstrapTable)}));