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) • 12.7 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.16.0
* @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=t||self).jQuery)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("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})),a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,u={f:s&&!a.call({1:2},1)?function(t){var n=s(this,t);return!!n&&n.enumerable}:a},l=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},f={}.toString,p=function(t){return f.call(t).slice(8,-1)},d="".split,h=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,y=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},b=function(t){return h(y(t))},v=function(t){return"object"==typeof t?null!==t:"function"==typeof t},g=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")},m={}.hasOwnProperty,w=function(t,n){return m.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,_={f:c?T:function(t,n){if(t=b(t),n=g(n,!0),P)try{return T(t,n)}catch(t){}if(w(t,n))return l(!u.f.call(t,n),t[n])}},k=function(t){if(!v(t))throw TypeError(String(t)+" is not an object");return t},E=Object.defineProperty,x={f:c?E:function(t,n,e){if(k(t),n=g(n,!0),k(e),P)try{return E(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 x.f(t,n,l(1,e))}:function(t,n,e){return t[n]=e,t},D=function(t,n){try{A(o,t,n)}catch(e){o[t]=n}return n},C=o["__core-js_shared__"]||D("__core-js_shared__",{}),I=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(t){return I.call(t)});var M,F,R,L=C.inspectSource,N=o.WeakMap,q="function"==typeof N&&/native code/.test(L(N)),B=e((function(t){(t.exports=function(t,n){return C[t]||(C[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.6.0",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),G=0,W=Math.random(),z=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+W).toString(36)},$=B("keys"),K=function(t){return $[t]||($[t]=z(t))},Q={},V=o.WeakMap;if(q){var X=new V,Y=X.get,H=X.has,J=X.set;M=function(t,n){return J.call(X,t,n),n},F=function(t){return Y.call(X,t)||{}},R=function(t){return H.call(X,t)}}else{var U=K("state");Q[U]=!0,M=function(t,n){return A(t,U,n),n},F=function(t){return w(t,U)?t[U]:{}},R=function(t){return w(t,U)}}var Z,tt={set:M,get:F,has:R,enforce:function(t){return R(t)?F(t):M(t,{})},getterFor:function(t){return function(n){var e;if(!v(n)||(e=F(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}},nt=e((function(t){var n=tt.get,e=tt.enforce,r=String(String).split("String");(t.exports=function(t,n,i,c){var a=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,u=!!c&&!!c.noTargetGet;"function"==typeof i&&("string"!=typeof n||w(i,"name")||A(i,"name",n),e(i).source=r.join("string"==typeof n?n:"")),t!==o?(a?!u&&t[n]&&(s=!0):delete t[n],s?t[n]=i:A(t,n,i)):s?t[n]=i:D(n,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&n(this).source||L(this)}))})),et=o,rt=function(t){return"function"==typeof t?t:void 0},ot=function(t,n){return arguments.length<2?rt(et[t])||rt(o[t]):et[t]&&et[t][n]||o[t]&&o[t][n]},it=Math.ceil,ct=Math.floor,at=function(t){return isNaN(t=+t)?0:(t>0?ct:it)(t)},st=Math.min,ut=function(t){return t>0?st(at(t),9007199254740991):0},lt=Math.max,ft=Math.min,pt=function(t){return function(n,e,r){var o,i=b(n),c=ut(i.length),a=function(t,n){var e=at(t);return e<0?lt(e+n,0):ft(e,n)}(r,c);if(t&&e!=e){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===e)return t||a||0;return!t&&-1}},dt={includes:pt(!0),indexOf:pt(!1)}.indexOf,ht=function(t,n){var e,r=b(t),o=0,i=[];for(e in r)!w(Q,e)&&w(r,e)&&i.push(e);for(;n.length>o;)w(r,e=n[o++])&&(~dt(i,e)||i.push(e));return i},yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=yt.concat("length","prototype"),vt={f:Object.getOwnPropertyNames||function(t){return ht(t,bt)}},gt={f:Object.getOwnPropertySymbols},mt=ot("Reflect","ownKeys")||function(t){var n=vt.f(k(t)),e=gt.f;return e?n.concat(e(t)):n},wt=function(t,n){for(var e=mt(n),r=x.f,o=_.f,i=0;i<e.length;i++){var c=e[i];w(t,c)||r(t,c,o(n,c))}},Ot=/#|\.prototype\./,jt=function(t,n){var e=Pt[St(t)];return e==_t||e!=Tt&&("function"==typeof n?i(n):!!n)},St=jt.normalize=function(t){return String(t).replace(Ot,".").toLowerCase()},Pt=jt.data={},Tt=jt.NATIVE="N",_t=jt.POLYFILL="P",kt=jt,Et=_.f,xt=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)}},At=Array.isArray||function(t){return"Array"==p(t)},Dt=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Ct=Dt&&!Symbol.sham&&"symbol"==typeof Symbol(),It=B("wks"),Mt=o.Symbol,Ft=Ct?Mt:z,Rt=function(t){return w(It,t)||(Dt&&w(Mt,t)?It[t]=Mt[t]:It[t]=Ft("Symbol."+t)),It[t]},Lt=Rt("species"),Nt=function(t,n){var e;return At(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!At(e.prototype)?v(e)&&null===(e=e[Lt])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)},qt=[].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(a,s,u,l){for(var f,p,d=Object(y(a)),b=h(d),v=xt(s,u,3),g=ut(b.length),m=0,w=l||Nt,O=n?w(a,g):e?w(a,0):void 0;g>m;m++)if((c||m in b)&&(p=v(f=b[m],m,d),t))if(n)O[m]=p;else if(p)switch(t){case 3:return!0;case 5:return f;case 6:return m;case 2:qt.call(O,f)}else if(o)return!1;return i?-1:r||o?o:O}},Gt={forEach:Bt(0),map:Bt(1),filter:Bt(2),some:Bt(3),every:Bt(4),find:Bt(5),findIndex:Bt(6)},Wt=Object.keys||function(t){return ht(t,yt)},zt=c?Object.defineProperties:function(t,n){k(t);for(var e,r=Wt(n),o=r.length,i=0;o>i;)x.f(t,e=r[i++],n[e]);return t},$t=ot("document","documentElement"),Kt=K("IE_PROTO"),Qt=function(){},Vt=function(t){return"<script>"+t+"<\/script>"},Xt=function(){try{Z=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,n;Xt=Z?function(t){t.write(Vt("")),t.close();var n=t.parentWindow.Object;return t=null,n}(Z):((n=S("iframe")).style.display="none",$t.appendChild(n),n.src=String("javascript:"),(t=n.contentWindow.document).open(),t.write(Vt("document.F=Object")),t.close(),t.F);for(var e=yt.length;e--;)delete Xt.prototype[yt[e]];return Xt()};Q[Kt]=!0;var Yt=Object.create||function(t,n){var e;return null!==t?(Qt.prototype=k(t),e=new Qt,Qt.prototype=null,e[Kt]=t):e=Xt(),void 0===n?e:zt(e,n)},Ht=Rt("unscopables"),Jt=Array.prototype;null==Jt[Ht]&&x.f(Jt,Ht,{configurable:!0,value:Yt(null)});var Ut,Zt=Gt.find,tn=!0;function nn(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 en(t){return(en=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rn(t,n){return(rn=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function on(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 cn(t,n,e){return(cn="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=en(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)}"find"in[]&&Array(1).find((function(){tn=!1})),function(t,n){var e,r,i,c,a,s=t.target,u=t.global,l=t.stat;if(e=u?o:l?o[s]||D(s,{}):(o[s]||{}).prototype)for(r in n){if(c=n[r],i=t.noTargetGet?(a=Et(e,r))&&a.value:e[r],!kt(u?r:s+(l?".":"#")+r,t.forced)&&void 0!==i){if(typeof c==typeof i)continue;wt(c,i)}(t.sham||i&&i.sham)&&A(c,"sham",!0),nt(e,r,c,t)}}({target:"Array",proto:!0,forced:tn},{find:function(t){return Zt(this,t,arguments.length>1?arguments[1]:void 0)}}),Ut="find",Jt[Ht][Ut]=!0,t.extend(t.fn.bootstrapTable.defaults,{classes:"table is-bordered is-hoverable",buttonsPrefix:"",buttonsClass:"button"}),t.fn.bootstrapTable.theme="bulma",t.BootstrapTable=function(n){function e(){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),on(this,en(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&&rn(t,n)}(e,n),r=e,(o=[{key:"initConstants",value:function(){cn(en(e.prototype),"initConstants",this).call(this),this.constants.classes.buttonsGroup="buttons has-addons",this.constants.classes.buttonsDropdown="button dropdown is-right",this.constants.classes.input="input",this.constants.classes.paginationDropdown="ui dropdown",this.constants.classes.dropup="is-up",this.constants.classes.dropdownActive="is-active",this.constants.classes.paginationActive="is-current",this.constants.classes.buttonActive="is-active",this.constants.html.toolbarDropdown=['<div class="dropdown-menu"><div class="dropdown-content">',"</div></div>"],this.constants.html.toolbarDropdownItem='<label class="dropdown-item dropdown-item-marker">%s</label>',this.constants.html.toolbarDropdownSeparator='<li class="dropdown-divider"></li>',this.constants.html.pageDropdown=['<div class="dropdown-menu"><div class="dropdown-content">',"</div></div>"],this.constants.html.pageDropdownItem='<a class="dropdown-item %s" href="#">%s</a>',this.constants.html.dropdownCaret='<span class="icon is-small"><i class="fas fa-angle-down" aria-hidden="true"></i></span>',this.constants.html.pagination=['<ul class="pagination%s">',"</ul>"],this.constants.html.paginationItem='<li><a class="page-item pagination-link%s" aria-label="%s" href="#">%s</a></li>',this.constants.html.searchInput='<p class="control"><input class="%s input-%s" type="text" placeholder="%s"></p>',this.constants.html.inputGroup='<div class="field has-addons has-addons-right">%s%s</div>',this.constants.html.searchButton='<p class="control"><button class="%s" type="button" name="search" title="%s">%s %s</button></p>',this.constants.html.searchClearButton='<p class="control"><button class="%s" type="button" name="clearSearch" title="%s">%s %s</button></p>'}},{key:"initToolbar",value:function(){cn(en(e.prototype),"initToolbar",this).call(this),this.handleToolbar()}},{key:"handleToolbar",value:function(){this.$toolbar.find(".dropdown").length&&this._initDropdown()}},{key:"initPagination",value:function(){cn(en(e.prototype),"initPagination",this).call(this),this.options.pagination&&!this.options.onlyInfoPagination&&this._initDropdown()}},{key:"_initDropdown",value:function(){var n=this.$container.find(".dropdown:not(.is-hoverable)");n.off("click").on("click",(function(e){var r=t(e.currentTarget);e.stopPropagation(),n.not(r).removeClass("is-active"),r.toggleClass("is-active")})),t(document).off("click.bs.dropdown.bulma").on("click.bs.dropdown.bulma",(function(){n.removeClass("is-active")}))}}])&&nn(r.prototype,o),i&&nn(r,i),e}(t.BootstrapTable)}));