es-grid-template 1.9.78 → 1.9.82
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/es/ali-table/utils/convertColumnsChoose.js +2 -1
- package/es/group-component/TableContainerEdit.js +18 -0
- package/es/group-component/body/TableBodyCellEdit.js +5 -0
- package/es/group-component/hook/utils.d.ts +3 -3
- package/es/group-component/hook/utils.js +12 -2
- package/es/table-component/TableContainerEdit.js +18 -0
- package/es/table-component/body/TableBodyCellEdit.js +5 -0
- package/es/table-component/hook/utils.js +11 -3
- package/es/table-component/table/Grid.js +18 -2
- package/es/table-virtuoso/hook/utils.js +12 -2
- package/es/table-virtuoso/style.js +1 -1
- package/lib/ali-table/utils/convertColumnsChoose.js +2 -1
- package/lib/group-component/TableContainerEdit.js +18 -0
- package/lib/group-component/body/TableBodyCellEdit.js +5 -0
- package/lib/group-component/hook/utils.d.ts +9 -9
- package/lib/group-component/hook/utils.js +12 -2
- package/lib/table-component/TableContainerEdit.js +18 -0
- package/lib/table-component/body/TableBodyCellEdit.js +5 -0
- package/lib/table-component/hook/utils.js +11 -3
- package/lib/table-component/table/Grid.js +18 -2
- package/lib/table-virtuoso/hook/utils.js +12 -2
- package/lib/table-virtuoso/style.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { nonActionColumn } from "../../grid-component/hooks";
|
|
1
2
|
export function convertColumnsToTreeData(columns, groupColumns, t) {
|
|
2
3
|
if (!columns) {
|
|
3
4
|
return [];
|
|
4
5
|
}
|
|
5
6
|
return columns.filter(col => {
|
|
6
7
|
const inGroup = groupColumns ? groupColumns.includes(String(col.field)) : false;
|
|
7
|
-
if (col.showInColumnChoose === false) return false;
|
|
8
|
+
if (col.showInColumnChoose === false || nonActionColumn.includes(col.field)) return false;
|
|
8
9
|
if (inGroup && !('children' in col && Array.isArray(col.children))) {
|
|
9
10
|
return false;
|
|
10
11
|
}
|
|
@@ -2023,7 +2023,25 @@ const TableContainerEdit = props => {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
contextMenuClick?.(args);
|
|
2025
2025
|
};
|
|
2026
|
+
|
|
2027
|
+
// Chống fire onCellClick trùng lặp: double-click = 2 lần mousedown nên callback sẽ bị gọi 2 lần.
|
|
2028
|
+
// Chỉ bỏ qua khi click LIÊN TIẾP cùng 1 cell trong khoảng thời gian rất ngắn.
|
|
2029
|
+
const lastCellClickRef = React.useRef({
|
|
2030
|
+
key: '',
|
|
2031
|
+
time: 0
|
|
2032
|
+
});
|
|
2026
2033
|
const handleCellClick = (rowNumber, record, column, rowId, cellValue) => {
|
|
2034
|
+
const clickKey = `${rowId}::${column.field ?? ''}`;
|
|
2035
|
+
const now = Date.now();
|
|
2036
|
+
|
|
2037
|
+
// cùng cell && trong vòng 300ms => coi là double-click, bỏ qua lần lặp
|
|
2038
|
+
if (lastCellClickRef.current.key === clickKey && now - lastCellClickRef.current.time < 300) {
|
|
2039
|
+
return;
|
|
2040
|
+
}
|
|
2041
|
+
lastCellClickRef.current = {
|
|
2042
|
+
key: clickKey,
|
|
2043
|
+
time: now
|
|
2044
|
+
};
|
|
2027
2045
|
const cellClickCallback = newOptions => {
|
|
2028
2046
|
if (newOptions) {
|
|
2029
2047
|
const newElem = {
|
|
@@ -1260,6 +1260,11 @@ const TableBodyCellEdit = props => {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
} else {
|
|
1262
1262
|
handleMouseDown(cell.row.id, cell.column.id);
|
|
1263
|
+
|
|
1264
|
+
// fire onCellClick ngay lần click đầu (trước đây chỉ fire khi cell đã ở trạng thái editing)
|
|
1265
|
+
if (canEdit) {
|
|
1266
|
+
handleCellClick?.(rowNumber, record, columnMeta, record[rowKey], record[columnMeta.field ?? '']);
|
|
1267
|
+
}
|
|
1263
1268
|
if (editingKey) {
|
|
1264
1269
|
setTimeout(() => {
|
|
1265
1270
|
setEditingKey?.('');
|
|
@@ -196,10 +196,10 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
196
196
|
value: any;
|
|
197
197
|
rowData: RecordType;
|
|
198
198
|
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
|
|
199
|
-
onCellStyles?: Omit<CSSProperties, "left" | "right" | "
|
|
200
|
-
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "
|
|
199
|
+
onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
200
|
+
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
201
201
|
onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
|
|
202
|
-
onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "
|
|
202
|
+
onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
203
203
|
getValue?: (row: any, rowIndex: number) => any;
|
|
204
204
|
getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
|
|
205
205
|
headerCellProps?: import("./../../grid-component/type").CellProps;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nonActionColumn } from "./../../grid-component/hooks";
|
|
1
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
3
|
import { presetPalettes } from "@ant-design/colors";
|
|
3
4
|
import dayjs from "dayjs";
|
|
@@ -1916,8 +1917,8 @@ export function convertColumnsToTreeData(columns, groupColumns) {
|
|
|
1916
1917
|
|
|
1917
1918
|
// Điều kiện filter:
|
|
1918
1919
|
// - Nếu meta.showInColumnChoose = false => loại bỏ
|
|
1919
|
-
// - Nếu
|
|
1920
|
-
if (meta.showInColumnChoose === false) return false;
|
|
1920
|
+
// - Nếu là column đặc biệt (selection_column, #, command...) => loại bỏ
|
|
1921
|
+
if (meta.showInColumnChoose === false || nonActionColumn.includes(col.id)) return false;
|
|
1921
1922
|
if (inGroup && !('columns' in col && Array.isArray(col.columns))) {
|
|
1922
1923
|
return false;
|
|
1923
1924
|
}
|
|
@@ -1948,6 +1949,15 @@ export const updateColumns1 = (columns, includes) => {
|
|
|
1948
1949
|
if (!column.field) {
|
|
1949
1950
|
return column;
|
|
1950
1951
|
}
|
|
1952
|
+
|
|
1953
|
+
// Bỏ qua column đặc biệt (selection_column, #, command, drag-handle) — giữ nguyên visible
|
|
1954
|
+
// nhưng vẫn phải đệ quy children để không bỏ sót column con
|
|
1955
|
+
if (nonActionColumn.includes(newColumn.field)) {
|
|
1956
|
+
if (newColumn.children) {
|
|
1957
|
+
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
1958
|
+
}
|
|
1959
|
+
return newColumn;
|
|
1960
|
+
}
|
|
1951
1961
|
if (newColumn.children) {
|
|
1952
1962
|
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
1953
1963
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
@@ -2078,7 +2078,25 @@ const TableContainerEdit = props => {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
contextMenuClick?.(args);
|
|
2080
2080
|
};
|
|
2081
|
+
|
|
2082
|
+
// Chống fire onCellClick trùng lặp: double-click = 2 lần mousedown nên callback sẽ bị gọi 2 lần.
|
|
2083
|
+
// Chỉ bỏ qua khi click LIÊN TIẾP cùng 1 cell trong khoảng thời gian rất ngắn.
|
|
2084
|
+
const lastCellClickRef = React.useRef({
|
|
2085
|
+
key: '',
|
|
2086
|
+
time: 0
|
|
2087
|
+
});
|
|
2081
2088
|
const handleCellClick = (rowNumber, record, column, rowId, cellValue) => {
|
|
2089
|
+
const clickKey = `${rowId}::${column.field ?? ''}`;
|
|
2090
|
+
const now = Date.now();
|
|
2091
|
+
|
|
2092
|
+
// cùng cell && trong vòng 300ms => coi là double-click, bỏ qua lần lặp
|
|
2093
|
+
if (lastCellClickRef.current.key === clickKey && now - lastCellClickRef.current.time < 300) {
|
|
2094
|
+
return;
|
|
2095
|
+
}
|
|
2096
|
+
lastCellClickRef.current = {
|
|
2097
|
+
key: clickKey,
|
|
2098
|
+
time: now
|
|
2099
|
+
};
|
|
2082
2100
|
const cellClickCallback = newOptions => {
|
|
2083
2101
|
if (newOptions) {
|
|
2084
2102
|
const newElem = {
|
|
@@ -1344,6 +1344,11 @@ const TableBodyCellEdit = props => {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
} else {
|
|
1346
1346
|
handleMouseDown(cell.row.id, cell.column.id);
|
|
1347
|
+
|
|
1348
|
+
// fire onCellClick ngay lần click đầu (trước đây chỉ fire khi cell đã ở trạng thái editing)
|
|
1349
|
+
if (canEdit) {
|
|
1350
|
+
handleCellClick?.(rowNumber, record, columnMeta, record[rowKey], record[columnMeta.field ?? '']);
|
|
1351
|
+
}
|
|
1347
1352
|
if (editingKey) {
|
|
1348
1353
|
setTimeout(() => {
|
|
1349
1354
|
setEditingKey?.('');
|
|
@@ -2481,9 +2481,8 @@ export function convertColumnsToTreeData(columns, groupColumns) {
|
|
|
2481
2481
|
|
|
2482
2482
|
// Điều kiện filter:
|
|
2483
2483
|
// - Nếu meta.showInColumnChoose = false => loại bỏ
|
|
2484
|
-
// - Nếu
|
|
2485
|
-
|
|
2486
|
-
if (meta.showInColumnChoose === false) return false;
|
|
2484
|
+
// - Nếu là column đặc biệt (selection_column, #, command...) => loại bỏ
|
|
2485
|
+
if (meta.showInColumnChoose === false || nonActionColumn.includes(col.id)) return false;
|
|
2487
2486
|
// if (inGroup && !('columns' in col && Array.isArray((col as any).columns))) {
|
|
2488
2487
|
if (inGroup && !('columns' in col && Array.isArray(col.columns))) {
|
|
2489
2488
|
return false;
|
|
@@ -2515,6 +2514,15 @@ export const updateColumns1 = (columns, includes) => {
|
|
|
2515
2514
|
if (!column.field) {
|
|
2516
2515
|
return column;
|
|
2517
2516
|
}
|
|
2517
|
+
|
|
2518
|
+
// Bỏ qua column đặc biệt (selection_column, #, command, drag-handle) — giữ nguyên visible
|
|
2519
|
+
// nhưng vẫn phải đệ quy children để không bỏ sót column con
|
|
2520
|
+
if (nonActionColumn.includes(newColumn.field)) {
|
|
2521
|
+
if (newColumn.children) {
|
|
2522
|
+
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2523
|
+
}
|
|
2524
|
+
return newColumn;
|
|
2525
|
+
}
|
|
2518
2526
|
if (newColumn.children) {
|
|
2519
2527
|
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2520
2528
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
@@ -109,6 +109,17 @@ const Grid = props => {
|
|
|
109
109
|
pageSize: pagination && pagination?.pageSize ? pagination.pageSize : 20,
|
|
110
110
|
...paginationState
|
|
111
111
|
} : undefined,
|
|
112
|
+
// ...(infiniteScroll
|
|
113
|
+
// ? {}
|
|
114
|
+
// : {
|
|
115
|
+
// pagination: {
|
|
116
|
+
// // @ts-ignore
|
|
117
|
+
// pageIndex: pagination?.currentPage ? pagination.currentPage - 1 : 0,
|
|
118
|
+
// // @ts-ignore
|
|
119
|
+
// pageSize: pagination?.pageSize ?? 20,
|
|
120
|
+
// ...paginationState,
|
|
121
|
+
// },
|
|
122
|
+
// }),
|
|
112
123
|
grouping,
|
|
113
124
|
columnSizing,
|
|
114
125
|
columnOrder,
|
|
@@ -167,8 +178,13 @@ const Grid = props => {
|
|
|
167
178
|
return Array.isArray(row.original.children);
|
|
168
179
|
},
|
|
169
180
|
getExpandedRowModel: getExpandedRowModel(),
|
|
170
|
-
|
|
171
|
-
|
|
181
|
+
...(pagination && !infiniteScroll && {
|
|
182
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
183
|
+
onPaginationChange: setPagination
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
// getPaginationRowModel: pagination && !infiniteScroll ? getPaginationRowModel() : undefined,
|
|
187
|
+
// onPaginationChange: pagination && !infiniteScroll ? setPagination : undefined,
|
|
172
188
|
|
|
173
189
|
// onColumnVisibilityChange: setColumnVisibility,
|
|
174
190
|
// onColumnPinningChange,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { nonActionColumn } from "../../grid-component/hooks";
|
|
1
2
|
import { SELECTION_COLUMN } from "rc-master-ui/es/table/hooks/useSelection";
|
|
2
3
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
4
|
import { presetPalettes } from "@ant-design/colors";
|
|
@@ -1888,8 +1889,8 @@ export function convertColumnsToTreeData(columns, groupColumns) {
|
|
|
1888
1889
|
|
|
1889
1890
|
// Điều kiện filter:
|
|
1890
1891
|
// - Nếu meta.showInColumnChoose = false => loại bỏ
|
|
1891
|
-
// - Nếu
|
|
1892
|
-
if (meta.showInColumnChoose === false) return false;
|
|
1892
|
+
// - Nếu là column đặc biệt (selection_column, #, command...) => loại bỏ
|
|
1893
|
+
if (meta.showInColumnChoose === false || nonActionColumn.includes(col.id)) return false;
|
|
1893
1894
|
if (inGroup && !('columns' in col && Array.isArray(col.columns))) {
|
|
1894
1895
|
return false;
|
|
1895
1896
|
}
|
|
@@ -1920,6 +1921,15 @@ export const updateColumns1 = (columns, includes) => {
|
|
|
1920
1921
|
if (!column.field) {
|
|
1921
1922
|
return column;
|
|
1922
1923
|
}
|
|
1924
|
+
|
|
1925
|
+
// Bỏ qua column đặc biệt (selection_column, #, command, drag-handle) — giữ nguyên visible
|
|
1926
|
+
// nhưng vẫn phải đệ quy children để không bỏ sót column con
|
|
1927
|
+
if (nonActionColumn.includes(newColumn.field)) {
|
|
1928
|
+
if (newColumn.children) {
|
|
1929
|
+
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
1930
|
+
}
|
|
1931
|
+
return newColumn;
|
|
1932
|
+
}
|
|
1923
1933
|
if (newColumn.children) {
|
|
1924
1934
|
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
1925
1935
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
@@ -11,4 +11,4 @@ const colorDark = '#e6e4f3e6';
|
|
|
11
11
|
export const GridStyle = styled.div.withConfig({
|
|
12
12
|
displayName: "GridStyle",
|
|
13
13
|
componentId: "es-grid-template__sc-rs980s-0"
|
|
14
|
-
})(["&.", "-grid{color:", ";font-size:
|
|
14
|
+
})(["&.", "-grid{color:", ";font-size:12px;background-color:", ";table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";.", "-grid-thead{&:has(.resizer.isResizing){.", "-grid-cell{touch-action:none;user-select:none;}}.", "-grid-cell{background-color:#ffffff;&:has(.resizer.isResizing){touch-action:none;user-select:none;}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}}}tbody{.", "-grid-row{font-weight:500;&.", "-grid-row-parent{.", "-grid-cell{font-weight:700;background-color:#f5f5f5;}}}}.", "-grid-tfoot{z-index:3 !important;.ui-rc-grid-footer-row{.ui-rc-grid-cell{border-top:1px solid ", ";border-bottom:1px solid ", ";font-weight:500;}}}.", "-grid-cell{padding:5px 8px;&.", "-grid-cell-fix-left-last{.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&::after{position:absolute;top:0;right:0;bottom:-1px;width:30px;transform:translateX(100%);transition:box-shadow 0.3s;content:'';pointer-events:none;box-shadow:inset 10px 0 8px -8px rgba(5,5,5,0.09);}}&.", "-grid-cell-fix-right-first{.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&::after{position:absolute;top:0;bottom:-1px;left:0;width:30px;transform:translateX(-100%);transition:box-shadow 0.3s;content:'';pointer-events:none;box-shadow:inset -10px 0 8px -8px rgba(5,5,5,0.09);}&::before{content:'';position:absolute;inset-block:0;inset-inline-start:-1px;border-inline-start:1px solid #e0e0e0;}}&.", "-grid-cell-ellipsis{.group-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}.class-content:has(*){background:lightblue;}.class-content:not(:has(*)){background:lightgreen;}&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-righ{text-align:right;justify-content:flex-end;}}.", "-grid-cell:not(:has(*)){&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{text-align:right;justify-content:flex-end;}&.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "-grid-light{.", "-grid-container{.", "-grid-thead{z-index:3 !important;background-color:", ";font-weight:600;.", "-grid-cell{font-weight:inherit;color:", ";background-color:#ffffff;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-ellipsis{.ui-rc-table-column-title,.", "-grid-cell-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}&.ui-rc-grid-cell-wrap{.ui-rc-table-column-title,.", "-grid-cell-text-wrap{white-space:normal;word-break:break-word;overflow:hidden;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "-grid-filter-column{display:flex;justify-content:space-between;width:100%;align-items:center;position:relative;}.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";}}tbody{background-color:", ";color:", ";.", "-grid-row{&.ui-rc-grid-row-selected{.", "-grid-cell{background-color:", ";}}}.", "-grid-cell{outline:none;background-color:#ffffff;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-selected{background-color:", " !important;}&.disable{background-color:#f0f0f0;}&.cell-editable{user-select:none;&.cell-border-top{&::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:1px solid ", ";pointer-events:none;z-index:1;}}&.cell-border-bottom{border-bottom:1px solid ", ";}&.cell-border-left{&::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:1px solid ", ";pointer-events:none;z-index:1;}}&.cell-border-right{border-inline-end:1px solid ", ";}&.cell-paste-border-top{&::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:1px dashed #949494;pointer-events:none;z-index:1;}&.ui-rc-grid-cell-fix-left-last{&::after{left:-100%;}}&.ui-rc-grid-cell-fix-right-first{&::after{left:100%;}}}&.cell-paste-border-bottom{border-bottom:1px dashed #949494;}&.cell-paste-border-left{&::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:1px dashed #949494;pointer-events:none;z-index:1;}}&.cell-paste-border-right{border-inline-end:1px dashed #949494;}.dragging-point{width:6px;height:6px;position:absolute;cursor:crosshair;right:0px;bottom:0px;&.hidden{display:none;}.dot-point{position:absolute;width:6px;height:6px;border-radius:0px;background-color:", ";bottom:0;right:0;}}}&.cell-editing{padding:0;&:focus-visible{outline:none;}.ant-form-item,.ant-row.ant-form-item-row,.ant-col.ant-form-item-control,.ant-form-item-control-input,.ant-form-item-control-input-content,.ant-input{height:100% !important;&:focus-visible{outline:none;}}textarea.ant-input{line-height:1.8;height:36px !important;min-height:36px !important;}input.be-cell-editing,.ant-picker,.ui-rc-select-selector,.ui-rc-table-select-selector{padding-inline:7px;}.", "-checkbox-wrapper{.", "-checkbox{background-color:red;}.", "-checkbox-input{&:focus-visible{outline:none;}}}.ant-input,.ant-picker{border-radius:0;}.ant-color-picker-trigger{height:100%;border-radius:0;.ant-color-picker-color-block{height:100%;width:100%;}}.", "-table-select-single .", "-table-select-selector,.", "-select-single .", "-select-selector,.ui-rc-table-select-selector{border-radius:0 !important;}.", "-table-select-single:not(.", "-table-select-customize-input){.", "-table-select-selector{.", "-table-select-selection-search-input{height:auto;}}}}}}.", "-grid-tfoot{.", "-grid-footer-row{border-bottom-width:1px;border-bottom-color:", ";border-bottom-style:solid;border-top-width:1px;border-top-color:", ";border-top-style:solid;background-color:#fafafa;}.", "-grid-cell{background-color:inherit;border-inline-end:1px solid ", ";}}}}&.", "-grid-dark{background-color:", ";color:", ";.", "-grid-container{border-color:", ";&::after{border-right-color:", ";}}}}"], props => props.$prefix, color, BgColor, props => props.$prefix, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => props.$prefix, props => `${props.$theme.color ? props.$theme.color : color}`, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => props.$prefix, props => props.$prefix, rowSelectedBg, props => props.$prefix, tableBorderColor, tableBorderColor, cellSelectedBg, borderSelectedColor, borderSelectedColor, borderSelectedColor, borderSelectedColor, borderSelectedColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, tableBorderColor, props => props.$prefix, BgColorDark, colorDark, props => props.$prefix, tableBorderColorDark, tableBorderColorDark);
|
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.convertColumnsToTreeData = convertColumnsToTreeData;
|
|
7
7
|
exports.filterColumnsByField = filterColumnsByField;
|
|
8
8
|
exports.filterVisibleColumns = filterVisibleColumns;
|
|
9
|
+
var _hooks = require("../../grid-component/hooks");
|
|
9
10
|
function convertColumnsToTreeData(columns, groupColumns, t) {
|
|
10
11
|
if (!columns) {
|
|
11
12
|
return [];
|
|
12
13
|
}
|
|
13
14
|
return columns.filter(col => {
|
|
14
15
|
const inGroup = groupColumns ? groupColumns.includes(String(col.field)) : false;
|
|
15
|
-
if (col.showInColumnChoose === false) return false;
|
|
16
|
+
if (col.showInColumnChoose === false || _hooks.nonActionColumn.includes(col.field)) return false;
|
|
16
17
|
if (inGroup && !('children' in col && Array.isArray(col.children))) {
|
|
17
18
|
return false;
|
|
18
19
|
}
|
|
@@ -2031,7 +2031,25 @@ const TableContainerEdit = props => {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
contextMenuClick?.(args);
|
|
2033
2033
|
};
|
|
2034
|
+
|
|
2035
|
+
// Chống fire onCellClick trùng lặp: double-click = 2 lần mousedown nên callback sẽ bị gọi 2 lần.
|
|
2036
|
+
// Chỉ bỏ qua khi click LIÊN TIẾP cùng 1 cell trong khoảng thời gian rất ngắn.
|
|
2037
|
+
const lastCellClickRef = _react.default.useRef({
|
|
2038
|
+
key: '',
|
|
2039
|
+
time: 0
|
|
2040
|
+
});
|
|
2034
2041
|
const handleCellClick = (rowNumber, record, column, rowId, cellValue) => {
|
|
2042
|
+
const clickKey = `${rowId}::${column.field ?? ''}`;
|
|
2043
|
+
const now = Date.now();
|
|
2044
|
+
|
|
2045
|
+
// cùng cell && trong vòng 300ms => coi là double-click, bỏ qua lần lặp
|
|
2046
|
+
if (lastCellClickRef.current.key === clickKey && now - lastCellClickRef.current.time < 300) {
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
lastCellClickRef.current = {
|
|
2050
|
+
key: clickKey,
|
|
2051
|
+
time: now
|
|
2052
|
+
};
|
|
2035
2053
|
const cellClickCallback = newOptions => {
|
|
2036
2054
|
if (newOptions) {
|
|
2037
2055
|
const newElem = {
|
|
@@ -1267,6 +1267,11 @@ const TableBodyCellEdit = props => {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
} else {
|
|
1269
1269
|
handleMouseDown(cell.row.id, cell.column.id);
|
|
1270
|
+
|
|
1271
|
+
// fire onCellClick ngay lần click đầu (trước đây chỉ fire khi cell đã ở trạng thái editing)
|
|
1272
|
+
if (canEdit) {
|
|
1273
|
+
handleCellClick?.(rowNumber, record, columnMeta, record[rowKey], record[columnMeta.field ?? '']);
|
|
1274
|
+
}
|
|
1270
1275
|
if (editingKey) {
|
|
1271
1276
|
setTimeout(() => {
|
|
1272
1277
|
setEditingKey?.('');
|
|
@@ -167,7 +167,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
167
167
|
haveSum?: boolean;
|
|
168
168
|
isSummary?: boolean;
|
|
169
169
|
sumGroup?: boolean;
|
|
170
|
-
summaryTemplate?: (data: number, key: string) => import("react").
|
|
170
|
+
summaryTemplate?: (data: number, key: string) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
171
171
|
sorter?: boolean;
|
|
172
172
|
allowFiltering?: boolean;
|
|
173
173
|
allowSortering?: boolean;
|
|
@@ -179,27 +179,27 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
179
179
|
showFilterSearch?: boolean;
|
|
180
180
|
hidden?: boolean;
|
|
181
181
|
visible?: boolean;
|
|
182
|
-
headerTooltip?: string | boolean | (() => import("react").
|
|
182
|
+
headerTooltip?: string | boolean | (() => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
183
183
|
columnGroupText?: string;
|
|
184
184
|
headerTextAlign?: import("./../../grid-component/type").ITextAlign;
|
|
185
|
-
headerTemplate?: import("react").
|
|
185
|
+
headerTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((column: ColumnTable<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
186
186
|
fixedType?: import("./../../grid-component/type").FixedType;
|
|
187
187
|
headerTextWrap?: boolean;
|
|
188
188
|
ellipsis?: boolean;
|
|
189
189
|
allowResizing?: boolean;
|
|
190
190
|
align?: import("./../../grid-component/type").ITextAlign;
|
|
191
191
|
textAlign?: import("./../../grid-component/type").ITextAlign;
|
|
192
|
-
template?: import("react").
|
|
193
|
-
linkTemplate?: import("react").
|
|
192
|
+
template?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
193
|
+
linkTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
194
194
|
showTooltip?: boolean;
|
|
195
195
|
tooltipDescription?: string | ((args: {
|
|
196
196
|
value: any;
|
|
197
197
|
rowData: RecordType;
|
|
198
|
-
}) => import("react").
|
|
199
|
-
onCellStyles?: Omit<CSSProperties, "
|
|
200
|
-
onCellHeaderStyles?: Omit<CSSProperties, "
|
|
198
|
+
}) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
199
|
+
onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
200
|
+
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
201
201
|
onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
|
|
202
|
-
onCellFooterStyles?: Omit<CSSProperties, "
|
|
202
|
+
onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "minWidth" | "position" | "width">);
|
|
203
203
|
getValue?: (row: any, rowIndex: number) => any;
|
|
204
204
|
getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
|
|
205
205
|
headerCellProps?: import("./../../grid-component/type").CellProps;
|
|
@@ -60,6 +60,7 @@ exports.updateColumnWidthsRecursive = updateColumnWidthsRecursive;
|
|
|
60
60
|
exports.updateColumnsByGroup = exports.updateColumns1 = void 0;
|
|
61
61
|
exports.updateOrInsert = updateOrInsert;
|
|
62
62
|
exports.updateWidthsByOther = updateWidthsByOther;
|
|
63
|
+
var _hooks = require("./../../grid-component/hooks");
|
|
63
64
|
var _uuid = require("uuid");
|
|
64
65
|
var _colors = require("@ant-design/colors");
|
|
65
66
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
@@ -2030,8 +2031,8 @@ function convertColumnsToTreeData(columns, groupColumns) {
|
|
|
2030
2031
|
|
|
2031
2032
|
// Điều kiện filter:
|
|
2032
2033
|
// - Nếu meta.showInColumnChoose = false => loại bỏ
|
|
2033
|
-
// - Nếu
|
|
2034
|
-
if (meta.showInColumnChoose === false) return false;
|
|
2034
|
+
// - Nếu là column đặc biệt (selection_column, #, command...) => loại bỏ
|
|
2035
|
+
if (meta.showInColumnChoose === false || _hooks.nonActionColumn.includes(col.id)) return false;
|
|
2035
2036
|
if (inGroup && !('columns' in col && Array.isArray(col.columns))) {
|
|
2036
2037
|
return false;
|
|
2037
2038
|
}
|
|
@@ -2062,6 +2063,15 @@ const updateColumns1 = (columns, includes) => {
|
|
|
2062
2063
|
if (!column.field) {
|
|
2063
2064
|
return column;
|
|
2064
2065
|
}
|
|
2066
|
+
|
|
2067
|
+
// Bỏ qua column đặc biệt (selection_column, #, command, drag-handle) — giữ nguyên visible
|
|
2068
|
+
// nhưng vẫn phải đệ quy children để không bỏ sót column con
|
|
2069
|
+
if (_hooks.nonActionColumn.includes(newColumn.field)) {
|
|
2070
|
+
if (newColumn.children) {
|
|
2071
|
+
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2072
|
+
}
|
|
2073
|
+
return newColumn;
|
|
2074
|
+
}
|
|
2065
2075
|
if (newColumn.children) {
|
|
2066
2076
|
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2067
2077
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
@@ -2077,7 +2077,25 @@ const TableContainerEdit = props => {
|
|
|
2077
2077
|
}
|
|
2078
2078
|
contextMenuClick?.(args);
|
|
2079
2079
|
};
|
|
2080
|
+
|
|
2081
|
+
// Chống fire onCellClick trùng lặp: double-click = 2 lần mousedown nên callback sẽ bị gọi 2 lần.
|
|
2082
|
+
// Chỉ bỏ qua khi click LIÊN TIẾP cùng 1 cell trong khoảng thời gian rất ngắn.
|
|
2083
|
+
const lastCellClickRef = _react.default.useRef({
|
|
2084
|
+
key: '',
|
|
2085
|
+
time: 0
|
|
2086
|
+
});
|
|
2080
2087
|
const handleCellClick = (rowNumber, record, column, rowId, cellValue) => {
|
|
2088
|
+
const clickKey = `${rowId}::${column.field ?? ''}`;
|
|
2089
|
+
const now = Date.now();
|
|
2090
|
+
|
|
2091
|
+
// cùng cell && trong vòng 300ms => coi là double-click, bỏ qua lần lặp
|
|
2092
|
+
if (lastCellClickRef.current.key === clickKey && now - lastCellClickRef.current.time < 300) {
|
|
2093
|
+
return;
|
|
2094
|
+
}
|
|
2095
|
+
lastCellClickRef.current = {
|
|
2096
|
+
key: clickKey,
|
|
2097
|
+
time: now
|
|
2098
|
+
};
|
|
2081
2099
|
const cellClickCallback = newOptions => {
|
|
2082
2100
|
if (newOptions) {
|
|
2083
2101
|
const newElem = {
|
|
@@ -1349,6 +1349,11 @@ const TableBodyCellEdit = props => {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
} else {
|
|
1351
1351
|
handleMouseDown(cell.row.id, cell.column.id);
|
|
1352
|
+
|
|
1353
|
+
// fire onCellClick ngay lần click đầu (trước đây chỉ fire khi cell đã ở trạng thái editing)
|
|
1354
|
+
if (canEdit) {
|
|
1355
|
+
handleCellClick?.(rowNumber, record, columnMeta, record[rowKey], record[columnMeta.field ?? '']);
|
|
1356
|
+
}
|
|
1352
1357
|
if (editingKey) {
|
|
1353
1358
|
setTimeout(() => {
|
|
1354
1359
|
setEditingKey?.('');
|
|
@@ -2625,9 +2625,8 @@ function convertColumnsToTreeData(columns, groupColumns) {
|
|
|
2625
2625
|
|
|
2626
2626
|
// Điều kiện filter:
|
|
2627
2627
|
// - Nếu meta.showInColumnChoose = false => loại bỏ
|
|
2628
|
-
// - Nếu
|
|
2629
|
-
|
|
2630
|
-
if (meta.showInColumnChoose === false) return false;
|
|
2628
|
+
// - Nếu là column đặc biệt (selection_column, #, command...) => loại bỏ
|
|
2629
|
+
if (meta.showInColumnChoose === false || _hooks.nonActionColumn.includes(col.id)) return false;
|
|
2631
2630
|
// if (inGroup && !('columns' in col && Array.isArray((col as any).columns))) {
|
|
2632
2631
|
if (inGroup && !('columns' in col && Array.isArray(col.columns))) {
|
|
2633
2632
|
return false;
|
|
@@ -2659,6 +2658,15 @@ const updateColumns1 = (columns, includes) => {
|
|
|
2659
2658
|
if (!column.field) {
|
|
2660
2659
|
return column;
|
|
2661
2660
|
}
|
|
2661
|
+
|
|
2662
|
+
// Bỏ qua column đặc biệt (selection_column, #, command, drag-handle) — giữ nguyên visible
|
|
2663
|
+
// nhưng vẫn phải đệ quy children để không bỏ sót column con
|
|
2664
|
+
if (_hooks.nonActionColumn.includes(newColumn.field)) {
|
|
2665
|
+
if (newColumn.children) {
|
|
2666
|
+
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2667
|
+
}
|
|
2668
|
+
return newColumn;
|
|
2669
|
+
}
|
|
2662
2670
|
if (newColumn.children) {
|
|
2663
2671
|
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2664
2672
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
@@ -114,6 +114,17 @@ const Grid = props => {
|
|
|
114
114
|
pageSize: pagination && pagination?.pageSize ? pagination.pageSize : 20,
|
|
115
115
|
...paginationState
|
|
116
116
|
} : undefined,
|
|
117
|
+
// ...(infiniteScroll
|
|
118
|
+
// ? {}
|
|
119
|
+
// : {
|
|
120
|
+
// pagination: {
|
|
121
|
+
// // @ts-ignore
|
|
122
|
+
// pageIndex: pagination?.currentPage ? pagination.currentPage - 1 : 0,
|
|
123
|
+
// // @ts-ignore
|
|
124
|
+
// pageSize: pagination?.pageSize ?? 20,
|
|
125
|
+
// ...paginationState,
|
|
126
|
+
// },
|
|
127
|
+
// }),
|
|
117
128
|
grouping,
|
|
118
129
|
columnSizing,
|
|
119
130
|
columnOrder,
|
|
@@ -172,8 +183,13 @@ const Grid = props => {
|
|
|
172
183
|
return Array.isArray(row.original.children);
|
|
173
184
|
},
|
|
174
185
|
getExpandedRowModel: (0, _reactTable.getExpandedRowModel)(),
|
|
175
|
-
|
|
176
|
-
|
|
186
|
+
...(pagination && !infiniteScroll && {
|
|
187
|
+
getPaginationRowModel: (0, _reactTable.getPaginationRowModel)(),
|
|
188
|
+
onPaginationChange: setPagination
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
// getPaginationRowModel: pagination && !infiniteScroll ? getPaginationRowModel() : undefined,
|
|
192
|
+
// onPaginationChange: pagination && !infiniteScroll ? setPagination : undefined,
|
|
177
193
|
|
|
178
194
|
// onColumnVisibilityChange: setColumnVisibility,
|
|
179
195
|
// onColumnPinningChange,
|
|
@@ -66,6 +66,7 @@ exports.updateColumnWidthsRecursive = updateColumnWidthsRecursive;
|
|
|
66
66
|
exports.updateColumnsByGroup = exports.updateColumns1 = void 0;
|
|
67
67
|
exports.updateOrInsert = updateOrInsert;
|
|
68
68
|
exports.updateWidthsByOther = updateWidthsByOther;
|
|
69
|
+
var _hooks = require("../../grid-component/hooks");
|
|
69
70
|
var _useSelection = require("rc-master-ui/es/table/hooks/useSelection");
|
|
70
71
|
var _uuid = require("uuid");
|
|
71
72
|
var _colors = require("@ant-design/colors");
|
|
@@ -2010,8 +2011,8 @@ function convertColumnsToTreeData(columns, groupColumns) {
|
|
|
2010
2011
|
|
|
2011
2012
|
// Điều kiện filter:
|
|
2012
2013
|
// - Nếu meta.showInColumnChoose = false => loại bỏ
|
|
2013
|
-
// - Nếu
|
|
2014
|
-
if (meta.showInColumnChoose === false) return false;
|
|
2014
|
+
// - Nếu là column đặc biệt (selection_column, #, command...) => loại bỏ
|
|
2015
|
+
if (meta.showInColumnChoose === false || _hooks.nonActionColumn.includes(col.id)) return false;
|
|
2015
2016
|
if (inGroup && !('columns' in col && Array.isArray(col.columns))) {
|
|
2016
2017
|
return false;
|
|
2017
2018
|
}
|
|
@@ -2042,6 +2043,15 @@ const updateColumns1 = (columns, includes) => {
|
|
|
2042
2043
|
if (!column.field) {
|
|
2043
2044
|
return column;
|
|
2044
2045
|
}
|
|
2046
|
+
|
|
2047
|
+
// Bỏ qua column đặc biệt (selection_column, #, command, drag-handle) — giữ nguyên visible
|
|
2048
|
+
// nhưng vẫn phải đệ quy children để không bỏ sót column con
|
|
2049
|
+
if (_hooks.nonActionColumn.includes(newColumn.field)) {
|
|
2050
|
+
if (newColumn.children) {
|
|
2051
|
+
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2052
|
+
}
|
|
2053
|
+
return newColumn;
|
|
2054
|
+
}
|
|
2045
2055
|
if (newColumn.children) {
|
|
2046
2056
|
newColumn.children = updateColumns1(newColumn.children, includes);
|
|
2047
2057
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
@@ -18,4 +18,4 @@ const colorDark = '#e6e4f3e6';
|
|
|
18
18
|
const GridStyle = exports.GridStyle = _styledComponents.default.div.withConfig({
|
|
19
19
|
displayName: "GridStyle",
|
|
20
20
|
componentId: "es-grid-template__sc-rs980s-0"
|
|
21
|
-
})(["&.", "-grid{color:", ";font-size:
|
|
21
|
+
})(["&.", "-grid{color:", ";font-size:12px;background-color:", ";table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";.", "-grid-thead{&:has(.resizer.isResizing){.", "-grid-cell{touch-action:none;user-select:none;}}.", "-grid-cell{background-color:#ffffff;&:has(.resizer.isResizing){touch-action:none;user-select:none;}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}}}tbody{.", "-grid-row{font-weight:500;&.", "-grid-row-parent{.", "-grid-cell{font-weight:700;background-color:#f5f5f5;}}}}.", "-grid-tfoot{z-index:3 !important;.ui-rc-grid-footer-row{.ui-rc-grid-cell{border-top:1px solid ", ";border-bottom:1px solid ", ";font-weight:500;}}}.", "-grid-cell{padding:5px 8px;&.", "-grid-cell-fix-left-last{.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&::after{position:absolute;top:0;right:0;bottom:-1px;width:30px;transform:translateX(100%);transition:box-shadow 0.3s;content:'';pointer-events:none;box-shadow:inset 10px 0 8px -8px rgba(5,5,5,0.09);}}&.", "-grid-cell-fix-right-first{.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&::after{position:absolute;top:0;bottom:-1px;left:0;width:30px;transform:translateX(-100%);transition:box-shadow 0.3s;content:'';pointer-events:none;box-shadow:inset -10px 0 8px -8px rgba(5,5,5,0.09);}&::before{content:'';position:absolute;inset-block:0;inset-inline-start:-1px;border-inline-start:1px solid #e0e0e0;}}&.", "-grid-cell-ellipsis{.group-content{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}.class-content:has(*){background:lightblue;}.class-content:not(:has(*)){background:lightgreen;}&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-righ{text-align:right;justify-content:flex-end;}}.", "-grid-cell:not(:has(*)){&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{text-align:right;justify-content:flex-end;}&.", "-grid-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "-grid-light{.", "-grid-container{.", "-grid-thead{z-index:3 !important;background-color:", ";font-weight:600;.", "-grid-cell{font-weight:inherit;color:", ";background-color:#ffffff;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-ellipsis{.ui-rc-table-column-title,.", "-grid-cell-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}&.ui-rc-grid-cell-wrap{.ui-rc-table-column-title,.", "-grid-cell-text-wrap{white-space:normal;word-break:break-word;overflow:hidden;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "-grid-filter-column{display:flex;justify-content:space-between;width:100%;align-items:center;position:relative;}.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}.resizer{cursor:col-resize;height:100%;position:absolute;right:0;top:0;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";}}tbody{background-color:", ";color:", ";.", "-grid-row{&.ui-rc-grid-row-selected{.", "-grid-cell{background-color:", ";}}}.", "-grid-cell{outline:none;background-color:#ffffff;border-inline-end:1px solid ", ";border-bottom:1px solid ", ";&.ui-rc-grid-cell-selected{background-color:", " !important;}&.disable{background-color:#f0f0f0;}&.cell-editable{user-select:none;&.cell-border-top{&::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:1px solid ", ";pointer-events:none;z-index:1;}}&.cell-border-bottom{border-bottom:1px solid ", ";}&.cell-border-left{&::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:1px solid ", ";pointer-events:none;z-index:1;}}&.cell-border-right{border-inline-end:1px solid ", ";}&.cell-paste-border-top{&::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:1px dashed #949494;pointer-events:none;z-index:1;}&.ui-rc-grid-cell-fix-left-last{&::after{left:-100%;}}&.ui-rc-grid-cell-fix-right-first{&::after{left:100%;}}}&.cell-paste-border-bottom{border-bottom:1px dashed #949494;}&.cell-paste-border-left{&::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:1px dashed #949494;pointer-events:none;z-index:1;}}&.cell-paste-border-right{border-inline-end:1px dashed #949494;}.dragging-point{width:6px;height:6px;position:absolute;cursor:crosshair;right:0px;bottom:0px;&.hidden{display:none;}.dot-point{position:absolute;width:6px;height:6px;border-radius:0px;background-color:", ";bottom:0;right:0;}}}&.cell-editing{padding:0;&:focus-visible{outline:none;}.ant-form-item,.ant-row.ant-form-item-row,.ant-col.ant-form-item-control,.ant-form-item-control-input,.ant-form-item-control-input-content,.ant-input{height:100% !important;&:focus-visible{outline:none;}}textarea.ant-input{line-height:1.8;height:36px !important;min-height:36px !important;}input.be-cell-editing,.ant-picker,.ui-rc-select-selector,.ui-rc-table-select-selector{padding-inline:7px;}.", "-checkbox-wrapper{.", "-checkbox{background-color:red;}.", "-checkbox-input{&:focus-visible{outline:none;}}}.ant-input,.ant-picker{border-radius:0;}.ant-color-picker-trigger{height:100%;border-radius:0;.ant-color-picker-color-block{height:100%;width:100%;}}.", "-table-select-single .", "-table-select-selector,.", "-select-single .", "-select-selector,.ui-rc-table-select-selector{border-radius:0 !important;}.", "-table-select-single:not(.", "-table-select-customize-input){.", "-table-select-selector{.", "-table-select-selection-search-input{height:auto;}}}}}}.", "-grid-tfoot{.", "-grid-footer-row{border-bottom-width:1px;border-bottom-color:", ";border-bottom-style:solid;border-top-width:1px;border-top-color:", ";border-top-style:solid;background-color:#fafafa;}.", "-grid-cell{background-color:inherit;border-inline-end:1px solid ", ";}}}}&.", "-grid-dark{background-color:", ";color:", ";.", "-grid-container{border-color:", ";&::after{border-right-color:", ";}}}}"], props => props.$prefix, color, BgColor, props => props.$prefix, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => props.$prefix, props => `${props.$theme.color ? props.$theme.color : color}`, tableBorderColor, tableBorderColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, props => props.$prefix, props => props.$prefix, rowSelectedBg, props => props.$prefix, tableBorderColor, tableBorderColor, cellSelectedBg, borderSelectedColor, borderSelectedColor, borderSelectedColor, borderSelectedColor, borderSelectedColor, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, props => props.$prefix, tableBorderColor, tableBorderColor, props => props.$prefix, tableBorderColor, props => props.$prefix, BgColorDark, colorDark, props => props.$prefix, tableBorderColorDark, tableBorderColorDark);
|