@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/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/SpreadsheetCell.tsx +3 -3
- package/src/components/SpreadsheetHeader.tsx +1 -1
- package/src/types.ts +4 -0
package/package.json
CHANGED
|
@@ -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 */
|