@xcelsior/ui-spreadsheets 1.0.13 → 1.0.15

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.
@@ -1,4 +1,5 @@
1
1
  import '@xcelsior/design-system/styles';
2
+ import '../src/styles/globals.css';
2
3
  import type { Preview } from '@storybook/react';
3
4
  import { ToastContainer } from '@xcelsior/design-system';
4
5
 
@@ -0,0 +1,28 @@
1
+
2
+ > @xcelsior/ui-spreadsheets@1.0.14 build /Users/tuannguyen/Work/xcelsior-packages/packages/ui/ui-spreadsheets
3
+ > tsup && tsc --noEmit
4
+
5
+ CLI Building entry: src/index.ts, src/styles/globals.css
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /Users/tuannguyen/Work/xcelsior-packages/packages/ui/ui-spreadsheets/tsup.config.ts
9
+ CLI Target: es2020
10
+ CLI Cleaning output folder
11
+ CJS Build start
12
+ ESM Build start
13
+ DTS Build start
14
+ ESM dist/index.mjs 147.76 KB
15
+ ESM dist/styles/globals.css 33.17 KB
16
+ ESM dist/styles/globals.css.map 55.33 KB
17
+ ESM dist/index.mjs.map 4.62 MB
18
+ ESM ⚡️ Build success in 359ms
19
+ CJS dist/styles/globals.css 33.17 KB
20
+ CJS dist/index.js 158.96 KB
21
+ CJS dist/styles/globals.css.map 55.33 KB
22
+ CJS dist/index.js.map 4.62 MB
23
+ CJS ⚡️ Build success in 360ms
24
+ DTS ⚡️ Build success in 2017ms
25
+ DTS dist/styles/globals.d.ts 13.00 B
26
+ DTS dist/index.d.ts 22.84 KB
27
+ DTS dist/styles/globals.d.mts 13.00 B
28
+ DTS dist/index.d.mts 22.84 KB
@@ -1,26 +1,138 @@
1
1
 
2
- > @xcelsior/ui-spreadsheets@1.0.3 lint /Users/tuannguyen/Work/xcelsior-packages/packages/ui/ui-spreadsheets
2
+ > @xcelsior/ui-spreadsheets@1.0.14 lint /Users/tuannguyen/Work/xcelsior-packages/packages/ui/ui-spreadsheets
3
3
  > biome check . && tsc
4
4
 
