@opencorestack/opengridx 0.1.8 → 1.0.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 (67) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/index.d.ts +60 -41
  3. package/dist/opengridx.es.js +5271 -4660
  4. package/dist/opengridx.es.js.map +1 -1
  5. package/dist/opengridx.umd.js +12 -12
  6. package/dist/opengridx.umd.js.map +1 -1
  7. package/docs/README.md +14 -0
  8. package/docs/components/aggregation-footer.md +48 -0
  9. package/docs/components/datagrid.md +3 -0
  10. package/docs/components/empty-state.md +50 -0
  11. package/docs/components/error-overlay.md +40 -0
  12. package/docs/roadmap.md +20 -1
  13. package/lib/components/Cell/Cell.tsx +61 -64
  14. package/lib/components/Cell/GridEditInputCell.tsx +4 -4
  15. package/lib/components/ColumnVisibilityPanel/ColumnVisibilityPanel.tsx +3 -2
  16. package/lib/components/DataGrid/DataGrid.regression.test.tsx +132 -0
  17. package/lib/components/DataGrid/DataGrid.smoke.test.tsx +58 -0
  18. package/lib/components/DataGrid/DataGrid.tsx +396 -1654
  19. package/lib/components/DataGrid/GridAggregationFooter.tsx +68 -0
  20. package/lib/components/DataGrid/GridEmptyState.tsx +16 -0
  21. package/lib/components/DataGrid/GridErrorOverlay.tsx +33 -0
  22. package/lib/components/DataGrid/GridListView.tsx +116 -0
  23. package/lib/components/DataGrid/GridPinnedRows.tsx +98 -0
  24. package/lib/components/DataGrid/GridStandaloneColumnPanel.tsx +124 -0
  25. package/lib/components/DataGrid/GridVirtualRows.tsx +202 -0
  26. package/lib/components/FilterPanel/FilterPanel.tsx +18 -10
  27. package/lib/components/Header/ColumnMenu.tsx +2 -2
  28. package/lib/components/Header/Header.tsx +4 -4
  29. package/lib/components/ListView/ListViewRow.tsx +2 -2
  30. package/lib/components/Row/Row.tsx +46 -45
  31. package/lib/components/SkeletonRow/SkeletonRow.tsx +9 -2
  32. package/lib/components/Toolbar/GlobalSearch.tsx +1 -1
  33. package/lib/components/Toolbar/GridToolbar.tsx +26 -5
  34. package/lib/components/Toolbar/PivotPanel.tsx +7 -2
  35. package/lib/components/ui/DragHandleIcon.tsx +1 -1
  36. package/lib/hooks/core/useDataGrid.regression.test.ts +66 -0
  37. package/lib/hooks/core/useDataGrid.ts +15 -35
  38. package/lib/hooks/core/useGridColumns.tsx +228 -0
  39. package/lib/hooks/core/useGridControlledState.ts +192 -0
  40. package/lib/hooks/core/useGridKeyboardNavigation.ts +371 -0
  41. package/lib/hooks/core/useGridRowPipeline.ts +109 -0
  42. package/lib/hooks/core/useGridScrollSync.ts +52 -0
  43. package/lib/hooks/core/useGridStateSnapshot.ts +63 -0
  44. package/lib/hooks/core/useGridVirtualization.ts +186 -0
  45. package/lib/hooks/core/useGridVisibleRows.ts +66 -0
  46. package/lib/hooks/core/useLayout.ts +348 -0
  47. package/lib/hooks/features/useAggregation.test.ts +135 -0
  48. package/lib/hooks/features/useAggregation.ts +7 -7
  49. package/lib/hooks/features/useGridClipboard.ts +1 -1
  50. package/lib/hooks/features/useGridDataSource.ts +2 -2
  51. package/lib/hooks/features/useGridEditing.ts +31 -32
  52. package/lib/hooks/features/usePivot.test.ts +202 -0
  53. package/lib/hooks/features/usePivot.ts +0 -0
  54. package/lib/hooks/useColumnReorder.ts +1 -1
  55. package/lib/hooks/useRowGrouping.ts +14 -14
  56. package/lib/hooks/useTreeData.ts +1 -1
  57. package/lib/state/types.ts +1 -1
  58. package/lib/state/useGridStateStorage.ts +2 -2
  59. package/lib/types/index.ts +48 -32
  60. package/lib/utils/export/exportToExcelAdvanced.ts +14 -14
  61. package/lib/utils/export/index.ts +23 -18
  62. package/lib/utils/filtering/filtering.test.ts +178 -0
  63. package/lib/utils/filtering/index.ts +20 -20
  64. package/lib/utils/sorting/index.ts +1 -1
  65. package/lib/utils/sorting/sorting.test.ts +88 -0
  66. package/package.json +12 -5
  67. package/lib/utils/virtualization/index.ts +0 -106
