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.
Files changed (180) hide show
  1. package/README.md +503 -85
  2. package/dist/ag-grid-community.js +9676 -6678
  3. package/dist/ag-grid-community.min.js +1 -1
  4. package/dist/ag-grid-community.min.noStyle.js +1 -1
  5. package/dist/ag-grid-community.noStyle.js +9577 -6573
  6. package/dist/package/main.cjs.js +9425 -6504
  7. package/dist/package/main.cjs.min.js +81 -70
  8. package/dist/package/main.esm.min.mjs +92 -81
  9. package/dist/package/main.esm.mjs +9424 -6503
  10. package/dist/package/package.json +34 -7
  11. package/dist/types/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +16 -3
  12. package/dist/types/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +27 -7
  13. package/dist/types/client-side-row-model/clientSideRowModel/clientSideRowModelApi.d.ts +1 -0
  14. package/dist/types/client-side-row-model/clientSideRowModel/immutableService.d.ts +2 -1
  15. package/dist/types/client-side-row-model/clientSideRowModel/sortService.d.ts +1 -0
  16. package/dist/types/client-side-row-model/clientSideRowModelModule.d.ts +3 -4
  17. package/dist/types/client-side-row-model/version.d.ts +1 -1
  18. package/dist/types/core/alignedGridsModule.d.ts +1 -2
  19. package/dist/types/core/alignedGridsService.d.ts +1 -0
  20. package/dist/types/core/api/apiFunctionService.d.ts +6 -5
  21. package/dist/types/core/api/apiModule.d.ts +10 -11
  22. package/dist/types/core/api/apiUtils.d.ts +1 -1
  23. package/dist/types/core/api/gridApi.d.ts +621 -523
  24. package/dist/types/core/api/gridApiFunctions.d.ts +255 -0
  25. package/dist/types/core/api/sharedApiModule.d.ts +2 -3
  26. package/dist/types/core/api/ssrmInfiniteSharedApi.d.ts +1 -0
  27. package/dist/types/core/columns/columnEventDispatcher.d.ts +6 -4
  28. package/dist/types/core/columns/columnFactory.d.ts +6 -1
  29. package/dist/types/core/columns/columnModel.d.ts +11 -4
  30. package/dist/types/core/columns/columnModule.d.ts +2 -3
  31. package/dist/types/core/columns/columnUtils.d.ts +1 -0
  32. package/dist/types/core/columns/columnViewportService.d.ts +1 -0
  33. package/dist/types/core/columns/controlsColService.d.ts +11 -0
  34. package/dist/types/core/columns/dataTypeService.d.ts +3 -10
  35. package/dist/types/core/components/componentUtil.d.ts +2 -2
  36. package/dist/types/core/components/emptyBean.d.ts +21 -0
  37. package/dist/types/core/components/framework/componentTypes.d.ts +1 -0
  38. package/dist/types/core/components/framework/frameworkComponentWrapper.d.ts +1 -2
  39. package/dist/types/core/components/framework/userComponentFactory.d.ts +3 -1
  40. package/dist/types/core/components/framework/userComponentRegistry.d.ts +3 -1
  41. package/dist/types/core/context/beanStub.d.ts +2 -3
  42. package/dist/types/core/context/context.d.ts +8 -3
  43. package/dist/types/core/ctrlsService.d.ts +9 -6
  44. package/dist/types/core/dragAndDrop/dragAndDropImageComponent.d.ts +24 -0
  45. package/dist/types/core/dragAndDrop/dragAndDropService.d.ts +22 -10
  46. package/dist/types/core/dragAndDrop/dragModule.d.ts +1 -2
  47. package/dist/types/core/dragAndDrop/dragService.d.ts +4 -0
  48. package/dist/types/core/edit/cellEditors/simpleCellEditor.d.ts +2 -2
  49. package/dist/types/core/edit/editModule.d.ts +9 -10
  50. package/dist/types/core/edit/editService.d.ts +1 -1
  51. package/dist/types/core/edit/rowEditService.d.ts +1 -1
  52. package/dist/types/core/entities/agColumn.d.ts +4 -2
  53. package/dist/types/core/entities/agColumnGroup.d.ts +5 -0
  54. package/dist/types/core/entities/colDef.d.ts +26 -16
  55. package/dist/types/core/entities/dataType.d.ts +7 -0
  56. package/dist/types/core/entities/gridOptions.d.ts +248 -13
  57. package/dist/types/core/entities/rowNode.d.ts +69 -25
  58. package/dist/types/core/environment.d.ts +7 -4
  59. package/dist/types/core/eventService.d.ts +3 -3
  60. package/dist/types/core/eventTypes.d.ts +3 -3
  61. package/dist/types/core/events.d.ts +58 -12
  62. package/dist/types/core/filter/columnFilterService.d.ts +3 -1
  63. package/dist/types/core/filter/filterManager.d.ts +2 -0
  64. package/dist/types/core/filter/filterModule.d.ts +13 -14
  65. package/dist/types/core/filter/provided/iScalarFilter.d.ts +2 -0
  66. package/dist/types/core/filter/provided/providedFilter.d.ts +1 -1
  67. package/dist/types/core/focusService.d.ts +12 -2
  68. package/dist/types/core/grid.d.ts +10 -1
  69. package/dist/types/core/gridBodyComp/abstractFakeScrollComp.d.ts +3 -2
  70. package/dist/types/core/gridBodyComp/gridBodyCtrl.d.ts +8 -1
  71. package/dist/types/core/gridBodyComp/gridBodyScrollFeature.d.ts +10 -5
  72. package/dist/types/core/gridBodyComp/navigationService.d.ts +3 -1
  73. package/dist/types/core/gridBodyComp/rowContainer/rowContainerCtrl.d.ts +7 -3
  74. package/dist/types/core/gridBodyComp/rowDragFeature.d.ts +3 -2
  75. package/dist/types/core/gridBodyComp/scrollVisibleService.d.ts +10 -2
  76. package/dist/types/core/gridComp/gridCtrl.d.ts +5 -1
  77. package/dist/types/core/gridCoreModule.d.ts +2 -8
  78. package/dist/types/core/gridOptionsService.d.ts +10 -38
  79. package/dist/types/core/gridOptionsUtils.d.ts +54 -0
  80. package/dist/types/core/headerRendering/cells/abstractCell/abstractHeaderCellCtrl.d.ts +9 -6
  81. package/dist/types/core/headerRendering/cells/column/headerCellCtrl.d.ts +7 -6
  82. package/dist/types/core/headerRendering/cells/column/selectAllFeature.d.ts +6 -0
  83. package/dist/types/core/headerRendering/cells/columnGroup/headerGroupCellComp.d.ts +1 -0
  84. package/dist/types/core/headerRendering/cells/columnGroup/headerGroupCellCtrl.d.ts +6 -1
  85. package/dist/types/core/headerRendering/cells/floatingFilter/headerFilterCellCtrl.d.ts +2 -1
  86. package/dist/types/core/headerRendering/columnDrag/bodyDropPivotTarget.d.ts +1 -0
  87. package/dist/types/core/headerRendering/columnDrag/bodyDropTarget.d.ts +2 -0
  88. package/dist/types/core/headerRendering/columnDrag/moveColumnFeature.d.ts +21 -4
  89. package/dist/types/core/headerRendering/columnMoveHelper.d.ts +20 -10
  90. package/dist/types/core/headerRendering/gridHeaderCtrl.d.ts +1 -0
  91. package/dist/types/core/headerRendering/row/headerRowCtrl.d.ts +4 -8
  92. package/dist/types/core/headerRendering/rowContainer/headerRowContainerCtrl.d.ts +8 -8
  93. package/dist/types/core/interfaces/IRangeService.d.ts +3 -2
  94. package/dist/types/core/interfaces/IServerSideStore.d.ts +1 -1
  95. package/dist/types/core/interfaces/gridState.d.ts +28 -9
  96. package/dist/types/core/interfaces/iAdvancedFilterCtrl.d.ts +5 -1
  97. package/dist/types/core/interfaces/iCallbackParams.d.ts +5 -2
  98. package/dist/types/core/interfaces/iCellEditor.d.ts +4 -0
  99. package/dist/types/core/interfaces/iClientSideRowModel.d.ts +2 -6
  100. package/dist/types/core/interfaces/iColumn.d.ts +5 -1
  101. package/dist/types/core/interfaces/iExcelCreator.d.ts +69 -36
  102. package/dist/types/core/interfaces/iFrameworkOverrides.d.ts +6 -4
  103. package/dist/types/core/interfaces/iMenuFactory.d.ts +2 -1
  104. package/dist/types/core/interfaces/iModule.d.ts +10 -1
  105. package/dist/types/core/interfaces/iRowNode.d.ts +9 -2
  106. package/dist/types/core/interfaces/iRowNodeStage.d.ts +1 -3
  107. package/dist/types/core/interfaces/masterDetail.d.ts +2 -0
  108. package/dist/types/core/main.d.ts +11 -9
  109. package/dist/types/core/misc/menuService.d.ts +4 -2
  110. package/dist/types/core/misc/resizeObserverService.d.ts +0 -4
  111. package/dist/types/core/misc/state/stateModelMigration.d.ts +2 -0
  112. package/dist/types/core/misc/state/stateModule.d.ts +3 -4
  113. package/dist/types/core/misc/state/stateService.d.ts +2 -2
  114. package/dist/types/core/pagination/pageSizeSelector/pageSizeSelectorComp.d.ts +3 -1
  115. package/dist/types/core/pagination/paginationComp.d.ts +5 -4
  116. package/dist/types/core/pagination/paginationModule.d.ts +3 -4
  117. package/dist/types/core/pinnedRowModel/pinnedRowModel.d.ts +11 -9
  118. package/dist/types/core/pinnedRowModel/pinnedRowModule.d.ts +1 -2
  119. package/dist/types/core/propertyKeys.d.ts +2 -1
  120. package/dist/types/core/rendering/ariaAnnouncementService.d.ts +6 -1
  121. package/dist/types/core/rendering/cell/cellCtrl.d.ts +13 -10
  122. package/dist/types/core/rendering/cell/cellRangeFeature.d.ts +1 -1
  123. package/dist/types/core/rendering/columnAnimationService.d.ts +1 -0
  124. package/dist/types/core/rendering/columnHoverService.d.ts +1 -0
  125. package/dist/types/core/rendering/features/stickyRowFeature.d.ts +1 -0
  126. package/dist/types/core/rendering/overlays/loadingOverlayComponent.d.ts +1 -1
  127. package/dist/types/core/rendering/overlays/noRowsOverlayComponent.d.ts +1 -1
  128. package/dist/types/core/rendering/overlays/overlayModule.d.ts +1 -2
  129. package/dist/types/core/rendering/overlays/overlayService.d.ts +14 -1
  130. package/dist/types/core/rendering/overlays/overlayWrapperComponent.d.ts +6 -1
  131. package/dist/types/core/rendering/renderModule.d.ts +1 -2
  132. package/dist/types/core/rendering/row/rowComp.d.ts +0 -2
  133. package/dist/types/core/rendering/row/rowCtrl.d.ts +10 -8
  134. package/dist/types/core/rendering/rowRenderer.d.ts +1 -0
  135. package/dist/types/core/rowNodeCache/rowNodeBlockModule.d.ts +1 -2
  136. package/dist/types/core/selection/selectionService.d.ts +3 -2
  137. package/dist/types/core/syncService.d.ts +0 -1
  138. package/dist/types/core/utils/dom.d.ts +1 -1
  139. package/dist/types/core/utils/function.d.ts +2 -2
  140. package/dist/types/core/utils/icon.d.ts +76 -1
  141. package/dist/types/core/validation/apiFunctionValidator.d.ts +0 -1
  142. package/dist/types/core/validation/rules/gridOptionsValidations.d.ts +3 -0
  143. package/dist/types/core/validation/rules/selectionValidations.d.ts +3 -0
  144. package/dist/types/core/validation/validationService.d.ts +1 -4
  145. package/dist/types/core/validation/validationTypes.d.ts +2 -2
  146. package/dist/types/core/valueService/valueService.d.ts +6 -0
  147. package/dist/types/core/version.d.ts +1 -1
  148. package/dist/types/core/widgets/popupService.d.ts +1 -1
  149. package/dist/types/core/widgets/tooltipStateManager.d.ts +1 -0
  150. package/dist/types/csv-export/csvExportModule.d.ts +3 -4
  151. package/dist/types/csv-export/version.d.ts +1 -1
  152. package/dist/types/infinite-row-model/infiniteRowModel/infiniteRowModel.d.ts +1 -1
  153. package/dist/types/infinite-row-model/infiniteRowModel/infiniteRowModelApi.d.ts +0 -1
  154. package/dist/types/infinite-row-model/infiniteRowModelModule.d.ts +3 -4
  155. package/dist/types/infinite-row-model/version.d.ts +1 -1
  156. package/package.json +34 -7
  157. package/styles/_css-content.scss +332 -114
  158. package/styles/ag-grid-no-native-widgets.css +71 -36
  159. package/styles/ag-grid-no-native-widgets.min.css +3 -3
  160. package/styles/ag-grid.css +71 -36
  161. package/styles/ag-grid.min.css +3 -3
  162. package/styles/ag-theme-alpine-no-font.css +18 -5
  163. package/styles/ag-theme-alpine-no-font.min.css +1 -1
  164. package/styles/ag-theme-alpine.css +18 -5
  165. package/styles/ag-theme-alpine.min.css +1 -1
  166. package/styles/ag-theme-balham-no-font.css +18 -0
  167. package/styles/ag-theme-balham-no-font.min.css +1 -1
  168. package/styles/ag-theme-balham.css +18 -0
  169. package/styles/ag-theme-balham.min.css +1 -1
  170. package/styles/ag-theme-material-no-font.css +41 -6
  171. package/styles/ag-theme-material-no-font.min.css +1 -1
  172. package/styles/ag-theme-material.css +41 -6
  173. package/styles/ag-theme-material.min.css +1 -1
  174. package/styles/ag-theme-quartz-no-font.css +18 -10
  175. package/styles/ag-theme-quartz-no-font.min.css +1 -1
  176. package/styles/ag-theme-quartz.css +18 -10
  177. package/styles/ag-theme-quartz.min.css +1 -1
  178. package/dist/types/core/utils/rowNode.d.ts +0 -14
  179. package/gulpfile.js +0 -34
  180. package/webpackBuild.sh +0 -17
