@xcelsior/ui-spreadsheets 1.1.19 → 1.2.0
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.js +33 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/RowIndexColumnHeader.tsx +26 -6
- package/src/components/Spreadsheet.tsx +10 -5
package/dist/index.js
CHANGED
|
@@ -1685,11 +1685,33 @@ function RowIndexColumnHeader({
|
|
|
1685
1685
|
isPinned = false,
|
|
1686
1686
|
onHighlightClick,
|
|
1687
1687
|
onPinClick,
|
|
1688
|
-
|
|
1688
|
+
isSecondRow = false,
|
|
1689
1689
|
compactMode = false,
|
|
1690
1690
|
className
|
|
1691
1691
|
}) {
|
|
1692
1692
|
const cellPadding = compactMode ? cellPaddingCompact3 : cellPaddingNormal3;
|
|
1693
|
+
if (isSecondRow) {
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1695
|
+
"th",
|
|
1696
|
+
{
|
|
1697
|
+
className: cn(
|
|
1698
|
+
"border border-gray-200 text-center font-bold text-gray-700",
|
|
1699
|
+
compactMode ? "text-[10px]" : "text-xs",
|
|
1700
|
+
cellPadding,
|
|
1701
|
+
isPinned ? "z-30" : "z-20",
|
|
1702
|
+
className
|
|
1703
|
+
),
|
|
1704
|
+
style: {
|
|
1705
|
+
minWidth: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1706
|
+
width: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1707
|
+
position: "sticky",
|
|
1708
|
+
top: 0,
|
|
1709
|
+
left: isPinned ? 0 : void 0,
|
|
1710
|
+
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
);
|
|
1714
|
+
}
|
|
1693
1715
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1694
1716
|
"th",
|
|
1695
1717
|
{
|
|
@@ -1700,16 +1722,13 @@ function RowIndexColumnHeader({
|
|
|
1700
1722
|
isPinned ? "z-30" : "z-20",
|
|
1701
1723
|
className
|
|
1702
1724
|
),
|
|
1703
|
-
rowSpan: hasColumnGroups ? 2 : void 0,
|
|
1704
1725
|
style: {
|
|
1705
1726
|
minWidth: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1706
1727
|
width: `${ROW_INDEX_COLUMN_WIDTH}px`,
|
|
1707
1728
|
position: "sticky",
|
|
1708
1729
|
top: 0,
|
|
1709
1730
|
left: isPinned ? 0 : void 0,
|
|
1710
|
-
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1711
|
-
overflow: "hidden",
|
|
1712
|
-
verticalAlign: "middle"
|
|
1731
|
+
backgroundColor: highlightColor || "rgb(243 244 246)"
|
|
1713
1732
|
},
|
|
1714
1733
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-center gap-1", children: [
|
|
1715
1734
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "#" }),
|
|
@@ -4312,7 +4331,6 @@ function Spreadsheet({
|
|
|
4312
4331
|
isPinned: isRowIndexPinned,
|
|
4313
4332
|
onHighlightClick: handleRowIndexHighlightClick,
|
|
4314
4333
|
onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
|
|
4315
|
-
hasColumnGroups: true,
|
|
4316
4334
|
compactMode: effectiveCompactMode
|
|
4317
4335
|
}
|
|
4318
4336
|
),
|
|
@@ -4365,7 +4383,15 @@ function Spreadsheet({
|
|
|
4365
4383
|
})
|
|
4366
4384
|
] }),
|
|
4367
4385
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("tr", { children: [
|
|
4368
|
-
|
|
4386
|
+
columnGroups ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4387
|
+
RowIndexColumnHeader,
|
|
4388
|
+
{
|
|
4389
|
+
highlightColor: rowIndexHighlightColor,
|
|
4390
|
+
isPinned: isRowIndexPinned,
|
|
4391
|
+
isSecondRow: true,
|
|
4392
|
+
compactMode: effectiveCompactMode
|
|
4393
|
+
}
|
|
4394
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4369
4395
|
RowIndexColumnHeader,
|
|
4370
4396
|
{
|
|
4371
4397
|
enableHighlighting,
|
|
@@ -4373,7 +4399,6 @@ function Spreadsheet({
|
|
|
4373
4399
|
isPinned: isRowIndexPinned,
|
|
4374
4400
|
onHighlightClick: handleRowIndexHighlightClick,
|
|
4375
4401
|
onPinClick: () => handleTogglePin(ROW_INDEX_COLUMN_ID),
|
|
4376
|
-
hasColumnGroups: false,
|
|
4377
4402
|
compactMode: effectiveCompactMode
|
|
4378
4403
|
}
|
|
4379
4404
|
),
|