package/CHANGELOG.md CHANGED
@@ -5,6 +5,65 @@
5
5
 
6
6
  ---
7
7
 
8
+ ## [1.0.0] — July 30, 2026 🚀
9
+
10
+ First stable public release. All 32 demo pages ship with a live source viewer. npm publish workflow is live.
11
+
12
+ ### Added
13
+ - **npm publish workflow**: GitHub Actions workflow (`.github/workflows/npm-publish.yml`) triggers on any `v*.*.*` tag push — runs lint, build, then `npm publish`. The package is now publicly available as `@opencorestack/opengridx` on the npm registry.
14
+ - **Source viewer on all 32 demos**: Every demo page now uses `DocsLayout` with a collapsible "View Source" tab showing the full component source code. Previously only 7 of 32 demos had this; the remaining 25 have been migrated.
15
+
16
+ ### Changed
17
+ - **Version**: `0.1.x` pre-release series → `1.0.0` stable. The public API (`DataGridProps`, `GridColDef`, `GridApi`, all hooks and types) is now considered stable.
18
+ - **Demo consistency**: All 32 demos share the same `DocsLayout` shell — consistent title, description, live preview, and source viewer. Inline `<h1>` / `<h2>` + `<p>` manual headers removed from every migrated demo.
19
+
20
+ ### Fixed (during migration)
21
+ - `PivotModeDemo` — `apiRef: any`, `fallbackRows: any[]`, `props: any` toolbar → fully typed
22
+ - `InfiniteScrollDemo` — introduced `PersonRow` interface, all `any` in data source and sort params replaced
23
+ - `ServerSideAggregationDemo` — `(a as any)[field]` field access → `keyof Employee` keyed access
24
+ - `AggregationFooter` + `ServerSideAggregationDemo` — `valueFormatter: { value: any }` → `unknown` with narrowing
25
+ - `SlotsDemo` — added `EmployeeRow` interface, `renderCell: (params: any)` × 2 replaced
26
+ - `CRUDTutorial` — `renderCell: (params: any)` → `GridRenderCellParams<User>`
27
+ - `RealEstatePortfolio` — `useState<any>` for pinnedColumns → `useState<GridColumnPinning>`
28
+ - `ExportDemo` — `apiRef: any` → `ReturnType<typeof useGridApiRef>`, `rowsToPrint: any[]` → typed
29
+ - `CustomPagination` — `(props: any)` component signature → explicit typed interface
30
+ - `Editing` — `handleProcessRowUpdate = (newRow: any)` → `MockRow` inferred from data
31
+
32
+ ---
33
+
34
+ ## [0.1.10] — July 30, 2026 🐛🔒
35
+
36
+ ### Fixed
37
+ - **`onRowClick` never fired when `onCellClick` was registered**: `Cell.tsx` was calling `e.stopPropagation()` inside its click handler whenever `onCellClick` was provided. This silently ate the event before it could bubble to the row's `onClick` handler, making `onRowClick` permanently unreachable from cell clicks. Removed the stopPropagation — both callbacks now fire in the natural bubble order (cell first, then row), matching standard data grid behavior.
38
+ - **Column visibility panel list not updating after column reorder**: The toolbar was receiving `effectiveColumns` (the pre-ordering array, in original definition order) instead of `orderedColumns` (the reordered array). After a drag-reorder in the panel, the grid columns reordered correctly but the panel list stayed frozen in definition order. Fixed `toolbarProps.columns` to use `orderedColumns`.
39
+ - **Reset button ignoring column sequence**: The Reset button in the column visibility panel called `onShowAll` only (restoring visibility), leaving any user-reordered sequence in place. Added `onColumnOrderReset` prop threaded from `ColumnVisibilityPanel` → `ColumnsPanelWrapper` → `GridToolbar` → `DataGrid`. DataGrid provides `() => setInternalColumnOrder(columns.map(c => c.field))` to restore original definition order on reset.
40
+ - **`FilterPanelDemo` filter panel inaccessible**: The demo had no `slots={{ toolbar: GridToolbar }}`, so the toolbar never rendered and the filter icon never appeared. Added the toolbar slot and rewrote the demo to use `DocsLayout` (consistent with all other demos).
41
+ - **`EventsDemo` event handlers never fired**: `onRowClick` was broken by the stopPropagation bug above. `onFilterModelChange` and `onColumnOrderChange` were dead — no toolbar existed to trigger them. Fixed by adding `slots={{ toolbar: GridToolbar }}`. Also replaced three `any`-typed handler signatures with `GridSortItem[]`, `GridFilterModel`, and `GridColumnOrderChangeParams`.
42
+ - **`FilterPanel` debounce stale-closure bug**: The 300 ms debounce `useEffect` read `item`, `col.field`, and `currentOperator` directly from closure (stale values after operator or field changes), suppressed with `eslint-disable-next-line`. Replaced with a refs-sync pattern (`useLayoutEffect` writing `itemRef`, `colFieldRef`, `operatorRef` each render) so the effect reads current values without the lint suppression and without stale closures.
43
+
44
+ ### Changed
45
+ - **Type safety — full `any` elimination**: Every `any` across `lib/` replaced with explicit types or `unknown`. Key changes: `GridRowModel` index signature `any → unknown` (with explicit internal row fields added to the type), all cell/value/error params typed as `unknown`, aggregation functions typed as `(values: unknown[]) => unknown`, `GridAggregationResult` typed as `Record<string, unknown>`, slot component types use `Record<string, unknown>`, export utilities narrowed with `instanceof Error` guards.
46
+ - **No more lint suppressions**: Removed all `eslint-disable-next-line react-hooks/exhaustive-deps` comments — every case fixed at the root cause rather than suppressed. Methods include: state refactors (`scrollTick` anti-pattern → `scrollTop`/`scrollLeft` state), ref patterns for stable callbacks, and correct dep arrays.
47
+ - **DataGrid.tsx continued decomposition**: Further hooks and components extracted — `useGridScrollSync` (RAF-batched scroll state), `useGridVirtualization`, `useGridVisibleRows`, `useGridColumns`, `GridAggregationFooter`, `GridEmptyState`, `GridErrorOverlay`, `GridVirtualRows`, `GridPinnedRows`, `GridStandaloneColumnPanel`, `GridListView`. Each module has a single clear responsibility and typed params/return interface.
48
+
49
+ ---
50
+
51
+ ## [0.1.9] — July 29, 2026 🛠️✨
52
+
53
+ ### Added
54
+ - **`GridApi.scrollToIndexes`**: New imperative API method `apiRef.current.scrollToIndexes({ rowIndex?, colIndex? })` scrolls the viewport to bring any row and/or column into view. Column index addresses all data columns (left-pinned + unpinned + right-pinned); pinned columns are always visible so they are silently skipped. Row scrolling accounts for variable-height rows (expanded detail panels, grouped rows).
55
+ - **`useGridKeyboardNavigation` hook**: Extracted ~370 lines of keyboard navigation state and handlers from `DataGrid.tsx` into a standalone `useGridKeyboardNavigation` hook. Fixes a previously dead code path where pressing Enter/Space on a header cell never triggered column sort (the edit handler ran first). The hook is part of the public `lib/` source.
56
+ - **`useLayout` hook**: Extracted all layout-computation logic from `DataGrid.tsx` into a standalone `useLayout` hook, reducing the main component by ~350 lines.
57
+ - **Test suite**: Added Vitest + `@testing-library/react` infrastructure with 65 unit tests covering `filterRows`, `sortRows`, `useAggregation`, and a DataGrid smoke test.
58
+ - **ScrollToIndexes demo**: New `/scroll-to` demo page showcasing the `scrollToIndexes` API with live row/column index controls.
59
+
60
+ ### Fixed
61
+ - **Excel export file format error**: `exportToExcel` generates an HTML-table file with `application/vnd.ms-excel` MIME type (the legacy XLS trick). All demo call-sites were passing explicit `.xlsx` filenames, causing Excel 2007+ to reject the download with "file format or file extension is not valid". Changed all `exportToExcel` usages to `.xls`. `exportToExcelAdvanced` (ExcelJS, real OOXML) is unaffected and correctly keeps `.xlsx`.
62
+ - **Keyboard sort on column headers**: Enter/Space on a focused header cell now correctly triggers sort. Previously the generic Enter-edit handler ran first, making header sort unreachable via keyboard.
63
+ - **ESLint errors**: Resolved all lint errors across the library — hooks called after conditional early returns (`Cell.tsx`, `Row.tsx`), ref mutations in the render phase moved to `useLayoutEffect`, and portal targets reading `ref.current` during render moved to `useState + useLayoutEffect`.
64
+
65
+ ---
66
+
8
67
  ## [0.1.8] — March 18, 2026 🐛✨
