@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
70 lines (69 loc) • 3 kB
TypeScript
import { FreeTextColumn, FreeTextColumnState, FreeTextStoredValue } from '../AdaptableState/FreeTextColumnState';
import { IRowNode } from 'ag-grid-enterprise';
/**
* Provides run-time access to FreeTextColumn Module and associated state
*/
export interface FreeTextColumnApi {
/**
* Retrieves FreeTextColumn section of Adaptable State
*/
getFreeTextColumnState(): FreeTextColumnState;
/**
* Gets all FreeTextColumns in Adaptable State
* @returns free text column
*/
getFreeTextColumns(): FreeTextColumn[];
/**
* Retrieves FreeTextColumn by the technical ID (from `FreeTextColumnState`)
* @param id technical ID
* @returns free text column
*/
getFreeTextColumnById(id: FreeTextColumn['Uuid']): FreeTextColumn | undefined;
/**
* Gets FreeText Column, if any, for given ColumnId
* @param columnId ColumnId for which to retrieve the FreeText Column
* @returns free text column
*/
getFreeTextColumnForColumnId(columnId: string): FreeTextColumn | undefined;
/**
* Adds new FreeTextColumn to Adaptable State
* @param freeTextColumn to add
* @returns free text column
*/
addFreeTextColumn(freeTextColumn: FreeTextColumn): FreeTextColumn;
/**
* Edits existing FreeTextColumn in Adaptable State
* @param freeTextColum to edit (ColumnId is mandatory)
* @returns free text column
*/
editFreeTextColumn(freeTextColumn: FreeTextColumn): FreeTextColumn;
/**
* Deletes FreeTextColumn with given ColumnId from Adaptable State
* @param columnId ColumnId of FreeTextColumn to delete
*/
deleteFreeTextColumn(columnId: string): void;
/**
* Sets FreeTextStoredValue for the FreeTextColumn with the given ColumnId (replaces existing one if exists)
* @param columnId ColumnId of FreeTextColumn to which to add Stored Value
* @param storedValue FreeTextStored Value to add
* @returns free text column
*/
setStoredValue(columnId: string, storedValue: FreeTextStoredValue): FreeTextColumn;
/**
* Sets Stored Values to the FreeTextColumn with the given ColumnId
* @param columnId Free Text Column to which to add Stored Values
* @param storedValues Stored Values to Add
* @param replaceAction Function Behaviour: 'All' replaces ALL existing Stored Values; 'Conflicting' adds all stored values and replaces those which clash; 'None' only adds where no existing
*/
setStoredValues(columnId: string, storedValues: FreeTextStoredValue[], replaceAction: 'All' | 'Conflicting' | 'None'): void;
/**
* Retrieves a Free Text Column value for a given row node
* @param freeTextColumn column to lookup
* @param rowNode row to lookup
*/
getFreeTextColumnValueForRowNode(freeTextColumn: FreeTextColumn, rowNode: IRowNode): any;
/**
* Opens Settings Panel with Free Text Column section selected and visible
*/
openFreeTextColumnSettingsPanel(): void;
}