/** * Copied from `datatables.net-rowreorder/types/types.d.ts` * so that we do not have to import the full module to get the types */ import type { Api } from 'datatables.net'; declare module 'datatables.net' { interface Config { /** * RowReorder extension options */ rowReorder?: boolean | ConfigRowReorder; } interface Api { /** * RowReorder methods container * * @returns Api for chaining with the additional RowReorder methods */ rowReorder: ApiRowReorderMethods; } interface DataTablesStatic { /** * RowReorder class */ RowReorder: { /** * Create a new RowReorder instance for the target DataTable */ new (dt: Api, settings: boolean | ConfigRowReorder): DataTablesStatic['RowReorder']; /** * RowReorder version */ version: string; /** * Default configuration values */ defaults: ConfigRowReorder; }; } } interface ConfigRowReorder { /** * Configure the data point that will be used for the reordering data */ dataSrc?: string; /** * Attach an Editor instance for database updating */ editor?: any; /** * Enable / disable RowReorder's user interaction */ enable?: boolean; /** * Set the options for the Editor form when submitting data */ formOptions?: any; /** * Define the selector used to pick the elements that will start a drag */ selector?: string; /** * Horizontal position control of the row being dragged */ snapX?: number | boolean; /** * Control automatic of data when a row is dropped */ update?: boolean; } interface ApiRowReorderMethods extends Api { /** * Disable the end user's ability to click and drag to reorder rows. * * @returns DataTables API instance */ disable(): Api; /** * Enable, or optionally disable, the end user's ability to click and drag to reorder rows. * * @param enable that can be used to indicate if row reordering should be enabled or disabled. * @returns DataTables API instance */ enable(enable?: boolean): Api; } export {};