9
68
 
10
69
  ### Fixed
package/dist/index.d.ts CHANGED
@@ -34,9 +34,9 @@ declare function CellImpl<R extends GridRowModel = GridRowModel>(props: CellProp
34
34
 
35
35
  declare interface CellProps<R extends GridRowModel = GridRowModel> {
36
36
  onCellClick?: (params: GridCellParams<R>) => void;
37
- onCellEditStart?: (field: string, value: any) => void;
38
- onCellValueChange?: (field: string, newValue: any) => void;
39
- value: any;
37
+ onCellEditStart?: (field: string, value: unknown) => void;
38
+ onCellValueChange?: (field: string, newValue: unknown) => void;
39
+ value: unknown;
40
40
  row: R;
41
41
  colDef: GridColDef<R>;
42
42
  rowIndex: number;
@@ -52,7 +52,7 @@ declare interface CellProps<R extends GridRowModel = GridRowModel> {
52
52
  isEditing?: boolean;
53
53
  onEditStart?: () => void;
54
54
  onEditStop?: (cancel?: boolean) => void;
55
- onValueChange?: (newValue: any) => void;
55
+ onValueChange?: (newValue: unknown) => void;
56
56
  colSpanInfo?: CellColSpanInfo;
57
57
  rowSpan?: number;
58
58
  isHiddenByRowSpan?: boolean;
@@ -75,7 +75,7 @@ export declare interface CsvExportOptions {
75
75
  includeHeaders?: boolean;
76
76
  delimiter?: string;
77
77
  selectedRows?: (string | number)[];
78
- aggregationResult?: Record<string, any> | null;
78
+ aggregationResult?: Record<string, unknown> | null;
79
79
  aggregationModel?: GridAggregationModel | null;
80
80
  }
81
81
 
@@ -218,7 +218,7 @@ export declare interface DataGridProps<R extends GridRowModel = GridRowModel> {
218
218
  /** Callback to process an updated row after inline editing. Supports promises and validation. */
219
219
  processRowUpdate?: (newRow: R, oldRow: R) => R | Promise<R>;
220
220
  /** Callback fired if `processRowUpdate` throws or rejects. */
221
- onProcessRowUpdateError?: (error: any) => void;
221
+ onProcessRowUpdateError?: (error: unknown) => void;
222
222
  /** Interface for connecting the grid to an external (server-side) data source. */
223
223
  dataSource?: GridDataSource<R>;
224
224
  /** Callback fired when scrolling reaches the bottom of the grid viewport. */
@@ -228,23 +228,23 @@ export declare interface DataGridProps<R extends GridRowModel = GridRowModel> {
228
228
  /** Custom components to replace internal grid parts. */
229
229
  slots?: {
230
230
  /** Component rendered as the grid toolbar. */
231
- toolbar?: React.ComponentType<any>;
231
+ toolbar?: React.ComponentType<Record<string, unknown>>;
232
232
  /** Component rendered as the pagination control. */
233
- pagination?: React.ComponentType<any>;
233
+ pagination?: React.ComponentType<Record<string, unknown>>;
234
234
  /** Component rendered when the grid is empty. */
235
- noRowsOverlay?: React.ComponentType<any>;
235
+ noRowsOverlay?: React.ComponentType<Record<string, unknown>>;
236
236
  /** Component rendered during loading states. */
237
- loadingOverlay?: React.ComponentType<any>;
237
+ loadingOverlay?: React.ComponentType<Record<string, unknown>>;
238
238
  /** Component rendered at the very bottom of the grid. */
239
- footer?: React.ComponentType<any>;
239
+ footer?: React.ComponentType<Record<string, unknown>>;
240
240
  };
241
241
  /** Properties passed directly to custom slots. */
242
242
  slotProps?: {
243
- toolbar?: any;
244
- pagination?: any;
245
- noRowsOverlay?: any;
246
- loadingOverlay?: any;
247
- footer?: any;
243
+ toolbar?: Record<string, unknown>;
244
+ pagination?: Record<string, unknown>;
245
+ noRowsOverlay?: Record<string, unknown>;
246
+ loadingOverlay?: Record<string, unknown>;
247
+ footer?: Record<string, unknown>;
248
248
  };
249
249
  /** When true, renders the grid as a single-column list of cards. Perfect for mobile/responsive views. */
250
250
  listView?: boolean;
@@ -293,7 +293,7 @@ export declare interface ExcelAdvancedExportOptions {
293
293
  /** Body font size (default: 10) */
294
294
  bodyFontSize?: number;
295
295
  /** Current aggregation result */
296
- aggregationResult?: Record<string, any> | null;
296
+ aggregationResult?: Record<string, unknown> | null;
297
297
  /** Current aggregation model */
298
298
  aggregationModel?: GridAggregationModel | null;
299
299
  /** Currently selected row IDs */
@@ -325,7 +325,7 @@ export declare interface ExcelExportOptions {
325
325
  sheetName?: string;
326
326
  includeHeaders?: boolean;
327
327
  selectedRows?: (string | number)[];
328
- aggregationResult?: Record<string, any> | null;
328
+ aggregationResult?: Record<string, unknown> | null;
329
329
  aggregationModel?: GridAggregationModel | null;
330
330
  }
331
331
 
@@ -373,13 +373,13 @@ declare interface FilterPanelProps {
373
373
  onFilterModelChange: (model: GridFilterModel) => void;
374
374
  }
375
375
 
376
- export declare function formatAggregationValue(value: any, fnName: string): string;
376
+ export declare function formatAggregationValue(value: unknown, fnName: string): string;
377
377
 
378
378
  export declare interface GridAggregationModel {
379
379
  [field: string]: string;
380
380
  }
381
381
 
382
- export declare type GridAggregationResult = Record<string, any>;
382
+ export declare type GridAggregationResult = Record<string, unknown>;
383
383
 
384
384
  export declare type GridAlignment = 'left' | 'center' | 'right';
385
385
 
@@ -398,7 +398,7 @@ export declare interface GridApi {
398
398
  /** Returns all rows currently visible after filtering and sorting. */
399
399
  getVisibleRows: () => GridRowModel[];
400
400
  /** Returns the current aggregation results. */
401
- getAggregationResult: () => Record<string, any> | null;
401
+ getAggregationResult: () => Record<string, unknown> | null;
402
402
  /** Returns the active aggregation configuration. */
403
403
  getAggregationModel: () => GridAggregationModel | null;
404
404
  /** Returns the column definition for the given field. */
@@ -453,7 +453,7 @@ export declare interface GridApi {
453
453
  export declare interface GridCellParams<R extends GridRowModel = GridRowModel> {
454
454
  row: R;
455
455
  field: string;
456
- value: any;
456
+ value: unknown;
457
457
  colDef: GridColDef<R>;
458
458
  rowIndex: number;
459
459
  colIndex: number;
@@ -498,15 +498,17 @@ export declare interface GridColDef<R extends GridRowModel = GridRowModel> {
498
498
  hideable?: boolean;
499
499
  /** If false, the column cannot be pinned. */
500
500
  pinnable?: boolean;
501
+ /** Internal: marks this column as a virtual spacer used for horizontal virtualization. */
502
+ isSpacer?: boolean;
501
503
  /** Type used to determine default operators and formatting logic. */
502
504
  type?: 'string' | 'number' | 'date' | 'boolean' | 'singleSelect' | 'image';
503
505
  /** Options used for 'singleSelect' type. */
504
506
  valueOptions?: Array<string | number | {
505
- value: any;
507
+ value: unknown;
506
508
  label: string;
507
509
  }>;
508
510
  /** Function to compute a cell value from raw row data. */
509
- valueGetter?: (params: GridValueGetterParams<R>) => any;
511
+ valueGetter?: (params: GridValueGetterParams<R>) => unknown;
510
512
  /** Function to format a value into a human-readable string. */
511
513
  valueFormatter?: (params: GridValueFormatterParams<R>) => string;
512
514
  /** Custom component or element to render in the cell. */
@@ -615,12 +617,12 @@ export declare interface GridDataSource<R extends GridRowModel = GridRowModel> {
615
617
  /**
616
618
  * Optional: Fetches aggregation results for the entire dataset.
617
619
  */
618
- getAggregations?: (params: Omit<GridGetRowsParams, 'startRow' | 'endRow'>) => Promise<Record<string, any>>;
620
+ getAggregations?: (params: Omit<GridGetRowsParams, 'startRow' | 'endRow'>) => Promise<Record<string, unknown>>;
619
621
  }
620
622
 
621
623
  declare interface GridDataSourceState {
622
624
  loading: boolean;
623
- error?: any;
625
+ error?: unknown;
624
626
  }
625
627
 
626
628
  export declare interface GridDensityState {
@@ -654,7 +656,7 @@ export declare interface GridFilterItem {
654
656
  /** The comparison operator. */
655
657
  operator: GridFilterOperator;
656
658
  /** The value to compare against. */
657
- value?: any;
659
+ value?: unknown;
658
660
  }
659
661
 
660
662
  /** The overall state of grid filtering. */
@@ -685,7 +687,7 @@ export declare interface GridGetRowsParams {
685
687
  export declare interface GridGetRowsResponse<R extends GridRowModel = GridRowModel> {
686
688
  rows: R[];
687
689
  rowCount?: number;
688
- aggregationResults?: Record<string, any>;
690
+ aggregationResults?: Record<string, unknown>;
689
691
  }
690
692
 
691
693
  export declare type GridInitialState = GridState;
@@ -725,7 +727,7 @@ export declare interface GridPivotValueField {
725
727
  /** Parameters passed to the `renderCell` function. */
726
728
  export declare interface GridRenderCellParams<R extends GridRowModel = GridRowModel> {
727
729
  /** The current cell value. */
728
- value: any;
730
+ value: unknown;
729
731
  /** The row object. */
730
732
  row: R;
731
733
  /** The field name and unique ID. */
@@ -753,8 +755,24 @@ export declare type GridRowId = string | number;
753
755
  export declare interface GridRowModel {
754
756
  /** Uniquely identifies the row. */
755
757
  id: GridRowId;
758
+ /** Internal: row has child nodes (tree data / row grouping). */
759
+ _hasChildren?: boolean;
760
+ /** Internal: row is a skeleton placeholder during infinite-scroll loading. */
761
+ _isSkeleton?: boolean;
762
+ /** Internal: depth in the tree or grouping hierarchy. */
763
+ _treeDepth?: number;
764
+ /** Internal: whether the group/tree node is currently expanded. */
765
+ _isExpanded?: boolean;
766
+ /** Internal: field used for grouping at this level. */
767
+ _groupingField?: string;
768
+ /** Internal: grouping field value at this level. */
769
+ _groupingValue?: unknown;
770
+ /** Internal: total descendant count for tree/grouping nodes. */
771
+ _descendantCount?: number;
772
+ /** Internal: server-reported child count for lazy-loaded tree nodes. */
773
+ serverChildrenCount?: number;
756
774
  /** Any other dynamic row properties. */
757
- [key: string]: any;
775
+ [key: string]: unknown;
758
776
  }
759
777
 
760
778
  export declare interface GridRowOrderChangeParams<R extends GridRowModel = GridRowModel> {
@@ -958,7 +976,7 @@ export declare interface GridThemeTypography {
958
976
  fontSizeXl?: string;
959
977
  }
960
978
 
961
- export declare function GridToolbar({ columns, baseColumns, aggregationModel, onAggregationModelChange, pivotModel, onPivotModelChange, filterModel, onFilterModelChange, columnVisibilityModel, onColumnVisibilityModelChange, onColumnReorder, forceColumnsOpen, onColumnsPanelClose, children, rightContent, style, }: GridToolbarProps): JSX.Element;
979
+ export declare function GridToolbar({ columns, baseColumns, aggregationModel, onAggregationModelChange, pivotModel, onPivotModelChange, filterModel, onFilterModelChange, columnVisibilityModel, onColumnVisibilityModelChange, onColumnReorder, onColumnOrderReset, forceColumnsOpen, onColumnsPanelClose, children, rightContent, style, }: GridToolbarProps): JSX.Element;
962
980
 
963
981
  export declare interface GridToolbarProps {
964
982
  columns?: GridColDef[];
@@ -976,6 +994,7 @@ export declare interface GridToolbarProps {
976
994
  columnVisibilityModel?: Record<string, boolean>;
977
995
  onColumnVisibilityModelChange?: (model: Record<string, boolean>) => void;
978
996
  onColumnReorder?: (fromField: string, toField: string) => void;
997
+ onColumnOrderReset?: () => void;
979
998
  forceColumnsOpen?: boolean;
980
999
  onColumnsPanelClose?: () => void;
981
1000
  children?: default_2.ReactNode;
@@ -1006,9 +1025,9 @@ export declare interface GridTreeNode {
1006
1025
  /** The field this node is grouping by. */
1007
1026
  groupingField?: string;
1008
1027
  /** The actual value being grouped. */
1009
- groupingValue?: any;
1028
+ groupingValue?: unknown;
1010
1029
  /** Computed aggregation results for this group. */
1011
- aggregatedValues?: Record<string, any>;
1030
+ aggregatedValues?: Record<string, unknown>;
1012
1031
  /** Position of the aggregation row relative to the group. */
1013
1032
  aggregationPosition?: 'inline' | 'footer' | null;
1014
1033
  /** Current expansion state. */
@@ -1026,7 +1045,7 @@ export declare interface GridTreeNode {
1026
1045
  /** Parameters passed to the `valueFormatter` function. */
1027
1046
  export declare interface GridValueFormatterParams<R extends GridRowModel = GridRowModel> {
1028
1047
  /** The raw value to format. */
1029
- value: any;
1048
+ value: unknown;
1030
1049
  /** The row object. */
1031
1050
  row: R;
1032
1051
  /** The field name. */
@@ -1040,7 +1059,7 @@ export declare interface GridValueGetterParams<R extends GridRowModel = GridRowM
1040
1059
  /** The field name. */
1041
1060
  field: string;
1042
1061
  /** The raw value from the row object. */
1043
- value: any;
1062
+ value: unknown;
1044
1063
  }
1045
1064
 
1046
1065
  export declare function Header<R extends GridRowModel = GridRowModel>(props: HeaderProps<R>): JSX.Element;
@@ -1095,7 +1114,7 @@ export declare interface JsonExportOptions {
1095
1114
  fileName?: string;
1096
1115
  pretty?: boolean;
1097
1116
  selectedRows?: (string | number)[];
1098
- aggregationResult?: Record<string, any> | null;
1117
+ aggregationResult?: Record<string, unknown> | null;
1099
1118
  aggregationModel?: GridAggregationModel | null;
1100
1119
  }
1101
1120
 
@@ -1107,7 +1126,7 @@ export declare function printGrid<R extends GridRowModel>(rows: R[], columns: Gr
1107
1126
  export declare interface PrintOptions {
1108
1127
  title?: string;
1109
1128
  selectedRows?: (string | number)[];
1110
- aggregationResult?: Record<string, any> | null;
1129
+ aggregationResult?: Record<string, unknown> | null;
1111
1130
  aggregationModel?: GridAggregationModel | null;
1112
1131
  }
1113
1132
 
@@ -1144,12 +1163,12 @@ declare interface RowProps<R extends GridRowModel = GridRowModel> {
1144
1163
  editingCell?: {
1145
1164
  id: GridRowId;
1146
1165
  field: string;
1147
- value: any;
1166
+ value: unknown;
1148
1167
  } | null;
1149
1168
  onEditStart?: (params: {
1150
1169
  id: GridRowId;
1151
1170
  field: string;
1152
- value: any;
1171
+ value: unknown;
1153
1172
  }) => void;
1154
1173
  onEditStop?: (params?: {
1155
1174
  cancel?: boolean;
@@ -1157,7 +1176,7 @@ declare interface RowProps<R extends GridRowModel = GridRowModel> {
1157
1176
  onEditCellValueChange?: (params: {
1158
1177
  id: GridRowId;
1159
1178
  field: string;
1160
- value: any;
1179
+ value: unknown;
1161
1180
  }) => void;
1162
1181
  focusedCellField?: string | null;
1163
1182
  isFocusVisible?: boolean;
@@ -1194,7 +1213,7 @@ export declare interface UseAggregationParams<R extends GridRowModel> {
1194
1213
  export declare interface UseAggregationReturn {
1195
1214
  aggregationResult: GridAggregationResult;
1196
1215
  isLoading: boolean;
1197
- error: any;
1216
+ error: unknown;
1198
1217
  }
1199
1218
 
1200
1219
  /**