5
-  at src/components/Spreadsheet.tsx:779:49 ]8;;https://biomejs.dev/linter/rules/use-key-with-click-events\lint/a11y/useKeyWithClickEvents]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5
+  at src/components/CommentModals.tsx:57:21 ]8;;https://biomejs.dev/linter/rules/no-autofocus\lint/a11y/noAutofocus]8;;\  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6
+
7
+  ⚠ Avoid the autoFocus attribute.
8
+  
9
+   55 │                     placeholder="Enter your comment..."
10
+   56 │                     className="w-full h-24 p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none"
11
+  > 57 │                     autoFocus
12
+     │                     ^^^^^^^^^
13
+   58 │                 />
14
+   59 │                 <div className="flex justify-end gap-2 mt-4">
15
+  
16
+  ℹ Unsafe fix: Remove the autoFocus attribute.
17
+  
18
+    55  55 │                       placeholder="Enter your comment..."
19
+    56  56 │                       className="w-full h-24 p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none"
20
+    57     │ - ····················autoFocus
21
+    58  57 │                   />
22
+    59  58 │                   <div className="flex justify-end gap-2 mt-4">
23
+  
24
+ 
25
+  at src/components/Spreadsheet.stories.tsx:333:34 ]8;;https://biomejs.dev/linter/rules/no-unused-function-parameters\lint/correctness/noUnusedFunctionParameters]8;;\  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
26
+
27
+  ⚠ This parameter is unused.
28
+  
29
+   331 │         };
30
+   332 │ 
31
+  > 333 │         const handleRowDelete = (row: User, rowId: string | number) => {
32
+      │                                  ^^^
33
+   334 │             setData((prev) => prev.filter((r) => r.id !== rowId));
34
+   335 │         };
35
+  
36
+  ℹ Unused parameters might be the result of an incomplete refactoring.
37
+  
38
+  ℹ Unsafe fix: If this is intentional, prepend row with an underscore.
39
+  
40
+    331  331 │           };
41
+    332  332 │   
42
+    333      │ - ········const·handleRowDelete·=·(row:·User,·rowId:·string·|·number)·=>·{
43
+         333 │ + ········const·handleRowDelete·=·(_row:·User,·rowId:·string·|·number)·=>·{
44
+    334  334 │               setData((prev) => prev.filter((r) => r.id !== rowId));
45
+    335  335 │           };
46
+  
47
+ 
48
+  at src/components/Spreadsheet.stories.tsx:385:34 ]8;;https://biomejs.dev/linter/rules/no-unused-function-parameters\lint/correctness/noUnusedFunctionParameters]8;;\  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
+
50
+  ⚠ This parameter is unused.
51
+  
52
+   383 │         };
53
+   384 │ 
54
+  > 385 │         const handleRowDelete = (row: User, rowId: string | number) => {
55
+      │                                  ^^^
56
+   386 │             setData((prev) => prev.filter((r) => r.id !== rowId));
57
+   387 │         };
58
+  
59
+  ℹ Unused parameters might be the result of an incomplete refactoring.
60
+  
61
+  ℹ Unsafe fix: If this is intentional, prepend row with an underscore.
62
+  
63
+    383  383 │           };
64
+    384  384 │   
65
+    385      │ - ········const·handleRowDelete·=·(row:·User,·rowId:·string·|·number)·=>·{
66
+         385 │ + ········const·handleRowDelete·=·(_row:·User,·rowId:·string·|·number)·=>·{
67
+    386  386 │               setData((prev) => prev.filter((r) => r.id !== rowId));
68
+    387  387 │           };
69
+  
70
+ 
71
+  at src/components/Spreadsheet.tsx:829:49 ]8;;https://biomejs.dev/linter/rules/use-key-with-click-events\lint/a11y/useKeyWithClickEvents]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6
72
 
7
73
   ⚠ Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
8
74
   
9
-   777 │                                             {/* Row Index Column */}
10
-   778 │                                             {effectiveShowRowIndex && (
11
-  > 779 │                                                 <td
75
+   827 │                                             {/* Row Index Column */}
76
+   828 │                                             {effectiveShowRowIndex && (
77
+  > 829 │                                                 <td
12
78
       │                                                 ^^^
13
-  > 780 │                                                     onClick={(e) => handleRowSelect(rowId, e)}
79
+  > 830 │                                                     onClick={(e) => handleRowSelect(rowId, e)}
14
80
       ...
15
-  > 806 │                                                     }}
16
-  > 807 │                                                 >
81
+  > 856 │                                                     }}
82
+  > 857 │                                                 >
17
83
       │                                                 ^
18
-   808 │                                                     <div className={'relative'}>
19
-   809 │                                                         {/* Row number */}
84
+   858 │                                                     <div className="relative flex items-center justify-center">
85
+   859 │                                                         {/* Row number - always centered */}
20
86
   
21
87
   ℹ Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
22
88
   
23
89
  
