@opencorestack/opengridx 3.4.0 → 3.5.1

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 (82) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +10 -3
  3. package/dist/ai.cjs +2 -1
  4. package/dist/ai.cjs.map +1 -1
  5. package/dist/ai.d.ts +203 -3
  6. package/dist/ai.es.js +2 -1
  7. package/dist/ai.es.js.map +1 -1
  8. package/dist/index.d.ts +248 -4
  9. package/dist/opengridx.css +1 -1
  10. package/dist/opengridx.es.js +7334 -5906
  11. package/dist/opengridx.es.js.map +1 -1
  12. package/dist/opengridx.umd.js +16 -16
  13. package/dist/opengridx.umd.js.map +1 -1
  14. package/docs/API_REFERENCE.md +88 -7
  15. package/docs/README.md +3 -1
  16. package/docs/architecture/datagrid-orchestration.md +11 -5
  17. package/docs/components/filter-panel.md +1 -0
  18. package/docs/components/header.md +4 -1
  19. package/docs/components/toolbar.md +7 -0
  20. package/docs/customization/theming.md +3 -1
  21. package/docs/features/ai-toolkit.md +99 -5
  22. package/docs/features/cell-selection.md +8 -2
  23. package/docs/features/fill-handle.md +125 -0
  24. package/docs/features/filtering.md +3 -0
  25. package/docs/features/header-filters.md +138 -0
  26. package/docs/features/keyboard-navigation.md +20 -2
  27. package/docs/features/virtualization.md +5 -5
  28. package/docs/performance.md +212 -1
  29. package/docs/roadmap.md +3 -4
  30. package/lib/ai/agentTools.ts +160 -0
  31. package/lib/ai/index.ts +19 -2
  32. package/lib/ai/promptHandler.ts +109 -0
  33. package/lib/ai/types.ts +89 -25
  34. package/lib/ai/validate.ts +10 -0
  35. package/lib/components/AiAssistant/GridAiAssistantArea.tsx +26 -0
  36. package/lib/components/AiAssistant/GridAiAssistantPanel.css +171 -0
  37. package/lib/components/AiAssistant/GridAiAssistantPanel.tsx +145 -0
  38. package/lib/components/AiAssistant/useSpeechInput.ts +74 -0
  39. package/lib/components/Cell/Cell.css +28 -0
  40. package/lib/components/Cell/Cell.tsx +6 -2
  41. package/lib/components/DataGrid/DataGrid.tsx +84 -4
  42. package/lib/components/DataGrid/GridLiveRegion.tsx +5 -2
  43. package/lib/components/DataGrid/GridPinnedRows.tsx +5 -1
  44. package/lib/components/DataGrid/GridVirtualRows.tsx +5 -1
  45. package/lib/components/FilterPanel/FilterPanel.tsx +2 -9
  46. package/lib/components/Header/Header.tsx +44 -23
  47. package/lib/components/Header/headerColumnStyle.ts +28 -0
  48. package/lib/components/HeaderFilter/HeaderFilter.css +160 -0
  49. package/lib/components/HeaderFilter/HeaderFilterCell.tsx +370 -0
  50. package/lib/components/HeaderFilter/HeaderFilterOperatorMenu.tsx +124 -0
  51. package/lib/components/HeaderFilter/HeaderFilterRow.tsx +157 -0
  52. package/lib/components/Toolbar/GridToolbar.tsx +51 -0
  53. package/lib/hooks/core/gridApiPlaceholder.ts +8 -0
  54. package/lib/hooks/core/gridToolbarHostContext.ts +5 -0
  55. package/lib/hooks/core/useGridApiMethods.ts +39 -0
  56. package/lib/hooks/core/useGridAriaRows.ts +5 -3
  57. package/lib/hooks/core/useGridCellSelection.ts +77 -11
  58. package/lib/hooks/core/useGridColumnsPanel.ts +24 -1
  59. package/lib/hooks/core/useGridControlledState.ts +27 -0
  60. package/lib/hooks/core/useGridDevWarnings.ts +21 -6
  61. package/lib/hooks/core/useGridFillHandle.ts +323 -0
  62. package/lib/hooks/core/useGridKeyboardNavigation.ts +29 -10
  63. package/lib/hooks/core/useGridMaxContentHeight.ts +16 -0
  64. package/lib/hooks/core/useGridToolbarProps.ts +19 -0
  65. package/lib/hooks/core/useGridVirtualization.ts +19 -0
  66. package/lib/hooks/features/useGridAiAssistant.ts +284 -0
  67. package/lib/hooks/features/useGridBatchEdit.ts +2 -2
  68. package/lib/index.ts +3 -0
  69. package/lib/styles/opengridx.css +2 -0
  70. package/lib/theme/DataGridThemeProvider.tsx +2 -0
  71. package/lib/theme/types.ts +2 -0
  72. package/lib/types/index.ts +219 -1
  73. package/lib/utils/aiAssistant.ts +205 -0
  74. package/lib/utils/aiBrand.ts +17 -0
  75. package/lib/utils/cellSelection.ts +25 -5
  76. package/lib/utils/editing/fill.ts +238 -0
  77. package/lib/utils/filtering/index.ts +14 -0
  78. package/lib/utils/focus/index.ts +9 -3
  79. package/lib/utils/headerFilters.ts +189 -0
  80. package/lib/utils/maxElementHeight.ts +53 -0
  81. package/llms.txt +44 -4
  82. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -81,7 +81,8 @@ export declare interface CellProps<R extends GridRowModel = GridRowModel> {
81
81
  valueError?: unknown;
82
82
  /**
83
83
  * Place of the cell in the selected cell range (`cellSelection`), as bit flags: in range 1, top
84
- * edge 2, bottom 4, left 8, right 16. 0 or absent: not in a range. @since v3.3
84
+ * edge 2, bottom 4, left 8, right 16; 32 draws the fill handle (v3.5). 0 or absent: not in a range.
85
+ * @since v3.3
85
86
  */
86
87
  rangeFlags?: number;
87
88
  }
