@hi-ui/table 4.12.0 → 5.0.0-alpha.0
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/CHANGELOG.md +101 -0
- package/lib/cjs/BaseTable.js +27 -14
- package/lib/cjs/Table.js +1 -1
- package/lib/cjs/TableRow.js +1 -1
- package/lib/cjs/TableSettingMenu.js +3 -2
- package/lib/cjs/hooks/use-col-sorter.js +2 -4
- package/lib/cjs/hooks/use-col-width.js +8 -9
- package/lib/cjs/styles/index.scss.js +1 -1
- package/lib/cjs/use-table.js +5 -4
- package/lib/esm/BaseTable.js +27 -14
- package/lib/esm/Table.js +1 -1
- package/lib/esm/TableRow.js +1 -1
- package/lib/esm/TableSettingMenu.js +3 -2
- package/lib/esm/hooks/use-col-sorter.js +2 -4
- package/lib/esm/hooks/use-col-width.js +8 -9
- package/lib/esm/styles/index.scss.js +1 -1
- package/lib/esm/use-table.js +5 -4
- package/lib/types/SettingDrawer.d.ts +3 -0
- package/lib/types/context.d.ts +6 -4
- package/lib/types/hooks/use-col-frozen.d.ts +1 -1
- package/lib/types/hooks/use-col-hidden.d.ts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/types.d.ts +7 -7
- package/lib/types/use-table.d.ts +7 -1
- package/package.json +36 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,106 @@
|
|
|
1
1
|
# @hi-ui/table
|
|
2
2
|
|
|
3
|
+
## 5.0.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 1b05b44a4: feat: 组件的 package.json 中的 exports 统一加上 types 配置 (5.0)
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 204efb0c8: feat(table): 支持远程排序 (5.0)
|
|
12
|
+
- 6160bdc73: feat(table): TableColumnItem 支持泛型 (5.0)
|
|
13
|
+
- 7465d37f5: feat(table): add stretchHeight api (5.0)
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 85bb84874: style: 统一调整组件 shadow (5.0)
|
|
18
|
+
- 5de7a848b: chore: 将代码中 v4 改为 v5 (5.0)
|
|
19
|
+
- 5de7a848b: fix: 修复 5.0 UI 问题 (5.0)
|
|
20
|
+
- 67960d871: style: 修改样式问题 (5.0)
|
|
21
|
+
- c3ec579cd: fix: 修改组件问题 (5.0)
|
|
22
|
+
- 265e67416: fix(table): 优化 useColSorter 钩子,移除不必要的 columnsLatestRef 引用,直接使用 columns 进行排序计算 (5.0)
|
|
23
|
+
- 36bb992d3: style: 修改 UI 问题 (5.0)
|
|
24
|
+
- 94bd1ec4c: chore(table): export SettingDrawer types (5.0)
|
|
25
|
+
- 00e5a89c6: <br>
|
|
26
|
+
- fix(table): 标题去掉背景,头部加上边框 (5.0)
|
|
27
|
+
- fix(table): 单元格间距调整 & 设置最小高度 (5.0)
|
|
28
|
+
- fix(table): 不同尺寸修改 (5.0)
|
|
29
|
+
- 61d132802: build: 将 package.json 中 exports 配置中的 types 配置放在最上面 (5.0)
|
|
30
|
+
- Updated dependencies [83186fab2]
|
|
31
|
+
- Updated dependencies [85bb84874]
|
|
32
|
+
- Updated dependencies [dfff90e7c]
|
|
33
|
+
- Updated dependencies [77ed66eac]
|
|
34
|
+
- Updated dependencies [eb5506b8d]
|
|
35
|
+
- Updated dependencies [5de7a848b]
|
|
36
|
+
- Updated dependencies [1b05b44a4]
|
|
37
|
+
- Updated dependencies [09451c7d9]
|
|
38
|
+
- Updated dependencies [a203070c4]
|
|
39
|
+
- Updated dependencies [7f5badb6a]
|
|
40
|
+
- Updated dependencies [67960d871]
|
|
41
|
+
- Updated dependencies [cee645726]
|
|
42
|
+
- Updated dependencies [c3ec579cd]
|
|
43
|
+
- Updated dependencies [de7f92b26]
|
|
44
|
+
- Updated dependencies [b35327262]
|
|
45
|
+
- Updated dependencies [8116f0304]
|
|
46
|
+
- Updated dependencies [9fa354f31]
|
|
47
|
+
- Updated dependencies [77ed66eac]
|
|
48
|
+
- Updated dependencies [632dbda3a]
|
|
49
|
+
- Updated dependencies [cfaf8c48d]
|
|
50
|
+
- Updated dependencies [1b51c1bbe]
|
|
51
|
+
- Updated dependencies [de9cc749a]
|
|
52
|
+
- Updated dependencies [df395d488]
|
|
53
|
+
- Updated dependencies [61d132802]
|
|
54
|
+
- Updated dependencies [489b27cb3]
|
|
55
|
+
- Updated dependencies [9f2ee08cf]
|
|
56
|
+
- Updated dependencies [6eac4b78b]
|
|
57
|
+
- Updated dependencies [85bb84874]
|
|
58
|
+
- Updated dependencies [bcd3d08dd]
|
|
59
|
+
- Updated dependencies [4fb586f6f]
|
|
60
|
+
- Updated dependencies [c125e4c48]
|
|
61
|
+
- Updated dependencies [b7ad460d8]
|
|
62
|
+
- Updated dependencies [df25ec39b]
|
|
63
|
+
- @hi-ui/radio@5.0.0-alpha.0
|
|
64
|
+
- @hi-ui/drawer@5.0.0-alpha.0
|
|
65
|
+
- @hi-ui/button@5.0.0-alpha.0
|
|
66
|
+
- @hi-ui/select@5.0.0-alpha.0
|
|
67
|
+
- @hi-ui/pagination@5.0.0-alpha.0
|
|
68
|
+
- @hi-ui/core@5.0.0-alpha.0
|
|
69
|
+
- @hi-ui/use-cache@5.0.0-alpha.0
|
|
70
|
+
- @hi-ui/use-check@5.0.0-alpha.0
|
|
71
|
+
- @hi-ui/use-check-state@5.0.0-alpha.0
|
|
72
|
+
- @hi-ui/use-drag-sorter@5.0.0-alpha.0
|
|
73
|
+
- @hi-ui/use-latest@5.0.0-alpha.0
|
|
74
|
+
- @hi-ui/use-toggle@5.0.0-alpha.0
|
|
75
|
+
- @hi-ui/use-uncontrolled-state@5.0.0-alpha.0
|
|
76
|
+
- @hi-ui/use-update-effect@5.0.0-alpha.0
|
|
77
|
+
- @hi-ui/icons@5.0.0-alpha.0
|
|
78
|
+
- @hi-ui/checkbox@5.0.0-alpha.0
|
|
79
|
+
- @hi-ui/empty-state@5.0.0-alpha.0
|
|
80
|
+
- @hi-ui/icon-button@5.0.0-alpha.0
|
|
81
|
+
- @hi-ui/loading@5.0.0-alpha.0
|
|
82
|
+
- @hi-ui/popper@5.0.0-alpha.0
|
|
83
|
+
- @hi-ui/scrollbar@5.0.0-alpha.0
|
|
84
|
+
- @hi-ui/spinner@5.0.0-alpha.0
|
|
85
|
+
- @hi-ui/array-utils@5.0.0-alpha.0
|
|
86
|
+
- @hi-ui/classname@5.0.0-alpha.0
|
|
87
|
+
- @hi-ui/dom-utils@5.0.0-alpha.0
|
|
88
|
+
- @hi-ui/env@5.0.0-alpha.0
|
|
89
|
+
- @hi-ui/func-utils@5.0.0-alpha.0
|
|
90
|
+
- @hi-ui/object-utils@5.0.0-alpha.0
|
|
91
|
+
- @hi-ui/react-utils@5.0.0-alpha.0
|
|
92
|
+
- @hi-ui/times@5.0.0-alpha.0
|
|
93
|
+
- @hi-ui/tree-utils@5.0.0-alpha.0
|
|
94
|
+
- @hi-ui/type-assertion@5.0.0-alpha.0
|
|
95
|
+
|
|
96
|
+
## 4.12.1
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- [#3328](https://github.com/XiaoMi/hiui/pull/3328) [`6e274310f`](https://github.com/XiaoMi/hiui/commit/6e274310f9545a82090ffa586cf31a7c79b305ba) Thanks [@zyprepare](https://github.com/zyprepare)! - fix(table): 优化列宽设置逻辑,确保在列变化时准确计算并更新列宽 (#3327)
|
|
101
|
+
|
|
102
|
+
- [#3330](https://github.com/XiaoMi/hiui/pull/3330) [`df35306`](https://github.com/XiaoMi/hiui/commit/df353062b0d0b0cf3bd4e62280df20ba7e7a4774) Thanks [@zyprepare](https://github.com/zyprepare)! - fix(table): 修复设置 scrollbar 后冻结列失效问题 (#3329)
|
|
103
|
+
|
|
3
104
|
## 4.12.0
|
|
4
105
|
|
|
5
106
|
### Minor Changes
|
package/lib/cjs/BaseTable.js
CHANGED
|
@@ -209,7 +209,8 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
209
209
|
bodyTableRef = providedValue.bodyTableRef,
|
|
210
210
|
scrollWidth = providedValue.scrollWidth,
|
|
211
211
|
footerRender = providedValue.footerRender,
|
|
212
|
-
scrollbar = providedValue.scrollbar
|
|
212
|
+
scrollbar = providedValue.scrollbar,
|
|
213
|
+
stretchHeight = providedValue.stretchHeight;
|
|
213
214
|
var hasBorder = borderedProp !== null && borderedProp !== void 0 ? borderedProp : bordered;
|
|
214
215
|
var hasScrollToLeft = scrollSize.scrollLeft === 0;
|
|
215
216
|
var hasLeftFixedColumns = leftFrozenColKeys.length > 0;
|
|
@@ -217,23 +218,35 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
217
218
|
var extraFooter = extra && extra.footer;
|
|
218
219
|
var alwaysFixedColumn = fixedColumnTrigger === 'always';
|
|
219
220
|
var renderTable = function renderTable() {
|
|
220
|
-
var
|
|
221
|
-
ref: scrollBodyElementRef,
|
|
222
|
-
className: prefixCls + "-content",
|
|
223
|
-
onScroll: onTableBodyScroll,
|
|
224
|
-
style: {
|
|
225
|
-
// 表格宽度大于div宽度才出现横向滚动条
|
|
226
|
-
overflowX: canScroll ? 'scroll' : undefined
|
|
227
|
-
}
|
|
228
|
-
}, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
221
|
+
var tableContent = /*#__PURE__*/React__default["default"].createElement("table", {
|
|
229
222
|
ref: bodyTableRef,
|
|
230
223
|
style: {
|
|
231
224
|
width: canScroll && scrollWidth !== undefined ? scrollWidth : '100%'
|
|
232
225
|
}
|
|
233
226
|
}, /*#__PURE__*/React__default["default"].createElement(ColGroupContent.ColGroupContent, null), /*#__PURE__*/React__default["default"].createElement(TheadContent.TheadContent, null), /*#__PURE__*/React__default["default"].createElement(TbodyContent.TbodyContent, {
|
|
234
227
|
emptyContent: emptyContent
|
|
235
|
-
}))
|
|
236
|
-
var
|
|
228
|
+
}));
|
|
229
|
+
var singleTableContent = /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
|
230
|
+
className: prefixCls + "-content"
|
|
231
|
+
}, !scrollbar ? {
|
|
232
|
+
ref: scrollBodyElementRef,
|
|
233
|
+
onScroll: onTableBodyScroll,
|
|
234
|
+
style: {
|
|
235
|
+
// 表格宽度大于div宽度才出现横向滚动条
|
|
236
|
+
overflowX: canScroll ? 'scroll' : undefined
|
|
237
|
+
}
|
|
238
|
+
} : {}), !scrollbar ? tableContent : ( /*#__PURE__*/React__default["default"].createElement(Scrollbar__default["default"], Object.assign({
|
|
239
|
+
ref: scrollBodyElementRef,
|
|
240
|
+
onScroll: onTableBodyScroll
|
|
241
|
+
}, typeAssertion.isObject(scrollbar) ? scrollbar : null), tableContent)));
|
|
242
|
+
var _a = getTableHeaderProps(),
|
|
243
|
+
style = _a.style,
|
|
244
|
+
restTableHeaderProps = tslib.__rest(_a, ["style"]);
|
|
245
|
+
var doubleTableContent = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", Object.assign({}, restTableHeaderProps, {
|
|
246
|
+
style: Object.assign(Object.assign({}, style), {
|
|
247
|
+
overflow: 'unset'
|
|
248
|
+
})
|
|
249
|
+
}), /*#__PURE__*/React__default["default"].createElement(TableHeader.TableHeader, null), extraHeader ? ( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
237
250
|
style: {
|
|
238
251
|
position: 'absolute',
|
|
239
252
|
right: 0,
|
|
@@ -244,7 +257,7 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
244
257
|
}, extraHeader)) : null), /*#__PURE__*/React__default["default"].createElement(TableBody.TableBody, {
|
|
245
258
|
emptyContent: emptyContent
|
|
246
259
|
}));
|
|
247
|
-
return needDoubleTable ? doubleTableContent :
|
|
260
|
+
return needDoubleTable ? doubleTableContent : singleTableContent;
|
|
248
261
|
};
|
|
249
262
|
var renderFreezeShadow = function renderFreezeShadow() {
|
|
250
263
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, (alwaysFixedColumn || scrollSize.scrollLeft > 0) && leftFrozenColKeys.length > 0 ? ( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -266,7 +279,7 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
266
279
|
bottom: stickyFooterBottom
|
|
267
280
|
} : undefined
|
|
268
281
|
}, typeAssertion.isFunction(footerRender) ? footerRender( /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, extraFooter)) : extraFooter);
|
|
269
|
-
var cls = classname.cx(prefixCls, className, hasBorder && prefixCls + "--bordered", (hasScrollToLeft || hasLeftFixedColumns) && data.length > 0 && prefixCls + "--bordered-left-none", striped && prefixCls + "--striped", size && prefixCls + "--size-" + size, virtual && prefixCls + "--virtual");
|
|
282
|
+
var cls = classname.cx(prefixCls, className, hasBorder && prefixCls + "--bordered", (hasScrollToLeft || hasLeftFixedColumns) && data.length > 0 && prefixCls + "--bordered-left-none", striped && prefixCls + "--striped", size && prefixCls + "--size-" + size, virtual && prefixCls + "--virtual", data.length === 0 && prefixCls + "--empty", prefixCls + "--" + (needDoubleTable ? 'double' : 'single'), stretchHeight && prefixCls + "--stretch-height");
|
|
270
283
|
return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
|
271
284
|
ref: ref,
|
|
272
285
|
role: role,
|
package/lib/cjs/Table.js
CHANGED
|
@@ -47,7 +47,7 @@ var _prefix = classname.getPrefixCls('table');
|
|
|
47
47
|
* 需要使用双表格的场景对应的 API
|
|
48
48
|
* 这些场景下的功能无法通过单表格实现,故而设计成双表格,即表头和表体分别用一个 table 实现
|
|
49
49
|
*/
|
|
50
|
-
var DOUBLE_TABLE_SCENE = ['maxHeight', 'sticky', 'stickyTop', 'setting', 'virtual'];
|
|
50
|
+
var DOUBLE_TABLE_SCENE = ['needDoubleTable', 'maxHeight', 'sticky', 'stickyTop', 'setting', 'virtual', 'stretchHeight'];
|
|
51
51
|
var STANDARD_PRESET = {
|
|
52
52
|
striped: true,
|
|
53
53
|
bordered: true,
|
package/lib/cjs/TableRow.js
CHANGED
|
@@ -146,7 +146,7 @@ var TableRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
146
146
|
// ** ************** 行状态管理 *************** *//
|
|
147
147
|
var highlighted = isHighlightedRow(rowId);
|
|
148
148
|
var hasError = isErrorRow(rowId);
|
|
149
|
-
var cls = classname.cx(prefixCls + "-row", showRowHighlight && prefixCls + "-row--hover", striped && (rowIndex & 1) ===
|
|
149
|
+
var cls = classname.cx(prefixCls + "-row", showRowHighlight && prefixCls + "-row--hover", striped && (rowIndex & 1) === 0 && prefixCls + "-row--striped", hasError && prefixCls + "-row--error", highlighted && prefixCls + "-row--highlight", draggable && prefixCls + "-row--draggable", draggable && dragging && prefixCls + "-row--dragging", draggable && dragDirection && prefixCls + "-row--drag-" + dragDirection, isSumRow && prefixCls + "-row--total", isAvgRow && prefixCls + "-row--avg", virtual && prefixCls + "-row--virtual", className);
|
|
150
150
|
var firstColumn = flattedColumnsWithoutChildren.find(function (item) {
|
|
151
151
|
return item.dataKey !== Table.SELECTION_DATA_KEY && item.dataKey !== BaseTable.EMBED_DATA_KEY;
|
|
152
152
|
});
|
|
@@ -19,7 +19,6 @@ var React = require('react');
|
|
|
19
19
|
var classname = require('@hi-ui/classname');
|
|
20
20
|
var env = require('@hi-ui/env');
|
|
21
21
|
var icons = require('@hi-ui/icons');
|
|
22
|
-
var iconButton = require('@hi-ui/icon-button');
|
|
23
22
|
var useToggle = require('@hi-ui/use-toggle');
|
|
24
23
|
var useLatest = require('@hi-ui/use-latest');
|
|
25
24
|
var core = require('@hi-ui/core');
|
|
@@ -112,7 +111,8 @@ var TableSettingMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
112
111
|
className: cls
|
|
113
112
|
}, trigger ? ( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
114
113
|
className: prefixCls + "__trigger"
|
|
115
|
-
}, trigger)) : ( /*#__PURE__*/React__default["default"].createElement(
|
|
114
|
+
}, trigger)) : ( /*#__PURE__*/React__default["default"].createElement(button.Button, {
|
|
115
|
+
appearance: "text",
|
|
116
116
|
icon: /*#__PURE__*/React__default["default"].createElement(icons.EllipsisVerticalOutlined, null),
|
|
117
117
|
onClick: menuVisibleAction.not
|
|
118
118
|
})), /*#__PURE__*/React__default["default"].createElement(drawer.Drawer, {
|
|
@@ -126,6 +126,7 @@ var TableSettingMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
126
126
|
}, /*#__PURE__*/React__default["default"].createElement(button.Button, {
|
|
127
127
|
key: 0,
|
|
128
128
|
className: prefixCls + "__btn-cancel",
|
|
129
|
+
appearance: "line",
|
|
129
130
|
onClick: resetLatest
|
|
130
131
|
}, i18n.get('table.reset')), /*#__PURE__*/React__default["default"].createElement(button.Button, {
|
|
131
132
|
key: 1,
|
|
@@ -15,7 +15,6 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var useUpdateEffect = require('@hi-ui/use-update-effect');
|
|
17
17
|
var useUncontrolledState = require('@hi-ui/use-uncontrolled-state');
|
|
18
|
-
var useLatest = require('@hi-ui/use-latest');
|
|
19
18
|
var index = require('../utils/index.js');
|
|
20
19
|
var DEFAULT_COLUMNS = [];
|
|
21
20
|
/**
|
|
@@ -44,16 +43,15 @@ var useColSorter = function useColSorter(_ref) {
|
|
|
44
43
|
return column.dataKey;
|
|
45
44
|
}));
|
|
46
45
|
}, [columns]);
|
|
47
|
-
var columnsLatestRef = useLatest.useLatestRef(columns);
|
|
48
46
|
var sortedCols = React.useMemo(function () {
|
|
49
|
-
var columnsMap =
|
|
47
|
+
var columnsMap = columns.reduce(function (prev, cur) {
|
|
50
48
|
prev[cur.dataKey] = cur;
|
|
51
49
|
return prev;
|
|
52
50
|
}, {});
|
|
53
51
|
return sortedColKeys.map(function (colKey) {
|
|
54
52
|
return columnsMap[colKey];
|
|
55
53
|
}).filter(Boolean);
|
|
56
|
-
}, [sortedColKeys,
|
|
54
|
+
}, [sortedColKeys, columns]);
|
|
57
55
|
React.useEffect(function () {
|
|
58
56
|
if (!cacheKey) return;
|
|
59
57
|
window.localStorage.setItem(cacheKey, JSON.stringify(sortedColKeys));
|
|
@@ -35,6 +35,9 @@ var useColWidth = function useColWidth(_ref) {
|
|
|
35
35
|
}),
|
|
36
36
|
colWidths = _React$useState[0],
|
|
37
37
|
setColWidths = _React$useState[1];
|
|
38
|
+
/**
|
|
39
|
+
* 根据实际内容区(table 的第一行)渲染,再次精确收集并设置每列宽度
|
|
40
|
+
*/
|
|
38
41
|
var getWidths = React.useCallback(function (measureRowElement) {
|
|
39
42
|
if (measureRowElement && measureRowElement.childNodes) {
|
|
40
43
|
// 超出的宽度,即每列真实的宽度超出设置的宽度的总和
|
|
@@ -105,16 +108,12 @@ var useColWidth = function useColWidth(_ref) {
|
|
|
105
108
|
}
|
|
106
109
|
}, [getVirtualWidths, virtual]);
|
|
107
110
|
useUpdateEffect.useUpdateEffect(function () {
|
|
111
|
+
// 当列变化时,重新设置列宽
|
|
108
112
|
setColWidths(index.getGroupItemWidth(columns).colWidths);
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// ? // 走更新逻辑
|
|
114
|
-
// getWidths(measureRowElementRef.current)
|
|
115
|
-
// : // 当列数变化时重新走初始化逻辑
|
|
116
|
-
// getGroupItemWidth(columns)
|
|
117
|
-
// })
|
|
113
|
+
// 重新设置列宽后,真实的宽度会发生变化,基于真实的宽度再次重新计算出合适的列宽
|
|
114
|
+
requestAnimationFrame(function () {
|
|
115
|
+
setColWidths(getWidths(measureRowElementRef.current));
|
|
116
|
+
});
|
|
118
117
|
}, [columns]);
|
|
119
118
|
/**
|
|
120
119
|
* 根据实际内容区(table 的第一行)渲染,再次精确收集并设置每列宽度
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Object.defineProperty(exports, '__esModule', {
|
|
13
13
|
value: true
|
|
14
14
|
});
|
|
15
|
-
var css_248z = ".hi-v4-table {-webkit-box-sizing: border-box;box-sizing: border-box;font-size: 14px;position: relative;}.hi-v4-table table {width: 100%;text-align: left;background-color: var(--hi-v4-color-static-white, #fff);border-radius: 2px 2px 0 0;border-spacing: 0;border-collapse: separate;display: table;table-layout: fixed;}.hi-v4-table__wrapper {position: relative;z-index: 0;}.hi-v4-table__switcher.hi-v4-icon-button {color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-table__switcher--expanded.hi-v4-icon-button {color: var(--hi-v4-color-primary-400, var(--hi-v4-color-brandblue-400, #4a9eff));}.hi-v4-table--size-md .hi-v4-table-header-cell {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-md .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-header-cell {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg .hi-v4-table-header-cell {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--bordered > .hi-v4-table__wrapper {border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered > .hi-v4-table__wrapper .hi-v4-table-header-cell, .hi-v4-table--bordered > .hi-v4-table__wrapper .hi-v4-table-cell {border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered > .hi-v4-table__wrapper .hi-v4-table-row:last-child .hi-v4-table-cell {border-bottom: none;}.hi-v4-table--bordered.hi-v4-table--bordered-left-none > .hi-v4-table__wrapper {border-left: none;}.hi-v4-table--bordered.hi-v4-table--virtual > .hi-v4-table__wrapper .hi-v4-table-row .hi-v4-table-cell {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered.hi-v4-table--virtual > .hi-v4-table__wrapper .hi-v4-table-virtual-row:last-child .hi-v4-table-row .hi-v4-table-cell {border-bottom: none;}.hi-v4-table--sticky {position: sticky;top: 0;}.hi-v4-table--virtual {width: 100%;overflow: hidden;}.hi-v4-table--virtual .hi-v4-table-cell {-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v4-table-header {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;overflow: hidden;}.hi-v4-table-header__resizable {position: relative;background-clip: padding-box;}.hi-v4-table-header__resizable:hover {background-color: var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table-header__resizable:hover .hi-v4-table-header__resizable-handle {border-left-color: var(--hi-v4-color-gray-200, #ebedf0);border-right-color: var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table-header__resizable-handle {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;margin-right: -2px;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;z-index: 1;}.hi-v4-table__selection-col > .hi-v4-table-header__resizable-handle {display: none;}.hi-v4-table-header__resizable-handle:hover {background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-left-color: var(--hi-v4-color-gray-200, #ebedf0);border-right-color: var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table-header-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-medium, 500);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);}.hi-v4-table-header-cell.hi-v4-table__embed-col, .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active {background-color: var(--hi-v4-color-gray-100, #f2f4f7);}.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active[data-sticky] {background-color: var(--hi-v4-color-gray-100, #f2f4f7);}.hi-v4-table-row--fixed-top, .hi-v4-table-row--fixed-bottom {position: sticky;z-index: 6;}.hi-v4-table-row--fixed-top {top: 0;}.hi-v4-table-row--fixed-bottom {bottom: 0;}.hi-v4-table-row--fixed-bottom .hi-v4-table-cell {border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);}.hi-v4-table-row:has(+ .hi-v4-table-row--fixed-bottom) .hi-v4-table-cell {border-bottom: none;}.hi-v4-table-row--hover:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-row--striped > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-row--expanded > .hi-v4-table-cell {color: var(--hi-v4-color-gray-800, #1f2937);}.hi-v4-table-row--error > .hi-v4-table-cell {color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959));}.hi-v4-table-row--highlight > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-row--dragging > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-row--drag-top > .hi-v4-table-cell {border-top: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.hi-v4-table-row--drag-bottom > .hi-v4-table-cell {border-bottom: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.hi-v4-table-row--avg > .hi-v4-table-cell, .hi-v4-table-row--total > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-row--avg:hover > .hi-v4-table-cell, .hi-v4-table-row--total:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-row--virtual {display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v4-table-header .hi-v4-table-header-col, .hi-v4-table-header .hi-v4-table-col {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-body .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-body .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-header .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-header .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-gray-100, #f2f4f7);}.hi-v4-table-body, .hi-v4-table-content {position: relative;overflow: auto;}.hi-v4-table-body--virtual-holder {overflow: hidden;}.hi-v4-table-cell {word-break: break-word;border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-700, #1f2733);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);background-color: var(--hi-v4-color-static-white, #fff);}.hi-v4-table-cell__indent {display: inline-block;vertical-align: middle;width: 14px;height: 100%;margin-right: var(--hi-v4-spacing-1, 2px);}.hi-v4-table-cell__switcher.hi-v4-icon-button {margin-right: var(--hi-v4-spacing-1, 2px);color: var(--hi-v4-color-gray-500, #929aa6);vertical-align: middle;}.hi-v4-table-cell.hi-v4-table__embed-col, .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table-cell.hi-v4-table-cell__col--highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-cell.hi-v4-table-cell__col--hovered-highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-freeze-shadow {position: absolute;top: 0;bottom: 0;z-index: 20;pointer-events: none;overflow: hidden;height: 100%;width: 200px;}.hi-v4-table-freeze-shadow--left {margin-right: 10px;left: 0;-webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);}.hi-v4-table-freeze-shadow--right {margin-left: 10px;right: 0;-webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);}.hi-v4-table-header-filter-dropdown__trigger.hi-v4-icon-button {margin-left: 4px;}.hi-v4-table-header-filter-dropdown__content {width: 124px;padding: var(--hi-v4-spacing-6, 12px) var(--hi-v4-spacing-4, 8px);font-weight: var(--hi-v4-text-weight-normal, 400);}.hi-v4-table-header-filter-dropdown__item {margin-top: var(--hi-v4-spacing-4, 8px);padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);border-radius: var(--hi-v4-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;cursor: pointer;color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);}.hi-v4-table-header-filter-dropdown__item:first-child {margin-top: 0;}.hi-v4-table-header-filter-dropdown__item:hover {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-header-filter-dropdown__item--active {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-header-filter-dropdown__item--active:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-header-filter-sorter {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;height: 20px;vertical-align: middle;margin-left: 6px;}.hi-v4-table-header-filter-sorter__icon {display: inline-block;height: 8px;cursor: pointer;overflow: hidden;font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-table-header-filter-sorter__icon svg {position: relative;top: -5px;}.hi-v4-table-header-filter-sorter__icon--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.hi-v4-table-header-filter-custom__trigger {margin-left: 6px;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer;}.hi-v4-table-header-filter-custom__content {padding: 12px 8px;}.hi-v4-table-embed-row {position: relative;z-index: 0;}.hi-v4-table-embed-row > td {background-color: var(--hi-v4-color-gray-200, #ebedf0);padding: var(--hi-v4-spacing-10, 20px);}.hi-v4-table-setting {position: absolute;height: 100%;z-index: 11;-webkit-box-sizing: border-box;box-sizing: border-box;right: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);border-bottom: none;border-top: none;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer;font-size: var(--hi-v4-text-size-sm, 0.75rem);width: 18px;background: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-setting__btn-group {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v4-table-setting-item {position: relative;padding-top: var(--hi-v4-spacing-1, 2px);padding-bottom: var(--hi-v4-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v4-table-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;cursor: move;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v4-border-radius-md, 4px);}.hi-v4-table-setting-item__wrap:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-setting-item--dragging .hi-v4-table-setting-item__wrap {opacity: 0.6;}.hi-v4-table-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v4-color-static-white, #fff);border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-radius: 100%;}.hi-v4-table-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));left: 0;width: 100%;}.hi-v4-table-setting-item::before, .hi-v4-table-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v4-table-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v4-table-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v4-table-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v4-table-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}.hi-v4-table-pagination {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: 8px;padding: var(--hi-v4-spacing-6, 12px) 0;background-color: var(--hi-v4-color-static-white, #fff);}.hi-v4-table-pagination--placement-left {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.hi-v4-table-pagination--placement-right {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v4-table-pagination--placement-middle {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.hi-v4-table-body-empty-content td {text-align: center;padding: var(--hi-v4-spacing-12, 24px) 0;}.hi-v4-table--bordered .hi-v4-table-body-empty-content td {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);}.hi-v4-setting-drawer .hi-v4-setting-footer {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.hi-v4-setting-drawer .hi-v4-setting-footer__extra {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;}.hi-v4-setting-item {position: relative;padding-top: var(--hi-v4-spacing-1, 2px);padding-bottom: var(--hi-v4-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v4-setting-item:not(.hi-v4-setting-item--drag-disabled) .hi-v4-setting-item__wrap {cursor: move;}.hi-v4-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v4-border-radius-md, 4px);}.hi-v4-setting-item__wrap:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-setting-item--dragging .hi-v4-setting-item__wrap {opacity: 0.6;}.hi-v4-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v4-color-static-white, #fff);border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-radius: 100%;}.hi-v4-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));left: 0;width: 100%;}.hi-v4-setting-item::before, .hi-v4-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v4-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v4-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v4-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v4-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}";
|
|
15
|
+
var css_248z = ".hi-v5-table {-webkit-box-sizing: border-box;box-sizing: border-box;font-size: 14px;position: relative;}.hi-v5-table table {width: 100%;text-align: left;background-color: var(--hi-v5-color-static-white, #fff);border-radius: 2px 2px 0 0;border-spacing: 0;border-collapse: separate;display: table;table-layout: fixed;}.hi-v5-table__wrapper {position: relative;z-index: 0;border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--stretch-height {height: 100%;overflow: hidden;}.hi-v5-table--stretch-height .hi-v5-table__wrapper {height: 100%;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v5-table--stretch-height .hi-v5-table__wrapper .hi-v5-table-body {-webkit-box-flex: 1;-ms-flex-positive: 1;flex-grow: 1;overflow: auto;}.hi-v5-table--stretch-height.hi-v5-table--empty .hi-v5-table__wrapper .hi-v5-table-body table {height: 100%;}.hi-v5-table--stretch-height.hi-v5-table--empty .hi-v5-scrollbar__wrapper {height: 100%;}.hi-v5-table__switcher.hi-v5-icon-button {color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-table__switcher--expanded.hi-v5-icon-button {color: var(--hi-v5-color-primary-400, var(--hi-v5-color-brandblue-400, #4d82ff));}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-sm .hi-v5-table-header-cell {height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-sm .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-md .hi-v5-table-header-cell {height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-md .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-lg .hi-v5-table-header-cell {height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-lg .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table--virtual.hi-v5-table--size-sm .hi-v5-table-header-cell {height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table--virtual.hi-v5-table--size-sm .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {min-height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table--virtual.hi-v5-table--size-md .hi-v5-table-header-cell {height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table--virtual.hi-v5-table--size-md .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {min-height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table--virtual.hi-v5-table--size-lg .hi-v5-table-header-cell {height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table--virtual.hi-v5-table--size-lg .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {min-height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table--bordered > .hi-v5-table__wrapper {border-left: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);border-right: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--bordered > .hi-v5-table__wrapper .hi-v5-table-header-cell, .hi-v5-table--bordered > .hi-v5-table__wrapper .hi-v5-table-cell {border-left: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--bordered > .hi-v5-table__wrapper .hi-v5-table-row:last-child .hi-v5-table-cell {border-bottom: none;}.hi-v5-table--bordered.hi-v5-table--bordered-left-none > .hi-v5-table__wrapper {border-left: none;}.hi-v5-table--bordered.hi-v5-table--virtual > .hi-v5-table__wrapper .hi-v5-table-row .hi-v5-table-cell {border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--bordered.hi-v5-table--virtual > .hi-v5-table__wrapper .hi-v5-table-virtual-row:last-child .hi-v5-table-row .hi-v5-table-cell {border-bottom: none;}.hi-v5-table--sticky {position: sticky;top: 0;}.hi-v5-table--virtual {width: 100%;overflow: hidden;}.hi-v5-table--virtual .hi-v5-table-cell {-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-table-header {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;overflow: hidden;}.hi-v5-table-header__resizable {position: relative;background-clip: padding-box;}.hi-v5-table-header__resizable:hover {background-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header__resizable:hover .hi-v5-table-header__resizable-handle {border-left-color: var(--hi-v5-color-gray-200, #e6e8eb);border-right-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header__resizable-handle {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;margin-right: -2px;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;z-index: 1;}.hi-v5-table__selection-col > .hi-v5-table-header__resizable-handle {display: none;}.hi-v5-table-header__resizable-handle:hover {background-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));border-left-color: var(--hi-v5-color-gray-200, #e6e8eb);border-right-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header-cell {-webkit-box-sizing: border-box;box-sizing: border-box;background-color: var(--hi-v5-color-static-white, #fff);color: var(--hi-v5-color-gray-500, #91959e);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-medium, 500);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-8, 16px);border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header-cell.hi-v5-table__embed-col {padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table-header-cell.hi-v5-table__selection-col {padding: 0 !important;text-align: center !important;}.hi-v5-table-header-cell.hi-v5-table-header-cell__col--highlight, .hi-v5-table-header-cell.hi-v5-table-header-cell__col--hovered-highlight, .hi-v5-table-header-cell.hi-v5-table-header-cell__col--active {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-table-header-cell.hi-v5-table-header-cell__col--highlight[data-sticky], .hi-v5-table-header-cell.hi-v5-table-header-cell__col--hovered-highlight[data-sticky], .hi-v5-table-header-cell.hi-v5-table-header-cell__col--active[data-sticky] {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-table-row--fixed-top, .hi-v5-table-row--fixed-bottom {position: sticky;z-index: 6;}.hi-v5-table-row--fixed-top {top: 0;}.hi-v5-table-row--fixed-bottom {bottom: 0;}.hi-v5-table-row--fixed-bottom .hi-v5-table-cell {border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #dbdde0);}.hi-v5-table-row:has(+ .hi-v5-table-row--fixed-bottom) .hi-v5-table-cell {border-bottom: none;}.hi-v5-table-row--hover:hover > .hi-v5-table-cell {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-row--striped > .hi-v5-table-cell {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-row--expanded > .hi-v5-table-cell {color: var(--hi-v5-color-gray-800, #1d1e26);}.hi-v5-table-row--error > .hi-v5-table-cell {color: var(--hi-v5-color-danger-500, var(--hi-v5-color-red-500, #fa4646));}.hi-v5-table-row--highlight > .hi-v5-table-cell {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-row--dragging > .hi-v5-table-cell {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-row--drag-top > .hi-v5-table-cell {border-top: 2px dashed var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-table-row--drag-bottom > .hi-v5-table-cell {border-bottom: 2px dashed var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-table-row--avg > .hi-v5-table-cell, .hi-v5-table-row--total > .hi-v5-table-cell {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-row--avg:hover > .hi-v5-table-cell, .hi-v5-table-row--total:hover > .hi-v5-table-cell {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-row--virtual {display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-table-header .hi-v5-table-header-col, .hi-v5-table-header .hi-v5-table-col {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-body .hi-v5-table-header-col[data-hover-highlight], .hi-v5-table-body .hi-v5-table-col[data-hover-highlight] {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-header .hi-v5-table-header-col[data-hover-highlight], .hi-v5-table-header .hi-v5-table-col[data-hover-highlight] {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-table-body, .hi-v5-table-content {position: relative;overflow: auto;}.hi-v5-table-body--virtual-holder {overflow: hidden;}.hi-v5-table-cell {-webkit-box-sizing: border-box;box-sizing: border-box;word-break: break-word;border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-normal, 400);color: var(--hi-v5-color-gray-700, #1a1d26);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-8, 16px);background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-table-cell__indent {display: inline-block;vertical-align: middle;width: 14px;height: 100%;margin-right: var(--hi-v5-spacing-1, 2px);}.hi-v5-table-cell__switcher.hi-v5-icon-button {margin-right: var(--hi-v5-spacing-1, 2px);color: var(--hi-v5-color-gray-500, #91959e);vertical-align: middle;}.hi-v5-table-cell.hi-v5-table__embed-col {padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table-cell.hi-v5-table__selection-col {padding: 0 !important;text-align: center !important;}.hi-v5-table-cell.hi-v5-table-cell__col--highlight {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-cell.hi-v5-table-cell__col--hovered-highlight {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-freeze-shadow {position: absolute;top: 0;bottom: 0;z-index: 20;pointer-events: none;overflow: hidden;height: 100%;width: 200px;}.hi-v5-table-freeze-shadow--left {margin-right: 10px;left: 0;-webkit-box-shadow: var(--hi-v5-shadow-sm, 2px 0 4px 0 rgba(26, 29, 38, 0.02), 2px 0 4px 0 rgba(26, 29, 38, 0.02), 1px 0 2px -2px rgba(26, 29, 38, 0.02));box-shadow: var(--hi-v5-shadow-sm, 2px 0 4px 0 rgba(26, 29, 38, 0.02), 2px 0 4px 0 rgba(26, 29, 38, 0.02), 1px 0 2px -2px rgba(26, 29, 38, 0.02));}.hi-v5-table-freeze-shadow--right {margin-left: 10px;right: 0;-webkit-box-shadow: var(--hi-v5-shadow-sm, -2px 0 8px 2px rgba(26, 29, 38, 0.02), -2px 0 4px 0 rgba(26, 29, 38, 0.02), -1px 0 2px -2px rgba(26, 29, 38, 0.02));box-shadow: var(--hi-v5-shadow-sm, -2px 0 8px 2px rgba(26, 29, 38, 0.02), -2px 0 4px 0 rgba(26, 29, 38, 0.02), -1px 0 2px -2px rgba(26, 29, 38, 0.02));}.hi-v5-table-header-filter-dropdown__trigger.hi-v5-icon-button {margin-left: 4px;}.hi-v5-table-header-filter-dropdown__content {width: 124px;padding: var(--hi-v5-spacing-6, 12px) var(--hi-v5-spacing-4, 8px);font-weight: var(--hi-v5-text-weight-normal, 400);}.hi-v5-table-header-filter-dropdown__item {margin-top: var(--hi-v5-spacing-4, 8px);padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;cursor: pointer;color: var(--hi-v5-color-gray-700, #1a1d26);font-size: var(--hi-v5-text-size-md, 0.875rem);}.hi-v5-table-header-filter-dropdown__item:first-child {margin-top: 0;}.hi-v5-table-header-filter-dropdown__item:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-header-filter-dropdown__item--active {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-header-filter-dropdown__item--active:hover {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-header-filter-sorter {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;height: 20px;vertical-align: middle;margin-left: 6px;}.hi-v5-table-header-filter-sorter__icon {display: inline-block;height: 8px;cursor: pointer;overflow: hidden;font-weight: var(--hi-v5-text-weight-normal, 400);color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-table-header-filter-sorter__icon svg {position: relative;top: -5px;}.hi-v5-table-header-filter-sorter__icon--active {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-table-header-filter-custom__trigger {margin-left: 6px;color: var(--hi-v5-color-gray-500, #91959e);cursor: pointer;}.hi-v5-table-header-filter-custom__content {padding: var(--hi-v5-spacing-6, 12px);}.hi-v5-table-embed-row {position: relative;z-index: 0;}.hi-v5-table-embed-row > td {background-color: var(--hi-v5-color-gray-50, #f2f4f7);padding: var(--hi-v5-spacing-6, 12px);}.hi-v5-table-setting {position: absolute;height: calc(100% - 2px);z-index: 11;-webkit-box-sizing: border-box;box-sizing: border-box;right: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;color: var(--hi-v5-color-gray-500, #91959e);cursor: pointer;font-size: var(--hi-v5-text-size-sm, 0.75rem);width: 18px;background: var(--hi-v5-color-static-white, #fff);}.hi-v5-table-setting__btn-group {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v5-table-setting-item {position: relative;padding-top: var(--hi-v5-spacing-1, 2px);padding-bottom: var(--hi-v5-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-table-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;cursor: move;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v5-border-radius-lg, 6px);}.hi-v5-table-setting-item__wrap:hover {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-setting-item--dragging .hi-v5-table-setting-item__wrap {opacity: 0.6;}.hi-v5-table-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v5-color-static-white, #fff);border: 1px solid var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));border-radius: 100%;}.hi-v5-table-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));left: 0;width: 100%;}.hi-v5-table-setting-item::before, .hi-v5-table-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v5-table-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v5-table-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v5-table-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v5-table-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}.hi-v5-table-pagination {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: 8px;padding: var(--hi-v5-spacing-6, 12px) 0;background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-table-pagination--placement-left {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.hi-v5-table-pagination--placement-right {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v5-table-pagination--placement-middle {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.hi-v5-table--empty th:first-child {border-left: none !important;}.hi-v5-table--empty td {text-align: center;padding: var(--hi-v5-spacing-12, 24px) 0;}.hi-v5-setting-drawer .hi-v5-setting-footer {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.hi-v5-setting-drawer .hi-v5-setting-footer__extra {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;}.hi-v5-setting-item {position: relative;padding-top: var(--hi-v5-spacing-1, 2px);padding-bottom: var(--hi-v5-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-setting-item:not(.hi-v5-setting-item--drag-disabled) .hi-v5-setting-item__wrap {cursor: move;}.hi-v5-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v5-border-radius-lg, 6px);}.hi-v5-setting-item__wrap:hover {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-setting-item--dragging .hi-v5-setting-item__wrap {opacity: 0.6;}.hi-v5-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v5-color-static-white, #fff);border: 1px solid var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));border-radius: 100%;}.hi-v5-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));left: 0;width: 100%;}.hi-v5-setting-item::before, .hi-v5-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v5-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v5-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v5-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v5-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}";
|
|
16
16
|
var __styleInject__ = require('@hi-ui/style-inject')["default"];
|
|
17
17
|
__styleInject__(css_248z);
|
|
18
18
|
exports["default"] = css_248z;
|
package/lib/cjs/use-table.js
CHANGED
|
@@ -77,6 +77,7 @@ var useTable = function useTable(_a) {
|
|
|
77
77
|
defaultExpandAll = _a$defaultExpandAll === void 0 ? false : _a$defaultExpandAll,
|
|
78
78
|
onLoadChildren = _a.onLoadChildren,
|
|
79
79
|
maxHeight = _a.maxHeight,
|
|
80
|
+
stretchHeight = _a.stretchHeight,
|
|
80
81
|
sticky = _a.sticky,
|
|
81
82
|
_a$stickyTop = _a.stickyTop,
|
|
82
83
|
stickyTop = _a$stickyTop === void 0 ? 0 : _a$stickyTop,
|
|
@@ -98,7 +99,7 @@ var useTable = function useTable(_a) {
|
|
|
98
99
|
onChange = _a.onChange,
|
|
99
100
|
onHighlightedCol = _a.onHighlightedCol,
|
|
100
101
|
innerRef = _a.innerRef,
|
|
101
|
-
rootProps = tslib.__rest(_a, ["data", "columns", "defaultFixedToColumn", "fixedToColumn", "onFixedToColumn", "scrollWidth", "resizable", "tableWidthAdjustOnResize", "errorRowKeys", "highlightedColKeys", "highlightedRowKeys", "showColHighlight", "showRowHighlight", "highlightRowOnDoubleClick", "defaultExpandedRowKeys", "expandedRowKeys", "onExpand", "defaultExpandAll", "onLoadChildren", "maxHeight", "sticky", "stickyTop", "draggable", "onDragStart", "onDrop", "onDropEnd", "showColMenu", "rowSelection", "cellRender", "footerRender", "fieldKey", "virtual", "scrollbar", "rowClassName", "cellClassName", "onChange", "onHighlightedCol", "innerRef"]);
|
|
102
|
+
rootProps = tslib.__rest(_a, ["data", "columns", "defaultFixedToColumn", "fixedToColumn", "onFixedToColumn", "scrollWidth", "resizable", "tableWidthAdjustOnResize", "errorRowKeys", "highlightedColKeys", "highlightedRowKeys", "showColHighlight", "showRowHighlight", "highlightRowOnDoubleClick", "defaultExpandedRowKeys", "expandedRowKeys", "onExpand", "defaultExpandAll", "onLoadChildren", "maxHeight", "stretchHeight", "sticky", "stickyTop", "draggable", "onDragStart", "onDrop", "onDropEnd", "showColMenu", "rowSelection", "cellRender", "footerRender", "fieldKey", "virtual", "scrollbar", "rowClassName", "cellClassName", "onChange", "onHighlightedCol", "innerRef"]);
|
|
102
103
|
/**
|
|
103
104
|
* 获取 key 字段值
|
|
104
105
|
*/
|
|
@@ -490,7 +491,6 @@ var useTable = function useTable(_a) {
|
|
|
490
491
|
var style = {
|
|
491
492
|
position: sticky ? 'sticky' : 'relative',
|
|
492
493
|
top: sticky ? stickyTop : undefined,
|
|
493
|
-
boxShadow: maxHeight ? '0px 2px 6px 0px rgba(0,0,0,0.12)' : undefined,
|
|
494
494
|
overflow: 'hidden',
|
|
495
495
|
zIndex: sticky ? 10 : undefined
|
|
496
496
|
};
|
|
@@ -498,7 +498,7 @@ var useTable = function useTable(_a) {
|
|
|
498
498
|
style: style,
|
|
499
499
|
'data-sticky': domUtils.setAttrStatus(sticky)
|
|
500
500
|
};
|
|
501
|
-
}, [sticky, stickyTop
|
|
501
|
+
}, [sticky, stickyTop]);
|
|
502
502
|
var isTreeView = React.useMemo(function () {
|
|
503
503
|
return typeAssertion.isArrayNonEmpty(data) ? data.some(function (row) {
|
|
504
504
|
// @ts-ignore
|
|
@@ -525,7 +525,7 @@ var useTable = function useTable(_a) {
|
|
|
525
525
|
if (activeSorterColumn) {
|
|
526
526
|
var sortedColumn = index.getColumnByDataKey(columns, activeSorterColumn);
|
|
527
527
|
var sorter = sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.sorter;
|
|
528
|
-
if (sorter) {
|
|
528
|
+
if (typeof sorter === 'function') {
|
|
529
529
|
activeSorterType === 'ascend' ? _data.sort(sorter) : _data.sort(sorter).reverse();
|
|
530
530
|
// 平铺的树形结构排序
|
|
531
531
|
if (_data.some(function (d) {
|
|
@@ -554,6 +554,7 @@ var useTable = function useTable(_a) {
|
|
|
554
554
|
setActiveSorterType: setActiveSorterType,
|
|
555
555
|
canScroll: canScroll,
|
|
556
556
|
maxHeight: maxHeight,
|
|
557
|
+
stretchHeight: stretchHeight,
|
|
557
558
|
getTableHeaderProps: getTableHeaderProps,
|
|
558
559
|
isErrorRow: isErrorRow,
|
|
559
560
|
bodyTableRef: bodyTableRef,
|
package/lib/esm/BaseTable.js
CHANGED
|
@@ -196,7 +196,8 @@ var BaseTable = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
196
196
|
bodyTableRef = providedValue.bodyTableRef,
|
|
197
197
|
scrollWidth = providedValue.scrollWidth,
|
|
198
198
|
footerRender = providedValue.footerRender,
|
|
199
|
-
scrollbar = providedValue.scrollbar
|
|
199
|
+
scrollbar = providedValue.scrollbar,
|
|
200
|
+
stretchHeight = providedValue.stretchHeight;
|
|
200
201
|
var hasBorder = borderedProp !== null && borderedProp !== void 0 ? borderedProp : bordered;
|
|
201
202
|
var hasScrollToLeft = scrollSize.scrollLeft === 0;
|
|
202
203
|
var hasLeftFixedColumns = leftFrozenColKeys.length > 0;
|
|
@@ -204,23 +205,35 @@ var BaseTable = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
204
205
|
var extraFooter = extra && extra.footer;
|
|
205
206
|
var alwaysFixedColumn = fixedColumnTrigger === 'always';
|
|
206
207
|
var renderTable = function renderTable() {
|
|
207
|
-
var
|
|
208
|
-
ref: scrollBodyElementRef,
|
|
209
|
-
className: prefixCls + "-content",
|
|
210
|
-
onScroll: onTableBodyScroll,
|
|
211
|
-
style: {
|
|
212
|
-
// 表格宽度大于div宽度才出现横向滚动条
|
|
213
|
-
overflowX: canScroll ? 'scroll' : undefined
|
|
214
|
-
}
|
|
215
|
-
}, /*#__PURE__*/React__default.createElement("table", {
|
|
208
|
+
var tableContent = /*#__PURE__*/React__default.createElement("table", {
|
|
216
209
|
ref: bodyTableRef,
|
|
217
210
|
style: {
|
|
218
211
|
width: canScroll && scrollWidth !== undefined ? scrollWidth : '100%'
|
|
219
212
|
}
|
|
220
213
|
}, /*#__PURE__*/React__default.createElement(ColGroupContent, null), /*#__PURE__*/React__default.createElement(TheadContent, null), /*#__PURE__*/React__default.createElement(TbodyContent, {
|
|
221
214
|
emptyContent: emptyContent
|
|
222
|
-
}))
|
|
223
|
-
var
|
|
215
|
+
}));
|
|
216
|
+
var singleTableContent = /*#__PURE__*/React__default.createElement("div", Object.assign({
|
|
217
|
+
className: prefixCls + "-content"
|
|
218
|
+
}, !scrollbar ? {
|
|
219
|
+
ref: scrollBodyElementRef,
|
|
220
|
+
onScroll: onTableBodyScroll,
|
|
221
|
+
style: {
|
|
222
|
+
// 表格宽度大于div宽度才出现横向滚动条
|
|
223
|
+
overflowX: canScroll ? 'scroll' : undefined
|
|
224
|
+
}
|
|
225
|
+
} : {}), !scrollbar ? tableContent : ( /*#__PURE__*/React__default.createElement(Scrollbar, Object.assign({
|
|
226
|
+
ref: scrollBodyElementRef,
|
|
227
|
+
onScroll: onTableBodyScroll
|
|
228
|
+
}, isObject(scrollbar) ? scrollbar : null), tableContent)));
|
|
229
|
+
var _a = getTableHeaderProps(),
|
|
230
|
+
style = _a.style,
|
|
231
|
+
restTableHeaderProps = __rest(_a, ["style"]);
|
|
232
|
+
var doubleTableContent = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", Object.assign({}, restTableHeaderProps, {
|
|
233
|
+
style: Object.assign(Object.assign({}, style), {
|
|
234
|
+
overflow: 'unset'
|
|
235
|
+
})
|
|
236
|
+
}), /*#__PURE__*/React__default.createElement(TableHeader, null), extraHeader ? ( /*#__PURE__*/React__default.createElement("div", {
|
|
224
237
|
style: {
|
|
225
238
|
position: 'absolute',
|
|
226
239
|
right: 0,
|
|
@@ -231,7 +244,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
231
244
|
}, extraHeader)) : null), /*#__PURE__*/React__default.createElement(TableBody, {
|
|
232
245
|
emptyContent: emptyContent
|
|
233
246
|
}));
|
|
234
|
-
return needDoubleTable ? doubleTableContent :
|
|
247
|
+
return needDoubleTable ? doubleTableContent : singleTableContent;
|
|
235
248
|
};
|
|
236
249
|
var renderFreezeShadow = function renderFreezeShadow() {
|
|
237
250
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (alwaysFixedColumn || scrollSize.scrollLeft > 0) && leftFrozenColKeys.length > 0 ? ( /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -253,7 +266,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
253
266
|
bottom: stickyFooterBottom
|
|
254
267
|
} : undefined
|
|
255
268
|
}, isFunction(footerRender) ? footerRender( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, extraFooter)) : extraFooter);
|
|
256
|
-
var cls = cx(prefixCls, className, hasBorder && prefixCls + "--bordered", (hasScrollToLeft || hasLeftFixedColumns) && data.length > 0 && prefixCls + "--bordered-left-none", striped && prefixCls + "--striped", size && prefixCls + "--size-" + size, virtual && prefixCls + "--virtual");
|
|
269
|
+
var cls = cx(prefixCls, className, hasBorder && prefixCls + "--bordered", (hasScrollToLeft || hasLeftFixedColumns) && data.length > 0 && prefixCls + "--bordered-left-none", striped && prefixCls + "--striped", size && prefixCls + "--size-" + size, virtual && prefixCls + "--virtual", data.length === 0 && prefixCls + "--empty", prefixCls + "--" + (needDoubleTable ? 'double' : 'single'), stretchHeight && prefixCls + "--stretch-height");
|
|
257
270
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({
|
|
258
271
|
ref: ref,
|
|
259
272
|
role: role,
|
package/lib/esm/Table.js
CHANGED
|
@@ -32,7 +32,7 @@ var _prefix = getPrefixCls('table');
|
|
|
32
32
|
* 需要使用双表格的场景对应的 API
|
|
33
33
|
* 这些场景下的功能无法通过单表格实现,故而设计成双表格,即表头和表体分别用一个 table 实现
|
|
34
34
|
*/
|
|
35
|
-
var DOUBLE_TABLE_SCENE = ['maxHeight', 'sticky', 'stickyTop', 'setting', 'virtual'];
|
|
35
|
+
var DOUBLE_TABLE_SCENE = ['needDoubleTable', 'maxHeight', 'sticky', 'stickyTop', 'setting', 'virtual', 'stretchHeight'];
|
|
36
36
|
var STANDARD_PRESET = {
|
|
37
37
|
striped: true,
|
|
38
38
|
bordered: true,
|
package/lib/esm/TableRow.js
CHANGED
|
@@ -134,7 +134,7 @@ var TableRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
134
134
|
// ** ************** 行状态管理 *************** *//
|
|
135
135
|
var highlighted = isHighlightedRow(rowId);
|
|
136
136
|
var hasError = isErrorRow(rowId);
|
|
137
|
-
var cls = cx(prefixCls + "-row", showRowHighlight && prefixCls + "-row--hover", striped && (rowIndex & 1) ===
|
|
137
|
+
var cls = cx(prefixCls + "-row", showRowHighlight && prefixCls + "-row--hover", striped && (rowIndex & 1) === 0 && prefixCls + "-row--striped", hasError && prefixCls + "-row--error", highlighted && prefixCls + "-row--highlight", draggable && prefixCls + "-row--draggable", draggable && dragging && prefixCls + "-row--dragging", draggable && dragDirection && prefixCls + "-row--drag-" + dragDirection, isSumRow && prefixCls + "-row--total", isAvgRow && prefixCls + "-row--avg", virtual && prefixCls + "-row--virtual", className);
|
|
138
138
|
var firstColumn = flattedColumnsWithoutChildren.find(function (item) {
|
|
139
139
|
return item.dataKey !== SELECTION_DATA_KEY && item.dataKey !== EMBED_DATA_KEY;
|
|
140
140
|
});
|
|
@@ -13,7 +13,6 @@ import React__default, { forwardRef, useRef, useEffect } from 'react';
|
|
|
13
13
|
import { getPrefixCls, cx } from '@hi-ui/classname';
|
|
14
14
|
import { __DEV__ } from '@hi-ui/env';
|
|
15
15
|
import { EllipsisVerticalOutlined, MoveOutlined } from '@hi-ui/icons';
|
|
16
|
-
import { IconButton } from '@hi-ui/icon-button';
|
|
17
16
|
import { useToggle } from '@hi-ui/use-toggle';
|
|
18
17
|
import { useLatestCallback } from '@hi-ui/use-latest';
|
|
19
18
|
import { useLocaleContext } from '@hi-ui/core';
|
|
@@ -99,7 +98,8 @@ var TableSettingMenu = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
99
98
|
className: cls
|
|
100
99
|
}, trigger ? ( /*#__PURE__*/React__default.createElement("div", {
|
|
101
100
|
className: prefixCls + "__trigger"
|
|
102
|
-
}, trigger)) : ( /*#__PURE__*/React__default.createElement(
|
|
101
|
+
}, trigger)) : ( /*#__PURE__*/React__default.createElement(Button, {
|
|
102
|
+
appearance: "text",
|
|
103
103
|
icon: /*#__PURE__*/React__default.createElement(EllipsisVerticalOutlined, null),
|
|
104
104
|
onClick: menuVisibleAction.not
|
|
105
105
|
})), /*#__PURE__*/React__default.createElement(Drawer, {
|
|
@@ -113,6 +113,7 @@ var TableSettingMenu = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
113
113
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
114
114
|
key: 0,
|
|
115
115
|
className: prefixCls + "__btn-cancel",
|
|
116
|
+
appearance: "line",
|
|
116
117
|
onClick: resetLatest
|
|
117
118
|
}, i18n.get('table.reset')), /*#__PURE__*/React__default.createElement(Button, {
|
|
118
119
|
key: 1,
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
import { useMemo, useEffect, useState } from 'react';
|
|
11
11
|
import { useUpdateEffect } from '@hi-ui/use-update-effect';
|
|
12
12
|
import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
|
|
13
|
-
import { useLatestRef } from '@hi-ui/use-latest';
|
|
14
13
|
import { parseLocalArray } from '../utils/index.js';
|
|
15
14
|
var DEFAULT_COLUMNS = [];
|
|
16
15
|
/**
|
|
@@ -39,16 +38,15 @@ var useColSorter = function useColSorter(_ref) {
|
|
|
39
38
|
return column.dataKey;
|
|
40
39
|
}));
|
|
41
40
|
}, [columns]);
|
|
42
|
-
var columnsLatestRef = useLatestRef(columns);
|
|
43
41
|
var sortedCols = useMemo(function () {
|
|
44
|
-
var columnsMap =
|
|
42
|
+
var columnsMap = columns.reduce(function (prev, cur) {
|
|
45
43
|
prev[cur.dataKey] = cur;
|
|
46
44
|
return prev;
|
|
47
45
|
}, {});
|
|
48
46
|
return sortedColKeys.map(function (colKey) {
|
|
49
47
|
return columnsMap[colKey];
|
|
50
48
|
}).filter(Boolean);
|
|
51
|
-
}, [sortedColKeys,
|
|
49
|
+
}, [sortedColKeys, columns]);
|
|
52
50
|
useEffect(function () {
|
|
53
51
|
if (!cacheKey) return;
|
|
54
52
|
window.localStorage.setItem(cacheKey, JSON.stringify(sortedColKeys));
|
|
@@ -23,6 +23,9 @@ var useColWidth = function useColWidth(_ref) {
|
|
|
23
23
|
}),
|
|
24
24
|
colWidths = _React$useState[0],
|
|
25
25
|
setColWidths = _React$useState[1];
|
|
26
|
+
/**
|
|
27
|
+
* 根据实际内容区(table 的第一行)渲染,再次精确收集并设置每列宽度
|
|
28
|
+
*/
|
|
26
29
|
var getWidths = useCallback(function (measureRowElement) {
|
|
27
30
|
if (measureRowElement && measureRowElement.childNodes) {
|
|
28
31
|
// 超出的宽度,即每列真实的宽度超出设置的宽度的总和
|
|
@@ -93,16 +96,12 @@ var useColWidth = function useColWidth(_ref) {
|
|
|
93
96
|
}
|
|
94
97
|
}, [getVirtualWidths, virtual]);
|
|
95
98
|
useUpdateEffect(function () {
|
|
99
|
+
// 当列变化时,重新设置列宽
|
|
96
100
|
setColWidths(getGroupItemWidth(columns).colWidths);
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
// ? // 走更新逻辑
|
|
102
|
-
// getWidths(measureRowElementRef.current)
|
|
103
|
-
// : // 当列数变化时重新走初始化逻辑
|
|
104
|
-
// getGroupItemWidth(columns)
|
|
105
|
-
// })
|
|
101
|
+
// 重新设置列宽后,真实的宽度会发生变化,基于真实的宽度再次重新计算出合适的列宽
|
|
102
|
+
requestAnimationFrame(function () {
|
|
103
|
+
setColWidths(getWidths(measureRowElementRef.current));
|
|
104
|
+
});
|
|
106
105
|
}, [columns]);
|
|
107
106
|
/**
|
|
108
107
|
* 根据实际内容区(table 的第一行)渲染,再次精确收集并设置每列宽度
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
import __styleInject__ from '@hi-ui/style-inject';
|
|
11
|
-
var css_248z = ".hi-v4-table {-webkit-box-sizing: border-box;box-sizing: border-box;font-size: 14px;position: relative;}.hi-v4-table table {width: 100%;text-align: left;background-color: var(--hi-v4-color-static-white, #fff);border-radius: 2px 2px 0 0;border-spacing: 0;border-collapse: separate;display: table;table-layout: fixed;}.hi-v4-table__wrapper {position: relative;z-index: 0;}.hi-v4-table__switcher.hi-v4-icon-button {color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-table__switcher--expanded.hi-v4-icon-button {color: var(--hi-v4-color-primary-400, var(--hi-v4-color-brandblue-400, #4a9eff));}.hi-v4-table--size-md .hi-v4-table-header-cell {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-md .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-header-cell {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg .hi-v4-table-header-cell {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg .hi-v4-table-row:not(.hi-v4-table-body-empty-content) .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--bordered > .hi-v4-table__wrapper {border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered > .hi-v4-table__wrapper .hi-v4-table-header-cell, .hi-v4-table--bordered > .hi-v4-table__wrapper .hi-v4-table-cell {border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered > .hi-v4-table__wrapper .hi-v4-table-row:last-child .hi-v4-table-cell {border-bottom: none;}.hi-v4-table--bordered.hi-v4-table--bordered-left-none > .hi-v4-table__wrapper {border-left: none;}.hi-v4-table--bordered.hi-v4-table--virtual > .hi-v4-table__wrapper .hi-v4-table-row .hi-v4-table-cell {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered.hi-v4-table--virtual > .hi-v4-table__wrapper .hi-v4-table-virtual-row:last-child .hi-v4-table-row .hi-v4-table-cell {border-bottom: none;}.hi-v4-table--sticky {position: sticky;top: 0;}.hi-v4-table--virtual {width: 100%;overflow: hidden;}.hi-v4-table--virtual .hi-v4-table-cell {-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v4-table-header {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;overflow: hidden;}.hi-v4-table-header__resizable {position: relative;background-clip: padding-box;}.hi-v4-table-header__resizable:hover {background-color: var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table-header__resizable:hover .hi-v4-table-header__resizable-handle {border-left-color: var(--hi-v4-color-gray-200, #ebedf0);border-right-color: var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table-header__resizable-handle {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;margin-right: -2px;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;z-index: 1;}.hi-v4-table__selection-col > .hi-v4-table-header__resizable-handle {display: none;}.hi-v4-table-header__resizable-handle:hover {background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-left-color: var(--hi-v4-color-gray-200, #ebedf0);border-right-color: var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table-header-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-medium, 500);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);}.hi-v4-table-header-cell.hi-v4-table__embed-col, .hi-v4-table-header-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight, .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active {background-color: var(--hi-v4-color-gray-100, #f2f4f7);}.hi-v4-table-header-cell.hi-v4-table-header-cell__col--highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--hovered-highlight[data-sticky], .hi-v4-table-header-cell.hi-v4-table-header-cell__col--active[data-sticky] {background-color: var(--hi-v4-color-gray-100, #f2f4f7);}.hi-v4-table-row--fixed-top, .hi-v4-table-row--fixed-bottom {position: sticky;z-index: 6;}.hi-v4-table-row--fixed-top {top: 0;}.hi-v4-table-row--fixed-bottom {bottom: 0;}.hi-v4-table-row--fixed-bottom .hi-v4-table-cell {border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);}.hi-v4-table-row:has(+ .hi-v4-table-row--fixed-bottom) .hi-v4-table-cell {border-bottom: none;}.hi-v4-table-row--hover:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-row--striped > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-row--expanded > .hi-v4-table-cell {color: var(--hi-v4-color-gray-800, #1f2937);}.hi-v4-table-row--error > .hi-v4-table-cell {color: var(--hi-v4-color-danger-500, var(--hi-v4-color-red-500, #ff5959));}.hi-v4-table-row--highlight > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-row--dragging > .hi-v4-table-cell {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-row--drag-top > .hi-v4-table-cell {border-top: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.hi-v4-table-row--drag-bottom > .hi-v4-table-cell {border-bottom: 2px dashed var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.hi-v4-table-row--avg > .hi-v4-table-cell, .hi-v4-table-row--total > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-row--avg:hover > .hi-v4-table-cell, .hi-v4-table-row--total:hover > .hi-v4-table-cell {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-row--virtual {display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v4-table-header .hi-v4-table-header-col, .hi-v4-table-header .hi-v4-table-col {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-body .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-body .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-header .hi-v4-table-header-col[data-hover-highlight], .hi-v4-table-header .hi-v4-table-col[data-hover-highlight] {background-color: var(--hi-v4-color-gray-100, #f2f4f7);}.hi-v4-table-body, .hi-v4-table-content {position: relative;overflow: auto;}.hi-v4-table-body--virtual-holder {overflow: hidden;}.hi-v4-table-cell {word-break: break-word;border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);font-size: var(--hi-v4-text-size-md, 0.875rem);font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-700, #1f2733);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-8, 16px);background-color: var(--hi-v4-color-static-white, #fff);}.hi-v4-table-cell__indent {display: inline-block;vertical-align: middle;width: 14px;height: 100%;margin-right: var(--hi-v4-spacing-1, 2px);}.hi-v4-table-cell__switcher.hi-v4-icon-button {margin-right: var(--hi-v4-spacing-1, 2px);color: var(--hi-v4-color-gray-500, #929aa6);vertical-align: middle;}.hi-v4-table-cell.hi-v4-table__embed-col, .hi-v4-table-cell.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table-cell.hi-v4-table-cell__col--highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-cell.hi-v4-table-cell__col--hovered-highlight {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-freeze-shadow {position: absolute;top: 0;bottom: 0;z-index: 20;pointer-events: none;overflow: hidden;height: 100%;width: 200px;}.hi-v4-table-freeze-shadow--left {margin-right: 10px;left: 0;-webkit-box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);}.hi-v4-table-freeze-shadow--right {margin-left: 10px;right: 0;-webkit-box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);}.hi-v4-table-header-filter-dropdown__trigger.hi-v4-icon-button {margin-left: 4px;}.hi-v4-table-header-filter-dropdown__content {width: 124px;padding: var(--hi-v4-spacing-6, 12px) var(--hi-v4-spacing-4, 8px);font-weight: var(--hi-v4-text-weight-normal, 400);}.hi-v4-table-header-filter-dropdown__item {margin-top: var(--hi-v4-spacing-4, 8px);padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);border-radius: var(--hi-v4-border-radius-md, 4px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;cursor: pointer;color: var(--hi-v4-color-gray-700, #1f2733);font-size: var(--hi-v4-text-size-md, 0.875rem);}.hi-v4-table-header-filter-dropdown__item:first-child {margin-top: 0;}.hi-v4-table-header-filter-dropdown__item:hover {background-color: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-header-filter-dropdown__item--active {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-header-filter-dropdown__item--active:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-header-filter-sorter {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;height: 20px;vertical-align: middle;margin-left: 6px;}.hi-v4-table-header-filter-sorter__icon {display: inline-block;height: 8px;cursor: pointer;overflow: hidden;font-weight: var(--hi-v4-text-weight-normal, 400);color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-table-header-filter-sorter__icon svg {position: relative;top: -5px;}.hi-v4-table-header-filter-sorter__icon--active {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.hi-v4-table-header-filter-custom__trigger {margin-left: 6px;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer;}.hi-v4-table-header-filter-custom__content {padding: 12px 8px;}.hi-v4-table-embed-row {position: relative;z-index: 0;}.hi-v4-table-embed-row > td {background-color: var(--hi-v4-color-gray-200, #ebedf0);padding: var(--hi-v4-spacing-10, 20px);}.hi-v4-table-setting {position: absolute;height: 100%;z-index: 11;-webkit-box-sizing: border-box;box-sizing: border-box;right: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);border-bottom: none;border-top: none;color: var(--hi-v4-color-gray-500, #929aa6);cursor: pointer;font-size: var(--hi-v4-text-size-sm, 0.75rem);width: 18px;background: var(--hi-v4-color-gray-50, #f5f7fa);}.hi-v4-table-setting__btn-group {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v4-table-setting-item {position: relative;padding-top: var(--hi-v4-spacing-1, 2px);padding-bottom: var(--hi-v4-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v4-table-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;cursor: move;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v4-border-radius-md, 4px);}.hi-v4-table-setting-item__wrap:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-table-setting-item--dragging .hi-v4-table-setting-item__wrap {opacity: 0.6;}.hi-v4-table-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v4-color-static-white, #fff);border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-radius: 100%;}.hi-v4-table-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));left: 0;width: 100%;}.hi-v4-table-setting-item::before, .hi-v4-table-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v4-table-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v4-table-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v4-table-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v4-table-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}.hi-v4-table-pagination {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: 8px;padding: var(--hi-v4-spacing-6, 12px) 0;background-color: var(--hi-v4-color-static-white, #fff);}.hi-v4-table-pagination--placement-left {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.hi-v4-table-pagination--placement-right {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v4-table-pagination--placement-middle {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.hi-v4-table-body-empty-content td {text-align: center;padding: var(--hi-v4-spacing-12, 24px) 0;}.hi-v4-table--bordered .hi-v4-table-body-empty-content td {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-300, #dfe2e8);}.hi-v4-setting-drawer .hi-v4-setting-footer {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.hi-v4-setting-drawer .hi-v4-setting-footer__extra {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;}.hi-v4-setting-item {position: relative;padding-top: var(--hi-v4-spacing-1, 2px);padding-bottom: var(--hi-v4-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v4-setting-item:not(.hi-v4-setting-item--drag-disabled) .hi-v4-setting-item__wrap {cursor: move;}.hi-v4-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v4-spacing-3, 6px) var(--hi-v4-spacing-4, 8px);line-height: var(--hi-v4-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v4-border-radius-md, 4px);}.hi-v4-setting-item__wrap:hover {background-color: var(--hi-v4-color-primary-50, var(--hi-v4-color-brandblue-50, #e2f3fe));}.hi-v4-setting-item--dragging .hi-v4-setting-item__wrap {opacity: 0.6;}.hi-v4-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v4-color-static-white, #fff);border: 1px solid var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));border-radius: 100%;}.hi-v4-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));left: 0;width: 100%;}.hi-v4-setting-item::before, .hi-v4-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v4-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v4-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v4-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v4-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}";
|
|
11
|
+
var css_248z = ".hi-v5-table {-webkit-box-sizing: border-box;box-sizing: border-box;font-size: 14px;position: relative;}.hi-v5-table table {width: 100%;text-align: left;background-color: var(--hi-v5-color-static-white, #fff);border-radius: 2px 2px 0 0;border-spacing: 0;border-collapse: separate;display: table;table-layout: fixed;}.hi-v5-table__wrapper {position: relative;z-index: 0;border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--stretch-height {height: 100%;overflow: hidden;}.hi-v5-table--stretch-height .hi-v5-table__wrapper {height: 100%;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v5-table--stretch-height .hi-v5-table__wrapper .hi-v5-table-body {-webkit-box-flex: 1;-ms-flex-positive: 1;flex-grow: 1;overflow: auto;}.hi-v5-table--stretch-height.hi-v5-table--empty .hi-v5-table__wrapper .hi-v5-table-body table {height: 100%;}.hi-v5-table--stretch-height.hi-v5-table--empty .hi-v5-scrollbar__wrapper {height: 100%;}.hi-v5-table__switcher.hi-v5-icon-button {color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-table__switcher--expanded.hi-v5-icon-button {color: var(--hi-v5-color-primary-400, var(--hi-v5-color-brandblue-400, #4d82ff));}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-sm .hi-v5-table-header-cell {height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-sm .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-md .hi-v5-table-header-cell {height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-md .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-lg .hi-v5-table-header-cell {height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table:not(.hi-v5-table--virtual).hi-v5-table--size-lg .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table--virtual.hi-v5-table--size-sm .hi-v5-table-header-cell {height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table--virtual.hi-v5-table--size-sm .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {min-height: var(--hi-v5-height-9, 36px);padding: var(--hi-v5-spacing-1, 2px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table--virtual.hi-v5-table--size-md .hi-v5-table-header-cell {height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table--virtual.hi-v5-table--size-md .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {min-height: var(--hi-v5-height-10, 40px);padding: var(--hi-v5-spacing-2, 4px) var(--hi-v5-spacing-6, 12px);}.hi-v5-table--virtual.hi-v5-table--size-lg .hi-v5-table-header-cell {height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table--virtual.hi-v5-table--size-lg .hi-v5-table-row:not(.hi-v5-table-body-empty-content) .hi-v5-table-cell {min-height: var(--hi-v5-height-12, 48px);padding: var(--hi-v5-spacing-4, 8px) var(--hi-v5-spacing-7, 14px);}.hi-v5-table--bordered > .hi-v5-table__wrapper {border-left: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);border-right: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--bordered > .hi-v5-table__wrapper .hi-v5-table-header-cell, .hi-v5-table--bordered > .hi-v5-table__wrapper .hi-v5-table-cell {border-left: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--bordered > .hi-v5-table__wrapper .hi-v5-table-row:last-child .hi-v5-table-cell {border-bottom: none;}.hi-v5-table--bordered.hi-v5-table--bordered-left-none > .hi-v5-table__wrapper {border-left: none;}.hi-v5-table--bordered.hi-v5-table--virtual > .hi-v5-table__wrapper .hi-v5-table-row .hi-v5-table-cell {border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table--bordered.hi-v5-table--virtual > .hi-v5-table__wrapper .hi-v5-table-virtual-row:last-child .hi-v5-table-row .hi-v5-table-cell {border-bottom: none;}.hi-v5-table--sticky {position: sticky;top: 0;}.hi-v5-table--virtual {width: 100%;overflow: hidden;}.hi-v5-table--virtual .hi-v5-table-cell {-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-table-header {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;overflow: hidden;}.hi-v5-table-header__resizable {position: relative;background-clip: padding-box;}.hi-v5-table-header__resizable:hover {background-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header__resizable:hover .hi-v5-table-header__resizable-handle {border-left-color: var(--hi-v5-color-gray-200, #e6e8eb);border-right-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header__resizable-handle {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;margin-right: -2px;border-left: 2px solid transparent;border-right: 2px solid transparent;cursor: col-resize;z-index: 1;}.hi-v5-table__selection-col > .hi-v5-table-header__resizable-handle {display: none;}.hi-v5-table-header__resizable-handle:hover {background-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));border-left-color: var(--hi-v5-color-gray-200, #e6e8eb);border-right-color: var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header-cell {-webkit-box-sizing: border-box;box-sizing: border-box;background-color: var(--hi-v5-color-static-white, #fff);color: var(--hi-v5-color-gray-500, #91959e);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-medium, 500);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-8, 16px);border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);}.hi-v5-table-header-cell.hi-v5-table__embed-col {padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table-header-cell.hi-v5-table__selection-col {padding: 0 !important;text-align: center !important;}.hi-v5-table-header-cell.hi-v5-table-header-cell__col--highlight, .hi-v5-table-header-cell.hi-v5-table-header-cell__col--hovered-highlight, .hi-v5-table-header-cell.hi-v5-table-header-cell__col--active {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-table-header-cell.hi-v5-table-header-cell__col--highlight[data-sticky], .hi-v5-table-header-cell.hi-v5-table-header-cell__col--hovered-highlight[data-sticky], .hi-v5-table-header-cell.hi-v5-table-header-cell__col--active[data-sticky] {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-table-row--fixed-top, .hi-v5-table-row--fixed-bottom {position: sticky;z-index: 6;}.hi-v5-table-row--fixed-top {top: 0;}.hi-v5-table-row--fixed-bottom {bottom: 0;}.hi-v5-table-row--fixed-bottom .hi-v5-table-cell {border-top: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-300, #dbdde0);}.hi-v5-table-row:has(+ .hi-v5-table-row--fixed-bottom) .hi-v5-table-cell {border-bottom: none;}.hi-v5-table-row--hover:hover > .hi-v5-table-cell {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-row--striped > .hi-v5-table-cell {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-row--expanded > .hi-v5-table-cell {color: var(--hi-v5-color-gray-800, #1d1e26);}.hi-v5-table-row--error > .hi-v5-table-cell {color: var(--hi-v5-color-danger-500, var(--hi-v5-color-red-500, #fa4646));}.hi-v5-table-row--highlight > .hi-v5-table-cell {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-row--dragging > .hi-v5-table-cell {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-row--drag-top > .hi-v5-table-cell {border-top: 2px dashed var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-table-row--drag-bottom > .hi-v5-table-cell {border-bottom: 2px dashed var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-table-row--avg > .hi-v5-table-cell, .hi-v5-table-row--total > .hi-v5-table-cell {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-row--avg:hover > .hi-v5-table-cell, .hi-v5-table-row--total:hover > .hi-v5-table-cell {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-row--virtual {display: -webkit-box;display: -ms-flexbox;display: flex;}.hi-v5-table-header .hi-v5-table-header-col, .hi-v5-table-header .hi-v5-table-col {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-body .hi-v5-table-header-col[data-hover-highlight], .hi-v5-table-body .hi-v5-table-col[data-hover-highlight] {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-header .hi-v5-table-header-col[data-hover-highlight], .hi-v5-table-header .hi-v5-table-col[data-hover-highlight] {background-color: var(--hi-v5-color-gray-100, #edeff2);}.hi-v5-table-body, .hi-v5-table-content {position: relative;overflow: auto;}.hi-v5-table-body--virtual-holder {overflow: hidden;}.hi-v5-table-cell {-webkit-box-sizing: border-box;box-sizing: border-box;word-break: break-word;border-bottom: var(--hi-v5-border-size-normal, 1px solid) var(--hi-v5-color-gray-200, #e6e8eb);font-size: var(--hi-v5-text-size-md, 0.875rem);font-weight: var(--hi-v5-text-weight-normal, 400);color: var(--hi-v5-color-gray-700, #1a1d26);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-8, 16px);background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-table-cell__indent {display: inline-block;vertical-align: middle;width: 14px;height: 100%;margin-right: var(--hi-v5-spacing-1, 2px);}.hi-v5-table-cell__switcher.hi-v5-icon-button {margin-right: var(--hi-v5-spacing-1, 2px);color: var(--hi-v5-color-gray-500, #91959e);vertical-align: middle;}.hi-v5-table-cell.hi-v5-table__embed-col {padding: var(--hi-v5-spacing-7, 14px) var(--hi-v5-spacing-5, 10px);}.hi-v5-table-cell.hi-v5-table__selection-col {padding: 0 !important;text-align: center !important;}.hi-v5-table-cell.hi-v5-table-cell__col--highlight {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-cell.hi-v5-table-cell__col--hovered-highlight {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-freeze-shadow {position: absolute;top: 0;bottom: 0;z-index: 20;pointer-events: none;overflow: hidden;height: 100%;width: 200px;}.hi-v5-table-freeze-shadow--left {margin-right: 10px;left: 0;-webkit-box-shadow: var(--hi-v5-shadow-sm, 2px 0 4px 0 rgba(26, 29, 38, 0.02), 2px 0 4px 0 rgba(26, 29, 38, 0.02), 1px 0 2px -2px rgba(26, 29, 38, 0.02));box-shadow: var(--hi-v5-shadow-sm, 2px 0 4px 0 rgba(26, 29, 38, 0.02), 2px 0 4px 0 rgba(26, 29, 38, 0.02), 1px 0 2px -2px rgba(26, 29, 38, 0.02));}.hi-v5-table-freeze-shadow--right {margin-left: 10px;right: 0;-webkit-box-shadow: var(--hi-v5-shadow-sm, -2px 0 8px 2px rgba(26, 29, 38, 0.02), -2px 0 4px 0 rgba(26, 29, 38, 0.02), -1px 0 2px -2px rgba(26, 29, 38, 0.02));box-shadow: var(--hi-v5-shadow-sm, -2px 0 8px 2px rgba(26, 29, 38, 0.02), -2px 0 4px 0 rgba(26, 29, 38, 0.02), -1px 0 2px -2px rgba(26, 29, 38, 0.02));}.hi-v5-table-header-filter-dropdown__trigger.hi-v5-icon-button {margin-left: 4px;}.hi-v5-table-header-filter-dropdown__content {width: 124px;padding: var(--hi-v5-spacing-6, 12px) var(--hi-v5-spacing-4, 8px);font-weight: var(--hi-v5-text-weight-normal, 400);}.hi-v5-table-header-filter-dropdown__item {margin-top: var(--hi-v5-spacing-4, 8px);padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);border-radius: var(--hi-v5-border-radius-lg, 6px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;cursor: pointer;color: var(--hi-v5-color-gray-700, #1a1d26);font-size: var(--hi-v5-text-size-md, 0.875rem);}.hi-v5-table-header-filter-dropdown__item:first-child {margin-top: 0;}.hi-v5-table-header-filter-dropdown__item:hover {background-color: var(--hi-v5-color-gray-50, #f2f4f7);}.hi-v5-table-header-filter-dropdown__item--active {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-header-filter-dropdown__item--active:hover {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-header-filter-sorter {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;height: 20px;vertical-align: middle;margin-left: 6px;}.hi-v5-table-header-filter-sorter__icon {display: inline-block;height: 8px;cursor: pointer;overflow: hidden;font-weight: var(--hi-v5-text-weight-normal, 400);color: var(--hi-v5-color-gray-500, #91959e);}.hi-v5-table-header-filter-sorter__icon svg {position: relative;top: -5px;}.hi-v5-table-header-filter-sorter__icon--active {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}.hi-v5-table-header-filter-custom__trigger {margin-left: 6px;color: var(--hi-v5-color-gray-500, #91959e);cursor: pointer;}.hi-v5-table-header-filter-custom__content {padding: var(--hi-v5-spacing-6, 12px);}.hi-v5-table-embed-row {position: relative;z-index: 0;}.hi-v5-table-embed-row > td {background-color: var(--hi-v5-color-gray-50, #f2f4f7);padding: var(--hi-v5-spacing-6, 12px);}.hi-v5-table-setting {position: absolute;height: calc(100% - 2px);z-index: 11;-webkit-box-sizing: border-box;box-sizing: border-box;right: 0;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;color: var(--hi-v5-color-gray-500, #91959e);cursor: pointer;font-size: var(--hi-v5-text-size-sm, 0.75rem);width: 18px;background: var(--hi-v5-color-static-white, #fff);}.hi-v5-table-setting__btn-group {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v5-table-setting-item {position: relative;padding-top: var(--hi-v5-spacing-1, 2px);padding-bottom: var(--hi-v5-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-table-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;cursor: move;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v5-border-radius-lg, 6px);}.hi-v5-table-setting-item__wrap:hover {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-table-setting-item--dragging .hi-v5-table-setting-item__wrap {opacity: 0.6;}.hi-v5-table-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v5-color-static-white, #fff);border: 1px solid var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));border-radius: 100%;}.hi-v5-table-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));left: 0;width: 100%;}.hi-v5-table-setting-item::before, .hi-v5-table-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v5-table-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v5-table-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v5-table-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v5-table-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}.hi-v5-table-pagination {display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: 8px;padding: var(--hi-v5-spacing-6, 12px) 0;background-color: var(--hi-v5-color-static-white, #fff);}.hi-v5-table-pagination--placement-left {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.hi-v5-table-pagination--placement-right {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.hi-v5-table-pagination--placement-middle {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.hi-v5-table--empty th:first-child {border-left: none !important;}.hi-v5-table--empty td {text-align: center;padding: var(--hi-v5-spacing-12, 24px) 0;}.hi-v5-setting-drawer .hi-v5-setting-footer {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.hi-v5-setting-drawer .hi-v5-setting-footer__extra {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;}.hi-v5-setting-item {position: relative;padding-top: var(--hi-v5-spacing-1, 2px);padding-bottom: var(--hi-v5-spacing-1, 2px);-webkit-box-sizing: border-box;box-sizing: border-box;}.hi-v5-setting-item:not(.hi-v5-setting-item--drag-disabled) .hi-v5-setting-item__wrap {cursor: move;}.hi-v5-setting-item__wrap {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-orient: horizontal;-webkit-box-direction: normal;-ms-flex-direction: row;flex-direction: row;padding: var(--hi-v5-spacing-3, 6px) var(--hi-v5-spacing-4, 8px);line-height: var(--hi-v5-text-lineheight-sm, 1.25rem);border-radius: var(--hi-v5-border-radius-lg, 6px);}.hi-v5-setting-item__wrap:hover {background-color: var(--hi-v5-color-primary-50, var(--hi-v5-color-brandblue-50, #edf2ff));}.hi-v5-setting-item--dragging .hi-v5-setting-item__wrap {opacity: 0.6;}.hi-v5-setting-item::before {position: absolute;left: 0;z-index: 9999;display: none;-webkit-box-sizing: border-box;box-sizing: border-box;width: 8px;height: 8px;content: \"\";background-color: var(--hi-v5-color-static-white, #fff);border: 1px solid var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));border-radius: 100%;}.hi-v5-setting-item::after {position: absolute;content: \"\";z-index: 9998;display: block;-webkit-box-sizing: border-box;box-sizing: border-box;border-bottom-width: 0;border-bottom-style: solid;border-bottom-color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));left: 0;width: 100%;}.hi-v5-setting-item::before, .hi-v5-setting-item::after {margin-left: -10px;margin-right: -10px;}.hi-v5-setting-item--direction-before::before {display: block;top: -0.5px;-webkit-transform: translateY(-4px);transform: translateY(-4px);}.hi-v5-setting-item--direction-before::after {top: -0.5px;border-bottom-width: 1px;}.hi-v5-setting-item--direction-after::before {display: block;bottom: 0.5px;-webkit-transform: translateY(4px);transform: translateY(4px);}.hi-v5-setting-item--direction-after::after {bottom: 0.5px;border-bottom-width: 1px;}";
|
|
12
12
|
__styleInject__(css_248z);
|
|
13
13
|
export { css_248z as default };
|
package/lib/esm/use-table.js
CHANGED
|
@@ -65,6 +65,7 @@ var useTable = function useTable(_a) {
|
|
|
65
65
|
defaultExpandAll = _a$defaultExpandAll === void 0 ? false : _a$defaultExpandAll,
|
|
66
66
|
onLoadChildren = _a.onLoadChildren,
|
|
67
67
|
maxHeight = _a.maxHeight,
|
|
68
|
+
stretchHeight = _a.stretchHeight,
|
|
68
69
|
sticky = _a.sticky,
|
|
69
70
|
_a$stickyTop = _a.stickyTop,
|
|
70
71
|
stickyTop = _a$stickyTop === void 0 ? 0 : _a$stickyTop,
|
|
@@ -86,7 +87,7 @@ var useTable = function useTable(_a) {
|
|
|
86
87
|
onChange = _a.onChange,
|
|
87
88
|
onHighlightedCol = _a.onHighlightedCol,
|
|
88
89
|
innerRef = _a.innerRef,
|
|
89
|
-
rootProps = __rest(_a, ["data", "columns", "defaultFixedToColumn", "fixedToColumn", "onFixedToColumn", "scrollWidth", "resizable", "tableWidthAdjustOnResize", "errorRowKeys", "highlightedColKeys", "highlightedRowKeys", "showColHighlight", "showRowHighlight", "highlightRowOnDoubleClick", "defaultExpandedRowKeys", "expandedRowKeys", "onExpand", "defaultExpandAll", "onLoadChildren", "maxHeight", "sticky", "stickyTop", "draggable", "onDragStart", "onDrop", "onDropEnd", "showColMenu", "rowSelection", "cellRender", "footerRender", "fieldKey", "virtual", "scrollbar", "rowClassName", "cellClassName", "onChange", "onHighlightedCol", "innerRef"]);
|
|
90
|
+
rootProps = __rest(_a, ["data", "columns", "defaultFixedToColumn", "fixedToColumn", "onFixedToColumn", "scrollWidth", "resizable", "tableWidthAdjustOnResize", "errorRowKeys", "highlightedColKeys", "highlightedRowKeys", "showColHighlight", "showRowHighlight", "highlightRowOnDoubleClick", "defaultExpandedRowKeys", "expandedRowKeys", "onExpand", "defaultExpandAll", "onLoadChildren", "maxHeight", "stretchHeight", "sticky", "stickyTop", "draggable", "onDragStart", "onDrop", "onDropEnd", "showColMenu", "rowSelection", "cellRender", "footerRender", "fieldKey", "virtual", "scrollbar", "rowClassName", "cellClassName", "onChange", "onHighlightedCol", "innerRef"]);
|
|
90
91
|
/**
|
|
91
92
|
* 获取 key 字段值
|
|
92
93
|
*/
|
|
@@ -478,7 +479,6 @@ var useTable = function useTable(_a) {
|
|
|
478
479
|
var style = {
|
|
479
480
|
position: sticky ? 'sticky' : 'relative',
|
|
480
481
|
top: sticky ? stickyTop : undefined,
|
|
481
|
-
boxShadow: maxHeight ? '0px 2px 6px 0px rgba(0,0,0,0.12)' : undefined,
|
|
482
482
|
overflow: 'hidden',
|
|
483
483
|
zIndex: sticky ? 10 : undefined
|
|
484
484
|
};
|
|
@@ -486,7 +486,7 @@ var useTable = function useTable(_a) {
|
|
|
486
486
|
style: style,
|
|
487
487
|
'data-sticky': setAttrStatus(sticky)
|
|
488
488
|
};
|
|
489
|
-
}, [sticky, stickyTop
|
|
489
|
+
}, [sticky, stickyTop]);
|
|
490
490
|
var isTreeView = useMemo(function () {
|
|
491
491
|
return isArrayNonEmpty(data) ? data.some(function (row) {
|
|
492
492
|
// @ts-ignore
|
|
@@ -513,7 +513,7 @@ var useTable = function useTable(_a) {
|
|
|
513
513
|
if (activeSorterColumn) {
|
|
514
514
|
var sortedColumn = getColumnByDataKey(columns, activeSorterColumn);
|
|
515
515
|
var sorter = sortedColumn === null || sortedColumn === void 0 ? void 0 : sortedColumn.sorter;
|
|
516
|
-
if (sorter) {
|
|
516
|
+
if (typeof sorter === 'function') {
|
|
517
517
|
activeSorterType === 'ascend' ? _data.sort(sorter) : _data.sort(sorter).reverse();
|
|
518
518
|
// 平铺的树形结构排序
|
|
519
519
|
if (_data.some(function (d) {
|
|
@@ -542,6 +542,7 @@ var useTable = function useTable(_a) {
|
|
|
542
542
|
setActiveSorterType: setActiveSorterType,
|
|
543
543
|
canScroll: canScroll,
|
|
544
544
|
maxHeight: maxHeight,
|
|
545
|
+
stretchHeight: stretchHeight,
|
|
545
546
|
getTableHeaderProps: getTableHeaderProps,
|
|
546
547
|
isErrorRow: isErrorRow,
|
|
547
548
|
bodyTableRef: bodyTableRef,
|
|
@@ -7,6 +7,9 @@ import { TableColumnItem } from './types';
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const SettingDrawer: React.ForwardRefExoticComponent<SettingDrawerProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
9
9
|
export interface SettingDrawerProps extends HiBaseHTMLProps<'div'> {
|
|
10
|
+
/**
|
|
11
|
+
* 类名前缀
|
|
12
|
+
*/
|
|
10
13
|
prefixCls?: string;
|
|
11
14
|
/**
|
|
12
15
|
* 是否显示抽屉
|
package/lib/types/context.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const TableProvider: import("react").Provider<(Omit<{
|
|
|
50
50
|
cellClassName: ((record: Record<string, any>, column: Record<string, any>, index: number) => string) | undefined;
|
|
51
51
|
onHighlightedCol: ((changedColInfo: {
|
|
52
52
|
active: boolean;
|
|
53
|
-
column: import("./types").TableColumnItem
|
|
53
|
+
column: import("./types").TableColumnItem<any>;
|
|
54
54
|
}, highlightedColKeys: string[]) => void) | undefined;
|
|
55
55
|
innerRef: import("react").Ref<import("./types").TableHelper> | undefined;
|
|
56
56
|
scrollLeft: number;
|
|
@@ -72,6 +72,7 @@ export declare const TableProvider: import("react").Provider<(Omit<{
|
|
|
72
72
|
setActiveSorterType: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
73
73
|
canScroll: boolean;
|
|
74
74
|
maxHeight: string | number | undefined;
|
|
75
|
+
stretchHeight: boolean | undefined;
|
|
75
76
|
getTableHeaderProps: () => {
|
|
76
77
|
style: import("react").CSSProperties;
|
|
77
78
|
'data-sticky': "" | undefined;
|
|
@@ -104,7 +105,7 @@ export declare const TableProvider: import("react").Provider<(Omit<{
|
|
|
104
105
|
rightFixedColumnsWidth: number | undefined;
|
|
105
106
|
}, "rootProps"> & {
|
|
106
107
|
embedExpandable: boolean | {
|
|
107
|
-
rowExpandable: true | ((row: import("./types").TableColumnItem) => import("react").ReactNode);
|
|
108
|
+
rowExpandable: true | ((row: import("./types").TableColumnItem<any>) => import("react").ReactNode);
|
|
108
109
|
expandedRender: (row: Record<string, any>, index: number) => import("react").ReactNode | Promise<void | import("react").ReactNode>;
|
|
109
110
|
};
|
|
110
111
|
onEmbedSwitch: (node: import("./types").FlattedTableRowData, rowIndex: number) => Promise<void>;
|
|
@@ -182,7 +183,7 @@ export declare const useTableContext: () => Omit<{
|
|
|
182
183
|
cellClassName: ((record: Record<string, any>, column: Record<string, any>, index: number) => string) | undefined;
|
|
183
184
|
onHighlightedCol: ((changedColInfo: {
|
|
184
185
|
active: boolean;
|
|
185
|
-
column: import("./types").TableColumnItem
|
|
186
|
+
column: import("./types").TableColumnItem<any>;
|
|
186
187
|
}, highlightedColKeys: string[]) => void) | undefined;
|
|
187
188
|
innerRef: import("react").Ref<import("./types").TableHelper> | undefined;
|
|
188
189
|
scrollLeft: number;
|
|
@@ -204,6 +205,7 @@ export declare const useTableContext: () => Omit<{
|
|
|
204
205
|
setActiveSorterType: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
205
206
|
canScroll: boolean;
|
|
206
207
|
maxHeight: string | number | undefined;
|
|
208
|
+
stretchHeight: boolean | undefined;
|
|
207
209
|
getTableHeaderProps: () => {
|
|
208
210
|
style: import("react").CSSProperties;
|
|
209
211
|
'data-sticky': "" | undefined;
|
|
@@ -236,7 +238,7 @@ export declare const useTableContext: () => Omit<{
|
|
|
236
238
|
rightFixedColumnsWidth: number | undefined;
|
|
237
239
|
}, "rootProps"> & {
|
|
238
240
|
embedExpandable: boolean | {
|
|
239
|
-
rowExpandable: true | ((row: import("./types").TableColumnItem) => import("react").ReactNode);
|
|
241
|
+
rowExpandable: true | ((row: import("./types").TableColumnItem<any>) => import("react").ReactNode);
|
|
240
242
|
expandedRender: (row: Record<string, any>, index: number) => import("react").ReactNode | Promise<void | import("react").ReactNode>;
|
|
241
243
|
};
|
|
242
244
|
onEmbedSwitch: (node: import("./types").FlattedTableRowData, rowIndex: number) => Promise<void>;
|
|
@@ -5,6 +5,6 @@ export declare const useColFrozen: ({ columns, resizable, }: {
|
|
|
5
5
|
}) => {
|
|
6
6
|
flattedColumns: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
|
|
7
7
|
mergedColumns: FlattedTableColumnItemData[];
|
|
8
|
-
groupedColumns: TableColumnItem[][];
|
|
8
|
+
groupedColumns: TableColumnItem<any>[][];
|
|
9
9
|
flattedColumnsWithoutChildren: import("packages/utils/tree-utils/lib/types/types").BaseFlattedTreeNodeData<any, any>[];
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ import { TableProps } from '../Table';
|
|
|
4
4
|
* 列操作逻辑
|
|
5
5
|
*/
|
|
6
6
|
export declare const useColHidden: ({ uniqueId, columns, hiddenColKeys: hiddenColKeysProp, onHiddenColKeysChange, }: TableProps) => {
|
|
7
|
-
visibleCols: import("..").TableColumnItem[];
|
|
7
|
+
visibleCols: import("..").TableColumnItem<any>[];
|
|
8
8
|
hiddenColKeys: string[];
|
|
9
9
|
setHiddenColKeys: (stateOrFunction: import("react").SetStateAction<string[]>, ...args: any[]) => void;
|
|
10
10
|
cacheHiddenColKeys: string[];
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/types.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export interface TableColumnItemRenderReturn {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
export declare type TableColumnSortOrder = 'ascend' | 'descend' | null;
|
|
84
|
-
export declare type TableColumnItem = {
|
|
84
|
+
export declare type TableColumnItem<T extends Record<string, any> = any> = {
|
|
85
85
|
/**
|
|
86
86
|
* 列标题
|
|
87
87
|
*/
|
|
@@ -115,9 +115,9 @@ export declare type TableColumnItem = {
|
|
|
115
115
|
*/
|
|
116
116
|
defaultSortOrder?: TableColumnSortOrder;
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* 列排序函数,当设置为 true 时,需结合 sortOrder 和 onChange 使用,一般用于服务端排序
|
|
119
119
|
*/
|
|
120
|
-
sorter?: (a: any, b: any) => number;
|
|
120
|
+
sorter?: boolean | ((a: any, b: any) => number);
|
|
121
121
|
/**
|
|
122
122
|
* 该列是否支持平均值
|
|
123
123
|
*/
|
|
@@ -129,7 +129,7 @@ export declare type TableColumnItem = {
|
|
|
129
129
|
/**
|
|
130
130
|
* 多级表头
|
|
131
131
|
*/
|
|
132
|
-
children?: TableColumnItem[];
|
|
132
|
+
children?: TableColumnItem<T>[];
|
|
133
133
|
/**
|
|
134
134
|
* 表头列合并,设置为 0 时,不渲染
|
|
135
135
|
*/
|
|
@@ -137,7 +137,7 @@ export declare type TableColumnItem = {
|
|
|
137
137
|
/**
|
|
138
138
|
* 控制单元格自定义渲染
|
|
139
139
|
*/
|
|
140
|
-
render?: (text: any, rowItem:
|
|
140
|
+
render?: (text: any, rowItem: T, rowIndex: number, dataKey: string) => React.ReactNode | TableColumnItemRenderReturn;
|
|
141
141
|
/**
|
|
142
142
|
* 列类名 className
|
|
143
143
|
*/
|
|
@@ -165,12 +165,12 @@ export declare type TableColumnItem = {
|
|
|
165
165
|
/**
|
|
166
166
|
* 自定义筛选下拉选项显示状态改变时的回调方法
|
|
167
167
|
*/
|
|
168
|
-
onFilterDropdownVisibleChange?: (filterDropdownVisible: boolean, item: TableColumnItem) => void;
|
|
168
|
+
onFilterDropdownVisibleChange?: (filterDropdownVisible: boolean, item: TableColumnItem<T>) => void;
|
|
169
169
|
/**
|
|
170
170
|
* 自定义筛选菜单,此函数只负责渲染图层,需要自行编写各种交互
|
|
171
171
|
*/
|
|
172
172
|
filterDropdown?: (props: {
|
|
173
|
-
columnData: TableColumnItem
|
|
173
|
+
columnData: TableColumnItem<T>;
|
|
174
174
|
setFilterDropdownVisible: Function;
|
|
175
175
|
}) => React.ReactNode;
|
|
176
176
|
};
|
package/lib/types/use-table.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { PaginationProps } from '@hi-ui/pagination';
|
|
|
3
3
|
import { ScrollbarProps } from '@hi-ui/scrollbar';
|
|
4
4
|
import { Action, Extra } from './hooks/use-change';
|
|
5
5
|
import { TableColumnItem, TableFrozenColumnOptions, TableRowEventData, TableRowSelection, FlattedTableColumnItemData, FlattedTableRowData, TableHelper } from './types';
|
|
6
|
-
export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColumn, fixedToColumn: fixedToColumnProp, onFixedToColumn, scrollWidth, resizable, tableWidthAdjustOnResize, errorRowKeys, highlightedColKeys: highlightedColKeysProp, highlightedRowKeys: highlightedRowKeysProp, showColHighlight, showRowHighlight, highlightRowOnDoubleClick, defaultExpandedRowKeys, expandedRowKeys: expandRowKeysProp, onExpand, defaultExpandAll, onLoadChildren, maxHeight, sticky, stickyTop, draggable, onDragStart, onDrop: onDropProp, onDropEnd, showColMenu, rowSelection, cellRender, footerRender, fieldKey, virtual, scrollbar, rowClassName, cellClassName, onChange, onHighlightedCol, innerRef, ...rootProps }: UseTableProps) => {
|
|
6
|
+
export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColumn, fixedToColumn: fixedToColumnProp, onFixedToColumn, scrollWidth, resizable, tableWidthAdjustOnResize, errorRowKeys, highlightedColKeys: highlightedColKeysProp, highlightedRowKeys: highlightedRowKeysProp, showColHighlight, showRowHighlight, highlightRowOnDoubleClick, defaultExpandedRowKeys, expandedRowKeys: expandRowKeysProp, onExpand, defaultExpandAll, onLoadChildren, maxHeight, stretchHeight, sticky, stickyTop, draggable, onDragStart, onDrop: onDropProp, onDropEnd, showColMenu, rowSelection, cellRender, footerRender, fieldKey, virtual, scrollbar, rowClassName, cellClassName, onChange, onHighlightedCol, innerRef, ...rootProps }: UseTableProps) => {
|
|
7
7
|
getColgroupProps: (column: FlattedTableColumnItemData, index: number) => {
|
|
8
8
|
style: {
|
|
9
9
|
width: number | undefined;
|
|
@@ -89,6 +89,7 @@ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColu
|
|
|
89
89
|
setActiveSorterType: React.Dispatch<React.SetStateAction<string | null>>;
|
|
90
90
|
canScroll: boolean;
|
|
91
91
|
maxHeight: string | number | undefined;
|
|
92
|
+
stretchHeight: boolean | undefined;
|
|
92
93
|
getTableHeaderProps: () => {
|
|
93
94
|
style: React.CSSProperties;
|
|
94
95
|
'data-sticky': "" | undefined;
|
|
@@ -165,6 +166,11 @@ export interface UseTableProps {
|
|
|
165
166
|
* 表格最大高度,当穿过该高度时,展示滚动条且表头固定
|
|
166
167
|
*/
|
|
167
168
|
maxHeight?: number | string;
|
|
169
|
+
/**
|
|
170
|
+
* 表格高度自动拉伸
|
|
171
|
+
* Todo: 无法显示分页和Footer
|
|
172
|
+
*/
|
|
173
|
+
stretchHeight?: boolean;
|
|
168
174
|
/**
|
|
169
175
|
* 表格列冻结默认设置,为 string 时仅支持从左侧冻结至某一列
|
|
170
176
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.0",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"typings": "lib/types/index.d.ts",
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
+
"types": "./lib/types/index.d.ts",
|
|
22
23
|
"require": "./lib/cjs/index.js",
|
|
23
24
|
"default": "./lib/esm/index.js"
|
|
24
25
|
}
|
|
@@ -43,48 +44,48 @@
|
|
|
43
44
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@hi-ui/array-utils": "^
|
|
47
|
-
"@hi-ui/button": "^
|
|
48
|
-
"@hi-ui/checkbox": "^
|
|
49
|
-
"@hi-ui/classname": "^
|
|
50
|
-
"@hi-ui/dom-utils": "^
|
|
51
|
-
"@hi-ui/drawer": "^
|
|
52
|
-
"@hi-ui/empty-state": "^
|
|
53
|
-
"@hi-ui/env": "^
|
|
54
|
-
"@hi-ui/func-utils": "^
|
|
55
|
-
"@hi-ui/icon-button": "^
|
|
56
|
-
"@hi-ui/icons": "^
|
|
57
|
-
"@hi-ui/loading": "^
|
|
58
|
-
"@hi-ui/object-utils": "^
|
|
59
|
-
"@hi-ui/pagination": "^
|
|
60
|
-
"@hi-ui/popper": "^
|
|
61
|
-
"@hi-ui/radio": "^
|
|
62
|
-
"@hi-ui/react-utils": "^
|
|
63
|
-
"@hi-ui/scrollbar": "^
|
|
64
|
-
"@hi-ui/select": "^
|
|
65
|
-
"@hi-ui/spinner": "^
|
|
66
|
-
"@hi-ui/times": "^
|
|
67
|
-
"@hi-ui/tree-utils": "^
|
|
68
|
-
"@hi-ui/type-assertion": "^
|
|
69
|
-
"@hi-ui/use-cache": "^
|
|
70
|
-
"@hi-ui/use-check": "^
|
|
71
|
-
"@hi-ui/use-check-state": "^
|
|
72
|
-
"@hi-ui/use-drag-sorter": "^
|
|
73
|
-
"@hi-ui/use-latest": "^
|
|
74
|
-
"@hi-ui/use-toggle": "^
|
|
75
|
-
"@hi-ui/use-uncontrolled-state": "^
|
|
76
|
-
"@hi-ui/use-update-effect": "^
|
|
47
|
+
"@hi-ui/array-utils": "^5.0.0-alpha.0",
|
|
48
|
+
"@hi-ui/button": "^5.0.0-alpha.0",
|
|
49
|
+
"@hi-ui/checkbox": "^5.0.0-alpha.0",
|
|
50
|
+
"@hi-ui/classname": "^5.0.0-alpha.0",
|
|
51
|
+
"@hi-ui/dom-utils": "^5.0.0-alpha.0",
|
|
52
|
+
"@hi-ui/drawer": "^5.0.0-alpha.0",
|
|
53
|
+
"@hi-ui/empty-state": "^5.0.0-alpha.0",
|
|
54
|
+
"@hi-ui/env": "^5.0.0-alpha.0",
|
|
55
|
+
"@hi-ui/func-utils": "^5.0.0-alpha.0",
|
|
56
|
+
"@hi-ui/icon-button": "^5.0.0-alpha.0",
|
|
57
|
+
"@hi-ui/icons": "^5.0.0-alpha.0",
|
|
58
|
+
"@hi-ui/loading": "^5.0.0-alpha.0",
|
|
59
|
+
"@hi-ui/object-utils": "^5.0.0-alpha.0",
|
|
60
|
+
"@hi-ui/pagination": "^5.0.0-alpha.0",
|
|
61
|
+
"@hi-ui/popper": "^5.0.0-alpha.0",
|
|
62
|
+
"@hi-ui/radio": "^5.0.0-alpha.0",
|
|
63
|
+
"@hi-ui/react-utils": "^5.0.0-alpha.0",
|
|
64
|
+
"@hi-ui/scrollbar": "^5.0.0-alpha.0",
|
|
65
|
+
"@hi-ui/select": "^5.0.0-alpha.0",
|
|
66
|
+
"@hi-ui/spinner": "^5.0.0-alpha.0",
|
|
67
|
+
"@hi-ui/times": "^5.0.0-alpha.0",
|
|
68
|
+
"@hi-ui/tree-utils": "^5.0.0-alpha.0",
|
|
69
|
+
"@hi-ui/type-assertion": "^5.0.0-alpha.0",
|
|
70
|
+
"@hi-ui/use-cache": "^5.0.0-alpha.0",
|
|
71
|
+
"@hi-ui/use-check": "^5.0.0-alpha.0",
|
|
72
|
+
"@hi-ui/use-check-state": "^5.0.0-alpha.0",
|
|
73
|
+
"@hi-ui/use-drag-sorter": "^5.0.0-alpha.0",
|
|
74
|
+
"@hi-ui/use-latest": "^5.0.0-alpha.0",
|
|
75
|
+
"@hi-ui/use-toggle": "^5.0.0-alpha.0",
|
|
76
|
+
"@hi-ui/use-uncontrolled-state": "^5.0.0-alpha.0",
|
|
77
|
+
"@hi-ui/use-update-effect": "^5.0.0-alpha.0",
|
|
77
78
|
"axios": "^1.5.0",
|
|
78
79
|
"react-resizable": "^3.0.4"
|
|
79
80
|
},
|
|
80
81
|
"peerDependencies": {
|
|
81
|
-
"@hi-ui/core": ">=
|
|
82
|
+
"@hi-ui/core": ">=5.0.0-alpha.0",
|
|
82
83
|
"react": ">=16.8.6",
|
|
83
84
|
"react-dom": ">=16.8.6"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
86
|
-
"@hi-ui/core": "^
|
|
87
|
-
"@hi-ui/core-css": "^
|
|
87
|
+
"@hi-ui/core": "^5.0.0-alpha.0",
|
|
88
|
+
"@hi-ui/core-css": "^5.0.0-alpha.0",
|
|
88
89
|
"@types/react-resizable": "^1.7.4",
|
|
89
90
|
"react": "^17.0.1",
|
|
90
91
|
"react-dom": "^17.0.1"
|