90
+  at src/components/Spreadsheet.tsx:27:15 ]8;;https://biomejs.dev/linter/rules/no-unused-imports\lint/correctness/noUnusedImports]8;;\  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
91
+
92
+  ⚠ Several of these imports are unused.
93
+  
94
+   25 │ import { useSpreadsheetKeyboardShortcuts } from '../hooks/useSpreadsheetKeyboardShortcuts';
95
+   26 │ import { useSpreadsheetSelection } from '../hooks/useSpreadsheetSelection';
96
+  > 27 │ import type { CellEdit, CellPosition, SpreadsheetProps } from '../types';
97
+     │               ^^^^^^^^^^^^^^^^^^^^^^
98
+   28 │ 
99
+   29 │ type SingleCellEdit = {
100
+  
101
+  ℹ Unused imports might be the result of an incomplete refactoring.
102
+  
103
+  ℹ Unsafe fix: Remove the unused imports.
104
+  
105
+   27 │ import·type·{·CellEdit,·CellPosition,·SpreadsheetProps·}·from·'../types';
106
+   │               ------------------------                                   
107
+ 
108
+  at src/components/Spreadsheet.tsx:329:9 ]8;;https://biomejs.dev/linter/rules/no-unused-variables\lint/correctness/noUnusedVariables]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
109
+
110
+  ⚠ This variable setFocusedCell is unused.
111
+  
112
+   327 │     const {
113
+   328 │         focusedCell,
114
+  > 329 │         setFocusedCell,
115
+      │         ^^^^^^^^^^^^^^
116
+   330 │         editingCell,
117
+   331 │         setEditingCell,
118
+  
119
+  ℹ Unused variables are often the result of typos, incomplete refactors, or other sources of bugs.
120
+  
121
+ 
122
+  at src/components/SpreadsheetCell.tsx:54:5 ]8;;https://biomejs.dev/linter/rules/no-unused-function-parameters\lint/correctness/noUnusedFunctionParameters]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
123
+
124
+  ⚠ This parameter is unused.
125
+  
126
+   52 │     onMouseDown,
127
+   53 │     onMouseEnter,
128
+  > 54 │     onChange,
129
+     │     ^^^^^^^^
130
+   55 │     onConfirm,
131
+   56 │     onCancel,
132
+  
133
+  ℹ Unused parameters might be the result of an incomplete refactoring.
134
+  
135
+ 
24
136
   at src/components/SpreadsheetFilterDropdown.tsx:188:9 ]8;;https://biomejs.dev/linter/rules/no-static-element-interactions\lint/a11y/noStaticElementInteractions]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25
137
 
26
138
   ⚠ Static Elements should not be interactive.
@@ -57,5 +169,28 @@
57
169
   ℹ Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
58
170
   
59
171
  
60
- Checked 29 files in 11ms. No fixes applied.
61
- Found 3 warnings.
172
+  at src/hooks/useSpreadsheetSelection.ts:602:37 ]8;;https://biomejs.dev/linter/rules/no-global-is-nan\lint/suspicious/noGlobalIsNan]8;;\  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
173
+
174
+  ⚠ isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead.
175
+  
176
+   600 │                     if (column.type === 'number' && typeof cellValue === 'string') {
177
+   601 │                         const parsed = parseFloat(cellValue);
178
+  > 602 │                         cellValue = isNaN(parsed) ? cellValue : parsed;
179
+      │                                     ^^^^^
180
+   603 │                     }
181
+   604 │ 
182
+  
183
+  ℹ See ]8;;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN#description\the MDN documentation]8;;\ for more details.
184
+  
185
+  ℹ Unsafe fix: Use Number.isNaN instead.
186
+  
187
+   600 600 │                       if (column.type === 'number' && typeof cellValue === 'string') {
188
+   601 601 │                           const parsed = parseFloat(cellValue);
189
+   602     │ - ························cellValue·=·isNaN(parsed)·?·cellValue·:·parsed;
190
+       602 │ + ························cellValue·=·Number.isNaN(parsed)·?·cellValue·:·parsed;
191
+   603 603 │                       }
192
+   604 604 │   
193
+  
194
+ 
195
+ Checked 31 files in 18ms. No fixes applied.
196
+ Found 10 warnings.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @xcelsior/ui-spreadsheets
2
2
 
3
+ ## 1.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - improve styling
8
+ - f3ec4eb: improve styling
9
+ - Updated dependencies [f3ec4eb]
10
+ - @xcelsior/design-system@1.0.7
11
+
3
12
  ## 1.0.8
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -127,6 +127,26 @@ interface CellPosition {
127
127
  /** Column ID */
128
128
  columnId: string;
129
129
  }
130
+ /**
131
+ * Cell range for multi-cell selection
132
+ */
133
+ interface CellRange {
134
+ /** Start position of the range */
135
+ start: CellPosition;
136
+ /** End position of the range */
137
+ end: CellPosition;
138
+ }
139
+ /**
140
+ * Cell edit for batch operations
141
+ */
142
+ interface CellEdit {
143
+ /** Row ID */
144
+ rowId: string | number;
145
+ /** Column ID */
146
+ columnId: string;
147
+ /** New value */
148
+ value: any;
149
+ }
130
150
  /**
131
151
  * Cell highlight configuration
132
152
  */
