bootstrap-table-foundation.min.js 5.8 KB

12345678910
  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.23.0
  5. * @homepage https://bootstrap-table.com
  6. * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
  7. * @license MIT
  8. */
  9. !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(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"],n):n(null,null,null,null,(t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t,n,o,e,i){"use strict";function r(t,n,o){return n=l(n),function(t,n){if(n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)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(n,o||[],l(t).constructor):n.apply(t,o))}function s(t,n,o){return n&&function(t,n){for(var o=0;o<n.length;o++){var e=n[o];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,d(e.key),e)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,n,o){var e=function(t,n){for(;!{}.hasOwnProperty.call(t,n)&&null!==(t=l(t)););return t}(t,n);if(e){var i=Object.getOwnPropertyDescriptor(e,n);return i.get?i.get.call(arguments.length<3?t:o):i.value}},a.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function u(t,n){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},u(t,n)}function d(t){var n=function(t,n){if("object"!=typeof t||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var e=o.call(t,n);if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof n?n:n+""}i.fn.bootstrapTable.utils.extend(i.fn.bootstrapTable.defaults,{classes:"table hover",buttonsPrefix:"",buttonsClass:"button"}),i.fn.bootstrapTable.theme="foundation",i.BootstrapTable=function(t){function n(){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),r(this,n,arguments)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&u(t,n)}(n,t),s(n,[{key:"initConstants",value:function(){a(l(n.prototype),"initConstants",this).call(this),this.constants.classes.buttonsGroup="button-group",this.constants.classes.buttonsDropdown="dropdown-container",this.constants.classes.paginationDropdown="",this.constants.classes.dropdownActive="is-active",this.constants.classes.paginationActive="current",this.constants.classes.buttonActive="success",this.constants.html.toolbarDropdown=['<div class="dropdown-pane" data-dropdown><ul class="vertical menu">',"</ul></div>"],this.constants.html.toolbarDropdownItem='<li class="dropdown-item-marker"><label class="dropdown-item">%s</label></li>',this.constants.html.toolbarDropdownSeparator="<li><hr></li>",this.constants.html.pageDropdown=['<div class="dropdown-pane" id="pagination-list-id" data-dropdown><ul class="vertical menu">',"</ul></div>"],this.constants.html.pageDropdownItem='<li class="dropdown-item %s"><a href="#">%s</a></li>',this.constants.html.dropdownCaret='<i class="fa fa-angle-down"></i>',this.constants.html.pagination=['<ul class="pagination%s">',"</ul>"],this.constants.html.paginationItem='<li><a class="page-item%s" aria-label="%s" href="#">%s</a></li>',this.constants.html.inputGroup='<div class="input-group">%s <div class="input-group-button">%s</div></div>',this.constants.html.searchInput='<input class="%s input-%s input-group-field" type="search" placeholder="%s">'}},{key:"initToolbar",value:function(){a(l(n.prototype),"initToolbar",this).call(this),this.handleToolbar()}},{key:"handleToolbar",value:function(){this.$toolbar.find(".dropdown-toggle").length&&(this.$toolbar.find(".dropdown-toggle").each((function(t,n){if(i(n).next().length){var o="toolbar-columns-id".concat(t);i(n).next().attr("id",o),i(n).attr("data-toggle",o);var e=i(n).next().attr("data-position","bottom").attr("data-alignment","right");new window.Foundation.Dropdown(e)}})),this._initDropdown())}},{key:"initPagination",value:function(){if(a(l(n.prototype),"initPagination",this).call(this),this.options.pagination&&this.paginationParts.includes("pageSize")){var t=this.$pagination.find(".dropdown-toggle");t.attr("data-toggle",t.next().attr("id"));var o=this.$pagination.find(".dropdown-pane").attr("data-position","top").attr("data-alignment","left");new window.Foundation.Dropdown(o),this._initDropdown()}}},{key:"_initDropdown",value:function(){var t=this.$container.find(".dropdown-toggle");t.off("click").on("click",(function(n){var o=i(n.currentTarget);n.stopPropagation(),o.next().foundation("toggle"),t.not(o).length&&t.not(o).next().foundation("close")})),i(document).off("click.bs.dropdown.foundation").on("click.bs.dropdown.foundation",(function(){t.next().foundation("close")}))}}])}(i.BootstrapTable)}));