UNPKG

13.3 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.19.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="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=n(t);function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function o(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 i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,n){return(u=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function c(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 a(t){var n=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 e,r=i(t);if(n){var o=i(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return c(this,e)}}function f(t,n,e){return(f="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=i(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)}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(t,n){return t(n={exports:{}},n.exports),n.exports}var p=function(t){return t&&t.Math==Math&&t},d=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")(),h=function(t){try{return!!t()}catch(t){return!0}},y=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),b={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,g={f:v&&!b.call({1:2},1)?function(t){var n=v(this,t);return!!n&&n.enumerable}:b},m=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},w={}.toString,O=function(t){return w.call(t).slice(8,-1)},j="".split,S=h((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==O(t)?j.call(t,""):Object(t)}:Object,P=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},T=function(t){return S(P(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},x=function(t,n){if(!E(t))return t;var e,r;if(n&&"function"==typeof(e=t.toString)&&!E(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!E(r=e.call(t)))return r;if(!n&&"function"==typeof(e=t.toString)&&!E(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")},_={}.hasOwnProperty,k=function(t,n){return _.call(t,n)},A=d.document,R=E(A)&&E(A.createElement),D=function(t){return R?A.createElement(t):{}},I=!y&&!h((function(){return 7!=Object.defineProperty(D("div"),"a",{get:function(){return 7}}).a})),C=Object.getOwnPropertyDescriptor,M={f:y?C:function(t,n){if(t=T(t),n=x(n,!0),I)try{return C(t,n)}catch(t){}if(k(t,n))return m(!g.f.call(t,n),t[n])}},F=function(t){if(!E(t))throw TypeError(String(t)+" is not an object");return t},G=Object.defineProperty,L={f:y?G:function(t,n,e){if(F(t),n=x(n,!0),F(e),I)try{return G(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}},N=y?function(t,n,e){return L.f(t,n,m(1,e))}:function(t,n,e){return t[n]=e,t},q=function(t,n){try{N(d,t,n)}catch(e){d[t]=n}return n},z="__core-js_shared__",B=d[z]||q(z,{}),W=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(t){return W.call(t)});var $,K,Q,V=B.inspectSource,X=d.WeakMap,Y="function"==typeof X&&/native code/.test(V(X)),H=l((function(t){(t.exports=function(t,n){return B[t]||(B[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.10.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),J=0,U=Math.random(),Z=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++J+U).toString(36)},tt=H("keys"),nt=function(t){return tt[t]||(tt[t]=Z(t))},et={},rt=d.WeakMap;if(Y){var ot=B.state||(B.state=new rt),it=ot.get,ut=ot.has,ct=ot.set;$=function(t,n){return n.facade=t,ct.call(ot,t,n),n},K=function(t){return it.call(ot,t)||{}},Q=function(t){return ut.call(ot,t)}}else{var at=nt("state");et[at]=!0,$=function(t,n){return n.facade=t,N(t,at,n),n},K=function(t){return k(t,at)?t[at]:{}},Q=function(t){return k(t,at)}}var ft,st,lt={set:$,get:K,has:Q,enforce:function(t){return Q(t)?K(t):$(t,{})},getterFor:function(t){return function(n){var e;if(!E(n)||(e=K(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}},pt=l((function(t){var n=lt.get,e=lt.enforce,r=String(String).split("String");(t.exports=function(t,n,o,i){var u,c=!!i&&!!i.unsafe,a=!!i&&!!i.enumerable,f=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof n||k(o,"name")||N(o,"name",n),(u=e(o)).source||(u.source=r.join("string"==typeof n?n:""))),t!==d?(c?!f&&t[n]&&(a=!0):delete t[n],a?t[n]=o:N(t,n,o)):a?t[n]=o:q(n,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&n(this).source||V(this)}))})),dt=d,ht=function(t){return"function"==typeof t?t:void 0},yt=function(t,n){return arguments.length<2?ht(dt[t])||ht(d[t]):dt[t]&&dt[t][n]||d[t]&&d[t][n]},bt=Math.ceil,vt=Math.floor,gt=function(t){return isNaN(t=+t)?0:(t>0?vt:bt)(t)},mt=Math.min,wt=function(t){return t>0?mt(gt(t),9007199254740991):0},Ot=Math.max,jt=Math.min,St=function(t){return function(n,e,r){var o,i=T(n),u=wt(i.length),c=function(t,n){var e=gt(t);return e<0?Ot(e+n,0):jt(e,n)}(r,u);if(t&&e!=e){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===e)return t||c||0;return!t&&-1}},Pt={includes:St(!0),indexOf:St(!1)},Tt=Pt.indexOf,Et=function(t,n){var e,r=T(t),o=0,i=[];for(e in r)!k(et,e)&&k(r,e)&&i.push(e);for(;n.length>o;)k(r,e=n[o++])&&(~Tt(i,e)||i.push(e));return i},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_t=xt.concat("length","prototype"),kt={f:Object.getOwnPropertyNames||function(t){return Et(t,_t)}},At={f:Object.getOwnPropertySymbols},Rt=yt("Reflect","ownKeys")||function(t){var n=kt.f(F(t)),e=At.f;return e?n.concat(e(t)):n},Dt=function(t,n){for(var e=Rt(n),r=L.f,o=M.f,i=0;i<e.length;i++){var u=e[i];k(t,u)||r(t,u,o(n,u))}},It=/#|\.prototype\./,Ct=function(t,n){var e=Ft[Mt(t)];return e==Lt||e!=Gt&&("function"==typeof n?h(n):!!n)},Mt=Ct.normalize=function(t){return String(t).replace(It,".").toLowerCase()},Ft=Ct.data={},Gt=Ct.NATIVE="N",Lt=Ct.POLYFILL="P",Nt=Ct,qt=M.f,zt=function(t,n){var e,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(e=a?d:f?d[c]||q(c,{}):(d[c]||{}).prototype)for(r in n){if(i=n[r],o=t.noTargetGet?(u=qt(e,r))&&u.value:e[r],!Nt(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Dt(i,o)}(t.sham||o&&o.sham)&&N(i,"sham",!0),pt(e,r,i,t)}},Bt=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)}},Wt=Array.isArray||function(t){return"Array"==O(t)},$t="process"==O(d.process),Kt=yt("navigator","userAgent")||"",Qt=d.process,Vt=Qt&&Qt.versions,Xt=Vt&&Vt.v8;Xt?st=(ft=Xt.split("."))[0]+ft[1]:Kt&&(!(ft=Kt.match(/Edge\/(\d+)/))||ft[1]>=74)&&(ft=Kt.match(/Chrome\/(\d+)/))&&(st=ft[1]);var Yt,Ht=st&&+st,Jt=!!Object.getOwnPropertySymbols&&!h((function(){return!Symbol.sham&&($t?38===Ht:Ht>37&&Ht<41)})),Ut=Jt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zt=H("wks"),tn=d.Symbol,nn=Ut?tn:tn&&tn.withoutSetter||Z,en=function(t){return k(Zt,t)&&(Jt||"string"==typeof Zt[t])||(Jt&&k(tn,t)?Zt[t]=tn[t]:Zt[t]=nn("Symbol."+t)),Zt[t]},rn=en("species"),on=function(t,n){var e;return Wt(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Wt(e.prototype)?E(e)&&null===(e=e[rn])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)},un=[].push,cn=function(t){var n=1==t,e=2==t,r=3==t,o=4==t,i=6==t,u=7==t,c=5==t||i;return function(a,f,s,l){for(var p,d,h=Object(P(a)),y=S(h),b=Bt(f,s,3),v=wt(y.length),g=0,m=l||on,w=n?m(a,v):e||u?m(a,0):void 0;v>g;g++)if((c||g in y)&&(d=b(p=y[g],g,h),t))if(n)w[g]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:un.call(w,p)}else switch(t){case 4:return!1;case 7:un.call(w,p)}return i?-1:r||o?o:w}},an={forEach:cn(0),map:cn(1),filter:cn(2),some:cn(3),every:cn(4),find:cn(5),findIndex:cn(6),filterOut:cn(7)},fn=Object.keys||function(t){return Et(t,xt)},sn=y?Object.defineProperties:function(t,n){F(t);for(var e,r=fn(n),o=r.length,i=0;o>i;)L.f(t,e=r[i++],n[e]);return t},ln=yt("document","documentElement"),pn=nt("IE_PROTO"),dn=function(){},hn=function(t){return"<script>"+t+"</"+"script>"},yn=function(){try{Yt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;yn=Yt?function(t){t.write(hn("")),t.close();var n=t.parentWindow.Object;return t=null,n}(Yt):((n=D("iframe")).style.display="none",ln.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(hn("document.F=Object")),t.close(),t.F);for(var e=xt.length;e--;)delete yn.prototype[xt[e]];return yn()};et[pn]=!0;var bn=Object.create||function(t,n){var e;return null!==t?(dn.prototype=F(t),e=new dn,dn.prototype=null,e[pn]=t):e=yn(),void 0===n?e:sn(e,n)},vn=en("unscopables"),gn=Array.prototype;null==gn[vn]&&L.f(gn,vn,{configurable:!0,value:bn(null)});var mn=function(t){gn[vn][t]=!0},wn=an.find,On="find",jn=!0;On in[]&&Array(1).find((function(){jn=!1})),zt({target:"Array",proto:!0,forced:jn},{find:function(t){return wn(this,t,arguments.length>1?arguments[1]:void 0)}}),mn(On);var Sn=Pt.includes;zt({target:"Array",proto:!0},{includes:function(t){return Sn(this,t,arguments.length>1?arguments[1]:void 0)}}),mn("includes");var Pn=en("match"),Tn=function(t){if(function(t){var n;return E(t)&&(void 0!==(n=t[Pn])?!!n:"RegExp"==O(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},En=en("match");zt({target:"String",proto:!0,forced:!function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[En]=!1,"/./"[t](n)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(P(this)).indexOf(Tn(t),arguments.length>1?arguments[1]:void 0)}}),e.default.extend(e.default.fn.bootstrapTable.defaults,{classes:"ui selectable celled table unstackable",buttonsPrefix:"",buttonsClass:"ui button"}),e.default.fn.bootstrapTable.theme="semantic",e.default.BootstrapTable=function(t){!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&&u(t,n)}(l,t);var n,e,c,s=a(l);function l(){return r(this,l),s.apply(this,arguments)}return n=l,(e=[{key:"initConstants",value:function(){f(i(l.prototype),"initConstants",this).call(this),this.constants.classes.buttonsGroup="ui buttons",this.constants.classes.buttonsDropdown="ui button dropdown",this.constants.classes.inputGroup="ui input",this.constants.classes.paginationDropdown="ui dropdown",this.constants.html.toolbarDropdown=['<div class="menu">',"</div>"],this.constants.html.toolbarDropdownItem='<label class="item dropdown-item-marker">%s</label>',this.constants.html.toolbarDropdownSeparator='<div class="divider"></div>',this.constants.html.pageDropdown=['<div class="menu">',"</div>"],this.constants.html.pageDropdownItem='<a class="item %s" href="#">%s</a>',this.constants.html.dropdownCaret='<i class="dropdown icon"></i>',this.constants.html.pagination=['<div class="ui pagination menu%s">',"</div>"],this.constants.html.paginationItem='<a class="page-item item%s" aria-label="%s" href="#">%s</a>',this.constants.html.inputGroup='<div class="ui action input">%s%s</div>'}},{key:"initToolbar",value:function(){f(i(l.prototype),"initToolbar",this).call(this),this.handleToolbar()}},{key:"handleToolbar",value:function(){this.$toolbar.find(".button.dropdown").dropdown()}},{key:"initPagination",value:function(){f(i(l.prototype),"initPagination",this).call(this),this.options.pagination&&this.paginationParts.includes("pageSize")&&this.$pagination.find(".dropdown").dropdown()}}])&&o(n.prototype,e),c&&o(n,c),l}(e.default.BootstrapTable)}));