// Type definitions for DataTables SearchPanes
//
// Project: https://datatables.net/extensions/SearchPanes/, https://datatables.net
///
import DataTables, {Api} from 'datatables.net';
import * as paneType from './paneType';
import * as paneTypes from './paneTypes';
export default DataTables;
type DeepPartial = T extends object ? {
[P in keyof T]?: DeepPartial;
} : T;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* DataTables' types integration
*/
declare module 'datatables.net' {
interface Config {
/**
* SearchPanes extension options
*/
searchPanes?: boolean | string[] | ConfigSearchPanes | ConfigSearchPanes[];
}
interface ConfigLanguage {
/**
* SearchBuilder language options
*/
searchPanes?: ConfigSearchPanesLanguage;
}
interface Feature {
searchPanes?: string[] | ConfigSearchPanes | ConfigSearchPanes[];
}
interface Api {
/**
* SearchPanes methods container
*
* @returns Api for chaining with the additional SearchPanes methods
*/
searchPanes: ApiSearchPanes;
}
interface DataTablesStatic {
/**
* SearchPanes class
*/
SearchPanes: {
/**
* Create a new SearchPanes instance for the target DataTable
*/
new (dt: Api, settings: string[] | ConfigSearchPanes | ConfigSearchPanes[]): DataTablesStatic['SearchPanes'];
/**
* SearchPanes version
*/
version: string;
/**
* Default configuration values
*/
defaults: ConfigSearchPanes;
}
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Options
*/
interface ConfigSearchPanes extends DeepPartial {}
interface ConfigSearchPanesLanguage extends DeepPartial {}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* API
*/
interface ApiSearchPanes extends Api {
/**
* Clears the selections in all of the panes
*
* @returns self for chaining
*/
clearSelections(): Api;
/**
* Returns the node of the SearchPanes container
*
* @returns The node of the SearchPanes container
*/
container(): JQuery;
/**
* Rebuilds the SearchPanes, regathering the options from the table.
*
* @param index Optional. The index of a specific pane to rebuild
* @param maintainSelect Optional. Whether to remake the selections once the pane has been rebuilt.
* @returns self for chaining
*/
rebuildPane(index?: number, maintainSelect?: boolean): Api;
/**
* Resize all of the SearchPanes to fill the container appropriately.
*
* @returns self for chaining
*/
resizePanes(): Api;
}