@lensui/lens-table 0.1.79 → 0.1.80
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 +2 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1280,6 +1280,7 @@ function paintGrid(options) {
|
|
|
1280
1280
|
const annotation = cellAnnotations.get(`${typeof rowKey}:${String(rowKey)}\0${column.key}`);
|
|
1281
1281
|
const rawValue = column.dataIndex === void 0 ? void 0 : row[column.dataIndex];
|
|
1282
1282
|
const cellStyle = column.cellStyle?.(rawValue, row, rowIndex);
|
|
1283
|
+
const cellGridColor = cellStyle?.gridColor ? resolveColor(cellStyle.gridColor) : void 0;
|
|
1283
1284
|
if (!isSelectedCell && !isRangeCell && cellStyle?.backgroundColor) {
|
|
1284
1285
|
const cellBackground = resolveColor(cellStyle.backgroundColor);
|
|
1285
1286
|
if (cellBackground) {
|
|
@@ -1306,7 +1307,7 @@ function paintGrid(options) {
|
|
|
1306
1307
|
ctx.fillStyle = isAxisSelected ? getAxisSelectionFill(rowIndex, column.key) : colors.columnDropTargetFill;
|
|
1307
1308
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1308
1309
|
}
|
|
1309
|
-
ctx.fillStyle = selectedRowKeys.has(rowKey) ? getAxisSelectionFill(rowIndex, column.key) : isRangeCell ? colors.selectionFill : colors.grid;
|
|
1310
|
+
ctx.fillStyle = selectedRowKeys.has(rowKey) ? getAxisSelectionFill(rowIndex, column.key) : isRangeCell ? colors.selectionFill : cellGridColor ?? colors.grid;
|
|
1310
1311
|
if (!verticalBorderless && !(frameBorderless && columnIndex + colSpan >= columns.length)) {
|
|
1311
1312
|
ctx.fillRect(x + cellWidth - 1, y, 1, cellHeight);
|
|
1312
1313
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -230,10 +230,12 @@ interface GridColumn<Row> {
|
|
|
230
230
|
renderCell?: (value: unknown, row: Row, rowIndex: number) => ReactNode;
|
|
231
231
|
/** Show this column in the summary row. true sums numeric values; a function can return custom content. */
|
|
232
232
|
summary?: boolean | ((rows: Row[], column: GridColumn<Row>) => ReactNode);
|
|
233
|
-
/** Custom cell paint style
|
|
233
|
+
/** Custom cell paint style used by canvas rendering. */
|
|
234
234
|
cellStyle?: (value: unknown, row: Row, rowIndex: number) => {
|
|
235
235
|
color?: string;
|
|
236
236
|
backgroundColor?: string;
|
|
237
|
+
/** Override this cell's right and bottom grid separators without changing their geometry. */
|
|
238
|
+
gridColor?: string;
|
|
237
239
|
};
|
|
238
240
|
}
|
|
239
241
|
/** Zero-based row/column coordinates inside the current row and column arrays. */
|
package/dist/index.d.ts
CHANGED
|
@@ -230,10 +230,12 @@ interface GridColumn<Row> {
|
|
|
230
230
|
renderCell?: (value: unknown, row: Row, rowIndex: number) => ReactNode;
|
|
231
231
|
/** Show this column in the summary row. true sums numeric values; a function can return custom content. */
|
|
232
232
|
summary?: boolean | ((rows: Row[], column: GridColumn<Row>) => ReactNode);
|
|
233
|
-
/** Custom cell paint style
|
|
233
|
+
/** Custom cell paint style used by canvas rendering. */
|
|
234
234
|
cellStyle?: (value: unknown, row: Row, rowIndex: number) => {
|
|
235
235
|
color?: string;
|
|
236
236
|
backgroundColor?: string;
|
|
237
|
+
/** Override this cell's right and bottom grid separators without changing their geometry. */
|
|
238
|
+
gridColor?: string;
|
|
237
239
|
};
|
|
238
240
|
}
|
|
239
241
|
/** Zero-based row/column coordinates inside the current row and column arrays. */
|
package/dist/index.js
CHANGED
|
@@ -1250,6 +1250,7 @@ function paintGrid(options) {
|
|
|
1250
1250
|
const annotation = cellAnnotations.get(`${typeof rowKey}:${String(rowKey)}\0${column.key}`);
|
|
1251
1251
|
const rawValue = column.dataIndex === void 0 ? void 0 : row[column.dataIndex];
|
|
1252
1252
|
const cellStyle = column.cellStyle?.(rawValue, row, rowIndex);
|
|
1253
|
+
const cellGridColor = cellStyle?.gridColor ? resolveColor(cellStyle.gridColor) : void 0;
|
|
1253
1254
|
if (!isSelectedCell && !isRangeCell && cellStyle?.backgroundColor) {
|
|
1254
1255
|
const cellBackground = resolveColor(cellStyle.backgroundColor);
|
|
1255
1256
|
if (cellBackground) {
|
|
@@ -1276,7 +1277,7 @@ function paintGrid(options) {
|
|
|
1276
1277
|
ctx.fillStyle = isAxisSelected ? getAxisSelectionFill(rowIndex, column.key) : colors.columnDropTargetFill;
|
|
1277
1278
|
ctx.fillRect(x, y, cellWidth, cellHeight);
|
|
1278
1279
|
}
|
|
1279
|
-
ctx.fillStyle = selectedRowKeys.has(rowKey) ? getAxisSelectionFill(rowIndex, column.key) : isRangeCell ? colors.selectionFill : colors.grid;
|
|
1280
|
+
ctx.fillStyle = selectedRowKeys.has(rowKey) ? getAxisSelectionFill(rowIndex, column.key) : isRangeCell ? colors.selectionFill : cellGridColor ?? colors.grid;
|
|
1280
1281
|
if (!verticalBorderless && !(frameBorderless && columnIndex + colSpan >= columns.length)) {
|
|
1281
1282
|
ctx.fillRect(x + cellWidth - 1, y, 1, cellHeight);
|
|
1282
1283
|
}
|