es-grid-template 1.9.71 → 1.9.73
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/Grid.d.ts +2 -1
- package/es/ali-table/Grid.js +12 -5
- package/es/ali-table/InternalTable.js +45 -94
- package/es/ali-table/base-table/cell/HeaderEditCell.js +4 -1
- package/es/ali-table/base-table/renderFilter.js +13 -5
- package/es/ali-table/base-table/styles.d.ts +6 -0
- package/es/ali-table/base-table/styles.js +5 -2
- package/es/ali-table/pipeline/features/columnCustom.d.ts +1 -0
- package/es/ali-table/pipeline/features/columnCustom.js +38 -25
- package/es/ali-table/pipeline/features/hiddenColumns.d.ts +1 -0
- package/es/ali-table/pipeline/features/hiddenColumns.js +9 -3
- package/es/ali-table/pipeline/features/treeSelect.js +3 -3
- package/es/ali-table/utils/constants.d.ts +3 -1
- package/es/ali-table/utils/constants.js +5 -2
- package/es/ali-table/utils/utility.d.ts +1 -0
- package/es/ali-table/utils/utility.js +8 -1
- package/es/grid-component/hooks/constant.js +4 -0
- package/es/group-component/hook/useColumns.js +2 -2
- package/es/group-component/hook/utils.d.ts +3 -3
- package/es/group-component/hook/utils.js +3 -0
- package/es/table-component/ColumnsConfig.js +6 -4
- package/es/table-component/TableContainer.js +1 -0
- package/es/table-component/TableContainerEdit.js +1 -0
- package/es/table-component/hook/utils.js +3 -0
- package/es/table-component/table/Grid.js +2 -2
- package/es/table-component/table/TableWrapper.js +97 -33
- package/es/table-virtuoso/hook/utils.js +3 -0
- package/lib/ali-table/Grid.d.ts +2 -1
- package/lib/ali-table/Grid.js +12 -4
- package/lib/ali-table/InternalTable.js +45 -94
- package/lib/ali-table/base-table/cell/HeaderEditCell.js +4 -1
- package/lib/ali-table/base-table/renderFilter.js +13 -5
- package/lib/ali-table/base-table/styles.d.ts +6 -0
- package/lib/ali-table/base-table/styles.js +5 -2
- package/lib/ali-table/pipeline/features/columnCustom.d.ts +1 -0
- package/lib/ali-table/pipeline/features/columnCustom.js +38 -25
- package/lib/ali-table/pipeline/features/hiddenColumns.d.ts +1 -0
- package/lib/ali-table/pipeline/features/hiddenColumns.js +9 -3
- package/lib/ali-table/pipeline/features/treeSelect.js +3 -3
- package/lib/ali-table/utils/constants.d.ts +3 -1
- package/lib/ali-table/utils/constants.js +6 -3
- package/lib/ali-table/utils/utility.d.ts +1 -0
- package/lib/ali-table/utils/utility.js +10 -2
- package/lib/grid-component/hooks/constant.js +4 -0
- package/lib/group-component/hook/useColumns.js +2 -2
- package/lib/group-component/hook/utils.js +3 -0
- package/lib/table-component/ColumnsConfig.js +6 -4
- package/lib/table-component/TableContainer.js +1 -0
- package/lib/table-component/TableContainerEdit.js +1 -0
- package/lib/table-component/hook/utils.js +3 -0
- package/lib/table-component/table/Grid.js +2 -2
- package/lib/table-component/table/TableWrapper.js +97 -33
- package/lib/table-virtuoso/hook/utils.js +3 -0
- package/package.json +1 -1
package/es/ali-table/Grid.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ declare const Grid: React.ForwardRefExoticComponent<Omit<TableProps, "useVirtual
|
|
|
12
12
|
pipeline: TablePipeline;
|
|
13
13
|
originData: any[];
|
|
14
14
|
originColumns: any[];
|
|
15
|
-
setVisibleKeys: Dispatch<SetStateAction<any>>;
|
|
16
15
|
useVirtual?: VirtualEnum | {
|
|
17
16
|
horizontal?: VirtualEnum;
|
|
18
17
|
vertical?: VirtualEnum;
|
|
@@ -22,5 +21,7 @@ declare const Grid: React.ForwardRefExoticComponent<Omit<TableProps, "useVirtual
|
|
|
22
21
|
toolbarItemTopRight?: ToolbarItem[];
|
|
23
22
|
toolbarItemsTop?: ToolbarItem[];
|
|
24
23
|
toolbarItemsBottom?: ToolbarItem[];
|
|
24
|
+
isDataTree?: boolean;
|
|
25
|
+
setColumns: Dispatch<SetStateAction<any>>;
|
|
25
26
|
} & React.RefAttributes<BaseTable>>;
|
|
26
27
|
export default Grid;
|
package/es/ali-table/Grid.js
CHANGED
|
@@ -19,7 +19,7 @@ import { StyleTableContainer } from "./base-table/styles";
|
|
|
19
19
|
import { ColumnsConfig } from "../table-component/ColumnsConfig";
|
|
20
20
|
import { convertFlatColumn1 } from "../table-component/hook/utils";
|
|
21
21
|
import { getVisibleColumnFields } from "./utils/utility";
|
|
22
|
-
|
|
22
|
+
import { stateKeyVisibleKeys } from "./utils/constants";
|
|
23
23
|
// import { StyleTableContainer } from "./base-table/styles";
|
|
24
24
|
|
|
25
25
|
const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -55,9 +55,11 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
55
55
|
onRowStyles,
|
|
56
56
|
showColumnChoose,
|
|
57
57
|
originColumns,
|
|
58
|
+
striped,
|
|
59
|
+
isDataTree,
|
|
58
60
|
// columns,
|
|
59
61
|
groupColumns,
|
|
60
|
-
setVisibleKeys,
|
|
62
|
+
// setVisibleKeys,
|
|
61
63
|
footerDataSource,
|
|
62
64
|
loading,
|
|
63
65
|
useVirtual,
|
|
@@ -69,7 +71,8 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
69
71
|
toolbarItemsBottom,
|
|
70
72
|
toolbarItemTopRight,
|
|
71
73
|
toolbarItemsTop,
|
|
72
|
-
onChooseColumns
|
|
74
|
+
onChooseColumns,
|
|
75
|
+
setColumns
|
|
73
76
|
} = props;
|
|
74
77
|
const {
|
|
75
78
|
cssVariables
|
|
@@ -160,12 +163,14 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
160
163
|
}, []);
|
|
161
164
|
const triggerChangeColumns = (cols, keys, type) => {
|
|
162
165
|
const abc = getVisibleColumnFields(cols);
|
|
163
|
-
setVisibleKeys(abc)
|
|
166
|
+
// setVisibleKeys(abc)
|
|
167
|
+
pipeline.setStateAtKey(stateKeyVisibleKeys, abc);
|
|
164
168
|
if (type === 'cellClick') {
|
|
165
169
|
|
|
166
170
|
// setColumns(cols)
|
|
167
171
|
} else {
|
|
168
|
-
|
|
172
|
+
console.log('setColumns');
|
|
173
|
+
setColumns(cols);
|
|
169
174
|
// pipeline.columns(cols)
|
|
170
175
|
|
|
171
176
|
// const aa = flatColumns2(columns).map((it) => it.field)
|
|
@@ -344,6 +349,8 @@ const Grid = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
344
349
|
...prevRowProps,
|
|
345
350
|
className: classNames(``, {
|
|
346
351
|
[`${prefix}-grid-row-parent`]: row.children && row.children.length > 0 || Array.isArray(row.children),
|
|
352
|
+
[`${prefix}-grid-row-odd`]: !editAble && !isDataTree && striped && rowIndex % 2 === 1,
|
|
353
|
+
[`${prefix}-grid-row-even`]: !editAble && !isDataTree && striped && rowIndex % 2 === 0,
|
|
347
354
|
'no-hover': editAble
|
|
348
355
|
}),
|
|
349
356
|
style: {
|
|
@@ -126,11 +126,22 @@ const InternalTable = props => {
|
|
|
126
126
|
document.removeEventListener('resize', handleWindowResize);
|
|
127
127
|
};
|
|
128
128
|
}, []);
|
|
129
|
-
|
|
129
|
+
|
|
130
|
+
// const [visibleKeys, setVisibleKeys] = React.useState(undefined)
|
|
131
|
+
|
|
130
132
|
const [filterState, setFilterState] = React.useState(undefined);
|
|
131
133
|
const [sortState, setSortState] = React.useState(undefined);
|
|
132
|
-
const columns = React.
|
|
133
|
-
|
|
134
|
+
const [columns, setColumns] = React.useState([]);
|
|
135
|
+
|
|
136
|
+
// const columns = React.useMemo(() => {
|
|
137
|
+
|
|
138
|
+
// return sortByType(propColumns, rowDnd)
|
|
139
|
+
|
|
140
|
+
// }, [propColumns, rowDnd])
|
|
141
|
+
|
|
142
|
+
React.useEffect(() => {
|
|
143
|
+
const abc = sortByType(propColumns, rowDnd);
|
|
144
|
+
setColumns(abc);
|
|
134
145
|
}, [propColumns, rowDnd]);
|
|
135
146
|
const convertData = React.useMemo(() => {
|
|
136
147
|
if (groupAble && groupSetting && groupSetting.client !== false) {
|
|
@@ -139,8 +150,8 @@ const InternalTable = props => {
|
|
|
139
150
|
return addRowIdArray(dataSource);
|
|
140
151
|
}, [dataSource, groupAble, groupColumns, groupSetting]);
|
|
141
152
|
const isDataTree = React.useMemo(() => {
|
|
142
|
-
return isTreeArray(
|
|
143
|
-
}, [
|
|
153
|
+
return isTreeArray(convertData);
|
|
154
|
+
}, [convertData]);
|
|
144
155
|
const mergedData = React.useMemo(() => {
|
|
145
156
|
const shouldSkip = onFilter && onSorter;
|
|
146
157
|
if (shouldSkip) {
|
|
@@ -177,7 +188,11 @@ const InternalTable = props => {
|
|
|
177
188
|
return undefined;
|
|
178
189
|
}, [defaultFilter]);
|
|
179
190
|
const columnVisibility = React.useMemo(() => {
|
|
180
|
-
|
|
191
|
+
const visibleCols = getVisibleFields(columns);
|
|
192
|
+
|
|
193
|
+
// const rs = groupAble && groupColumns && groupColumns.length > 0 ? getOnlyInA(visibleCols, groupColumns) : visibleCols
|
|
194
|
+
|
|
195
|
+
return visibleCols;
|
|
181
196
|
}, [columns]);
|
|
182
197
|
const dataIds = React.useMemo(() => convertData.map(it => it.rowId), [convertData]);
|
|
183
198
|
const isAddAble = React.useMemo(() => {
|
|
@@ -487,9 +502,12 @@ const InternalTable = props => {
|
|
|
487
502
|
}).primaryKey(rowKey)
|
|
488
503
|
// .mapDataSource((dta) => collectNodes(dta, 'pre'))
|
|
489
504
|
// .snapshot('flat')
|
|
490
|
-
.use(features.
|
|
505
|
+
.use(features.paginationFeature({
|
|
506
|
+
pagination
|
|
507
|
+
})).use(features.hiddenColumns({
|
|
491
508
|
columns,
|
|
492
|
-
visibleKeys:
|
|
509
|
+
visibleKeys: columnVisibility,
|
|
510
|
+
groupColumns: groupAble ? groupColumns : undefined
|
|
493
511
|
})).use(features.treeSelect({
|
|
494
512
|
tree: mergedData,
|
|
495
513
|
value: selectionSettings?.selectedRowKeys,
|
|
@@ -528,12 +546,15 @@ const InternalTable = props => {
|
|
|
528
546
|
stopClickEventPropagation: true,
|
|
529
547
|
expandIconColumnIndex: expandable?.expandIconColumnIndex,
|
|
530
548
|
defaultOpenKeys: expandAllKeys ?? expandable?.defaultExpandedRowKeys,
|
|
531
|
-
isTreeArray: !!isDataTree
|
|
549
|
+
isTreeArray: !!isDataTree,
|
|
550
|
+
iconGap: 6,
|
|
551
|
+
iconIndent: 0
|
|
532
552
|
})).use(features.columnCustom({
|
|
533
553
|
tableRef,
|
|
534
554
|
id: tableId,
|
|
535
555
|
t,
|
|
536
556
|
columns,
|
|
557
|
+
groupColumns,
|
|
537
558
|
mode: sortMultiple !== false ? 'multiple' : 'single',
|
|
538
559
|
dataSource: convertData,
|
|
539
560
|
rowIndexMap,
|
|
@@ -552,6 +573,7 @@ const InternalTable = props => {
|
|
|
552
573
|
isDataTree,
|
|
553
574
|
defaultFilter: defaultFilterConvert,
|
|
554
575
|
defaultSorter,
|
|
576
|
+
format,
|
|
555
577
|
onFilter(val) {
|
|
556
578
|
// const rs =
|
|
557
579
|
|
|
@@ -588,10 +610,12 @@ const InternalTable = props => {
|
|
|
588
610
|
onCellClick,
|
|
589
611
|
handleAddMulti,
|
|
590
612
|
handleCellChangeAndAddRow
|
|
591
|
-
})).use(features.paginationFeature({
|
|
592
|
-
pagination
|
|
593
613
|
}));
|
|
594
614
|
|
|
615
|
+
// .use(features.paginationFeature({
|
|
616
|
+
// pagination
|
|
617
|
+
// }))
|
|
618
|
+
|
|
595
619
|
// const editingCell = pipeline.getStateAtKey(stateKeyIsEditing)
|
|
596
620
|
|
|
597
621
|
// const onResizeEnd = (args: any[]) => {
|
|
@@ -1357,84 +1381,6 @@ const InternalTable = props => {
|
|
|
1357
1381
|
handlePasted(rowsPasted);
|
|
1358
1382
|
}
|
|
1359
1383
|
}, [handlePasted, onCellPaste?.maxRowsPaste, startCell]);
|
|
1360
|
-
|
|
1361
|
-
// const handleDeleteContent = () => {
|
|
1362
|
-
|
|
1363
|
-
// if (startCell && endCell) {
|
|
1364
|
-
|
|
1365
|
-
// const tmpData = flattenArray([...convertData])
|
|
1366
|
-
|
|
1367
|
-
// const rs = tmpData.map((row, index: number) => {
|
|
1368
|
-
|
|
1369
|
-
// if (!rangeState?.rowRange.includes(row.rowId)) {
|
|
1370
|
-
// return row
|
|
1371
|
-
// }
|
|
1372
|
-
|
|
1373
|
-
// const updatedRow = { ...row }
|
|
1374
|
-
|
|
1375
|
-
// for (const colId of rangeState.colRange) {
|
|
1376
|
-
|
|
1377
|
-
// const column = leafColumns.find((it) => it.field === colId)
|
|
1378
|
-
// const columnIndex = leafColumns.findIndex((it) => it.field === colId)
|
|
1379
|
-
|
|
1380
|
-
// if (isEditable(column as any, row)) {
|
|
1381
|
-
|
|
1382
|
-
// let newValue: any = ''
|
|
1383
|
-
|
|
1384
|
-
// if (column.type === 'number') {
|
|
1385
|
-
// newValue = 0
|
|
1386
|
-
// }
|
|
1387
|
-
|
|
1388
|
-
// if (column.type === 'boolean' || column.type === 'checkbox') {
|
|
1389
|
-
// newValue = false
|
|
1390
|
-
// }
|
|
1391
|
-
|
|
1392
|
-
// const editType = getEditType(column as any, row)
|
|
1393
|
-
|
|
1394
|
-
// if (column.type === 'date' ||
|
|
1395
|
-
// column.type === 'datetime' ||
|
|
1396
|
-
// column.type === 'time' ||
|
|
1397
|
-
// column.type === 'month' ||
|
|
1398
|
-
// column.type === 'week' ||
|
|
1399
|
-
// column.type === 'year' ||
|
|
1400
|
-
// column.type === 'quarter' ||
|
|
1401
|
-
// editType === 'asyncSelect' ||
|
|
1402
|
-
// editType === 'select' ||
|
|
1403
|
-
// editType === 'treeSelect' ||
|
|
1404
|
-
// editType === 'selectTable'
|
|
1405
|
-
// ) {
|
|
1406
|
-
// newValue = undefined
|
|
1407
|
-
// }
|
|
1408
|
-
|
|
1409
|
-
// updatedRow[colId] = newValue
|
|
1410
|
-
|
|
1411
|
-
// handleCellChange({
|
|
1412
|
-
// key: row[rowKey] as any,
|
|
1413
|
-
// field: column.field ?? column.dataIndex as any,
|
|
1414
|
-
// record: updatedRow,
|
|
1415
|
-
// prevState: row[column.field],
|
|
1416
|
-
// newState: newValue,
|
|
1417
|
-
// option: '',
|
|
1418
|
-
// indexCol: columnIndex,
|
|
1419
|
-
// indexRow: index,
|
|
1420
|
-
// type: 'blur'
|
|
1421
|
-
// }
|
|
1422
|
-
// )
|
|
1423
|
-
|
|
1424
|
-
// }
|
|
1425
|
-
// }
|
|
1426
|
-
|
|
1427
|
-
// return updatedRow;
|
|
1428
|
-
// })
|
|
1429
|
-
|
|
1430
|
-
// const newData = unFlattenData(rs)
|
|
1431
|
-
|
|
1432
|
-
// triggerChangeData?.([...newData], { type: 'DELETE_CONTENT' })
|
|
1433
|
-
|
|
1434
|
-
// }
|
|
1435
|
-
|
|
1436
|
-
// }
|
|
1437
|
-
|
|
1438
1384
|
React.useEffect(() => {
|
|
1439
1385
|
const handlePaste = e => {
|
|
1440
1386
|
if (startCell && !isEditing) {
|
|
@@ -2039,8 +1985,9 @@ const InternalTable = props => {
|
|
|
2039
1985
|
originData: convertData,
|
|
2040
1986
|
dataSource: mergedData,
|
|
2041
1987
|
originColumns: columns,
|
|
2042
|
-
groupColumns: groupColumns
|
|
2043
|
-
|
|
1988
|
+
groupColumns: groupColumns
|
|
1989
|
+
// setVisibleKeys={setVisibleKeys}
|
|
1990
|
+
,
|
|
2044
1991
|
footerDataSource: footerData,
|
|
2045
1992
|
onFilter: onFilter,
|
|
2046
1993
|
onSorter: onSorter,
|
|
@@ -2048,10 +1995,12 @@ const InternalTable = props => {
|
|
|
2048
1995
|
defaultSorter: defaultSorter,
|
|
2049
1996
|
dataRowIds: dataIds,
|
|
2050
1997
|
columns: columns,
|
|
1998
|
+
setColumns: setColumns,
|
|
2051
1999
|
editAble: editAble,
|
|
2052
2000
|
toolbarItemTopRight: toolbarItemTopRight,
|
|
2053
2001
|
toolbarItemsTop: toolbarItemsTop,
|
|
2054
|
-
toolbarItemsBottom: toolbarItemsBottom
|
|
2002
|
+
toolbarItemsBottom: toolbarItemsBottom,
|
|
2003
|
+
isDataTree: isDataTree
|
|
2055
2004
|
})), /*#__PURE__*/React.createElement(Modal, {
|
|
2056
2005
|
open: isFullScreen,
|
|
2057
2006
|
footer: null,
|
|
@@ -2096,11 +2045,13 @@ const InternalTable = props => {
|
|
|
2096
2045
|
,
|
|
2097
2046
|
|
|
2098
2047
|
columns: columns,
|
|
2048
|
+
setColumns: setColumns,
|
|
2099
2049
|
dataSource: dataSource,
|
|
2100
2050
|
originData: convertData,
|
|
2101
2051
|
originColumns: columns,
|
|
2102
|
-
groupColumns: groupColumns
|
|
2103
|
-
|
|
2052
|
+
groupColumns: groupColumns
|
|
2053
|
+
// setVisibleKeys={setVisibleKeys}
|
|
2054
|
+
,
|
|
2104
2055
|
footerDataSource: footerData,
|
|
2105
2056
|
onFilter: onFilter,
|
|
2106
2057
|
onSorter: onSorter,
|
|
@@ -1237,7 +1237,10 @@ const HeaderEditCell = props => {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
};
|
|
1239
1239
|
return /*#__PURE__*/React.createElement("form", {
|
|
1240
|
-
onSubmit: handleSubmit(onSubmit)
|
|
1240
|
+
onSubmit: handleSubmit(onSubmit),
|
|
1241
|
+
style: {
|
|
1242
|
+
height: '100%'
|
|
1243
|
+
}
|
|
1241
1244
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
1242
1245
|
name: dataIndex,
|
|
1243
1246
|
control: control,
|
|
@@ -286,21 +286,29 @@ export const renderFilter = args => {
|
|
|
286
286
|
|
|
287
287
|
// value={selectedKeys[0]}
|
|
288
288
|
,
|
|
289
|
-
defaultValue: selectedKeys[0]
|
|
289
|
+
defaultValue: selectedKeys[0] ?? ''
|
|
290
290
|
|
|
291
|
-
// onChange={(e) =>
|
|
291
|
+
// onChange={(e) => {
|
|
292
|
+
// if (selectedKeys[0] === e.target.value) {
|
|
293
|
+
|
|
294
|
+
// } else {
|
|
295
|
+
// setSelectedKeys(e.target.value ? [e.target.value] : [])
|
|
296
|
+
// }
|
|
297
|
+
|
|
298
|
+
// }}
|
|
292
299
|
,
|
|
300
|
+
|
|
293
301
|
onBlur: e => {
|
|
294
302
|
if (selectedKeys[0] === e.target.value) {} else {
|
|
295
|
-
setSelectedKeys(e.target.value ? [e.target.value
|
|
303
|
+
setSelectedKeys(e.target.value ? [e.target.value] : []);
|
|
296
304
|
}
|
|
297
305
|
}
|
|
298
306
|
|
|
299
307
|
// onPressEnter={() => handleSearch(selectedKeys as string[], confirm)}
|
|
300
308
|
,
|
|
301
309
|
onPressEnter: () => doFilter?.(true),
|
|
302
|
-
allowClear: true
|
|
303
|
-
|
|
310
|
+
allowClear: true,
|
|
311
|
+
autoFocus: true
|
|
304
312
|
}))));
|
|
305
313
|
}
|
|
306
314
|
};
|
|
@@ -14,6 +14,9 @@ export declare const Classes: {
|
|
|
14
14
|
readonly tableFooter: "ui-rc-grid-table-footer";
|
|
15
15
|
/** Table row */
|
|
16
16
|
readonly tableRow: "ui-rc-grid-table-row";
|
|
17
|
+
readonly tableRowParent: "ui-rc-grid-row-parent";
|
|
18
|
+
readonly tableRowOdd: "ui-rc-grid-row-odd";
|
|
19
|
+
readonly tableRowEven: "ui-rc-grid-row-even";
|
|
17
20
|
/** Table header row */
|
|
18
21
|
readonly tableHeaderRow: "ui-rc-grid-table-header-row";
|
|
19
22
|
/** Cell */
|
|
@@ -45,6 +48,9 @@ export declare const Classes: {
|
|
|
45
48
|
export type BaseTableCSSVariables = Partial<{
|
|
46
49
|
/** Table row height */
|
|
47
50
|
'--row-height': string;
|
|
51
|
+
'--row-odd-bgcolor': string;
|
|
52
|
+
'--row-even-bgcolor': string;
|
|
53
|
+
'--row-parent-bgcolor': string;
|
|
48
54
|
/** Table font color */
|
|
49
55
|
'--color': string;
|
|
50
56
|
/** Table hover font color */
|
|
@@ -20,6 +20,9 @@ export const Classes = {
|
|
|
20
20
|
tableFooter: `${prefix}table-footer`,
|
|
21
21
|
/** Table row */
|
|
22
22
|
tableRow: `${prefix}table-row`,
|
|
23
|
+
tableRowParent: `${prefix}row-parent`,
|
|
24
|
+
tableRowOdd: `${prefix}row-odd`,
|
|
25
|
+
tableRowEven: `${prefix}row-even`,
|
|
23
26
|
/** Table header row */
|
|
24
27
|
tableHeaderRow: `${prefix}table-header-row`,
|
|
25
28
|
/** Cell */
|
|
@@ -60,11 +63,11 @@ const outerBorderStyleMixin = css(["border-top:var(--cell-border-horizontal);bor
|
|
|
60
63
|
export const StyleTableContainer = styled.div.withConfig({
|
|
61
64
|
displayName: "StyleTableContainer",
|
|
62
65
|
componentId: "es-grid-template__sc-ipj1ht-0"
|
|
63
|
-
})(["--row-height:34px;--color:#333;--bgcolor:white;--body-hover-bgcolor:#f5f5f5;--body-hover-color:#333;--hover-bgcolor:var(--body-hover-bgcolor);--hover-color:var(--body-hover-color);--highlight-bgcolor:#eee;--header-row-height:34px;--header-color:#000000de;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--lock-shadow:rgba(152,152,152,0.5) 0 0 6px 2px;--border-color:#dfe3e8;--border-color-select:#eb4619;--cell-border:1px solid var(--border-color);--cell-border-select:1px solid var(--border-color-select);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgcolor:#fafafa;&.", "{--bgcolor:#343e59;--footer-bgcolor:#2e3342;--header-bgcolor:#343e59;--hover-bgcolor:#232b43;--header-hover-bgcolor:#606164;--highlight-bgcolor:#eff2f5;--header-highlight-bgcolor:#191a1b;--hover-color:#dadde1;--color:#dadde1;--header-color:#dadde1;--lock-shadow:rgb(37 37 37 / 0.5) 0 0 6px 2px;--border-color:#4f5266;background-color:var(--bgcolor);}&.use-outer-border{", ";}&.", "{.", "{border-left:0;border-right:0;td,th{border-right:0;}td.first,th.first{border-left:0;}td.last,th.last{}thead tr.first th,tbody tr.first td{}tr{td{&.lock-left,&.lock-right{border-bottom-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 0px 0 0 var(--border-color),0px 0 0 0 var(--border-color);}}}&.has-footer tfoot tr.last td{}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{}}}&.", "{&.use-outer-border{border-bottom:var(--header-cell-border);}.", "{border-top:0;td,th{border-bottom:0;border-top:0;}td.lock-left{box-shadow:none;}td.first,th.first{}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr td{border-bottom:0;border-top:0;}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{}}}&.", "{.", "{border:0;td,th{border-right:0;border-bottom:0;}td.lock-left{box-shadow:none;}td,th{border:0;}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr td{border-bottom:0;border-top:0;}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{border-top:0;border:0;}}}.", "{padding:8px;}&.ui-rc-grid .ui-rc-pagination{background-color:var(--bgcolor);color:var(--color);padding:10px;background-color:var(--bgcolor);.ui-rc-pagination-prev{.anticon.anticon-left{color:var(--color);}}.ui-rc-pagination-disabled{.anticon.anticon-left{color:#7d7a7a;}}.ui-rc-pagination-next{.anticon.anticon-right{color:var(--color);}&.ui-rc-pagination-disabled{.anticon.anticon-right{color:#7d7a7a;}}}}&.auto-height{.ui-rc-grid-bottom{border-top:0;}}.ui-rc-grid-bottom{border-top:var(--cell-border-horizontal);}.ui-rc-toolbar-bottom{.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{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;}}}&.", "{&.ui-rc-grid{.ui-rc-toolbar-bottom{background-color:var(--footer-bgcolor);color:#ffffff;}}.ui-rc-grid-top-toolbar{border-color:var(--border-color);color:#ffffff;}.ui-rc-toolbar{.ui-rc-toolbar-selection-item{background-color:var(--footer-bgcolor);color:#ffffff;}}}"], Classes.tableThemeDark, outerBorderStyleMixin, Classes.gridHorizontal, Classes.tableWrapper, Classes.tableTop, Classes.gridVertical, Classes.tableWrapper, Classes.tableTop, Classes.gridNone, Classes.tableWrapper, Classes.tableTop, Classes.tableTop, Classes.tableThemeDark);
|
|
66
|
+
})(["--row-height:34px;--color:#333;--bgcolor:white;--row-parent-bgcolor:#f5f5f5;--row-odd-bgcolor:#f9f8fd;--row-even-bgcolor:#ffffff;--body-hover-bgcolor:#f5f5f5;--body-hover-color:#333;--hover-bgcolor:var(--body-hover-bgcolor);--hover-color:var(--body-hover-color);--highlight-bgcolor:#eee;--header-row-height:34px;--header-color:#000000de;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--lock-shadow:rgba(152,152,152,0.5) 0 0 6px 2px;--border-color:#dfe3e8;--border-color-select:#eb4619;--cell-border:1px solid var(--border-color);--cell-border-select:1px solid var(--border-color-select);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgcolor:#fafafa;&.", "{--bgcolor:#343e59;--footer-bgcolor:#2e3342;--header-bgcolor:#343e59;--hover-bgcolor:#232b43;--header-hover-bgcolor:#606164;--highlight-bgcolor:#eff2f5;--header-highlight-bgcolor:#191a1b;--hover-color:#dadde1;--color:#dadde1;--header-color:#dadde1;--lock-shadow:rgb(37 37 37 / 0.5) 0 0 6px 2px;--border-color:#4f5266;background-color:var(--bgcolor);}&.use-outer-border{", ";}&.", "{.", "{border-left:0;border-right:0;td,th{border-right:0;}td.first,th.first{border-left:0;}td.last,th.last{}thead tr.first th,tbody tr.first td{}tr{td{&.lock-left,&.lock-right{border-bottom-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 0px 0 0 var(--border-color),0px 0 0 0 var(--border-color);}}}&.has-footer tfoot tr.last td{}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{}}}&.", "{&.use-outer-border{border-bottom:var(--header-cell-border);}.", "{border-top:0;td,th{border-bottom:0;border-top:0;}td.lock-left{box-shadow:none;}td.first,th.first{}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr td{border-bottom:0;border-top:0;}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{}}}&.", "{.", "{border:0;td,th{border-right:0;border-bottom:0;}td.lock-left{box-shadow:none;}td,th{border:0;}td.last,th.last{}thead tr.first th,tbody tr.first td{}&.has-footer tfoot tr td{border-bottom:0;border-top:0;}&.has-footer tbody tr.last td{}&.has-footer tfoot tr td{}&:not(.has-footer) tbody tr.last td{}&:has(.", ") thead tr.first th{border-top:0;border:0;}}}.", "{padding:8px;}&.ui-rc-grid .ui-rc-pagination{background-color:var(--bgcolor);color:var(--color);padding:10px;background-color:var(--bgcolor);.ui-rc-pagination-prev{.anticon.anticon-left{color:var(--color);}}.ui-rc-pagination-disabled{.anticon.anticon-left{color:#7d7a7a;}}.ui-rc-pagination-next{.anticon.anticon-right{color:var(--color);}&.ui-rc-pagination-disabled{.anticon.anticon-right{color:#7d7a7a;}}}}&.auto-height{.ui-rc-grid-bottom{border-top:0;}}.ui-rc-grid-bottom{border-top:var(--cell-border-horizontal);}.ui-rc-toolbar-bottom{.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{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;}}}&.", "{&.ui-rc-grid{.ui-rc-toolbar-bottom{background-color:var(--footer-bgcolor);color:#ffffff;}}.ui-rc-grid-top-toolbar{border-color:var(--border-color);color:#ffffff;}.ui-rc-toolbar{.ui-rc-toolbar-selection-item{background-color:var(--footer-bgcolor);color:#ffffff;}}}"], Classes.tableThemeDark, outerBorderStyleMixin, Classes.gridHorizontal, Classes.tableWrapper, Classes.tableTop, Classes.gridVertical, Classes.tableWrapper, Classes.tableTop, Classes.gridNone, Classes.tableWrapper, Classes.tableTop, Classes.tableTop, Classes.tableThemeDark);
|
|
64
67
|
export const StyledArtTableWrapper = styled.div.withConfig({
|
|
65
68
|
displayName: "StyledArtTableWrapper",
|
|
66
69
|
componentId: "es-grid-template__sc-ipj1ht-1"
|
|
67
|
-
})(["box-sizing:border-box;*{box-sizing:border-box;}cursor:default;color:var(--color);font-size:var(--font-size);line-height:var(--line-height);position:relative;overflow-anchor:none;&::-webkit-scrollbar{}&::-webkit-scrollbar-track{}&::-webkit-scrollbar-thumb{}&::-webkit-scrollbar-thumb:hover{}&.dark{&::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.3);}&::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.5);}}&.", "{border-left:var(--cell-border-vertical);border-right:var(--cell-border-vertical);border-top:var(--cell-border-vertical);border-bottom:0;&.has-footer{border-bottom:0;.", "{td{}}}&.has-vertical-scroll{border-bottom:var(--cell-border-vertical);th.first{border-left:0;}td.first{border-left:0;}&.has-footer{border-bottom:var(--cell-border-vertical);}.", "{tr.last{td{border-bottom:0;}}}.", "{tr.last{td{border-bottom:0;}}}+ .ui-rc-grid-bottom{border-top:0;}&:not(.has-footer){+ .ui-rc-grid-bottom{border-top:var(--cell-border-vertical);}}}&:not(.has-vertical-scroll){border-left:0;border-right:0;}&:not(.has-header){border-top:0;}}&.use-outer-border{}.no-scrollbar{scrollbar-width:none;::-webkit-scrollbar{}}.", "{overflow-x:auto;overflow-y:hidden;background:var(--header-bgcolor);.ui-rc-table-column-title{flex:1;min-width:0;text-align:start;}.", "{font-weight:500;.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}.", "{width:100%;white-space:normal;word-break:break-word;}.", "{text-align:center;}.", "{text-align:right;}}}.", "{.", "{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;.expansion-cell{.expansion-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}.", "{background:var(--footer-bgcolor);}}.", ",.", "{overflow-x:auto;overflow-y:hidden;}&.sticky-header .", "{position:sticky;top:0;z-index:", ";}&.sticky-footer .", "{position:sticky;bottom:0;z-index:", ";}.", "{tr{td.cell-edit{&.lock-left,&.lock-right{}}td.first{&.lock-left{border-bottom-width:1px;}}}tr.ui-rc-grid-table-row{td.cell-edit.cell-border-bottom{}}}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;display:table;margin:0;padding:0;}tr:not(.no-hover):hover > td{background:var(--hover-bgcolor);color:var(--hover-color);}tr:not(.no-highlight).highlight > td{}th{font-weight:normal;text-align:left;padding:var(--cell-padding);height:var(--header-row-height);color:var(--header-color);background:var(--header-bgcolor);border:none;border-right:var(--header-cell-border-vertical);border-bottom:var(--header-cell-border-horizontal);&.", "{background-color:#fcf5f2;}&.cell-border-bottom{border-bottom:var(--cell-border-select);}&.cell-border-right{border-right:var(--cell-border-select);}&.cell-border-left{position:relative;}&.cell-border-top{position:relative;}&.cell-border-left::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:var(--cell-border-select);pointer-events:none;z-index:1;}&.cell-border-top::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:var(--cell-border-select);pointer-events:none;z-index:1;}textarea.ui-rc-input{line-height:1.8;max-height:calc(var(--header-row-height) - 1px) !important;min-height:calc(var(--header-row-height) - 1px) !important;}}tr.first th{}th.first{border-left:var(--header-cell-border-vertical);}td{padding:var(--cell-padding);background:var(--bgcolor);height:var(--row-height);border:none;border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);outline:none;&.cell-edit{user-select:none;&:has(.dragging-point){position:relative;}.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:var(--border-color-select);bottom:0;right:0;}}&.disable{background-color:#f0f0f0;}}&.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,.ui-rc-input{height:100% !important;&:focus-visible{outline:none;}}.ui-rc-color-picker-trigger{width:100%;border-radius:0;.ui-rc-color-picker-color-block{width:100%;}}textarea.ui-rc-input{line-height:1.8;height:100%;max-height:calc(var(--row-height) - 1px) !important;min-height:calc(var(--row-height) - 1px) !important;}input.be-cell-editing,.ant-picker,.ui-rc-picker,.ui-rc-select-selector,.ui-rc-table-select-selector{padding-inline:7px;}.#{$prefix}-checkbox-wrapper{.#{$prefix}-checkbox{background-color:red;}.#{$prefix}-checkbox-input{&:focus-visible{outline:none;}}}.ant-input,.ant-picker,.ui-rc-picker{border-radius:0;}.ant-color-picker-trigger{height:100%;border-radius:0;.ant-color-picker-color-block{height:100%;width:100%;}}.#{$prefix}-table-select-single .#{$prefix}-table-select-selector,.#{$prefix}-select-single .#{$prefix}-select-selector,.ui-rc-table-select-selector{border-radius:0 !important;}.#{$prefix}-table-select-single:not( .#{$prefix}-table-select-customize-input ){.#{$prefix}-table-select-selector{.#{$prefix}-table-select-selection-search-input{height:auto;}}}}.abccccc{box-shadow:0 -1px 0 0 var(--border-color),0 1px 0 0 var(--border-color),-1px 0 0 0 var(--border-color),1px 0 0 0 var(--border-color);}&.", "{background-color:#fcf5f2;}&.cell-border-bottom{border-bottom:var(--cell-border-select);}&.cell-border-right{border-right:var(--cell-border-select);}&.cell-border-left{position:relative;}&.cell-border-top{position:relative;}&.cell-border-left::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:var(--cell-border-select);pointer-events:none;z-index:1;}&.cell-border-top::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:var(--cell-border-select);pointer-events:none;z-index:1;}&.cell-paste-border-top{position:relative;&::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{position:relative;&::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;}}td.first{border-left:var(--cell-border-vertical);}tr.first td{border-top:var(--cell-border-horizontal);}tr td.last,tr th.last{border-right:var(--cell-border-horizontal);}&.has-header tbody tr.first td{border-top:none;}&.has-footer tbody tr.last td{border-bottom:none;}&.has-footer tfoot tr > td{background:var(--footer-bgcolor);color:var(--footer-color);}&.has-footer tfoot tr:not(.no-hover):hover > td{background:var(--footer-bgcolor);}.lock-left,.lock-right{z-index:", ";}.resize-handle{width:6px;height:100%;position:absolute;top:0;right:0;cursor:col-resize;background-color:transparent;border-right:2px solid transparent;}.", "{position:absolute;top:0;bottom:0;z-index:", ";pointer-events:none;overflow:hidden;.", "{height:100%;}.", "{margin-right:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-right:var(--cell-border-vertical);}}.", "{margin-left:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-left:var(--cell-border-vertical);}}}.", "{pointer-events:none;color:#99a3b3;font-size:12px;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);.empty-image{width:50px;height:50px;}.empty-tips{margin-top:16px;line-height:1.5;}}.", "{overflow:auto;position:sticky;bottom:0;z-index:", ";margin-top:-17px;}.ui-rc-grid-loading-wrapper{}.ui-rc-grid-table{}.art-loading-content-wrapper{height:100%;}.", "{height:1px;visibility:hidden;}.", "{position:relative;height:100%;.", "{position:absolute;inset:0;pointer-events:none;}.", "{position:sticky;z-index:", ";transform:translateY(-50%);}}"], Classes.tableWrapper, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Classes.tableHeaderCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Classes.tableBody, Classes.cellSelected, Classes.cellSelected, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator);
|
|
70
|
+
})(["box-sizing:border-box;*{box-sizing:border-box;}cursor:default;color:var(--color);font-size:var(--font-size);line-height:var(--line-height);position:relative;overflow-anchor:none;&::-webkit-scrollbar{}&::-webkit-scrollbar-track{}&::-webkit-scrollbar-thumb{}&::-webkit-scrollbar-thumb:hover{}&.dark{&::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.3);}&::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.5);}}&.", "{border-left:var(--cell-border-vertical);border-right:var(--cell-border-vertical);border-top:var(--cell-border-vertical);border-bottom:0;&.has-footer{border-bottom:0;.", "{td{}}}&.has-vertical-scroll{border-bottom:var(--cell-border-vertical);th.first{border-left:0;}td.first{border-left:0;}&.has-footer{border-bottom:var(--cell-border-vertical);}.", "{tr.last{td{border-bottom:0;}}}.", "{tr.last{td{border-bottom:0;}}}+ .ui-rc-grid-bottom{border-top:0;}&:not(.has-footer){+ .ui-rc-grid-bottom{border-top:var(--cell-border-vertical);}}}&:not(.has-vertical-scroll){border-left:0;border-right:0;}&:not(.has-header){border-top:0;}}&.use-outer-border{}.no-scrollbar{scrollbar-width:none;::-webkit-scrollbar{}}.", "{overflow-x:auto;overflow-y:hidden;background:var(--header-bgcolor);.ui-rc-table-column-title{flex:1;min-width:0;text-align:start;}.", "{font-weight:500;.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}.", "{width:100%;white-space:normal;word-break:break-word;}.", "{text-align:center;}.", "{text-align:right;}}}.", "{.", "{td{background:var(--row-odd-bgcolor);}}.", "{td{background:var(--row-even-bgcolor);}}.", "{td{background:var(--row-parent-bgcolor);font-weight:500;}}.", "{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;.expansion-cell{.expansion-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}}.", "{background:var(--footer-bgcolor);}.", ",.", "{overflow-x:auto;overflow-y:hidden;}&.sticky-header .", "{position:sticky;top:0;z-index:", ";}&.sticky-footer .", "{position:sticky;bottom:0;z-index:", ";}.", "{tr{td.cell-edit{&.lock-left,&.lock-right{}}td.first{&.lock-left{border-bottom-width:1px;}}}tr.ui-rc-grid-table-row{td.cell-edit.cell-border-bottom{}}}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;display:table;margin:0;padding:0;}tr:not(.no-hover):hover > td{background:var(--hover-bgcolor);color:var(--hover-color);}tr:not(.no-highlight).highlight > td{}th{font-weight:normal;text-align:left;padding:var(--cell-padding);height:var(--header-row-height);color:var(--header-color);background:var(--header-bgcolor);border:none;border-right:var(--header-cell-border-vertical);border-bottom:var(--header-cell-border-horizontal);&.", "{background-color:#fcf5f2;}&.cell-border-bottom{border-bottom:var(--cell-border-select);}&.cell-border-right{border-right:var(--cell-border-select);}&.cell-border-left{position:relative;}&.cell-border-top{position:relative;}&.cell-border-left::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:var(--cell-border-select);pointer-events:none;z-index:1;}&.cell-border-top::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:var(--cell-border-select);pointer-events:none;z-index:1;}&.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,.ui-rc-input{height:100% !important;&:focus-visible{outline:none;}}.ui-rc-color-picker-trigger{width:100%;border-radius:0;.ui-rc-color-picker-color-block{width:100%;}}textarea.ui-rc-input{line-height:1.8;height:100%;max-height:calc(var(--row-height) - 1px) !important;min-height:calc(var(--row-height) - 1px) !important;}input.be-cell-editing,.ant-picker,.ui-rc-picker,.ui-rc-select-selector,.ui-rc-table-select-selector{padding-inline:7px;}.#{$prefix}-checkbox-wrapper{.#{$prefix}-checkbox{background-color:red;}.#{$prefix}-checkbox-input{&:focus-visible{outline:none;}}}.ant-input,.ant-picker,.ui-rc-picker{border-radius:0;}.ant-color-picker-trigger{height:100%;border-radius:0;.ant-color-picker-color-block{height:100%;width:100%;}}.#{$prefix}-table-select-single .#{$prefix}-table-select-selector,.#{$prefix}-select-single .#{$prefix}-select-selector,.ui-rc-table-select-selector{border-radius:0 !important;}.#{$prefix}-table-select-single:not( .#{$prefix}-table-select-customize-input ){.#{$prefix}-table-select-selector{.#{$prefix}-table-select-selection-search-input{height:auto;}}}}textarea.ui-rc-input{line-height:1.8;max-height:calc(var(--header-row-height) - 1px) !important;min-height:calc(var(--header-row-height) - 1px) !important;}}tr.first th{}th.first{border-left:var(--header-cell-border-vertical);}td{padding:var(--cell-padding);background:var(--bgcolor);height:var(--row-height);border:none;border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);outline:none;&.cell-edit{user-select:none;&:has(.dragging-point){position:relative;}.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:var(--border-color-select);bottom:0;right:0;}}&.disable{background-color:#f0f0f0;}}&.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,.ui-rc-input{height:100% !important;&:focus-visible{outline:none;}}.ui-rc-color-picker-trigger{width:100%;border-radius:0;.ui-rc-color-picker-color-block{width:100%;}}textarea.ui-rc-input{line-height:1.8;height:100%;max-height:calc(var(--row-height) - 1px) !important;min-height:calc(var(--row-height) - 1px) !important;}input.be-cell-editing,.ant-picker,.ui-rc-picker,.ui-rc-select-selector,.ui-rc-table-select-selector{padding-inline:7px;}.#{$prefix}-checkbox-wrapper{.#{$prefix}-checkbox{background-color:red;}.#{$prefix}-checkbox-input{&:focus-visible{outline:none;}}}.ant-input,.ant-picker,.ui-rc-picker{border-radius:0;}.ant-color-picker-trigger{height:100%;border-radius:0;.ant-color-picker-color-block{height:100%;width:100%;}}.#{$prefix}-table-select-single .#{$prefix}-table-select-selector,.#{$prefix}-select-single .#{$prefix}-select-selector,.ui-rc-table-select-selector{border-radius:0 !important;}.#{$prefix}-table-select-single:not( .#{$prefix}-table-select-customize-input ){.#{$prefix}-table-select-selector{.#{$prefix}-table-select-selection-search-input{height:auto;}}}}.abccccc{box-shadow:0 -1px 0 0 var(--border-color),0 1px 0 0 var(--border-color),-1px 0 0 0 var(--border-color),1px 0 0 0 var(--border-color);}&.", "{background-color:#fcf5f2;}&.cell-border-bottom{border-bottom:var(--cell-border-select);}&.cell-border-right{border-right:var(--cell-border-select);}&.cell-border-left{position:relative;}&.cell-border-top{position:relative;}&.cell-border-left::before{content:'';position:absolute;top:0;left:0;height:102%;width:1px;border-left:var(--cell-border-select);pointer-events:none;z-index:1;}&.cell-border-top::after{content:'';position:absolute;top:0px;left:0;height:1px;width:100%;border-top:var(--cell-border-select);pointer-events:none;z-index:1;}&.cell-paste-border-top{position:relative;&::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{position:relative;&::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;}}td.first{border-left:var(--cell-border-vertical);}tr.first td{border-top:var(--cell-border-horizontal);}tr td.last,tr th.last{border-right:var(--cell-border-horizontal);}&.has-header tbody tr.first td{border-top:none;}&.has-footer tbody tr.last td{border-bottom:none;}&.has-footer tfoot tr > td{background:var(--footer-bgcolor);color:var(--footer-color);}&.has-footer tfoot tr:not(.no-hover):hover > td{background:var(--footer-bgcolor);}.lock-left,.lock-right{z-index:", ";}.resize-handle{width:6px;height:100%;position:absolute;top:0;right:0;cursor:col-resize;background-color:transparent;border-right:2px solid transparent;}.", "{position:absolute;top:0;bottom:0;z-index:", ";pointer-events:none;overflow:hidden;.", "{height:100%;}.", "{margin-right:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-right:var(--cell-border-vertical);}}.", "{margin-left:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-left:var(--cell-border-vertical);}}}.", "{pointer-events:none;color:#99a3b3;font-size:12px;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);.empty-image{width:50px;height:50px;}.empty-tips{margin-top:16px;line-height:1.5;}}.", "{overflow:auto;position:sticky;bottom:0;z-index:", ";margin-top:-17px;}.ui-rc-grid-loading-wrapper{}.ui-rc-grid-table{}.art-loading-content-wrapper{height:100%;}.", "{height:1px;visibility:hidden;}.", "{position:relative;height:100%;.", "{position:absolute;inset:0;pointer-events:none;}.", "{position:sticky;z-index:", ";transform:translateY(-50%);}}"], Classes.tableWrapper, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Classes.tableHeaderCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableRowOdd, Classes.tableRowEven, Classes.tableRowParent, Classes.tableCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableFooter, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Classes.tableBody, Classes.cellSelected, Classes.cellSelected, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator);
|
|
68
71
|
|
|
69
72
|
// type StyleTableContainerProps = {
|
|
70
73
|
|
|
@@ -205,8 +205,14 @@ export function columnCustom(opts) {
|
|
|
205
205
|
if (info.source === 'trigger') {
|
|
206
206
|
if (newVisible) {
|
|
207
207
|
const defaultFilterOption = defaultFilter?.find(it => it.field === column.field);
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
|
|
209
|
+
// Tìm trong filterState
|
|
210
|
+
|
|
211
|
+
const abc = filterState.find(it => it.field === column.field);
|
|
212
|
+
|
|
213
|
+
// const filterValue = filterColumnState.filteredKeys === null ? [] : (filterColumnState.filteredKeys ?? (defaultFilterOption?.filteredKeys ?? [])) as string[]
|
|
214
|
+
const filterValue = abc && abc.filteredKeys === null ? [] : abc?.filteredKeys ?? defaultFilterOption?.filteredKeys ?? [];
|
|
215
|
+
const operator = abc?.operator;
|
|
210
216
|
const operatorValue = operator ?? defaultFilterOption?.operator ?? getDefaultOperator(column);
|
|
211
217
|
pipeline.setStateAtKey(stateKeyColumnFilter, {
|
|
212
218
|
operator: operatorValue,
|
|
@@ -226,7 +232,7 @@ export function columnCustom(opts) {
|
|
|
226
232
|
if (inputFilter) {
|
|
227
233
|
inputFilter.focus();
|
|
228
234
|
}
|
|
229
|
-
},
|
|
235
|
+
}, 20);
|
|
230
236
|
} else {}
|
|
231
237
|
triggerVisible(newVisible, column.field);
|
|
232
238
|
}
|
|
@@ -287,9 +293,11 @@ export function columnCustom(opts) {
|
|
|
287
293
|
operator: filterColumnState.operator ?? undefined
|
|
288
294
|
};
|
|
289
295
|
const rs = updateArrayByKey(filterState, currentFilter, 'field');
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
296
|
+
|
|
297
|
+
// pipeline.setStateAtKey(stateKeyColumnFilter, {
|
|
298
|
+
// ...currentFilter
|
|
299
|
+
// })
|
|
300
|
+
|
|
293
301
|
pipeline.setStateAtKey(stateKeyFilter, rs);
|
|
294
302
|
if (onFilter) {
|
|
295
303
|
onFilter(convertFilters([...newFilterState]));
|
|
@@ -1270,7 +1278,7 @@ export function columnCustom(opts) {
|
|
|
1270
1278
|
const prevGetCellProps = col?.getCellProps;
|
|
1271
1279
|
const headerCustomTooltip = col?.headerTooltip ?? (t ? t(col?.headerText) : col?.headerText);
|
|
1272
1280
|
const htmlTooltip = headerCustomTooltip;
|
|
1273
|
-
const headerEditType = col.headerEditType;
|
|
1281
|
+
const headerEditType = col.headerEditType ?? col.editType;
|
|
1274
1282
|
const headerRowIndex = params.path.findIndex(it => it.field === col.field);
|
|
1275
1283
|
const headerRowId = `header-field-${headerRowIndex}`;
|
|
1276
1284
|
|
|
@@ -1280,6 +1288,7 @@ export function columnCustom(opts) {
|
|
|
1280
1288
|
[col.field]: headerData?.[col.field] ?? ''
|
|
1281
1289
|
};
|
|
1282
1290
|
const headerValue = headerData?.[col.field] ?? '';
|
|
1291
|
+
const headerContent = renderValueCell(col, headerValue, {}, -1, startIndex, format, false);
|
|
1283
1292
|
const cellHeaderEditing = isEditing.editing && headerRowId === focusedCell.rowId && col.field === focusedCell.colId;
|
|
1284
1293
|
const isCellSelect = headerRowId === focusedCell.rowId && startCell?.colId === col.field;
|
|
1285
1294
|
const aa = getColumnsAtLevel(originCols, headerRowIndex);
|
|
@@ -1291,23 +1300,7 @@ export function columnCustom(opts) {
|
|
|
1291
1300
|
...col,
|
|
1292
1301
|
lock: !!col.fixed,
|
|
1293
1302
|
width: sizes[startIndex],
|
|
1294
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
1295
|
-
className: "ui-rc-grid-filter-column d-flex",
|
|
1296
|
-
style: {
|
|
1297
|
-
justifyContent: 'space-between',
|
|
1298
|
-
alignItems: 'center'
|
|
1299
|
-
}
|
|
1300
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
1301
|
-
className: "ui-rc-table-column-title",
|
|
1302
|
-
style: {}
|
|
1303
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1304
|
-
className: classNames(`${prefix}-grid-cell`, {
|
|
1305
|
-
[`${prefix}-grid-cell-ellipsis`]: !wrapSettings || !(wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Header')),
|
|
1306
|
-
[`${prefix}-grid-cell-wrap`]: wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Header'),
|
|
1307
|
-
[`${prefix}-grid-cell-text-center`]: (col?.headerTextAlign ?? col?.textAlign) === 'center',
|
|
1308
|
-
[`${prefix}-grid-cell-text-right`]: (col?.headerTextAlign ?? col.textAlign) === 'right'
|
|
1309
|
-
})
|
|
1310
|
-
}, headerEditAble && col.headerEditEnable && cellHeaderEditing ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderEditCell, {
|
|
1303
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, headerEditAble && col.headerEditEnable && cellHeaderEditing ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HeaderEditCell, {
|
|
1311
1304
|
column: col,
|
|
1312
1305
|
editType: headerEditType ?? 'text',
|
|
1313
1306
|
record: headerRecord,
|
|
@@ -1331,7 +1324,23 @@ export function columnCustom(opts) {
|
|
|
1331
1324
|
startCell: startCell,
|
|
1332
1325
|
handleSubmit: handleSubmit,
|
|
1333
1326
|
onSubmit: onSubmit
|
|
1334
|
-
})) :
|
|
1327
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
1328
|
+
className: "ui-rc-grid-filter-column d-flex",
|
|
1329
|
+
style: {
|
|
1330
|
+
justifyContent: 'space-between',
|
|
1331
|
+
alignItems: 'center'
|
|
1332
|
+
}
|
|
1333
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1334
|
+
className: "ui-rc-table-column-title",
|
|
1335
|
+
style: {}
|
|
1336
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1337
|
+
className: classNames(`${prefix}-grid-cell`, {
|
|
1338
|
+
[`${prefix}-grid-cell-ellipsis`]: !wrapSettings || !(wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Header')),
|
|
1339
|
+
[`${prefix}-grid-cell-wrap`]: wrapSettings && (wrapSettings.wrapMode === 'Both' || wrapSettings.wrapMode === 'Header'),
|
|
1340
|
+
[`${prefix}-grid-cell-text-center`]: (col?.headerTextAlign ?? col?.textAlign) === 'center',
|
|
1341
|
+
[`${prefix}-grid-cell-text-right`]: (col?.headerTextAlign ?? col.textAlign) === 'right'
|
|
1342
|
+
})
|
|
1343
|
+
}, headerEditAble && col.headerEditEnable ? /*#__PURE__*/React.createElement(React.Fragment, null, headerContent) : col.headerTemplate ? /*#__PURE__*/React.createElement(React.Fragment, null, typeof col.headerTemplate === 'function' ? col.headerTemplate(col) : col.headerTemplate) : /*#__PURE__*/React.createElement(React.Fragment, null, prevTitle))), (!nonActionColumn.includes(col.field) && !col?.children || col?.children && col?.children.length < 1) && /*#__PURE__*/React.createElement("span", {
|
|
1335
1344
|
className: "ui-rc-header-trigger d-flex gap-50"
|
|
1336
1345
|
}, canSort && /*#__PURE__*/React.createElement("div", {
|
|
1337
1346
|
style: {
|
|
@@ -1401,6 +1410,7 @@ export function columnCustom(opts) {
|
|
|
1401
1410
|
className: classNames('', {
|
|
1402
1411
|
[`header-cell-editable`]: col.headerEditEnable,
|
|
1403
1412
|
[`${prefix}-grid-cell-selected`]: !cellHeaderEditing && isCellSelect,
|
|
1413
|
+
'cell-editing': cellHeaderEditing,
|
|
1404
1414
|
'cell-border-top': !cellHeaderEditing && isCellSelect,
|
|
1405
1415
|
'cell-border-bottom': !cellHeaderEditing && isCellSelect,
|
|
1406
1416
|
'cell-border-right': !cellHeaderEditing && isCellSelect,
|
|
@@ -1504,6 +1514,9 @@ export function columnCustom(opts) {
|
|
|
1504
1514
|
}),
|
|
1505
1515
|
getCellProps(value, record, rowIndex) {
|
|
1506
1516
|
const prevCellProps = prevGetCellProps?.(value, record, rowIndex);
|
|
1517
|
+
|
|
1518
|
+
// console.log('record', record)
|
|
1519
|
+
|
|
1507
1520
|
const fomatedValue = ['color', 'checkbox', 'field'].includes(col.type ?? '') ? '' : renderValueCell(col, value, record, rowIndex, 0, format, false);
|
|
1508
1521
|
const tooltipContent = isOpenTooltip === false ? '' : col?.tooltipDescription ? typeof col.tooltipDescription === 'function' ? col.tooltipDescription({
|
|
1509
1522
|
value,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TablePipeline } from '../pipeline';
|
|
2
2
|
export interface HiddenColumnsOptions {
|
|
3
3
|
columns: any[];
|
|
4
|
+
groupColumns?: any[];
|
|
4
5
|
visibleKeys?: any[];
|
|
5
6
|
}
|
|
6
7
|
export declare function hiddenColumns(opts: HiddenColumnsOptions): (pipeline: TablePipeline) => TablePipeline;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
import { stateKeyGroupKeys, stateKeyVisibleKeys } from "../../utils/constants";
|
|
1
2
|
import { filterColumnsByField } from "../../utils/convertColumnsChoose";
|
|
3
|
+
import { getOnlyInA } from "../../utils/utility";
|
|
2
4
|
// const stateKey = 'pagination'
|
|
3
5
|
|
|
4
6
|
export function hiddenColumns(opts) {
|
|
5
7
|
return function visibleClumns(pipeline) {
|
|
6
8
|
const {
|
|
7
9
|
columns,
|
|
8
|
-
visibleKeys
|
|
10
|
+
visibleKeys,
|
|
11
|
+
groupColumns
|
|
9
12
|
} = opts;
|
|
10
|
-
pipeline.
|
|
13
|
+
const abc = pipeline.getStateAtKey(stateKeyVisibleKeys) ?? visibleKeys ?? [];
|
|
14
|
+
const group = pipeline.getStateAtKey(stateKeyGroupKeys) ?? groupColumns ?? [];
|
|
15
|
+
const rs = getOnlyInA(abc, group);
|
|
16
|
+
pipeline.columns(processDataSource(columns, rs));
|
|
11
17
|
return pipeline;
|
|
12
18
|
function processDataSource(cols, keys) {
|
|
13
|
-
if (!keys) {
|
|
19
|
+
if (!keys || keys && keys.length === 0) {
|
|
14
20
|
return cols;
|
|
15
21
|
}
|
|
16
22
|
return filterColumnsByField(cols, keys ?? []);
|
|
@@ -227,7 +227,7 @@ export function treeSelect(opts) {
|
|
|
227
227
|
return {
|
|
228
228
|
style: {
|
|
229
229
|
// cursor: 'not-allowed',
|
|
230
|
-
|
|
230
|
+
paddingBlock: 0
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
233
|
}
|
|
@@ -238,14 +238,14 @@ export function treeSelect(opts) {
|
|
|
238
238
|
return {
|
|
239
239
|
style: {
|
|
240
240
|
cursor: 'not-allowed',
|
|
241
|
-
|
|
241
|
+
paddingBlock: 0
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
245
|
return mergeCellProps(prevCellProps, {
|
|
246
246
|
style: {
|
|
247
247
|
cursor: 'pointer',
|
|
248
|
-
|
|
248
|
+
paddingBlock: 0
|
|
249
249
|
},
|
|
250
250
|
onClick(e) {
|
|
251
251
|
if (opts.stopClickEventPropagation) {
|