@@ -192,6 +193,18 @@ export declare interface DataGridProps<R extends GridValidRowModel = GridRowMode
192
193
  * Defaults to `false`.
193
194
  */
194
195
  wrapHeaderText?: boolean;
196
+ /**
197
+ * Adds a filter row under the column headers: one control per column (text, number, date, a Yes / No
198
+ * select for booleans, the `valueOptions` for singleSelect) with an operator menu and a clear button.
199
+ * It reads and writes `filterModel`: each cell owns the root-level item with `id: 'header:<field>'`,
200
+ * so the filter panel, quick filter and `filterMode="server"` keep working. A model the row cannot
201
+ * show (root `logicOperator: 'or'`, other conditions on the column, nested groups) is shown as
202
+ * "Custom filter" and left untouched. See `docs/features/header-filters.md`. Defaults to `false`.
203
+ * @since v3.5
204
+ */
205
+ headerFilters?: boolean;
206
+ /** Height of the header filter row (`headerFilters`) in pixels. Defaults to 40. @since v3.5 */
207
+ headerFilterHeight?: number;
195
208
  /** If true, the grid height will adjust to match the total height of its rows. */
196
209
  autoHeight?: boolean;
197
210
  /**
@@ -310,6 +323,16 @@ export declare interface DataGridProps<R extends GridValidRowModel = GridRowMode
310
323
  undoRedo?: boolean | GridUndoRedoOptions;
311
324
  /** Fired when what can be undone or redone changes (`undoRedo`). @since v3.4 */
312
325
  onHistoryChange?: (params: GridHistoryChangeParams) => void;
326
+ /**
327
+ * With `cellSelection` on, a fill handle sits on the bottom-right corner of the range: dragging it
328
+ * down, up, right or left fills the new cells from the range (a series of numbers or dates with an
329
+ * equal step continues, anything else repeats; Alt at release copies), and Ctrl/Cmd+D / Ctrl/Cmd+R
330
+ * fill down from the range's top row / right from its left column. `true` hides the handle and turns
331
+ * the shortcuts off. Default: false. @since v3.5
332
+ */
333
+ disableFillHandle?: boolean;
334
+ /** Fired after every fill with the result and its direction. @since v3.5 */
335
+ onFill?: (result: GridFillResult) => void;
313
336
  /** Loading state. With no rows the body shows skeleton rows (or `slots.loadingOverlay`); with rows, they stay and a progress bar (or `slots.loadingOverlay`) is shown over them. */
314
337
  loading?: boolean;
315
338
  /** Visual density of the grid. */