@@ -2,7 +2,7 @@
2
2
  * If you change the GridOptions interface, you must also update PropertyKeys to be consistent. *
3
3
  ************************************************************************************************/
4
4
  import type { AgChartTheme, AgChartThemeOverrides } from 'ag-charts-types';
5
- import type { AdvancedFilterBuilderVisibleChangedEvent, AsyncTransactionsFlushed, BodyScrollEndEvent, BodyScrollEvent, CellClickedEvent, CellContextMenuEvent, CellDoubleClickedEvent, CellEditRequestEvent, CellEditingStartedEvent, CellEditingStoppedEvent, CellFocusedEvent, CellKeyDownEvent, CellMouseDownEvent, CellMouseOutEvent, CellMouseOverEvent, CellValueChangedEvent, ChartCreatedEvent, ChartDestroyedEvent, ChartOptionsChangedEvent, ChartRangeSelectionChangedEvent, ColumnEverythingChangedEvent, ColumnGroupOpenedEvent, ColumnHeaderClickedEvent, ColumnHeaderContextMenuEvent, ColumnHeaderMouseLeaveEvent, ColumnHeaderMouseOverEvent, ColumnMenuVisibleChangedEvent, ColumnMovedEvent, ColumnPinnedEvent, ColumnPivotChangedEvent, ColumnPivotModeChangedEvent, ColumnResizedEvent, ColumnRowGroupChangedEvent, ColumnValueChangedEvent, ColumnVisibleEvent, ComponentStateChangedEvent, ContextMenuVisibleChangedEvent, CutEndEvent, CutStartEvent, DisplayedColumnsChangedEvent, DragStartedEvent, DragStoppedEvent, ExpandOrCollapseAllEvent, FillEndEvent, FillStartEvent, FilterChangedEvent, FilterModifiedEvent, FilterOpenedEvent, FirstDataRenderedEvent, FullWidthCellKeyDownEvent, GridColumnsChangedEvent, GridPreDestroyedEvent, GridReadyEvent, GridSizeChangedEvent, HeaderFocusedEvent, ModelUpdatedEvent, NewColumnsLoadedEvent, PaginationChangedEvent, PasteEndEvent, PasteStartEvent, PinnedRowDataChangedEvent, PivotMaxColumnsExceededEvent, RangeDeleteEndEvent, RangeDeleteStartEvent, RangeSelectionChangedEvent, RedoEndedEvent, RedoStartedEvent, RowClickedEvent, RowDataUpdatedEvent, RowDoubleClickedEvent, RowDragEndEvent, RowDragEnterEvent, RowDragLeaveEvent, RowDragMoveEvent, RowEditingStartedEvent, RowEditingStoppedEvent, RowGroupOpenedEvent, RowSelectedEvent, RowValueChangedEvent, SelectionChangedEvent, SortChangedEvent, StateUpdatedEvent, StoreRefreshedEvent, ToolPanelSizeChangedEvent, ToolPanelVisibleChangedEvent, TooltipHideEvent, TooltipShowEvent, UndoEndedEvent, UndoStartedEvent, ViewportChangedEvent, VirtualColumnsChangedEvent, VirtualRowRemovedEvent } from '../events';
5
+ import type { AdvancedFilterBuilderVisibleChangedEvent, AsyncTransactionsFlushedEvent, BodyScrollEndEvent, BodyScrollEvent, CellClickedEvent, CellContextMenuEvent, CellDoubleClickedEvent, CellEditRequestEvent, CellEditingStartedEvent, CellEditingStoppedEvent, CellFocusedEvent, CellKeyDownEvent, CellMouseDownEvent, CellMouseOutEvent, CellMouseOverEvent, CellSelectionChangedEvent, CellSelectionDeleteEndEvent, CellSelectionDeleteStartEvent, CellValueChangedEvent, ChartCreatedEvent, ChartDestroyedEvent, ChartOptionsChangedEvent, ChartRangeSelectionChangedEvent, ColumnEverythingChangedEvent, ColumnGroupOpenedEvent, ColumnHeaderClickedEvent, ColumnHeaderContextMenuEvent, ColumnHeaderMouseLeaveEvent, ColumnHeaderMouseOverEvent, ColumnMenuVisibleChangedEvent, ColumnMovedEvent, ColumnPinnedEvent, ColumnPivotChangedEvent, ColumnPivotModeChangedEvent, ColumnResizedEvent, ColumnRowGroupChangedEvent, ColumnValueChangedEvent, ColumnVisibleEvent, ComponentStateChangedEvent, ContextMenuVisibleChangedEvent, CutEndEvent, CutStartEvent, DisplayedColumnsChangedEvent, DragCancelledEvent, DragStartedEvent, DragStoppedEvent, ExpandOrCollapseAllEvent, FillEndEvent, FillStartEvent, FilterChangedEvent, FilterModifiedEvent, FilterOpenedEvent, FirstDataRenderedEvent, FullWidthCellKeyDownEvent, GridColumnsChangedEvent, GridPreDestroyedEvent, GridReadyEvent, GridSizeChangedEvent, HeaderFocusedEvent, ModelUpdatedEvent, NewColumnsLoadedEvent, PaginationChangedEvent, PasteEndEvent, PasteStartEvent, PinnedRowDataChangedEvent, PivotMaxColumnsExceededEvent, RangeDeleteEndEvent, RangeDeleteStartEvent, RangeSelectionChangedEvent, RedoEndedEvent, RedoStartedEvent, RowClickedEvent, RowDataUpdatedEvent, RowDoubleClickedEvent, RowDragCancelEvent, RowDragEndEvent, RowDragEnterEvent, RowDragLeaveEvent, RowDragMoveEvent, RowEditingStartedEvent, RowEditingStoppedEvent, RowGroupOpenedEvent, RowSelectedEvent, RowValueChangedEvent, SelectionChangedEvent, SortChangedEvent, StateUpdatedEvent, StoreRefreshedEvent, ToolPanelSizeChangedEvent, ToolPanelVisibleChangedEvent, TooltipHideEvent, TooltipShowEvent, UndoEndedEvent, UndoStartedEvent, ViewportChangedEvent, VirtualColumnsChangedEvent, VirtualRowRemovedEvent } from '../events';
6
6
  import type { HeaderPosition } from '../headerRendering/common/headerPosition';
