// Type definitions for DataTables Responsive
//
// Project: https://datatables.net/extensions/responsive/, https://datatables.net
// Definitions by:
// SpryMedia
///
import DataTables, {Api, ApiRow} from 'datatables.net';
export default DataTables;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* DataTables' types integration
*/
declare module 'datatables.net' {
interface Config {
/**
* Responsive extension options
*/
responsive?: boolean | ConfigResponsive;
}
interface ConfigColumns {
/**
* Set column's visibility priority
*/
responsivePriority?: number;
}
interface Api {
/**
* Responsive methods container
*
* @returns Api for chaining with the additional Responsive methods
*/
responsive: ApiResponsiveMethods;
}
interface ApiColumnMethods {
/**
* Get the responsive visibility state of a column in the table
*/
responsiveHidden(): boolean;
}
interface ApiColumnsMethods {
/**
* Get the responsive visibility state of columns in the table
*/
responsiveHidden(): Api;
}
interface DataTablesStatic {
/**
* Responsive class
*/
Responsive: {
/**
* Create a new Responsive instance for the target DataTable
*/
new (dt: Api, settings: boolean | ConfigResponsive): DataTablesStatic['Responsive'];
/**
* Default configuration values
*/
defaults: ConfigResponsive;
/**
* List of default breakpoints
*/
breakpoints: ResponsiveBreakpoint[];
display: {
/** Display details as a child row, when requested (click) */
childRow: ResponsiveDisplay;
/** Display details as a child row, immediately (no-click) */
childRowImmediate: ResponsiveDisplay;
/** Display details as a modal */
modal: (options?: ResponsiveModalOptions) => ResponsiveDisplay;
};
/**
* Namespace to hold Responsive renderers
*/
renderer: {
listHiddenNodes(): ResponsiveRenderer,
listHidden(): ResponsiveRenderer,
tableAll(options?: {tableClass?: string}): ResponsiveRenderer,
};
/**
* Responsive version
*/
version: string;
/**
* Set the Bootstrap library to use
*
* @param bs Bootstrap - from `import * as bootstrap from 'bootstrap';`
*/
bootstrap: (bs: any) => void;
}
}
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Options
*/
interface ConfigResponsive {
/**
* Set the breakpoints for a responsive instance
*/
breakpoints?: Array