@@ -393,8 +416,13 @@ export declare interface DataGridProps<R extends GridValidRowModel = GridRowMode
393
416
  groupingColDef?: Partial<GridColDef<R>>;
394
417
  /** Initial expansion depth for Tree Data. */
395
418
  defaultGroupingExpansionDepth?: number;
396
- /** Controlled state for row grouping. */
419
+ /**
420
+ * The row grouping model: the fields to group by, outermost first. Passing it controls grouping;
421
+ * without it the grid keeps its own model, which `apiRef.setRowGroupingModel` and the AI assistant change.
422
+ */
397
423
  rowGroupingModel?: GridRowGroupingModel;
424
+ /** Fired when the row grouping model changes (`apiRef.setRowGroupingModel`, the AI assistant). @since v3.5 */
425
+ onRowGroupingModelChange?: (model: GridRowGroupingModel) => void;
398
426
  /** Controlled state for data aggregation (e.g., { salary: 'sum' }). */
399
427
  aggregationModel?: GridAggregationModel;
400
428
  /** Callback fired when aggregation model changes. */
@@ -453,6 +481,8 @@ export declare interface DataGridProps<R extends GridValidRowModel = GridRowMode
453
481
  * (plus `slotProps.cellSelectionStats`). @since v3.3
454
482
  */
455
483
  cellSelectionStats?: React.ComponentType<GridCellSelectionStatsSlotProps & Record<string, unknown>>;
484
+ /** Replaces the `aiAssistant` panel. Receives `GridAiAssistantPanelProps` while the panel is open. @since v3.5 */
485
+ aiAssistantPanel?: React.ComponentType<GridAiAssistantPanelProps & Record<string, unknown>>;
456
486
  };
457
487
  /** Properties passed directly to custom slots. */
458
488
  slotProps?: {
@@ -470,6 +500,8 @@ export declare interface DataGridProps<R extends GridValidRowModel = GridRowMode
470
500
  footer?: Partial<GridFooterSlotProps> & Record<string, unknown>;
471
501
  /** Merged over the `GridCellSelectionStatsSlotProps` the grid passes to the status bar. */
472
502
  cellSelectionStats?: Partial<GridCellSelectionStatsSlotProps> & Record<string, unknown>;
503
+ /** Extra props for `slots.aiAssistantPanel`. */
504
+ aiAssistantPanel?: Record<string, unknown>;
473
505
  };
474
506
  /** When true, renders the grid as a single-column list of cards. Perfect for mobile/responsive views. */
475
507
  listView?: boolean;
@@ -480,6 +512,17 @@ export declare interface DataGridProps<R extends GridValidRowModel = GridRowMode
480
512
  * column headers, supporting multiple levels of nesting.
481
513
  */
482
514
  columnGroupingModel?: GridColumnGroupingModel;
515
+ /**
516
+ * The "Ask AI" prompt panel: users describe the view they want and the grid applies the validated
517
+ * reply as one undoable step, shown as removable chips. The built-in toolbar shows an **Ask AI**
518
+ * button; `apiRef.openAiAssistant()` opens it without one. Build `onPrompt` with
519
+ * `createGridAiPromptHandler` from `@opencorestack/opengridx/ai`. @since v3.5
520
+ */
521
+ aiAssistant?: GridAiAssistantOptions;
522
+ /** Fired after the assistant applied a reply. @since v3.5 */
523
+ onAiAssistantApply?: (result: GridAiPromptResult) => void;
524
+ /** Fired when `onPrompt` fails or returns a result that was not validated. @since v3.5 */
525
+ onAiAssistantError?: (error: unknown) => void;
483
526
  }
484
527
 
485
528
  export declare function DataGridThemeProvider({ theme, children, className, style }: DataGridThemeProviderProps): JSX.Element;
@@ -681,6 +724,111 @@ export declare type GridAggregationPosition = 'inline' | 'footer' | null;
681
724
 
682
725
  export declare type GridAggregationResult = Record<string, unknown>;
683
726
 
