@lensui/lens-table 0.1.66 → 0.1.68
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 +17 -3
- package/dist/index.css +10 -0
- package/dist/index.js +17 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1252,7 +1252,7 @@ function paintGrid(options) {
|
|
|
1252
1252
|
ctx.fillStyle = isAxisSelected ? getAxisSelectionFill(rowIndex, column.key) : colors.columnDropTargetFill;
|
|
1253
1253
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1254
1254
|
}
|
|
1255
|
-
ctx.fillStyle = colors.grid;
|
|
1255
|
+
ctx.fillStyle = selectedRowKeys.has(rowKey) ? getAxisSelectionFill(rowIndex, column.key) : colors.grid;
|
|
1256
1256
|
if (!verticalBorderless && !(frameBorderless && columnIndex + colSpan >= columns.length)) {
|
|
1257
1257
|
ctx.fillRect(x + cellWidth - 1, y, 1, cellHeight);
|
|
1258
1258
|
}
|
|
@@ -1286,7 +1286,7 @@ function paintGrid(options) {
|
|
|
1286
1286
|
if (column.rowDragHandle) {
|
|
1287
1287
|
const iconLeft = x + (cellWidth - 16) / 2;
|
|
1288
1288
|
const iconTop = y + (cellHeight - 16) / 2;
|
|
1289
|
-
ctx.fillStyle = colors.icon;
|
|
1289
|
+
ctx.fillStyle = isAxisSelected ? colors.axisSelectionText : colors.icon;
|
|
1290
1290
|
ctx.beginPath();
|
|
1291
1291
|
for (const circleX of [5, 11]) {
|
|
1292
1292
|
for (const circleY of [4, 8, 12]) {
|
|
@@ -5155,7 +5155,21 @@ function TableInner({
|
|
|
5155
5155
|
fixedWidth > 0 && currentScroll.left > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rvg-text-fixed-shadow is-left", style: { left: fixedWidth } }),
|
|
5156
5156
|
rightFixedWidth > 0 && currentScroll.left < contentWidth - viewport.width && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rvg-text-fixed-shadow is-right", style: { right: rightFixedWidth } }),
|
|
5157
5157
|
hasVerticalBorders && fixedWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rvg-text-fixed-border is-left", style: { left: fixedWidth - 1 } }),
|
|
5158
|
-
hasVerticalBorders && rightFixedWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rvg-text-fixed-border is-right", style: { right: rightFixedWidth } })
|
|
5158
|
+
hasVerticalBorders && rightFixedWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rvg-text-fixed-border is-right", style: { right: rightFixedWidth } }),
|
|
5159
|
+
hasVerticalBorders && Array.from(
|
|
5160
|
+
{ length: domRange.rowEnd - domRange.rowStart },
|
|
5161
|
+
(_, offset) => domRange.rowStart + offset
|
|
5162
|
+
).flatMap((rowIndex) => {
|
|
5163
|
+
const row = rows[rowIndex];
|
|
5164
|
+
if (!row || !selectedRowKeySet.has(getRowKey(row, rowIndex))) return [];
|
|
5165
|
+
const top = bodyTop + rowIndex * rowHeight - currentScroll.top + getRowDragOffset(rowIndex);
|
|
5166
|
+
const className2 = `rvg-text-fixed-border-selection${striped && rowIndex % 2 === 1 ? " is-striped" : ""}`;
|
|
5167
|
+
const rowKey2 = String(getRowKey(row, rowIndex));
|
|
5168
|
+
return [
|
|
5169
|
+
fixedWidth > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `${className2} is-left`, style: { left: fixedWidth - 1, top, height: rowHeight } }, `selected-fixed-left:${rowKey2}`) : null,
|
|
5170
|
+
rightFixedWidth > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `${className2} is-right`, style: { right: rightFixedWidth, top, height: rowHeight } }, `selected-fixed-right:${rowKey2}`) : null
|
|
5171
|
+
];
|
|
5172
|
+
})
|
|
5159
5173
|
] }),
|
|
5160
5174
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rvg-spacer", style: { width: contentWidth, height: contentHeight + bodyTop, marginTop: -renderHeight } })
|
|
5161
5175
|
] }),
|
package/dist/index.css
CHANGED
|
@@ -815,6 +815,16 @@
|
|
|
815
815
|
background: var(--rvg-color-grid);
|
|
816
816
|
pointer-events: none;
|
|
817
817
|
}
|
|
818
|
+
.rvg-text-fixed-border-selection {
|
|
819
|
+
position: absolute;
|
|
820
|
+
z-index: 6;
|
|
821
|
+
width: 1px;
|
|
822
|
+
background: var(--rvg-color-axis-selection-fill);
|
|
823
|
+
pointer-events: none;
|
|
824
|
+
}
|
|
825
|
+
.rvg-text-fixed-border-selection.is-striped {
|
|
826
|
+
background: var(--rvg-color-axis-selection-stripe-fill);
|
|
827
|
+
}
|
|
818
828
|
.rvg-trailing-column-border {
|
|
819
829
|
position: absolute;
|
|
820
830
|
z-index: 6;
|
package/dist/index.js
CHANGED
|
@@ -1222,7 +1222,7 @@ function paintGrid(options) {
|
|
|
1222
1222
|
ctx.fillStyle = isAxisSelected ? getAxisSelectionFill(rowIndex, column.key) : colors.columnDropTargetFill;
|
|
1223
1223
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1224
1224
|
}
|
|
1225
|
-
ctx.fillStyle = colors.grid;
|
|
1225
|
+
ctx.fillStyle = selectedRowKeys.has(rowKey) ? getAxisSelectionFill(rowIndex, column.key) : colors.grid;
|
|
1226
1226
|
if (!verticalBorderless && !(frameBorderless && columnIndex + colSpan >= columns.length)) {
|
|
1227
1227
|
ctx.fillRect(x + cellWidth - 1, y, 1, cellHeight);
|
|
1228
1228
|
}
|
|
@@ -1256,7 +1256,7 @@ function paintGrid(options) {
|
|
|
1256
1256
|
if (column.rowDragHandle) {
|
|
1257
1257
|
const iconLeft = x + (cellWidth - 16) / 2;
|
|
1258
1258
|
const iconTop = y + (cellHeight - 16) / 2;
|
|
1259
|
-
ctx.fillStyle = colors.icon;
|
|
1259
|
+
ctx.fillStyle = isAxisSelected ? colors.axisSelectionText : colors.icon;
|
|
1260
1260
|
ctx.beginPath();
|
|
1261
1261
|
for (const circleX of [5, 11]) {
|
|
1262
1262
|
for (const circleY of [4, 8, 12]) {
|
|
@@ -5125,7 +5125,21 @@ function TableInner({
|
|
|
5125
5125
|
fixedWidth > 0 && currentScroll.left > 0 && /* @__PURE__ */ jsx8("div", { className: "rvg-text-fixed-shadow is-left", style: { left: fixedWidth } }),
|
|
5126
5126
|
rightFixedWidth > 0 && currentScroll.left < contentWidth - viewport.width && /* @__PURE__ */ jsx8("div", { className: "rvg-text-fixed-shadow is-right", style: { right: rightFixedWidth } }),
|
|
5127
5127
|
hasVerticalBorders && fixedWidth > 0 && /* @__PURE__ */ jsx8("div", { className: "rvg-text-fixed-border is-left", style: { left: fixedWidth - 1 } }),
|
|
5128
|
-
hasVerticalBorders && rightFixedWidth > 0 && /* @__PURE__ */ jsx8("div", { className: "rvg-text-fixed-border is-right", style: { right: rightFixedWidth } })
|
|
5128
|
+
hasVerticalBorders && rightFixedWidth > 0 && /* @__PURE__ */ jsx8("div", { className: "rvg-text-fixed-border is-right", style: { right: rightFixedWidth } }),
|
|
5129
|
+
hasVerticalBorders && Array.from(
|
|
5130
|
+
{ length: domRange.rowEnd - domRange.rowStart },
|
|
5131
|
+
(_, offset) => domRange.rowStart + offset
|
|
5132
|
+
).flatMap((rowIndex) => {
|
|
5133
|
+
const row = rows[rowIndex];
|
|
5134
|
+
if (!row || !selectedRowKeySet.has(getRowKey(row, rowIndex))) return [];
|
|
5135
|
+
const top = bodyTop + rowIndex * rowHeight - currentScroll.top + getRowDragOffset(rowIndex);
|
|
5136
|
+
const className2 = `rvg-text-fixed-border-selection${striped && rowIndex % 2 === 1 ? " is-striped" : ""}`;
|
|
5137
|
+
const rowKey2 = String(getRowKey(row, rowIndex));
|
|
5138
|
+
return [
|
|
5139
|
+
fixedWidth > 0 ? /* @__PURE__ */ jsx8("div", { className: `${className2} is-left`, style: { left: fixedWidth - 1, top, height: rowHeight } }, `selected-fixed-left:${rowKey2}`) : null,
|
|
5140
|
+
rightFixedWidth > 0 ? /* @__PURE__ */ jsx8("div", { className: `${className2} is-right`, style: { right: rightFixedWidth, top, height: rowHeight } }, `selected-fixed-right:${rowKey2}`) : null
|
|
5141
|
+
];
|
|
5142
|
+
})
|
|
5129
5143
|
] }),
|
|
5130
5144
|
/* @__PURE__ */ jsx8("div", { className: "rvg-spacer", style: { width: contentWidth, height: contentHeight + bodyTop, marginTop: -renderHeight } })
|
|
5131
5145
|
] }),
|