@lensui/lens-table 0.1.35 → 0.1.36
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 +5 -5
- package/dist/index.css +3 -3
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1049,7 +1049,7 @@ function paintGrid(options) {
|
|
|
1049
1049
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1050
1050
|
}
|
|
1051
1051
|
if (isColumnDropTarget) {
|
|
1052
|
-
ctx.fillStyle = colors.columnDropTargetFill;
|
|
1052
|
+
ctx.fillStyle = isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill;
|
|
1053
1053
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1054
1054
|
}
|
|
1055
1055
|
ctx.fillStyle = colors.grid;
|
|
@@ -1061,14 +1061,14 @@ function paintGrid(options) {
|
|
|
1061
1061
|
ctx.fillRect(x, y + cellHeight - 1, cellWidth, 1);
|
|
1062
1062
|
}
|
|
1063
1063
|
if (rowSpan > 1) {
|
|
1064
|
-
const mergedFill = isColumnDropTarget ? colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1064
|
+
const mergedFill = isColumnDropTarget ? isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1065
1065
|
ctx.fillStyle = mergedFill;
|
|
1066
1066
|
for (let offset = 1; offset < rowSpan; offset += 1) {
|
|
1067
1067
|
ctx.fillRect(x, y + offset * rowHeight - 1, cellWidth, 2);
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
if (colSpan > 1 && !verticalBorderless) {
|
|
1071
|
-
const mergedFill = isColumnDropTarget ? colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1071
|
+
const mergedFill = isColumnDropTarget ? isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1072
1072
|
ctx.fillStyle = mergedFill;
|
|
1073
1073
|
let offsetLeft = 0;
|
|
1074
1074
|
for (let offset = 1; offset < colSpan; offset += 1) {
|
|
@@ -1236,10 +1236,10 @@ function paintGrid(options) {
|
|
|
1236
1236
|
ctx.rect(leftFixedWidth, extensionTop, Math.max(0, rightFixedLeft - leftFixedWidth), extensionHeight);
|
|
1237
1237
|
ctx.clip();
|
|
1238
1238
|
}
|
|
1239
|
-
ctx.fillStyle = colors.columnDropTargetFill;
|
|
1240
1239
|
for (let columnIndex = columnDropTarget.startIndex; columnIndex <= columnDropTarget.endIndex; columnIndex += 1) {
|
|
1241
1240
|
if (layer === "scroll" ? columns[columnIndex]?.fixed !== void 0 : columns[columnIndex]?.fixed !== layer) continue;
|
|
1242
1241
|
if (layer === "scroll" && (columnIndex < range.columnStart || columnIndex >= range.columnEnd)) continue;
|
|
1242
|
+
ctx.fillStyle = selectedColumnKeys.has(columns[columnIndex].key) ? colors.axisSelectionFill : colors.columnDropTargetFill;
|
|
1243
1243
|
ctx.fillRect(getColumnX(columnIndex), extensionTop, metrics[columnIndex].width, extensionHeight);
|
|
1244
1244
|
}
|
|
1245
1245
|
ctx.restore();
|
|
@@ -1274,7 +1274,7 @@ function paintGrid(options) {
|
|
|
1274
1274
|
ctx.fillRect(x, headerY, metric.width, headerHeight);
|
|
1275
1275
|
}
|
|
1276
1276
|
if (isColumnDropTarget) {
|
|
1277
|
-
ctx.fillStyle = colors.columnDropTargetFill;
|
|
1277
|
+
ctx.fillStyle = isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill;
|
|
1278
1278
|
ctx.fillRect(x, headerY, metric.width, headerHeight);
|
|
1279
1279
|
}
|
|
1280
1280
|
ctx.fillStyle = colors.grid;
|
package/dist/index.css
CHANGED
|
@@ -1520,7 +1520,7 @@
|
|
|
1520
1520
|
border: 1px solid color-mix(in srgb, var(--rvg-color-primary) 38%, var(--rvg-color-grid));
|
|
1521
1521
|
background: var(--rvg-color-bg);
|
|
1522
1522
|
box-shadow: 0 6px 18px rgba(50, 91, 136, 0.18);
|
|
1523
|
-
opacity:
|
|
1523
|
+
opacity: 1;
|
|
1524
1524
|
pointer-events: none;
|
|
1525
1525
|
box-sizing: border-box;
|
|
1526
1526
|
}
|
|
@@ -1586,8 +1586,8 @@
|
|
|
1586
1586
|
}
|
|
1587
1587
|
.rvg-column-drag-preview-header.is-axis-selected,
|
|
1588
1588
|
.rvg-column-drag-preview-cell.is-axis-selected {
|
|
1589
|
-
background: var(--rvg-color-axis-selection-
|
|
1590
|
-
color: var(--rvg-color-axis-selection-
|
|
1589
|
+
background: var(--rvg-color-axis-selection-fill);
|
|
1590
|
+
color: var(--rvg-color-axis-selection-text);
|
|
1591
1591
|
}
|
|
1592
1592
|
.rvg-column-drag-preview-cell.is-edited {
|
|
1593
1593
|
background: var(--rvg-color-edited-fill);
|
package/dist/index.js
CHANGED
|
@@ -1019,7 +1019,7 @@ function paintGrid(options) {
|
|
|
1019
1019
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1020
1020
|
}
|
|
1021
1021
|
if (isColumnDropTarget) {
|
|
1022
|
-
ctx.fillStyle = colors.columnDropTargetFill;
|
|
1022
|
+
ctx.fillStyle = isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill;
|
|
1023
1023
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1024
1024
|
}
|
|
1025
1025
|
ctx.fillStyle = colors.grid;
|
|
@@ -1031,14 +1031,14 @@ function paintGrid(options) {
|
|
|
1031
1031
|
ctx.fillRect(x, y + cellHeight - 1, cellWidth, 1);
|
|
1032
1032
|
}
|
|
1033
1033
|
if (rowSpan > 1) {
|
|
1034
|
-
const mergedFill = isColumnDropTarget ? colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1034
|
+
const mergedFill = isColumnDropTarget ? isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1035
1035
|
ctx.fillStyle = mergedFill;
|
|
1036
1036
|
for (let offset = 1; offset < rowSpan; offset += 1) {
|
|
1037
1037
|
ctx.fillRect(x, y + offset * rowHeight - 1, cellWidth, 2);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
if (colSpan > 1 && !verticalBorderless) {
|
|
1041
|
-
const mergedFill = isColumnDropTarget ? colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1041
|
+
const mergedFill = isColumnDropTarget ? isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill : annotation?.type === "background" ? annotation.color : isSelectedCell || isRangeCell ? colors.selectionFill : highlightEditedCells && !insertedRowKeys.has(rowKey) && editedCellKeys.has(`${typeof rowKey}:${String(rowKey)}\0${column.key}`) ? colors.editedFill : highlightInsertedRows && insertedRowKeys.has(rowKey) ? colors.insertedFill : hoveredRowIndex === rowIndex ? colors.rowHoverFill : isAxisSelected ? colors.axisSelectionFill : cellStyle?.backgroundColor ?? rowStyle?.backgroundColor ?? (striped && rowIndex % 2 === 1 ? colors.stripe : colors.background);
|
|
1042
1042
|
ctx.fillStyle = mergedFill;
|
|
1043
1043
|
let offsetLeft = 0;
|
|
1044
1044
|
for (let offset = 1; offset < colSpan; offset += 1) {
|
|
@@ -1206,10 +1206,10 @@ function paintGrid(options) {
|
|
|
1206
1206
|
ctx.rect(leftFixedWidth, extensionTop, Math.max(0, rightFixedLeft - leftFixedWidth), extensionHeight);
|
|
1207
1207
|
ctx.clip();
|
|
1208
1208
|
}
|
|
1209
|
-
ctx.fillStyle = colors.columnDropTargetFill;
|
|
1210
1209
|
for (let columnIndex = columnDropTarget.startIndex; columnIndex <= columnDropTarget.endIndex; columnIndex += 1) {
|
|
1211
1210
|
if (layer === "scroll" ? columns[columnIndex]?.fixed !== void 0 : columns[columnIndex]?.fixed !== layer) continue;
|
|
1212
1211
|
if (layer === "scroll" && (columnIndex < range.columnStart || columnIndex >= range.columnEnd)) continue;
|
|
1212
|
+
ctx.fillStyle = selectedColumnKeys.has(columns[columnIndex].key) ? colors.axisSelectionFill : colors.columnDropTargetFill;
|
|
1213
1213
|
ctx.fillRect(getColumnX(columnIndex), extensionTop, metrics[columnIndex].width, extensionHeight);
|
|
1214
1214
|
}
|
|
1215
1215
|
ctx.restore();
|
|
@@ -1244,7 +1244,7 @@ function paintGrid(options) {
|
|
|
1244
1244
|
ctx.fillRect(x, headerY, metric.width, headerHeight);
|
|
1245
1245
|
}
|
|
1246
1246
|
if (isColumnDropTarget) {
|
|
1247
|
-
ctx.fillStyle = colors.columnDropTargetFill;
|
|
1247
|
+
ctx.fillStyle = isAxisSelected ? colors.axisSelectionFill : colors.columnDropTargetFill;
|
|
1248
1248
|
ctx.fillRect(x, headerY, metric.width, headerHeight);
|
|
1249
1249
|
}
|
|
1250
1250
|
ctx.fillStyle = colors.grid;
|