/*! SearchPanes 2.1.2 * © SpryMedia Ltd - datatables.net/license */ (function( factory ){ if ( typeof define === 'function' && define.amd ) { // AMD define( ['jquery', 'datatables.net'], function ( $ ) { return factory( $, window, document ); } ); } else if ( typeof exports === 'object' ) { // CommonJS var jq = require('jquery'); var cjsRequires = function (root, $) { if ( ! $.fn.dataTable ) { require('datatables.net')(root, $); } }; if (typeof window !== 'undefined') { module.exports = function (root, $) { if ( ! root ) { // CommonJS environments without a window global must pass a // root. This will give an error otherwise root = window; } if ( ! $ ) { $ = jq( root ); } cjsRequires( root, $ ); return factory( $, root, root.document ); }; } else { cjsRequires( window, jq ); module.exports = factory( jq, window, window.document ); } } else { // Browser factory( jQuery, window, document ); } }(function( $, window, document, undefined ) { 'use strict'; var DataTable = $.fn.dataTable; (function () { 'use strict'; var $$5; var dataTable$2; function setJQuery$4(jq) { $$5 = jq; dataTable$2 = jq.fn.dataTable; } var SearchPane = /** @class */ (function () { /** * Creates the panes, sets up the search function * * @param paneSettings The settings for the searchPanes * @param opts The options for the default features * @param index the index of the column for this pane * @param panesContainer The overall container for SearchPanes that this pane will be attached to * @param panes The custom pane settings if this is a custom pane * @returns {object} the pane that has been created, including the table and the index of the pane */ function SearchPane(paneSettings, opts, index, panesContainer, panes) { var _this = this; if (panes === void 0) { panes = null; } // Check that the required version of DataTables is included if (!dataTable$2 || !dataTable$2.versionCheck || !dataTable$2.versionCheck('1.10.0')) { throw new Error('SearchPane requires DataTables 1.10 or newer'); } // Check that Select is included // eslint-disable-next-line no-extra-parens if (!dataTable$2.select) { throw new Error('SearchPane requires Select'); } var table = new dataTable$2.Api(paneSettings); this.classes = $$5.extend(true, {}, SearchPane.classes); // Get options from user this.c = $$5.extend(true, {}, SearchPane.defaults, opts, panes); if (opts && opts.hideCount && opts.viewCount === undefined) { this.c.viewCount = !this.c.hideCount; } var rowLength = table.columns().eq(0).toArray().length; this.s = { colExists: index < rowLength, colOpts: undefined, customPaneSettings: panes, displayed: false, dt: table, dtPane: undefined, firstSet: true, index: index, indexes: [], listSet: false, name: undefined, rowData: { arrayFilter: [], arrayOriginal: [], bins: {}, binsOriginal: {}, filterMap: new Map(), totalOptions: 0 }, scrollTop: 0, searchFunction: undefined, selections: [], serverSelect: [], serverSelecting: false, tableLength: null, updating: false }; this.s.colOpts = this.s.colExists ? this._getOptions() : this._getBonusOptions(); this.dom = { buttonGroup: $$5('
').addClass(this.classes.buttonGroup), clear: $$5('') .attr('disabled', 'true') .addClass(this.classes.disabledButton) .addClass(this.classes.paneButton) .addClass(this.classes.clearButton) .html(this.s.dt.i18n('searchPanes.clearPane', this.c.i18n.clearPane)), collapseButton: $$5('') .addClass(this.classes.paneButton) .addClass(this.classes.collapseButton), container: $$5('
') .addClass(this.classes.container) .addClass(this.s.colOpts.className) .addClass(this.classes.layout + (parseInt(this.c.layout.split('-')[1], 10) < 10 ? this.c.layout : this.c.layout.split('-')[0] + '-9')) .addClass(this.s.customPaneSettings && this.s.customPaneSettings.className ? this.s.customPaneSettings.className : ''), countButton: $$5('') .addClass(this.classes.paneButton) .addClass(this.classes.countButton), dtP: $$5('
' + (this.s.colExists ? $$5(this.s.dt.column(this.s.index).header()).text() : this.s.customPaneSettings.header || 'Custom Pane') + '
'), lower: $$5('
').addClass(this.classes.subRow2).addClass(this.classes.narrowButton), nameButton: $$5('') .addClass(this.classes.paneButton) .addClass(this.classes.nameButton), panesContainer: panesContainer, searchBox: $$5('').addClass(this.classes.paneInputButton).addClass(this.classes.search), searchButton: $$5('