727
+ /** The `aiAssistant` prop: the "Ask AI" prompt panel. @since v3.5 */
728
+ declare interface GridAiAssistantOptions {
729
+ /**
730
+ * Answers a prompt. Call your own model and return the validated result: `createGridAiPromptHandler`
731
+ * from `@opencorestack/opengridx/ai` builds this function, or call `validateGridAiState` yourself.
732
+ */
733
+ onPrompt: (prompt: string, context: GridAiPromptContext) => Promise<GridAiPromptResult>;
734
+ /** Placeholder of the prompt input. Default: `"Ask about this table…"` */
735
+ placeholder?: string;
736
+ /** Example prompts shown as clickable chips. */
737
+ suggestions?: string[];
738
+ /** Shows a microphone button where the browser has speech recognition; the microphone is asked for only on click. Default: true. */
739
+ voice?: boolean;
740
+ /** The parts of the state the assistant may change. Default: every part. */
741
+ parts?: GridAiPart[];
742
+ }
743
+
744
+ /** Props of `slots.aiAssistantPanel` and the built-in panel, rendered while the panel is open. @since v3.5 */
745
+ declare interface GridAiAssistantPanelProps {
746
+ status: GridAiAssistantStatus;
747
+ /** The status line: "Thinking…", "Applied 3 changes", an error. */
748
+ statusText: string;
749
+ /** The assistant's reply text (`result.message`). */
750
+ message: string | null;
751
+ /** What the last reply asked for that was ignored. */
752
+ errors: GridAiValidationError[];
753
+ /** The changes the last reply applied. */
754
+ chips: GridAiChip[];
755
+ /** Earlier prompts of this session, oldest first. */
756
+ history: GridAiHistoryEntry[];
757
+ suggestions: string[];
758
+ placeholder: string;
759
+ /** `voice` is on and this browser has speech recognition. */
760
+ voiceAvailable: boolean;
761
+ /** Undo can restore the state from before the last reply. */
762
+ canUndo: boolean;
763
+ submit: (prompt: string) => void;
764
+ /** Aborts the running request. */
765
+ stop: () => void;
766
+ /** Restores the state from before the last reply. */
767
+ undo: () => void;
768
+ /** Re-applies the last reply without this change. */
769
+ removeChip: (id: string) => void;
770
+ /** Closes the panel; focus returns to where it was before it opened. */
771
+ close: () => void;
772
+ }
773
+
774
+ /** The assistant panel's state. @since v3.5 */
775
+ declare type GridAiAssistantStatus = 'idle' | 'running' | 'applied' | 'stopped' | 'error';
776
+
777
+ /** One change the assistant applied, shown as a removable chip. @since v3.5 */
778
+ declare interface GridAiChip {
779
+ id: string;
780
+ part: GridAiPart;
781
+ label: string;
782
+ }
783
+
784
+ /** One earlier prompt of this session and the state the assistant applied for it. @since v3.5 */
785
+ declare interface GridAiHistoryEntry {
786
+ prompt: string;
787
+ applied: GridAiState;
788
+ }
789
+
790
+ /** A part of the grid state a model may change. @since v3.4 */
791
+ declare type GridAiPart = 'filter' | 'sort' | 'grouping' | 'aggregation' | 'pivot' | 'columnVisibility';
792
+
793
+ /** What `aiAssistant.onPrompt` receives next to the prompt. @since v3.5 */
794
+ declare interface GridAiPromptContext {
795
+ /** The grid's current models (`apiRef.getGridAiState()`). */
796
+ currentState: GridAiState;
797
+ /** Earlier prompts of this session, oldest first. */
798
+ history: GridAiHistoryEntry[];
799
+ /** Aborted when the user presses Stop, sends another prompt or closes the panel. */
800
+ signal: AbortSignal;
801
+ }
802
+
803
+ /**
804
+ * What `aiAssistant.onPrompt` resolves with. The grid applies it only when its `state` comes from
805
+ * `validateGridAiState` (or `createGridAiPromptHandler`), which brands the result and its `state`.
806
+ * @since v3.5
807
+ */
808
+ declare interface GridAiPromptResult {
809
+ state: GridAiState;
810
+ /** What the validator dropped; shown as "Ignored: …". */
811
+ errors: GridAiValidationError[];
812
+ /** The assistant's reply text, shown in the panel. */
813
+ message?: string;
814
+ }
815
+
816
+ /** Grid state as the AI toolkit reads and writes it. Only the parts present are applied. @since v3.4 */
817
+ declare interface GridAiState {
818
+ filterModel?: GridFilterModel;
819
+ sortModel?: GridSortItem[];
820
+ rowGroupingModel?: GridRowGroupingModel;
821
+ aggregationModel?: GridAggregationModel;
822
+ pivotModel?: GridPivotModel;
823
+ columnVisibilityModel?: GridColumnVisibilityModel;
824
+ }
825
+
826
+ /** One thing the validator dropped or could not use. `path` points into the model output. @since v3.4 */
827
+ declare interface GridAiValidationError {
828
+ path: string;
829
+ message: string;
830
+ }
831
+
684
832
  export declare type GridAlignment = 'left' | 'center' | 'right';
