@svgrid/grid 2.2.0 → 2.2.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.
Files changed (114) hide show
  1. package/dist/FlexRender.svelte +96 -96
  2. package/dist/GridFooter.svelte +178 -178
  3. package/dist/SvCarousel.svelte +141 -141
  4. package/dist/SvColorInput.svelte +187 -187
  5. package/dist/SvContextMenu.svelte +116 -116
  6. package/dist/SvDrawer.svelte +250 -250
  7. package/dist/SvGrid.svelte +3131 -3131
  8. package/dist/SvGridBoard.svelte +2339 -2339
  9. package/dist/SvGridChart.svelte +1724 -1724
  10. package/dist/SvGridChartPanel.svelte +485 -485
  11. package/dist/SvGridDropdown.svelte +689 -689
  12. package/dist/SvGroupCell.svelte +109 -109
  13. package/dist/SvMenu.svelte +124 -124
  14. package/dist/SvMenuList.svelte +117 -117
  15. package/dist/SvNumberInput.svelte +131 -131
  16. package/dist/SvOtpInput.svelte +158 -158
  17. package/dist/SvPopover.svelte +139 -139
  18. package/dist/SvRowGroupPanel.svelte +170 -170
  19. package/dist/SvScrollArea.svelte +61 -61
  20. package/dist/SvTooltip.svelte +127 -127
  21. package/dist/SvTour.svelte +204 -204
  22. package/dist/SvTree.svelte +377 -377
  23. package/dist/SvTreeSelect.svelte +230 -230
  24. package/dist/cdn/svgrid.js +8 -8
  25. package/dist/cdn/svgrid.svelte-external.js +8 -8
  26. package/dist/chart-export.js +8 -8
  27. package/package.json +10 -10
  28. package/src/FlexRender.svelte +96 -96
  29. package/src/GridFooter.svelte +178 -178
  30. package/src/SvCarousel.svelte +141 -141
  31. package/src/SvColorInput.svelte +187 -187
  32. package/src/SvContextMenu.svelte +116 -116
  33. package/src/SvDrawer.svelte +250 -250
  34. package/src/SvGrid.controller.svelte.ts +3158 -3158
  35. package/src/SvGrid.svelte +3131 -3131
  36. package/src/SvGrid.types.ts +1489 -1489
  37. package/src/SvGridBoard.svelte +2339 -2339
  38. package/src/SvGridChart.svelte +1724 -1724
  39. package/src/SvGridChartPanel.svelte +485 -485
  40. package/src/SvGridDropdown.svelte +689 -689
  41. package/src/SvGroupCell.svelte +109 -109
  42. package/src/SvMenu.svelte +124 -124
  43. package/src/SvMenu.test.ts +97 -97
  44. package/src/SvMenuList.svelte +117 -117
  45. package/src/SvNumberInput.svelte +131 -131
  46. package/src/SvOtpInput.svelte +158 -158
  47. package/src/SvPopover.svelte +139 -139
  48. package/src/SvRowGroupPanel.svelte +170 -170
  49. package/src/SvScrollArea.svelte +61 -61
  50. package/src/SvTooltip.svelte +127 -127
  51. package/src/SvTour.svelte +204 -204
  52. package/src/SvTree.svelte +377 -377
  53. package/src/SvTreeSelect.svelte +230 -230
  54. package/src/a11y.contract.test.ts +49 -49
  55. package/src/a11y.test.ts +59 -59
  56. package/src/a11y.ts +61 -61
  57. package/src/build-api.ts +870 -870
  58. package/src/cell-formatting.ts +169 -169
  59. package/src/cell-render.ts +469 -469
  60. package/src/chart-export.ts +201 -201
  61. package/src/chart.ts +2296 -2296
  62. package/src/collaboration.test.ts +104 -104
  63. package/src/collaboration.ts +167 -167
  64. package/src/core.performance.test.ts +30 -30
  65. package/src/core.ts +1111 -1111
  66. package/src/createAutocomplete.svelte.ts +132 -132
  67. package/src/createCombobox.svelte.ts +179 -179
  68. package/src/createCountryInput.svelte.ts +157 -157
  69. package/src/createDropdownList.svelte.ts +162 -162
  70. package/src/createGrid.svelte.ts +42 -42
  71. package/src/createGrid.test.ts +10 -10
  72. package/src/createGridState.svelte.ts +17 -17
  73. package/src/createMenu.svelte.ts +202 -202
  74. package/src/createPopoverSelect.svelte.ts +206 -206
  75. package/src/createTree.svelte.ts +319 -319
  76. package/src/editing.test.ts +859 -859
  77. package/src/editing.ts +675 -675
  78. package/src/export-data-api.test.ts +126 -126
  79. package/src/export-format.test.ts +107 -107
  80. package/src/export-format.ts +598 -598
  81. package/src/flex-render.ts +3 -3
  82. package/src/index.ts +623 -623
  83. package/src/keyboard.test.ts +59 -59
  84. package/src/keyboard.ts +97 -97
  85. package/src/list-nav.test.ts +49 -49
  86. package/src/list-nav.ts +29 -29
  87. package/src/menus.ts +639 -639
  88. package/src/merge-objects.ts +48 -48
  89. package/src/overlays.test.ts +90 -90
  90. package/src/render-component.ts +28 -28
  91. package/src/selection.test.ts +754 -754
  92. package/src/selection.ts +600 -600
  93. package/src/server-data-source.test.ts +289 -289
  94. package/src/server-data-source.ts +413 -413
  95. package/src/sparkline.test.ts +68 -68
  96. package/src/sparkline.ts +169 -169
  97. package/src/spreadsheet.test.ts +489 -489
  98. package/src/spreadsheet.ts +312 -312
  99. package/src/static-functions.ts +11 -11
  100. package/src/subscribe.ts +38 -38
  101. package/src/svgrid-wrapper.types.ts +501 -501
  102. package/src/svgrid.behavior.test.ts +706 -706
  103. package/src/svgrid.charting.test.ts +527 -527
  104. package/src/svgrid.features.test.ts +157 -157
  105. package/src/svgrid.new-features.wrapper.test.ts +251 -251
  106. package/src/svgrid.wrapper.test.ts +40 -40
  107. package/src/test-setup.ts +62 -62
  108. package/src/themes/index.ts +159 -159
  109. package/src/virtualization/column-virtualizer.test.ts +27 -27
  110. package/src/virtualization/column-virtualizer.ts +30 -30
  111. package/src/virtualization/svelte-virtualizer.svelte.ts +26 -26
  112. package/src/virtualization/types.ts +30 -30
  113. package/src/virtualization/virtualizer.test.ts +47 -47
  114. package/src/virtualization/virtualizer.ts +296 -296
