UNPKG

12.4 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.18.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,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n((t=t||self).jQuery)}(this,(function(t){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,n){return t(n={exports:{}},n.exports),n.exports}var r=function(t){return t&&t.Math==Math&&t},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},c=!i((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,f={f:a&&!u.call({1:2},1)?function(t){var n=a(this,t);return!!n&&n.enumerable}:u},l=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},s={}.toString,p=function(t){return s.call(t).slice(8,-1)},d="".split,y=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return y(h(t))},v=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t,n){if(!v(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!v(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!v(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!v(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,m=function(t,n){return w.call(t,n)},O=o.document,j=v(O)&&v(O.createElement),S=function(t){return j?O.createElement(t):{}},P=!c&&!i((function(){return 7!=Object.defineProperty(S("div"),"a",{get:function(){return 7}}).a})),T=Object.getOwnPropertyDescriptor,E={f:c?T:function(t,n){if(t=g(t),n=b(n,!0),P)try{return T(t,n)}catch(t){}if(m(t,n))return l(!f.f.call(t,n),t[n])}},k=function(t){if(!v(t))throw TypeError(String(t)+" is not an object");return t},x=Object.defineProperty,_={f:c?x:function(t,n,e){if(k(t),n=b(n,!0),k(e),P)try{return x(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},A=c?function(t,n,e){return _.f(t,n,l(1,e))}:function(t,n,e){return t[n]=e,t},C=function(t,n){try{A(o,t,n)}catch(e){o[t]=n}return n},M="__core-js_shared__",D=o[M]||C(M,{}),I=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(t){return I.call(t)});var F,R,z,L=D.inspectSource,N=o.WeakMap,q="function"==typeof N&&/native code/.test(L(N)),W=e((function(t){(t.exports=function(t,n){return D[t]||(D[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.6.0",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),G=0,B=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+B).toString(36)},Q=W("keys"),U=function(t){return Q[t]||(Q[t]=K(t))},V={},X=o.WeakMap;if(q){var Y=new X,$=Y.get,H=Y.has,J=Y.set;F=function(t,n){return J.call(Y,t,n),n},R=function(t){return $.call(Y,t)||{}},z=function(t){return H.call(Y,t)}}else{var Z=U("state");V[Z]=!0,F=function(t,n){return A(t,Z,n),n},R=function(t){return m(t,Z)?t[Z]:{}},z=function(t){return m(t,Z)}}var tt,nt={set:F,get:R,has:z,enforce:function(t){return z(t)?R(t):F(t,{})},getterFor:function(t){return function(n){var e;if(!v(n)||(e=R(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}},et=e((function(t){var n=nt.get,e=nt.enforce,r=String(String).split("String");(t.exports=function(t,n,i,c){var u=!!c&&!!c.unsafe,a=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof n||m(i,"name")||A(i,"name",n),e(i).source=r.join("string"==typeof n?n:"")),t!==o?(u?!f&&t[n]&&(a=!0):delete t[n],a?t[n]=i:A(t,n,i)):a?t[n]=i:C(n,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&n(this).source||L(this)}))})),rt=o,ot=function(t){return"function"==typeof t?t:void 0},it=function(t,n){return arguments.length<2?ot(rt[t])||ot(o[t]):rt[t]&&rt[t][n]||o[t]&&o[t][n]},ct=Math.ceil,ut=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ut:ct)(t)},ft=Math.min,lt=function(t){return t>0?ft(at(t),9007199254740991):0},st=Math.max,pt=Math.min,dt=function(t){return function(n,e,r){var o,i=g(n),c=lt(i.length),u=function(t,n){var e=at(t);return e<0?st(e+n,0):pt(e,n)}(r,c);if(t&&e!=e){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((t||u in i)&&i[u]===e)return t||u||0;return!t&&-1}},yt={includes:dt(!0),indexOf:dt(!1)},ht=yt.indexOf,gt=function(t,n){var e,r=g(t),o=0,i=[];for(e in r)!m(V,e)&&m(r,e)&&i.push(e);for(;n.length>o;)m(r,e=n[o++])&&(~ht(i,e)||i.push(e));return i},vt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=vt.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(t){return gt(t,bt)}},mt={f:Object.getOwnPropertySymbols},Ot=it("Reflect","ownKeys")||function(t){var n=wt.f(k(t)),e=mt.f;return e?n.concat(e(t)):n},jt=function(t,n){for(var e=Ot(n),r=_.f,o=E.f,i=0;i<e.length;i++){var c=e[i];m(t,c)||r(t,c,o(n,c))}},St=/#|\.prototype\./,Pt=function(t,n){var e=Et[Tt(t)];return e==xt||e!=kt&&("function"==typeof n?i(n):!!n)},Tt=Pt.normalize=function(t){return String(t).replace(St,".").toLowerCase()},Et=Pt.data={},kt=Pt.NATIVE="N",xt=Pt.POLYFILL="P",_t=Pt,At=E.f,Ct=function(t,n){var e,r,i,c,u,a=t.target,f=t.global,l=t.stat;if(e=f?o:l?o[a]||C(a,{}):(o[a]||{}).prototype)for(r in n){if(c=n[r],i=t.noTargetGet?(u=At(e,r))&&u.value:e[r],!_t(f?r:a+(l?".":"#")+r,t.forced)&&void 0!==i){if(typeof c==typeof i)continue;jt(c,i)}(t.sham||i&&i.sham)&&A(c,"sham",!0),et(e,r,c,t)}},Mt=function(t,n,e){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}},Dt=Array.isArray||function(t){return"Array"==p(t)},It=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Ft=It&&!Symbol.sham&&"symbol"==typeof Symbol(),Rt=W("wks"),zt=o.Symbol,Lt=Ft?zt:K,Nt=function(t){return m(Rt,t)||(It&&m(zt,t)?Rt[t]=zt[t]:Rt[t]=Lt("Symbol."+t)),Rt[t]},qt=Nt("species"),Wt=function(t,n){var e;return Dt(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Dt(e.prototype)?v(e)&&null===(e=e[qt])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)},Gt=[].push,Bt=function(t){var n=1==t,e=2==t,r=3==t,o=4==t,i=6==t,c=5==t||i;return function(u,a,f,l){for(var s,p,d=Object(h(u)),g=y(d),v=Mt(a,f,3),b=lt(g.length),w=0,m=l||Wt,O=n?m(u,b):e?m(u,0):void 0;b>w;w++)if((c||w in g)&&(p=v(s=g[w],w,d),t))if(n)O[w]=p;else if(p)switch(t){case 3:return!0;case 5:return s;case 6:return w;case 2:Gt.call(O,s)}else if(o)return!1;return i?-1:r||o?o:O}},Kt={forEach:Bt(0),map:Bt(1),filter:Bt(2),some:Bt(3),every:Bt(4),find:Bt(5),findIndex:Bt(6)},Qt=Object.keys||function(t){return gt(t,vt)},Ut=c?Object.defineProperties:function(t,n){k(t);for(var e,r=Qt(n),o=r.length,i=0;o>i;)_.f(t,e=r[i++],n[e]);return t},Vt=it("document","documentElement"),Xt=U("IE_PROTO"),Yt=function(){},$t=function(t){return"<script>"+t+"</"+"script>"},Ht=function(){try{tt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Ht=tt?function(t){t.write($t("")),t.close();var n=t.parentWindow.Object;return t=null,n}(tt):((n=S("iframe")).style.display="none",Vt.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write($t("document.F=Object")),t.close(),t.F);for(var e=vt.length;e--;)delete Ht.prototype[vt[e]];return Ht()};V[Xt]=!0;var Jt=Object.create||function(t,n){var e;return null!==t?(Yt.prototype=k(t),e=new Yt,Yt.prototype=null,e[Xt]=t):e=Ht(),void 0===n?e:Ut(e,n)},Zt=Nt("unscopables"),tn=Array.prototype;null==tn[Zt]&&_.f(tn,Zt,{configurable:!0,value:Jt(null)});var nn=function(t){tn[Zt][t]=!0},en=Kt.find,rn="find",on=!0;rn in[]&&Array(1).find((function(){on=!1})),Ct({target:"Array",proto:!0,forced:on},{find:function(t){return en(this,t,arguments.length>1?arguments[1]:void 0)}}),nn(rn);var cn=yt.includes;Ct({target:"Array",proto:!0},{includes:function(t){return cn(this,t,arguments.length>1?arguments[1]:void 0)}}),nn("includes");var un=Nt("match"),an=function(t){if(function(t){var n;return v(t)&&(void 0!==(n=t[un])?!!n:"RegExp"==p(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},fn=Nt("match");function ln(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function sn(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pn(t){return(pn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dn(t,n){return(dn=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function yn(t,n){return!n||"object"!=typeof n&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function hn(t,n,e){return(hn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,n,e){var r=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=pn(t)););return t}(t,n);if(r){var o=Object.getOwnPropertyDescriptor(r,n);return o.get?o.get.call(e):o.value}})(t,n,e||t)}Ct({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[fn]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(h(this)).indexOf(an(t),arguments.length>1?arguments[1]:void 0)}}),t.fn.bootstrapTable.theme="bootstrap-table",t.extend(t.fn.bootstrapTable.defaults,{iconsPrefix:"icon",icons:{paginationSwitchDown:"icon-arrow-up-circle",paginationSwitchUp:"icon-arrow-down-circle",refresh:"icon-refresh-cw",toggleOff:"icon-toggle-right",toggleOn:"icon-toggle-right",columns:"icon-list",detailOpen:"icon-plus",detailClose:"icon-minus",fullscreen:"icon-maximize",search:"icon-search",clearSearch:"icon-trash-2"}}),t.BootstrapTable=function(n){function e(){return ln(this,e),yn(this,pn(e).apply(this,arguments))}var r,o,i;return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&dn(t,n)}(e,n),r=e,(o=[{key:"init",value:function(){hn(pn(e.prototype),"init",this).call(this),this.constants.classes.dropup="dropdown-menu-up",t(".modal").on("click","[data-close]",(function(n){t(n.delegateTarget).removeClass("show")}))}},{key:"initConstants",value:function(){hn(pn(e.prototype),"initConstants",this).call(this),this.constants.html.inputGroup='<div class="input-group">%s%s</div>'}},{key:"initToolbar",value:function(){hn(pn(e.prototype),"initToolbar",this).call(this),this.handleToolbar()}},{key:"handleToolbar",value:function(){this.$toolbar.find(".dropdown-toggle").length&&this._initDropdown()}},{key:"initPagination",value:function(){hn(pn(e.prototype),"initPagination",this).call(this),this.options.pagination&&this.paginationParts.includes("pageSize")&&this._initDropdown()}},{key:"_initDropdown",value:function(){t(".dropdown-toggle").off("click").on("click",(function(n){var e=t(n.currentTarget);e.parents(".dropdown-toggle").length>0&&(e=e.parents(".dropdown-toggle")),e.next(".dropdown-menu").toggleClass("open")})),t(window).off("click").on("click",(function(n){var e=t(".dropdown-toggle");0!==t(n.target).parents(".dropdown-toggle, .dropdown-menu").length||t(n.target).hasClass("dropdown-toggle")||e.next(".dropdown-menu").removeClass("open")}))}}])&&sn(r.prototype,o),i&&sn(r,i),e}(t.BootstrapTable)}));