@@ -239,8 +259,8 @@ interface SpreadsheetProps<T = any> {
239
259
  columnGroups?: SpreadsheetColumnGroup[];
240
260
  /** Unique key accessor for each row */
241
261
  getRowId: (row: T) => string | number;
242
- /** Callback when a cell value is edited */
243
- onCellEdit?: (rowId: string | number, columnId: string, newValue: any) => void;
262
+ /** Callback when cell values are edited (batch operation) */
263
+ onCellsEdit?: (edits: CellEdit[]) => void;
244
264
  /** Callback when selection changes */
245
265
  onSelectionChange?: (selectedRows: (string | number)[]) => void;
246
266
  /** Callback when sort changes */
@@ -337,6 +357,15 @@ interface SpreadsheetProps<T = any> {
337
357
  */
338
358
  filters?: Record<string, SpreadsheetColumnFilter>;
339
359
  }
360
+ /**
361
+ * Selection edge for cell border styling
362
+ */
363
+ interface SelectionEdge {
364
+ top?: boolean;
365
+ right?: boolean;
366
+ bottom?: boolean;
367
+ left?: boolean;
368
+ }
340
369
  /**
341
370
  * Props for SpreadsheetCell component
342
371
  */
@@ -357,6 +386,10 @@ interface SpreadsheetCellProps {
357
386
  isEditing?: boolean;
358
387
  /** Whether the cell is focused */
359
388
  isFocused?: boolean;
389
+ /** Whether the cell is part of a multi-cell selection */
390
+ isInSelection?: boolean;
391
+ /** Selection edge for border styling (top/right/bottom/left) */
392
+ selectionEdge?: SelectionEdge;
360
393
  /** Whether the row is selected */
361
394
  isRowSelected?: boolean;
362
395
  /** Whether the row is hovered */
@@ -381,24 +414,22 @@ interface SpreadsheetCellProps {
381
414
  rightOffset?: number;
382
415
  /** Callback when cell is clicked */
383
416
  onClick?: (event: React$1.MouseEvent) => void;
417
+ /** Callback when mouse down on cell (for drag selection) */
418
+ onMouseDown?: (event: React$1.MouseEvent) => void;
419
+ /** Callback when mouse enters cell (for drag selection) */
420
+ onMouseEnter?: (event: React$1.MouseEvent) => void;
384
421
  /** Callback when cell value changes (only called on blur/confirm, not during typing) */
385
422
  onChange?: (newValue: any) => void;
386
423
  /** Callback when editing is confirmed, receives the final value */
387
424
  onConfirm?: (finalValue?: any) => void;
388
425
  /** Callback when editing is cancelled */
389
426
  onCancel?: () => void;
390
- /** Callback to copy value down */
391
- onCopyDown?: () => void;
392
- /** Callback to copy to selected rows */
393
- onCopyToSelected?: () => void;
394
427
  /** Callback to add highlight */
395
428
  onHighlight?: () => void;
396
429
  /** Callback to add comment */
397
430
  onAddComment?: () => void;
398
431
  /** Callback to view comments */
399
432
  onViewComments?: () => void;
400
- /** Whether there are selected rows (for showing copy to selected button) */
401
- hasSelectedRows?: boolean;
402
433
  /** Custom className */
403
434
  className?: string;
404
435
  }
@@ -573,7 +604,7 @@ interface SpreadsheetColumnGroupHeaderProps {
573
604
  * />
574
605
  * ```
575
606
  */
576
- declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onRowDelete, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, toolbarMenuItems, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
607
+ declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellsEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onRowDelete, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, toolbarMenuItems, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
577
608
  declare namespace Spreadsheet {
578
609
  var displayName: string;
579
610
  }
@@ -689,4 +720,4 @@ interface SpreadsheetSettingsModalProps {
689
720
  */
690
721
  declare const SpreadsheetSettingsModal: React.FC<SpreadsheetSettingsModalProps>;
691
722
 
692
- export { type CellComment, type CellHighlight, type CellPosition, type PaginationState, type RowAction, type SelectionState, Spreadsheet, MemoizedSpreadsheetCell as SpreadsheetCell, type SpreadsheetCellProps, type SpreadsheetColumn, type SpreadsheetColumnFilter, type SpreadsheetColumnGroup, type SpreadsheetColumnGroupHeaderProps, SpreadsheetFilterDropdown, type SpreadsheetFilterDropdownProps, SpreadsheetHeader, type SpreadsheetHeaderProps, type SpreadsheetProps, type SpreadsheetSettings, SpreadsheetSettingsModal, type SpreadsheetSortConfig, type SpreadsheetState, SpreadsheetToolbar, type SpreadsheetToolbarProps, type ToolbarMenuItem };
723
+ export { type CellComment, type CellEdit, type CellHighlight, type CellPosition, type CellRange, type PaginationState, type RowAction, type SelectionEdge, type SelectionState, Spreadsheet, MemoizedSpreadsheetCell as SpreadsheetCell, type SpreadsheetCellProps, type SpreadsheetColumn, type SpreadsheetColumnFilter, type SpreadsheetColumnGroup, type SpreadsheetColumnGroupHeaderProps, SpreadsheetFilterDropdown, type SpreadsheetFilterDropdownProps, SpreadsheetHeader, type SpreadsheetHeaderProps, type SpreadsheetProps, type SpreadsheetSettings, SpreadsheetSettingsModal, type SpreadsheetSortConfig, type SpreadsheetState, SpreadsheetToolbar, type SpreadsheetToolbarProps, type ToolbarMenuItem };
package/dist/index.d.ts CHANGED
@@ -127,6 +127,26 @@ interface CellPosition {
127
127
  /** Column ID */
128
128
  columnId: string;
129
129
  }
130
+ /**
131
+ * Cell range for multi-cell selection
132
+ */
133
+ interface CellRange {
134
+ /** Start position of the range */
135
+ start: CellPosition;
136
+ /** End position of the range */
137
+ end: CellPosition;
138
+ }
139
+ /**
140
+ * Cell edit for batch operations
141
+ */
142
+ interface CellEdit {
143
+ /** Row ID */
144
+ rowId: string | number;
145
+ /** Column ID */
146
+ columnId: string;
147
+ /** New value */
148
+ value: any;
149
+ }
130
150
  /**
131
151
  * Cell highlight configuration
132
152
  */
@@ -239,8 +259,8 @@ interface SpreadsheetProps<T = any> {
239
259
  columnGroups?: SpreadsheetColumnGroup[];
240
260
  /** Unique key accessor for each row */
241
261
  getRowId: (row: T) => string | number;
242
- /** Callback when a cell value is edited */
243
- onCellEdit?: (rowId: string | number, columnId: string, newValue: any) => void;
262
+ /** Callback when cell values are edited (batch operation) */
263
+ onCellsEdit?: (edits: CellEdit[]) => void;
244
264
  /** Callback when selection changes */
245
265
  onSelectionChange?: (selectedRows: (string | number)[]) => void;
246
266
  /** Callback when sort changes */
@@ -337,6 +357,15 @@ interface SpreadsheetProps<T = any> {
337
357
  */
338
358
  filters?: Record<string, SpreadsheetColumnFilter>;
339
359
  }
360
+ /**
361
+ * Selection edge for cell border styling
362
+ */
363
+ interface SelectionEdge {
364
+ top?: boolean;
365
+ right?: boolean;
366
+ bottom?: boolean;
367
+ left?: boolean;
368
+ }
340
369
  /**
341
370
  * Props for SpreadsheetCell component
342
371
  */
@@ -357,6 +386,10 @@ interface SpreadsheetCellProps {
357
386
  isEditing?: boolean;
358
387
  /** Whether the cell is focused */
359
388
  isFocused?: boolean;
389
+ /** Whether the cell is part of a multi-cell selection */
390
+ isInSelection?: boolean;
391
+ /** Selection edge for border styling (top/right/bottom/left) */
392
+ selectionEdge?: SelectionEdge;
360
393
  /** Whether the row is selected */
361
394
  isRowSelected?: boolean;
362
395
  /** Whether the row is hovered */
@@ -381,24 +414,22 @@ interface SpreadsheetCellProps {
381
414
  rightOffset?: number;
382
415
  /** Callback when cell is clicked */
383
416
  onClick?: (event: React$1.MouseEvent) => void;
417
+ /** Callback when mouse down on cell (for drag selection) */
418
+ onMouseDown?: (event: React$1.MouseEvent) => void;
419
+ /** Callback when mouse enters cell (for drag selection) */
420
+ onMouseEnter?: (event: React$1.MouseEvent) => void;
384
421
  /** Callback when cell value changes (only called on blur/confirm, not during typing) */
385
422
  onChange?: (newValue: any) => void;
386
423
  /** Callback when editing is confirmed, receives the final value */
387
424
  onConfirm?: (finalValue?: any) => void;
388
425
  /** Callback when editing is cancelled */
389
426
  onCancel?: () => void;
390
- /** Callback to copy value down */
391
- onCopyDown?: () => void;
392
- /** Callback to copy to selected rows */
393
- onCopyToSelected?: () => void;
394
427
  /** Callback to add highlight */
395
428
  onHighlight?: () => void;
396
429
  /** Callback to add comment */
397
430
  onAddComment?: () => void;
398
431
  /** Callback to view comments */
399
432
  onViewComments?: () => void;
400
- /** Whether there are selected rows (for showing copy to selected button) */
401
- hasSelectedRows?: boolean;
402
433
  /** Custom className */
403
434
  className?: string;
404
435
  }
@@ -573,7 +604,7 @@ interface SpreadsheetColumnGroupHeaderProps {
573
604
  * />
574
605
  * ```
575
606
  */
576
- declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onRowDelete, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, toolbarMenuItems, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
607
+ declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellsEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onRowDelete, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, toolbarMenuItems, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
577
608
  declare namespace Spreadsheet {
578
609
  var displayName: string;
579
610
  }
@@ -689,4 +720,4 @@ interface SpreadsheetSettingsModalProps {
689
720
  */
690
721
  declare const SpreadsheetSettingsModal: React.FC<SpreadsheetSettingsModalProps>;
691
722
 
692
- export { type CellComment, type CellHighlight, type CellPosition, type PaginationState, type RowAction, type SelectionState, Spreadsheet, MemoizedSpreadsheetCell as SpreadsheetCell, type SpreadsheetCellProps, type SpreadsheetColumn, type SpreadsheetColumnFilter, type SpreadsheetColumnGroup, type SpreadsheetColumnGroupHeaderProps, SpreadsheetFilterDropdown, type SpreadsheetFilterDropdownProps, SpreadsheetHeader, type SpreadsheetHeaderProps, type SpreadsheetProps, type SpreadsheetSettings, SpreadsheetSettingsModal, type SpreadsheetSortConfig, type SpreadsheetState, SpreadsheetToolbar, type SpreadsheetToolbarProps, type ToolbarMenuItem };
723
+ export { type CellComment, type CellEdit, type CellHighlight, type CellPosition, type CellRange, type PaginationState, type RowAction, type SelectionEdge, type SelectionState, Spreadsheet, MemoizedSpreadsheetCell as SpreadsheetCell, type SpreadsheetCellProps, type SpreadsheetColumn, type SpreadsheetColumnFilter, type SpreadsheetColumnGroup, type SpreadsheetColumnGroupHeaderProps, SpreadsheetFilterDropdown, type SpreadsheetFilterDropdownProps, SpreadsheetHeader, type SpreadsheetHeaderProps, type SpreadsheetProps, type SpreadsheetSettings, SpreadsheetSettingsModal, type SpreadsheetSortConfig, type SpreadsheetState, SpreadsheetToolbar, type SpreadsheetToolbarProps, type ToolbarMenuItem };