@xcelsior/ui-spreadsheets 1.0.4 → 1.0.6

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/dist/index.d.mts CHANGED
@@ -560,24 +560,10 @@ declare namespace Spreadsheet {
560
560
  }
561
561
 
562
562
  /**
563
- * SpreadsheetCell component - A single cell in the spreadsheet table.
564
- * Supports static display, inline editing, and various cell interactions.
565
- *
566
- * @example
567
- * ```tsx
568
- * <SpreadsheetCell
569
- * value="John Doe"
570
- * column={{ id: 'name', label: 'Name', editable: true }}
571
- * row={rowData}
572
- * rowIndex={0}
573
- * rowId="1"
574
- * isEditable={true}
575
- * onClick={handleClick}
576
- * onChange={handleChange}
577
- * />
578
- * ```
563
+ * Memoized SpreadsheetCell to prevent unnecessary re-renders
564
+ * Only re-renders when props that affect this specific cell change
579
565
  */
580
- declare const SpreadsheetCell: React$1.FC<SpreadsheetCellProps>;
566
+ declare const MemoizedSpreadsheetCell: React$1.NamedExoticComponent<SpreadsheetCellProps>;
581
567
 
582
568
  /**
583
569
  * SpreadsheetHeader component - A column header cell with sorting, filtering, and pinning capabilities.
@@ -684,4 +670,4 @@ interface SpreadsheetSettingsModalProps {
684
670
  */
685
671
  declare const SpreadsheetSettingsModal: React.FC<SpreadsheetSettingsModalProps>;
686
672
 
687
- export { type CellComment, type CellHighlight, type CellPosition, type PaginationState, type RowAction, type SelectionState, Spreadsheet, 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 };
673
+ 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 };
package/dist/index.d.ts CHANGED
@@ -560,24 +560,10 @@ declare namespace Spreadsheet {
560
560
  }
561
561
 
562
562
  /**
563
- * SpreadsheetCell component - A single cell in the spreadsheet table.
564
- * Supports static display, inline editing, and various cell interactions.
565
- *
566
- * @example
567
- * ```tsx
568
- * <SpreadsheetCell
569
- * value="John Doe"
570
- * column={{ id: 'name', label: 'Name', editable: true }}
571
- * row={rowData}
572
- * rowIndex={0}
573
- * rowId="1"
574
- * isEditable={true}
575
- * onClick={handleClick}
576
- * onChange={handleChange}
577
- * />
578
- * ```
563
+ * Memoized SpreadsheetCell to prevent unnecessary re-renders
564
+ * Only re-renders when props that affect this specific cell change
579
565
  */
580
- declare const SpreadsheetCell: React$1.FC<SpreadsheetCellProps>;
566
+ declare const MemoizedSpreadsheetCell: React$1.NamedExoticComponent<SpreadsheetCellProps>;
581
567
 
582
568
  /**
583
569
  * SpreadsheetHeader component - A column header cell with sorting, filtering, and pinning capabilities.
@@ -684,4 +670,4 @@ interface SpreadsheetSettingsModalProps {
684
670
  */
685
671
  declare const SpreadsheetSettingsModal: React.FC<SpreadsheetSettingsModalProps>;
686
672
 
687
- export { type CellComment, type CellHighlight, type CellPosition, type PaginationState, type RowAction, type SelectionState, Spreadsheet, 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 };
673
+ 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 };