2025-04-10 23:19:13 +08:00

11 lines
4.3 KiB
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.23.1
* @homepage https://bootstrap-table.com
* @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("core-js/modules/es.array.find.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.string.includes.js"),require("jquery")):"function"==typeof define&&define.amd?define(["core-js/modules/es.array.find.js","core-js/modules/es.array.includes.js","core-js/modules/es.object.to-string.js","core-js/modules/es.string.includes.js","jquery"],e):e(null,null,null,null,(t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t,e,o,n,r){"use strict";function i(t,e,o){return e=s(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,o||[],s(t).constructor):e.apply(t,o))}function u(t,e,o){return e&&function(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?t:o):r.value}},l.apply(null,arguments)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function f(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}r.fn.bootstrapTable.theme="bootstrap-table",r.BootstrapTable=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,e,arguments)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),u(e,[{key:"init",value:function(){l(s(e.prototype),"init",this).call(this),this.constants.classes.dropup="dropdown-menu-up",r(".modal").on("click","[data-close]",(function(t){r(t.delegateTarget).removeClass("show")}))}},{key:"initConstants",value:function(){l(s(e.prototype),"initConstants",this).call(this),this.constants.html.inputGroup='<div class="input-group">%s%s</div>'}},{key:"initToolbar",value:function(){l(s(e.prototype),"initToolbar",this).call(this),this.handleToolbar()}},{key:"handleToolbar",value:function(){this.$toolbar.find(".dropdown-toggle").length&&this._initDropdown()}},{key:"initPagination",value:function(){l(s(e.prototype),"initPagination",this).call(this),this.options.pagination&&this.paginationParts.includes("pageSize")&&this._initDropdown()}},{key:"_initDropdown",value:function(){r(".dropdown-toggle").off("click").on("click",(function(t){var e=r(t.currentTarget);e.parents(".dropdown-toggle").length>0&&(e=e.parents(".dropdown-toggle")),e.next(".dropdown-menu").toggleClass("open")})),r(window).off("click").on("click",(function(t){var e=r(".dropdown-toggle");0!==r(t.target).parents(".dropdown-toggle, .dropdown-menu").length||r(t.target).hasClass("dropdown-toggle")||e.next(".dropdown-menu").removeClass("open")}))}}])}(r.BootstrapTable)}));