@svgrid/grid 1.0.0 → 1.1.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 (144) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +137 -39
  3. package/dist/GridFooter.svelte +164 -0
  4. package/dist/GridFooter.svelte.d.ts +29 -0
  5. package/dist/GridMenus.svelte +570 -0
  6. package/dist/GridMenus.svelte.d.ts +31 -0
  7. package/dist/SvGrid.controller.svelte.d.ts +429 -0
  8. package/dist/SvGrid.controller.svelte.js +1732 -0
  9. package/dist/SvGrid.css +1709 -0
  10. package/dist/SvGrid.helpers.d.ts +35 -0
  11. package/dist/SvGrid.helpers.js +160 -0
  12. package/dist/SvGrid.svelte +344 -7043
  13. package/dist/SvGrid.svelte.d.ts +4 -357
  14. package/dist/SvGrid.types.d.ts +436 -0
  15. package/dist/SvGrid.types.js +1 -0
  16. package/dist/SvGridChart.svelte +1060 -23
  17. package/dist/SvGridChart.svelte.d.ts +17 -0
  18. package/dist/build-api.d.ts +5 -0
  19. package/dist/build-api.js +527 -0
  20. package/dist/cell-render.d.ts +15 -0
  21. package/dist/cell-render.js +246 -0
  22. package/dist/cell-values.d.ts +28 -0
  23. package/dist/cell-values.js +89 -0
  24. package/dist/chart.d.ts +370 -3
  25. package/dist/chart.js +1135 -42
  26. package/dist/clipboard.d.ts +15 -0
  27. package/dist/clipboard.js +356 -0
  28. package/dist/columns.d.ts +30 -0
  29. package/dist/columns.js +277 -0
  30. package/dist/core.d.ts +1 -1
  31. package/dist/css.d.ts +3 -0
  32. package/dist/editing.d.ts +24 -0
  33. package/dist/editing.js +343 -0
  34. package/dist/editors/cell-editors.d.ts +1 -1
  35. package/dist/facet-buckets.d.ts +13 -0
  36. package/dist/facet-buckets.js +54 -0
  37. package/dist/features.d.ts +5 -0
  38. package/dist/features.js +30 -0
  39. package/dist/filter-operators.d.ts +16 -0
  40. package/dist/filter-operators.js +69 -0
  41. package/dist/hyperformula-adapter.d.ts +82 -0
  42. package/dist/hyperformula-adapter.js +73 -0
  43. package/dist/index.d.ts +5 -2
  44. package/dist/index.js +5 -2
  45. package/dist/keyboard-handlers.d.ts +7 -0
  46. package/dist/keyboard-handlers.js +197 -0
  47. package/dist/menus.d.ts +40 -0
  48. package/dist/menus.js +389 -0
  49. package/dist/named-views.d.ts +27 -0
  50. package/dist/named-views.js +39 -0
  51. package/dist/row-resize.d.ts +43 -0
  52. package/dist/row-resize.js +158 -0
  53. package/dist/scroll-sync.d.ts +9 -0
  54. package/dist/scroll-sync.js +86 -0
  55. package/dist/selection.d.ts +26 -0
  56. package/dist/selection.js +387 -0
  57. package/dist/spreadsheet.d.ts +80 -0
  58. package/dist/spreadsheet.js +194 -0
  59. package/dist/summaries.d.ts +12 -0
  60. package/dist/summaries.js +65 -0
  61. package/dist/sv-grid-scrollbar.js +7 -1
  62. package/dist/svgrid-wrapper.types.d.ts +12 -1
  63. package/dist/svgrid.comments-autocomplete.test.d.ts +1 -0
  64. package/dist/svgrid.comments-autocomplete.test.js +96 -0
  65. package/dist/svgrid.context-menu.test.d.ts +1 -0
  66. package/dist/svgrid.context-menu.test.js +102 -0
  67. package/dist/svgrid.new-features.wrapper.test.js +30 -4
  68. package/dist/svgrid.wrapper.test.js +27 -1
  69. package/dist/virtualization/column-virtualizer.d.ts +2 -0
  70. package/dist/virtualization/scroll-scaling.d.ts +28 -0
  71. package/dist/virtualization/scroll-scaling.js +64 -0
  72. package/dist/virtualization/scroll-scaling.test.d.ts +1 -0
  73. package/dist/virtualization/scroll-scaling.test.js +86 -0
  74. package/dist/virtualization/svelte-virtualizer.svelte.d.ts +2 -0
  75. package/dist/virtualization/svelte-virtualizer.svelte.js +2 -0
  76. package/dist/virtualization/virtualizer.d.ts +7 -0
  77. package/dist/virtualization/virtualizer.js +30 -0
  78. package/package.json +1 -1
  79. package/src/GridFooter.svelte +164 -0
  80. package/src/GridMenus.svelte +570 -0
  81. package/src/SvGrid.controller.svelte.ts +2195 -0
  82. package/src/SvGrid.css +1747 -0
  83. package/src/SvGrid.helpers.test.ts +415 -0
  84. package/src/SvGrid.helpers.ts +185 -0
  85. package/src/SvGrid.svelte +348 -7043
  86. package/src/SvGrid.types.ts +456 -0
  87. package/src/SvGridChart.svelte +1060 -23
  88. package/src/build-api.coverage.test.ts +532 -0
  89. package/src/build-api.ts +663 -0
  90. package/src/cell-render.test.ts +451 -0
  91. package/src/cell-render.ts +426 -0
  92. package/src/cell-values.ts +114 -0
  93. package/src/chart-export.test.ts +370 -0
  94. package/src/chart.coverage.test.ts +814 -0
  95. package/src/chart.ts +1352 -47
  96. package/src/clipboard.test.ts +731 -0
  97. package/src/clipboard.ts +524 -0
  98. package/src/collaboration.coverage.test.ts +220 -0
  99. package/src/columns.test.ts +702 -0
  100. package/src/columns.ts +419 -0
  101. package/src/core.ts +8 -0
  102. package/src/css.d.ts +3 -0
  103. package/src/editing.test.ts +837 -0
  104. package/src/editing.ts +513 -0
  105. package/src/editors/cell-editors.coverage.test.ts +156 -0
  106. package/src/editors/cell-editors.ts +1 -0
  107. package/src/facet-buckets.test.ts +353 -0
  108. package/src/facet-buckets.ts +67 -0
  109. package/src/features.ts +128 -0
  110. package/src/filter-operators.test.ts +174 -0
  111. package/src/filter-operators.ts +87 -0
  112. package/src/hyperformula-adapter.test.ts +256 -0
  113. package/src/hyperformula-adapter.ts +124 -0
  114. package/src/index.ts +37 -0
  115. package/src/keyboard-handlers.coverage.test.ts +560 -0
  116. package/src/keyboard-handlers.ts +353 -0
  117. package/src/keyboard.ts +97 -97
  118. package/src/menus.test.ts +620 -0
  119. package/src/menus.ts +554 -0
  120. package/src/named-views.coverage.test.ts +210 -0
  121. package/src/named-views.ts +48 -0
  122. package/src/row-resize.test.ts +369 -0
  123. package/src/row-resize.ts +171 -0
  124. package/src/scroll-sync.test.ts +330 -0
  125. package/src/scroll-sync.ts +216 -0
  126. package/src/selection.test.ts +722 -0
  127. package/src/selection.ts +545 -0
  128. package/src/server-data-source.coverage.test.ts +180 -0
  129. package/src/spreadsheet.test.ts +445 -0
  130. package/src/spreadsheet.ts +246 -0
  131. package/src/summaries.ts +204 -0
  132. package/src/sv-grid-scrollbar.ts +21 -2
  133. package/src/svgrid-wrapper.types.ts +12 -1
  134. package/src/svgrid.behavior.test.ts +22 -0
  135. package/src/svgrid.comments-autocomplete.test.ts +112 -0
  136. package/src/svgrid.context-menu.test.ts +126 -0
  137. package/src/svgrid.interaction.test.ts +30 -0
  138. package/src/svgrid.new-features.wrapper.test.ts +65 -4
  139. package/src/svgrid.wrapper.test.ts +27 -1
  140. package/src/test-setup.ts +9 -6
  141. package/src/virtualization/scroll-scaling.test.ts +148 -0
  142. package/src/virtualization/scroll-scaling.ts +121 -0
  143. package/src/virtualization/svelte-virtualizer.svelte.ts +2 -0
  144. package/src/virtualization/virtualizer.ts +26 -0