685
833
 
686
834
  /**
@@ -811,6 +959,25 @@ export declare interface GridApi<R extends GridValidRowModel = GridRowModel> {
811
959
  canRedo: () => boolean;
812
960
  /** Forgets every action (undo and redo). @since v3.4 */
813
961
  clearHistory: () => void;
962
+ /** Replaces the sort model (fires `onSortModelChange`). @since v3.5 */
963
+ setSortModel: (model: GridSortItem[]) => void;
964
+ /** Replaces the row grouping model (fires `onRowGroupingModelChange`). @since v3.5 */
965
+ setRowGroupingModel: (model: GridRowGroupingModel) => void;
966
+ /** Replaces the aggregation model (fires `onAggregationModelChange`). @since v3.5 */
967
+ setAggregationModel: (model: GridAggregationModel) => void;
968
+ /** Replaces the column visibility model (fires `onColumnVisibilityModelChange`). @since v3.5 */
969
+ setColumnVisibilityModel: (model: GridColumnVisibilityModel) => void;
970
+ /** Replaces the pivot model (fires `onPivotModelChange`). @since v3.5 */
971
+ setPivotModel: (model: GridPivotModel) => void;
972
+ /**
973
+ * The current filter, sort, grouping, aggregation, pivot and column visibility models, in the shape
974
+ * of the AI toolkit (`GridAiState`). @since v3.5
975
+ */
976
+ getGridAiState: () => GridAiState;
977
+ /** Opens the `aiAssistant` panel (does nothing without `aiAssistant`). @since v3.5 */
978
+ openAiAssistant: () => void;
979
+ /** Closes the `aiAssistant` panel. @since v3.5 */
980
+ closeAiAssistant: () => void;
814
981
  }
815
982
 
816
983
  /** What a batch edit (paste, range clear, undo, redo) did. @since v3.4 */
@@ -954,6 +1121,18 @@ export declare interface GridColDef<R extends GridValidRowModel = GridRowModel>
954
1121
  sortable?: boolean;
955
1122
  /** If false, filtering is disabled for this column. */
956
1123
  filterable?: boolean;
1124
+ /**
1125
+ * Set to `false` to leave this column's cell in the header filter row (`headerFilters`) empty.
1126
+ * Columns with `filterable: false` or `type: 'image'` have no header filter either.
1127
+ * @since v3.5
1128
+ */
1129
+ headerFilter?: boolean;
1130
+ /**
1131
+ * The operator a new header filter (`headerFilters`) for this column starts with. Defaults by type:
1132
+ * `contains` (string), `=` (number), `is` (date, boolean, singleSelect).
1133
+ * @since v3.5
1134
+ */
1135
+ headerFilterOperator?: GridFilterOperator;
957
1136
  /** If false, the user cannot manually resize this column. */
958
1137
  resizable?: boolean;
959
1138
  /** If false, the column cannot be hidden via the UI. */
@@ -996,6 +1175,13 @@ export declare interface GridColDef<R extends GridValidRowModel = GridRowModel>
996
1175
  * @since v3.1
997
1176
  */
998
1177
  sortComparator?(v1: unknown, v2: unknown, params1: GridSortCellParams<R>, params2: GridSortCellParams<R>): number;
1178
+ /**
1179
+ * Decides the value the fill handle (or Ctrl/Cmd+D, Ctrl/Cmd+R) writes into a cell of this column.
1180
+ * `params.value` is what the grid would write (a continued series, the repeated pattern or a copy);
1181
+ * return it to keep that, or any other value. A throw skips the cell with reason `'invalidValue'`.
1182
+ * The value then goes through `valueSetter` and `processRowUpdate` like an edit. @since v3.5
1183
+ */
1184
+ fillValue?(params: GridFillValueParams<R>): unknown;
999
1185
  /** Function to format a value into a human-readable string. */
1000
1186
  valueFormatter?(params: GridValueFormatterParams<R>): string;
1001
1187
  /** Custom component or element to render in the cell. */
