es-grid-template 1.9.51 → 1.9.52
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.d.ts +2 -2
- package/es/group-component/hook/utils.d.ts +5 -5
- package/es/table-component/TableContainerEdit.js +65 -55
- package/es/table-component/hook/useColumns.js +1 -0
- package/es/table-component/hook/utils.js +1 -0
- package/es/table-component/style.js +1 -1
- package/lib/ali-table/utils/convertColumnsChoose.d.ts +2 -2
- package/lib/table-component/TableContainerEdit.js +63 -54
- package/lib/table-component/hook/useColumns.js +1 -0
- package/lib/table-component/hook/utils.js +1 -0
- package/lib/table-component/style.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TreeDataNode } from "antd";
|
|
2
|
-
import { ColumnTable } from "../../grid-component";
|
|
1
|
+
import type { TreeDataNode } from "antd";
|
|
2
|
+
import type { ColumnTable } from "../../grid-component";
|
|
3
3
|
export declare function convertColumnsToTreeData(columns: ColumnTable[], groupColumns?: string[], t?: any): TreeDataNode[];
|
|
4
4
|
export declare function filterColumnsByField(columns: ColumnTable[], fieldList: string[]): ColumnTable[];
|
|
5
5
|
export declare function filterVisibleColumns(columns: ColumnTable[]): ColumnTable[];
|
|
@@ -166,7 +166,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
166
166
|
haveSum?: boolean;
|
|
167
167
|
isSummary?: boolean;
|
|
168
168
|
sumGroup?: boolean;
|
|
169
|
-
summaryTemplate?: (data: number, key: string) => import("react").
|
|
169
|
+
summaryTemplate?: (data: number, key: string) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
170
170
|
sorter?: boolean;
|
|
171
171
|
allowFiltering?: boolean;
|
|
172
172
|
allowSortering?: boolean;
|
|
@@ -178,22 +178,22 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
178
178
|
showFilterSearch?: boolean;
|
|
179
179
|
hidden?: boolean;
|
|
180
180
|
visible?: boolean;
|
|
181
|
-
headerTooltip?: string | boolean | (() => import("react").
|
|
181
|
+
headerTooltip?: string | boolean | (() => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
182
182
|
columnGroupText?: string;
|
|
183
183
|
headerTextAlign?: import("./../../grid-component/type").ITextAlign;
|
|
184
|
-
headerTemplate?: import("react").
|
|
184
|
+
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>>);
|
|
185
185
|
fixedType?: import("./../../grid-component/type").FixedType;
|
|
186
186
|
headerTextWrap?: boolean;
|
|
187
187
|
ellipsis?: boolean;
|
|
188
188
|
allowResizing?: boolean;
|
|
189
189
|
align?: import("./../../grid-component/type").ITextAlign;
|
|
190
190
|
textAlign?: import("./../../grid-component/type").ITextAlign;
|
|
191
|
-
template?: import("react").
|
|
191
|
+
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>>);
|
|
192
192
|
showTooltip?: boolean;
|
|
193
193
|
tooltipDescription?: string | ((args: {
|
|
194
194
|
value: any;
|
|
195
195
|
rowData: RecordType;
|
|
196
|
-
}) => import("react").
|
|
196
|
+
}) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
|
|
197
197
|
onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
|
|
198
198
|
onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
|
|
199
199
|
onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
|
|
@@ -3,7 +3,8 @@ import React, { Fragment } from "react";
|
|
|
3
3
|
import { useCopyToClipboard } from 'usehooks-ts';
|
|
4
4
|
import { checkDecimalSeparator, checkThousandSeparator,
|
|
5
5
|
// convertDateToDayjs,
|
|
6
|
-
detectSeparators, findItemByKey, flattenArray, flattenData, getAllRowKey, getColIdsBetween,
|
|
6
|
+
detectSeparators, findItemByKey, flattenArray, flattenData, getAllRowKey, getColIdsBetween,
|
|
7
|
+
// getDatepickerFormat,
|
|
7
8
|
// getDatepickerFormat,
|
|
8
9
|
getDefaultValue, getEditType, getFormat, getRowIdsBetween, getSelectedCellMatrix, getTableHeight, isDateValue, isEditable, isEmpty, isFormattedNumber, newGuid, parseExcelClipboard,
|
|
9
10
|
// parseExcelClipboardText,
|
|
@@ -256,39 +257,6 @@ const TableContainerEdit = props => {
|
|
|
256
257
|
const rowsFocus = React.useMemo(() => {
|
|
257
258
|
return startCell && endCell ? getRowIdsBetween(table, startCell.rowId, endCell.rowId) : [];
|
|
258
259
|
}, [endCell, startCell, table]);
|
|
259
|
-
const copySelectionToClipboard = React.useCallback(() => {
|
|
260
|
-
if (!startCell || !endCell) {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// const allRows = table.getRowModel().rows;
|
|
265
|
-
const allRows = table.getRowModel().flatRows;
|
|
266
|
-
// const allColumns = table.getAllLeafColumns();
|
|
267
|
-
|
|
268
|
-
const rowIds = getRowIdsBetween(table, startCell.rowId, endCell.rowId);
|
|
269
|
-
const colIds = getColIdsBetween(table, startCell.colId, endCell.colId);
|
|
270
|
-
const dataToCopy = [];
|
|
271
|
-
rowIds.forEach(rowId => {
|
|
272
|
-
const row = allRows.find(r => r.id === rowId);
|
|
273
|
-
if (!row) return;
|
|
274
|
-
const rowData = [];
|
|
275
|
-
colIds.forEach(colId => {
|
|
276
|
-
const cellll = row.getVisibleCells().find(c => c.column.id === colId);
|
|
277
|
-
const value = cellll?.getValue();
|
|
278
|
-
rowData.push(value !== undefined ? String(value) : '');
|
|
279
|
-
});
|
|
280
|
-
dataToCopy.push(rowData);
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
// Convert to TSV string
|
|
284
|
-
const tsv = dataToCopy.map(row => row.join('\t')).join('\n');
|
|
285
|
-
|
|
286
|
-
// Copy to clipboard
|
|
287
|
-
// navigator.clipboard.writeText(tsv).then(() => {
|
|
288
|
-
// });
|
|
289
|
-
|
|
290
|
-
copy(tsv).then(() => {}).catch(() => {});
|
|
291
|
-
}, [startCell, endCell, table]);
|
|
292
260
|
const triggerChangeData = React.useCallback((newData, args) => {
|
|
293
261
|
onDataChange?.(newData, args);
|
|
294
262
|
}, [onDataChange, dataSource]);
|
|
@@ -329,6 +297,55 @@ const TableContainerEdit = props => {
|
|
|
329
297
|
});
|
|
330
298
|
}
|
|
331
299
|
}, [onCellPaste, originData, triggerChangeData]);
|
|
300
|
+
|
|
301
|
+
// Copy
|
|
302
|
+
|
|
303
|
+
const copySelectionToClipboard = React.useCallback(() => {
|
|
304
|
+
if (!startCell || !endCell) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// const allRows = table.getRowModel().rows;
|
|
309
|
+
const allRows = table.getRowModel().flatRows;
|
|
310
|
+
// const allColumns = table.getAllLeafColumns();
|
|
311
|
+
|
|
312
|
+
const rowIds = getRowIdsBetween(table, startCell.rowId, endCell.rowId);
|
|
313
|
+
const colIds = getColIdsBetween(table, startCell.colId, endCell.colId);
|
|
314
|
+
const dataToCopy = [];
|
|
315
|
+
rowIds.forEach(rowId => {
|
|
316
|
+
const row = allRows.find(r => r.id === rowId);
|
|
317
|
+
if (!row) return;
|
|
318
|
+
const rowData = [];
|
|
319
|
+
colIds.forEach(colId => {
|
|
320
|
+
const cellll = row.getVisibleCells().find(c => c.column.id === colId);
|
|
321
|
+
const value = cellll?.getValue();
|
|
322
|
+
rowData.push(value !== undefined ? String(value) : '');
|
|
323
|
+
});
|
|
324
|
+
dataToCopy.push(rowData);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// Convert to TSV string
|
|
328
|
+
const tsv = dataToCopy.map(row => row.join('\t')).join('\n');
|
|
329
|
+
|
|
330
|
+
// Copy to clipboard
|
|
331
|
+
// navigator.clipboard.writeText(tsv).then(() => {
|
|
332
|
+
// });
|
|
333
|
+
|
|
334
|
+
copy(tsv).then(() => {}).catch(() => {});
|
|
335
|
+
}, [startCell, endCell, table]);
|
|
336
|
+
React.useEffect(() => {
|
|
337
|
+
const handleKeyDown = e => {
|
|
338
|
+
if (e.ctrlKey && e.key === 'c' && startCell && endCell && !editingKey) {
|
|
339
|
+
e.preventDefault();
|
|
340
|
+
copySelectionToClipboard();
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
344
|
+
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
345
|
+
}, [startCell, endCell, table, copySelectionToClipboard, editingKey]);
|
|
346
|
+
|
|
347
|
+
// Paste
|
|
348
|
+
|
|
332
349
|
const handlePasted = React.useCallback(pasteData => {
|
|
333
350
|
if (!startCell) {
|
|
334
351
|
return;
|
|
@@ -336,7 +353,8 @@ const TableContainerEdit = props => {
|
|
|
336
353
|
const rows = pasteData.slice(0, onCellPaste?.maxRowsPaste ?? 200);
|
|
337
354
|
|
|
338
355
|
// const allRows = table.getRowModel().rows;
|
|
339
|
-
const
|
|
356
|
+
const flatRows = table.getRowModel().flatRows;
|
|
357
|
+
const allRows = flatRows.filter((item, index, self) => index === self.findIndex(x => x.id === item.id));
|
|
340
358
|
const allCols = table.getVisibleLeafColumns();
|
|
341
359
|
const startRowIdx = allRows.findIndex(r => r.id === startCell.rowId);
|
|
342
360
|
const startColIdx = allCols.findIndex(c => c.id === startCell.colId);
|
|
@@ -360,7 +378,7 @@ const TableContainerEdit = props => {
|
|
|
360
378
|
const targetRow = startRow + rowIndex;
|
|
361
379
|
|
|
362
380
|
// Nếu vượt quá số dòng hiện có, thêm dòng mới
|
|
363
|
-
if (targetRow
|
|
381
|
+
if (targetRow > newData.length) {
|
|
364
382
|
const newID = newGuid();
|
|
365
383
|
const defaultRowValue = getDefaultValue(defaultValue);
|
|
366
384
|
newData.push(defaultValue ? {
|
|
@@ -524,11 +542,17 @@ const TableContainerEdit = props => {
|
|
|
524
542
|
}
|
|
525
543
|
} else if (columnOri.type === 'data' || columnOri.type === 'datatime' || columnOri.editType === 'date' || columnOri.editType === 'datetime') {
|
|
526
544
|
const isDate = isDateValue(cellValue.trim());
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
const
|
|
545
|
+
|
|
546
|
+
// const colFormat = typeof columnOri?.format === 'function' ? columnOri?.format(record) : columnOri?.format
|
|
547
|
+
// const cellFormat = getFormat(colFormat, format)
|
|
548
|
+
|
|
549
|
+
// const editType = getEditType(columnOri as any)
|
|
550
|
+
|
|
551
|
+
// const dateFormat = getDatepickerFormat(editType, cellFormat)
|
|
552
|
+
|
|
553
|
+
// const date = isDate && !isEmpty(cellValue.trim()) ? moment(cellValue.trim(), dateFormat).format("YYYY-MM-DDTHH:mm:ssZ") : null
|
|
554
|
+
|
|
555
|
+
const date = isDate && !isEmpty(cellValue.trim()) ? moment(cellValue.trim()).format() : null;
|
|
532
556
|
childData[targetRow] = {
|
|
533
557
|
...childData[targetRow],
|
|
534
558
|
[columnKey]: date
|
|
@@ -603,20 +627,6 @@ const TableContainerEdit = props => {
|
|
|
603
627
|
handlePasted(rowsPasted);
|
|
604
628
|
}
|
|
605
629
|
}, [handlePasted, onCellPaste?.maxRowsPaste, startCell]);
|
|
606
|
-
|
|
607
|
-
// Copy
|
|
608
|
-
React.useEffect(() => {
|
|
609
|
-
const handleKeyDown = e => {
|
|
610
|
-
if (e.ctrlKey && e.key === 'c' && startCell && endCell && !editingKey) {
|
|
611
|
-
e.preventDefault();
|
|
612
|
-
copySelectionToClipboard();
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
616
|
-
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
617
|
-
}, [startCell, endCell, table, copySelectionToClipboard, editingKey]);
|
|
618
|
-
|
|
619
|
-
// Paste
|
|
620
630
|
React.useEffect(() => {
|
|
621
631
|
const handlePaste = e => {
|
|
622
632
|
if (startCell && !editingKey) {
|
|
@@ -39,6 +39,7 @@ export const renderValueCell = (column, value, record, rowIndex, colIndex, forma
|
|
|
39
39
|
return value ? dayjs(value).format(format?.dateFormat ?? 'DD/MM/YYYY') : '';
|
|
40
40
|
case 'time':
|
|
41
41
|
const timeFormat = format?.timeFormat;
|
|
42
|
+
console.log('timeFormat', timeFormat);
|
|
42
43
|
const abc = convertToDate(value, timeFormat);
|
|
43
44
|
const timeValue = value ? dayjs(abc).format(timeFormat ?? 'HH:mm') : '';
|
|
44
45
|
return timeValue ?? '';
|
|
@@ -194,6 +194,7 @@ export const convertToDate = (value, format) => {
|
|
|
194
194
|
}
|
|
195
195
|
const valueType = getDateValueType(value);
|
|
196
196
|
if (valueType === 'time') {
|
|
197
|
+
// const date = dayjs(value, format ? [format, 'HH:mm:ss', 'HH:mm' ] : ['HH:mm:ss', 'HH:mm'], true);
|
|
197
198
|
const date = dayjs(value, format ?? ['HH:mm:ss', 'HH:mm'], true);
|
|
198
199
|
return date.isValid() ? moment(date.toDate()).format() : '';
|
|
199
200
|
}
|
|
@@ -48,4 +48,4 @@ const colorDark = '#e6e4f3e6 ';
|
|
|
48
48
|
export const GridStyle = styled.div.withConfig({
|
|
49
49
|
displayName: "GridStyle",
|
|
50
50
|
componentId: "es-grid-template__sc-hdqm5k-0"
|
|
51
|
-
})(["&.", "-grid{color:", ";font-size:", ";background-color:", ";font-family:", ";&.", "-grid-editable{.", "-grid-container{.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";&.", "-grid-row-parent{background-color:#ffffff;font-weight:500;}}}}}table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";border-right:0;&::after{position:absolute;top:0px;right:0;z-index:1;height:100%;border-right:1px solid ", ";content:'';pointer-events:none;}.", "-grid-cell{padding:5px 8px;&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{justify-content:flex-end;text-align:right;}&.", "-grid-cell-ellipsis{.ui-rc_cell-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;&.select-cell{padding-right:18px;position:relative;}.caret-down{float:right;position:absolute;right:0;&::before{content:'';display:inline-block;margin-left:4px;vertical-align:middle;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #6f7777;}}}}&.", "-grid-cell-wrap{white-space:normal;text-overflow:ellipsis;word-break:break-word;}.", "-grid-header-text-wrap{white-space:normal;overflow:hidden;text-overflow:ellipsis;word-break:break-word;}}.", "-grid-thead{background-color:", ";font-weight:", ";.", "-grid-cell{font-weight:inherit;color:", ";background-color:inherit;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;z-index:3;}.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;z-index:3;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{font-weight:", ";background-color:", ";color:", ";&.", "-grid-row-odd{background-color:#f9f8fd;}&.", "-grid-row-even{}&.", "-grid-row-parent{background-color:#f5f5f5;font-weight:500;}}}.", "-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:", ";}}}.ui-rc-toolbar-bottom{border-right:1px solid #e0e0e0;border-left:1px solid #e0e0e0;.be-toolbar-item{.ui-rc-btn{font-size:12px;}.toolbar-dropdown-button{font-size:12px;.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-color:#28c76f;}.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-color:#28c76f;.ui-rc-btn-icon{color:#28c76f;}}}}}.ui-rc-toolbar-bottom_border-bottom{border-bottom:1px solid #e0e0e0;}.ui-rc-toolbar-bottom{position:relative;padding:.15rem 0.5rem;background-color:#ffffff;.toolbar-button{border-radius:3px;}.ui-rc-btn{border-radius:3px;height:28px;&.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-start-start-radius:0;border-end-start-radius:0;}&.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-start-end-radius:0;border-end-end-radius:0;}}}}"], props => props.$prefix, color, fontSize, BgColor, fontFamily, 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.$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.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, fwHeader, 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, fwBody, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, 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);
|
|
51
|
+
})(["&.", "-grid{color:", ";font-size:", ";background-color:", ";font-family:", ";&.", "-grid-editable{.", "-grid-container{.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";&.", "-grid-row-parent{background-color:#ffffff;font-weight:500;}}}}}table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";border-right:0;&::after{position:absolute;top:0px;right:0;z-index:1;height:100%;border-right:1px solid ", ";content:'';pointer-events:none;}.", "-grid-cell{padding:5px 8px;&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{justify-content:flex-end;text-align:right;}&.", "-grid-cell-ellipsis{.ui-rc_cell-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;&.select-cell{padding-right:18px;position:relative;}.caret-down{float:right;position:absolute;right:0;&::before{content:'';display:inline-block;margin-left:4px;vertical-align:middle;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #6f7777;}}}}&.", "-grid-cell-wrap{white-space:normal;text-overflow:ellipsis;word-break:break-word;}.", "-grid-header-text-wrap{white-space:normal;overflow:hidden;text-overflow:ellipsis;word-break:break-word;}}.", "-grid-thead{background-color:", ";font-weight:", ";.", "-grid-cell{font-weight:inherit;color:", ";background-color:inherit;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;z-index:3;}.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;z-index:3;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{font-weight:", ";background-color:", ";color:", ";&.", "-grid-row-odd{background-color:#f9f8fd;}&.", "-grid-row-even{}&.", "-grid-row-parent{background-color:#f5f5f5;font-weight:500;}}}.", "-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:", ";}}}.ui-rc-toolbar-bottom{border-right:1px solid #e0e0e0;border-left:1px solid #e0e0e0;.be-toolbar-item{.ui-rc-btn{font-size:12px;line-height:1.5}.toolbar-dropdown-button{font-size:12px;.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-color:#28c76f;}.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-color:#28c76f;.ui-rc-btn-icon{color:#28c76f;}}}}}.ui-rc-toolbar-bottom_border-bottom{border-bottom:1px solid #e0e0e0;}.ui-rc-toolbar-bottom{position:relative;padding:.15rem 0.5rem;background-color:#ffffff;.toolbar-button{border-radius:3px;}.ui-rc-btn{border-radius:3px;height:28px;&.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-start-start-radius:0;border-end-start-radius:0;}&.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-start-end-radius:0;border-end-end-radius:0;}}}}"], props => props.$prefix, color, fontSize, BgColor, fontFamily, 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.$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.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, fwHeader, 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, fwBody, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, 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);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TreeDataNode } from "antd";
|
|
2
|
-
import { ColumnTable } from "../../grid-component";
|
|
1
|
+
import type { TreeDataNode } from "antd";
|
|
2
|
+
import type { ColumnTable } from "../../grid-component";
|
|
3
3
|
export declare function convertColumnsToTreeData(columns: ColumnTable[], groupColumns?: string[], t?: any): TreeDataNode[];
|
|
4
4
|
export declare function filterColumnsByField(columns: ColumnTable[], fieldList: string[]): ColumnTable[];
|
|
5
5
|
export declare function filterVisibleColumns(columns: ColumnTable[]): ColumnTable[];
|
|
@@ -257,39 +257,6 @@ const TableContainerEdit = props => {
|
|
|
257
257
|
const rowsFocus = _react.default.useMemo(() => {
|
|
258
258
|
return startCell && endCell ? (0, _utils.getRowIdsBetween)(table, startCell.rowId, endCell.rowId) : [];
|
|
259
259
|
}, [endCell, startCell, table]);
|
|
260
|
-
const copySelectionToClipboard = _react.default.useCallback(() => {
|
|
261
|
-
if (!startCell || !endCell) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// const allRows = table.getRowModel().rows;
|
|
266
|
-
const allRows = table.getRowModel().flatRows;
|
|
267
|
-
// const allColumns = table.getAllLeafColumns();
|
|
268
|
-
|
|
269
|
-
const rowIds = (0, _utils.getRowIdsBetween)(table, startCell.rowId, endCell.rowId);
|
|
270
|
-
const colIds = (0, _utils.getColIdsBetween)(table, startCell.colId, endCell.colId);
|
|
271
|
-
const dataToCopy = [];
|
|
272
|
-
rowIds.forEach(rowId => {
|
|
273
|
-
const row = allRows.find(r => r.id === rowId);
|
|
274
|
-
if (!row) return;
|
|
275
|
-
const rowData = [];
|
|
276
|
-
colIds.forEach(colId => {
|
|
277
|
-
const cellll = row.getVisibleCells().find(c => c.column.id === colId);
|
|
278
|
-
const value = cellll?.getValue();
|
|
279
|
-
rowData.push(value !== undefined ? String(value) : '');
|
|
280
|
-
});
|
|
281
|
-
dataToCopy.push(rowData);
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
// Convert to TSV string
|
|
285
|
-
const tsv = dataToCopy.map(row => row.join('\t')).join('\n');
|
|
286
|
-
|
|
287
|
-
// Copy to clipboard
|
|
288
|
-
// navigator.clipboard.writeText(tsv).then(() => {
|
|
289
|
-
// });
|
|
290
|
-
|
|
291
|
-
copy(tsv).then(() => {}).catch(() => {});
|
|
292
|
-
}, [startCell, endCell, table]);
|
|
293
260
|
const triggerChangeData = _react.default.useCallback((newData, args) => {
|
|
294
261
|
onDataChange?.(newData, args);
|
|
295
262
|
}, [onDataChange, dataSource]);
|
|
@@ -330,6 +297,55 @@ const TableContainerEdit = props => {
|
|
|
330
297
|
});
|
|
331
298
|
}
|
|
332
299
|
}, [onCellPaste, originData, triggerChangeData]);
|
|
300
|
+
|
|
301
|
+
// Copy
|
|
302
|
+
|
|
303
|
+
const copySelectionToClipboard = _react.default.useCallback(() => {
|
|
304
|
+
if (!startCell || !endCell) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// const allRows = table.getRowModel().rows;
|
|
309
|
+
const allRows = table.getRowModel().flatRows;
|
|
310
|
+
// const allColumns = table.getAllLeafColumns();
|
|
311
|
+
|
|
312
|
+
const rowIds = (0, _utils.getRowIdsBetween)(table, startCell.rowId, endCell.rowId);
|
|
313
|
+
const colIds = (0, _utils.getColIdsBetween)(table, startCell.colId, endCell.colId);
|
|
314
|
+
const dataToCopy = [];
|
|
315
|
+
rowIds.forEach(rowId => {
|
|
316
|
+
const row = allRows.find(r => r.id === rowId);
|
|
317
|
+
if (!row) return;
|
|
318
|
+
const rowData = [];
|
|
319
|
+
colIds.forEach(colId => {
|
|
320
|
+
const cellll = row.getVisibleCells().find(c => c.column.id === colId);
|
|
321
|
+
const value = cellll?.getValue();
|
|
322
|
+
rowData.push(value !== undefined ? String(value) : '');
|
|
323
|
+
});
|
|
324
|
+
dataToCopy.push(rowData);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// Convert to TSV string
|
|
328
|
+
const tsv = dataToCopy.map(row => row.join('\t')).join('\n');
|
|
329
|
+
|
|
330
|
+
// Copy to clipboard
|
|
331
|
+
// navigator.clipboard.writeText(tsv).then(() => {
|
|
332
|
+
// });
|
|
333
|
+
|
|
334
|
+
copy(tsv).then(() => {}).catch(() => {});
|
|
335
|
+
}, [startCell, endCell, table]);
|
|
336
|
+
_react.default.useEffect(() => {
|
|
337
|
+
const handleKeyDown = e => {
|
|
338
|
+
if (e.ctrlKey && e.key === 'c' && startCell && endCell && !editingKey) {
|
|
339
|
+
e.preventDefault();
|
|
340
|
+
copySelectionToClipboard();
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
344
|
+
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
345
|
+
}, [startCell, endCell, table, copySelectionToClipboard, editingKey]);
|
|
346
|
+
|
|
347
|
+
// Paste
|
|
348
|
+
|
|
333
349
|
const handlePasted = _react.default.useCallback(pasteData => {
|
|
334
350
|
if (!startCell) {
|
|
335
351
|
return;
|
|
@@ -337,7 +353,8 @@ const TableContainerEdit = props => {
|
|
|
337
353
|
const rows = pasteData.slice(0, onCellPaste?.maxRowsPaste ?? 200);
|
|
338
354
|
|
|
339
355
|
// const allRows = table.getRowModel().rows;
|
|
340
|
-
const
|
|
356
|
+
const flatRows = table.getRowModel().flatRows;
|
|
357
|
+
const allRows = flatRows.filter((item, index, self) => index === self.findIndex(x => x.id === item.id));
|
|
341
358
|
const allCols = table.getVisibleLeafColumns();
|
|
342
359
|
const startRowIdx = allRows.findIndex(r => r.id === startCell.rowId);
|
|
343
360
|
const startColIdx = allCols.findIndex(c => c.id === startCell.colId);
|
|
@@ -361,7 +378,7 @@ const TableContainerEdit = props => {
|
|
|
361
378
|
const targetRow = startRow + rowIndex;
|
|
362
379
|
|
|
363
380
|
// Nếu vượt quá số dòng hiện có, thêm dòng mới
|
|
364
|
-
if (targetRow
|
|
381
|
+
if (targetRow > newData.length) {
|
|
365
382
|
const newID = (0, _utils.newGuid)();
|
|
366
383
|
const defaultRowValue = (0, _utils.getDefaultValue)(defaultValue);
|
|
367
384
|
newData.push(defaultValue ? {
|
|
@@ -525,11 +542,17 @@ const TableContainerEdit = props => {
|
|
|
525
542
|
}
|
|
526
543
|
} else if (columnOri.type === 'data' || columnOri.type === 'datatime' || columnOri.editType === 'date' || columnOri.editType === 'datetime') {
|
|
527
544
|
const isDate = (0, _utils.isDateValue)(cellValue.trim());
|
|
528
|
-
|
|
529
|
-
const
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
const
|
|
545
|
+
|
|
546
|
+
// const colFormat = typeof columnOri?.format === 'function' ? columnOri?.format(record) : columnOri?.format
|
|
547
|
+
// const cellFormat = getFormat(colFormat, format)
|
|
548
|
+
|
|
549
|
+
// const editType = getEditType(columnOri as any)
|
|
550
|
+
|
|
551
|
+
// const dateFormat = getDatepickerFormat(editType, cellFormat)
|
|
552
|
+
|
|
553
|
+
// const date = isDate && !isEmpty(cellValue.trim()) ? moment(cellValue.trim(), dateFormat).format("YYYY-MM-DDTHH:mm:ssZ") : null
|
|
554
|
+
|
|
555
|
+
const date = isDate && !(0, _utils.isEmpty)(cellValue.trim()) ? (0, _moment.default)(cellValue.trim()).format() : null;
|
|
533
556
|
childData[targetRow] = {
|
|
534
557
|
...childData[targetRow],
|
|
535
558
|
[columnKey]: date
|
|
@@ -604,20 +627,6 @@ const TableContainerEdit = props => {
|
|
|
604
627
|
handlePasted(rowsPasted);
|
|
605
628
|
}
|
|
606
629
|
}, [handlePasted, onCellPaste?.maxRowsPaste, startCell]);
|
|
607
|
-
|
|
608
|
-
// Copy
|
|
609
|
-
_react.default.useEffect(() => {
|
|
610
|
-
const handleKeyDown = e => {
|
|
611
|
-
if (e.ctrlKey && e.key === 'c' && startCell && endCell && !editingKey) {
|
|
612
|
-
e.preventDefault();
|
|
613
|
-
copySelectionToClipboard();
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
617
|
-
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
618
|
-
}, [startCell, endCell, table, copySelectionToClipboard, editingKey]);
|
|
619
|
-
|
|
620
|
-
// Paste
|
|
621
630
|
_react.default.useEffect(() => {
|
|
622
631
|
const handlePaste = e => {
|
|
623
632
|
if (startCell && !editingKey) {
|
|
@@ -49,6 +49,7 @@ const renderValueCell = (column, value, record, rowIndex, colIndex, format, edit
|
|
|
49
49
|
return value ? (0, _dayjs.default)(value).format(format?.dateFormat ?? 'DD/MM/YYYY') : '';
|
|
50
50
|
case 'time':
|
|
51
51
|
const timeFormat = format?.timeFormat;
|
|
52
|
+
console.log('timeFormat', timeFormat);
|
|
52
53
|
const abc = (0, _utils.convertToDate)(value, timeFormat);
|
|
53
54
|
const timeValue = value ? (0, _dayjs.default)(abc).format(timeFormat ?? 'HH:mm') : '';
|
|
54
55
|
return timeValue ?? '';
|
|
@@ -277,6 +277,7 @@ const convertToDate = (value, format) => {
|
|
|
277
277
|
}
|
|
278
278
|
const valueType = getDateValueType(value);
|
|
279
279
|
if (valueType === 'time') {
|
|
280
|
+
// const date = dayjs(value, format ? [format, 'HH:mm:ss', 'HH:mm' ] : ['HH:mm:ss', 'HH:mm'], true);
|
|
280
281
|
const date = (0, _dayjs.default)(value, format ?? ['HH:mm:ss', 'HH:mm'], true);
|
|
281
282
|
return date.isValid() ? (0, _moment.default)(date.toDate()).format() : '';
|
|
282
283
|
}
|
|
@@ -55,4 +55,4 @@ const colorDark = '#e6e4f3e6 ';
|
|
|
55
55
|
const GridStyle = exports.GridStyle = _styledComponents.default.div.withConfig({
|
|
56
56
|
displayName: "GridStyle",
|
|
57
57
|
componentId: "es-grid-template__sc-hdqm5k-0"
|
|
58
|
-
})(["&.", "-grid{color:", ";font-size:", ";background-color:", ";font-family:", ";&.", "-grid-editable{.", "-grid-container{.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";&.", "-grid-row-parent{background-color:#ffffff;font-weight:500;}}}}}table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";border-right:0;&::after{position:absolute;top:0px;right:0;z-index:1;height:100%;border-right:1px solid ", ";content:'';pointer-events:none;}.", "-grid-cell{padding:5px 8px;&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{justify-content:flex-end;text-align:right;}&.", "-grid-cell-ellipsis{.ui-rc_cell-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;&.select-cell{padding-right:18px;position:relative;}.caret-down{float:right;position:absolute;right:0;&::before{content:'';display:inline-block;margin-left:4px;vertical-align:middle;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #6f7777;}}}}&.", "-grid-cell-wrap{white-space:normal;text-overflow:ellipsis;word-break:break-word;}.", "-grid-header-text-wrap{white-space:normal;overflow:hidden;text-overflow:ellipsis;word-break:break-word;}}.", "-grid-thead{background-color:", ";font-weight:", ";.", "-grid-cell{font-weight:inherit;color:", ";background-color:inherit;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;z-index:3;}.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;z-index:3;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{font-weight:", ";background-color:", ";color:", ";&.", "-grid-row-odd{background-color:#f9f8fd;}&.", "-grid-row-even{}&.", "-grid-row-parent{background-color:#f5f5f5;font-weight:500;}}}.", "-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:", ";}}}.ui-rc-toolbar-bottom{border-right:1px solid #e0e0e0;border-left:1px solid #e0e0e0;.be-toolbar-item{.ui-rc-btn{font-size:12px;}.toolbar-dropdown-button{font-size:12px;.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-color:#28c76f;}.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-color:#28c76f;.ui-rc-btn-icon{color:#28c76f;}}}}}.ui-rc-toolbar-bottom_border-bottom{border-bottom:1px solid #e0e0e0;}.ui-rc-toolbar-bottom{position:relative;padding:.15rem 0.5rem;background-color:#ffffff;.toolbar-button{border-radius:3px;}.ui-rc-btn{border-radius:3px;height:28px;&.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-start-start-radius:0;border-end-start-radius:0;}&.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-start-end-radius:0;border-end-end-radius:0;}}}}"], props => props.$prefix, color, fontSize, BgColor, fontFamily, 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.$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.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, fwHeader, 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, fwBody, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, 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);
|
|
58
|
+
})(["&.", "-grid{color:", ";font-size:", ";background-color:", ";font-family:", ";&.", "-grid-editable{.", "-grid-container{.", "-grid-tbody{.", "-grid-row{background-color:", ";color:", ";&.", "-grid-row-parent{background-color:#ffffff;font-weight:500;}}}}}table{table-layout:fixed;border-collapse:separate;border-spacing:0;}.", "-grid-container{border:1px solid ", ";border-right:0;&::after{position:absolute;top:0px;right:0;z-index:1;height:100%;border-right:1px solid ", ";content:'';pointer-events:none;}.", "-grid-cell{padding:5px 8px;&.", "-grid-cell-text-center{text-align:center;justify-content:center;}&.", "-grid-cell-text-right{justify-content:flex-end;text-align:right;}&.", "-grid-cell-ellipsis{.ui-rc_cell-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;&.select-cell{padding-right:18px;position:relative;}.caret-down{float:right;position:absolute;right:0;&::before{content:'';display:inline-block;margin-left:4px;vertical-align:middle;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #6f7777;}}}}&.", "-grid-cell-wrap{white-space:normal;text-overflow:ellipsis;word-break:break-word;}.", "-grid-header-text-wrap{white-space:normal;overflow:hidden;text-overflow:ellipsis;word-break:break-word;}}.", "-grid-thead{background-color:", ";font-weight:", ";.", "-grid-cell{font-weight:inherit;color:", ";background-color:inherit;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;z-index:3;}.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;z-index:3;touch-action:none;user-select:none;width:5px;}.resizer.isResizing{opacity:1;}}}.", "-grid-tbody{.", "-grid-row{font-weight:", ";background-color:", ";color:", ";&.", "-grid-row-odd{background-color:#f9f8fd;}&.", "-grid-row-even{}&.", "-grid-row-parent{background-color:#f5f5f5;font-weight:500;}}}.", "-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:", ";}}}.ui-rc-toolbar-bottom{border-right:1px solid #e0e0e0;border-left:1px solid #e0e0e0;.be-toolbar-item{.ui-rc-btn{font-size:12px;line-height:1.5}.toolbar-dropdown-button{font-size:12px;.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-color:#28c76f;}.ui-rc-btn.ui-rc-btn-default.ui-rc-btn-variant-outlined.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-color:#28c76f;.ui-rc-btn-icon{color:#28c76f;}}}}}.ui-rc-toolbar-bottom_border-bottom{border-bottom:1px solid #e0e0e0;}.ui-rc-toolbar-bottom{position:relative;padding:.15rem 0.5rem;background-color:#ffffff;.toolbar-button{border-radius:3px;}.ui-rc-btn{border-radius:3px;height:28px;&.ui-rc-btn-compact-item.ui-rc-btn-compact-last-item{border-start-start-radius:0;border-end-start-radius:0;}&.ui-rc-btn-compact-item.ui-rc-btn-compact-first-item{border-start-end-radius:0;border-end-end-radius:0;}}}}"], props => props.$prefix, color, fontSize, BgColor, fontFamily, 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.$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.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, fwHeader, 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, fwBody, props => `${props.$theme.backgroundColor ? props.$theme.backgroundColor : BgColor}`, props => `${props.$theme.color ? props.$theme.color : color}`, 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);
|