@gridstorm/react 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/index.cjs +1079 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +405 -0
- package/dist/index.d.ts +405 -0
- package/dist/index.js +1062 -0
- package/dist/index.js.map +1 -0
- package/package.json +81 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ComponentType, ReactNode, Component, ErrorInfo } from 'react';
|
|
4
|
+
import { ColumnState, GridApi, RowNode, ColumnDef, CellPosition, SortModelItem, FilterModel, SelectionSource, GridConfig, GridEventMap, SortDirection, GridEngine, GridState, PinnedPosition } from '@gridstorm/core';
|
|
5
|
+
export { CellEditorDef, CellPosition, ColumnDef, ColumnState, EditingState, FilterModel, GridApi, GridConfig, GridEventMap, GridPlugin, GridState, PinnedPosition, RowNode, SelectionState, SortDirection, SortModelItem } from '@gridstorm/core';
|
|
6
|
+
|
|
7
|
+
/** Props passed to React cell renderer components. */
|
|
8
|
+
interface CellRendererProps<TData = any, TValue = any> {
|
|
9
|
+
/** The cell's current value (after valueGetter). */
|
|
10
|
+
value: TValue;
|
|
11
|
+
/** The formatted display value (after valueFormatter). */
|
|
12
|
+
formattedValue: string;
|
|
13
|
+
/** The row data object. */
|
|
14
|
+
data: TData | undefined;
|
|
15
|
+
/** The RowNode for this row. */
|
|
16
|
+
node: RowNode<TData>;
|
|
17
|
+
/** Column definition. */
|
|
18
|
+
colDef: ColumnDef<TData, TValue>;
|
|
19
|
+
/** Column ID. */
|
|
20
|
+
colId: string;
|
|
21
|
+
/** Display row index. */
|
|
22
|
+
rowIndex: number;
|
|
23
|
+
/** Grid API reference. */
|
|
24
|
+
api: GridApi<TData>;
|
|
25
|
+
}
|
|
26
|
+
/** A React component used as a cell renderer. */
|
|
27
|
+
type ReactCellRenderer<TData = any, TValue = any> = ComponentType<CellRendererProps<TData, TValue>>;
|
|
28
|
+
/** Props passed to React header renderer components. */
|
|
29
|
+
interface HeaderRendererProps<TData = any> {
|
|
30
|
+
/** Column definition. */
|
|
31
|
+
colDef: ColumnDef<TData>;
|
|
32
|
+
/** Column ID. */
|
|
33
|
+
colId: string;
|
|
34
|
+
/** Display name for the header. */
|
|
35
|
+
displayName: string;
|
|
36
|
+
/** Current sort direction for this column. */
|
|
37
|
+
sortDirection: SortDirection;
|
|
38
|
+
/** Sort priority index (for multi-sort). */
|
|
39
|
+
sortIndex: number | null;
|
|
40
|
+
/** Grid API reference. */
|
|
41
|
+
api: GridApi<TData>;
|
|
42
|
+
/** Function to request sort toggle. */
|
|
43
|
+
onSortRequested: (multiSort: boolean) => void;
|
|
44
|
+
}
|
|
45
|
+
/** A React component used as a header renderer. */
|
|
46
|
+
type ReactHeaderRenderer<TData = any> = ComponentType<HeaderRendererProps<TData>>;
|
|
47
|
+
/** Props passed to React cell editor components. */
|
|
48
|
+
interface CellEditorProps<TData = any, TValue = any> {
|
|
49
|
+
/** Current cell value. */
|
|
50
|
+
value: TValue;
|
|
51
|
+
/** Row data. */
|
|
52
|
+
data: TData;
|
|
53
|
+
/** Column ID. */
|
|
54
|
+
colId: string;
|
|
55
|
+
/** Row ID. */
|
|
56
|
+
rowId: string;
|
|
57
|
+
/** Column state. */
|
|
58
|
+
column: ColumnState;
|
|
59
|
+
/** Additional editor params from column def. */
|
|
60
|
+
editorParams: Record<string, unknown>;
|
|
61
|
+
/** Callback to update the value while editing. */
|
|
62
|
+
onValueChange: (value: TValue) => void;
|
|
63
|
+
/** Callback to stop editing. */
|
|
64
|
+
stopEditing: (cancel?: boolean) => void;
|
|
65
|
+
/** Grid API reference. */
|
|
66
|
+
api: GridApi<TData>;
|
|
67
|
+
}
|
|
68
|
+
/** A React component used as a cell editor. */
|
|
69
|
+
type ReactCellEditor<TData = any, TValue = any> = ComponentType<CellEditorProps<TData, TValue>>;
|
|
70
|
+
/** Props passed to a context menu component. */
|
|
71
|
+
interface ContextMenuProps<TData = any> {
|
|
72
|
+
/** The cell position that was right-clicked. */
|
|
73
|
+
position: CellPosition;
|
|
74
|
+
/** The row node. */
|
|
75
|
+
node: RowNode<TData>;
|
|
76
|
+
/** Column ID. */
|
|
77
|
+
colId: string;
|
|
78
|
+
/** Cell value. */
|
|
79
|
+
value: any;
|
|
80
|
+
/** Grid API. */
|
|
81
|
+
api: GridApi<TData>;
|
|
82
|
+
/** Close the menu. */
|
|
83
|
+
closeMenu: () => void;
|
|
84
|
+
}
|
|
85
|
+
/** A React component used as a context menu. */
|
|
86
|
+
type ReactContextMenu<TData = any> = ComponentType<ContextMenuProps<TData>>;
|
|
87
|
+
/**
|
|
88
|
+
* Column definition that supports React component renderers.
|
|
89
|
+
* Extends the core ColumnDef to accept React components for
|
|
90
|
+
* cellRenderer, headerRenderer, and cellEditorComponent.
|
|
91
|
+
*/
|
|
92
|
+
interface ReactColumnDef<TData = any, TValue = any> extends Omit<ColumnDef<TData, TValue>, 'cellRenderer' | 'headerRenderer'> {
|
|
93
|
+
/** Original string/HTMLElement renderer OR React component. */
|
|
94
|
+
cellRenderer?: ColumnDef<TData, TValue>['cellRenderer'] | ReactCellRenderer<TData, TValue>;
|
|
95
|
+
/** Original string/HTMLElement header renderer OR React component. */
|
|
96
|
+
headerRenderer?: ColumnDef<TData>['headerRenderer'] | ReactHeaderRenderer<TData>;
|
|
97
|
+
/** React component cell editor (alternative to cellEditor string name). */
|
|
98
|
+
cellEditorComponent?: ReactCellEditor<TData, TValue>;
|
|
99
|
+
}
|
|
100
|
+
/** Props for controlled mode — parent owns state. */
|
|
101
|
+
interface ControlledStateProps<_TData = any> {
|
|
102
|
+
/** Controlled sort model. When provided, grid won't update sort internally. */
|
|
103
|
+
sortModel?: SortModelItem[];
|
|
104
|
+
/** Called when user tries to change sort (controlled mode). */
|
|
105
|
+
onSortModelChange?: (sortModel: SortModelItem[]) => void;
|
|
106
|
+
/** Controlled filter model. */
|
|
107
|
+
filterModel?: Record<string, FilterModel>;
|
|
108
|
+
/** Called when user tries to change filters. */
|
|
109
|
+
onFilterModelChange?: (filterModel: Record<string, FilterModel>) => void;
|
|
110
|
+
/** Controlled selection (set of row IDs). */
|
|
111
|
+
selectedRowIds?: Set<string>;
|
|
112
|
+
/** Called when user tries to change selection. */
|
|
113
|
+
onSelectedRowIdsChange?: (selectedRowIds: Set<string>, source: SelectionSource) => void;
|
|
114
|
+
/** Controlled pagination page. */
|
|
115
|
+
currentPage?: number;
|
|
116
|
+
/** Called when user tries to change page. */
|
|
117
|
+
onCurrentPageChange?: (page: number) => void;
|
|
118
|
+
}
|
|
119
|
+
/** All supported event callback props for the GridStorm component. */
|
|
120
|
+
interface GridStormEventProps<TData = any> {
|
|
121
|
+
onGridReady?: (api: GridApi<TData>) => void;
|
|
122
|
+
onRowDataChanged?: (event: GridEventMap<TData>['rowData:changed']) => void;
|
|
123
|
+
onSelectionChanged?: (event: GridEventMap<TData>['selection:changed']) => void;
|
|
124
|
+
onSortChanged?: (event: GridEventMap<TData>['column:sort:changed']) => void;
|
|
125
|
+
onFilterChanged?: (event: GridEventMap<TData>['filter:changed']) => void;
|
|
126
|
+
onCellValueChanged?: (event: GridEventMap<TData>['cell:valueChanged']) => void;
|
|
127
|
+
onCellClicked?: (event: GridEventMap<TData>['cell:clicked']) => void;
|
|
128
|
+
onCellDoubleClicked?: (event: GridEventMap<TData>['cell:doubleClicked']) => void;
|
|
129
|
+
onRowClicked?: (event: GridEventMap<TData>['row:clicked']) => void;
|
|
130
|
+
onCellEditingStarted?: (event: GridEventMap<TData>['cell:editingStarted']) => void;
|
|
131
|
+
onCellEditingStopped?: (event: GridEventMap<TData>['cell:editingStopped']) => void;
|
|
132
|
+
onPaginationChanged?: (event: GridEventMap<TData>['pagination:changed']) => void;
|
|
133
|
+
onColumnResized?: (event: GridEventMap<TData>['column:resized']) => void;
|
|
134
|
+
}
|
|
135
|
+
/** Options forwarded to the DomRenderer for Tier 1 feature rendering. */
|
|
136
|
+
interface RendererConfigProps {
|
|
137
|
+
/** Enable inline cell editing overlay. Default: auto-detect EditingPlugin. */
|
|
138
|
+
enableCellEditing?: boolean;
|
|
139
|
+
/** Enable row grouping visual (chevron, indent, group label). Default: auto-detect GroupingPlugin. */
|
|
140
|
+
enableGrouping?: boolean;
|
|
141
|
+
/** Indentation per group level in pixels. Default: 24. */
|
|
142
|
+
groupIndent?: number;
|
|
143
|
+
/** Show checkbox selection column as the first column. Default: false. */
|
|
144
|
+
checkboxSelection?: boolean;
|
|
145
|
+
/** Width of the checkbox column in pixels. Default: 48. */
|
|
146
|
+
checkboxColumnWidth?: number;
|
|
147
|
+
/** Show floating filter inputs below the header. Default: false. */
|
|
148
|
+
floatingFilter?: boolean;
|
|
149
|
+
/** Debounce delay for filter input in ms. Default: 300. */
|
|
150
|
+
floatingFilterDebounce?: number;
|
|
151
|
+
/** Show pagination bar below the grid. Default: auto-detect PaginationPlugin. */
|
|
152
|
+
enablePagination?: boolean;
|
|
153
|
+
/** Available page size options for the page size selector. Default: [25, 50, 100, 250]. */
|
|
154
|
+
pageSizeOptions?: number[];
|
|
155
|
+
}
|
|
156
|
+
/** Full props interface for the <GridStorm> component. */
|
|
157
|
+
interface GridStormProps<TData = any> extends Omit<GridConfig<TData>, 'columns' | 'onGridReady' | 'onRowDataChanged' | 'onSelectionChanged' | 'onSortChanged' | 'onFilterChanged' | 'onCellValueChanged'>, ControlledStateProps<TData>, GridStormEventProps<TData>, RendererConfigProps {
|
|
158
|
+
/** Column definitions (supports React component renderers). */
|
|
159
|
+
columns: ReactColumnDef<TData>[];
|
|
160
|
+
/** Container height. Default: 400. */
|
|
161
|
+
height?: number | string;
|
|
162
|
+
/** Container width. Default: '100%'. */
|
|
163
|
+
width?: number | string;
|
|
164
|
+
/** Additional CSS class for the container. */
|
|
165
|
+
containerClass?: string;
|
|
166
|
+
/** Additional inline styles for the container. */
|
|
167
|
+
containerStyle?: React.CSSProperties;
|
|
168
|
+
/** Custom context menu component. */
|
|
169
|
+
contextMenu?: ReactContextMenu<TData>;
|
|
170
|
+
/** Children (rendered for context consumers). */
|
|
171
|
+
children?: ReactNode;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare function GridStorm<TData = any>(props: GridStormProps<TData>): react_jsx_runtime.JSX.Element;
|
|
175
|
+
|
|
176
|
+
interface ErrorBoundaryProps {
|
|
177
|
+
children: ReactNode;
|
|
178
|
+
fallback?: ReactNode;
|
|
179
|
+
}
|
|
180
|
+
interface ErrorBoundaryState {
|
|
181
|
+
hasError: boolean;
|
|
182
|
+
error: Error | null;
|
|
183
|
+
}
|
|
184
|
+
declare class GridErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
185
|
+
state: ErrorBoundaryState;
|
|
186
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
|
187
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
188
|
+
render(): ReactNode;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface GridContextValue<TData = any> {
|
|
192
|
+
engine: GridEngine<TData>;
|
|
193
|
+
api: GridApi<TData>;
|
|
194
|
+
/** The root DOM element (.gs-root) of the grid. */
|
|
195
|
+
rootElement: HTMLElement | null;
|
|
196
|
+
}
|
|
197
|
+
declare const GridContext: react.Context<GridContextValue<any> | null>;
|
|
198
|
+
/**
|
|
199
|
+
* Internal helper — gets grid context with null-check.
|
|
200
|
+
* All public hooks use this internally.
|
|
201
|
+
*/
|
|
202
|
+
declare function useGridContext<TData = any>(): GridContextValue<TData>;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Access the GridApi instance.
|
|
206
|
+
* Must be used within a `<GridStorm>` component.
|
|
207
|
+
*/
|
|
208
|
+
declare function useGridApi<TData = any>(): GridApi<TData>;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Subscribe to grid state changes with a selector.
|
|
212
|
+
* Re-renders only when the selected value changes (reference equality).
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```tsx
|
|
216
|
+
* const rowCount = useGridState(state => state.displayedRowIds.length);
|
|
217
|
+
* const sortModel = useGridState(state => state.sortModel);
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
declare function useGridState<TData = any, TResult = any>(selector: (state: GridState<TData>) => TResult): TResult;
|
|
221
|
+
|
|
222
|
+
interface GridSelectionResult<TData = any> {
|
|
223
|
+
/** Set of selected row IDs. */
|
|
224
|
+
selectedRowIds: Set<string>;
|
|
225
|
+
/** Number of selected rows. */
|
|
226
|
+
selectedCount: number;
|
|
227
|
+
/** Get selected row data objects. */
|
|
228
|
+
getSelectedRows: () => TData[];
|
|
229
|
+
/** Get selected RowNode objects. */
|
|
230
|
+
getSelectedNodes: () => RowNode<TData>[];
|
|
231
|
+
/** Check if a specific row is selected. */
|
|
232
|
+
isRowSelected: (rowId: string) => boolean;
|
|
233
|
+
/** Select all visible rows. */
|
|
234
|
+
selectAll: () => void;
|
|
235
|
+
/** Deselect all rows. */
|
|
236
|
+
deselectAll: () => void;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Access selection state and actions.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```tsx
|
|
243
|
+
* const { selectedCount, selectAll, deselectAll, isRowSelected } = useGridSelection();
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
declare function useGridSelection<TData = any>(): GridSelectionResult<TData>;
|
|
247
|
+
|
|
248
|
+
interface GridSortResult {
|
|
249
|
+
/** Current sort model. */
|
|
250
|
+
sortModel: SortModelItem[];
|
|
251
|
+
/** Whether any sort is active. */
|
|
252
|
+
isSorted: boolean;
|
|
253
|
+
/** Set the sort model directly. */
|
|
254
|
+
setSortModel: (model: SortModelItem[]) => void;
|
|
255
|
+
/** Toggle sort on a column. */
|
|
256
|
+
toggleSort: (colId: string, multiSort?: boolean) => void;
|
|
257
|
+
/** Clear all sort. */
|
|
258
|
+
clearSort: () => void;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Access sort state and actions.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```tsx
|
|
265
|
+
* const { sortModel, isSorted, toggleSort, clearSort } = useGridSort();
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
declare function useGridSort(): GridSortResult;
|
|
269
|
+
|
|
270
|
+
interface GridFilterResult {
|
|
271
|
+
/** Current filter model (keyed by column ID). */
|
|
272
|
+
filterModel: Record<string, FilterModel>;
|
|
273
|
+
/** Current quick filter text. */
|
|
274
|
+
quickFilterText: string;
|
|
275
|
+
/** Whether any filter is active. */
|
|
276
|
+
isFiltered: boolean;
|
|
277
|
+
/** Set the filter model. */
|
|
278
|
+
setFilterModel: (model: Record<string, FilterModel>) => void;
|
|
279
|
+
/** Set quick filter text. */
|
|
280
|
+
setQuickFilter: (text: string) => void;
|
|
281
|
+
/** Clear all filters. */
|
|
282
|
+
clearFilters: () => void;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Access filter state and actions.
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```tsx
|
|
289
|
+
* const { isFiltered, setQuickFilter, clearFilters } = useGridFilter();
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
declare function useGridFilter(): GridFilterResult;
|
|
293
|
+
|
|
294
|
+
interface GridPaginationResult {
|
|
295
|
+
/** Current page (0-indexed). */
|
|
296
|
+
currentPage: number;
|
|
297
|
+
/** Total number of pages. */
|
|
298
|
+
totalPages: number;
|
|
299
|
+
/** Rows per page. */
|
|
300
|
+
pageSize: number;
|
|
301
|
+
/** Total row count (after filtering). */
|
|
302
|
+
totalRows: number;
|
|
303
|
+
/** Is there a next page? */
|
|
304
|
+
hasNextPage: boolean;
|
|
305
|
+
/** Is there a previous page? */
|
|
306
|
+
hasPreviousPage: boolean;
|
|
307
|
+
/** Go to a specific page. */
|
|
308
|
+
goToPage: (page: number) => void;
|
|
309
|
+
/** Go to next page. */
|
|
310
|
+
nextPage: () => void;
|
|
311
|
+
/** Go to previous page. */
|
|
312
|
+
previousPage: () => void;
|
|
313
|
+
/** Go to first page. */
|
|
314
|
+
firstPage: () => void;
|
|
315
|
+
/** Go to last page. */
|
|
316
|
+
lastPage: () => void;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Access pagination state and actions.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```tsx
|
|
323
|
+
* const { currentPage, totalPages, nextPage, previousPage } = useGridPagination();
|
|
324
|
+
* ```
|
|
325
|
+
*/
|
|
326
|
+
declare function useGridPagination(): GridPaginationResult;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Subscribe to a specific grid event.
|
|
330
|
+
* Handler ref prevents stale closures without re-subscribing.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```tsx
|
|
334
|
+
* useGridEvent('cell:clicked', (event) => {
|
|
335
|
+
* console.log('Clicked cell:', event.colId, event.value);
|
|
336
|
+
* });
|
|
337
|
+
* ```
|
|
338
|
+
*/
|
|
339
|
+
declare function useGridEvent<TData = any, K extends keyof GridEventMap<TData> = any>(event: K, handler: (payload: GridEventMap<TData>[K]) => void): void;
|
|
340
|
+
|
|
341
|
+
interface GridColumnResult {
|
|
342
|
+
/** All columns (including hidden). */
|
|
343
|
+
allColumns: ColumnState[];
|
|
344
|
+
/** Only visible columns. */
|
|
345
|
+
visibleColumns: ColumnState[];
|
|
346
|
+
/** Set a column's visibility. */
|
|
347
|
+
setColumnVisible: (colId: string, visible: boolean) => void;
|
|
348
|
+
/** Set a column's width. */
|
|
349
|
+
setColumnWidth: (colId: string, width: number) => void;
|
|
350
|
+
/** Move a column to a new index. */
|
|
351
|
+
moveColumn: (colId: string, toIndex: number) => void;
|
|
352
|
+
/** Pin a column. */
|
|
353
|
+
setColumnPinned: (colId: string, pinned: PinnedPosition) => void;
|
|
354
|
+
/** Get a single column by ID. */
|
|
355
|
+
getColumn: (colId: string) => ColumnState | undefined;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Access column state and actions.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```tsx
|
|
362
|
+
* const { visibleColumns, setColumnVisible, setColumnWidth } = useGridColumn();
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
declare function useGridColumn(): GridColumnResult;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Wrap a React component to use as a cell renderer.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```tsx
|
|
372
|
+
* const StatusCell = ({ value }: CellRendererProps) => (
|
|
373
|
+
* <span className={value ? 'active' : 'inactive'}>{value ? 'Yes' : 'No'}</span>
|
|
374
|
+
* );
|
|
375
|
+
*
|
|
376
|
+
* const columns = [
|
|
377
|
+
* { field: 'active', cellRenderer: reactCellRenderer(StatusCell) },
|
|
378
|
+
* ];
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
381
|
+
declare function reactCellRenderer<TData = any, TValue = any>(Component: ReactCellRenderer<TData, TValue>): any;
|
|
382
|
+
/** Check if a cellRenderer is a wrapped React component. */
|
|
383
|
+
declare function isReactCellRenderer(fn: unknown): boolean;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Wrap a React component to use as a header renderer.
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* ```tsx
|
|
390
|
+
* const SortHeader = ({ displayName, sortDirection, onSortRequested }: HeaderRendererProps) => (
|
|
391
|
+
* <div onClick={() => onSortRequested(false)}>
|
|
392
|
+
* {displayName} {sortDirection === 'asc' ? '▲' : sortDirection === 'desc' ? '▼' : ''}
|
|
393
|
+
* </div>
|
|
394
|
+
* );
|
|
395
|
+
*
|
|
396
|
+
* const columns = [
|
|
397
|
+
* { field: 'name', headerRenderer: reactHeaderRenderer(SortHeader) },
|
|
398
|
+
* ];
|
|
399
|
+
* ```
|
|
400
|
+
*/
|
|
401
|
+
declare function reactHeaderRenderer<TData = any>(Component: ReactHeaderRenderer<TData>): any;
|
|
402
|
+
/** Check if a headerRenderer is a wrapped React component. */
|
|
403
|
+
declare function isReactHeaderRenderer(fn: unknown): boolean;
|
|
404
|
+
|
|
405
|
+
export { type CellEditorProps, type CellRendererProps, type ContextMenuProps, type ControlledStateProps, GridContext, type GridContextValue, GridErrorBoundary, GridStorm, type GridStormEventProps, type GridStormProps, type HeaderRendererProps, type ReactCellEditor, type ReactCellRenderer, type ReactColumnDef, type ReactContextMenu, type ReactHeaderRenderer, type RendererConfigProps, isReactCellRenderer, isReactHeaderRenderer, reactCellRenderer, reactHeaderRenderer, useGridApi, useGridColumn, useGridContext, useGridEvent, useGridFilter, useGridPagination, useGridSelection, useGridSort, useGridState };
|