7
7
  import type { AdvancedFilterModel } from '../interfaces/advancedFilterModel';
8
8
  import type { SizeColumnsToContentStrategy, SizeColumnsToFitGridStrategy, SizeColumnsToFitProvidedWidthStrategy } from '../interfaces/autoSizeStrategy';
@@ -26,7 +26,7 @@ import type { MenuItemDef } from '../interfaces/menuItem';
26
26
  import type { ILoadingCellRendererParams } from '../rendering/cellRenderers/loadingCellRenderer';
27
27
  import type { IRowDragItem } from '../rendering/row/rowDragComp';
28
28
  import type { CellPosition } from './cellPositionUtils';
29
- import type { ColDef, ColGroupDef, ColTypeDef, IAggFunc, SortDirection } from './colDef';
29
+ import type { CheckboxSelectionCallback, ColDef, ColGroupDef, ColTypeDef, IAggFunc, SortDirection } from './colDef';
30
30
  import type { DataTypeDefinition } from './dataType';
31
31
  export interface GridOptions<TData = any> {
32
32
  /**
@@ -137,11 +137,13 @@ export interface GridOptions<TData = any> {
137
137
  /**
138
138
  * Set to `true` to copy the cell range or focused cell to the clipboard and never the selected rows.
139
139
  * @default false
140
+ * @deprecated v32.2 Use `selection.copySelectedRows` instead.
140
141
  */
141
142
  suppressCopyRowsToClipboard?: boolean;
142
143
  /**
143
144
  * Set to `true` to copy rows instead of ranges when a range with only a single cell is selected.
144
145
  * @default false
146
+ * @deprecated v32.2 Use `selection.copySelectedRows` instead.
145
147
  */
146
148
  suppressCopySingleCellRanges?: boolean;
147
149
  /**
@@ -194,9 +196,16 @@ export interface GridOptions<TData = any> {
194
196
  };
195
197
  /**
196
198
  * Keeps the order of Columns maintained after new Column Definitions are updated.
199
+ *
197
200
  * @default false
198
201
  */
199
202
  maintainColumnOrder?: boolean;
203
+ /**
204
+ * Resets pivot column order when impacted by filters, data or configuration changes
205
+ *
206
+ * @default false
207
+ */
208
+ enableStrictPivotColumnOrder?: boolean;
200
209
  /**
201
210
  * If `true`, then dots in field names (e.g. `'address.firstLine'`) are not treated as deep references. Allows you to use dots in your field name if you prefer.
202
211
  * @default false
@@ -237,6 +246,11 @@ export interface GridOptions<TData = any> {
237
246
  * @default false
238
247
  */
239
248
  suppressColumnMoveAnimation?: boolean;
249
+ /**
250
+ * Set to `true` to suppress moving columns while dragging the Column Header. This option highlights the position where the column will be placed and it will only move it on mouse up.
251
+ * @default false
252
+ */
253
+ suppressMoveWhenColumnDragging?: boolean;
240
254
  /**
241
255
  * If `true`, when you drag a column out of the grid (e.g. to the group zone) the column is not hidden.
242
256
  * @default false
@@ -425,6 +439,14 @@ export interface GridOptions<TData = any> {
425
439
  * @default false
426
440
  */
427
441
  suppressAdvancedFilterEval?: boolean;
442
+ /**
443
+ * When using AG Grid Enterprise, the Set Filter is used by default when `filter: true` is set on column definitions.
444
+ * Set to `true` to prevent this and instead use the Text Filter, Number Filter or Date Filter based on the cell data type,
445
+ * the same as when using AG Grid Community.
446
+ * @default false
447
+ * @initial
448
+ */
449
+ suppressSetFilterByDefault?: boolean;
428
450
  /**
429
451
  * Set to `true` to Enable Charts.
430
452
  * @default false
@@ -519,6 +541,15 @@ export interface GridOptions<TData = any> {
519
541
  * @initial
520
542
  */
521
543
  context?: any;
544
+ /**
545
+ * Provide a custom drag and drop image component.
546
+ * @initial
547
+ */
548
+ dragAndDropImageComponent?: any;
549
+ /**
550
+ * Customise the parameters provided to the Drag and Drop Image Component.
551
+ */
552
+ dragAndDropImageComponentParams?: any;
522
553
  /**
523
554
  *
524
555
  * A list of grids to treat as Aligned Grids.
@@ -575,7 +606,7 @@ export interface GridOptions<TData = any> {
575
606
  */
576
607
  suppressAsyncEvents?: boolean;
577
608
  /**
578
- * The grid will check for `ResizeObserver` and use it if it exists in the browser, otherwise it will use the grid's alternative implementation. Some users reported issues with Chrome's `ResizeObserver`. Use this property to always use the grid's alternative implementation should such problems exist.
609
+ * @deprecated As of v32.2 the grid always uses the browser's ResizeObserver, this grid option has no effect
579
610
  * @default false
580
611
  * @initial
581
612
  */
@@ -602,7 +633,7 @@ export interface GridOptions<TData = any> {
602
633
  */
603
634
  loading?: boolean;
604
635
  /**
605
- * Provide a HTML string to override the default loading overlay.
636
+ * Provide a HTML string to override the default loading overlay. Supports non-empty plain text or HTML with a single root element.
606
637
  */
607
638
  overlayLoadingTemplate?: string;
608
639
  /**
@@ -622,7 +653,7 @@ export interface GridOptions<TData = any> {
622
653
  */
623
654
  suppressLoadingOverlay?: boolean;
624
655
  /**
625
- * Provide a HTML string to override the default no-rows overlay.
656
+ * Provide a HTML string to override the default no-rows overlay. Supports non-empty plain text or HTML with a single root element.
626
657
  */
627
658
  overlayNoRowsTemplate?: string;
628
659
  /**
@@ -755,7 +786,6 @@ export interface GridOptions<TData = any> {
755
786
  /**
756
787
  * Set to `true` to omit the value Column header when there is only a single value column.
757
788
  * @default false
758
- * @initial
759
789
  */
760
790
  removePivotHeaderRowWhenSingleValueColumn?: boolean;
761
791
  /**
@@ -770,7 +800,8 @@ export interface GridOptions<TData = any> {
770
800
  */
771
801
  enableCellChangeFlash?: boolean;
772
802
  /**
773
- * To be used when setting `enableCellChangeFlash` on column definitions. Sets the duration in milliseconds of how long a cell should remain in its "flashed" state.
803
+ * Sets the duration in milliseconds of how long a cell should remain in its "flashed" state.
804
+ * If `0`, the cell will not flash.
774
805
  * @default 500
775
806
  */
776
807
  cellFlashDuration?: number;
@@ -779,7 +810,7 @@ export interface GridOptions<TData = any> {
779
810
  */
780
811
  cellFlashDelay?: number;
781
812
  /**
782
- * To be used when setting `enableCellChangeFlash` on column definitions. Sets the duration in milliseconds of how long the "flashed" state animation takes to fade away after the timer set by cellFlashDuration has completed.
813
+ * Sets the duration in milliseconds of how long the "flashed" state animation takes to fade away after the timer set by `cellFlashDuration` has completed.
783
814
  * @default 1000
784
815
  */
785
816
  cellFadeDuration?: number;
@@ -911,6 +942,7 @@ export interface GridOptions<TData = any> {
911
942
  /**
912
943
  * When `true`, if you select a group, the children of the group will also be selected.
913
944
  * @default false
945
+ * @deprecated v32.2 Use `selection.groupSelects` instead
914
946
  */
915
947
  groupSelectsChildren?: boolean;
916
948
  /**
@@ -965,6 +997,7 @@ export interface GridOptions<TData = any> {
965
997
  /**
966
998
  * If using `groupSelectsChildren`, then only the children that pass the current filter will get selected.
967
999
  * @default false
1000
+ * @deprecated v32.2 Use `selection.groupSelects` instead
968
1001
  */
969
1002
  groupSelectsFiltered?: boolean;
970
1003
  /**
@@ -1222,21 +1255,25 @@ export interface GridOptions<TData = any> {
1222
1255
  scrollbarWidth?: number;
1223
1256
  /**
1224
1257
  * Type of Row Selection: `single`, `multiple`.
1258
+ * @deprecated v32.2 Instead, set `selection.mode` to `'singleRow'` or `'multiRow'`
1225
1259
  */
1226
1260
  rowSelection?: 'single' | 'multiple';
1227
1261
  /**
1228
1262
  * Set to `true` to allow multiple rows to be selected using single click.
1229
1263
  * @default false
1264
+ * @deprecated v32.2 Use `selection.enableMultiSelectWithClick` instead
1230
1265
  */
1231
1266
  rowMultiSelectWithClick?: boolean;
1232
1267
  /**
1233
1268
  * If `true`, rows will not be deselected if you hold down `Ctrl` and click the row or press `Space`.
1234
1269
  * @default false
1270
+ * @deprecated v32.2 Use `selection.suppressDeselection` instead
1235
1271
  */
1236
1272
  suppressRowDeselection?: boolean;
1237
1273
  /**
1238
1274
  * If `true`, row selection won't happen when rows are clicked. Use when you only want checkbox selection.
1239
1275
  * @default false
1276
+ * @deprecated v32.2 Use `selection.enableClickSelection` instead
1240
1277
  */
1241
1278
  suppressRowClickSelection?: boolean;
1242
1279
  /**
@@ -1249,9 +1286,20 @@ export interface GridOptions<TData = any> {
1249
1286
  * @default false
1250
1287
  */
1251
1288
  suppressHeaderFocus?: boolean;
1289
+ /**
1290
+ * Selection options object representing the new selection API. If this value is set all other selection related grid options will be ignored.
1291
+ */
1292
+ selection?: SelectionOptions;
1293
+ /**
1294
+ * Configure the selection column, used for displaying checkboxes.
1295
+ *
1296
+ * Note that due to the nature of this column, this type is a subset of `ColDef`, which does not support several normal column features such as editing, pivoting and grouping.
1297
+ */
1298
+ selectionColumnDef?: SelectionColumnDef;
1252
1299
  /**
1253
1300
  * If `true`, only a single range can be selected.
1254
1301
  * @default false
1302
+ * @deprecated v32.2 Use `selection.suppressMultiRanges` instead
1255
1303
  */
1256
1304
  suppressMultiRangeSelection?: boolean;
1257
1305
  /**
@@ -1264,26 +1312,31 @@ export interface GridOptions<TData = any> {
1264
1312
  /**
1265
1313
  * Set to `true` to enable Range Selection.
1266
1314
  * @default false
1315
+ * @deprecated v32.2 Use `selection.mode = 'cell'` instead
1267
1316
  */
1268
1317
  enableRangeSelection?: boolean;
1269
1318
  /**
1270
1319
  * Set to `true` to enable the Range Handle.
1271
1320
  * @default false
1321
+ * @deprecated v32.2 Use `selection.handle` instead
1272
1322
  */
1273
1323
  enableRangeHandle?: boolean;
1274
1324
  /**
1275
1325
  * Set to `true` to enable the Fill Handle.
1276
1326
  * @default false
1327
+ * @deprecated v32.2 Use `selection.handle` instead
1277
1328
  */
1278
1329
  enableFillHandle?: boolean;
1279
1330
  /**
1280
1331
  * Set to `'x'` to force the fill handle direction to horizontal, or set to `'y'` to force the fill handle direction to vertical.
1281
1332
  * @default 'xy'
1333
+ * @deprecated v32.2 Use `selection.handle.direction` instead
1282
1334
  */
1283
1335
  fillHandleDirection?: 'x' | 'y' | 'xy';
1284
1336
  /**
1285
1337
  * Set this to `true` to prevent cell values from being cleared when the Range Selection is reduced by the Fill Handle.
1286
1338
  * @default false
1339
+ * @deprecated v32.2 Use `selection.suppressClearOnFillReduction` instead
1287
1340
  */
1288
1341
  suppressClearOnFillReduction?: boolean;
1289
1342
  /**
@@ -1391,6 +1444,18 @@ export interface GridOptions<TData = any> {
1391
1444
  * @default true
1392
1445
  */
1393
1446
  reactiveCustomComponents?: boolean;
1447
+ /**
1448
+ * Theme to apply to the grid.
1449
+ */
1450
+ theme?: GridTheme;
1451
+ /**
1452
+ * Whether to load supported theme fonts from the Google Fonts server.
1453
+ *
1454
+ * - `true` -> load fonts automatically if your theme uses them
1455
+ * - `false` -> do not load fonts. You must load them from Google Fonts yourself or download
1456
+ * them and serve them from your app, otherwise a fallback font will be used.
1457
+ */
1458
+ loadThemeGoogleFonts?: boolean;
1394
1459
  /**
1395
1460
  * For customising the context menu.
1396
1461
  */
@@ -1423,7 +1488,7 @@ export interface GridOptions<TData = any> {
1423
1488
  */
1424
1489
  processGroupHeaderForClipboard?: (params: ProcessGroupHeaderForExportParams<TData>) => any;
1425
1490
  /**
1426
- * Allows you to process cells from the clipboard. Handy if for example you have number fields, and want to block non-numbers from getting into the grid.
1491
+ * Allows you to process cells from the clipboard. Handy if for example you have number fields and want to block non-numbers from getting into the grid.
1427
1492
  */
1428
1493
  processCellFromClipboard?: (params: ProcessCellForExportParams<TData>) => any;
1429
1494
  /**
@@ -1506,11 +1571,11 @@ export interface GridOptions<TData = any> {
1506
1571
  */
1507
1572
  initialGroupOrderComparator?: (params: InitialGroupOrderComparatorParams<TData>) => number;
1508
1573
  /**
1509
- * Callback to be used with pivoting, to allow changing the second column definition.
1574
+ * Callback for the mutation of the generated pivot result column definitions
1510
1575
  */
1511
1576
  processPivotResultColDef?: (colDef: ColDef<TData>) => void;
1512
1577
  /**
1513
- * Callback to be used with pivoting, to allow changing the second column group definition.
1578
+ * Callback for the mutation of the generated pivot result column group definitions
1514
1579
  */
1515
1580
  processPivotResultColGroupDef?: (colGroupDef: ColGroupDef<TData>) => void;
1516
1581
  /**
@@ -1564,6 +1629,7 @@ export interface GridOptions<TData = any> {
1564
1629
  processRowPostCreate?: (params: ProcessRowParams<TData>) => void;
1565
1630
  /**
1566
1631
  * Callback to be used to determine which rows are selectable. By default rows are selectable, so return `false` to make a row un-selectable.
1632
+ * @deprecated v32.2 Use `selection.isRowSelectable` instead
1567
1633
  */
1568
1634
  isRowSelectable?: IsRowSelectable<TData>;
1569
1635
  /**
@@ -1675,7 +1741,8 @@ export interface GridOptions<TData = any> {
1675
1741
  */
1676
1742
  onVirtualColumnsChanged?(event: VirtualColumnsChangedEvent<TData>): void;
1677
1743
  /**
1678
- * Shotgun - gets called when either a) new columns are set or b) `api.applyColumnState()` is used, so everything has changed.
1744
+ * @deprecated v32.2 Either use `onDisplayedColumnsChanged` which is fired at the same time,
1745
+ * or use one of the more specific column events.
1679
1746
  */
1680
1747
  onColumnEverythingChanged?(event: ColumnEverythingChangedEvent<TData>): void;
1681
1748
  /**
@@ -1745,12 +1812,24 @@ export interface GridOptions<TData = any> {
1745
1812
  * Redo operation has ended.
1746
1813
  */
1747
1814
  onRedoEnded?(event: RedoEndedEvent<TData>): void;
1815
+ /**
1816
+ * Cell selection delete operation (cell clear) has started.
1817
+ */
1818
+ onCellSelectionDeleteStart?(event: CellSelectionDeleteStartEvent<TData>): void;
1819
+ /**
1820
+ * Cell selection delete operation (cell clear) has ended.
1821
+ */
1822
+ onCellSelectionDeleteEnd?(event: CellSelectionDeleteEndEvent<TData>): void;
1748
1823
  /**
1749
1824
  * Range delete operation (cell clear) has started.
1825
+ *
1826
+ * @deprecated v32.2 Use `onCellSelectionDeleteStart` instead
1750
1827
  */
1751
1828
  onRangeDeleteStart?(event: RangeDeleteStartEvent<TData>): void;
1752
1829
  /**
1753
1830
  * Range delete operation (cell clear) has ended.
1831
+ *
1832
+ * @deprecated v32.2 Use `onCellSelectionDeleteEnd` instead
1754
1833
  */
1755
1834
  onRangeDeleteEnd?(event: RangeDeleteEndEvent<TData>): void;
1756
1835
  /**
@@ -1839,6 +1918,10 @@ export interface GridOptions<TData = any> {
1839
1918
  * When dragging stops. This could be any action that uses the grid's Drag and Drop service, e.g. Column Moving, Column Resizing, Range Selection, Fill Handle, etc.
1840
1919
  */
1841
1920
  onDragStopped?(event: DragStoppedEvent<TData>): void;
1921
+ /**
1922
+ * When dragging is cancelled stops. This is caused by pressing `Escape` while dragging elements within the grid that uses the grid's Drag and Drop service, e.g. Column Moving, Column Resizing, Range Selection, Fill Handle, etc.
1923
+ */
1924
+ onDragCancelled?(event: DragCancelledEvent<TData>): void;
1842
1925
  /**
1843
1926
  * Grid state has been updated.
1844
1927
  */
@@ -1867,6 +1950,10 @@ export interface GridOptions<TData = any> {
1867
1950
  * The drag has finished over the grid.
1868
1951
  */
1869
1952
  onRowDragEnd?(event: RowDragEndEvent<TData>): void;
1953
+ /**
1954
+ * The drag has been cancelled over the grid.
1955
+ */
1956
+ onRowDragCancel?(event: RowDragCancelEvent<TData>): void;
1870
1957
  /**
1871
1958
  * A row group column was added, removed or reordered.
1872
1959
  */
@@ -1894,7 +1981,7 @@ export interface GridOptions<TData = any> {
1894
1981
  /**
1895
1982
  * Async transactions have been applied. Contains a list of all transaction results.
1896
1983
  */
1897
- onAsyncTransactionsFlushed?(event: AsyncTransactionsFlushed<TData>): void;
1984
+ onAsyncTransactionsFlushed?(event: AsyncTransactionsFlushedEvent<TData>): void;
1898
1985
  /**
1899
1986
  * A server side store has finished refreshing.
1900
1987
  */
@@ -1949,8 +2036,14 @@ export interface GridOptions<TData = any> {
1949
2036
  onCellContextMenu?(event: CellContextMenuEvent<TData>): void;
1950
2037
  /**
1951
2038
  * A change to range selection has occurred.
2039
+ *
2040
+ * @deprecated v32.2 Use `onCellSelectionChanged` instead
1952
2041
  */
1953
2042
  onRangeSelectionChanged?(event: RangeSelectionChangedEvent<TData>): void;
2043
+ /**
2044
+ * A change to cell selection has occurred.
2045
+ */
2046
+ onCellSelectionChanged?(event: CellSelectionChangedEvent<TData>): void;
1954
2047
  /**
1955
2048
  * A tooltip has been displayed */
1956
2049
  onTooltipShow?(event?: TooltipShowEvent<TData>): void;
@@ -2013,6 +2106,24 @@ export interface RowClassParams<TData = any, TContext = any> extends AgGridCommo
2013
2106
  * The index of the row */
2014
2107
  rowIndex: number;
2015
2108
  }
2109
+ export type GridThemeUseArgs = {
2110
+ loadThemeGoogleFonts: boolean | undefined;
2111
+ container: HTMLElement;
2112
+ };
2113
+ export interface GridTheme {
2114
+ /**
2115
+ * Called by a grid instance when it starts using the theme.
2116
+ */
2117
+ startUse(args: GridThemeUseArgs): void;
2118
+ /**
2119
+ * Called by a grid instance when it stops using the theme.
2120
+ */
2121
+ stopUse(): void;
2122
+ /**
2123
+ * CSS class to be applied to the grid wrapper element in order to apply the theme.
2124
+ */
2125
+ getCssClass(): string;
2126
+ }
2016
2127
  export interface GetContextMenuItems<TData = any, TContext = any> {
2017
2128
  (params: GetContextMenuItemsParams<TData, TContext>): (string | MenuItemDef<TData, TContext>)[];
2018
2129
  }
@@ -2090,3 +2201,127 @@ export interface LoadingCellRendererSelectorResult {
2090
2201
  params?: any;
2091
2202
  }
2092
2203
  export type DomLayoutType = 'normal' | 'autoHeight' | 'print';
2204
+ /** Configuration options for selection */
2205
+ export type SelectionOptions<TData = any, TValue = any> = RowSelectionOptions<TData, TValue> | CellSelectionOptions<TData>;
2206
+ /** Cell selection options */
2207
+ export interface CellSelectionOptions<TData = any> {
2208
+ mode: 'cell';
2209
+ /**
2210
+ * If `true`, only a single range can be selected
2211
+ * @default false
2212
+ */
2213
+ suppressMultiRanges?: boolean;
2214
+ /**
2215
+ * Determine the selection handle behaviour. Can be used to configure the range handle and the fill handle.
2216
+ */
2217
+ handle?: RangeHandleOptions | FillHandleOptions<TData>;
2218
+ }
2219
+ /**
2220
+ * Configuration options for the range handle
2221
+ */
2222
+ export interface RangeHandleOptions {
2223
+ mode: 'range';
2224
+ }
2225
+ /**
2226
+ * Configuration options for the fill handle
2227
+ */
2228
+ export interface FillHandleOptions<TData = any> {
2229
+ mode: 'fill';
2230
+ /**
2231
+ * Set this to `true` to prevent cell values from being cleared when the Range Selection is reduced by the Fill Handle.
2232
+ * @default false
2233
+ */
2234
+ suppressClearOnFillReduction?: boolean;
2235
+ /**
2236
+ * Set to `'x'` to force the fill handle direction to horizontal, or set to `'y'` to force the fill handle direction to vertical.
2237
+ * @default 'xy'
2238
+ */
2239
+ direction?: 'x' | 'y' | 'xy';
2240
+ /**
2241
+ * Callback to fill values instead of simply copying values or increasing number values using linear progression.
2242
+ */
2243
+ setFillValue?: <TContext = any>(params: FillOperationParams<TData, TContext>) => any;
2244
+ }
2245
+ export type RowSelectionOptions<TData = any, TValue = any> = SingleRowSelectionOptions<TData, TValue> | MultiRowSelectionOptions<TData>;
2246
+ interface CommonRowSelectionOptions<TData = any, TValue = any> {
2247
+ /**
2248
+ * Modifies the selection behaviour when clicking a row, or pressing `Space` while focusing a row.
2249
+ * @default false
2250
+ */
2251
+ enableClickSelection?: boolean | 'enableDeselection' | 'enableSelection';
2252
+ /**
2253
+ * Set to `true` or return `true` from the callback to render a selection checkbox.
2254
+ * @default true
2255
+ */
2256
+ checkboxes?: boolean | CheckboxSelectionCallback<TData, TValue>;
2257
+ /**
2258
+ * Set to `true` to hide a disabled checkbox when row is not selectable and checkboxes are enabled.
2259
+ * @default false
2260
+ */
2261
+ hideDisabledCheckboxes?: boolean;
2262
+ /**
2263
+ * Callback to be used to determine which rows are selectable. By default rows are selectable, so return `false` to make a row non-selectable.
2264
+ */
2265
+ isRowSelectable?: IsRowSelectable<TData>;
2266
+ /**
2267
+ * When enabled and a row is selected, the copy action should copy the entire row, rather than just the focused cell
2268
+ */
2269
+ copySelectedRows?: boolean;
2270
+ }
2271
+ /**
2272
+ * Determines selection behaviour when only a single row can be selected at a time
2273
+ */
2274
+ export interface SingleRowSelectionOptions<TData = any, TValue = any> extends CommonRowSelectionOptions<TData, TValue> {
2275
+ mode: 'singleRow';
2276
+ }
2277
+ /**
2278
+ * Determines selection behaviour when multiple rows can be selected at once.
2279
+ */
2280
+ export interface MultiRowSelectionOptions<TData = any> extends CommonRowSelectionOptions<TData> {
2281
+ mode: 'multiRow';
2282
+ /**
2283
+ * Determine group selection behaviour
2284
+ * @default 'self'
2285
+ */
2286
+ groupSelects?: GroupSelectionMode;
2287
+ /**
2288
+ * Determines how "select all" behaviour works. This controls header checkbox selection.
2289
+ * @default 'all'
2290
+ */
2291
+ selectAll?: SelectAllMode;
2292
+ /**
2293
+ * If `true` or the callback returns `true`, a 'select all' checkbox will be put into the header.
2294
+ * @default true
2295
+ */
2296
+ headerCheckbox?: boolean;
2297
+ /**
2298
+ * Set to `true` to allow multiple rows to be selected using single click.
2299
+ * @default false
2300
+ */
2301
+ enableMultiSelectWithClick?: boolean;
2302
+ }
2303
+ /** Subset of ColDef allowing for customisation of the Controls column, currently used for checkbox selection */
2304
+ export type SelectionColumnDef = Pick<ColDef, 'icons' | 'suppressNavigable' | 'suppressKeyboardEvent' | 'contextMenuItems' | 'context' | 'onCellClicked' | 'onCellContextMenu' | 'onCellDoubleClicked' | 'onCellValueChanged' | 'headerTooltip' | 'headerClass' | 'headerComponent' | 'headerComponentParams' | 'mainMenuItems' | 'suppressHeaderContextMenu' | 'suppressHeaderMenuButton' | 'suppressHeaderKeyboardEvent' | 'pinned' | 'lockPinned' | 'initialPinned' | 'cellAriaRole' | 'cellStyle' | 'cellClass' | 'cellClassRules' | 'cellRenderer' | 'cellRendererParams' | 'cellRendererSelector' | 'rowDrag' | 'rowDragText' | 'dndSource' | 'dndSourceOnRowDrag' | 'sortable' | 'sort' | 'initialSort' | 'sortIndex' | 'initialSortIndex' | 'sortingOrder' | 'unSortIcon' | 'tooltipField' | 'tooltipValueGetter' | 'tooltipComponent' | 'tooltipComponentParams' | 'width' | 'initialWidth' | 'maxWidth' | 'minWidth' | 'flex' | 'initialFlex' | 'resizable' | 'suppressSizeToFit' | 'suppressAutoSize'>;
2305
+ /**
2306
+ * Determines the behaviour when selecting a group row.
2307
+ *
2308
+ * - When `'self'`, selects only the group row itself.
2309
+ * - When `'descendants'`, selecting a group row selects all its child rows.
2310
+ * - When `'filteredDescendants'`, selecting a group row selects all child rows that satisfy the currently active filter.
2311
+ */
2312
+ export type GroupSelectionMode = 'self' | 'descendants' | 'filteredDescendants';
2313
+ /**
2314
+ * Determines how "select all" behaviour works.
2315
+ *
2316
+ * - When `'all'`, selects all rows, regardless of filter and pagination settings.
2317
+ * - When `'filtered'`, selects all rows that satisfy the currently active filter.
2318
+ * - When `'currentPage'`, selects all rows that satisfy the currently active filter on the current page.
2319
+ */
2320
+ export type SelectAllMode =
2321
+ /** selects all rows, regardless of filter and pagination settings */
2322
+ 'all'
2323
+ /** selects all rows that satisfy the currently active filter */
2324
+ | 'filtered'
2325
+ /** selects all rows that satisfy the currently active filter on the current page */
2326
+ | 'currentPage';
2327
+ export {};