@@ -1,501 +1,501 @@
1
- import type { CellFormatConfig, ColumnDef, RowData, SvGridOptions, TableFeatures } from './core'
2
- import type { GridExportOptions, GridClipboardOptions } from './export-format'
3
- import type { ChartSpec, ChartType } from './chart'
4
-
5
- export type SvGridFilterOperator =
6
- | 'contains'
7
- | 'equals'
8
- | 'startsWith'
9
- | 'greaterThan'
10
- | 'lessThan'
11
- | 'between'
12
- | 'isBlank'
13
-
14
- /**
15
- * A serializable snapshot of everything that makes up the current "view":
16
- * sort, grouping, pagination, column layout (width / pinning / order /
17
- * visibility), and all filter surfaces. Round-trippable through
18
- * `api.getState()` / `api.setState()` - persist it to a URL, localStorage, or
19
- * a server to implement "save view" / "named views".
20
- */
21
- export type SvGridViewState = {
22
- sorting: Array<{ id: string; desc: boolean }>
23
- grouping: string[]
24
- pagination: { pageIndex: number; pageSize: number }
25
- columnWidths: Record<string, number>
26
- columnPinning: { left: string[]; right: string[] }
27
- columnOrder: string[]
28
- /** Ids of columns currently hidden via setColumnVisible. */
29
- hiddenColumns: string[]
30
- globalFilter: string
31
- columnFilters: Record<
32
- string,
33
- { operator: SvGridFilterOperator; value: string; valueTo?: string }
34
- >
35
- /** Facet (Excel-style value checklist) selections, keyed by column id. */
36
- facetFilters: Record<string, string[]>
37
- /** Built-in chart panel state (present only when `charting` is on): the
38
- * ACTIVE chart, for back-compat + spread-and-tweak. */
39
- chart?: {
40
- open: boolean
41
- type: ChartType
42
- dimension: string | null
43
- series: string | null
44
- measure: string | null
45
- reduce: 'sum' | 'avg' | 'count'
46
- stacked: boolean
47
- }
48
- /** All charts in the tab strip (multi-chart), plus the active index. */
49
- charts?: Array<{
50
- title: string
51
- type: ChartType
52
- dimension: string | null
53
- series: string | null
54
- measure: string | null
55
- reduce: 'sum' | 'avg' | 'count'
56
- stacked: boolean | null
57
- dataLabels: boolean | null
58
- logScale: boolean | null
59
- timeAxis: boolean | null
60
- valueFormat: 'number' | 'currency' | 'percent' | 'compact' | null
61
- }>
62
- chartActive?: number
63
- }
64
-
65
- /**
66
- * A batch of row mutations for `api.applyTransaction`. `update` / `remove`
67
- * (by id) match on `getRowId`; `remove` also accepts row object references.
68
- */
69
- export type SvGridTransaction<TData> = {
70
- add?: ReadonlyArray<TData>
71
- update?: ReadonlyArray<TData>
72
- remove?: ReadonlyArray<TData | string>
73
- }
74
-
75
- export type SvGridTransactionResult = {
76
- added: number
77
- updated: number
78
- removed: number
79
- }
80
-
81
- /**
82
- * Imperative API exposed via the `<SvGrid onApiReady>` callback. Use it for
83
- * data, column, filter, sort, group, and visibility operations from outside
84
- * the component.
85
- */
86
- export type SvGridApi<
87
- TFeatures extends TableFeatures,
88
- TData extends RowData,
89
- > = {
90
- // ----- Cells -----
91
- /** Read a cell value from the underlying data at `rowIndex`. */
92
- getCellValue(rowIndex: number, columnId: string): unknown
93
- /** Write a cell value through the column's field. */
94
- setCellValue(rowIndex: number, columnId: string, value: unknown): void
95
- /**
96
- * Programmatically begin editing a cell (as a double-click would). Returns
97
- * `true` if editing started (cell exists, editable, editing enabled).
98
- */
99
- startEditing(rowIndex: number, columnId: string): boolean
100
- /**
101
- * Commit (default) or, with `cancel: true`, discard the active edit.
102
- * Returns `true` if there was an edit in progress.
103
- */
104
- stopEditing(cancel?: boolean): boolean
105
-
106
- // ----- Cell selection -----
107
- /**
108
- * Programmatically select one or more rectangular cell ranges. Each
109
- * range is `[rowStart, colStart, rowEnd, colEnd]` in 0-indexed grid
110
- * coordinates. Pass an empty array to clear the selection.
111
- *
112
- * The grid currently honours the FIRST range only (single-range
113
- * engine); subsequent ranges are accepted for API forward compat
114
- * but ignored. The grid's active cell jumps to the range's start
115
- * corner.
116
- */
117
- selectCells(ranges: ReadonlyArray<readonly [number, number, number, number]>): void
118
- /**
119
- * Returns the current cell-selection rectangles in the same shape
120
- * `selectCells` accepts. Empty array when no range is active.
121
- */
122
- getSelected(): Array<[number, number, number, number]>
123
-
124
- // ----- Integrated charting (requires the `charting` prop) -----
125
- /** Open the built-in chart panel. */
126
- openChart(): void
127
- /** Close the built-in chart panel. */
128
- closeChart(): void
129
- /** The live chart spec the panel is rendering, or `null`. */
130
- getChartSpec(): ChartSpec | null
131
- /** Select cell rectangles + open the chart panel (scopes to the range). */
132
- chartRange(ranges?: ReadonlyArray<readonly [number, number, number, number]>): void
133
- /**
134
- * Configure the built-in chart panel's ACTIVE chart. Column references
135
- * accept a column id OR field name. Opens the panel unless `open === false`.
136
- */
137
- configureChart(config: {
138
- open?: boolean
139
- type?: ChartType
140
- dimension?: string | null
141
- series?: string | null
142
- measure?: string | null
143
- reduce?: 'sum' | 'avg' | 'count'
144
- stacked?: boolean
145
- dataLabels?: boolean
146
- logScale?: boolean
147
- timeAxis?: boolean
148
- valueFormat?: 'number' | 'currency' | 'percent' | 'compact'
149
- }): void
150
- /**
151
- * Register a natural-language "chart this" handler. When set, the chart
152
- * panel shows an AI button. `@svgrid/enterprise`'s `enableAiCharting(api)`
153
- * fills this. Pass `null` to remove it.
154
- */
155
- setChartAiHandler(
156
- handler: ((prompt: string) => Promise<Record<string, unknown> | null>) | null,
157
- ): void
158
-
159
- // ----- Rows -----
160
- /** Add one row. `position` defaults to `'bottom'`. */
161
- addRow(row: TData, position?: 'top' | 'bottom' | number): void
162
- addRows(rows: ReadonlyArray<TData>, position?: 'top' | 'bottom' | number): void
163
- /** Remove a row at the given data-array index. */
164
- removeRow(rowIndex: number): void
165
- removeRows(rowIndices: ReadonlyArray<number>): void
166
- /**
167
- * Apply a batch of add / update / remove mutations in a SINGLE data update
168
- * (one re-render, not one per row) - the high-frequency / streaming path.
169
- * `update` and `remove`-by-id match rows via `getRowId`, so set that prop
170
- * for those to work; `remove` also accepts row object references. Returns
171
- * the counts actually applied.
172
- */
173
- applyTransaction(tx: SvGridTransaction<TData>): SvGridTransactionResult
174
-
175
- // ----- Columns -----
176
- /** Add one column. `position` defaults to `'right'`. */
177
- addColumn(
178
- column: ColumnDef<TFeatures, TData>,
179
- position?: 'left' | 'right' | number,
180
- ): void
181
- addColumns(
182
- columns: ReadonlyArray<ColumnDef<TFeatures, TData>>,
183
- position?: 'left' | 'right' | number,
184
- ): void
185
- /** Remove a column by id (or field when no id was provided). */
186
- removeColumn(columnId: string): void
187
-
188
- // ----- Visibility -----
189
- setColumnVisible(columnId: string, visible: boolean): void
190
- isColumnVisible(columnId: string): boolean
191
-
192
- // ----- Sort / group / filter -----
193
- /** Sort by one column (replaces any existing sort). Pass `null` to clear. */
194
- setSort(columnId: string, direction: 'asc' | 'desc' | null): void
195
- clearSort(): void
196
- setGroupBy(columnIds: ReadonlyArray<string>): void
197
- /** Set the operator filter for a column. Pass `null` to clear. */
198
- setFilter(
199
- columnId: string,
200
- filter:
201
- | {
202
- operator: SvGridFilterOperator
203
- value?: string
204
- /** Upper bound for the `between` operator. Required when `operator === 'between'`. */
205
- valueTo?: string
206
- /**
207
- * Optional SECOND condition on the same column, joined by `join`
208
- * (multi-condition filtering, e.g. "> 100 AND < 500").
209
- */
210
- operator2?: SvGridFilterOperator
211
- value2?: string
212
- valueTo2?: string
213
- /** How to combine the two conditions. Defaults to `'AND'`. */
214
- join?: 'AND' | 'OR'
215
- }
216
- | null,
217
- ): void
218
- /**
219
- * Set the facet (set-list, Excel-style multi-select) filter for a column.
220
- * Pass an empty array or `null` to clear it. The values restore the
221
- * checked state of the column-menu's value list - the engine then filters
222
- * the data to rows whose cell value is in the set. Used to restore
223
- * snapshots captured via `onFiltersChange`'s `selectedValues`.
224
- */
225
- setFacetFilter(columnId: string, values: ReadonlyArray<string> | null): void
226
- clearFilter(columnId: string): void
227
- /**
228
- * Clear every active column filter (menu, filter-row, set-list, and global).
229
- * Resets the grid to "no filtering" in a single call.
230
- */
231
- clearAllFilters(): void
232
- /**
233
- * Read the active column-menu filters as a snapshot. Keyed by column id.
234
- * Returns an empty object when nothing is filtered. `valueTo` is only
235
- * present when `operator === 'between'`.
236
- */
237
- getFilters(): Record<
238
- string,
239
- { operator: SvGridFilterOperator; value: string; valueTo?: string }
240
- >
241
-
242
- /**
243
- * Snapshot of the rows the grid is actually displaying right now -
244
- * after filtering, sorting, grouping, and pagination have been applied.
245
- * Use this when you need to export the visible result set (e.g. CSV).
246
- */
247
- getDisplayedRows(): ReadonlyArray<TData>
248
-
249
- /** Snapshot of the current data array (pre-pipeline). */
250
- getData(): ReadonlyArray<TData>
251
-
252
- /**
253
- * Snapshot of every column the grid currently knows about, in visual
254
- * order, with the human-readable header label. Use this when exporting
255
- * or building a column-picker UI - the data is read once, no
256
- * subscription. Hidden columns are included; check `visible` to filter.
257
- */
258
- getColumns(): ReadonlyArray<{
259
- id: string
260
- field?: string
261
- header: string
262
- visible: boolean
263
- /** The column's `format` config, when set. Lets an exporter reproduce
264
- * the on-screen display value (currency, date pattern, etc.). */
265
- format?: CellFormatConfig
266
- /** Effective horizontal alignment ('left' | 'center' | 'right'). */
267
- align?: 'left' | 'center' | 'right'
268
- }>
269
-
270
- // ----- Free data export (CSV / TSV / JSON + clipboard) -----
271
- /**
272
- * Export the grid to a **CSV** file. Free in the community grid; the
273
- * richer Excel / PDF / styled formats live in @svgrid/enterprise. Values
274
- * are formatted as shown on screen (pass `rawValues: true` for raw). Rows
275
- * default to the current view (`rows: 'selected' | 'all'` to change).
276
- * Resolves with the serialized text; pass `download: false` to skip the
277
- * browser download and just get the string.
278
- */
279
- exportCsv(options?: GridExportOptions): Promise<string>
280
- /** Export the grid to a **TSV** file (tab-separated). See `exportCsv`. */
281
- exportTsv(options?: GridExportOptions): Promise<string>
282
- /** Export the grid to a **JSON** file (array of `{ field: value }`). */
283
- exportJson(options?: GridExportOptions): Promise<string>
284
- /**
285
- * Copy the grid to the system clipboard. `format: 'tsv'` (default) pastes
286
- * straight into Excel / Sheets; `'csv'` / `'markdown'` also supported.
287
- * Resolves with the copied text.
288
- */
289
- copyToClipboard(options?: GridClipboardOptions): Promise<string>
290
-
291
- /** Clear every checked row. Emits `onRowSelectionChange({}, [])`. */
292
- clearRowSelection(): void
293
-
294
- // ----- Column layout (width + pinning) -----
295
- /**
296
- * Set the width of one column in pixels. Identical to dragging the
297
- * column's resize handle. Width is clamped to `MIN_COLUMN_WIDTH`.
298
- */
299
- setColumnWidth(columnId: string, width: number): void
300
- /**
301
- * Snapshot of every column's current width (in pixels), keyed by
302
- * column id. Columns the user has never resized AND that have no
303
- * explicit `width` on their ColumnDef are reported at the grid-wide
304
- * default. Useful for "save view" + URL persistence.
305
- */
306
- getColumnWidths(): Record<string, number>
307
- /**
308
- * Snap one column's width to its widest visible cell (header text +
309
- * any rendered body cell). Equivalent to double-clicking the column's
310
- * resize handle. The grid also exposes this through the column menu's
311
- * "Autosize" item.
312
- */
313
- autosizeColumn(columnId: string): void
314
- /** Run `autosizeColumn` on every column. */
315
- autosizeAllColumns(): void
316
- /**
317
- * Replace the column-pinning state in one call. Each entry is a
318
- * column id; the order in the array becomes the visible order along
319
- * the pinned edge.
320
- */
321
- setColumnPinning(pinning: {
322
- left?: ReadonlyArray<string>
323
- right?: ReadonlyArray<string>
324
- }): void
325
- /** Snapshot of the current column-pinning state. */
326
- getColumnPinning(): { left: string[]; right: string[] }
327
-
328
- // ----- Column reorder -----
329
- /**
330
- * Replace the column order. Pass an array of column ids in the
331
- * desired visual order. Unknown ids are skipped; columns not in the
332
- * array keep their existing relative position after the listed ones.
333
- * Fires `onColumnOrderChange` once the new order is applied. Pin
334
- * groups (`columnPinning.left` / `right`) are still applied on top.
335
- */
336
- setColumnOrder(order: ReadonlyArray<string>): void
337
- /**
338
- * Snapshot of the current visual column order - the same shape the
339
- * `onColumnOrderChange` callback receives. Useful for saving and
340
- * restoring a view layout.
341
- */
342
- getColumnOrder(): string[]
343
-
344
- // ----- Row expansion -----
345
- /**
346
- * Set whether a row (group node or expandable leaf) is expanded.
347
- * The `id` is the engine's row id - for grouped rows that's the
348
- * synthetic group key (e.g. `"department:Engineering"`).
349
- */
350
- setRowExpanded(id: string, expanded: boolean): void
351
- /** Expand every group node in the current grouped row model. */
352
- expandAllGroups(): void
353
- /** Collapse every expansion - resets expanded state to {}. */
354
- collapseAllGroups(): void
355
-
356
- // ----- Undo / redo -----
357
- /** Undo the most recent inline-edit. Returns false when the history is empty. */
358
- undo(): boolean
359
- /** Redo the most recently undone edit. Returns false when the redo stack is empty. */
360
- redo(): boolean
361
- /** True when there's at least one step on the undo stack. */
362
- canUndo(): boolean
363
- /** True when there's at least one step on the redo stack. */
364
- canRedo(): boolean
365
- /** Wipe both stacks (e.g. after a server save commits the buffer). */
366
- clearHistory(): void
367
-
368
- // ----- Find in grid -----
369
- /** Open the built-in find overlay (Ctrl+F also opens it). */
370
- openFind(): void
371
- /** Close the find overlay and clear the query. */
372
- closeFind(): void
373
- /** Update the find query programmatically (useful for app-wide command palettes). */
374
- setFindQuery(q: string): void
375
- /** Snapshot of the current find hits (rowIndex / colIndex / columnId). */
376
- getFindHits(): Array<{ rowIndex: number; colIndex: number; columnId: string }>
377
-
378
- // ----- Row selection (read + write) -----
379
- /**
380
- * The currently selected data rows (group-header rows excluded), in row-model
381
- * order. Read once - no subscription. The push-based equivalent is
382
- * `onRowSelectionChange`.
383
- */
384
- getSelectedRows(): TData[]
385
- /** The engine row ids of the selected rows. Keys into the selection record. */
386
- getSelectedRowIds(): string[]
387
- /**
388
- * Select rows by engine row id. By default this REPLACES the selection;
389
- * pass `additive: true` to add to the existing selection instead.
390
- */
391
- selectRows(ids: ReadonlyArray<string>, additive?: boolean): void
392
- /** Select every selectable (non-group) row in the current row model. */
393
- selectAllRows(): void
394
- /** Flip one row's selected state by id. */
395
- toggleRowSelected(id: string): void
396
-
397
- // ----- Pagination -----
398
- /**
399
- * Current pagination snapshot. `total` is the post-filter row count;
400
- * `pageCount` is derived from it and `pageSize` (always >= 1).
401
- */
402
- getPageInfo(): {
403
- pageIndex: number
404
- pageSize: number
405
- pageCount: number
406
- total: number
407
- }
408
- /** Jump to a 0-based page. Clamped to [0, pageCount - 1]. */
409
- setPage(pageIndex: number): void
410
- /** Advance one page (no-op past the last page). */
411
- nextPage(): void
412
- /** Go back one page (no-op before the first page). */
413
- prevPage(): void
414
- /** Jump to the first page. */
415
- firstPage(): void
416
- /** Jump to the last page. */
417
- lastPage(): void
418
- /** Change the page size, keeping the first visible row in view. */
419
- setPageSize(pageSize: number): void
420
-
421
- // ----- Navigation / scrolling -----
422
- /**
423
- * Scroll the body so the given row index is at the top of the viewport.
424
- * Works with virtualization on. Index is clamped to the row count.
425
- */
426
- scrollToRow(rowIndex: number): void
427
- /** The active (focused) cell, or null when nothing is focused. */
428
- getActiveCell(): { rowIndex: number; colIndex: number; columnId: string } | null
429
- /** Move the active cell. Both coordinates are clamped to the grid bounds. */
430
- setActiveCell(rowIndex: number, colIndex: number): void
431
-
432
- // ----- View state (save / restore) -----
433
- /**
434
- * Serializable snapshot of the whole view - sort, grouping, pagination,
435
- * column layout, and every filter surface. Pair with `setState` for
436
- * "save view" / URL persistence / named views.
437
- */
438
- getState(): SvGridViewState
439
- /**
440
- * Restore a view from a (partial) snapshot produced by `getState`. Only the
441
- * keys present are applied, so you can restore just the columns, just the
442
- * filters, etc.
443
- */
444
- setState(state: Partial<SvGridViewState>): void
445
- /** Force a recompute of the row pipeline + a re-render. */
446
- refresh(): void
447
- }
448
-
449
- export type SvGridWrapperProps<
450
- TFeatures extends TableFeatures,
451
- TData extends RowData,
452
- > = {
453
- data: ReadonlyArray<TData>
454
- columns: Array<ColumnDef<TFeatures, TData>>
455
- /**
456
- * Feature set from `tableFeatures({ ... })`. Optional - the `sortable` /
457
- * `filterable` / `groupable` shortcuts inject the matching feature, so a
458
- * grid can be configured from the boolean shortcuts alone.
459
- */
460
- features?: TFeatures
461
- /**
462
- * Capability shortcuts. Every capability is OFF by default (a bare grid is
463
- * a plain read-only table); set a shortcut `true` to opt in.
464
- *
465
- * `sortable` - column sorting (injects `rowSortingFeature`)
466
- * `filterable` - column filtering (injects `columnFilteringFeature`)
467
- * `editable` - inline editing (alias of `enableInlineEditing`)
468
- * `groupable` - grouping controls (alias of `showGroupingControls`)
469
- * `pageable` - pagination footer (alias of `showPagination`)
470
- */
471
- sortable?: boolean
472
- filterable?: boolean
473
- editable?: boolean
474
- groupable?: boolean
475
- pageable?: boolean
476
- options?: Partial<SvGridOptions<TFeatures, TData>>
477
- loading?: boolean
478
- error?: string | null
479
- emptyMessage?: string
480
- showGlobalFilter?: boolean
481
- showColumnFilters?: boolean
482
- showGroupingControls?: boolean
483
- showRowSelection?: boolean
484
- showPagination?: boolean
485
- virtualization?: boolean
486
- /** Row height in pixels. Pass a function `(rowIndex) => px` for per-row
487
- * variable heights (e.g. when wiring up an interactive row-resize). */
488
- rowHeight?: number | ((rowIndex: number) => number)
489
- overscan?: number
490
- containerHeight?: number
491
- columnVirtualization?: boolean
492
- columnOverscan?: number
493
- columnWidth?: number
494
- showFilterMenu?: boolean
495
- showFilterRow?: boolean
496
- enableCellSelection?: boolean
497
- enableInlineEditing?: boolean
498
- enableRowSummaries?: boolean
499
- /** Receives the imperative grid API when the component is ready. */
500
- onApiReady?: (api: SvGridApi<TFeatures, TData>) => void
501
- }
1
+ import type { CellFormatConfig, ColumnDef, RowData, SvGridOptions, TableFeatures } from './core'
2
+ import type { GridExportOptions, GridClipboardOptions } from './export-format'
3
+ import type { ChartSpec, ChartType } from './chart'
4
+
5
+ export type SvGridFilterOperator =
6
+ | 'contains'
7
+ | 'equals'
8
+ | 'startsWith'
9
+ | 'greaterThan'
10
+ | 'lessThan'
11
+ | 'between'
12
+ | 'isBlank'
13
+
14
+ /**
15
+ * A serializable snapshot of everything that makes up the current "view":
16
+ * sort, grouping, pagination, column layout (width / pinning / order /
17
+ * visibility), and all filter surfaces. Round-trippable through
18
+ * `api.getState()` / `api.setState()` - persist it to a URL, localStorage, or
19
+ * a server to implement "save view" / "named views".
20
+ */
21
+ export type SvGridViewState = {
22
+ sorting: Array<{ id: string; desc: boolean }>
23
+ grouping: string[]
24
+ pagination: { pageIndex: number; pageSize: number }
25
+ columnWidths: Record<string, number>
26
+ columnPinning: { left: string[]; right: string[] }
27
+ columnOrder: string[]
28
+ /** Ids of columns currently hidden via setColumnVisible. */
29
+ hiddenColumns: string[]
30
+ globalFilter: string
31
+ columnFilters: Record<
32
+ string,
33
+ { operator: SvGridFilterOperator; value: string; valueTo?: string }
34
+ >
35
+ /** Facet (Excel-style value checklist) selections, keyed by column id. */
36
+ facetFilters: Record<string, string[]>
37
+ /** Built-in chart panel state (present only when `charting` is on): the
38
+ * ACTIVE chart, for back-compat + spread-and-tweak. */
39
+ chart?: {
40
+ open: boolean
41
+ type: ChartType
42
+ dimension: string | null
43
+ series: string | null
44
+ measure: string | null
45
+ reduce: 'sum' | 'avg' | 'count'
46
+ stacked: boolean
47
+ }
48
+ /** All charts in the tab strip (multi-chart), plus the active index. */
49
+ charts?: Array<{
50
+ title: string
51
+ type: ChartType
52
+ dimension: string | null
53
+ series: string | null
54
+ measure: string | null
55
+ reduce: 'sum' | 'avg' | 'count'
56
+ stacked: boolean | null
57
+ dataLabels: boolean | null
58
+ logScale: boolean | null
59
+ timeAxis: boolean | null
60
+ valueFormat: 'number' | 'currency' | 'percent' | 'compact' | null
61
+ }>
62
+ chartActive?: number
63
+ }
64
+
65
+ /**
66
+ * A batch of row mutations for `api.applyTransaction`. `update` / `remove`
67
+ * (by id) match on `getRowId`; `remove` also accepts row object references.
68
+ */
69
+ export type SvGridTransaction<TData> = {
70
+ add?: ReadonlyArray<TData>
71
+ update?: ReadonlyArray<TData>
72
+ remove?: ReadonlyArray<TData | string>
73
+ }
74
+
75
+ export type SvGridTransactionResult = {
76
+ added: number
77
+ updated: number
78
+ removed: number
79
+ }
80
+
81
+ /**
82
+ * Imperative API exposed via the `<SvGrid onApiReady>` callback. Use it for
83
+ * data, column, filter, sort, group, and visibility operations from outside
84
+ * the component.
85
+ */
86
+ export type SvGridApi<
87
+ TFeatures extends TableFeatures,
88
+ TData extends RowData,
89
+ > = {
90
+ // ----- Cells -----
91
+ /** Read a cell value from the underlying data at `rowIndex`. */
92
+ getCellValue(rowIndex: number, columnId: string): unknown
93
+ /** Write a cell value through the column's field. */
94
+ setCellValue(rowIndex: number, columnId: string, value: unknown): void
95
+ /**
96
+ * Programmatically begin editing a cell (as a double-click would). Returns
97
+ * `true` if editing started (cell exists, editable, editing enabled).
98
+ */
99
+ startEditing(rowIndex: number, columnId: string): boolean
100
+ /**
101
+ * Commit (default) or, with `cancel: true`, discard the active edit.
102
+ * Returns `true` if there was an edit in progress.
103
+ */
104
+ stopEditing(cancel?: boolean): boolean
105
+
106
+ // ----- Cell selection -----
107
+ /**
108
+ * Programmatically select one or more rectangular cell ranges. Each
109
+ * range is `[rowStart, colStart, rowEnd, colEnd]` in 0-indexed grid
110
+ * coordinates. Pass an empty array to clear the selection.
111
+ *
112
+ * The grid currently honours the FIRST range only (single-range
113
+ * engine); subsequent ranges are accepted for API forward compat
114
+ * but ignored. The grid's active cell jumps to the range's start
115
+ * corner.
116
+ */
117
+ selectCells(ranges: ReadonlyArray<readonly [number, number, number, number]>): void
118
+ /**
119
+ * Returns the current cell-selection rectangles in the same shape
120
+ * `selectCells` accepts. Empty array when no range is active.
121
+ */
122
+ getSelected(): Array<[number, number, number, number]>
123
+
124
+ // ----- Integrated charting (requires the `charting` prop) -----
125
+ /** Open the built-in chart panel. */
126
+ openChart(): void
127
+ /** Close the built-in chart panel. */
128
+ closeChart(): void
129
+ /** The live chart spec the panel is rendering, or `null`. */
130
+ getChartSpec(): ChartSpec | null
131
+ /** Select cell rectangles + open the chart panel (scopes to the range). */
132
+ chartRange(ranges?: ReadonlyArray<readonly [number, number, number, number]>): void
133
+ /**
134
+ * Configure the built-in chart panel's ACTIVE chart. Column references
135
+ * accept a column id OR field name. Opens the panel unless `open === false`.
136
+ */
137
+ configureChart(config: {
138
+ open?: boolean
139
+ type?: ChartType
140
+ dimension?: string | null
141
+ series?: string | null
142
+ measure?: string | null
143
+ reduce?: 'sum' | 'avg' | 'count'
144
+ stacked?: boolean
145
+ dataLabels?: boolean
146
+ logScale?: boolean
147
+ timeAxis?: boolean
148
+ valueFormat?: 'number' | 'currency' | 'percent' | 'compact'
149
+ }): void
150
+ /**
151
+ * Register a natural-language "chart this" handler. When set, the chart
152
+ * panel shows an AI button. `@svgrid/enterprise`'s `enableAiCharting(api)`
153
+ * fills this. Pass `null` to remove it.
154
+ */
155
+ setChartAiHandler(
156
+ handler: ((prompt: string) => Promise<Record<string, unknown> | null>) | null,
157
+ ): void
158
+
159
+ // ----- Rows -----
160
+ /** Add one row. `position` defaults to `'bottom'`. */
161
+ addRow(row: TData, position?: 'top' | 'bottom' | number): void
162
+ addRows(rows: ReadonlyArray<TData>, position?: 'top' | 'bottom' | number): void
163
+ /** Remove a row at the given data-array index. */
164
+ removeRow(rowIndex: number): void
165
+ removeRows(rowIndices: ReadonlyArray<number>): void
166
+ /**
167
+ * Apply a batch of add / update / remove mutations in a SINGLE data update
168
+ * (one re-render, not one per row) - the high-frequency / streaming path.
169
+ * `update` and `remove`-by-id match rows via `getRowId`, so set that prop
170
+ * for those to work; `remove` also accepts row object references. Returns
171
+ * the counts actually applied.
172
+ */
173
+ applyTransaction(tx: SvGridTransaction<TData>): SvGridTransactionResult
174
+
175
+ // ----- Columns -----
176
+ /** Add one column. `position` defaults to `'right'`. */
177
+ addColumn(
178
+ column: ColumnDef<TFeatures, TData>,
179
+ position?: 'left' | 'right' | number,
180
+ ): void
181
+ addColumns(
182
+ columns: ReadonlyArray<ColumnDef<TFeatures, TData>>,
183
+ position?: 'left' | 'right' | number,
184
+ ): void
185
+ /** Remove a column by id (or field when no id was provided). */
186
+ removeColumn(columnId: string): void
187
+
188
+ // ----- Visibility -----
189
+ setColumnVisible(columnId: string, visible: boolean): void
190
+ isColumnVisible(columnId: string): boolean
191
+
192
+ // ----- Sort / group / filter -----
193
+ /** Sort by one column (replaces any existing sort). Pass `null` to clear. */
194
+ setSort(columnId: string, direction: 'asc' | 'desc' | null): void
195
+ clearSort(): void
196
+ setGroupBy(columnIds: ReadonlyArray<string>): void
197
+ /** Set the operator filter for a column. Pass `null` to clear. */
198
+ setFilter(
199
+ columnId: string,
200
+ filter:
201
+ | {
202
+ operator: SvGridFilterOperator
203
+ value?: string
204
+ /** Upper bound for the `between` operator. Required when `operator === 'between'`. */
205
+ valueTo?: string
206
+ /**
207
+ * Optional SECOND condition on the same column, joined by `join`
208
+ * (multi-condition filtering, e.g. "> 100 AND < 500").
209
+ */
210
+ operator2?: SvGridFilterOperator
211
+ value2?: string
212
+ valueTo2?: string
213
+ /** How to combine the two conditions. Defaults to `'AND'`. */
214
+ join?: 'AND' | 'OR'
215
+ }
216
+ | null,
217
+ ): void
218
+ /**
219
+ * Set the facet (set-list, Excel-style multi-select) filter for a column.
220
+ * Pass an empty array or `null` to clear it. The values restore the
221
+ * checked state of the column-menu's value list - the engine then filters
222
+ * the data to rows whose cell value is in the set. Used to restore
223
+ * snapshots captured via `onFiltersChange`'s `selectedValues`.
224
+ */
225
+ setFacetFilter(columnId: string, values: ReadonlyArray<string> | null): void
226
+ clearFilter(columnId: string): void
227
+ /**
228
+ * Clear every active column filter (menu, filter-row, set-list, and global).
229
+ * Resets the grid to "no filtering" in a single call.
230
+ */
231
+ clearAllFilters(): void
232
+ /**
233
+ * Read the active column-menu filters as a snapshot. Keyed by column id.
234
+ * Returns an empty object when nothing is filtered. `valueTo` is only
235
+ * present when `operator === 'between'`.
236
+ */
237
+ getFilters(): Record<
238
+ string,
239
+ { operator: SvGridFilterOperator; value: string; valueTo?: string }
240
+ >
241
+
242
+ /**
243
+ * Snapshot of the rows the grid is actually displaying right now -
244
+ * after filtering, sorting, grouping, and pagination have been applied.
245
+ * Use this when you need to export the visible result set (e.g. CSV).
246
+ */
247
+ getDisplayedRows(): ReadonlyArray<TData>
248
+
249
+ /** Snapshot of the current data array (pre-pipeline). */
250
+ getData(): ReadonlyArray<TData>
251
+
252
+ /**
253
+ * Snapshot of every column the grid currently knows about, in visual
254
+ * order, with the human-readable header label. Use this when exporting
255
+ * or building a column-picker UI - the data is read once, no
256
+ * subscription. Hidden columns are included; check `visible` to filter.
257
+ */
258
+ getColumns(): ReadonlyArray<{
259
+ id: string
260
+ field?: string
261
+ header: string
262
+ visible: boolean
263
+ /** The column's `format` config, when set. Lets an exporter reproduce
264
+ * the on-screen display value (currency, date pattern, etc.). */
265
+ format?: CellFormatConfig
266
+ /** Effective horizontal alignment ('left' | 'center' | 'right'). */
267
+ align?: 'left' | 'center' | 'right'
268
+ }>
269
+
270
+ // ----- Free data export (CSV / TSV / JSON + clipboard) -----
271
+ /**
272
+ * Export the grid to a **CSV** file. Free in the community grid; the
273
+ * richer Excel / PDF / styled formats live in @svgrid/enterprise. Values
274
+ * are formatted as shown on screen (pass `rawValues: true` for raw). Rows
275
+ * default to the current view (`rows: 'selected' | 'all'` to change).
276
+ * Resolves with the serialized text; pass `download: false` to skip the
277
+ * browser download and just get the string.
278
+ */
279
+ exportCsv(options?: GridExportOptions): Promise<string>
280
+ /** Export the grid to a **TSV** file (tab-separated). See `exportCsv`. */
281
+ exportTsv(options?: GridExportOptions): Promise<string>
282
+ /** Export the grid to a **JSON** file (array of `{ field: value }`). */
283
+ exportJson(options?: GridExportOptions): Promise<string>
284
+ /**
285
+ * Copy the grid to the system clipboard. `format: 'tsv'` (default) pastes
286
+ * straight into Excel / Sheets; `'csv'` / `'markdown'` also supported.
287
+ * Resolves with the copied text.
288
+ */
289
+ copyToClipboard(options?: GridClipboardOptions): Promise<string>
290
+
291
+ /** Clear every checked row. Emits `onRowSelectionChange({}, [])`. */
292
+ clearRowSelection(): void
293
+
294
+ // ----- Column layout (width + pinning) -----
295
+ /**
296
+ * Set the width of one column in pixels. Identical to dragging the
297
+ * column's resize handle. Width is clamped to `MIN_COLUMN_WIDTH`.
298
+ */
299
+ setColumnWidth(columnId: string, width: number): void
300
+ /**
301
+ * Snapshot of every column's current width (in pixels), keyed by
302
+ * column id. Columns the user has never resized AND that have no
303
+ * explicit `width` on their ColumnDef are reported at the grid-wide
304
+ * default. Useful for "save view" + URL persistence.
305
+ */
306
+ getColumnWidths(): Record<string, number>
307
+ /**
308
+ * Snap one column's width to its widest visible cell (header text +
309
+ * any rendered body cell). Equivalent to double-clicking the column's
310
+ * resize handle. The grid also exposes this through the column menu's
311
+ * "Autosize" item.
312
+ */
313
+ autosizeColumn(columnId: string): void
314
+ /** Run `autosizeColumn` on every column. */
315
+ autosizeAllColumns(): void
316
+ /**
317
+ * Replace the column-pinning state in one call. Each entry is a
318
+ * column id; the order in the array becomes the visible order along
319
+ * the pinned edge.
320
+ */
321
+ setColumnPinning(pinning: {
322
+ left?: ReadonlyArray<string>
323
+ right?: ReadonlyArray<string>
324
+ }): void
325
+ /** Snapshot of the current column-pinning state. */
326
+ getColumnPinning(): { left: string[]; right: string[] }
327
+
328
+ // ----- Column reorder -----
329
+ /**
330
+ * Replace the column order. Pass an array of column ids in the
331
+ * desired visual order. Unknown ids are skipped; columns not in the
332
+ * array keep their existing relative position after the listed ones.
333
+ * Fires `onColumnOrderChange` once the new order is applied. Pin
334
+ * groups (`columnPinning.left` / `right`) are still applied on top.
335
+ */
336
+ setColumnOrder(order: ReadonlyArray<string>): void
337
+ /**
338
+ * Snapshot of the current visual column order - the same shape the
339
+ * `onColumnOrderChange` callback receives. Useful for saving and
340
+ * restoring a view layout.
341
+ */
342
+ getColumnOrder(): string[]
343
+
344
+ // ----- Row expansion -----
345
+ /**
346
+ * Set whether a row (group node or expandable leaf) is expanded.
347
+ * The `id` is the engine's row id - for grouped rows that's the
348
+ * synthetic group key (e.g. `"department:Engineering"`).
349
+ */
350
+ setRowExpanded(id: string, expanded: boolean): void
351
+ /** Expand every group node in the current grouped row model. */
352
+ expandAllGroups(): void
353
+ /** Collapse every expansion - resets expanded state to {}. */
354
+ collapseAllGroups(): void
355
+
356
+ // ----- Undo / redo -----
357
+ /** Undo the most recent inline-edit. Returns false when the history is empty. */
358
+ undo(): boolean
359
+ /** Redo the most recently undone edit. Returns false when the redo stack is empty. */
360
+ redo(): boolean
361
+ /** True when there's at least one step on the undo stack. */
362
+ canUndo(): boolean
363
+ /** True when there's at least one step on the redo stack. */
364
+ canRedo(): boolean
365
+ /** Wipe both stacks (e.g. after a server save commits the buffer). */
366
+ clearHistory(): void
367
+
368
+ // ----- Find in grid -----
369
+ /** Open the built-in find overlay (Ctrl+F also opens it). */
370
+ openFind(): void
371
+ /** Close the find overlay and clear the query. */
372
+ closeFind(): void
373
+ /** Update the find query programmatically (useful for app-wide command palettes). */
374
+ setFindQuery(q: string): void
375
+ /** Snapshot of the current find hits (rowIndex / colIndex / columnId). */
376
+ getFindHits(): Array<{ rowIndex: number; colIndex: number; columnId: string }>
377
+
378
+ // ----- Row selection (read + write) -----
379
+ /**
380
+ * The currently selected data rows (group-header rows excluded), in row-model
381
+ * order. Read once - no subscription. The push-based equivalent is
382
+ * `onRowSelectionChange`.
383
+ */
384
+ getSelectedRows(): TData[]
385
+ /** The engine row ids of the selected rows. Keys into the selection record. */
386
+ getSelectedRowIds(): string[]
387
+ /**
388
+ * Select rows by engine row id. By default this REPLACES the selection;
389
+ * pass `additive: true` to add to the existing selection instead.
390
+ */
391
+ selectRows(ids: ReadonlyArray<string>, additive?: boolean): void
392
+ /** Select every selectable (non-group) row in the current row model. */
393
+ selectAllRows(): void
394
+ /** Flip one row's selected state by id. */
395
+ toggleRowSelected(id: string): void
396
+
397
+ // ----- Pagination -----
398
+ /**
399
+ * Current pagination snapshot. `total` is the post-filter row count;
400
+ * `pageCount` is derived from it and `pageSize` (always >= 1).
401
+ */
402
+ getPageInfo(): {
403
+ pageIndex: number
404
+ pageSize: number
405
+ pageCount: number
406
+ total: number
407
+ }
408
+ /** Jump to a 0-based page. Clamped to [0, pageCount - 1]. */
409
+ setPage(pageIndex: number): void
410
+ /** Advance one page (no-op past the last page). */
411
+ nextPage(): void
412
+ /** Go back one page (no-op before the first page). */
413
+ prevPage(): void
414
+ /** Jump to the first page. */
415
+ firstPage(): void
416
+ /** Jump to the last page. */
417
+ lastPage(): void
418
+ /** Change the page size, keeping the first visible row in view. */
419
+ setPageSize(pageSize: number): void
420
+
421
+ // ----- Navigation / scrolling -----
422
+ /**
423
+ * Scroll the body so the given row index is at the top of the viewport.
424
+ * Works with virtualization on. Index is clamped to the row count.
425
+ */
426
+ scrollToRow(rowIndex: number): void
427
+ /** The active (focused) cell, or null when nothing is focused. */
428
+ getActiveCell(): { rowIndex: number; colIndex: number; columnId: string } | null
429
+ /** Move the active cell. Both coordinates are clamped to the grid bounds. */
430
+ setActiveCell(rowIndex: number, colIndex: number): void
431
+
432
+ // ----- View state (save / restore) -----
433
+ /**
434
+ * Serializable snapshot of the whole view - sort, grouping, pagination,
435
+ * column layout, and every filter surface. Pair with `setState` for
436
+ * "save view" / URL persistence / named views.
437
+ */
438
+ getState(): SvGridViewState
439
+ /**
440
+ * Restore a view from a (partial) snapshot produced by `getState`. Only the
441
+ * keys present are applied, so you can restore just the columns, just the
442
+ * filters, etc.
443
+ */
444
+ setState(state: Partial<SvGridViewState>): void
445
+ /** Force a recompute of the row pipeline + a re-render. */
446
+ refresh(): void
447
+ }
448
+
449
+ export type SvGridWrapperProps<
450
+ TFeatures extends TableFeatures,
451
+ TData extends RowData,
452
+ > = {
453
+ data: ReadonlyArray<TData>
454
+ columns: Array<ColumnDef<TFeatures, TData>>
455
+ /**
456
+ * Feature set from `tableFeatures({ ... })`. Optional - the `sortable` /
457
+ * `filterable` / `groupable` shortcuts inject the matching feature, so a
458
+ * grid can be configured from the boolean shortcuts alone.
459
+ */
460
+ features?: TFeatures
461
+ /**
462
+ * Capability shortcuts. Every capability is OFF by default (a bare grid is
463
+ * a plain read-only table); set a shortcut `true` to opt in.
464
+ *
465
+ * `sortable` - column sorting (injects `rowSortingFeature`)
466
+ * `filterable` - column filtering (injects `columnFilteringFeature`)
467
+ * `editable` - inline editing (alias of `enableInlineEditing`)
468
+ * `groupable` - grouping controls (alias of `showGroupingControls`)
469
+ * `pageable` - pagination footer (alias of `showPagination`)
470
+ */
471
+ sortable?: boolean
472
+ filterable?: boolean
473
+ editable?: boolean
474
+ groupable?: boolean
475
+ pageable?: boolean
476
+ options?: Partial<SvGridOptions<TFeatures, TData>>
477
+ loading?: boolean
478
+ error?: string | null
479
+ emptyMessage?: string
480
+ showGlobalFilter?: boolean
481
+ showColumnFilters?: boolean
482
+ showGroupingControls?: boolean
483
+ showRowSelection?: boolean
484
+ showPagination?: boolean
485
+ virtualization?: boolean
486
+ /** Row height in pixels. Pass a function `(rowIndex) => px` for per-row
487
+ * variable heights (e.g. when wiring up an interactive row-resize). */
488
+ rowHeight?: number | ((rowIndex: number) => number)
489
+ overscan?: number
490
+ containerHeight?: number
491
+ columnVirtualization?: boolean
492
+ columnOverscan?: number
493
+ columnWidth?: number
494
+ showFilterMenu?: boolean
495
+ showFilterRow?: boolean
496
+ enableCellSelection?: boolean
497
+ enableInlineEditing?: boolean
498
+ enableRowSummaries?: boolean
499
+ /** Receives the imperative grid API when the component is ready. */
500
+ onApiReady?: (api: SvGridApi<TFeatures, TData>) => void
501
+ }