ag-grid-community 32.0.2 → 32.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +503 -85
- package/dist/ag-grid-community.js +9676 -6678
- package/dist/ag-grid-community.min.js +1 -1
- package/dist/ag-grid-community.min.noStyle.js +1 -1
- package/dist/ag-grid-community.noStyle.js +9577 -6573
- package/dist/package/main.cjs.js +9425 -6504
- package/dist/package/main.cjs.min.js +81 -70
- package/dist/package/main.esm.min.mjs +92 -81
- package/dist/package/main.esm.mjs +9424 -6503
- package/dist/package/package.json +34 -7
- package/dist/types/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +16 -3
- package/dist/types/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +27 -7
- package/dist/types/client-side-row-model/clientSideRowModel/clientSideRowModelApi.d.ts +1 -0
- package/dist/types/client-side-row-model/clientSideRowModel/immutableService.d.ts +2 -1
- package/dist/types/client-side-row-model/clientSideRowModel/sortService.d.ts +1 -0
- package/dist/types/client-side-row-model/clientSideRowModelModule.d.ts +3 -4
- package/dist/types/client-side-row-model/version.d.ts +1 -1
- package/dist/types/core/alignedGridsModule.d.ts +1 -2
- package/dist/types/core/alignedGridsService.d.ts +1 -0
- package/dist/types/core/api/apiFunctionService.d.ts +6 -5
- package/dist/types/core/api/apiModule.d.ts +10 -11
- package/dist/types/core/api/apiUtils.d.ts +1 -1
- package/dist/types/core/api/gridApi.d.ts +621 -523
- package/dist/types/core/api/gridApiFunctions.d.ts +255 -0
- package/dist/types/core/api/sharedApiModule.d.ts +2 -3
- package/dist/types/core/api/ssrmInfiniteSharedApi.d.ts +1 -0
- package/dist/types/core/columns/columnEventDispatcher.d.ts +6 -4
- package/dist/types/core/columns/columnFactory.d.ts +6 -1
- package/dist/types/core/columns/columnModel.d.ts +11 -4
- package/dist/types/core/columns/columnModule.d.ts +2 -3
- package/dist/types/core/columns/columnUtils.d.ts +1 -0
- package/dist/types/core/columns/columnViewportService.d.ts +1 -0
- package/dist/types/core/columns/controlsColService.d.ts +11 -0
- package/dist/types/core/columns/dataTypeService.d.ts +3 -10
- package/dist/types/core/components/componentUtil.d.ts +2 -2
- package/dist/types/core/components/emptyBean.d.ts +21 -0
- package/dist/types/core/components/framework/componentTypes.d.ts +1 -0
- package/dist/types/core/components/framework/frameworkComponentWrapper.d.ts +1 -2
- package/dist/types/core/components/framework/userComponentFactory.d.ts +3 -1
- package/dist/types/core/components/framework/userComponentRegistry.d.ts +3 -1
- package/dist/types/core/context/beanStub.d.ts +2 -3
- package/dist/types/core/context/context.d.ts +8 -3
- package/dist/types/core/ctrlsService.d.ts +9 -6
- package/dist/types/core/dragAndDrop/dragAndDropImageComponent.d.ts +24 -0
- package/dist/types/core/dragAndDrop/dragAndDropService.d.ts +22 -10
- package/dist/types/core/dragAndDrop/dragModule.d.ts +1 -2
- package/dist/types/core/dragAndDrop/dragService.d.ts +4 -0
- package/dist/types/core/edit/cellEditors/simpleCellEditor.d.ts +2 -2
- package/dist/types/core/edit/editModule.d.ts +9 -10
- package/dist/types/core/edit/editService.d.ts +1 -1
- package/dist/types/core/edit/rowEditService.d.ts +1 -1
- package/dist/types/core/entities/agColumn.d.ts +4 -2
- package/dist/types/core/entities/agColumnGroup.d.ts +5 -0
- package/dist/types/core/entities/colDef.d.ts +26 -16
- package/dist/types/core/entities/dataType.d.ts +7 -0
- package/dist/types/core/entities/gridOptions.d.ts +248 -13
- package/dist/types/core/entities/rowNode.d.ts +69 -25
- package/dist/types/core/environment.d.ts +7 -4
- package/dist/types/core/eventService.d.ts +3 -3
- package/dist/types/core/eventTypes.d.ts +3 -3
- package/dist/types/core/events.d.ts +58 -12
- package/dist/types/core/filter/columnFilterService.d.ts +3 -1
- package/dist/types/core/filter/filterManager.d.ts +2 -0
- package/dist/types/core/filter/filterModule.d.ts +13 -14
- package/dist/types/core/filter/provided/iScalarFilter.d.ts +2 -0
- package/dist/types/core/filter/provided/providedFilter.d.ts +1 -1
- package/dist/types/core/focusService.d.ts +12 -2
- package/dist/types/core/grid.d.ts +10 -1
- package/dist/types/core/gridBodyComp/abstractFakeScrollComp.d.ts +3 -2
- package/dist/types/core/gridBodyComp/gridBodyCtrl.d.ts +8 -1
- package/dist/types/core/gridBodyComp/gridBodyScrollFeature.d.ts +10 -5
- package/dist/types/core/gridBodyComp/navigationService.d.ts +3 -1
- package/dist/types/core/gridBodyComp/rowContainer/rowContainerCtrl.d.ts +7 -3
- package/dist/types/core/gridBodyComp/rowDragFeature.d.ts +3 -2
- package/dist/types/core/gridBodyComp/scrollVisibleService.d.ts +10 -2
- package/dist/types/core/gridComp/gridCtrl.d.ts +5 -1
- package/dist/types/core/gridCoreModule.d.ts +2 -8
- package/dist/types/core/gridOptionsService.d.ts +10 -38
- package/dist/types/core/gridOptionsUtils.d.ts +54 -0
- package/dist/types/core/headerRendering/cells/abstractCell/abstractHeaderCellCtrl.d.ts +9 -6
- package/dist/types/core/headerRendering/cells/column/headerCellCtrl.d.ts +7 -6
- package/dist/types/core/headerRendering/cells/column/selectAllFeature.d.ts +6 -0
- package/dist/types/core/headerRendering/cells/columnGroup/headerGroupCellComp.d.ts +1 -0
- package/dist/types/core/headerRendering/cells/columnGroup/headerGroupCellCtrl.d.ts +6 -1
- package/dist/types/core/headerRendering/cells/floatingFilter/headerFilterCellCtrl.d.ts +2 -1
- package/dist/types/core/headerRendering/columnDrag/bodyDropPivotTarget.d.ts +1 -0
- package/dist/types/core/headerRendering/columnDrag/bodyDropTarget.d.ts +2 -0
- package/dist/types/core/headerRendering/columnDrag/moveColumnFeature.d.ts +21 -4
- package/dist/types/core/headerRendering/columnMoveHelper.d.ts +20 -10
- package/dist/types/core/headerRendering/gridHeaderCtrl.d.ts +1 -0
- package/dist/types/core/headerRendering/row/headerRowCtrl.d.ts +4 -8
- package/dist/types/core/headerRendering/rowContainer/headerRowContainerCtrl.d.ts +8 -8
- package/dist/types/core/interfaces/IRangeService.d.ts +3 -2
- package/dist/types/core/interfaces/IServerSideStore.d.ts +1 -1
- package/dist/types/core/interfaces/gridState.d.ts +28 -9
- package/dist/types/core/interfaces/iAdvancedFilterCtrl.d.ts +5 -1
- package/dist/types/core/interfaces/iCallbackParams.d.ts +5 -2
- package/dist/types/core/interfaces/iCellEditor.d.ts +4 -0
- package/dist/types/core/interfaces/iClientSideRowModel.d.ts +2 -6
- package/dist/types/core/interfaces/iColumn.d.ts +5 -1
- package/dist/types/core/interfaces/iExcelCreator.d.ts +69 -36
- package/dist/types/core/interfaces/iFrameworkOverrides.d.ts +6 -4
- package/dist/types/core/interfaces/iMenuFactory.d.ts +2 -1
- package/dist/types/core/interfaces/iModule.d.ts +10 -1
- package/dist/types/core/interfaces/iRowNode.d.ts +9 -2
- package/dist/types/core/interfaces/iRowNodeStage.d.ts +1 -3
- package/dist/types/core/interfaces/masterDetail.d.ts +2 -0
- package/dist/types/core/main.d.ts +11 -9
- package/dist/types/core/misc/menuService.d.ts +4 -2
- package/dist/types/core/misc/resizeObserverService.d.ts +0 -4
- package/dist/types/core/misc/state/stateModelMigration.d.ts +2 -0
- package/dist/types/core/misc/state/stateModule.d.ts +3 -4
- package/dist/types/core/misc/state/stateService.d.ts +2 -2
- package/dist/types/core/pagination/pageSizeSelector/pageSizeSelectorComp.d.ts +3 -1
- package/dist/types/core/pagination/paginationComp.d.ts +5 -4
- package/dist/types/core/pagination/paginationModule.d.ts +3 -4
- package/dist/types/core/pinnedRowModel/pinnedRowModel.d.ts +11 -9
- package/dist/types/core/pinnedRowModel/pinnedRowModule.d.ts +1 -2
- package/dist/types/core/propertyKeys.d.ts +2 -1
- package/dist/types/core/rendering/ariaAnnouncementService.d.ts +6 -1
- package/dist/types/core/rendering/cell/cellCtrl.d.ts +13 -10
- package/dist/types/core/rendering/cell/cellRangeFeature.d.ts +1 -1
- package/dist/types/core/rendering/columnAnimationService.d.ts +1 -0
- package/dist/types/core/rendering/columnHoverService.d.ts +1 -0
- package/dist/types/core/rendering/features/stickyRowFeature.d.ts +1 -0
- package/dist/types/core/rendering/overlays/loadingOverlayComponent.d.ts +1 -1
- package/dist/types/core/rendering/overlays/noRowsOverlayComponent.d.ts +1 -1
- package/dist/types/core/rendering/overlays/overlayModule.d.ts +1 -2
- package/dist/types/core/rendering/overlays/overlayService.d.ts +14 -1
- package/dist/types/core/rendering/overlays/overlayWrapperComponent.d.ts +6 -1
- package/dist/types/core/rendering/renderModule.d.ts +1 -2
- package/dist/types/core/rendering/row/rowComp.d.ts +0 -2
- package/dist/types/core/rendering/row/rowCtrl.d.ts +10 -8
- package/dist/types/core/rendering/rowRenderer.d.ts +1 -0
- package/dist/types/core/rowNodeCache/rowNodeBlockModule.d.ts +1 -2
- package/dist/types/core/selection/selectionService.d.ts +3 -2
- package/dist/types/core/syncService.d.ts +0 -1
- package/dist/types/core/utils/dom.d.ts +1 -1
- package/dist/types/core/utils/function.d.ts +2 -2
- package/dist/types/core/utils/icon.d.ts +76 -1
- package/dist/types/core/validation/apiFunctionValidator.d.ts +0 -1
- package/dist/types/core/validation/rules/gridOptionsValidations.d.ts +3 -0
- package/dist/types/core/validation/rules/selectionValidations.d.ts +3 -0
- package/dist/types/core/validation/validationService.d.ts +1 -4
- package/dist/types/core/validation/validationTypes.d.ts +2 -2
- package/dist/types/core/valueService/valueService.d.ts +6 -0
- package/dist/types/core/version.d.ts +1 -1
- package/dist/types/core/widgets/popupService.d.ts +1 -1
- package/dist/types/core/widgets/tooltipStateManager.d.ts +1 -0
- package/dist/types/csv-export/csvExportModule.d.ts +3 -4
- package/dist/types/csv-export/version.d.ts +1 -1
- package/dist/types/infinite-row-model/infiniteRowModel/infiniteRowModel.d.ts +1 -1
- package/dist/types/infinite-row-model/infiniteRowModel/infiniteRowModelApi.d.ts +0 -1
- package/dist/types/infinite-row-model/infiniteRowModelModule.d.ts +3 -4
- package/dist/types/infinite-row-model/version.d.ts +1 -1
- package/package.json +34 -7
- package/styles/_css-content.scss +332 -114
- package/styles/ag-grid-no-native-widgets.css +71 -36
- package/styles/ag-grid-no-native-widgets.min.css +3 -3
- package/styles/ag-grid.css +71 -36
- package/styles/ag-grid.min.css +3 -3
- package/styles/ag-theme-alpine-no-font.css +18 -5
- package/styles/ag-theme-alpine-no-font.min.css +1 -1
- package/styles/ag-theme-alpine.css +18 -5
- package/styles/ag-theme-alpine.min.css +1 -1
- package/styles/ag-theme-balham-no-font.css +18 -0
- package/styles/ag-theme-balham-no-font.min.css +1 -1
- package/styles/ag-theme-balham.css +18 -0
- package/styles/ag-theme-balham.min.css +1 -1
- package/styles/ag-theme-material-no-font.css +41 -6
- package/styles/ag-theme-material-no-font.min.css +1 -1
- package/styles/ag-theme-material.css +41 -6
- package/styles/ag-theme-material.min.css +1 -1
- package/styles/ag-theme-quartz-no-font.css +18 -10
- package/styles/ag-theme-quartz-no-font.min.css +1 -1
- package/styles/ag-theme-quartz.css +18 -10
- package/styles/ag-theme-quartz.min.css +1 -1
- package/dist/types/core/utils/rowNode.d.ts +0 -14
- package/gulpfile.js +0 -34
- package/webpackBuild.sh +0 -17
|
@@ -63,149 +63,28 @@ export interface GetCellValueParams<TValue = any> {
|
|
|
63
63
|
/** If `true` formatted value will be returned. */
|
|
64
64
|
useFormatter?: boolean;
|
|
65
65
|
}
|
|
66
|
-
export interface
|
|
66
|
+
export interface _CoreGridApi<TData = any> {
|
|
67
67
|
/** Returns the `gridId` for the current grid as specified via the gridOptions property `gridId` or the auto assigned grid id if none was provided. */
|
|
68
68
|
getGridId(): string;
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
/** Returns the `DetailGridInfo` corresponding to the supplied `detailGridId`. */
|
|
74
|
-
getDetailGridInfo(id: string): DetailGridInfo | undefined;
|
|
75
|
-
/** Iterates through each `DetailGridInfo` in the grid and calls the supplied callback on each. */
|
|
76
|
-
forEachDetailGridInfo(callback: (gridInfo: DetailGridInfo, index: number) => void): void;
|
|
77
|
-
/** Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. */
|
|
78
|
-
getDataAsCsv(params?: CsvExportParams): string | undefined;
|
|
79
|
-
/** Downloads a CSV export of the grid's data. */
|
|
80
|
-
exportDataAsCsv(params?: CsvExportParams): void;
|
|
81
|
-
/** Similar to `exportDataAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */
|
|
82
|
-
getDataAsExcel(params?: ExcelExportParams): string | Blob | undefined;
|
|
83
|
-
/** Downloads an Excel export of the grid's data. */
|
|
84
|
-
exportDataAsExcel(params?: ExcelExportParams): void;
|
|
85
|
-
/** This is method to be used to get the grid's data as a sheet, that will later be exported either by `getMultipleSheetsAsExcel()` or `exportMultipleSheetsAsExcel()`. */
|
|
86
|
-
getSheetDataForExcel(params?: ExcelExportParams): string | undefined;
|
|
87
|
-
/** Similar to `exportMultipleSheetsAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */
|
|
88
|
-
getMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): Blob | undefined;
|
|
89
|
-
/** Downloads an Excel export of multiple sheets in one file. */
|
|
90
|
-
exportMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): void;
|
|
91
|
-
/**
|
|
92
|
-
* Sets an ARIA property in the grid panel (element with `role=\"treegrid\"`), and removes an ARIA property when the value is null.
|
|
93
|
-
*
|
|
94
|
-
* Example: `api.setGridAriaProperty('label', 'my grid')` will set `aria-label=\"my grid\"`.
|
|
95
|
-
*
|
|
96
|
-
* `api.setGridAriaProperty('label', null)` will remove the `aria-label` attribute from the grid element.
|
|
97
|
-
*/
|
|
98
|
-
setGridAriaProperty(property: string, value: string | null): void;
|
|
99
|
-
/** Gets the number of top pinned rows. */
|
|
100
|
-
getPinnedTopRowCount(): number;
|
|
101
|
-
/** Gets the number of bottom pinned rows. */
|
|
102
|
-
getPinnedBottomRowCount(): number;
|
|
103
|
-
/** Gets the top pinned row with the specified index. */
|
|
104
|
-
getPinnedTopRow(index: number): IRowNode | undefined;
|
|
105
|
-
/** Gets the bottom pinned row with the specified index. */
|
|
106
|
-
getPinnedBottomRow(index: number): IRowNode | undefined;
|
|
107
|
-
/** Expire the value cache. */
|
|
108
|
-
expireValueCache(): void;
|
|
109
|
-
/**
|
|
110
|
-
* Returns an object with two properties:
|
|
111
|
-
* - `top`: The top pixel position of the current scroll in the grid
|
|
112
|
-
* - `bottom`: The bottom pixel position of the current scroll in the grid
|
|
113
|
-
*/
|
|
114
|
-
getVerticalPixelRange(): {
|
|
115
|
-
top: number;
|
|
116
|
-
bottom: number;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Returns an object with two properties:
|
|
120
|
-
* - `left`: The left pixel position of the current scroll in the grid
|
|
121
|
-
* - `right`: The right pixel position of the current scroll in the grid
|
|
122
|
-
*/
|
|
123
|
-
getHorizontalPixelRange(): {
|
|
124
|
-
left: number;
|
|
125
|
-
right: number;
|
|
126
|
-
};
|
|
127
|
-
/** Performs change detection on all cells, refreshing cells where required. */
|
|
128
|
-
refreshCells(params?: RefreshCellsParams<TData>): void;
|
|
129
|
-
/** Flash rows, columns or individual cells. */
|
|
130
|
-
flashCells(params?: FlashCellsParams<TData>): void;
|
|
131
|
-
/** Remove row(s) from the DOM and recreate them again from scratch. */
|
|
132
|
-
redrawRows(params?: RedrawRowsParams<TData>): void;
|
|
133
|
-
/** Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed. */
|
|
134
|
-
refreshHeader(): void;
|
|
135
|
-
/** Returns `true` if any filter is set. This includes quick filter, column filter, external filter or advanced filter. */
|
|
136
|
-
isAnyFilterPresent(): boolean;
|
|
137
|
-
/** Returns `true` if any column filter is set, otherwise `false`. */
|
|
138
|
-
isColumnFilterPresent(): boolean;
|
|
139
|
-
/** Returns `true` if the Quick Filter is set, otherwise `false`. */
|
|
140
|
-
isQuickFilterPresent(): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Returns the row model inside the table.
|
|
143
|
-
* From here you can see the original rows, rows after filter has been applied,
|
|
144
|
-
* rows after aggregation has been applied, and the final set of 'to be displayed' rows.
|
|
145
|
-
*
|
|
146
|
-
* @deprecated As of v31.1, getModel() is deprecated and will not be available in future versions.
|
|
147
|
-
* Please use the appropriate grid API methods instead
|
|
148
|
-
*/
|
|
149
|
-
getModel(): IRowModel;
|
|
150
|
-
/**
|
|
151
|
-
* Expand or collapse a specific row node, optionally expanding/collapsing all of its parent nodes.
|
|
152
|
-
* By default rows are expanded asynchronously for best performance. Set forceSync: `true` if you need to interact with the expanded row immediately after this function.
|
|
153
|
-
*/
|
|
154
|
-
setRowNodeExpanded(rowNode: IRowNode, expanded: boolean, expandParents?: boolean, forceSync?: boolean): void;
|
|
155
|
-
/**
|
|
156
|
-
* Informs the grid that row group expanded state has changed and it needs to rerender the group nodes.
|
|
157
|
-
* Typically called after updating the row node expanded state explicitly, i.e `rowNode.expanded = false`,
|
|
158
|
-
* across multiple groups and you want to update the grid view in a single rerender instead of on every group change.
|
|
159
|
-
*/
|
|
160
|
-
onGroupExpandedOrCollapsed(): void;
|
|
161
|
-
/**
|
|
162
|
-
* Refresh the Client-Side Row Model, executing the grouping, filtering and sorting again.
|
|
163
|
-
* Optionally provide the step you wish the refresh to apply from. Defaults to `everything`.
|
|
164
|
-
*/
|
|
165
|
-
refreshClientSideRowModel(step?: ClientSideRowModelStep): void;
|
|
166
|
-
/** Returns `true` when there are no more animation frames left to process. */
|
|
167
|
-
isAnimationFrameQueueEmpty(): boolean;
|
|
168
|
-
flushAllAnimationFrames(): void;
|
|
169
|
-
/**
|
|
170
|
-
* Returns the row node with the given ID.
|
|
171
|
-
* The row node ID is the one you provide from the callback `getRowId(params)`,
|
|
172
|
-
* otherwise the ID is a number (cast as string) auto-generated by the grid when
|
|
173
|
-
* the row data is set.
|
|
174
|
-
*/
|
|
175
|
-
getRowNode(id: string): IRowNode<TData> | undefined;
|
|
69
|
+
/** 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. */
|
|
70
|
+
destroy(): void;
|
|
71
|
+
/** Returns `true` if the grid has been destroyed. */
|
|
72
|
+
isDestroyed(): boolean;
|
|
176
73
|
/**
|
|
177
|
-
*
|
|
178
|
-
* If you override the row or header height using `gridOptions`, the override value you provided will be returned.
|
|
74
|
+
* Returns the grid option value for a provided key.
|
|
179
75
|
*/
|
|
180
|
-
|
|
181
|
-
rowHeight: number;
|
|
182
|
-
headerHeight: number;
|
|
183
|
-
};
|
|
184
|
-
/** Expand all groups. */
|
|
185
|
-
expandAll(): void;
|
|
186
|
-
/** Collapse all groups. */
|
|
187
|
-
collapseAll(): void;
|
|
76
|
+
getGridOption<Key extends keyof GridOptions<TData>>(key: Key): GridOptions<TData>[Key];
|
|
188
77
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* Unlike normal events, you do not need to unregister rendered row listeners.
|
|
192
|
-
* When the rendered row is removed from the grid, all associated rendered row listeners will also be removed.
|
|
193
|
-
* listen for this event if your `cellRenderer` needs to do cleanup when the row no longer exists.
|
|
78
|
+
* Updates a single gridOption to the new value provided. (Cannot be used on `Initial` properties.)
|
|
79
|
+
* If updating multiple options, it is recommended to instead use `api.updateGridOptions()` which batches update logic.
|
|
194
80
|
*/
|
|
195
|
-
|
|
196
|
-
/** Get the current Quick Filter text from the grid, or `undefined` if none is set. */
|
|
197
|
-
getQuickFilter(): string | undefined;
|
|
198
|
-
/** Get the state of the Advanced Filter. Used for saving Advanced Filter state */
|
|
199
|
-
getAdvancedFilterModel(): AdvancedFilterModel | null;
|
|
200
|
-
/** Set the state of the Advanced Filter. Used for restoring Advanced Filter state */
|
|
201
|
-
setAdvancedFilterModel(advancedFilterModel: AdvancedFilterModel | null): void;
|
|
202
|
-
/** Open the Advanced Filter Builder dialog (if enabled). */
|
|
203
|
-
showAdvancedFilterBuilder(): void;
|
|
81
|
+
setGridOption<Key extends ManagedGridOptionKey>(key: Key, value: GridOptions<TData>[Key]): void;
|
|
204
82
|
/**
|
|
205
|
-
*
|
|
206
|
-
* Un-applied changes are discarded.
|
|
83
|
+
* Updates the provided subset of gridOptions with the provided values. (Cannot be used on `Initial` properties.)
|
|
207
84
|
*/
|
|
208
|
-
|
|
85
|
+
updateGridOptions<TDataUpdate extends TData>(options: ManagedGridOptions<TDataUpdate>): void;
|
|
86
|
+
}
|
|
87
|
+
export interface _RowSelectionGridApi<TData = any> {
|
|
209
88
|
/**
|
|
210
89
|
* Set all of the provided nodes selection state to the provided value.
|
|
211
90
|
*/
|
|
@@ -234,20 +113,6 @@ export interface GridApi<TData = any> {
|
|
|
234
113
|
* @param source Source property that will appear in the `selectionChanged` event, defaults to `'apiSelectAllFiltered'`
|
|
235
114
|
*/
|
|
236
115
|
deselectAllFiltered(source?: SelectionEventSourceType): void;
|
|
237
|
-
/**
|
|
238
|
-
* Returns an object containing rules matching the selected rows in the SSRM.
|
|
239
|
-
*
|
|
240
|
-
* If `groupSelectsChildren=false` the returned object will be flat, and will conform to IServerSideSelectionState.
|
|
241
|
-
* If `groupSelectsChildren=true` the returned object will be hierarchical, and will conform to IServerSideGroupSelectionState.
|
|
242
|
-
*/
|
|
243
|
-
getServerSideSelectionState(): IServerSideSelectionState | IServerSideGroupSelectionState | null;
|
|
244
|
-
/**
|
|
245
|
-
* Set the rules matching the selected rows in the SSRM.
|
|
246
|
-
*
|
|
247
|
-
* If `groupSelectsChildren=false` the param will be flat, and should conform to IServerSideSelectionState.
|
|
248
|
-
* If `groupSelectsChildren=true` the param will be hierarchical, and should conform to IServerSideGroupSelectionState.
|
|
249
|
-
*/
|
|
250
|
-
setServerSideSelectionState(state: IServerSideSelectionState | IServerSideGroupSelectionState): void;
|
|
251
116
|
/**
|
|
252
117
|
* Select all rows on the current page.
|
|
253
118
|
* @param source Source property that will appear in the `selectionChanged` event, defaults to `'apiSelectAllCurrentPage'`
|
|
@@ -258,6 +123,16 @@ export interface GridApi<TData = any> {
|
|
|
258
123
|
* @param source Source property that will appear in the `selectionChanged` event, defaults to `'apiSelectAllCurrentPage'`
|
|
259
124
|
*/
|
|
260
125
|
deselectAllOnCurrentPage(source?: SelectionEventSourceType): void;
|
|
126
|
+
/**
|
|
127
|
+
* Returns an unsorted list of selected nodes.
|
|
128
|
+
* Getting the underlying node (rather than the data) is useful when working with tree / aggregated data,
|
|
129
|
+
* as the node can be traversed.
|
|
130
|
+
*/
|
|
131
|
+
getSelectedNodes(): IRowNode<TData>[];
|
|
132
|
+
/** Returns an unsorted list of selected rows (i.e. row data that you provided). */
|
|
133
|
+
getSelectedRows(): TData[];
|
|
134
|
+
}
|
|
135
|
+
export interface _OverlayGridApi {
|
|
261
136
|
/**
|
|
262
137
|
* Show the 'loading' overlay.
|
|
263
138
|
* @deprecated v32 `showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).
|
|
@@ -267,22 +142,80 @@ export interface GridApi<TData = any> {
|
|
|
267
142
|
showNoRowsOverlay(): void;
|
|
268
143
|
/** Hide the no-rows overlay if it is showing. */
|
|
269
144
|
hideOverlay(): void;
|
|
145
|
+
}
|
|
146
|
+
export interface _RowGridApi<TData> {
|
|
147
|
+
/** Remove row(s) from the DOM and recreate them again from scratch. */
|
|
148
|
+
redrawRows(params?: RedrawRowsParams<TData>): void;
|
|
270
149
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* as the node can be traversed.
|
|
150
|
+
* Expand or collapse a specific row node, optionally expanding/collapsing all of its parent nodes.
|
|
151
|
+
* By default rows are expanded asynchronously for best performance. Set forceSync: `true` if you need to interact with the expanded row immediately after this function.
|
|
274
152
|
*/
|
|
275
|
-
|
|
276
|
-
/** Returns an unsorted list of selected rows (i.e. row data that you provided). */
|
|
277
|
-
getSelectedRows(): TData[];
|
|
153
|
+
setRowNodeExpanded(rowNode: IRowNode, expanded: boolean, expandParents?: boolean, forceSync?: boolean): void;
|
|
278
154
|
/**
|
|
279
|
-
* Returns
|
|
280
|
-
*
|
|
281
|
-
*
|
|
155
|
+
* Returns the row node with the given ID.
|
|
156
|
+
* The row node ID is the one you provide from the callback `getRowId(params)`,
|
|
157
|
+
* otherwise the ID is a number (cast as string) auto-generated by the grid when
|
|
158
|
+
* the row data is set.
|
|
282
159
|
*/
|
|
283
|
-
|
|
160
|
+
getRowNode(id: string): IRowNode<TData> | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* Registers a callback to a virtual row.
|
|
163
|
+
* A virtual row is a row that is visually rendered on the screen (rows that are not visible because of the scroll position are not rendered).
|
|
164
|
+
* Unlike normal events, you do not need to unregister rendered row listeners.
|
|
165
|
+
* When the rendered row is removed from the grid, all associated rendered row listeners will also be removed.
|
|
166
|
+
* listen for this event if your `cellRenderer` needs to do cleanup when the row no longer exists.
|
|
167
|
+
*/
|
|
168
|
+
addRenderedRowListener(eventName: RenderedRowEvent, rowIndex: number, callback: (...args: any[]) => any): void;
|
|
284
169
|
/** Retrieve rendered nodes. Due to virtualisation this will contain only the current visible rows and those in the buffer. */
|
|
285
170
|
getRenderedNodes(): IRowNode<TData>[];
|
|
171
|
+
/**
|
|
172
|
+
* Iterates through each node (row) in the grid and calls the callback for each node.
|
|
173
|
+
* This works similar to the `forEach` method on a JavaScript array.
|
|
174
|
+
* This is called for every node, ignoring any filtering or sorting applied within the grid.
|
|
175
|
+
* If using the Infinite Row Model, then this gets called for each page loaded in the page cache.
|
|
176
|
+
*/
|
|
177
|
+
forEachNode(callback: (rowNode: IRowNode<TData>, index: number) => void, includeFooterNodes?: boolean): void;
|
|
178
|
+
/** @deprecated v31.1 `getFirstDisplayedRow` is deprecated. Please use `getFirstDisplayedRowIndex` instead. */
|
|
179
|
+
getFirstDisplayedRow(): number;
|
|
180
|
+
/** Get the index of the first displayed row due to scrolling (includes invisible rendered rows in the buffer). */
|
|
181
|
+
getFirstDisplayedRowIndex(): number;
|
|
182
|
+
/** @deprecated v31.1 `getLastDisplayedRow` is deprecated. Please use `getLastDisplayedRowIndex` instead. */
|
|
183
|
+
getLastDisplayedRow(): number;
|
|
184
|
+
/** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */
|
|
185
|
+
getLastDisplayedRowIndex(): number;
|
|
186
|
+
/** Returns the displayed `RowNode` at the given `index`. */
|
|
187
|
+
getDisplayedRowAtIndex(index: number): IRowNode<TData> | undefined;
|
|
188
|
+
/** Returns the total number of displayed rows. */
|
|
189
|
+
getDisplayedRowCount(): number;
|
|
190
|
+
/**
|
|
191
|
+
* Returns the row model inside the table.
|
|
192
|
+
* From here you can see the original rows, rows after filter has been applied,
|
|
193
|
+
* rows after aggregation has been applied, and the final set of 'to be displayed' rows.
|
|
194
|
+
*
|
|
195
|
+
* @deprecated As of v31.1, getModel() is deprecated and will not be available in future versions.
|
|
196
|
+
* Please use the appropriate grid API methods instead
|
|
197
|
+
*/
|
|
198
|
+
getModel(): IRowModel;
|
|
199
|
+
}
|
|
200
|
+
export interface _ScrollGridApi<TData> {
|
|
201
|
+
/**
|
|
202
|
+
* Returns an object with two properties:
|
|
203
|
+
* - `top`: The top pixel position of the current scroll in the grid
|
|
204
|
+
* - `bottom`: The bottom pixel position of the current scroll in the grid
|
|
205
|
+
*/
|
|
206
|
+
getVerticalPixelRange(): {
|
|
207
|
+
top: number;
|
|
208
|
+
bottom: number;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Returns an object with two properties:
|
|
212
|
+
* - `left`: The left pixel position of the current scroll in the grid
|
|
213
|
+
* - `right`: The right pixel position of the current scroll in the grid
|
|
214
|
+
*/
|
|
215
|
+
getHorizontalPixelRange(): {
|
|
216
|
+
left: number;
|
|
217
|
+
right: number;
|
|
218
|
+
};
|
|
286
219
|
/**
|
|
287
220
|
* Ensures the column is visible by scrolling the table if needed.
|
|
288
221
|
*
|
|
@@ -308,125 +241,45 @@ export interface GridApi<TData = any> {
|
|
|
308
241
|
* This will have no effect before the firstDataRendered event has fired.
|
|
309
242
|
*/
|
|
310
243
|
ensureNodeVisible(nodeSelector: TData | IRowNode<TData> | ((row: IRowNode<TData>) => boolean), position?: 'top' | 'bottom' | 'middle' | null): void;
|
|
244
|
+
}
|
|
245
|
+
export interface _KeyboardNavigationGridApi {
|
|
246
|
+
/** Returns the focused cell (or the last focused cell if the grid lost focus). */
|
|
247
|
+
getFocusedCell(): CellPosition | null;
|
|
248
|
+
/** Clears the focused cell. */
|
|
249
|
+
clearFocusedCell(): void;
|
|
250
|
+
/** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */
|
|
251
|
+
setFocusedCell(rowIndex: number, colKey: string | Column, rowPinned?: RowPinnedType): void;
|
|
252
|
+
/** Sets the focus to the specified header. If `floatingFilter` is true, the Column's floatingFilter element will be focused. */
|
|
253
|
+
setFocusedHeader(colKey: string | Column | ColumnGroup, floatingFilter?: boolean): void;
|
|
254
|
+
/** Navigates the grid focus to the next cell, as if tabbing. */
|
|
255
|
+
tabToNextCell(event?: KeyboardEvent): boolean;
|
|
256
|
+
/** Navigates the grid focus to the previous cell, as if shift-tabbing. */
|
|
257
|
+
tabToPreviousCell(event?: KeyboardEvent): boolean;
|
|
258
|
+
}
|
|
259
|
+
export interface _EventGridApi<TData> {
|
|
311
260
|
/**
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*/
|
|
317
|
-
forEachLeafNode(callback: (rowNode: IRowNode<TData>) => void): void;
|
|
318
|
-
/**
|
|
319
|
-
* Iterates through each node (row) in the grid and calls the callback for each node.
|
|
320
|
-
* This works similar to the `forEach` method on a JavaScript array.
|
|
321
|
-
* This is called for every node, ignoring any filtering or sorting applied within the grid.
|
|
322
|
-
* If using the Infinite Row Model, then this gets called for each page loaded in the page cache.
|
|
323
|
-
*/
|
|
324
|
-
forEachNode(callback: (rowNode: IRowNode<TData>, index: number) => void, includeFooterNodes?: boolean): void;
|
|
325
|
-
/** Similar to `forEachNode`, except skips any filtered out data. */
|
|
326
|
-
forEachNodeAfterFilter(callback: (rowNode: IRowNode<TData>, index: number) => void): void;
|
|
327
|
-
/** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */
|
|
328
|
-
forEachNodeAfterFilterAndSort(callback: (rowNode: IRowNode<TData>, index: number) => void): void;
|
|
329
|
-
/**
|
|
330
|
-
* @deprecated v31.1 To get/set individual filter models, use `getColumnFilterModel` or `setColumnFilterModel` instead.
|
|
331
|
-
* To get hold of the filter instance, use `getColumnFilterInstance` which returns the instance asynchronously.
|
|
332
|
-
* This method now only works asynchronously via the callback. The return value will always be `undefined`.
|
|
333
|
-
*/
|
|
334
|
-
getFilterInstance<TFilter extends IFilter>(key: string | Column, callback?: (filter: TFilter | null) => void): undefined;
|
|
335
|
-
/**
|
|
336
|
-
* Returns the filter component instance for a column.
|
|
337
|
-
* For getting/setting models for individual column filters, use `getColumnFilterModel` and `setColumnFilterModel` instead of this.
|
|
338
|
-
* `key` can be a column ID or a `Column` object.
|
|
339
|
-
*/
|
|
340
|
-
getColumnFilterInstance<TFilter extends IFilter>(key: string | Column): Promise<TFilter | null | undefined>;
|
|
341
|
-
/** Destroys a filter. Useful to force a particular filter to be created from scratch again. */
|
|
342
|
-
destroyFilter(key: string | Column): void;
|
|
343
|
-
/** Gets the status panel instance corresponding to the supplied `id`. */
|
|
344
|
-
getStatusPanel<TStatusPanel = IStatusPanel>(key: string): TStatusPanel | undefined;
|
|
345
|
-
getColumnDef<TValue = any>(key: string | Column<TValue>): ColDef<TData, TValue> | null;
|
|
346
|
-
/**
|
|
347
|
-
* Returns the current column definitions.
|
|
348
|
-
*/
|
|
349
|
-
getColumnDefs(): (ColDef<TData> | ColGroupDef<TData>)[] | undefined;
|
|
350
|
-
/**
|
|
351
|
-
* Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs.
|
|
352
|
-
* @param source The source of the filter change event. If not specified defaults to `'api'`.
|
|
353
|
-
*/
|
|
354
|
-
onFilterChanged(source?: FilterChangedEventSourceType): void;
|
|
355
|
-
/**
|
|
356
|
-
* Gets the grid to act as if the sort was changed.
|
|
357
|
-
* Useful if you update some values and want to get the grid to reorder them according to the new values.
|
|
358
|
-
*/
|
|
359
|
-
onSortChanged(): void;
|
|
360
|
-
/**
|
|
361
|
-
* Sets the state of all the column filters. Provide it with what you get from `getFilterModel()` to restore filter state.
|
|
362
|
-
* If inferring cell data types, and row data is provided asynchronously and is yet to be set,
|
|
363
|
-
* the filter model will be applied asynchronously after row data is added.
|
|
364
|
-
* To always perform this synchronously, set `cellDataType = false` on the default column definition,
|
|
365
|
-
* or provide cell data types for every column.
|
|
366
|
-
*/
|
|
367
|
-
setFilterModel(model: FilterModel | null): void;
|
|
368
|
-
/** Gets the current state of all the column filters. Used for saving filter state. */
|
|
369
|
-
getFilterModel(): FilterModel;
|
|
370
|
-
/**
|
|
371
|
-
* Gets the current filter model for the specified column.
|
|
372
|
-
* Will return `null` if no active filter.
|
|
373
|
-
*/
|
|
374
|
-
getColumnFilterModel<TModel>(column: string | Column): TModel | null;
|
|
375
|
-
/**
|
|
376
|
-
* Sets the filter model for the specified column.
|
|
377
|
-
* Setting a `model` of `null` will reset the filter (make inactive).
|
|
378
|
-
* Must wait on the response before calling `api.onFilterChanged()`.
|
|
261
|
+
* Add an event listener for the specified `eventType`.
|
|
262
|
+
* Listener will receive the `event` as a single parameter.
|
|
263
|
+
* Listeners will be automatically removed when the grid is destroyed.
|
|
264
|
+
* @example api.addEventListener('rowClicked', (event) => { console.log('Row clicked', event);});
|
|
379
265
|
*/
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
|
|
383
|
-
/** Clears the focused cell. */
|
|
384
|
-
clearFocusedCell(): void;
|
|
385
|
-
/** Sets the focus to the specified cell. `rowPinned` can be either 'top', 'bottom' or null (for not pinned). */
|
|
386
|
-
setFocusedCell(rowIndex: number, colKey: string | Column, rowPinned?: RowPinnedType): void;
|
|
387
|
-
/** Sets the focus to the specified header. If `floatingFilter` is true, the Column's floatingFilter element will be focused. */
|
|
388
|
-
setFocusedHeader(colKey: string | Column | ColumnGroup, floatingFilter?: boolean): void;
|
|
389
|
-
/** Adds a drop zone outside of the grid where rows can be dropped. */
|
|
390
|
-
addRowDropZone(params: RowDropZoneParams): void;
|
|
391
|
-
/** Removes an external drop zone added by `addRowDropZone`. */
|
|
392
|
-
removeRowDropZone(params: RowDropZoneParams): void;
|
|
393
|
-
/** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */
|
|
394
|
-
getRowDropZoneParams(events?: RowDropZoneEvents): RowDropZoneParams;
|
|
395
|
-
/** Returns `true` if the side bar is visible. */
|
|
396
|
-
isSideBarVisible(): boolean;
|
|
397
|
-
/** Show/hide the entire side bar, including any visible panel and the tab buttons. */
|
|
398
|
-
setSideBarVisible(show: boolean): void;
|
|
399
|
-
/** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */
|
|
400
|
-
setSideBarPosition(position: 'left' | 'right'): void;
|
|
401
|
-
/** Opens a particular tool panel. Provide the ID of the tool panel to open. */
|
|
402
|
-
openToolPanel(key: string): void;
|
|
403
|
-
/** Closes the currently open tool panel (if any). */
|
|
404
|
-
closeToolPanel(): void;
|
|
405
|
-
/** Returns the ID of the currently shown tool panel if any, otherwise `null`. */
|
|
406
|
-
getOpenedToolPanel(): string | null;
|
|
407
|
-
/** Force refresh all tool panels by calling their `refresh` method. */
|
|
408
|
-
refreshToolPanel(): void;
|
|
409
|
-
/** Returns `true` if the tool panel is showing, otherwise `false`. */
|
|
410
|
-
isToolPanelShowing(): boolean;
|
|
411
|
-
getToolPanelInstance(id: 'columns'): IColumnToolPanel | undefined;
|
|
412
|
-
getToolPanelInstance(id: 'filters'): IFiltersToolPanel | undefined;
|
|
413
|
-
getToolPanelInstance<TToolPanel = IToolPanel>(id: string): TToolPanel | undefined;
|
|
414
|
-
/** Gets the tool panel instance corresponding to the supplied `id`. */
|
|
415
|
-
getToolPanelInstance<TToolPanel = IToolPanel>(id: string): TToolPanel | undefined;
|
|
416
|
-
/** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */
|
|
417
|
-
getSideBar(): SideBarDef | undefined;
|
|
418
|
-
/** Tells the grid to recalculate the row heights. */
|
|
419
|
-
resetRowHeights(): void;
|
|
266
|
+
addEventListener<TEventType extends AgPublicEventType>(eventType: TEventType, listener: AgEventListener<TData, any, TEventType>): void;
|
|
267
|
+
/** Remove an event listener. */
|
|
268
|
+
removeEventListener<TEventType extends AgPublicEventType>(eventType: TEventType, listener: AgEventListener<TData, any, TEventType>): void;
|
|
420
269
|
/**
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
270
|
+
* Add an event listener for all event types coming from the grid.
|
|
271
|
+
* Listener will receive `eventType` and `event` as parameters.
|
|
272
|
+
* Listeners will be automatically removed when the grid is destroyed.
|
|
273
|
+
* If handling multiple event types it is recommended to use `event.type` to enable TypeScript to infer the event parameters.
|
|
274
|
+
* @example api.addGlobalListener((eventType, event) => { });
|
|
426
275
|
*/
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
|
|
276
|
+
addGlobalListener<TEventType extends AgPublicEventType>(listener: AgGlobalEventListener<TData, any, TEventType>): void;
|
|
277
|
+
/** Remove a global event listener. */
|
|
278
|
+
removeGlobalListener<TEventType extends AgPublicEventType>(listener: AgGlobalEventListener<TData, any, TEventType>): void;
|
|
279
|
+
}
|
|
280
|
+
export interface _CellGridApi<TData> {
|
|
281
|
+
/** Expire the value cache. */
|
|
282
|
+
expireValueCache(): void;
|
|
430
283
|
/**
|
|
431
284
|
* @deprecated v31.3 Use `getCellValue` instead.
|
|
432
285
|
*/
|
|
@@ -443,136 +296,49 @@ export interface GridApi<TData = any> {
|
|
|
443
296
|
getCellValue<TValue = any>(params: GetCellValueParams<TValue>): TValue | null | undefined;
|
|
444
297
|
getCellValue<TValue = any>(params: GetCellValueParams<TValue>): string | TValue | null | undefined;
|
|
445
298
|
getCellValue<TValue = any>(params: GetCellValueParams<TValue>): string | TValue | null | undefined;
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
* Listener will receive the `event` as a single parameter.
|
|
449
|
-
* Listeners will be automatically removed when the grid is destroyed.
|
|
450
|
-
* @example api.addEventListener('rowClicked', (event) => { console.log('Row clicked', event);});
|
|
451
|
-
*/
|
|
452
|
-
addEventListener<TEventType extends AgPublicEventType>(eventType: TEventType, listener: AgEventListener<TData, any, TEventType>): void;
|
|
453
|
-
/** Remove an event listener. */
|
|
454
|
-
removeEventListener<TEventType extends AgPublicEventType>(eventType: TEventType, listener: AgEventListener<TData, any, TEventType>): void;
|
|
455
|
-
/**
|
|
456
|
-
* Add an event listener for all event types coming from the grid.
|
|
457
|
-
* Listener will receive `eventType` and `event` as parameters.
|
|
458
|
-
* Listeners will be automatically removed when the grid is destroyed.
|
|
459
|
-
* If handling multiple event types it is recommended to use `event.type` to enable TypeScript to infer the event parameters.
|
|
460
|
-
* @example api.addGlobalListener((eventType, event) => { });
|
|
461
|
-
*/
|
|
462
|
-
addGlobalListener<TEventType extends AgPublicEventType>(listener: AgGlobalEventListener<TData, any, TEventType>): void;
|
|
463
|
-
/** Remove a global event listener. */
|
|
464
|
-
removeGlobalListener<TEventType extends AgPublicEventType>(listener: AgGlobalEventListener<TData, any, TEventType>): void;
|
|
465
|
-
dispatchEvent(event: AgEvent): void;
|
|
466
|
-
/** 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. */
|
|
467
|
-
destroy(): void;
|
|
468
|
-
/** Returns `true` if the grid has been destroyed. */
|
|
469
|
-
isDestroyed(): boolean;
|
|
470
|
-
/** Reset the Quick Filter cache text on every rowNode. */
|
|
471
|
-
resetQuickFilter(): void;
|
|
472
|
-
/** Returns the list of selected cell ranges. */
|
|
473
|
-
getCellRanges(): CellRange[] | null;
|
|
474
|
-
/** Adds the provided cell range to the selected ranges. */
|
|
475
|
-
addCellRange(params: CellRangeParams): void;
|
|
476
|
-
/** Clears the selected ranges. */
|
|
477
|
-
clearRangeSelection(): void;
|
|
478
|
-
/** Reverts the last cell edit. */
|
|
479
|
-
undoCellEditing(): void;
|
|
480
|
-
/** Re-applies the most recently undone cell edit. */
|
|
481
|
-
redoCellEditing(): void;
|
|
482
|
-
/** Returns current number of available cell edit undo operations. */
|
|
483
|
-
getCurrentUndoSize(): number;
|
|
484
|
-
/** Returns current number of available cell edit redo operations. */
|
|
485
|
-
getCurrentRedoSize(): number;
|
|
486
|
-
/** Returns a list of models with information about the charts that are currently rendered from the grid. */
|
|
487
|
-
getChartModels(): ChartModel[] | undefined;
|
|
488
|
-
/** Returns the `ChartRef` using the supplied `chartId`. */
|
|
489
|
-
getChartRef(chartId: string): ChartRef | undefined;
|
|
490
|
-
/** Returns a base64-encoded image data URL for the referenced chartId. */
|
|
491
|
-
getChartImageDataURL(params: GetChartImageDataUrlParams): string | undefined;
|
|
492
|
-
/** Starts a browser-based image download for the referenced chartId. */
|
|
493
|
-
downloadChart(params: ChartDownloadParams): void;
|
|
494
|
-
/** Open the Chart Tool Panel. */
|
|
495
|
-
openChartToolPanel(params: OpenChartToolPanelParams): void;
|
|
496
|
-
/** Close the Chart Tool Panel. */
|
|
497
|
-
closeChartToolPanel(params: CloseChartToolPanelParams): void;
|
|
498
|
-
/** Used to programmatically create charts from a range. */
|
|
499
|
-
createRangeChart(params: CreateRangeChartParams): ChartRef | undefined;
|
|
500
|
-
/** Used to programmatically create pivot charts from a grid. */
|
|
501
|
-
createPivotChart(params: CreatePivotChartParams): ChartRef | undefined;
|
|
502
|
-
/** Used to programmatically create cross filter charts from a range. */
|
|
503
|
-
createCrossFilterChart(params: CreateCrossFilterChartParams): ChartRef | undefined;
|
|
504
|
-
/** Used to programmatically update a chart. */
|
|
505
|
-
updateChart(params: UpdateChartParams): void;
|
|
506
|
-
/** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */
|
|
507
|
-
restoreChart(chartModel: ChartModel, chartContainer?: HTMLElement): ChartRef | undefined;
|
|
508
|
-
/** Copies data to clipboard by following the same rules as pressing Ctrl+C. */
|
|
509
|
-
copyToClipboard(params?: IClipboardCopyParams): void;
|
|
510
|
-
/** Cuts data to clipboard by following the same rules as pressing Ctrl+X. */
|
|
511
|
-
cutToClipboard(params?: IClipboardCopyParams): void;
|
|
512
|
-
/** Copies the selected rows to the clipboard. */
|
|
513
|
-
copySelectedRowsToClipboard(params?: IClipboardCopyRowsParams): void;
|
|
514
|
-
/** Copies the selected ranges to the clipboard. */
|
|
515
|
-
copySelectedRangeToClipboard(params?: IClipboardCopyParams): void;
|
|
516
|
-
/** Copies the selected range down, similar to `Ctrl + D` in Excel. */
|
|
517
|
-
copySelectedRangeDown(): void;
|
|
518
|
-
/** Pastes the data from the Clipboard into the focused cell of the grid. If no grid cell is focused, calling this method has no effect. */
|
|
519
|
-
pasteFromClipboard(): void;
|
|
299
|
+
}
|
|
300
|
+
export interface _CommunityMenuGridApi {
|
|
520
301
|
/** @deprecated v31.1 Use `IHeaderParams.showColumnMenu` within a header component, or `api.showColumnMenu` elsewhere. */
|
|
521
302
|
showColumnMenuAfterButtonClick(colKey: string | Column, buttonElement: HTMLElement): void;
|
|
522
303
|
/** @deprecated v31.1 Use `IHeaderParams.showColumnMenuAfterMouseClick` within a header component, or `api.showColumnMenu` elsewhere. */
|
|
523
304
|
showColumnMenuAfterMouseClick(colKey: string | Column, mouseEvent: MouseEvent | Touch): void;
|
|
524
|
-
/**
|
|
525
|
-
* Displays the AG Grid context menu
|
|
526
|
-
*/
|
|
527
|
-
showContextMenu(params?: IContextMenuParams): void;
|
|
528
|
-
/** Show the column chooser. */
|
|
529
|
-
showColumnChooser(params?: ColumnChooserParams): void;
|
|
530
|
-
/** Show the filter for the provided column. */
|
|
531
|
-
showColumnFilter(colKey: string | Column): void;
|
|
532
305
|
/** Show the column menu for the provided column. */
|
|
533
306
|
showColumnMenu(colKey: string | Column): void;
|
|
534
307
|
/** Hides any visible context menu or column menu. */
|
|
535
308
|
hidePopupMenu(): void;
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
/** Navigates the grid focus to the next cell, as if tabbing. */
|
|
539
|
-
tabToNextCell(event?: KeyboardEvent): boolean;
|
|
540
|
-
/** Navigates the grid focus to the previous cell, as if shift-tabbing. */
|
|
541
|
-
tabToPreviousCell(event?: KeyboardEvent): boolean;
|
|
542
|
-
/** Returns the list of active cell renderer instances. */
|
|
543
|
-
getCellRendererInstances(params?: GetCellRendererInstancesParams<TData>): ICellRenderer[];
|
|
544
|
-
/** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */
|
|
545
|
-
getCellEditorInstances(params?: GetCellEditorInstancesParams<TData>): ICellEditor[];
|
|
546
|
-
/** If the grid is editing, returns back details of the editing cell(s). */
|
|
547
|
-
getEditingCells(): CellPosition[];
|
|
548
|
-
/** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */
|
|
549
|
-
stopEditing(cancel?: boolean): void;
|
|
550
|
-
/** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */
|
|
551
|
-
startEditingCell(params: StartEditingCellParams): void;
|
|
552
|
-
/** @deprecated v31.1 addAggFunc(key, func) is deprecated, please use addAggFuncs({ key: func }) instead. */
|
|
553
|
-
addAggFunc(key: string, aggFunc: IAggFunc): void;
|
|
554
|
-
/** Add aggregations function with the specified keys. */
|
|
555
|
-
addAggFuncs(aggFuncs: {
|
|
556
|
-
[key: string]: IAggFunc;
|
|
557
|
-
}): void;
|
|
558
|
-
/** Clears all aggregation functions (including those provided by the grid). */
|
|
559
|
-
clearAggFuncs(): void;
|
|
560
|
-
/** Apply transactions to the server side row model. */
|
|
561
|
-
applyServerSideTransaction(transaction: ServerSideTransaction): ServerSideTransactionResult | undefined;
|
|
562
|
-
/** Batch apply transactions to the server side row model. */
|
|
563
|
-
applyServerSideTransactionAsync(transaction: ServerSideTransaction, callback?: (res: ServerSideTransactionResult) => void): void;
|
|
309
|
+
}
|
|
310
|
+
export interface _SortGridApi {
|
|
564
311
|
/**
|
|
565
|
-
*
|
|
566
|
-
*
|
|
312
|
+
* Gets the grid to act as if the sort was changed.
|
|
313
|
+
* Useful if you update some values and want to get the grid to reorder them according to the new values.
|
|
567
314
|
*/
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
315
|
+
onSortChanged(): void;
|
|
316
|
+
}
|
|
317
|
+
export interface _ClientSideRowModelGridApi<TData> {
|
|
318
|
+
/**
|
|
319
|
+
* Informs the grid that row group expanded state has changed and it needs to rerender the group nodes.
|
|
320
|
+
* Typically called after updating the row node expanded state explicitly, i.e `rowNode.expanded = false`,
|
|
321
|
+
* across multiple groups and you want to update the grid view in a single rerender instead of on every group change.
|
|
322
|
+
*/
|
|
323
|
+
onGroupExpandedOrCollapsed(): void;
|
|
324
|
+
/**
|
|
325
|
+
* Refresh the Client-Side Row Model, executing the grouping, filtering and sorting again.
|
|
326
|
+
* Optionally provide the step you wish the refresh to apply from. Defaults to `everything`.
|
|
327
|
+
*/
|
|
328
|
+
refreshClientSideRowModel(step?: ClientSideRowModelStep): void;
|
|
329
|
+
/**
|
|
330
|
+
* Similar to `forEachNode`, except lists all the leaf nodes.
|
|
331
|
+
* This effectively goes through all the data that you provided to the grid before the grid performed any grouping.
|
|
332
|
+
* If using tree data, goes through all the nodes for the data you provided, including nodes that have children,
|
|
333
|
+
* but excluding groups the grid created where gaps were missing in the hierarchy.
|
|
334
|
+
*/
|
|
335
|
+
forEachLeafNode(callback: (rowNode: IRowNode<TData>) => void): void;
|
|
336
|
+
/** Similar to `forEachNode`, except skips any filtered out data. */
|
|
337
|
+
forEachNodeAfterFilter(callback: (rowNode: IRowNode<TData>, index: number) => void): void;
|
|
338
|
+
/** Similar to `forEachNodeAfterFilter`, except the callbacks are called in the order the rows are displayed in the grid. */
|
|
339
|
+
forEachNodeAfterFilterAndSort(callback: (rowNode: IRowNode<TData>, index: number) => void): void;
|
|
340
|
+
/** Tells the grid to recalculate the row heights. */
|
|
341
|
+
resetRowHeights(): void;
|
|
576
342
|
/** Update row data. Pass a transaction object with lists for `add`, `remove` and `update`. */
|
|
577
343
|
applyTransaction(rowDataTransaction: RowDataTransaction<TData>): RowNodeTransaction<TData> | null | undefined;
|
|
578
344
|
/** Same as `applyTransaction` except executes asynchronously for efficiency. */
|
|
@@ -580,71 +346,44 @@ export interface GridApi<TData = any> {
|
|
|
580
346
|
/** Executes any remaining asynchronous grid transactions, if any are waiting to be executed. */
|
|
581
347
|
flushAsyncTransactions(): void;
|
|
582
348
|
/**
|
|
583
|
-
*
|
|
584
|
-
* If
|
|
585
|
-
*
|
|
586
|
-
*/
|
|
587
|
-
refreshInfiniteCache(): void;
|
|
588
|
-
/**
|
|
589
|
-
* Purges the cache.
|
|
590
|
-
* 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).
|
|
591
|
-
* The grid will display nothing while the new blocks are loaded.
|
|
592
|
-
* Use this to immediately remove the old data from the user.
|
|
349
|
+
* Returns a list of all selected nodes at 'best cost', a feature to be used with groups / trees.
|
|
350
|
+
* If a group has all its children selected, then the group appears in the result, but not the children.
|
|
351
|
+
* Designed for use with `'children'` as the group selection type, where groups don't actually appear in the selection normally.
|
|
593
352
|
*/
|
|
594
|
-
|
|
353
|
+
getBestCostNodeSelection(): IRowNode<TData>[] | undefined;
|
|
354
|
+
/** Returns `true` if the Client-Side row model has no rows. It is not impacted by filtering and does not include pinned rows. */
|
|
355
|
+
isRowDataEmpty(): boolean;
|
|
356
|
+
}
|
|
357
|
+
export interface _CsrmSsrmSharedGridApi {
|
|
358
|
+
/** Expand all groups. */
|
|
359
|
+
expandAll(): void;
|
|
360
|
+
/** Collapse all groups. */
|
|
361
|
+
collapseAll(): void;
|
|
362
|
+
/** Tells the grid a row height has changed. To be used after calling `rowNode.setRowHeight(newHeight)`. */
|
|
363
|
+
onRowHeightChanged(): void;
|
|
364
|
+
}
|
|
365
|
+
export interface _SsrmInfiniteSharedGridApi {
|
|
595
366
|
/**
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
367
|
+
* Sets the `rowCount` and `maxRowFound` properties.
|
|
368
|
+
* The second parameter, `maxRowFound`, is optional and if left out, only `rowCount` is set.
|
|
369
|
+
* Set `rowCount` to adjust the height of the vertical scroll.
|
|
370
|
+
* Set `maxRowFound` to enable / disable searching for more rows.
|
|
371
|
+
* Use this method if you add or remove rows into the dataset and need to reset the number of rows or instruct the grid that the entire row count is no longer known.
|
|
600
372
|
*/
|
|
601
|
-
|
|
602
|
-
/** Returns info on all server side group levels. */
|
|
603
|
-
getServerSideGroupLevelState(): ServerSideGroupLevelState[];
|
|
604
|
-
/** The row count defines how many rows the grid allows scrolling to. */
|
|
605
|
-
getInfiniteRowCount(): number | undefined;
|
|
606
|
-
/** Returns `true` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */
|
|
607
|
-
isLastRowIndexKnown(): boolean | undefined;
|
|
373
|
+
setRowCount(rowCount: number, maxRowFound?: boolean): void;
|
|
608
374
|
/**
|
|
609
375
|
* Returns an object representing the state of the cache. This is useful for debugging and understanding how the cache is working.
|
|
610
376
|
*/
|
|
611
377
|
getCacheBlockState(): any;
|
|
612
|
-
/**
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
getLastDisplayedRow(): number;
|
|
618
|
-
/** Get the index of the last displayed row due to scrolling (includes invisible rendered rows in the buffer). */
|
|
619
|
-
getLastDisplayedRowIndex(): number;
|
|
620
|
-
/** Returns the displayed `RowNode` at the given `index`. */
|
|
621
|
-
getDisplayedRowAtIndex(index: number): IRowNode<TData> | undefined;
|
|
622
|
-
/** Returns the total number of displayed rows. */
|
|
623
|
-
getDisplayedRowCount(): number;
|
|
378
|
+
/** Returns `false` if grid allows for scrolling past the last row to load more rows, thus providing infinite scroll. */
|
|
379
|
+
isLastRowIndexKnown(): boolean | undefined;
|
|
380
|
+
}
|
|
381
|
+
export interface _ColumnGridApi<TData> {
|
|
382
|
+
getColumnDef<TValue = any>(key: string | Column<TValue>): ColDef<TData, TValue> | null;
|
|
624
383
|
/**
|
|
625
|
-
* Returns
|
|
626
|
-
* This will always be `true` if you are using the Client-Side Row Model for pagination.
|
|
627
|
-
* Returns `false` when the last page is not known; this only happens when using Infinite Row Model.
|
|
384
|
+
* Returns the current column definitions.
|
|
628
385
|
*/
|
|
629
|
-
|
|
630
|
-
/** Returns how many rows are being shown per page. */
|
|
631
|
-
paginationGetPageSize(): number;
|
|
632
|
-
/** Returns the 0-based index of the page which is showing. */
|
|
633
|
-
paginationGetCurrentPage(): number;
|
|
634
|
-
/** Returns the total number of pages. Returns `null` if `paginationIsLastPageFound() === false`. */
|
|
635
|
-
paginationGetTotalPages(): number;
|
|
636
|
-
/** The total number of rows. Returns `null` if `paginationIsLastPageFound() === false`. */
|
|
637
|
-
paginationGetRowCount(): number;
|
|
638
|
-
/** Navigates to the next page. */
|
|
639
|
-
paginationGoToNextPage(): void;
|
|
640
|
-
/** Navigates to the previous page. */
|
|
641
|
-
paginationGoToPreviousPage(): void;
|
|
642
|
-
/** Navigates to the first page. */
|
|
643
|
-
paginationGoToFirstPage(): void;
|
|
644
|
-
/** Navigates to the last page. */
|
|
645
|
-
paginationGoToLastPage(): void;
|
|
646
|
-
/** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */
|
|
647
|
-
paginationGoToPage(page: number): void;
|
|
386
|
+
getColumnDefs(): (ColDef<TData> | ColGroupDef<TData>)[] | undefined;
|
|
648
387
|
/**
|
|
649
388
|
* Adjusts the size of columns to fit the available horizontal space.
|
|
650
389
|
*
|
|
@@ -653,7 +392,8 @@ export interface GridApi<TData = any> {
|
|
|
653
392
|
* cause the scrollbar to flicker. Use column flex for smoother results.
|
|
654
393
|
*
|
|
655
394
|
* If inferring cell data types with custom column types
|
|
656
|
-
* and row data is
|
|
395
|
+
* and row data is initially empty or yet to be set,
|
|
396
|
+
* the column sizing will happen asynchronously when row data is added.
|
|
657
397
|
* To always perform this synchronously, set `cellDataType = false` on the default column definition.
|
|
658
398
|
**/
|
|
659
399
|
sizeColumnsToFit(paramsOrGridWidth?: ISizeColumnsToFitParams | number): void;
|
|
@@ -696,9 +436,9 @@ export interface GridApi<TData = any> {
|
|
|
696
436
|
/** Returns `true` if pinning right, otherwise `false`. */
|
|
697
437
|
isPinningRight(): boolean;
|
|
698
438
|
/** Returns the column to the right of the provided column, taking into consideration open / closed column groups and visible columns. This is useful if you need to know what column is beside yours e.g. if implementing your own cell navigation. */
|
|
699
|
-
getDisplayedColAfter(col: Column): Column | null;
|
|
439
|
+
getDisplayedColAfter<TValue = any>(col: Column): Column<TValue> | null;
|
|
700
440
|
/** Same as `getVisibleColAfter` except gives column to the left. */
|
|
701
|
-
getDisplayedColBefore(col: Column): Column | null;
|
|
441
|
+
getDisplayedColBefore<TValue = any>(col: Column): Column<TValue> | null;
|
|
702
442
|
/** @deprecated v31.1 setColumnVisible(key, visible) deprecated, please use setColumnsVisible([key], visible) instead. */
|
|
703
443
|
setColumnVisible(key: string | Column, visible: boolean): void;
|
|
704
444
|
/** Sets the visibility of columns. Key can be the column ID or `Column` object. */
|
|
@@ -708,43 +448,285 @@ export interface GridApi<TData = any> {
|
|
|
708
448
|
/** Set a column's pinned / unpinned state. Key can be the column ID, field, `ColDef` object or `Column` object. */
|
|
709
449
|
setColumnsPinned(keys: (string | ColDef | Column)[], pinned: ColumnPinnedType): void;
|
|
710
450
|
/**
|
|
711
|
-
* Returns all the grid columns, same as `getColumns()`, except
|
|
712
|
-
*
|
|
713
|
-
* a) it has the order of the columns that are presented in the grid
|
|
714
|
-
*
|
|
715
|
-
* b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.
|
|
451
|
+
* Returns all the grid columns, same as `getColumns()`, except
|
|
452
|
+
*
|
|
453
|
+
* a) it has the order of the columns that are presented in the grid
|
|
454
|
+
*
|
|
455
|
+
* b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.
|
|
456
|
+
*/
|
|
457
|
+
getAllGridColumns(): Column[];
|
|
458
|
+
/** Same as `getAllDisplayedColumns` but just for the pinned left portion of the grid. */
|
|
459
|
+
getDisplayedLeftColumns(): Column[];
|
|
460
|
+
/** Same as `getAllDisplayedColumns` but just for the center portion of the grid. */
|
|
461
|
+
getDisplayedCenterColumns(): Column[];
|
|
462
|
+
/** Same as `getAllDisplayedColumns` but just for the pinned right portion of the grid. */
|
|
463
|
+
getDisplayedRightColumns(): Column[];
|
|
464
|
+
/** Returns all columns currently displayed (e.g. are visible and if in a group, the group is showing the columns) for the pinned left, centre and pinned right portions of the grid. */
|
|
465
|
+
getAllDisplayedColumns(): Column[];
|
|
466
|
+
/** Same as `getAllGridColumns()`, except only returns rendered columns, i.e. columns that are not within the viewport and therefore not rendered, due to column virtualisation, are not displayed. */
|
|
467
|
+
getAllDisplayedVirtualColumns(): Column[];
|
|
468
|
+
/** @deprecated v31.1 moveColumn(key, toIndex) deprecated, please use moveColumns([key], toIndex) instead. */
|
|
469
|
+
moveColumn(key: string | ColDef | Column, toIndex: number): void;
|
|
470
|
+
/** Moves the column at `fromIdex` to `toIndex`. The column is first removed, then added at the `toIndex` location, thus index locations will change to the right of the column after the removal. */
|
|
471
|
+
moveColumnByIndex(fromIndex: number, toIndex: number): void;
|
|
472
|
+
/** Moves columns to `toIndex`. The columns are first removed, then added at the `toIndex` location, thus index locations will change to the right of the column after the removal. */
|
|
473
|
+
moveColumns(columnsToMoveKeys: (string | ColDef | Column)[], toIndex: number): void;
|
|
474
|
+
/** @deprecated v31.1 setColumnWidths(key, newWidth) deprecated, please use setColumnWidths( [{key: newWidth}] ) instead. */
|
|
475
|
+
setColumnWidth(key: string | ColDef | Column, newWidth: number, finished?: boolean, source?: ColumnEventType): void;
|
|
476
|
+
/** Sets the column widths of the columns provided. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */
|
|
477
|
+
setColumnWidths(columnWidths: {
|
|
478
|
+
key: string | ColDef | Column;
|
|
479
|
+
newWidth: number;
|
|
480
|
+
}[], finished?: boolean, source?: ColumnEventType): void;
|
|
481
|
+
/** Same as `getAllDisplayedColumnGroups` but just for the pinned left portion of the grid. */
|
|
482
|
+
getLeftDisplayedColumnGroups(): (Column | ColumnGroup)[];
|
|
483
|
+
/** Same as `getAllDisplayedColumnGroups` but just for the center portion of the grid. */
|
|
484
|
+
getCenterDisplayedColumnGroups(): (Column | ColumnGroup)[];
|
|
485
|
+
/** Same as `getAllDisplayedColumnGroups` but just for the pinned right portion of the grid. */
|
|
486
|
+
getRightDisplayedColumnGroups(): (Column | ColumnGroup)[];
|
|
487
|
+
/** Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom. */
|
|
488
|
+
getAllDisplayedColumnGroups(): (Column | ColumnGroup)[] | null;
|
|
489
|
+
/** @deprecated v31.1 autoSizeColumn(key) deprecated, please use autoSizeColumns([colKey]) instead. */
|
|
490
|
+
autoSizeColumn(key: string | ColDef | Column, skipHeader?: boolean): void;
|
|
491
|
+
/**
|
|
492
|
+
* Auto-sizes columns based on their contents. If inferring cell data types with custom column types
|
|
493
|
+
* and row data is initially empty or yet to be set,
|
|
494
|
+
* the column sizing will happen asynchronously when row data is added.
|
|
495
|
+
* To always perform this synchronously, set `cellDataType = false` on the default column definition.
|
|
496
|
+
*/
|
|
497
|
+
autoSizeColumns(keys: (string | ColDef | Column)[], skipHeader?: boolean): void;
|
|
498
|
+
/**
|
|
499
|
+
* Calls `autoSizeColumns` on all displayed columns. If inferring cell data types with custom column types
|
|
500
|
+
* and row data is initially empty or yet to be set,
|
|
501
|
+
* the column sizing will happen asynchronously when row data is added.
|
|
502
|
+
* To always perform this synchronously, set `cellDataType = false` on the default column definition.
|
|
503
|
+
*/
|
|
504
|
+
autoSizeAllColumns(skipHeader?: boolean): void;
|
|
505
|
+
}
|
|
506
|
+
export interface _DragGridApi {
|
|
507
|
+
/** Adds a drop zone outside of the grid where rows can be dropped. */
|
|
508
|
+
addRowDropZone(params: RowDropZoneParams): void;
|
|
509
|
+
/** Removes an external drop zone added by `addRowDropZone`. */
|
|
510
|
+
removeRowDropZone(params: RowDropZoneParams): void;
|
|
511
|
+
/** Returns the `RowDropZoneParams` to be used by another grid's `addRowDropZone` method. */
|
|
512
|
+
getRowDropZoneParams(events?: RowDropZoneEvents): RowDropZoneParams;
|
|
513
|
+
}
|
|
514
|
+
export interface _EditGridApi<TData> {
|
|
515
|
+
/** Reverts the last cell edit. */
|
|
516
|
+
undoCellEditing(): void;
|
|
517
|
+
/** Re-applies the most recently undone cell edit. */
|
|
518
|
+
redoCellEditing(): void;
|
|
519
|
+
/** Returns the list of active cell editor instances. Optionally provide parameters to restrict to certain columns / row nodes. */
|
|
520
|
+
getCellEditorInstances(params?: GetCellEditorInstancesParams<TData>): ICellEditor[];
|
|
521
|
+
/** If the grid is editing, returns back details of the editing cell(s). */
|
|
522
|
+
getEditingCells(): CellPosition[];
|
|
523
|
+
/** If a cell is editing, it stops the editing. Pass `true` if you want to cancel the editing (i.e. don't accept changes). */
|
|
524
|
+
stopEditing(cancel?: boolean): void;
|
|
525
|
+
/** Start editing the provided cell. If another cell is editing, the editing will be stopped in that other cell. */
|
|
526
|
+
startEditingCell(params: StartEditingCellParams): void;
|
|
527
|
+
/** Returns current number of available cell edit undo operations. */
|
|
528
|
+
getCurrentUndoSize(): number;
|
|
529
|
+
/** Returns current number of available cell edit redo operations. */
|
|
530
|
+
getCurrentRedoSize(): number;
|
|
531
|
+
}
|
|
532
|
+
export interface _FilterGridApi {
|
|
533
|
+
/** Returns `true` if any filter is set. This includes quick filter, column filter, external filter or advanced filter. */
|
|
534
|
+
isAnyFilterPresent(): boolean;
|
|
535
|
+
/**
|
|
536
|
+
* Informs the grid that a filter has changed. This is typically called after a filter change through one of the filter APIs.
|
|
537
|
+
* @param source The source of the filter change event. If not specified defaults to `'api'`.
|
|
538
|
+
*/
|
|
539
|
+
onFilterChanged(source?: FilterChangedEventSourceType): void;
|
|
540
|
+
}
|
|
541
|
+
export interface _ColumnFilterGridApi {
|
|
542
|
+
/** Returns `true` if any column filter is set, otherwise `false`. */
|
|
543
|
+
isColumnFilterPresent(): boolean;
|
|
544
|
+
/**
|
|
545
|
+
* @deprecated v31.1 To get/set individual filter models, use `getColumnFilterModel` or `setColumnFilterModel` instead.
|
|
546
|
+
* To get hold of the filter instance, use `getColumnFilterInstance` which returns the instance asynchronously.
|
|
547
|
+
* This method now only works asynchronously via the callback. The return value will always be `undefined`.
|
|
548
|
+
*/
|
|
549
|
+
getFilterInstance<TFilter extends IFilter>(key: string | Column, callback?: (filter: TFilter | null) => void): undefined;
|
|
550
|
+
/**
|
|
551
|
+
* Returns the filter component instance for a column.
|
|
552
|
+
* For getting/setting models for individual column filters, use `getColumnFilterModel` and `setColumnFilterModel` instead of this.
|
|
553
|
+
* `key` can be a column ID or a `Column` object.
|
|
554
|
+
*/
|
|
555
|
+
getColumnFilterInstance<TFilter extends IFilter>(key: string | Column): Promise<TFilter | null | undefined>;
|
|
556
|
+
/** Destroys a filter. Useful to force a particular filter to be created from scratch again. */
|
|
557
|
+
destroyFilter(key: string | Column): void;
|
|
558
|
+
/**
|
|
559
|
+
* Sets the state of all the column filters. Provide it with what you get from `getFilterModel()` to restore filter state.
|
|
560
|
+
* If inferring cell data types, and row data is initially empty or yet to be set,
|
|
561
|
+
* the filter model will be applied asynchronously after row data is added.
|
|
562
|
+
* To always perform this synchronously, set `cellDataType = false` on the default column definition,
|
|
563
|
+
* or provide cell data types for every column.
|
|
564
|
+
*/
|
|
565
|
+
setFilterModel(model: FilterModel | null): void;
|
|
566
|
+
/** Gets the current state of all the column filters. Used for saving filter state. */
|
|
567
|
+
getFilterModel(): FilterModel;
|
|
568
|
+
/**
|
|
569
|
+
* Gets the current filter model for the specified column.
|
|
570
|
+
* Will return `null` if no active filter.
|
|
571
|
+
*/
|
|
572
|
+
getColumnFilterModel<TModel>(column: string | Column): TModel | null;
|
|
573
|
+
/**
|
|
574
|
+
* Sets the filter model for the specified column.
|
|
575
|
+
* Setting a `model` of `null` will reset the filter (make inactive).
|
|
576
|
+
* Must wait on the response before calling `api.onFilterChanged()`.
|
|
577
|
+
*/
|
|
578
|
+
setColumnFilterModel<TModel>(column: string | Column, model: TModel | null): Promise<void>;
|
|
579
|
+
/** Show the filter for the provided column. */
|
|
580
|
+
showColumnFilter(colKey: string | Column): void;
|
|
581
|
+
}
|
|
582
|
+
export interface _QuickFilterGridApi {
|
|
583
|
+
/** Returns `true` if the Quick Filter is set, otherwise `false`. */
|
|
584
|
+
isQuickFilterPresent(): boolean;
|
|
585
|
+
/** Get the current Quick Filter text from the grid, or `undefined` if none is set. */
|
|
586
|
+
getQuickFilter(): string | undefined;
|
|
587
|
+
/** Reset the Quick Filter cache text on every rowNode. */
|
|
588
|
+
resetQuickFilter(): void;
|
|
589
|
+
}
|
|
590
|
+
export interface _StateGridApi {
|
|
591
|
+
/** Get the current state of the grid. Can be used in conjunction with the `initialState` grid option to save and restore grid state. */
|
|
592
|
+
getState(): GridState;
|
|
593
|
+
}
|
|
594
|
+
export interface _PaginationGridApi {
|
|
595
|
+
/**
|
|
596
|
+
* Returns `true` when the last page is known.
|
|
597
|
+
* This will always be `true` if you are using the Client-Side Row Model for pagination.
|
|
598
|
+
* Returns `false` when the last page is not known; this only happens when using Infinite Row Model.
|
|
599
|
+
*/
|
|
600
|
+
paginationIsLastPageFound(): boolean;
|
|
601
|
+
/** Returns how many rows are being shown per page. */
|
|
602
|
+
paginationGetPageSize(): number;
|
|
603
|
+
/** Returns the 0-based index of the page which is showing. */
|
|
604
|
+
paginationGetCurrentPage(): number;
|
|
605
|
+
/** Returns the total number of pages. */
|
|
606
|
+
paginationGetTotalPages(): number;
|
|
607
|
+
/**
|
|
608
|
+
* Returns the total number of pageable rows, as impacted by `gridOptions.paginateChildRows: true`.
|
|
609
|
+
*
|
|
610
|
+
* It is recommended to instead use `gridApi.getDisplayedRowCount()` if not using pagination, or if `gridOption.paginateChildRows=true`.
|
|
611
|
+
**/
|
|
612
|
+
paginationGetRowCount(): number;
|
|
613
|
+
/** Navigates to the next page. */
|
|
614
|
+
paginationGoToNextPage(): void;
|
|
615
|
+
/** Navigates to the previous page. */
|
|
616
|
+
paginationGoToPreviousPage(): void;
|
|
617
|
+
/** Navigates to the first page. */
|
|
618
|
+
paginationGoToFirstPage(): void;
|
|
619
|
+
/** Navigates to the last page. */
|
|
620
|
+
paginationGoToLastPage(): void;
|
|
621
|
+
/** Goes to the specified page. If the page requested doesn't exist, it will go to the last page. */
|
|
622
|
+
paginationGoToPage(page: number): void;
|
|
623
|
+
}
|
|
624
|
+
export interface _PinnedRowGridApi {
|
|
625
|
+
/** Gets the number of top pinned rows. */
|
|
626
|
+
getPinnedTopRowCount(): number;
|
|
627
|
+
/** Gets the number of bottom pinned rows. */
|
|
628
|
+
getPinnedBottomRowCount(): number;
|
|
629
|
+
/** Gets the top pinned row with the specified index. */
|
|
630
|
+
getPinnedTopRow<TPinnedData = any>(index: number): IRowNode<TPinnedData> | undefined;
|
|
631
|
+
/** Gets the bottom pinned row with the specified index. */
|
|
632
|
+
getPinnedBottomRow<TPinnedData = any>(index: number): IRowNode<TPinnedData> | undefined;
|
|
633
|
+
}
|
|
634
|
+
export interface _RenderGridApi<TData> {
|
|
635
|
+
/**
|
|
636
|
+
* Sets an ARIA property in the grid panel (element with `role=\"treegrid\"`), and removes an ARIA property when the value is null.
|
|
637
|
+
*
|
|
638
|
+
* Example: `api.setGridAriaProperty('label', 'my grid')` will set `aria-label=\"my grid\"`.
|
|
639
|
+
*
|
|
640
|
+
* `api.setGridAriaProperty('label', null)` will remove the `aria-label` attribute from the grid element.
|
|
641
|
+
*/
|
|
642
|
+
setGridAriaProperty(property: string, value: string | null): void;
|
|
643
|
+
/** Performs change detection on all cells, refreshing cells where required. */
|
|
644
|
+
refreshCells(params?: RefreshCellsParams<TData>): void;
|
|
645
|
+
/** Flash rows, columns or individual cells. */
|
|
646
|
+
flashCells(params?: FlashCellsParams<TData>): void;
|
|
647
|
+
/** Redraws the header. Useful if a column name changes, or something else that changes how the column header is displayed. */
|
|
648
|
+
refreshHeader(): void;
|
|
649
|
+
/** Returns `true` when there are no more animation frames left to process. */
|
|
650
|
+
isAnimationFrameQueueEmpty(): boolean;
|
|
651
|
+
flushAllAnimationFrames(): void;
|
|
652
|
+
/**
|
|
653
|
+
* Gets the sizes that various UI elements will be rendered at with the current theme.
|
|
654
|
+
* If you override the row or header height using `gridOptions`, the override value you provided will be returned.
|
|
716
655
|
*/
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
656
|
+
getSizesForCurrentTheme(): {
|
|
657
|
+
rowHeight: number;
|
|
658
|
+
headerHeight: number;
|
|
659
|
+
};
|
|
660
|
+
/** Returns the list of active cell renderer instances. */
|
|
661
|
+
getCellRendererInstances(params?: GetCellRendererInstancesParams<TData>): ICellRenderer[];
|
|
662
|
+
}
|
|
663
|
+
export interface _SideBarGridApi<TData> {
|
|
664
|
+
/** Returns `true` if the side bar is visible. */
|
|
665
|
+
isSideBarVisible(): boolean;
|
|
666
|
+
/** Show/hide the entire side bar, including any visible panel and the tab buttons. */
|
|
667
|
+
setSideBarVisible(show: boolean): void;
|
|
668
|
+
/** Sets the side bar position relative to the grid. Possible values are `'left'` or `'right'`. */
|
|
669
|
+
setSideBarPosition(position: 'left' | 'right'): void;
|
|
670
|
+
/** Opens a particular tool panel. Provide the ID of the tool panel to open. */
|
|
671
|
+
openToolPanel(key: string): void;
|
|
672
|
+
/** Closes the currently open tool panel (if any). */
|
|
673
|
+
closeToolPanel(): void;
|
|
674
|
+
/** Returns the ID of the currently shown tool panel if any, otherwise `null`. */
|
|
675
|
+
getOpenedToolPanel(): string | null;
|
|
676
|
+
/** Force refresh all tool panels by calling their `refresh` method. */
|
|
677
|
+
refreshToolPanel(): void;
|
|
678
|
+
/** Returns `true` if the tool panel is showing, otherwise `false`. */
|
|
679
|
+
isToolPanelShowing(): boolean;
|
|
680
|
+
getToolPanelInstance(id: 'columns'): IColumnToolPanel | undefined;
|
|
681
|
+
getToolPanelInstance(id: 'filters'): IFiltersToolPanel | undefined;
|
|
682
|
+
getToolPanelInstance<TToolPanel = IToolPanel>(id: string): TToolPanel | undefined;
|
|
683
|
+
/** Gets the tool panel instance corresponding to the supplied `id`. */
|
|
684
|
+
getToolPanelInstance<TToolPanel = IToolPanel>(id: string): TToolPanel | undefined;
|
|
685
|
+
/** Returns the current side bar configuration. If a shortcut was used, returns the detailed long form. */
|
|
686
|
+
getSideBar(): SideBarDef | undefined;
|
|
687
|
+
}
|
|
688
|
+
export interface _StatusBarGridApi {
|
|
689
|
+
/** Gets the status panel instance corresponding to the supplied `id`. */
|
|
690
|
+
getStatusPanel<TStatusPanel = IStatusPanel>(key: string): TStatusPanel | undefined;
|
|
691
|
+
}
|
|
692
|
+
export interface _InfiniteRowModelGridApi {
|
|
693
|
+
/**
|
|
694
|
+
* Marks all the currently loaded blocks in the cache for reload.
|
|
695
|
+
* If you have 10 blocks in the cache, all 10 will be marked for reload.
|
|
696
|
+
* The old data will continue to be displayed until the new data is loaded.
|
|
697
|
+
*/
|
|
698
|
+
refreshInfiniteCache(): void;
|
|
699
|
+
/**
|
|
700
|
+
* Purges the cache.
|
|
701
|
+
* 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).
|
|
702
|
+
* The grid will display nothing while the new blocks are loaded.
|
|
703
|
+
* Use this to immediately remove the old data from the user.
|
|
704
|
+
*/
|
|
705
|
+
purgeInfiniteCache(): void;
|
|
706
|
+
/** The row count defines how many rows the grid allows scrolling to. */
|
|
707
|
+
/** @deprecated v32.2 gridApi.getInfiniteRowCount() deprecated, please use gridApi.getDisplayedRowCount() instead. */
|
|
708
|
+
getInfiniteRowCount(): number | undefined;
|
|
709
|
+
}
|
|
710
|
+
export interface _CsvExportGridApi {
|
|
711
|
+
/** Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. */
|
|
712
|
+
getDataAsCsv(params?: CsvExportParams): string | undefined;
|
|
713
|
+
/** Downloads a CSV export of the grid's data. */
|
|
714
|
+
exportDataAsCsv(params?: CsvExportParams): void;
|
|
715
|
+
}
|
|
716
|
+
export interface _RowGroupingGridApi<TData> {
|
|
717
|
+
/** @deprecated v31.1 addAggFunc(key, func) is deprecated, please use addAggFuncs({ key: func }) instead. */
|
|
718
|
+
addAggFunc(key: string, aggFunc: IAggFunc): void;
|
|
719
|
+
/** Add aggregations function with the specified keys. */
|
|
720
|
+
addAggFuncs(aggFuncs: {
|
|
721
|
+
[key: string]: IAggFunc;
|
|
722
|
+
}): void;
|
|
723
|
+
/** Clears all aggregation functions (including those provided by the grid). */
|
|
724
|
+
clearAggFuncs(): void;
|
|
736
725
|
/** Sets the agg function for a column. `aggFunc` can be one of the built-in aggregations or a custom aggregation by name or direct function. */
|
|
737
726
|
setColumnAggFunc(key: string | ColDef | Column, aggFunc: string | IAggFunc | null | undefined): void;
|
|
738
|
-
/**
|
|
739
|
-
setColumnWidth(key: string | ColDef | Column, newWidth: number, finished?: boolean, source?: ColumnEventType): void;
|
|
740
|
-
/** Sets the column widths of the columns provided. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */
|
|
741
|
-
setColumnWidths(columnWidths: {
|
|
742
|
-
key: string | ColDef | Column;
|
|
743
|
-
newWidth: number;
|
|
744
|
-
}[], finished?: boolean, source?: ColumnEventType): void;
|
|
745
|
-
/** Get the pivot mode. */
|
|
727
|
+
/** Returns whether pivot mode is currently active. */
|
|
746
728
|
isPivotMode(): boolean;
|
|
747
|
-
/** Returns the pivot result column for the given `pivotKeys` and `valueColId`.
|
|
729
|
+
/** Returns the pivot result column for the given `pivotKeys` and `valueColId`. */
|
|
748
730
|
getPivotResultColumn<TValue = any>(pivotKeys: string[], valueColKey: string | ColDef<TData, TValue> | Column<TValue>): Column<TValue> | null;
|
|
749
731
|
/** Set the value columns to the provided list of columns. */
|
|
750
732
|
setValueColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
@@ -754,12 +736,14 @@ export interface GridApi<TData = any> {
|
|
|
754
736
|
removeValueColumn(colKey: string | ColDef | Column): void;
|
|
755
737
|
/** Remove the given list of columns from the existing set of value columns. */
|
|
756
738
|
removeValueColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
757
|
-
/** @deprecated v31.1 addValueColumn(colKey) deprecated, please use addValueColumns([colKey]) instead. */
|
|
758
|
-
addValueColumn(colKey: string | ColDef | Column): void;
|
|
759
739
|
/** Add the given list of columns to the existing set of value columns. */
|
|
760
740
|
addValueColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
761
741
|
/** Set the row group columns. */
|
|
762
742
|
setRowGroupColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
743
|
+
/** Move the column to a new position in the row grouping order. */
|
|
744
|
+
moveRowGroupColumn(fromIndex: number, toIndex: number): void;
|
|
745
|
+
/** @deprecated v31.1 addValueColumn(colKey) deprecated, please use addValueColumns([colKey]) instead. */
|
|
746
|
+
addValueColumn(colKey: string | ColDef | Column): void;
|
|
763
747
|
/** @deprecated v31.1 removeRowGroupColumn(colKey) deprecated, please use removeRowGroupColumns([colKey]) instead. */
|
|
764
748
|
removeRowGroupColumn(colKey: string | ColDef | Column): void;
|
|
765
749
|
/** Remove columns from the row groups. */
|
|
@@ -770,57 +754,171 @@ export interface GridApi<TData = any> {
|
|
|
770
754
|
addRowGroupColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
771
755
|
/** Get row group columns. */
|
|
772
756
|
getRowGroupColumns(): Column[];
|
|
773
|
-
/** Set the pivot
|
|
757
|
+
/** Set the columns for the grid to pivot on. */
|
|
774
758
|
setPivotColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
775
759
|
/** @deprecated v31.1 removePivotColumn(colKey) deprecated, please use removePivotColumns([colKey]) instead. */
|
|
776
760
|
removePivotColumn(colKey: string | ColDef | Column): void;
|
|
777
|
-
/**
|
|
761
|
+
/** Stops the grid from pivoting on the provided columns. */
|
|
778
762
|
removePivotColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
779
763
|
/** @deprecated v31.1 addPivotColumn(colKey) deprecated, please use addPivotColumns([colKey]) instead. */
|
|
780
764
|
addPivotColumn(colKey: string | ColDef | Column): void;
|
|
781
|
-
/** Add pivot
|
|
765
|
+
/** Add columns for the grid to pivot on. */
|
|
782
766
|
addPivotColumns(colKeys: (string | ColDef | Column)[]): void;
|
|
783
|
-
/** Get the
|
|
767
|
+
/** Get the columns which the grid is pivoting on. */
|
|
784
768
|
getPivotColumns(): Column[];
|
|
785
|
-
/**
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
/** Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom. */
|
|
792
|
-
getAllDisplayedColumnGroups(): (Column | ColumnGroup)[] | null;
|
|
793
|
-
/** @deprecated v31.1 autoSizeColumn(key) deprecated, please use autoSizeColumns([colKey]) instead. */
|
|
794
|
-
autoSizeColumn(key: string | ColDef | Column, skipHeader?: boolean): void;
|
|
769
|
+
/** Set explicit pivot column definitions yourself. Used for advanced use cases only. */
|
|
770
|
+
setPivotResultColumns(colDefs: (ColDef | ColGroupDef)[] | null): void;
|
|
771
|
+
/** Returns the grid's pivot result columns. */
|
|
772
|
+
getPivotResultColumns(): Column[] | null;
|
|
773
|
+
}
|
|
774
|
+
export interface _RangeSelectionGridApi {
|
|
795
775
|
/**
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
776
|
+
* Returns the list of selected cell ranges.
|
|
777
|
+
*
|
|
778
|
+
* The start is the first cell the user clicked on and the end is the cell where the user stopped dragging.
|
|
779
|
+
* Do not assume that the start cell's index is numerically before the end cell, as the user could have dragged up.
|
|
799
780
|
*/
|
|
800
|
-
|
|
781
|
+
getCellRanges(): CellRange[] | null;
|
|
801
782
|
/**
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
*
|
|
783
|
+
* Adds the provided cell range to the selected ranges.
|
|
784
|
+
*
|
|
785
|
+
* This keeps any previous ranges. If you wish to only have the new range selected, then call `clearCellSelection()` first.
|
|
805
786
|
*/
|
|
806
|
-
|
|
807
|
-
/** Set the pivot result columns. */
|
|
808
|
-
setPivotResultColumns(colDefs: (ColDef | ColGroupDef)[] | null): void;
|
|
809
|
-
/** Returns the grid's pivot result columns. */
|
|
810
|
-
getPivotResultColumns(): Column[] | null;
|
|
811
|
-
/** Get the current state of the grid. Can be used in conjunction with the `initialState` grid option to save and restore grid state. */
|
|
812
|
-
getState(): GridState;
|
|
787
|
+
addCellRange(params: CellRangeParams): void;
|
|
813
788
|
/**
|
|
814
|
-
*
|
|
789
|
+
* Clears the selected ranges.
|
|
790
|
+
* @deprecated v32.2 Use `clearCellSelection` instead
|
|
815
791
|
*/
|
|
816
|
-
|
|
792
|
+
clearRangeSelection(): void;
|
|
793
|
+
/** Clears the selected cell ranges. */
|
|
794
|
+
clearCellSelection(): void;
|
|
795
|
+
}
|
|
796
|
+
export interface _ServerSideRowModelGridApi {
|
|
817
797
|
/**
|
|
818
|
-
*
|
|
819
|
-
*
|
|
798
|
+
* Returns an object containing rules matching the selected rows in the SSRM.
|
|
799
|
+
*
|
|
800
|
+
* If `selection.groupSelects` is `'self'` the returned object will be flat, and will conform to `IServerSideSelectionState`.
|
|
801
|
+
* If `selection.groupSelects` is `'descendants'` or `'filteredDescendants'` the returned object will be hierarchical, and will conform to `IServerSideGroupSelectionState`.
|
|
820
802
|
*/
|
|
821
|
-
|
|
803
|
+
getServerSideSelectionState(): IServerSideSelectionState | IServerSideGroupSelectionState | null;
|
|
822
804
|
/**
|
|
823
|
-
*
|
|
805
|
+
* Set the rules matching the selected rows in the SSRM.
|
|
806
|
+
*
|
|
807
|
+
* If `selection.groupSelects` is `'self'` the param will be flat, and should conform to `IServerSideSelectionState`.
|
|
808
|
+
* If `selection.groupSelects` is `'descendants'` or `'filteredDescendants'` the param will be hierarchical, and should conform to `IServerSideGroupSelectionState`.
|
|
824
809
|
*/
|
|
825
|
-
|
|
810
|
+
setServerSideSelectionState(state: IServerSideSelectionState | IServerSideGroupSelectionState): void;
|
|
811
|
+
/** Apply transactions to the server side row model. */
|
|
812
|
+
applyServerSideTransaction(transaction: ServerSideTransaction): ServerSideTransactionResult | undefined;
|
|
813
|
+
/** Batch apply transactions to the server side row model. */
|
|
814
|
+
applyServerSideTransactionAsync(transaction: ServerSideTransaction, callback?: (res: ServerSideTransactionResult) => void): void;
|
|
815
|
+
/**
|
|
816
|
+
* Applies row data to a server side store.
|
|
817
|
+
* New rows will overwrite rows at the same index in the same way as if provided by a datasource success callback.
|
|
818
|
+
*/
|
|
819
|
+
applyServerSideRowData(params: {
|
|
820
|
+
successParams: LoadSuccessParams;
|
|
821
|
+
route?: string[];
|
|
822
|
+
startRow?: number;
|
|
823
|
+
}): void;
|
|
824
|
+
/** Gets all failed server side loads to retry. */
|
|
825
|
+
retryServerSideLoads(): void;
|
|
826
|
+
flushServerSideAsyncTransactions(): void;
|
|
827
|
+
/**
|
|
828
|
+
* Refresh a server-side store level.
|
|
829
|
+
* If you pass no parameters, then the top level store is refreshed.
|
|
830
|
+
* To refresh a child level, pass in the string of keys to get to the desired level.
|
|
831
|
+
* Once the store refresh is complete, the storeRefreshed event is fired.
|
|
832
|
+
*/
|
|
833
|
+
refreshServerSide(params?: RefreshServerSideParams): void;
|
|
834
|
+
/** Returns info on all server side group levels. */
|
|
835
|
+
getServerSideGroupLevelState(): ServerSideGroupLevelState[];
|
|
836
|
+
}
|
|
837
|
+
export interface _MenuGridApi {
|
|
838
|
+
/**
|
|
839
|
+
* Displays the AG Grid context menu
|
|
840
|
+
*/
|
|
841
|
+
showContextMenu(params?: IContextMenuParams): void;
|
|
842
|
+
/** Show the column chooser. */
|
|
843
|
+
showColumnChooser(params?: ColumnChooserParams): void;
|
|
844
|
+
/** Hide the column chooser if visible. */
|
|
845
|
+
hideColumnChooser(): void;
|
|
846
|
+
}
|
|
847
|
+
export interface _MasterDetailGridApi {
|
|
848
|
+
/** Register a detail grid with the master grid when it is created. */
|
|
849
|
+
addDetailGridInfo(id: string, gridInfo: DetailGridInfo): void;
|
|
850
|
+
/** Unregister a detail grid from the master grid when it is destroyed. */
|
|
851
|
+
removeDetailGridInfo(id: string): void;
|
|
852
|
+
/** Returns the `DetailGridInfo` corresponding to the supplied `detailGridId`. */
|
|
853
|
+
getDetailGridInfo(id: string): DetailGridInfo | undefined;
|
|
854
|
+
/** Iterates through each `DetailGridInfo` in the grid and calls the supplied callback on each. */
|
|
855
|
+
forEachDetailGridInfo(callback: (gridInfo: DetailGridInfo, index: number) => void): void;
|
|
856
|
+
}
|
|
857
|
+
export interface _ExcelExportGridApi {
|
|
858
|
+
/** Similar to `exportDataAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */
|
|
859
|
+
getDataAsExcel(params?: ExcelExportParams): string | Blob | undefined;
|
|
860
|
+
/** Downloads an Excel export of the grid's data. */
|
|
861
|
+
exportDataAsExcel(params?: ExcelExportParams): void;
|
|
862
|
+
/** This is method to be used to get the grid's data as a sheet, that will later be exported either by `getMultipleSheetsAsExcel()` or `exportMultipleSheetsAsExcel()`. */
|
|
863
|
+
getSheetDataForExcel(params?: ExcelExportParams): string | undefined;
|
|
864
|
+
/** Similar to `exportMultipleSheetsAsExcel`, except instead of downloading a file, it will return a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) to be processed by the user. */
|
|
865
|
+
getMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): Blob | undefined;
|
|
866
|
+
/** Downloads an Excel export of multiple sheets in one file. */
|
|
867
|
+
exportMultipleSheetsAsExcel(params: ExcelExportMultipleSheetParams): void;
|
|
868
|
+
}
|
|
869
|
+
export interface _ClipboardGridApi {
|
|
870
|
+
/** Copies data to clipboard by following the same rules as pressing Ctrl+C. */
|
|
871
|
+
copyToClipboard(params?: IClipboardCopyParams): void;
|
|
872
|
+
/** Cuts data to clipboard by following the same rules as pressing Ctrl+X. */
|
|
873
|
+
cutToClipboard(params?: IClipboardCopyParams): void;
|
|
874
|
+
/** Copies the selected rows to the clipboard. */
|
|
875
|
+
copySelectedRowsToClipboard(params?: IClipboardCopyRowsParams): void;
|
|
876
|
+
/** Copies the selected ranges to the clipboard. */
|
|
877
|
+
copySelectedRangeToClipboard(params?: IClipboardCopyParams): void;
|
|
878
|
+
/** Copies the selected range down, similar to `Ctrl + D` in Excel. */
|
|
879
|
+
copySelectedRangeDown(): void;
|
|
880
|
+
/** Pastes the data from the Clipboard into the focused cell of the grid. If no grid cell is focused, calling this method has no effect. */
|
|
881
|
+
pasteFromClipboard(): void;
|
|
882
|
+
}
|
|
883
|
+
export interface _GridChartsGridApi {
|
|
884
|
+
/** Returns a list of models with information about the charts that are currently rendered from the grid. */
|
|
885
|
+
getChartModels(): ChartModel[] | undefined;
|
|
886
|
+
/** Returns the `ChartRef` using the supplied `chartId`. */
|
|
887
|
+
getChartRef(chartId: string): ChartRef | undefined;
|
|
888
|
+
/** Returns a base64-encoded image data URL for the referenced chartId. */
|
|
889
|
+
getChartImageDataURL(params: GetChartImageDataUrlParams): string | undefined;
|
|
890
|
+
/** Starts a browser-based image download for the referenced chartId. */
|
|
891
|
+
downloadChart(params: ChartDownloadParams): void;
|
|
892
|
+
/** Open the Chart Tool Panel. */
|
|
893
|
+
openChartToolPanel(params: OpenChartToolPanelParams): void;
|
|
894
|
+
/** Close the Chart Tool Panel. */
|
|
895
|
+
closeChartToolPanel(params: CloseChartToolPanelParams): void;
|
|
896
|
+
/** Used to programmatically create charts from a range. */
|
|
897
|
+
createRangeChart(params: CreateRangeChartParams): ChartRef | undefined;
|
|
898
|
+
/** Used to programmatically create pivot charts from a grid. */
|
|
899
|
+
createPivotChart(params: CreatePivotChartParams): ChartRef | undefined;
|
|
900
|
+
/** Used to programmatically create cross filter charts from a range. */
|
|
901
|
+
createCrossFilterChart(params: CreateCrossFilterChartParams): ChartRef | undefined;
|
|
902
|
+
/** Used to programmatically update a chart. */
|
|
903
|
+
updateChart(params: UpdateChartParams): void;
|
|
904
|
+
/** Restores a chart using the `ChartModel` that was previously obtained from `getChartModels()`. */
|
|
905
|
+
restoreChart(chartModel: ChartModel, chartContainer?: HTMLElement): ChartRef | undefined;
|
|
906
|
+
}
|
|
907
|
+
export interface _AdvancedFilterGridApi {
|
|
908
|
+
/** Get the state of the Advanced Filter. Used for saving Advanced Filter state */
|
|
909
|
+
getAdvancedFilterModel(): AdvancedFilterModel | null;
|
|
910
|
+
/** Set the state of the Advanced Filter. Used for restoring Advanced Filter state */
|
|
911
|
+
setAdvancedFilterModel(advancedFilterModel: AdvancedFilterModel | null): void;
|
|
912
|
+
/** Open the Advanced Filter Builder dialog (if enabled). */
|
|
913
|
+
showAdvancedFilterBuilder(): void;
|
|
914
|
+
/**
|
|
915
|
+
* Closes the Advanced Filter Builder dialog (if enabled).
|
|
916
|
+
* Un-applied changes are discarded.
|
|
917
|
+
*/
|
|
918
|
+
hideAdvancedFilterBuilder(): void;
|
|
919
|
+
}
|
|
920
|
+
export interface _CoreModuleGridApi<TData> extends _CoreGridApi<TData>, _StateGridApi, _RowSelectionGridApi<TData>, _RowGridApi<TData>, _ScrollGridApi<TData>, _KeyboardNavigationGridApi, _EventGridApi<TData>, _CellGridApi<TData>, _CommunityMenuGridApi, _SortGridApi, _OverlayGridApi, _PinnedRowGridApi, _RenderGridApi<TData>, _DragGridApi, _ColumnGridApi<TData>, _DragGridApi, _EditGridApi<TData>, _FilterGridApi, _ColumnFilterGridApi, _QuickFilterGridApi, _PaginationGridApi, _CsrmSsrmSharedGridApi, _SsrmInfiniteSharedGridApi {
|
|
921
|
+
dispatchEvent(event: AgEvent): void;
|
|
922
|
+
}
|
|
923
|
+
export interface GridApi<TData = any> extends _CoreModuleGridApi<TData>, _ClientSideRowModelGridApi<TData>, _SideBarGridApi<TData>, _StatusBarGridApi, _InfiniteRowModelGridApi, _CsvExportGridApi, _RowGroupingGridApi<TData>, _RangeSelectionGridApi, _ServerSideRowModelGridApi, _MenuGridApi, _MasterDetailGridApi, _ExcelExportGridApi, _ClipboardGridApi, _GridChartsGridApi, _AdvancedFilterGridApi {
|
|
826
924
|
}
|