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