/** * @license * Copyright Datorama. All Rights Reserved. * * Use of this source code is governed by an Apache License 2.0 license that can be * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE */ import { GridApi, RowNode, ColumnApi } from '@ag-grid-community/core'; import { DatoGridComponent } from './grid/grid.component'; /** * Datorama abstraction to agGrid API */ export declare class DatoGridAPI { private _gridApi; private _columnApi; private _gridRef; get ready(): boolean; get gridApi(): GridApi; set gridApi(gridApi: GridApi); get columnApi(): ColumnApi; set columnApi(columnApi: ColumnApi); get gridRef(): DatoGridComponent; set gridRef(gridRef: DatoGridComponent); constructor(gridApi?: GridApi); setSelectedRows(row: T & RowNode | T[] & RowNode[]): void; /** * * @returns {T} */ getSelectedRows(onlyFirstRow: true): T & RowNode; getSelectedRows(onlyFirstRow?: false): T[] & RowNode[]; getSelectedRows(onlyFirstRow: boolean): T[] & RowNode[] | T & RowNode; /** * * @param data */ setRows(data: T[]): void; /** * * @param {T} row * @param {number} index * @returns {RowNodeTransaction} */ addRows(row: T, index?: number): any; /** * * @param {T[]} row * @returns {RowNodeTransaction} */ updateRows(row: T[]): any; /** * * @param {string} id * @param {string} key * @param newValue */ updateRowValue(id: string, key: string, newValue: any): void; /** * * @param {RowNode | RowNode[]} row * @returns {RowNodeTransaction} */ removeRows(row: RowNode | RowNode[]): any; /** * * @returns {RowNodeTransaction} */ removeSelectedRows(): any; /** * Clear all the rows */ clearTable(): void; /** * Update the grids columns */ updateColumns(columns: any): void; }