@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
61 lines (60 loc) • 2.09 kB
TypeScript
import { CellDataChangedInfo } from '../AdaptableState/Common/CellDataChangedInfo';
import { GridCell } from '../types';
/**
* Provides run-time access to the Data Change History Module
**/
export interface DataChangeHistoryApi {
/**
* Retrieves current Data Change History mode: 'ACTIVE', 'INACTIVE', 'SUSPENDED'
*/
getDataChangeHistoryMode(): 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';
/**
* Activates Data Change History tracking (or resumes it, if it is currently suspended)
*
* @param forceReset reactivates the Data Change History even if it is currently suspended
*/
activateDataChangeHistory(forceReset?: boolean): void;
/**
* Deactivates Data Change History tracking and flushes the cache
*/
deactivateDataChangeHistory(): void;
/**
* Suspends data change history tracking
*/
suspendDataChangeHistory(): void;
/**
* Retrieves all data changes which are currently available
*/
getDataChangeHistoryLog(): CellDataChangedInfo[];
/**
* Retrieves last data change for a given Cell
*/
getDataChangeForGridCell(gridCell: GridCell): CellDataChangedInfo | undefined;
/**
* Adds item to Data Change History log
*
* @param dataChangeInfo the change to log
*/
addDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
/**
* Reverts provided data change to its previous value and returns GridCell that was undone
*
* @param dataChangeInfo the change to be undone
*/
undoDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): GridCell | undefined;
/**
* Reverts all data changes to previous values and returns GridCells that were undone
*
*/
undoAllDataChangeHistoryEntries(): GridCell[];
/**
* Clears a Row in Data Change Grid
*
* @param dataChangeInfo the change to be undone
*/
clearDataChangeHistoryEntry(dataChangeInfo: CellDataChangedInfo): void;
/**
* Opens Data Change History panel
*/
openDataChangeHistorySettingsPanel(): void;
}