@xcelsior/ui-spreadsheets 1.0.3 → 1.0.5

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,61 @@
1
+
2
+ > @xcelsior/ui-spreadsheets@1.0.3 lint /Users/tuannguyen/Work/xcelsior-packages/packages/ui/ui-spreadsheets
3
+ > biome check . && tsc
4
+
5
+  at src/components/Spreadsheet.tsx:779:49 ]8;;https://biomejs.dev/linter/rules/use-key-with-click-events\lint/a11y/useKeyWithClickEvents]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6
+
7
+  ⚠ Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
8
+  
9
+   777 │                                             {/* Row Index Column */}
10
+   778 │                                             {effectiveShowRowIndex && (
11
+  > 779 │                                                 <td
12
+      │                                                 ^^^
13
+  > 780 │                                                     onClick={(e) => handleRowSelect(rowId, e)}
14
+      ...
15
+  > 806 │                                                     }}
16
+  > 807 │                                                 >
17
+      │                                                 ^
18
+   808 │                                                     <div className={'relative'}>
19
+   809 │                                                         {/* Row number */}
20
+  
21
+  ℹ Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
22
+  
23
+ 
24
+  at src/components/SpreadsheetFilterDropdown.tsx:188:9 ]8;;https://biomejs.dev/linter/rules/no-static-element-interactions\lint/a11y/noStaticElementInteractions]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25
+
26
+  ⚠ Static Elements should not be interactive.
27
+  
28
+   187 │     return (
29
+  > 188 │         <div
30
+      │         ^^^^
31
+  > 189 │             ref={dropdownRef}
32
+      ...
33
+  > 194 │             onClick={(e) => e.stopPropagation()}
34
+  > 195 │         >
35
+      │         ^
36
+   196 │             <div className="px-3 py-2 border-b border-gray-200 bg-gray-50">
37
+   197 │                 <span className="text-xs font-medium text-gray-700">Filter: {column.label}</span>
38
+  
39
+  ℹ To add interactivity such as a mouse or key event listener to a static element, give the element an appropriate role value.
40
+  
41
+ 
42
+  at src/components/SpreadsheetFilterDropdown.tsx:188:9 ]8;;https://biomejs.dev/linter/rules/use-key-with-click-events\lint/a11y/useKeyWithClickEvents]8;;\ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
43
+
44
+  ⚠ Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.
45
+  
46
+   187 │     return (
47
+  > 188 │         <div
48
+      │         ^^^^
49
+  > 189 │             ref={dropdownRef}
50
+      ...
51
+  > 194 │             onClick={(e) => e.stopPropagation()}
52
+  > 195 │         >
53
+      │         ^
54
+   196 │             <div className="px-3 py-2 border-b border-gray-200 bg-gray-50">
55
+   197 │                 <span className="text-xs font-medium text-gray-700">Filter: {column.label}</span>
56
+  
57
+  ℹ Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
58
+  
59
+ 
60
+ Checked 29 files in 11ms. No fixes applied.
61
+ Found 3 warnings.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @xcelsior/ui-spreadsheets
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - b1faef3: ui styling
8
+
3
9
  ## 1.0.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -253,8 +253,8 @@ interface SpreadsheetProps<T = any> {
253
253
  onRowDoubleClick?: (row: T, rowIndex: number) => void;
254
254
  /** Callback when a row is cloned/duplicated */
255
255
  onRowClone?: (row: T, rowId: string | number) => void;
256
- /** Callback when a row comment is added */
257
- onAddRowComment?: (rowId: string | number, comment: string) => void;
256
+ /** Callback when a cell comment is added */
257
+ onAddCellComment?: (rowId: string | number, columnId: string, comment: string) => void;
258
258
  /** Callback when row highlight is toggled */
259
259
  onRowHighlight?: (rowId: string | number, color: string | null) => void;
260
260
  /** Whether to show the toolbar */
@@ -291,8 +291,8 @@ interface SpreadsheetProps<T = any> {
291
291
  emptyMessage?: string;
292
292
  /** Row highlights (externally controlled) */
293
293
  rowHighlights?: CellHighlight[];
294
- /** Row comments (externally controlled) */
295
- rowComments?: CellComment[];
294
+ /** Cell comments (externally controlled) */
295
+ cellComments?: CellComment[];
296
296
  /** Custom row actions to display in the index column */
297
297
  rowActions?: RowAction<T>[];
298
298
  /**
@@ -554,7 +554,7 @@ interface SpreadsheetColumnGroupHeaderProps {
554
554
  * />
555
555
  * ```
556
556
  */
557
- declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onAddRowComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, rowComments: externalRowComments, rowActions, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
557
+ declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
558
558
  declare namespace Spreadsheet {
559
559
  var displayName: string;
560
560
  }
package/dist/index.d.ts CHANGED
@@ -253,8 +253,8 @@ interface SpreadsheetProps<T = any> {
253
253
  onRowDoubleClick?: (row: T, rowIndex: number) => void;
254
254
  /** Callback when a row is cloned/duplicated */
255
255
  onRowClone?: (row: T, rowId: string | number) => void;
256
- /** Callback when a row comment is added */
257
- onAddRowComment?: (rowId: string | number, comment: string) => void;
256
+ /** Callback when a cell comment is added */
257
+ onAddCellComment?: (rowId: string | number, columnId: string, comment: string) => void;
258
258
  /** Callback when row highlight is toggled */
259
259
  onRowHighlight?: (rowId: string | number, color: string | null) => void;
260
260
  /** Whether to show the toolbar */
@@ -291,8 +291,8 @@ interface SpreadsheetProps<T = any> {
291
291
  emptyMessage?: string;
292
292
  /** Row highlights (externally controlled) */
293
293
  rowHighlights?: CellHighlight[];
294
- /** Row comments (externally controlled) */
295
- rowComments?: CellComment[];
294
+ /** Cell comments (externally controlled) */
295
+ cellComments?: CellComment[];
296
296
  /** Custom row actions to display in the index column */
297
297
  rowActions?: RowAction<T>[];
298
298
  /**
@@ -554,7 +554,7 @@ interface SpreadsheetColumnGroupHeaderProps {
554
554
  * />
555
555
  * ```
556
556
  */
557
- declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onAddRowComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, rowComments: externalRowComments, rowActions, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
557
+ declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
558
558
  declare namespace Spreadsheet {
559
559
  var displayName: string;
560
560
  }