@@ -1162,6 +1348,32 @@ export declare interface GridDetailPanelParams<R extends GridValidRowModel = Gri
1162
1348
  */
1163
1349
  export declare type GridEditSkipReason = 'notEditable' | 'invalidValue' | 'changed' | 'missing';
1164
1350
 
1351
+ /** The way a fill extends the cell range. @since v3.5 */
1352
+ export declare type GridFillDirection = 'down' | 'up' | 'right' | 'left';
1353
+
1354
+ /** `onFill` details: the batch edit result plus the direction of the fill. @since v3.5 */
1355
+ export declare interface GridFillResult extends GridBatchEditResult {
1356
+ direction: GridFillDirection;
1357
+ }
1358
+
1359
+ /** Parameters passed to `GridColDef.fillValue`. @since v3.5 */
1360
+ export declare interface GridFillValueParams<R extends GridValidRowModel = GridRowModel> {
1361
+ /** The row of the cell being filled, as stored now. */
1362
+ row: R;
1363
+ id: GridRowId;
1364
+ field: string;
1365
+ colDef: GridColDef<R>;
1366
+ direction: GridFillDirection;
1367
+ /** The source cells' values in fill order: the value next to the first filled cell is last. */
1368
+ sourceValues: unknown[];
1369
+ /** Position of this cell among the filled cells of its line, from 0 (next to the source). */
1370
+ index: number;
1371
+ /** What the grid would write: the continued series, the repeated pattern or a copy. */
1372
+ value: unknown;
1373
+ /** Whether a copy was asked for (Alt held at release, or the keyboard shortcuts), so no series. */
1374
+ copy: boolean;
1375
+ }
1376
+
1165
1377
  /** Describes a group of filters combined with a logical operator. */
1166
1378
  export declare interface GridFilterGroup {
1167
1379
  /** Optional ID for the group. */
@@ -1301,6 +1513,8 @@ export declare interface GridLocaleText {
1301
1513
  * @since v3.3
1302
1514
  */
1303
1515
  cellSelectionAnnouncement?: (cellCount: number, rowCount: number, columnCount: number) => string;
1516
+ /** Label of the toolbar button that opens the `aiAssistant` panel. Default: `"Ask AI"` @since v3.5 */
1517
+ aiAssistantButton?: string;
1304
1518
  }
1305
1519
 
1306
1520
  /**
@@ -1399,6 +1613,8 @@ declare interface GridRowCellRange {
1399
1613
  isBottom: boolean;
1400
1614
  /** Rows from this one to the bottom of the range; only set (else 0) when the grid has row spans. */
1401
1615
  bottomOffset: number;
1616
+ /** Data column index (`columnIndexMap`) of the cell carrying the fill handle; only set on its row. @since v3.5 */
1617
+ fillHandleCol?: number;
1402
1618
  }
1403
1619
 
1404
1620
  export declare type GridRowGroupingModel = string[];
