@lensui/lens-table 0.1.23 → 0.1.24
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.cjs +11 -0
- package/dist/index.css +8 -0
- package/dist/index.js +11 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2862,6 +2862,10 @@ function TableInner({
|
|
|
2862
2862
|
if (columns[columnIndex].fixed === "right") return viewport.width - (rightFixedOffsets.get(columnIndex) ?? 0) - metric.width;
|
|
2863
2863
|
return getScrollableColumnLeft(columnIndex) - scrollRef.current.left;
|
|
2864
2864
|
}, [columns, getScrollableColumnLeft, leftFixedOffsets, metrics, rightFixedOffsets, viewport.width]);
|
|
2865
|
+
const trailingColumnBorderLeft = (0, import_react5.useMemo)(() => {
|
|
2866
|
+
const displayedContentRight = columns.reduce((right, _column, columnIndex) => Math.max(right, getDisplayedColumnLeft(columnIndex) + metrics[columnIndex].width), 0);
|
|
2867
|
+
return displayedContentRight > 0 && displayedContentRight < viewport.width ? Math.round(displayedContentRight) - 1 : null;
|
|
2868
|
+
}, [columns, getDisplayedColumnLeft, metrics, scrollPosition.left, viewport.width]);
|
|
2865
2869
|
const getHeaderLevelAtY = (0, import_react5.useCallback)((localY, headerY) => {
|
|
2866
2870
|
const y = localY - headerY;
|
|
2867
2871
|
for (let level = 0; level < headerRowHeights.length; level += 1) {
|
|
@@ -4794,6 +4798,13 @@ function TableInner({
|
|
|
4794
4798
|
columns.map((column, index) => column.fixed === "right" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: renderHeaderIcons(index, viewport.width - (rightFixedOffsets.get(index) ?? 0) - metrics[index].width) }, column.key) : null)
|
|
4795
4799
|
] })
|
|
4796
4800
|
] }),
|
|
4801
|
+
hasVerticalBorders && trailingColumnBorderLeft !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
4802
|
+
"div",
|
|
4803
|
+
{
|
|
4804
|
+
className: "rvg-trailing-column-border",
|
|
4805
|
+
style: { left: trailingColumnBorderLeft, height: renderHeight }
|
|
4806
|
+
}
|
|
4807
|
+
),
|
|
4797
4808
|
headerTooltip && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: `rvg-header-tooltip is-${headerTooltip.placement}`, role: "tooltip", style: { left: headerTooltip.left, top: headerTooltip.top }, children: headerTooltip.label }),
|
|
4798
4809
|
hoveredCellTooltip && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
4799
4810
|
"div",
|
package/dist/index.css
CHANGED
|
@@ -808,6 +808,14 @@
|
|
|
808
808
|
background: var(--rvg-color-grid);
|
|
809
809
|
pointer-events: none;
|
|
810
810
|
}
|
|
811
|
+
.rvg-trailing-column-border {
|
|
812
|
+
position: absolute;
|
|
813
|
+
z-index: 6;
|
|
814
|
+
top: 0;
|
|
815
|
+
width: 1px;
|
|
816
|
+
background: var(--rvg-color-grid);
|
|
817
|
+
pointer-events: none;
|
|
818
|
+
}
|
|
811
819
|
.rvg-header-icons {
|
|
812
820
|
position: absolute;
|
|
813
821
|
z-index: 2;
|
package/dist/index.js
CHANGED
|
@@ -2832,6 +2832,10 @@ function TableInner({
|
|
|
2832
2832
|
if (columns[columnIndex].fixed === "right") return viewport.width - (rightFixedOffsets.get(columnIndex) ?? 0) - metric.width;
|
|
2833
2833
|
return getScrollableColumnLeft(columnIndex) - scrollRef.current.left;
|
|
2834
2834
|
}, [columns, getScrollableColumnLeft, leftFixedOffsets, metrics, rightFixedOffsets, viewport.width]);
|
|
2835
|
+
const trailingColumnBorderLeft = useMemo(() => {
|
|
2836
|
+
const displayedContentRight = columns.reduce((right, _column, columnIndex) => Math.max(right, getDisplayedColumnLeft(columnIndex) + metrics[columnIndex].width), 0);
|
|
2837
|
+
return displayedContentRight > 0 && displayedContentRight < viewport.width ? Math.round(displayedContentRight) - 1 : null;
|
|
2838
|
+
}, [columns, getDisplayedColumnLeft, metrics, scrollPosition.left, viewport.width]);
|
|
2835
2839
|
const getHeaderLevelAtY = useCallback2((localY, headerY) => {
|
|
2836
2840
|
const y = localY - headerY;
|
|
2837
2841
|
for (let level = 0; level < headerRowHeights.length; level += 1) {
|
|
@@ -4764,6 +4768,13 @@ function TableInner({
|
|
|
4764
4768
|
columns.map((column, index) => column.fixed === "right" ? /* @__PURE__ */ jsx7("span", { children: renderHeaderIcons(index, viewport.width - (rightFixedOffsets.get(index) ?? 0) - metrics[index].width) }, column.key) : null)
|
|
4765
4769
|
] })
|
|
4766
4770
|
] }),
|
|
4771
|
+
hasVerticalBorders && trailingColumnBorderLeft !== null && /* @__PURE__ */ jsx7(
|
|
4772
|
+
"div",
|
|
4773
|
+
{
|
|
4774
|
+
className: "rvg-trailing-column-border",
|
|
4775
|
+
style: { left: trailingColumnBorderLeft, height: renderHeight }
|
|
4776
|
+
}
|
|
4777
|
+
),
|
|
4767
4778
|
headerTooltip && /* @__PURE__ */ jsx7("div", { className: `rvg-header-tooltip is-${headerTooltip.placement}`, role: "tooltip", style: { left: headerTooltip.left, top: headerTooltip.top }, children: headerTooltip.label }),
|
|
4768
4779
|
hoveredCellTooltip && /* @__PURE__ */ jsx7(
|
|
4769
4780
|
"div",
|