@@ -0,0 +1,429 @@
1
+ import { type CellEditorOption, type Column, type ColumnDef, type Row, type RowData, type TableFeatures } from "./index";
2
+ import "./sv-grid-scrollbar";
3
+ import { type ColumnStat } from "./conditional-formatting";
4
+ import type { Props, SelectionRange, CellEditState, FilterOperator, MenuPosition, ContextMenuTarget } from "./SvGrid.types";
5
+ import { operatorOption, operatorsForColumn, defaultOperatorFor, operatorLabelFor } from "./filter-operators";
6
+ import { type FacetBucket, isBucketableColumn, buildBuckets, isInBucket } from "./facet-buckets";
7
+ import { getColumnBaseValue, isGroupRow, toolPanelHeaderLabel, formatSummaryNumeric, getColumnAlign, getPinnedCellValue, getColumnAccessorValue, columnDefMatchesId } from "./cell-values";
8
+ /**
9
+ * SvGrid controller. The component's entire reactive core - every $state,
10
+ * $derived, $effect and handler - lives here so SvGrid.svelte can stay a thin
11
+ * view. Instantiated once during the component's init (so $effect attaches to
12
+ * the component lifecycle) and consumed through the returned getters.
13
+ */
14
+ export type SvGridController<TFeatures extends TableFeatures = TableFeatures, TData extends RowData = RowData> = ReturnType<typeof createSvGridController<TFeatures, TData>>;
15
+ export declare function createSvGridController<TFeatures extends TableFeatures = TableFeatures, TData extends RowData = RowData>(props: Props<TFeatures, TData>): {
16
+ readonly props: Props<TFeatures, TData>;
17
+ readonly editingEnabled: boolean;
18
+ readonly paginationEnabled: boolean;
19
+ readonly groupingControlsEnabled: boolean;
20
+ globalFilter: string;
21
+ scrollContainer: HTMLDivElement | null;
22
+ gridRootEl: HTMLElement | null;
23
+ filterRowValues: Record<string, string>;
24
+ filterMenuValues: Record<string, {
25
+ operator: FilterOperator;
26
+ value: string;
27
+ valueTo?: string;
28
+ }>;
29
+ verticalScrollbarEl: HTMLElement | null;
30
+ horizontalScrollbarEl: HTMLElement | null;
31
+ scrollVersion: number;
32
+ viewportVersion: number;
33
+ lastResetSignature: string;
34
+ pendingScrollTop: number;
35
+ pendingScrollLeft: number;
36
+ scrollSyncRaf: number | null;
37
+ selectionRange: SelectionRange;
38
+ isDraggingSelection: boolean;
39
+ fillDrag: {
40
+ sourceMinRow: number;
41
+ sourceMaxRow: number;
42
+ sourceMinCol: number;
43
+ sourceMaxCol: number;
44
+ targetRow: number;
45
+ targetCol: number;
46
+ } | null;
47
+ activeAtPointerDown: {
48
+ rowIndex: number;
49
+ colIndex: number;
50
+ } | null;
51
+ editingCell: CellEditState;
52
+ editedCellValues: Record<string, unknown>;
53
+ readonly UNDO_LIMIT: number;
54
+ history: {
55
+ rowId: string;
56
+ columnId: string;
57
+ field: string;
58
+ before: unknown;
59
+ after: unknown;
60
+ }[];
61
+ historyPtr: number;
62
+ historyVersion: number;
63
+ tooltip: {
64
+ text: string;
65
+ x: number;
66
+ y: number;
67
+ below: boolean;
68
+ } | null;
69
+ tooltipTimer: number | null;
70
+ readonly showTooltipFor: (el: HTMLElement, text: string) => void;
71
+ readonly hideTooltip: () => void;
72
+ findOpen: boolean;
73
+ findQuery: string;
74
+ findHitIndex: number;
75
+ readonly findHits: {
76
+ rowIndex: number;
77
+ colIndex: number;
78
+ columnId: string;
79
+ }[];
80
+ theadEl: HTMLElement | null;
81
+ headerHeight: number;
82
+ editorSelectAll: boolean;
83
+ columnWidths: Record<string, number>;
84
+ resizingColumnId: string | null;
85
+ resizeStartX: number;
86
+ resizeStartWidth: number;
87
+ readonly MIN_COLUMN_WIDTH: number;
88
+ columnPinning: {
89
+ left: Array<string>;
90
+ right: Array<string>;
91
+ };
92
+ columnVirtualizerVersion: number;
93
+ gridStateVersion: number;
94
+ readonly selectionColumnWidth: number;
95
+ readonly rowNumberColumnWidth: number;
96
+ readonly showRowNumbersEffective: boolean;
97
+ readonly filterOperatorOptions: import("./SvGrid.types").FilterOption[];
98
+ readonly TEXT_OPERATORS: FilterOperator[];
99
+ readonly NUMBER_OPERATORS: FilterOperator[];
100
+ readonly DATE_OPERATORS: FilterOperator[];
101
+ readonly CHECKBOX_OPERATORS: FilterOperator[];
102
+ columnMenuFor: string | null;
103
+ columnMenuPos: MenuPosition;
104
+ columnMenuSearch: string;
105
+ filterMenuFor: string | null;
106
+ filterMenuPos: MenuPosition;
107
+ operatorMenuFor: string | null;
108
+ operatorMenuPos: MenuPosition;
109
+ chooseColumnsPos: MenuPosition | null;
110
+ contextMenuFor: ContextMenuTarget<TData> | null;
111
+ contextMenuPos: MenuPosition;
112
+ noteOverrides: Record<string, Record<string, string>>;
113
+ commentEditFor: {
114
+ rowId: string;
115
+ columnId: string;
116
+ x: number;
117
+ y: number;
118
+ } | null;
119
+ commentDraft: string;
120
+ valueFilters: Record<string, Set<string>>;
121
+ readonly viewportWidth: number;
122
+ readonly viewportHeight: number;
123
+ readonly scrollMetrics: {
124
+ scrollTop: number;
125
+ scrollLeft: number;
126
+ clientHeight: number;
127
+ clientWidth: number;
128
+ scrollHeight: number;
129
+ scrollWidth: number;
130
+ };
131
+ readonly hasVerticalOverflow: boolean;
132
+ readonly showGlobalFilterEffective: boolean;
133
+ readonly showFilterRowEffective: boolean;
134
+ readonly showColumnFiltersEffective: boolean;
135
+ readonly showInlineColumnFilterEffective: boolean;
136
+ readonly showRowSelectionEffective: boolean;
137
+ readonly enableCellSelectionEffective: boolean;
138
+ readonly flushScheduledScrollSync: () => void;
139
+ readonly scheduleScrollSync: (scrollTop: number, scrollLeft: number) => void;
140
+ internalData: readonly TData[];
141
+ internalColumns: ColumnDef<TFeatures, TData>[];
142
+ hiddenColumns: Record<string, boolean>;
143
+ readonly externalSortEnabled: boolean;
144
+ readonly externalFilterEnabled: boolean;
145
+ readonly passthroughSortedRowModel: ({ rows }: {
146
+ rows: Array<Row<TData>>;
147
+ }) => Row<TData>[];
148
+ readonly resolveEffectiveFeatures: () => TableFeatures;
149
+ readonly grid: import("./createGrid.svelte").SvelteGrid<TableFeatures, TData, {}>;
150
+ userColumnOrder: string[];
151
+ lastSeededOrder: string;
152
+ readonly allColumns: Column<TData>[];
153
+ readonly headerGroups: import("./core").HeaderGroup<TData>[];
154
+ readonly groupHeaderRows: {
155
+ id: string;
156
+ cells: {
157
+ key: string;
158
+ label: string;
159
+ colSpan: number;
160
+ widthPx: number;
161
+ /** First leaf-column index this cell spans. */
162
+ firstLeafIndex: number;
163
+ /** True for the placeholder cells that fill the column above an
164
+ * early-bottoming leaf (e.g. the row-label column to the left of a
165
+ * multi-level value tree). They render as empty cells so the
166
+ * layout stays aligned without showing duplicate labels. */
167
+ isPlaceholder: boolean;
168
+ }[];
169
+ }[];
170
+ readonly pinnedOffsets: {
171
+ left: Record<string, number>;
172
+ right: Record<string, number>;
173
+ };
174
+ readonly cellPinStyle: (columnId: string) => string;
175
+ readonly isColumnPinned: (columnId: string) => "left" | "right" | null;
176
+ colDragId: string | null;
177
+ colDropOnId: string | null;
178
+ colDropSide: "before" | "after" | null;
179
+ readonly getCurrentColumnOrder: () => string[];
180
+ readonly emitColumnOrder: () => void;
181
+ readonly setColumnOrderInternal: (ids: ReadonlyArray<string>) => void;
182
+ readonly applyColumnDrop: (dragId: string, targetId: string, side: "before" | "after") => void;
183
+ readonly onColumnHeaderDragStart: (e: DragEvent, columnId: string) => void;
184
+ readonly onColumnHeaderDragOver: (e: DragEvent, columnId: string) => void;
185
+ readonly onColumnHeaderDragLeave: (columnId: string) => void;
186
+ readonly onColumnHeaderDrop: (e: DragEvent, columnId: string) => void;
187
+ readonly onColumnHeaderDragEnd: () => void;
188
+ readonly pinColumnLeft: (columnId: string) => void;
189
+ readonly pinColumnRight: (columnId: string) => void;
190
+ readonly unpinColumn: (columnId: string) => void;
191
+ readonly getColumnBaseValue: typeof getColumnBaseValue;
192
+ readonly hasConditionalFormats: boolean;
193
+ readonly conditionalColumnStats: Map<string, ColumnStat>;
194
+ readonly cellConditionalFormat: (row: Row<TData>, column: Column<TData>, value: unknown) => import("./conditional-formatting").ResolvedCellFormat | null;
195
+ readonly isGroupRow: typeof isGroupRow;
196
+ readonly isCellEditable: (column: Column<TData>, row?: Row<TData> | undefined) => boolean;
197
+ readonly isCellEditableAt: (rowIndex: number, colIndex: number) => boolean;
198
+ readonly sortDirectionByColumn: Record<string, false | "asc" | "desc">;
199
+ readonly groupingColumns: any;
200
+ readonly paginationState: any;
201
+ readonly getRowColumnValue: (row: Row<TData>, columnId: string) => unknown;
202
+ readonly allRowsBeforePagination: Row<TData>[];
203
+ readonly allRows: Row<TData>[];
204
+ readonly rowSelectionState: any;
205
+ lastSelectionSerialized: string;
206
+ lastCellRangeSerialized: string;
207
+ readonly statusBarEnabled: boolean;
208
+ readonly statusBarAggregates: readonly ("sum" | "avg" | "min" | "max" | "count" | "numericCount")[];
209
+ readonly statusBarStats: {
210
+ count: number;
211
+ numericCount: number;
212
+ sum: number;
213
+ avg: number;
214
+ min: number;
215
+ max: number;
216
+ } | null;
217
+ toolPanelOpen: boolean;
218
+ readonly toolPanelEnabled: boolean;
219
+ readonly toolPanelColumns: Column<TData>[];
220
+ readonly toolPanelHeaderLabel: typeof toolPanelHeaderLabel;
221
+ readonly toggleColumnVisibleInPanel: (columnId: string) => void;
222
+ readonly moveColumnInPanel: (columnId: string, dir: -1 | 1) => void;
223
+ readonly toggleGroupInPanel: (columnId: string) => void;
224
+ lastSortingSerialized: string;
225
+ lastFiltersSerialized: string;
226
+ readonly virtualizer: {
227
+ readonly version: number;
228
+ setOptions: (next: Partial<import("./index").VirtualizerOptions>) => void;
229
+ setScrollOffset: (scrollOffset: number) => void;
230
+ setViewportHeight: (viewportHeight: number) => void;
231
+ scrollToIndex: (index: number) => void;
232
+ getVirtualItems: () => import("./index").VirtualItem[];
233
+ getTotalSize: () => number;
234
+ getOffsetForIndex: (index: number) => number;
235
+ getSizeForIndex: (index: number) => number;
236
+ getState: () => import("./index").VirtualizerState;
237
+ };
238
+ readonly columnVirtualizer: {
239
+ setViewportWidth(viewportWidth: number): void;
240
+ setHorizontalOffset(scrollOffset: number): void;
241
+ setOptions(next: Partial<import("./index").VirtualizerOptions>): void;
242
+ setScrollOffset(scrollOffset: number): void;
243
+ setViewportHeight(viewportHeight: number): void;
244
+ scrollToIndex(index: number): void;
245
+ getVirtualItems(): import("./index").VirtualItem[];
246
+ getTotalSize(): number;
247
+ getOffsetForIndex(index: number): number;
248
+ getSizeForIndex(index: number): number;
249
+ getState(): import("./index").VirtualizerState;
250
+ subscribe(listener: () => void): () => boolean;
251
+ };
252
+ readonly rowVirtualizationEnabled: boolean;
253
+ readonly columnVirtualizationEnabled: boolean;
254
+ readonly virtualRows: import("./index").VirtualItem[];
255
+ readonly virtualRowTotalSize: number;
256
+ readonly virtualRowStart: number;
257
+ readonly virtualRowEnd: number;
258
+ readonly virtualRowBottomSpacer: number;
259
+ readonly rowDomTotalSize: number;
260
+ readonly rowScrollScalingActive: boolean;
261
+ readonly rowTopSpacer: number;
262
+ readonly rowBottomSpacer: number;
263
+ readonly domToLogicalRowOffset: (domTop: number) => number;
264
+ readonly logicalToDomRowOffset: (logical: number) => number;
265
+ readonly virtualColumns: import("./index").VirtualItem[];
266
+ readonly virtualColumnTotalSize: number;
267
+ readonly renderedColumnItems: import("./index").VirtualItem[] | {
268
+ index: number;
269
+ key: number;
270
+ size: any;
271
+ start: number;
272
+ end: any;
273
+ }[];
274
+ readonly hasRenderedColumn: (entry: {
275
+ item: any;
276
+ column: any | undefined;
277
+ }) => entry is {
278
+ item: any;
279
+ column: any;
280
+ };
281
+ readonly renderedColumns: {
282
+ item: any;
283
+ column: any;
284
+ }[];
285
+ readonly totalColumnWidth: number;
286
+ readonly hasHorizontalOverflow: boolean;
287
+ readonly columnWindowStart: number;
288
+ readonly columnWindowEnd: any;
289
+ readonly columnWindowRightSpacer: number;
290
+ readonly activeCell: any;
291
+ readonly activeDescendantId: string | null;
292
+ readonly formatSummaryNumeric: typeof formatSummaryNumeric;
293
+ readonly computeSummaries: (rows: readonly Row<TData>[], columns: readonly Column<TData>[]) => Record<string, string>;
294
+ readonly SUMMARY_DEFER_CELL_LIMIT: number;
295
+ summaryByColumn: Record<string, string>;
296
+ hasMeasured: boolean;
297
+ scrollBottomArmed: boolean;
298
+ readonly onBodyScroll: (event: Event) => void;
299
+ readonly computeRowClass: (row: Row<TData>, rowIndex: number) => string;
300
+ readonly computeCellClass: (row: Row<TData>, column: Column<TData>) => string;
301
+ readonly computeCellTooltip: (row: Row<TData>, column: Column<TData>) => string | null;
302
+ readonly computeCellNote: (row: Row<TData>, column: Column<TData>) => string | null;
303
+ readonly getCellDisplayValue: (rowId: string, columnId: string, baseValue: unknown) => any;
304
+ readonly getColumnAlign: typeof getColumnAlign;
305
+ readonly editorOptionsCache: Record<string, CellEditorOption[]>;
306
+ readonly getColumnEditorOptions: (column: Column<TData>, row?: Row<TData> | null | undefined) => CellEditorOption[];
307
+ readonly formatListCellValue: (column: Column<TData>, value: unknown, row?: Row<TData> | null | undefined) => string;
308
+ readonly formatCellValue: (column: Column<TData>, value: unknown, row: Row<TData>) => string;
309
+ readonly getPinnedCellValue: typeof getPinnedCellValue;
310
+ readonly formatPinnedValue: (column: Column<TData>, value: unknown) => string;
311
+ readonly computePinnedCellClass: (rowData: TData, column: Column<TData>) => string;
312
+ readonly isRowSelected: (rowId: string) => boolean;
313
+ readonly toggleRowSelectionById: (rowId: string) => void;
314
+ readonly headerSelectionState: "none" | "all" | "some";
315
+ readonly toggleSelectAllRows: () => void;
316
+ userHasActivatedCell: boolean;
317
+ readonly setActiveCell: (rowIndex: number, colIndex: number) => void;
318
+ readonly scrollActiveCellIntoView: (rowIndex: number, colIndex: number) => void;
319
+ readonly getColumnBaseWidth: (columnId: string) => any;
320
+ readonly fittedColumnWidths: Record<string, number> | null;
321
+ readonly getColumnWidth: (columnId: string) => any;
322
+ resizePendingWidth: number;
323
+ resizeRaf: number | null;
324
+ readonly startColumnResize: (event: PointerEvent, columnId: string) => void;
325
+ readonly onColumnResizeMove: (event: PointerEvent) => void;
326
+ readonly endColumnResize: () => void;
327
+ readonly setSelection: (rowIndex: number, colIndex: number) => void;
328
+ readonly extendSelection: (rowIndex: number, colIndex: number) => void;
329
+ readonly isCellInSelectedRange: (rowIndex: number, colIndex: number) => boolean;
330
+ readonly getCellRangeEdges: (rowIndex: number, colIndex: number) => {
331
+ top: boolean;
332
+ bottom: boolean;
333
+ left: boolean;
334
+ right: boolean;
335
+ } | null;
336
+ readonly fillHandleCell: {
337
+ rowIndex: any;
338
+ colIndex: any;
339
+ } | null;
340
+ readonly isInFillPreview: (rowIndex: number, colIndex: number) => boolean;
341
+ readonly findColumnById: (columnId: string) => any;
342
+ readonly readCellRaw: (rowIndex: number, columnId: string) => unknown;
343
+ readonly writeCellRaw: (rowIndex: number, columnId: string, value: unknown) => void;
344
+ readonly applyFillPattern: () => void;
345
+ readonly clearSelectedCellValues: () => void;
346
+ readonly startFillDrag: (event: PointerEvent, rowIndex: number, colIndex: number) => void;
347
+ readonly onFillPointerMove: (event: PointerEvent) => void;
348
+ readonly onFillPointerUp: () => void;
349
+ readonly toggleBooleanCell: (rowIndex: number, colIndex: number) => void;
350
+ readonly onCellPointerDown: (rowIndex: number, colIndex: number, event: PointerEvent) => void;
351
+ readonly onCellPointerEnter: (rowIndex: number, colIndex: number) => void;
352
+ readonly endDragSelection: () => void;
353
+ readonly onWindowPointerMove: (event: PointerEvent) => void;
354
+ readonly onCellClick: (rowIndex: number, colIndex: number) => void;
355
+ readonly emitCellDoubleClick: (rowIndex: number, colIndex: number) => void;
356
+ readonly copySelectionToClipboard: () => void;
357
+ readonly clearSelectedCells: () => boolean;
358
+ readonly onCellDoubleClick: (rowIndex: number, colIndex: number) => void;
359
+ readonly startEditingWithChar: (rowIndex: number, colIndex: number, char: string) => boolean;
360
+ readonly saveEditingCell: () => void;
361
+ readonly applyHistoryStep: (step: {
362
+ rowId: string;
363
+ columnId: string;
364
+ field: string;
365
+ before: unknown;
366
+ after: unknown;
367
+ }, direction: "undo" | "redo") => void;
368
+ readonly updateEditingCellValue: (value: string) => void;
369
+ readonly onEditorKeyDown: (event: KeyboardEvent) => void;
370
+ readonly focusOnMount: (node: HTMLInputElement | HTMLTextAreaElement) => void;
371
+ readonly onHeaderSortClick: (event: MouseEvent, columnId: string) => void;
372
+ readonly onGridKeyDown: (event: KeyboardEvent) => void;
373
+ readonly changePage: (delta: number) => void;
374
+ readonly goToPage: (pageIndex: number) => void;
375
+ readonly setPageSize: (pageSize: number) => void;
376
+ readonly openContextMenu: (event: MouseEvent, rowIndex: number, colIndex: number, columnId: string) => void;
377
+ readonly closeContextMenu: () => void;
378
+ readonly contextMenuItems: () => {
379
+ key: string;
380
+ label: string;
381
+ separator?: boolean;
382
+ disabled?: boolean;
383
+ run?: (() => void) | undefined;
384
+ }[];
385
+ readonly saveComment: () => void;
386
+ readonly removeComment: () => void;
387
+ readonly closeCommentEditor: () => void;
388
+ readonly updateFilterRow: (columnId: string, value: string) => void;
389
+ readonly updateFilterOperator: (columnId: string, operator: FilterOperator) => void;
390
+ readonly updateFilterMenuValue: (columnId: string, value: string) => void;
391
+ readonly updateFilterMenuValueTo: (columnId: string, valueTo: string) => void;
392
+ readonly toggleCheckboxWithKeyboard: (event: KeyboardEvent, toggle: () => void) => void;
393
+ readonly getColumnAccessorValue: typeof getColumnAccessorValue;
394
+ readonly fallbackOperatorOption: import("./SvGrid.types").FilterOption;
395
+ readonly operatorOption: typeof operatorOption;
396
+ readonly operatorsForColumn: typeof operatorsForColumn;
397
+ readonly defaultOperatorFor: typeof defaultOperatorFor;
398
+ readonly operatorLabelFor: typeof operatorLabelFor;
399
+ readonly isColumnFiltered: (columnId: string) => boolean;
400
+ readonly closeMenus: () => void;
401
+ measureCanvas: HTMLCanvasElement | null;
402
+ readonly measureText: (text: string, font: string) => number;
403
+ readonly autosizeColumn: (columnId: string) => void;
404
+ readonly autosizeAllColumns: () => void;
405
+ readonly resetColumns: () => void;
406
+ readonly openChooseColumns: (event: MouseEvent) => void;
407
+ readonly openColumnMenu: (event: MouseEvent, columnId: string) => void;
408
+ readonly openFilterMenu: (event: MouseEvent, columnId: string) => void;
409
+ readonly openOperatorMenu: (event: MouseEvent, columnId: string) => void;
410
+ readonly sortColumnFromMenu: (columnId: string, desc: boolean) => void;
411
+ readonly clearColumnSort: (columnId: string) => void;
412
+ readonly groupByColumnFromMenu: (columnId: string) => void;
413
+ readonly clearGroupingFromMenu: (columnId: string) => void;
414
+ readonly isBucketableColumn: typeof isBucketableColumn;
415
+ readonly buildBuckets: typeof buildBuckets;
416
+ readonly isInBucket: typeof isInBucket;
417
+ readonly facetBucketsByColumn: Map<string, FacetBucket[]>;
418
+ readonly columnMenuFacetValues: string[];
419
+ readonly columnMenuVisibleFacets: string[];
420
+ readonly isFacetChecked: (columnId: string, value: string) => any;
421
+ readonly toggleFacetValue: (columnId: string, value: string) => void;
422
+ readonly isAllFacetsChecked: (columnId: string) => boolean;
423
+ readonly toggleAllFacets: (columnId: string) => void;
424
+ readonly clearColumnFilter: (columnId: string) => void;
425
+ readonly onWindowKeydown: (event: KeyboardEvent) => void;
426
+ readonly columnDefMatchesId: typeof columnDefMatchesId;
427
+ readonly buildApi: () => import("./svgrid-wrapper.types").SvGridApi<TFeatures, TData>;
428
+ apiNotified: boolean;
429
+ };