@@ -1635,6 +1851,8 @@ export declare interface GridThemeGrid {
1635
1851
  rangeBackground?: string;
1636
1852
  /** Outline of a selected cell range (`--ogx-range-border`). Default: the primary colour. @since v3.3 */
1637
1853
  rangeBorder?: string;
1854
+ /** The fill handle on the range's corner (`--ogx-fill-handle-color`). Default: the range border colour. @since v3.5 */
1855
+ fillHandleColor?: string;
1638
1856
  pinnedLeftShadow?: string;
1639
1857
  pinnedRightShadow?: string;
1640
1858
  checkboxBg?: string;
@@ -1722,7 +1940,7 @@ export declare interface GridThemeTypography {
1722
1940
  fontSizeXl?: string;
1723
1941
  }
1724
1942
 
1725
- export declare function GridToolbar({ columns, baseColumns, aggregationModel, onAggregationModelChange, pivotModel, onPivotModelChange, filterModel, onFilterModelChange, columnVisibilityModel, onColumnVisibilityModelChange, onColumnReorder, onColumnOrderReset, forceColumnsOpen, onColumnsPanelClose, children, rightContent, style, renderColumnsButton, renderFilterButton, renderAggregationButton, renderExportButton, renderQuickFilter, className, showNonHideableColumns, }: GridToolbarProps): JSX.Element;
1943
+ export declare function GridToolbar({ columns, baseColumns, aggregationModel, onAggregationModelChange, pivotModel, onPivotModelChange, filterModel, onFilterModelChange, columnVisibilityModel, onColumnVisibilityModelChange, onColumnReorder, onColumnOrderReset, forceColumnsOpen, onColumnsPanelClose, forceFiltersOpen, onFiltersPanelClose, children, rightContent, style, renderColumnsButton, renderFilterButton, renderAggregationButton, renderExportButton, renderQuickFilter, className, showNonHideableColumns, onAiAssistantToggle, aiAssistantOpen, aiAssistantLabel, }: GridToolbarProps): JSX.Element;
1726
1944
 
1727
1945
  export declare interface GridToolbarProps {
1728
1946
  columns?: GridColDef[];
@@ -1743,6 +1961,10 @@ export declare interface GridToolbarProps {
1743
1961
  onColumnOrderReset?: () => void;
1744
1962
  forceColumnsOpen?: boolean;
1745
1963
  onColumnsPanelClose?: () => void;
1964
+ /** Opens the filter panel when it turns true (the grid passes it for the header filter row). @since v3.5 */
1965
+ forceFiltersOpen?: boolean;
1966
+ /** Called whenever the filter panel closes. @since v3.5 */
1967
+ onFiltersPanelClose?: () => void;
1746
1968
  children?: default_2.ReactNode;
1747
1969
  rightContent?: default_2.ReactNode;
1748
1970
  style?: default_2.CSSProperties;
@@ -1775,6 +1997,16 @@ export declare interface GridToolbarProps {
1775
1997
  className?: string;
1776
1998
  /** Show columns with `hideable: false` in the Columns panel as disabled rows. Default: false. */
1777
1999
  showNonHideableColumns?: boolean;
2000
+ /**
2001
+ * Opens or closes the `aiAssistant` panel. The grid passes it when `aiAssistant` is set; the
2002
+ * **Ask AI** button is shown only with it. Receives the button, which gets focus back on close.
2003
+ * @since v3.5
2004
+ */
2005
+ onAiAssistantToggle?: (trigger: HTMLElement | null) => void;
2006
+ /** Whether the `aiAssistant` panel is open. @since v3.5 */
2007
+ aiAssistantOpen?: boolean;
2008
+ /** Label of the Ask AI button (`localeText.aiAssistantButton`). Default: `"Ask AI"`. @since v3.5 */
2009
+ aiAssistantLabel?: string;
1778
2010
  }
1779
2011
 
1780
2012
  /**
@@ -1917,10 +2149,14 @@ export declare interface HeaderProps<R extends GridRowModel = GridRowModel> {
1917
2149
  onDragOver?: (field: string) => (event: default_2.DragEvent) => void;
1918
2150
  onDragEnd?: () => void;
1919
2151
  onDrop?: (targetField: string) => (event: default_2.DragEvent) => void;
1920
- /** The grid's focus position; `id: null` means a header cell is focused. */
2152
+ /**
2153
+ * The grid's focus position; `id: null` means a header cell is focused, and `headerFilter: true`
2154
+ * a cell of the header filter row.
2155
+ */
1921
2156
  focusedCell?: {
1922
2157
  id: string | number | null;
1923
2158
  field: string;
2159
+ headerFilter?: boolean;
1924
2160
  } | null;
1925
2161
  onHeaderClick?: (field: string) => void;
1926
2162
  onSortAdd?: (field: string, direction: GridSortDirection) => void;
@@ -1934,6 +2170,14 @@ export declare interface HeaderProps<R extends GridRowModel = GridRowModel> {
1934
2170
  wrapHeaderText?: boolean;
1935
2171
  /** Header row height in pixels; sets how many lines a wrapped title may take. Defaults to 56. */
1936
2172
  headerHeight?: number;
2173
+ /** Renders the header filter row under the column headers (`DataGridProps.headerFilters`). */
2174
+ headerFilters?: boolean;
2175
+ /** The filter model the header filter row reads. */
2176
+ filterModel?: GridFilterModel;
2177
+ /** Receives the filter model after a header filter changes. */
2178
+ onFilterModelChange?: (model: GridFilterModel) => void;
2179
+ /** Opens the filter panel; a header filter cell showing "Custom filter" calls it. */
2180
+ onOpenFilterPanel?: () => void;
1937
2181
  }
1938
2182
 
1939
2183
  /**