1 | import { AlignedGridsService } from "./alignedGridsService";
|
2 | import { ColumnApi } from "./columns/columnApi";
|
3 | import { ISizeColumnsToFitParams } from "./columns/columnModel";
|
4 | import { Context } from "./context/context";
|
5 | import { CellPosition } from "./entities/cellPositionUtils";
|
6 | import { ColDef, ColGroupDef, IAggFunc } from "./entities/colDef";
|
7 | import { Column } from "./entities/column";
|
8 | import { ChartRef, DomLayoutType, GetChartToolbarItems, GetContextMenuItems, GetMainMenuItems, GetRowIdFunc, GetRowNodeIdFunc, GetServerSideGroupKey, GridOptions, IsApplyServerSideTransaction, IsRowMaster, IsRowSelectable, IsServerSideGroup, RowClassParams, RowGroupingDisplayType, ServerSideGroupLevelParams } from "./entities/gridOptions";
|
9 | import { GetGroupRowAggParams, GetServerSideGroupLevelParamsParams, InitialGroupOrderComparatorParams, IsFullWidthRowParams, IsServerSideGroupOpenByDefaultParams, NavigateToNextCellParams, NavigateToNextHeaderParams, PaginationNumberFormatterParams, PostProcessPopupParams, PostSortRowsParams, ProcessRowParams, RowHeightParams, TabToNextCellParams, TabToNextHeaderParams } from "./interfaces/iCallbackParams";
|
10 | import { RowPinnedType, IRowNode } from "./interfaces/iRowNode";
|
11 | import { AgEvent, ColumnEventType, SelectionEventSourceType } from "./events";
|
12 | import { RowDropZoneEvents, RowDropZoneParams } from "./gridBodyComp/rowDragFeature";
|
13 | import { HeaderPosition } from "./headerRendering/common/headerPosition";
|
14 | import { CsvExportParams, ProcessCellForExportParams } from "./interfaces/exportParams";
|
15 | import { ICellEditor } from "./interfaces/iCellEditor";
|
16 | import { ChartDownloadParams, ChartModel, CloseChartToolPanelParams, GetChartImageDataUrlParams, OpenChartToolPanelParams, CreateCrossFilterChartParams, CreatePivotChartParams, CreateRangeChartParams } from './interfaces/IChartService';
|
17 | import { ClientSideRowModelStep } from "./interfaces/iClientSideRowModel";
|
18 | import { IClipboardCopyParams, IClipboardCopyRowsParams } from "./interfaces/iClipboardService";
|
19 | import { IColumnToolPanel } from "./interfaces/iColumnToolPanel";
|
20 | import { IDatasource } from "./interfaces/iDatasource";
|
21 | import { ExcelExportMultipleSheetParams, ExcelExportParams } from "./interfaces/iExcelCreator";
|
22 | import { IFilter } from "./interfaces/iFilter";
|
23 | import { IFiltersToolPanel } from "./interfaces/iFiltersToolPanel";
|
24 | import { CellRange, CellRangeParams } from "./interfaces/IRangeService";
|
25 | import { IRowModel } from "./interfaces/iRowModel";
|
26 | import { IServerSideDatasource } from "./interfaces/iServerSideDatasource";
|
27 | import { RefreshServerSideParams } from "./interfaces/iServerSideRowModel";
|
28 | import { ServerSideGroupLevelState } from "./interfaces/IServerSideStore";
|
29 | import { ISideBar, SideBarDef } from "./interfaces/iSideBar";
|
30 | import { IStatusPanel } from "./interfaces/iStatusPanel";
|
31 | import { IToolPanel } from "./interfaces/iToolPanel";
|
32 | import { IViewportDatasource } from "./interfaces/iViewportDatasource";
|
33 | import { RowDataTransaction } from "./interfaces/rowDataTransaction";
|
34 | import { RowNodeTransaction } from "./interfaces/rowNodeTransaction";
|
35 | import { ServerSideTransaction, ServerSideTransactionResult } from "./interfaces/serverSideTransaction";
|
36 | import { ICellRenderer } from "./rendering/cellRenderers/iCellRenderer";
|
37 | import { OverlayWrapperComponent } from "./rendering/overlays/overlayWrapperComponent";
|
38 | import { FlashCellsParams, GetCellEditorInstancesParams, GetCellRendererInstancesParams, RedrawRowsParams, RefreshCellsParams } from "./rendering/rowRenderer";
|
39 | import { IServerSideGroupSelectionState, IServerSideSelectionState } from "./interfaces/iServerSideSelection";
|
40 | export interface DetailGridInfo {
|
41 | |
42 |
|
43 |
|
44 |
|
45 | id: string;
|
46 |
|
47 | api?: GridApi;
|
48 |
|
49 | columnApi?: ColumnApi;
|
50 | }
|
51 | export interface StartEditingCellParams {
|
52 |
|
53 | rowIndex: number;
|
54 |
|
55 | colKey: string | Column;
|
56 |
|
57 | rowPinned?: RowPinnedType;
|
58 |
|
59 | key?: string;
|
60 |
|
61 | charPress?: string;
|
62 | }
|
63 | export declare function unwrapUserComp<T>(comp: T): T;
|
64 | export declare class GridApi<TData = any> {
|
65 | private immutableService;
|
66 | private csvCreator;
|
67 | private excelCreator;
|
68 | private rowRenderer;
|
69 | private navigationService;
|
70 | private filterManager;
|
71 | private columnModel;
|
72 | private selectionService;
|
73 | private gridOptionsService;
|
74 | private valueService;
|
75 | private alignedGridsService;
|
76 | private eventService;
|
77 | private pinnedRowModel;
|
78 | private context;
|
79 | private rowModel;
|
80 | private sortController;
|
81 | private paginationProxy;
|
82 | private focusService;
|
83 | private dragAndDropService;
|
84 | private rangeService;
|
85 | private clipboardService;
|
86 | private aggFuncService;
|
87 | private menuFactory;
|
88 | private contextMenuFactory;
|
89 | private valueCache;
|
90 | private animationFrameService;
|
91 | private statusBarService;
|
92 | private chartService;
|
93 | private undoRedoService;
|
94 | private rowNodeBlockLoader;
|
95 | private serverSideTransactionManager;
|
96 | private ctrlsService;
|
97 | private overlayWrapperComp;
|
98 | private gridBodyCtrl;
|
99 | private sideBarComp;
|
100 | private clientSideRowModel;
|
101 | private infiniteRowModel;
|
102 | private serverSideRowModel;
|
103 | private detailGridInfoMap;
|
104 | private destroyCalled;
|
105 | registerOverlayWrapperComp(overlayWrapperComp: OverlayWrapperComponent): void;
|
106 | registerSideBarComp(sideBarComp: ISideBar): void;
|
107 | private init;
|
108 |
|
109 | __getAlignedGridService(): AlignedGridsService;
|
110 |
|
111 | __getContext(): Context;
|
112 | private getSetterMethod;
|
113 |
|
114 | __setProperty<K extends keyof GridOptions>(propertyName: K, value: GridOptions[K]): void;
|
115 |
|
116 | addDetailGridInfo(id: string, gridInfo: DetailGridInfo): void;
|
117 |
|
118 | removeDetailGridInfo(id: string): void;
|
119 |
|
120 | getDetailGridInfo(id: string): DetailGridInfo | undefined;
|
121 |
|
122 | forEachDetailGridInfo(callback: (gridInfo: DetailGridInfo, index: number) => void): void;
|
123 |
|
124 | getDataAsCsv(params?: CsvExportParams): string | undefined;
|
125 |
|
126 | exportDataAsCsv(params?: CsvExportParams): void;
|
127 | private getExcelExportMode;
|
128 | private assertNotExcelMultiSheet;
|
129 |
|
130 | getDataAsExcel(params?: ExcelExportParams): string | Blob | undefined;
|
131 |
|
132 | exportDataAsExcel(params?: ExcelExportParams): void;
|
133 |
|
134 | getSheetDataForExcel(params?: ExcelExportParams): string | undefined;
|
135 |
|
136 | getMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): Blob | undefined;
|
137 |
|
138 | exportMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): void;
|
139 | |
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 | setGridAriaProperty(property: string, value: string | null): void;
|
147 | private logMissingRowModel;
|
148 |
|
149 | setServerSideDatasource(datasource: IServerSideDatasource): void;
|
150 | |
151 |
|
152 |
|
153 |
|
154 |
|
155 | setCacheBlockSize(blockSize: number): void;
|
156 |
|
157 | setDatasource(datasource: IDatasource): void;
|
158 |
|
159 | setViewportDatasource(viewportDatasource: IViewportDatasource): void;
|
160 |
|
161 | setRowData(rowData: TData[]): void;
|
162 |
|
163 | setPinnedTopRowData(rows?: any[]): void;
|
164 |
|
165 | setPinnedBottomRowData(rows?: any[]): void;
|
166 |
|
167 | getPinnedTopRowCount(): number;
|
168 |
|
169 | getPinnedBottomRowCount(): number;
|
170 |
|
171 | getPinnedTopRow(index: number): IRowNode | undefined;
|
172 |
|
173 | getPinnedBottomRow(index: number): IRowNode | undefined;
|
174 | |
175 |
|
176 |
|
177 | setColumnDefs(colDefs: (ColDef<TData> | ColGroupDef<TData>)[], source?: ColumnEventType): void;
|
178 |
|
179 | setAutoGroupColumnDef(colDef: ColDef<TData>, source?: ColumnEventType): void;
|
180 |
|
181 | setDefaultColDef(colDef: ColDef<TData>, source?: ColumnEventType): void;
|
182 |
|
183 | setColumnTypes(columnTypes: {
|
184 | string: ColDef<TData>;
|
185 | }, source?: ColumnEventType): void;
|
186 | expireValueCache(): void;
|
187 | |
188 |
|
189 |
|
190 |
|
191 |
|
192 | getVerticalPixelRange(): {
|
193 | top: number;
|
194 | bottom: number;
|
195 | };
|
196 | |
197 |
|
198 |
|
199 |
|
200 |
|
201 | getHorizontalPixelRange(): {
|
202 | left: number;
|
203 | right: number;
|
204 | };
|
205 |
|
206 | setAlwaysShowHorizontalScroll(show: boolean): void;
|
207 |
|
208 | setAlwaysShowVerticalScroll(show: boolean): void;
|
209 |
|
210 | refreshCells(params?: RefreshCellsParams<TData>): void;
|
211 |
|
212 | flashCells(params?: FlashCellsParams<TData>): void;
|
213 |
|
214 | redrawRows(params?: RedrawRowsParams<TData>): void;
|
215 | setFunctionsReadOnly(readOnly: boolean): void;
|
216 |
|
217 | refreshHeader(): void;
|
218 |
|
219 | isAnyFilterPresent(): boolean;
|
220 |
|
221 | isColumnFilterPresent(): boolean;
|
222 |
|
223 | isQuickFilterPresent(): boolean;
|
224 | |
225 |
|
226 |
|
227 |
|
228 |
|
229 | getModel(): IRowModel;
|
230 |
|
231 | setRowNodeExpanded(rowNode: IRowNode, expanded: boolean, expandParents?: boolean): void;
|
232 | |
233 |
|
234 |
|
235 |
|
236 |
|
237 | onGroupExpandedOrCollapsed(): void;
|
238 | |
239 |
|
240 |
|
241 |
|
242 | refreshClientSideRowModel(step?: ClientSideRowModelStep): any;
|
243 |
|
244 | isAnimationFrameQueueEmpty(): boolean;
|
245 | flushAllAnimationFrames(): void;
|
246 | |
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 | getRowNode(id: string): IRowNode<TData> | undefined;
|
253 | |
254 |
|
255 |
|
256 |
|
257 | getSizesForCurrentTheme(): {
|
258 | rowHeight: number;
|
259 | headerHeight: number;
|
260 | };
|
261 |
|
262 | expandAll(): void;
|
263 |
|
264 | collapseAll(): void;
|
265 | |
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 | addRenderedRowListener(eventName: string, rowIndex: number, callback: Function): void;
|
273 |
|
274 | getQuickFilter(): string | undefined;
|
275 |
|
276 | setQuickFilter(newFilter: string): void;
|
277 | |
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 | setExcludeHiddenColumnsFromQuickFilter(value: boolean): void;
|
284 | |
285 |
|
286 |
|
287 |
|
288 | selectAll(source?: SelectionEventSourceType): void;
|
289 | |
290 |
|
291 |
|
292 |
|
293 | deselectAll(source?: SelectionEventSourceType): void;
|
294 | |
295 |
|
296 |
|
297 |
|
298 | selectAllFiltered(source?: SelectionEventSourceType): void;
|
299 | |
300 |
|
301 |
|
302 |
|
303 | deselectAllFiltered(source?: SelectionEventSourceType): void;
|
304 | |
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 | getServerSideSelectionState(): IServerSideSelectionState | IServerSideGroupSelectionState | null;
|
311 | |
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 | setServerSideSelectionState(state: IServerSideSelectionState | IServerSideGroupSelectionState): void;
|
318 | |
319 |
|
320 |
|
321 |
|
322 | selectAllOnCurrentPage(source?: SelectionEventSourceType): void;
|
323 | |
324 |
|
325 |
|
326 |
|
327 | deselectAllOnCurrentPage(source?: SelectionEventSourceType): void;
|
328 | |
329 |
|
330 |
|
331 | sizeColumnsToFit(params?: ISizeColumnsToFitParams): void;
|
332 |
|
333 | showLoadingOverlay(): void;
|
334 |
|
335 | showNoRowsOverlay(): void;
|
336 |
|
337 | hideOverlay(): void;
|
338 | |
339 |
|
340 |
|
341 |
|
342 |
|
343 | getSelectedNodes(): IRowNode<TData>[];
|
344 |
|
345 | getSelectedRows(): TData[];
|
346 | |
347 |
|
348 |
|
349 |
|
350 |
|
351 | getBestCostNodeSelection(): IRowNode<TData>[] | undefined;
|
352 |
|
353 | getRenderedNodes(): IRowNode<TData>[];
|
354 | |
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 | ensureColumnVisible(key: string | Column, position?: 'auto' | 'start' | 'middle' | 'end'): void;
|
367 | |
368 |
|
369 |
|
370 |
|
371 |
|
372 | ensureIndexVisible(index: number, position?: 'top' | 'bottom' | 'middle' | null): void;
|
373 | |
374 |
|
375 |
|
376 |
|
377 |
|
378 | ensureNodeVisible(nodeSelector: TData | IRowNode<TData> | ((row: IRowNode<TData>) => boolean), position?: 'top' | 'bottom' | 'middle' | null): void;
|
379 | /**
|
380 | * Similar to `forEachNode`, except lists all the leaf nodes.
|
381 | * This effectively goes through all the data that you provided to the grid before the grid performed any grouping.
|
382 | * If using tree data, goes through all the nodes for the data you provided, including nodes that have children,
|
383 | * but excluding groups the grid created where gaps were missing in the hierarchy.
|
384 | */
|
385 | forEachLeafNode(callback: (rowNode: IRowNode<TData>) => void): void;
|
386 | /**
|
387 | * Iterates through each node (row) in the grid and calls the callback for each node.
|
388 | * This works similar to the `forEach` method on a JavaScript array.
|
389 | * This is called for every node, ignoring any filtering or sorting applied within the grid.
|
390 | * If using the Infinite Row Model, then this gets called for each page loaded in the page cache.
|
391 | */
|
392 | forEachNode(callback: (rowNode: IRowNode<TData>, index: number) => void, includeFooterNodes?: boolean): void;
|
393 | /** Similar to `forEachNode`, except skips any filtered out data. */
|
394 | forEachNodeAfterFilter(callback: (rowNode: IRowNode<TData>, index: number) => void): void;
|
395 | /** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */
|
396 | forEachNodeAfterFilterAndSort(callback: (rowNode: IRowNode<TData>, index: number) => void): void;
|
397 | /**
|
398 | * Returns the filter component instance for a column.
|
399 | * `key` can be a string field name or a ColDef object (matches on object reference, useful if field names are not unique).
|
400 | * If your filter is created asynchronously, `getFilterInstance` will return `null` so you will need to use the `callback` to access the filter instance instead.
|
401 | */
|
402 | getFilterInstance<TFilter extends IFilter>(key: string | Column, callback?: (filter: TFilter | null) => void): TFilter | null | undefined;
|
403 | private getFilterInstanceImpl;
|
404 | /** Destroys a filter. Useful to force a particular filter to be created from scratch again. */
|
405 | destroyFilter(key: string | Column): void;
|
406 | /** Gets the status panel instance corresponding to the supplied `id`. */
|
407 | getStatusPanel<TStatusPanel = IStatusPanel>(key: string): TStatusPanel | undefined;
|
408 | getColumnDef(key: string | Column): ColDef<TData> | null;
|
409 | /**
|
410 | * Returns the current column definitions.
|
411 | */
|
412 | getColumnDefs(): (ColDef<TData> | ColGroupDef<TData>)[] | undefined;
|
413 | /** Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs. */
|
414 | onFilterChanged(): void;
|
415 | /**
|
416 | * Gets the grid to act as if the sort was changed.
|
417 | * Useful if you update some values and want to get the grid to reorder them according to the new values.
|
418 | */
|
419 | onSortChanged(): void;
|
420 | /** Sets the state of all the advanced filters. Provide it with what you get from `getFilterModel()` to restore filter state. */
|
421 | setFilterModel(model: any): void;
|
422 | /** Gets the current state of all the advanced filters. Used for saving filter state. */
|
423 | getFilterModel(): {
|
424 | [key: string]: any;
|
425 | };
|
426 | /** Returns the focused cell (or the last focused cell if the grid lost focus). */
|
427 | getFocusedCell(): CellPosition | null;
|
428 | /** Clears the focused cell. */
|
429 | clearFocusedCell(): void;
|
430 | /** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */
|
431 | setFocusedCell(rowIndex: number, colKey: string | Column, rowPinned?: RowPinnedType): void;
|
432 | /** Sets the `suppressRowDrag` property. */
|
433 | setSuppressRowDrag(value: boolean): void;
|
434 | /** Sets the `suppressMoveWhenRowDragging` property. */
|
435 | setSuppressMoveWhenRowDragging(value: boolean): void;
|
436 | /** Sets the `suppressRowClickSelection` property. */
|
437 | setSuppressRowClickSelection(value: boolean): void;
|
438 | /** Adds a drop zone outside of the grid where rows can be dropped. */
|
439 | addRowDropZone(params: RowDropZoneParams): void;
|
440 | /** Removes an external drop zone added by `addRowDropZone`. */
|
441 | removeRowDropZone(params: RowDropZoneParams): void;
|
442 | /** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */
|
443 | getRowDropZoneParams(events?: RowDropZoneEvents): RowDropZoneParams;
|
444 | /** Sets the height in pixels for the row containing the column label header. */
|
445 | setHeaderHeight(headerHeight?: number): void;
|
446 | /**
|
447 | * Switch between layout options: `normal`, `autoHeight`, `print`.
|
448 | * Defaults to `normal` if no domLayout provided.
|
449 | */
|
450 | setDomLayout(domLayout?: DomLayoutType): void;
|
451 | /** Sets the `enableCellTextSelection` property. */
|
452 | setEnableCellTextSelection(selectable: boolean): void;
|
453 | /** Sets the preferred direction for the selection fill handle. */
|
454 | setFillHandleDirection(direction: 'x' | 'y' | 'xy'): void;
|
455 | /** Sets the height in pixels for the rows containing header column groups. */
|
456 | setGroupHeaderHeight(headerHeight?: number): void;
|
457 | /** Sets the height in pixels for the row containing the floating filters. */
|
458 | setFloatingFiltersHeight(headerHeight?: number): void;
|
459 | /** Sets the height in pixels for the row containing the columns when in pivot mode. */
|
460 | setPivotHeaderHeight(headerHeight?: number): void;
|
461 | /** Sets the height in pixels for the row containing header column groups when in pivot mode. */
|
462 | setPivotGroupHeaderHeight(headerHeight?: number): void;
|
463 | setPivotMode(pivotMode: boolean): void;
|
464 | setAnimateRows(animateRows: boolean): void;
|
465 | setIsExternalFilterPresent(isExternalFilterPresentFunc: () => boolean): void;
|
466 | setDoesExternalFilterPass(doesExternalFilterPassFunc: (node: IRowNode) => boolean): void;
|
467 | setNavigateToNextCell(navigateToNextCellFunc: (params: NavigateToNextCellParams) => (CellPosition | null)): void;
|
468 | setTabToNextCell(tabToNextCellFunc: (params: TabToNextCellParams) => (CellPosition | null)): void;
|
469 | setTabToNextHeader(tabToNextHeaderFunc: (params: TabToNextHeaderParams) => (HeaderPosition | null)): void;
|
470 | setNavigateToNextHeader(navigateToNextHeaderFunc: (params: NavigateToNextHeaderParams) => (HeaderPosition | null)): void;
|
471 | setRowGroupPanelShow(rowGroupPanelShow: 'always' | 'onlyWhenGrouping' | 'never'): void;
|
472 | /** @deprecated v27.2 - Use `setGetGroupRowAgg` instead. */
|
473 | setGroupRowAggNodes(groupRowAggNodesFunc: (nodes: IRowNode[]) => any): void;
|
474 | setGetGroupRowAgg(getGroupRowAggFunc: (params: GetGroupRowAggParams) => any): void;
|
475 | setGetBusinessKeyForNode(getBusinessKeyForNodeFunc: (nodes: IRowNode) => string): void;
|
476 | setGetChildCount(getChildCountFunc: (dataItem: any) => number): void;
|
477 | setProcessRowPostCreate(processRowPostCreateFunc: (params: ProcessRowParams) => void): void;
|
478 | /** @deprecated v27.1 Use `setGetRowId` instead */
|
479 | setGetRowNodeId(getRowNodeIdFunc: GetRowNodeIdFunc): void;
|
480 | setGetRowId(getRowIdFunc: GetRowIdFunc): void;
|
481 | setGetRowClass(rowClassFunc: (params: RowClassParams) => string | string[]): void;
|
482 | /** @deprecated v27.2 Use `setIsFullWidthRow` instead. */
|
483 | setIsFullWidthCell(isFullWidthCellFunc: (rowNode: IRowNode) => boolean): void;
|
484 | setIsFullWidthRow(isFullWidthRowFunc: (params: IsFullWidthRowParams) => boolean): void;
|
485 | setIsRowSelectable(isRowSelectableFunc: IsRowSelectable): void;
|
486 | setIsRowMaster(isRowMasterFunc: IsRowMaster): void;
|
487 | /** @deprecated v27.2 Use `setPostSortRows` instead */
|
488 | setPostSort(postSortFunc: (nodes: IRowNode[]) => void): void;
|
489 | setPostSortRows(postSortRowsFunc: (params: PostSortRowsParams) => void): void;
|
490 | setGetDocument(getDocumentFunc: () => Document): void;
|
491 | setGetContextMenuItems(getContextMenuItemsFunc: GetContextMenuItems): void;
|
492 | setGetMainMenuItems(getMainMenuItemsFunc: GetMainMenuItems): void;
|
493 | setProcessCellForClipboard(processCellForClipboardFunc: (params: ProcessCellForExportParams) => any): void;
|
494 | setSendToClipboard(sendToClipboardFunc: (params: {
|
495 | data: string;
|
496 | }) => void): void;
|
497 | setProcessCellFromClipboard(processCellFromClipboardFunc: (params: ProcessCellForExportParams) => any): void;
|
498 | /** @deprecated v28 use `setProcessPivotResultColDef` instead */
|
499 | setProcessSecondaryColDef(processSecondaryColDefFunc: (colDef: ColDef) => void): void;
|
500 | /** @deprecated v28 use `setProcessPivotResultColGroupDef` instead */
|
501 | setProcessSecondaryColGroupDef(processSecondaryColGroupDefFunc: (colDef: ColDef) => void): void;
|
502 | setProcessPivotResultColDef(processPivotResultColDefFunc: (colDef: ColDef) => void): void;
|
503 | setProcessPivotResultColGroupDef(processPivotResultColGroupDefFunc: (colDef: ColDef) => void): void;
|
504 | setPostProcessPopup(postProcessPopupFunc: (params: PostProcessPopupParams) => void): void;
|
505 | /** @deprecated v27.2 - Use `setInitialGroupOrderComparator` instead */
|
506 | setDefaultGroupOrderComparator(defaultGroupOrderComparatorFunc: (nodeA: IRowNode, nodeB: IRowNode) => number): void;
|
507 | setInitialGroupOrderComparator(initialGroupOrderComparatorFunc: (params: InitialGroupOrderComparatorParams) => number): void;
|
508 | setGetChartToolbarItems(getChartToolbarItemsFunc: GetChartToolbarItems): void;
|
509 | setPaginationNumberFormatter(paginationNumberFormatterFunc: (params: PaginationNumberFormatterParams) => string): void;
|
510 | /** @deprecated v28 use setGetServerSideGroupLevelParams instead */
|
511 | setGetServerSideStoreParams(getServerSideStoreParamsFunc: (params: GetServerSideGroupLevelParamsParams) => ServerSideGroupLevelParams): void;
|
512 | setGetServerSideGroupLevelParams(getServerSideGroupLevelParamsFunc: (params: GetServerSideGroupLevelParamsParams) => ServerSideGroupLevelParams): void;
|
513 | setIsServerSideGroupOpenByDefault(isServerSideGroupOpenByDefaultFunc: (params: IsServerSideGroupOpenByDefaultParams) => boolean): void;
|
514 | setIsApplyServerSideTransaction(isApplyServerSideTransactionFunc: IsApplyServerSideTransaction): void;
|
515 | setIsServerSideGroup(isServerSideGroupFunc: IsServerSideGroup): void;
|
516 | setGetServerSideGroupKey(getServerSideGroupKeyFunc: GetServerSideGroupKey): void;
|
517 | setGetRowStyle(rowStyleFunc: (params: RowClassParams) => {}): void;
|
518 | setGetRowHeight(rowHeightFunc: (params: RowHeightParams) => number): void;
|
519 | private assertSideBarLoaded;
|
520 | /** Returns `true` if the side bar is visible. */
|
521 | isSideBarVisible(): boolean;
|
522 | /** Show/hide the entire side bar, including any visible panel and the tab buttons. */
|
523 | setSideBarVisible(show: boolean): void;
|
524 | /** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */
|
525 | setSideBarPosition(position: 'left' | 'right'): void;
|
526 | /** Opens a particular tool panel. Provide the ID of the tool panel to open. */
|
527 | openToolPanel(key: string): void;
|
528 | /** Closes the currently open tool panel (if any). */
|
529 | closeToolPanel(): void;
|
530 | /** Returns the ID of the currently shown tool panel if any, otherwise `null`. */
|
531 | getOpenedToolPanel(): string | null;
|
532 | /** Force refresh all tool panels by calling their `refresh` method. */
|
533 | refreshToolPanel(): void;
|
534 | /** Returns `true` if the tool panel is showing, otherwise `false`. */
|
535 | isToolPanelShowing(): boolean;
|
536 | getToolPanelInstance(id: 'columns'): IColumnToolPanel | undefined;
|
537 | getToolPanelInstance(id: 'filters'): IFiltersToolPanel | undefined;
|
538 | getToolPanelInstance<TToolPanel = IToolPanel>(id: string): TToolPanel | undefined;
|
539 | /** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */
|
540 | getSideBar(): SideBarDef | undefined;
|
541 | /** Resets the side bar to the provided configuration. The parameter is the same as the sideBar grid property. The side bar is re-created from scratch with the new config. */
|
542 | setSideBar(def: SideBarDef | string | string[] | boolean): void;
|
543 | setSuppressClipboardPaste(value: boolean): void;
|
544 | /** Tells the grid to recalculate the row heights. */
|
545 | resetRowHeights(): void;
|
546 | setGroupRemoveSingleChildren(value: boolean): void;
|
547 | setGroupRemoveLowestSingleChildren(value: boolean): void;
|
548 | setGroupDisplayType(value: RowGroupingDisplayType): void;
|
549 | setRowClass(className: string | undefined): void;
|
550 | /** Sets the `deltaSort` property */
|
551 | setDeltaSort(enable: boolean): void;
|
552 | /**
|
553 | * Sets the `rowCount` and `lastRowIndexKnown` properties.
|
554 | * The second parameter, `lastRowIndexKnown`, is optional and if left out, only `rowCount` is set.
|
555 | * Set `rowCount` to adjust the height of the vertical scroll.
|
556 | * Set `lastRowIndexKnown` to enable / disable searching for more rows.
|
557 | * Use this method if you add or remove rows into the dataset and need to reset the number of rows or put the data back into 'look for data' mode.
|
558 | */
|
559 | setRowCount(rowCount: number, maxRowFound?: boolean): void;
|
560 | /** Tells the grid a row height has changed. To be used after calling `rowNode.setRowHeight(newHeight)`. */
|
561 | onRowHeightChanged(): void;
|
562 | /**
|
563 | * Gets the value for a column for a particular `rowNode` (row).
|
564 | * This is useful if you want the raw value of a cell e.g. if implementing your own CSV export.
|
565 | */
|
566 | getValue(colKey: string | Column, rowNode: IRowNode): any;
|
567 | /** Add an event listener for the specified `eventType`. Works similar to `addEventListener` for a browser DOM element. */
|
568 | addEventListener(eventType: string, listener: Function): void;
|
569 | /** Add an event listener for all event types coming from the grid. */
|
570 | addGlobalListener(listener: Function): void;
|
571 | /** Remove an event listener. */
|
572 | removeEventListener(eventType: string, listener: Function): void;
|
573 | /** Remove a global event listener. */
|
574 | removeGlobalListener(listener: Function): void;
|
575 | dispatchEvent(event: AgEvent): void;
|
576 | /** Will destroy the grid and release resources. If you are using a framework you do not need to call this, as the grid links in with the framework lifecycle. However if you are using Web Components or native JavaScript, you do need to call this, to avoid a memory leak in your application. */
|
577 | destroy(): void;
|
578 | private cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid;
|
579 | private warnIfDestroyed;
|
580 | /** Reset the Quick Filter cache text on every rowNode. */
|
581 | resetQuickFilter(): void;
|
582 | /** Returns the list of selected cell ranges. */
|
583 | getCellRanges(): CellRange[] | null;
|
584 | /** Adds the provided cell range to the selected ranges. */
|
585 | addCellRange(params: CellRangeParams): void;
|
586 | /** Clears the selected ranges. */
|
587 | clearRangeSelection(): void;
|
588 | /** Reverts the last cell edit. */
|
589 | undoCellEditing(): void;
|
590 | /** Re-applies the most recently undone cell edit. */
|
591 | redoCellEditing(): void;
|
592 | /** Returns current number of available cell edit undo operations. */
|
593 | getCurrentUndoSize(): number;
|
594 | /** Returns current number of available cell edit redo operations. */
|
595 | getCurrentRedoSize(): number;
|
596 | /** Returns a list of models with information about the charts that are currently rendered from the grid. */
|
597 | getChartModels(): ChartModel[] | undefined;
|
598 | /** Returns the `ChartRef` using the supplied `chartId`. */
|
599 | getChartRef(chartId: string): ChartRef | undefined;
|
600 | /** Returns a base64-encoded image data URL for the referenced chartId. */
|
601 | getChartImageDataURL(params: GetChartImageDataUrlParams): string | undefined;
|
602 | /** Starts a browser-based image download for the referenced chartId. */
|
603 | downloadChart(params: ChartDownloadParams): void;
|
604 | /** Open the Chart Tool Panel. */
|
605 | openChartToolPanel(params: OpenChartToolPanelParams): void;
|
606 | /** Close the Chart Tool Panel. */
|
607 | closeChartToolPanel(params: CloseChartToolPanelParams): void;
|
608 | /** Used to programmatically create charts from a range. */
|
609 | createRangeChart(params: CreateRangeChartParams): ChartRef | undefined;
|
610 | /** Used to programmatically create cross filter charts from a range. */
|
611 | createCrossFilterChart(params: CreateCrossFilterChartParams): ChartRef | undefined;
|
612 | /** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */
|
613 | restoreChart(chartModel: ChartModel, chartContainer?: HTMLElement): ChartRef | undefined;
|
614 | /** Used to programmatically create pivot charts from a grid. */
|
615 | createPivotChart(params: CreatePivotChartParams): ChartRef | undefined;
|
616 | /** Copies data to clipboard by following the same rules as pressing Ctrl+C. */
|
617 | copyToClipboard(params?: IClipboardCopyParams): void;
|
618 | /** Cuts data to clipboard by following the same rules as pressing Ctrl+X. */
|
619 | cutToClipboard(params?: IClipboardCopyParams): void;
|
620 | /** Copies the selected rows to the clipboard. */
|
621 | copySelectedRowsToClipboard(params?: IClipboardCopyRowsParams): void;
|
622 | /** Copies the selected ranges to the clipboard. */
|
623 | copySelectedRangeToClipboard(params?: IClipboardCopyParams): void;
|
624 | /** Copies the selected range down, similar to `Ctrl + D` in Excel. */
|
625 | copySelectedRangeDown(): void;
|
626 | /** Shows the column menu after and positions it relative to the provided button element. Use in conjunction with your own header template. */
|
627 | showColumnMenuAfterButtonClick(colKey: string | Column, buttonElement: HTMLElement): void;
|
628 | /** Shows the column menu after and positions it relative to the mouse event. Use in conjunction with your own header template. */
|
629 | showColumnMenuAfterMouseClick(colKey: string | Column, mouseEvent: MouseEvent | Touch): void;
|
630 | /** Hides any visible context menu or column menu. */
|
631 | hidePopupMenu(): void;
|
632 | /** DOM element to use as the popup parent for grid popups (context menu, column menu etc). */
|
633 | setPopupParent(ePopupParent: HTMLElement): void;
|
634 | /** Navigates the grid focus to the next cell, as if tabbing. */
|
635 | tabToNextCell(event?: KeyboardEvent): boolean;
|
636 | /** Navigates the grid focus to the previous cell, as if shift-tabbing. */
|
637 | tabToPreviousCell(event?: KeyboardEvent): boolean;
|
638 | /** Returns the list of active cell renderer instances. */
|
639 | getCellRendererInstances(params?: GetCellRendererInstancesParams<TData>): ICellRenderer[];
|
640 | /** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */
|
641 | getCellEditorInstances(params?: GetCellEditorInstancesParams<TData>): ICellEditor[];
|
642 | /** If the grid is editing, returns back details of the editing cell(s). */
|
643 | getEditingCells(): CellPosition[];
|
644 | /** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */
|
645 | stopEditing(cancel?: boolean): void;
|
646 | /** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */
|
647 | startEditingCell(params: StartEditingCellParams): void;
|
648 | /** Add an aggregation function with the specified key. */
|
649 | addAggFunc(key: string, aggFunc: IAggFunc): void;
|
650 | /** Add aggregations function with the specified keys. */
|
651 | addAggFuncs(aggFuncs: {
|
652 | [key: string]: IAggFunc;
|
653 | }): void;
|
654 | /** Clears all aggregation functions (including those provided by the grid). */
|
655 | clearAggFuncs(): void;
|
656 | /** Apply transactions to the server side row model. */
|
657 | applyServerSideTransaction(transaction: ServerSideTransaction): ServerSideTransactionResult | undefined;
|
658 | /** Batch apply transactions to the server side row model. */
|
659 | applyServerSideTransactionAsync(transaction: ServerSideTransaction, callback?: (res: ServerSideTransactionResult) => void): void;
|
660 | /** Gets all failed server side loads to retry. */
|
661 | retryServerSideLoads(): void;
|
662 | flushServerSideAsyncTransactions(): void;
|
663 | /** Update row data. Pass a transaction object with lists for `add`, `remove` and `update`. */
|
664 | applyTransaction(rowDataTransaction: RowDataTransaction<TData>): RowNodeTransaction<TData> | null | undefined;
|
665 | /** Same as `applyTransaction` except executes asynchronously for efficiency. */
|
666 | applyTransactionAsync(rowDataTransaction: RowDataTransaction<TData>, callback?: (res: RowNodeTransaction<TData>) => void): void;
|
667 | /** Executes any remaining asynchronous grid transactions, if any are waiting to be executed. */
|
668 | flushAsyncTransactions(): void;
|
669 | setSuppressModelUpdateAfterUpdateTransaction(value: boolean): void;
|
670 | /**
|
671 | * Marks all the currently loaded blocks in the cache for reload.
|
672 | * If you have 10 blocks in the cache, all 10 will be marked for reload.
|
673 | * The old data will continue to be displayed until the new data is loaded.
|
674 | */
|
675 | refreshInfiniteCache(): void;
|
676 | /**
|
677 | * Purges the cache.
|
678 | * The grid is then told to refresh. Only the blocks required to display the current data on screen are fetched (typically no more than 2).
|
679 | * The grid will display nothing while the new blocks are loaded.
|
680 | * Use this to immediately remove the old data from the user.
|
681 | */
|
682 | purgeInfiniteCache(): void;
|
683 | /**
|
684 | * Refresh a server-side level.
|
685 | * If you pass no parameters, then the top level store is refreshed.
|
686 | * To refresh a child level, pass in the string of keys to get to the desired level.
|
687 | */
|
688 | refreshServerSide(params?: RefreshServerSideParams): void;
|
689 | /** @deprecated v28 use `refreshServerSide` instead */
|
690 | refreshServerSideStore(params?: RefreshServerSideParams): void;
|
691 | /** @deprecated v28 use `getServerSideGroupLevelState` instead */
|
692 | getServerSideStoreState(): ServerSideGroupLevelState[];
|
693 | /** Returns info on all server side group levels. */
|
694 | getServerSideGroupLevelState(): ServerSideGroupLevelState[];
|
695 | /** The row count defines how many rows the grid allows scrolling to. */
|
696 | getInfiniteRowCount(): number | undefined;
|
697 | /** Returns `true` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */
|
698 | isLastRowIndexKnown(): boolean | undefined;
|
699 | /**
|
700 | * Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.
|
701 | */
|
702 | getCacheBlockState(): any;
|
703 | /** Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer). */
|
704 | getFirstDisplayedRow(): number;
|
705 | /** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */
|
706 | getLastDisplayedRow(): number;
|
707 | /** Returns the displayed `RowNode` at the given `index`. */
|
708 | getDisplayedRowAtIndex(index: number): IRowNode<TData> | undefined;
|
709 | /** Returns the total number of displayed rows. */
|
710 | getDisplayedRowCount(): number;
|
711 | /**
|
712 | * Set whether the grid paginates the data or not.
|
713 | * - `true` to enable pagination
|
714 | * - `false` to disable pagination
|
715 | */
|
716 | setPagination(value: boolean): void;
|
717 | /**
|
718 | * Returns `true` when the last page is known.
|
719 | * This will always be `true` if you are using the Client-Side Row Model for pagination.
|
720 | * Returns `false` when the last page is not known; this only happens when using Infinite Row Model.
|
721 | */
|
722 | paginationIsLastPageFound(): boolean;
|
723 | /** Returns how many rows are being shown per page. */
|
724 | paginationGetPageSize(): number;
|
725 | /** Sets the `paginationPageSize`, then re-paginates the grid so the changes are applied immediately. */
|
726 | paginationSetPageSize(size?: number): void;
|
727 | /** Returns the 0-based index of the page which is showing. */
|
728 | paginationGetCurrentPage(): number;
|
729 | /** Returns the total number of pages. Returns `null` if `paginationIsLastPageFound() === false`. */
|
730 | paginationGetTotalPages(): number;
|
731 | /** The total number of rows. Returns `null` if `paginationIsLastPageFound() === false`. */
|
732 | paginationGetRowCount(): number;
|
733 | /** Navigates to the next page. */
|
734 | paginationGoToNextPage(): void;
|
735 | /** Navigates to the previous page. */
|
736 | paginationGoToPreviousPage(): void;
|
737 | /** Navigates to the first page. */
|
738 | paginationGoToFirstPage(): void;
|
739 | /** Navigates to the last page. */
|
740 | paginationGoToLastPage(): void;
|
741 | /** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */
|
742 | paginationGoToPage(page: number): void;
|
743 | }
|
744 |
|
\ | No newline at end of file |