@xcelsior/ui-spreadsheets 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcelsior/ui-spreadsheets",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -98,9 +98,9 @@ export function Spreadsheet<T extends Record<string, any>>({
98
98
  defaultPageSize = 25,
99
99
  pageSizeOptions = [25, 50, 100, 200],
100
100
  defaultZoom = 100,
101
- autoSave = true,
101
+ autoSave,
102
102
  onSave,
103
- compactMode = false,
103
+ compactMode,
104
104
  isLoading = false,
105
105
  className,
106
106
  emptyMessage = 'No data available',
@@ -205,15 +205,15 @@ export function Spreadsheet<T extends Record<string, any>>({
205
205
  defaultSort: null,
206
206
  defaultPageSize,
207
207
  defaultZoom,
208
- autoSave,
209
- compactView: compactMode,
208
+ autoSave: autoSave ?? true,
209
+ compactView: compactMode ?? false,
210
210
  showRowIndex: showRowIndex,
211
211
  pinRowIndex: false,
212
212
  rowIndexHighlightColor: undefined,
213
213
  });
214
214
 
215
215
  // Effective values from settings
216
- const effectiveAutoSave = spreadsheetSettings.autoSave ?? autoSave;
216
+ const effectiveAutoSave = autoSave ?? spreadsheetSettings.autoSave;
217
217
 
218
218
  // Undo/Redo hook
219
219
  const {
@@ -331,7 +331,6 @@ export function Spreadsheet<T extends Record<string, any>>({
331
331
  // Cell selection hook (for multi-cell selection, copy/paste)
332
332
  const {
333
333
  focusedCell,
334
- setFocusedCell,
335
334
  editingCell,
336
335
  setEditingCell,
337
336
  handleCellMouseDown,
@@ -465,7 +464,7 @@ export function Spreadsheet<T extends Record<string, any>>({
465
464
  // ==================== COMPUTED VALUES ====================
466
465
 
467
466
  const effectiveShowRowIndex = spreadsheetSettings.showRowIndex !== false;
468
- const effectiveCompactMode = spreadsheetSettings.compactView ?? compactMode;
467
+ const effectiveCompactMode = compactMode ?? spreadsheetSettings.compactView;
469
468
  const rowIndexHighlightColor = getColumnHighlight(ROW_INDEX_COLUMN_ID);
470
469
 
471
470
  // Refs
@@ -15,9 +15,9 @@ export interface SpreadsheetSettings {
15
15
  /** Default zoom level */
16
16
  defaultZoom: number;
17
17
  /** Whether auto-save is enabled */
18
- autoSave: boolean;
18
+ autoSave?: boolean;
19
19
  /** Whether compact view is enabled */
20
- compactView: boolean;
20
+ compactView?: boolean;
21
21
  /** Whether to show row index column */
22
22
  showRowIndex?: boolean;
23
23
  /** Whether row index column is pinned */
package/src/types.ts CHANGED
@@ -616,7 +616,7 @@ export interface SpreadsheetToolbarProps {
616
616
  /** Save status */
617
617
  saveStatus: 'saved' | 'saving' | 'unsaved' | 'error';
618
618
  /** Whether auto-save is enabled */
619
- autoSave: boolean;
619
+ autoSave?: boolean;
620
620
  /** Summary data to display */
621
621
  summary?: {
622
622
  label: string;