@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/dist/index.d.mts
CHANGED
|
@@ -23,6 +23,10 @@ interface SpreadsheetColumn<T = any> {
|
|
|
23
23
|
editable?: boolean;
|
|
24
24
|
/** Whether the column can be pinned */
|
|
25
25
|
pinnable?: boolean;
|
|
26
|
+
/** Whether the column can be highlighted (defaults to true) */
|
|
27
|
+
highlightable?: boolean;
|
|
28
|
+
/** Whether the column can have comments (defaults to true) */
|
|
29
|
+
commentable?: boolean;
|
|
26
30
|
/** Type of data in the column (for filtering/formatting) */
|
|
27
31
|
type?: 'text' | 'number' | 'date' | 'select' | 'boolean' | 'checkbox';
|
|
28
32
|
/** Options for select type columns */
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ interface SpreadsheetColumn<T = any> {
|
|
|
23
23
|
editable?: boolean;
|
|
24
24
|
/** Whether the column can be pinned */
|
|
25
25
|
pinnable?: boolean;
|
|
26
|
+
/** Whether the column can be highlighted (defaults to true) */
|
|
27
|
+
highlightable?: boolean;
|
|
28
|
+
/** Whether the column can have comments (defaults to true) */
|
|
29
|
+
commentable?: boolean;
|
|
26
30
|
/** Type of data in the column (for filtering/formatting) */
|
|
27
31
|
type?: 'text' | 'number' | 'date' | 'select' | 'boolean' | 'checkbox';
|
|
28
32
|
/** Options for select type columns */
|
package/dist/index.js
CHANGED
|
@@ -419,7 +419,7 @@ var SpreadsheetCell = ({
|
|
|
419
419
|
}
|
|
420
420
|
),
|
|
421
421
|
!isInSelection && !isFocused && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-0.5 shrink-0", children: [
|
|
422
|
-
onHighlight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
422
|
+
column.highlightable !== false && onHighlight && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
423
423
|
"button",
|
|
424
424
|
{
|
|
425
425
|
type: "button",
|
|
@@ -440,7 +440,7 @@ var SpreadsheetCell = ({
|
|
|
440
440
|
)
|
|
441
441
|
}
|
|
442
442
|
),
|
|
443
|
-
hasComments && onViewComments ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
443
|
+
column.commentable !== false && hasComments && onViewComments ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
444
444
|
"button",
|
|
445
445
|
{
|
|
446
446
|
type: "button",
|
|
@@ -455,7 +455,7 @@ var SpreadsheetCell = ({
|
|
|
455
455
|
unresolvedCommentCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[9px] font-medium text-amber-600", children: unresolvedCommentCount > 99 ? "99+" : unresolvedCommentCount })
|
|
456
456
|
]
|
|
457
457
|
}
|
|
458
|
-
) : onAddComment ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
458
|
+
) : column.commentable !== false && onAddComment ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
459
459
|
"button",
|
|
460
460
|
{
|
|
461
461
|
type: "button",
|
|
@@ -1258,7 +1258,7 @@ var SpreadsheetHeader = ({
|
|
|
1258
1258
|
ColumnHeaderActions,
|
|
1259
1259
|
{
|
|
1260
1260
|
enableFiltering: column.filterable,
|
|
1261
|
-
enableHighlighting: !!onHighlightClick,
|
|
1261
|
+
enableHighlighting: column.highlightable !== false && !!onHighlightClick,
|
|
1262
1262
|
enablePinning: column.pinnable !== false,
|
|
1263
1263
|
hasActiveFilter,
|
|
1264
1264
|
hasActiveHighlight: !!highlightColor,
|