@xcelsior/ui-spreadsheets 1.1.8 → 1.1.9

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.1.8",
3
+ "version": "1.1.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -297,7 +297,7 @@ const SpreadsheetCell: React.FC<SpreadsheetCellProps> = ({
297
297
  {!isInSelection && !isFocused && (
298
298
  <div className="flex items-center gap-0.5 shrink-0">
299
299
  {/* Highlight button - hover only */}
300
- {onHighlight && (
300
+ {column.highlightable !== false && onHighlight && (
301
301
  <button
302
302
  type="button"
303
303
  onClick={(e) => {
@@ -317,7 +317,7 @@ const SpreadsheetCell: React.FC<SpreadsheetCellProps> = ({
317
317
  )}
318
318
 
319
319
  {/* Comment button - always visible when has comments, hover only when adding */}
320
- {hasComments && onViewComments ? (
320
+ {column.commentable !== false && hasComments && onViewComments ? (
321
321
  <button
322
322
  type="button"
323
323
  onClick={(e) => {
@@ -336,7 +336,7 @@ const SpreadsheetCell: React.FC<SpreadsheetCellProps> = ({
336
336
  </span>
337
337
  )}
338
338
  </button>
339
- ) : onAddComment ? (
339
+ ) : column.commentable !== false && onAddComment ? (
340
340
  <button
341
341
  type="button"
342
342
  onClick={(e) => {
@@ -93,7 +93,7 @@ export const SpreadsheetHeader: React.FC<
93
93
  {/* Action buttons using unified ColumnHeaderActions */}
94
94
  <ColumnHeaderActions
95
95
  enableFiltering={column.filterable}
96
- enableHighlighting={!!onHighlightClick}
96
+ enableHighlighting={column.highlightable !== false && !!onHighlightClick}
97
97
  enablePinning={column.pinnable !== false}
98
98
  hasActiveFilter={hasActiveFilter}
99
99
  hasActiveHighlight={!!highlightColor}
package/src/types.ts CHANGED
@@ -22,6 +22,10 @@ export interface SpreadsheetColumn<T = any> {
22
22
  editable?: boolean;
23
23
  /** Whether the column can be pinned */
24
24
  pinnable?: boolean;
25
+ /** Whether the column can be highlighted (defaults to true) */
26
+ highlightable?: boolean;
27
+ /** Whether the column can have comments (defaults to true) */
28
+ commentable?: boolean;
25
29
  /** Type of data in the column (for filtering/formatting) */
26
30
  type?: 'text' | 'number' | 'date' | 'select' | 'boolean' | 'checkbox';
27
31
  /** Options for select type columns */