@dhtmlx/trial-react-spreadsheet 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,633 @@
1
+ import * as react from 'react';
2
+ import react__default from 'react';
3
+
4
+ // --- Simple type aliases ---
5
+
6
+ type Id = string | number;
7
+ type FileFormat = "json" | "csv" | "xlsx";
8
+ type formatAliases = "common" | "number" | "currency" | "percent" | "text" | "date" | "time";
9
+ type ToolbarBlocks = "default" | "undo" | "colors" | "columns" | "rows" | "cell" | "lock" | "align" | "decoration" | "clear" | "help" | "format" | "actions" | "file";
10
+
11
+ // --- Enums ---
12
+
13
+ declare enum FilterConditions {
14
+ e = "e",
15
+ ne = "ne",
16
+ tc = "tc",
17
+ tdc = "tdc",
18
+ ts = "ts",
19
+ te = "te",
20
+ tex = "tex",
21
+ d = "d",
22
+ db = "db",
23
+ da = "da",
24
+ gt = "gt",
25
+ geq = "geq",
26
+ lt = "lt",
27
+ leq = "leq",
28
+ eq = "eq",
29
+ neq = "neq",
30
+ ib = "ib",
31
+ inb = "inb",
32
+ }
33
+
34
+ // --- Small interfaces ---
35
+
36
+ interface IFormats {
37
+ id: formatAliases | string;
38
+ mask: string;
39
+ name?: string;
40
+ example?: string;
41
+ timeFormat?: number;
42
+ $value?: any;
43
+ }
44
+
45
+ interface ISheet {
46
+ name: string;
47
+ id: Id;
48
+ }
49
+
50
+ interface CellEditor {
51
+ type: "select";
52
+ options?: string | string[];
53
+ }
54
+
55
+ interface ILink {
56
+ text?: string;
57
+ href: string;
58
+ }
59
+
60
+ interface ICellInfo {
61
+ cell: string;
62
+ value?: string | number | Date;
63
+ css?: string;
64
+ format?: string;
65
+ editor?: CellEditor;
66
+ link?: ILink;
67
+ }
68
+
69
+ interface IFilterRules {
70
+ condition?: {
71
+ factor: FilterConditions;
72
+ value?: any;
73
+ };
74
+ exclude?: any[];
75
+ }
76
+
77
+ interface IFilter {
78
+ cell: string;
79
+ rules: IFilterRules[];
80
+ }
81
+
82
+ interface IStylesList {
83
+ [key: string]: string;
84
+ }
85
+
86
+ interface ICell {
87
+ row: string;
88
+ col: string;
89
+ }
90
+
91
+ // --- Composite interfaces ---
92
+
93
+ interface ISheetData {
94
+ data: ICellInfo[];
95
+ name?: string;
96
+ id?: string;
97
+ cols?: {
98
+ width?: number;
99
+ hidden?: boolean;
100
+ }[];
101
+ rows?: {
102
+ height?: number;
103
+ hidden?: boolean;
104
+ }[];
105
+ merged?: {
106
+ from: {
107
+ row: number;
108
+ column: number;
109
+ };
110
+ to: {
111
+ row: number;
112
+ column: number;
113
+ };
114
+ }[];
115
+ freeze?: {
116
+ row?: number;
117
+ col?: number;
118
+ };
119
+ }
120
+
121
+ interface IDataWithStyles {
122
+ data?: ICellInfo[];
123
+ styles: {
124
+ [key: string]: any;
125
+ };
126
+ formats?: IFormats[];
127
+ sheets?: ISheetData[];
128
+ }
129
+
130
+ interface ILocalization {
131
+ decimal?: "." | ",";
132
+ thousands?: "." | "," | " " | "";
133
+ currency?: string;
134
+ dateFormat?: string;
135
+ timeFormat?: 12 | 24;
136
+ }
137
+
138
+ interface ISpreadsheetConfig {
139
+ toolbarBlocks?: ToolbarBlocks[];
140
+ rowsCount?: number;
141
+ colsCount?: number;
142
+ editLine?: boolean;
143
+ menu?: boolean;
144
+ readonly?: boolean;
145
+ multiSheets?: boolean;
146
+ localization?: ILocalization;
147
+ importModulePath?: string;
148
+ exportModulePath?: string;
149
+ formats?: IFormats[];
150
+ leftSplit?: number;
151
+ topSplit?: number;
152
+ dateFormat?: string;
153
+ timeFormat?: number;
154
+ }
155
+
156
+ interface ISelection {
157
+ setSelectedCell(cell: string, scroll?: boolean): any;
158
+ getSelectedCell(): string;
159
+ setFocusedCell(cell: string, scroll?: boolean): any;
160
+ getFocusedCell(): string;
161
+ removeSelectedCell(cell: string): any;
162
+ }
163
+
164
+ interface ISheetManager {
165
+ parseSheets: (sheets: ISheet[]) => void;
166
+ add: (name?: string) => Id;
167
+ remove: (id: Id) => void;
168
+ getAll: () => ISheet[];
169
+ getActive: () => ISheet;
170
+ setActive: (id: Id) => void;
171
+ clear: (id?: Id) => void;
172
+ get: (id: Id) => ISheet;
173
+ }
174
+
175
+ // --- Main interface (external deps replaced with any) ---
176
+
177
+ interface ISpreadsheet {
178
+ selection: ISelection;
179
+ events: any;
180
+ config: ISpreadsheetConfig;
181
+ toolbar: any;
182
+ sheets: ISheetManager;
183
+ menu: any;
184
+ contextMenu: any;
185
+ container: HTMLElement;
186
+ export: any;
187
+ keyManager: any;
188
+ getFormula: (cell: string) => string | string[];
189
+ getValue: (cell: string) => any | any[];
190
+ setValue: (cell: string, value: any | any[]) => void;
191
+ getStyle: (cell: string) => IStylesList | IStylesList[];
192
+ setStyle: (cell: string, styles: string | string[] | IStylesList | IStylesList[]) => void;
193
+ getFormat: (cell: string) => string | string[];
194
+ setFormat: (cell: string, format: string | string[]) => void;
195
+ clear: () => void;
196
+ getCellIndex: (cell1: string, cell2: string) => ICell;
197
+ lock: (cell: string) => void;
198
+ unlock: (cell: string) => void;
199
+ isLocked: (cell: string) => boolean;
200
+ deleteColumn: (cell: string) => void;
201
+ deleteRow: (cell: string) => void;
202
+ addColumn: (cell: string) => void;
203
+ addRow: (cell: string) => void;
204
+ load: (url: string, type?: FileFormat) => Promise<any>;
205
+ parse: (data: any) => void;
206
+ serialize: () => any[] | IDataWithStyles;
207
+ eachCell: (cb: (cellName: string, cellValue: any) => any, range?: string) => void;
208
+ setValidation: (cell: string, options: string | string[]) => void;
209
+ sortCells: (cell: string, dir?: 1 | -1) => void;
210
+ undo(): void;
211
+ redo(): void;
212
+ startEdit(cell?: string, initialValue?: string): any;
213
+ endEdit(withoutSave?: boolean): void;
214
+ setFilter: (cell?: string, filter?: IFilterRules[]) => void;
215
+ getFilter: (id: Id) => IFilter;
216
+ search: (text: string, openSearch?: boolean, sheetId?: Id) => string[];
217
+ hideSearch: () => void;
218
+ insertLink: (cell: string, link: ILink) => void;
219
+ fitColumn: (cell: string) => void;
220
+ mergeCells: (cell: string, remove?: boolean) => void;
221
+ freezeCols: (cell?: string) => void;
222
+ unfreezeCols: (cell?: string) => void;
223
+ freezeRows: (cell?: string) => void;
224
+ unfreezeRows: (cell?: string) => void;
225
+ hideCols: (cell?: string) => void;
226
+ showCols: (cell?: string) => void;
227
+ hideRows: (cell?: string) => void;
228
+ showRows: (cell?: string) => void;
229
+ clearSheet: (id?: string) => void;
230
+ removeSheet: (id: string) => void;
231
+ addSheet: (name?: string) => string;
232
+ getSheets: () => ISheet[];
233
+ getActiveSheet: () => ISheet;
234
+ setActiveSheet: (id: Id) => void;
235
+ paint: () => void;
236
+ destructor: () => void;
237
+ }
238
+
239
+ /**
240
+ * Known spreadsheet action identifiers.
241
+ * Used in `onBeforeAction`/`onAfterAction` for type-safe action matching.
242
+ * The `| string` union on handler params allows forward-compat with new actions.
243
+ */
244
+ declare enum Actions {
245
+ setCellStyle = "setCellStyle",
246
+ setCellValue = "setCellValue",
247
+ setCellFormat = "setCellFormat",
248
+ removeCellStyles = "removeCellStyles",
249
+ lockCell = "lockCell",
250
+ deleteRow = "deleteRow",
251
+ addRow = "addRow",
252
+ deleteColumn = "deleteColumn",
253
+ addColumn = "addColumn",
254
+ groupAction = "groupAction",
255
+ groupRowAction = "groupRowAction",
256
+ groupColAction = "groupColAction",
257
+ addSheet = "addSheet",
258
+ deleteSheet = "deleteSheet",
259
+ renameSheet = "renameSheet",
260
+ clearSheet = "clearSheet",
261
+ clear = "clear",
262
+ resizeCol = "resizeCol",
263
+ resizeRow = "resizeRow",
264
+ setValidation = "setValidation",
265
+ sortCells = "sortCells",
266
+ insertLink = "insertLink",
267
+ fitColumn = "fitColumn",
268
+ filter = "filter",
269
+ merge = "merge",
270
+ unmerge = "unmerge",
271
+ toggleFreeze = "toggleFreeze",
272
+ toggleVisibility = "toggleVisibility"
273
+ }
274
+ /**
275
+ * Action execution configuration passed to `onBeforeAction`/`onAfterAction`.
276
+ * Shape varies by action type — use the `action` param to narrow.
277
+ */
278
+ interface IExecuteConfig {
279
+ row?: number;
280
+ col?: number;
281
+ target?: unknown;
282
+ val?: unknown;
283
+ prev?: unknown;
284
+ action?: Actions | string;
285
+ groupAction?: Actions | string;
286
+ cell?: string;
287
+ pageId?: Id;
288
+ pageName?: string;
289
+ [key: string]: unknown;
290
+ }
291
+ /**
292
+ * A single cell's declarative state.
293
+ * All properties are optional — omitted properties retain their current value
294
+ * during diff-based updates.
295
+ */
296
+ interface CellData {
297
+ /** Cell value: text, number, or formula string (prefixed with `=`). */
298
+ value?: string | number;
299
+ /** CSS class name(s) referencing keys in the top-level `styles` map. */
300
+ css?: string;
301
+ /** Number format mask or alias (e.g. `"currency"`, `"#,##0.00"`). */
302
+ format?: string;
303
+ /** Whether the cell is locked (protected from editing). */
304
+ locked?: boolean;
305
+ /** Data validation dropdown options. */
306
+ validation?: string | string[];
307
+ }
308
+ /**
309
+ * Row metadata. Only rows with non-default config need entries.
310
+ * Keys are 0-indexed row numbers.
311
+ */
312
+ interface RowConfig {
313
+ /** Row height in pixels. */
314
+ height?: number;
315
+ /** Whether the row is hidden. */
316
+ hidden?: boolean;
317
+ }
318
+ /**
319
+ * Column metadata. Only columns with non-default config need entries.
320
+ * Keys are 0-indexed column numbers.
321
+ */
322
+ interface ColConfig {
323
+ /** Column width in pixels. */
324
+ width?: number;
325
+ /** Whether the column is hidden. */
326
+ hidden?: boolean;
327
+ }
328
+ /** Defines a merged cell range using 0-indexed row/column coordinates. */
329
+ interface MergedRange {
330
+ /** Top-left corner of the merge (0-indexed). */
331
+ from: {
332
+ row: number;
333
+ column: number;
334
+ };
335
+ /** Bottom-right corner of the merge (0-indexed). */
336
+ to: {
337
+ row: number;
338
+ column: number;
339
+ };
340
+ }
341
+ /** Freeze pane configuration for a sheet. */
342
+ interface FreezeConfig {
343
+ /** Freeze columns up to this 0-indexed column number. `undefined` = no column freeze. */
344
+ col?: number;
345
+ /** Freeze rows up to this 0-indexed row number. `undefined` = no row freeze. */
346
+ row?: number;
347
+ }
348
+ /** Filter configuration for a column within a sheet. */
349
+ interface SheetFilter {
350
+ /** Cell reference identifying the filtered column (e.g. `"A1"`). */
351
+ cell: string;
352
+ /** Filter rules to apply. Empty array clears the filter. */
353
+ rules: IFilterRules[];
354
+ }
355
+ /** Sort configuration for a column within a sheet. */
356
+ interface SheetSort {
357
+ /** Cell reference or range for the sort operation (e.g. `"B1"` or `"A1:E8"`).
358
+ * Use a range to sort multiple columns together while maintaining row integrity. */
359
+ cell: string;
360
+ /** Sort direction: `1` = ascending, `-1` = descending. */
361
+ dir: 1 | -1;
362
+ }
363
+ /**
364
+ * Complete declarative state for a single spreadsheet sheet.
365
+ */
366
+ interface SheetData {
367
+ /** Unique sheet identifier. */
368
+ id: Id;
369
+ /** Display name shown on the sheet tab. */
370
+ name: string;
371
+ /**
372
+ * Cell data keyed by cell reference (e.g. `"A1"`, `"B2"`).
373
+ * Only cells with non-default data need entries.
374
+ */
375
+ cells: Record<string, CellData>;
376
+ /**
377
+ * Row configuration keyed by 0-indexed row number.
378
+ * Only rows with custom height or hidden state need entries.
379
+ */
380
+ rows?: Record<number, RowConfig>;
381
+ /**
382
+ * Column configuration keyed by 0-indexed column number.
383
+ * Only columns with custom width or hidden state need entries.
384
+ */
385
+ cols?: Record<number, ColConfig>;
386
+ /**
387
+ * Merged cell ranges. The wrapper diffs the array and calls
388
+ */
389
+ merged?: MergedRange[];
390
+ /**
391
+ * Frozen pane configuration. Diff triggers
392
+ */
393
+ freeze?: FreezeConfig;
394
+ /**
395
+ * Column filter configuration.
396
+ * Set to `undefined` to clear filters for this sheet.
397
+ */
398
+ filter?: SheetFilter;
399
+ /**
400
+ * Sort configuration.
401
+ */
402
+ sort?: SheetSort;
403
+ }
404
+ /**
405
+ * Controlled search state.
406
+ * Pass an object to trigger/update search, pass `undefined` to dismiss.
407
+ */
408
+ interface SearchConfig {
409
+ /** Text to search for. */
410
+ query: string;
411
+ /** Whether to open the built-in search UI. Default: `false`. */
412
+ open?: boolean;
413
+ /** Restrict search to a specific sheet by id. */
414
+ sheetId?: Id;
415
+ }
416
+ /**
417
+ * Localization configuration for UI labels and formula names.
418
+ */
419
+ interface SpreadsheetLocale {
420
+ /** UI string overrides. Keys match the library's locale dictionary. */
421
+ locale: Record<string, string>;
422
+ /**
423
+ * Localized formula names grouped by category.
424
+ * Each entry is a tuple: `[localizedName, optionalDescription?]`.
425
+ */
426
+ formulas: Record<string, [string, string?][]>;
427
+ }
428
+ /** Spreadsheet color theme. Built-in themes or a custom theme name string. */
429
+ type SpreadsheetTheme = "light" | "dark" | "contrast-light" | "contrast-dark" | string;
430
+ type BeforeActionHandler = (action: Actions | string, config: IExecuteConfig) => boolean | void;
431
+ type AfterActionHandler = (action: Actions | string, config: IExecuteConfig) => void;
432
+ type BeforeCellHandler = (cell: string) => boolean | void;
433
+ type AfterCellHandler = (cell: string) => void;
434
+ type BeforeEditHandler = (cell: string, value: string) => boolean | void;
435
+ type AfterEditHandler = (cell: string, value: string) => void;
436
+ type BeforeSheetHandler = (sheet: ISheet) => boolean | void;
437
+ type AfterSheetHandler = (sheet: ISheet) => void;
438
+ type SpreadsheetConfigProps = Omit<ISpreadsheetConfig, "leftSplit" | "topSplit" | "dateFormat" | "timeFormat">;
439
+ interface SpreadsheetProps extends SpreadsheetConfigProps {
440
+ /**
441
+ * Whether to show the context menu.
442
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
443
+ * Spreadsheet instance. User data is preserved via serialize/parse,
444
+ * but undo/redo history and UI state (selection, scroll) are reset.
445
+ */
446
+ menu?: boolean;
447
+ /**
448
+ * Whether to show the formula/edit line above the grid.
449
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
450
+ * Spreadsheet instance. User data is preserved via serialize/parse,
451
+ * but undo/redo history and UI state (selection, scroll) are reset.
452
+ */
453
+ editLine?: boolean;
454
+ /**
455
+ * Toolbar blocks to display. Default: `"default"` (all blocks).
456
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
457
+ * Spreadsheet instance. User data is preserved via serialize/parse,
458
+ * but undo/redo history and UI state (selection, scroll) are reset.
459
+ */
460
+ toolbarBlocks?: ToolbarBlocks[];
461
+ /**
462
+ * Whether to enable multiple sheet tabs.
463
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
464
+ * Spreadsheet instance. User data is preserved via serialize/parse,
465
+ * but undo/redo history and UI state (selection, scroll) are reset.
466
+ */
467
+ multiSheets?: boolean;
468
+ /**
469
+ * Custom number format definitions.
470
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
471
+ * Spreadsheet instance. User data is preserved via serialize/parse,
472
+ * but undo/redo history and UI state (selection, scroll) are reset.
473
+ */
474
+ formats?: IFormats[];
475
+ /**
476
+ * Number/date formatting locale (decimal separator, currency symbol, etc.).
477
+ * This is separate from `spreadsheetLocale` which handles UI translations.
478
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
479
+ * Spreadsheet instance. User data is preserved via serialize/parse,
480
+ * but undo/redo history and UI state (selection, scroll) are reset.
481
+ */
482
+ localization?: ISpreadsheetConfig["localization"];
483
+ /**
484
+ * Path to the XLSX import module.
485
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
486
+ * Spreadsheet instance. User data is preserved via serialize/parse,
487
+ * but undo/redo history and UI state (selection, scroll) are reset.
488
+ */
489
+ importModulePath?: string;
490
+ /**
491
+ * Path to the XLSX export module.
492
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
493
+ * Spreadsheet instance. User data is preserved via serialize/parse,
494
+ * but undo/redo history and UI state (selection, scroll) are reset.
495
+ */
496
+ exportModulePath?: string;
497
+ /**
498
+ * Number of rows in the grid.
499
+ */
500
+ rowsCount?: number;
501
+ /**
502
+ * Number of columns in the grid.
503
+ */
504
+ colsCount?: number;
505
+ /**
506
+ * Whether the spreadsheet is in read-only mode.
507
+ */
508
+ readonly?: boolean;
509
+ /**
510
+ * The single source of truth for all spreadsheet data.
511
+ * Each entry represents a sheet with its cells, structure, and metadata.
512
+ */
513
+ sheets?: SheetData[];
514
+ /**
515
+ * Shared CSS style definitions referenced by `CellData.css`.
516
+ * Keys are class names, values are CSS property maps.
517
+ *
518
+ * @remarks ⚠️ Changing style definitions triggers a full data re-parse
519
+ * (`instance.parse()`). User data is preserved via `serialize()`, but
520
+ * undo/redo history and UI state (selection, scroll) are reset.
521
+ *
522
+ * @example
523
+ * ```ts
524
+ * styles={{
525
+ * bold: { "font-weight": "bold" },
526
+ * highlight: { background: "#ffeb3b", color: "#333" },
527
+ * }}
528
+ * ```
529
+ */
530
+ styles?: Record<string, Record<string, string>>;
531
+ /**
532
+ * Id of the active (visible) sheet.
533
+ */
534
+ activeSheet?: Id;
535
+ /**
536
+ * Controlled search state.
537
+ * Pass a `SearchConfig` object to trigger/update search.
538
+ * Pass `undefined` to dismiss the search bar.
539
+ */
540
+ search?: SearchConfig;
541
+ /**
542
+ * URL to load spreadsheet data from.
543
+ * Mutually exclusive with `sheets` — if both provided, `sheets` takes precedence.
544
+ */
545
+ loadUrl?: string;
546
+ /** File format hint for `loadUrl`. Default: `"json"`. */
547
+ loadFormat?: FileFormat;
548
+ /**
549
+ * UI locale and formula name translations.
550
+ * This is separate from `localization` (which handles number/date formatting).
551
+ * Both can be used together.
552
+ *
553
+ * @remarks ⚠️ Init-only. Changing this prop destroys and recreates the
554
+ * Spreadsheet instance. User data is preserved via serialize/parse,
555
+ * but undo/redo history and UI state (selection, scroll) are reset.
556
+ */
557
+ spreadsheetLocale?: SpreadsheetLocale;
558
+ /**
559
+ * Fires before any user action executes.
560
+ * Return `false` to cancel the action.
561
+ */
562
+ onBeforeAction?: BeforeActionHandler;
563
+ /** Fires after any user action completes successfully. */
564
+ onAfterAction?: AfterActionHandler;
565
+ /** Fires before a cell is added to the selection. Return `false` to cancel. */
566
+ onBeforeSelectionSet?: BeforeCellHandler;
567
+ /** Fires after a cell is added to the selection. */
568
+ onAfterSelectionSet?: AfterCellHandler;
569
+ /** Fires before a cell is removed from the selection. Return `false` to cancel. */
570
+ onBeforeSelectionRemove?: BeforeCellHandler;
571
+ /** Fires after a cell is removed from the selection. */
572
+ onAfterSelectionRemove?: AfterCellHandler;
573
+ /** Fires before the focused cell changes. Return `false` to cancel. */
574
+ onBeforeFocusSet?: BeforeCellHandler;
575
+ /** Fires after the focused cell changes. */
576
+ onAfterFocusSet?: AfterCellHandler;
577
+ /** Fires before cell editing begins. Return `false` to cancel. */
578
+ onBeforeEditStart?: BeforeEditHandler;
579
+ /** Fires after cell editing begins. */
580
+ onAfterEditStart?: AfterEditHandler;
581
+ /** Fires before cell editing ends. Return `false` to cancel and keep editing. */
582
+ onBeforeEditEnd?: BeforeEditHandler;
583
+ /** Fires after cell editing ends and the value is committed. */
584
+ onAfterEditEnd?: AfterEditHandler;
585
+ /** Fires before the active sheet changes. Return `false` to cancel. */
586
+ onBeforeSheetChange?: BeforeSheetHandler;
587
+ /** Fires after the active sheet changes. */
588
+ onAfterSheetChange?: AfterSheetHandler;
589
+ /** Fires after `parse()` or `load()` completes. */
590
+ onAfterDataLoaded?: () => void;
591
+ /** Fires during auto-fill (drag-fill) operations. */
592
+ onGroupFill?: (focusedCell: string, selectedCell: string) => void;
593
+ /** Fires on input in the formula/edit line. */
594
+ onEditLineInput?: (value: string) => void;
595
+ /** Fires on input in a cell during editing. */
596
+ onCellInput?: (cell: string, value: string) => void;
597
+ /**
598
+ * Notifies when undo/redo availability changes.
599
+ * Use to enable/disable external undo/redo buttons.
600
+ */
601
+ onStateChange?: (state: {
602
+ canUndo: boolean;
603
+ canRedo: boolean;
604
+ }) => void;
605
+ /** Notifies with matching cell references when `search` prop is active. */
606
+ onSearchResults?: (cells: string[]) => void;
607
+ /**
608
+ * Notifies when the user changes filters via the UI.
609
+ * Useful for syncing external filter state.
610
+ */
611
+ onFilterChange?: (filter: SheetFilter) => void;
612
+ /** Spreadsheet color theme. */
613
+ theme?: SpreadsheetTheme;
614
+ /** CSS class name appended to the container div. */
615
+ className?: string;
616
+ /** Inline styles applied to the container div. */
617
+ style?: react__default.CSSProperties;
618
+ }
619
+ /**
620
+ * Imperative handle exposed via `React.forwardRef`.
621
+ * Provides direct access to the underlying DHTMLX Spreadsheet instance
622
+ * for operations that don't map to declarative props (export,
623
+ * programmatic selection, etc.).
624
+ */
625
+ interface SpreadsheetRef {
626
+ /** The underlying DHTMLX Spreadsheet instance. `null` before init and after unmount. */
627
+ readonly instance: ISpreadsheet | null;
628
+ }
629
+
630
+ declare const ReactSpreadsheet: react.ForwardRefExoticComponent<SpreadsheetProps & react.RefAttributes<SpreadsheetRef>>;
631
+
632
+ export { Actions, FilterConditions, ReactSpreadsheet, ReactSpreadsheet as default };
633
+ export type { AfterActionHandler, AfterCellHandler, AfterEditHandler, AfterSheetHandler, BeforeActionHandler, BeforeCellHandler, BeforeEditHandler, BeforeSheetHandler, CellData, ColConfig, FileFormat, FreezeConfig, ICellInfo, IDataWithStyles, IExecuteConfig, IFilter, IFilterRules, IFormats, ISheet, ISpreadsheet, ISpreadsheetConfig, IStylesList, Id, MergedRange, RowConfig, SearchConfig, SheetData, SheetFilter, SheetSort, SpreadsheetConfigProps, SpreadsheetLocale, SpreadsheetProps, SpreadsheetRef, SpreadsheetTheme, ToolbarBlocks };