@hi-ui/table 4.3.4 → 4.4.0-alpha.1

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/BaseTable.js +2 -2
  3. package/lib/cjs/ColGroupContent.js +2 -2
  4. package/lib/cjs/SettingDrawer.js +29 -20
  5. package/lib/cjs/Table.js +7 -5
  6. package/lib/cjs/TableAdvancedFilter.js +4 -4
  7. package/lib/cjs/TableBody.js +5 -5
  8. package/lib/cjs/TableCell.js +2 -2
  9. package/lib/cjs/TableColumnMenu.js +3 -3
  10. package/lib/cjs/TableEmbedRow.js +3 -3
  11. package/lib/cjs/TableHeader.js +2 -2
  12. package/lib/cjs/TableRow.js +7 -4
  13. package/lib/cjs/TableSettingMenu.js +3 -3
  14. package/lib/cjs/TbodyContent.js +5 -3
  15. package/lib/cjs/TheadContent.js +2 -2
  16. package/lib/cjs/hooks/use-async-switch.js +2 -2
  17. package/lib/cjs/hooks/use-check.js +2 -2
  18. package/lib/cjs/hooks/use-col-width.js +46 -17
  19. package/lib/cjs/hooks/use-colgroup.js +2 -2
  20. package/lib/cjs/hooks/use-drag.js +2 -2
  21. package/lib/cjs/hooks/use-embed-expand.js +3 -3
  22. package/lib/cjs/hooks/use-pagination.js +3 -3
  23. package/lib/cjs/icons/index.js +2 -2
  24. package/lib/cjs/node_modules/rc-resize-observer/es/index.js +9 -9
  25. package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +2 -2
  26. package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Dom/findDOMNode.js +2 -2
  27. package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +2 -2
  28. package/lib/cjs/node_modules/rc-util/es/Dom/findDOMNode.js +2 -2
  29. package/lib/cjs/node_modules/rc-util/es/hooks/useLayoutEffect.js +4 -3
  30. package/lib/cjs/node_modules/rc-virtual-list/es/Filler.js +4 -3
  31. package/lib/cjs/node_modules/rc-virtual-list/es/Item.js +4 -3
  32. package/lib/cjs/node_modules/rc-virtual-list/es/List.js +4 -3
  33. package/lib/cjs/node_modules/rc-virtual-list/es/ScrollBar.js +4 -3
  34. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useChildren.js +4 -3
  35. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useDiffItem.js +4 -3
  36. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useHeights.js +7 -17
  37. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useScrollTo.js +4 -3
  38. package/lib/cjs/styles/index.scss.js +1 -1
  39. package/lib/cjs/use-table.js +8 -4
  40. package/lib/esm/SettingDrawer.js +26 -17
  41. package/lib/esm/Table.js +2 -0
  42. package/lib/esm/TableBody.js +1 -2
  43. package/lib/esm/TableRow.js +5 -2
  44. package/lib/esm/TbodyContent.js +3 -1
  45. package/lib/esm/hooks/use-col-width.js +44 -15
  46. package/lib/esm/node_modules/rc-virtual-list/es/hooks/useHeights.js +3 -14
  47. package/lib/esm/node_modules/rc-virtual-list/es/index.js +1 -1
  48. package/lib/esm/node_modules/react-is/cjs/react-is.development.js +1 -1
  49. package/lib/esm/node_modules/react-is/cjs/react-is.production.min.js +1 -1
  50. package/lib/esm/styles/index.scss.js +1 -1
  51. package/lib/esm/use-table.js +6 -2
  52. package/lib/types/SettingDrawer.d.ts +5 -0
  53. package/lib/types/TableRow.d.ts +4 -0
  54. package/lib/types/context.d.ts +6 -2
  55. package/lib/types/types.d.ts +4 -0
  56. package/lib/types/use-table.d.ts +11 -1
  57. package/package.json +2 -1
  58. package/lib/cjs/node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js +0 -1090
  59. package/lib/cjs/packages/hooks/use-merge-refs/lib/esm/index.js +0 -68
  60. package/lib/cjs/packages/ui/scrollbar/lib/esm/Scrollbar.js +0 -157
  61. package/lib/cjs/packages/ui/scrollbar/lib/esm/styles/index.scss.js +0 -35
  62. package/lib/cjs/packages/ui/scrollbar/lib/esm/utils/index.js +0 -72
  63. package/lib/esm/node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js +0 -1084
  64. package/lib/esm/packages/hooks/use-merge-refs/lib/esm/index.js +0 -62
  65. package/lib/esm/packages/ui/scrollbar/lib/esm/Scrollbar.js +0 -145
  66. package/lib/esm/packages/ui/scrollbar/lib/esm/styles/index.scss.js +0 -23
  67. package/lib/esm/packages/ui/scrollbar/lib/esm/utils/index.js +0 -66
@@ -13,8 +13,7 @@ import { getPrefixCls, cx } from '@hi-ui/classname';
13
13
  import { __DEV__ } from '@hi-ui/env';
14
14
  import { useLatestCallback } from '@hi-ui/use-latest';
15
15
  import { isArrayNonEmpty, isObject } from '@hi-ui/type-assertion';
16
- import './packages/ui/scrollbar/lib/esm/styles/index.scss.js';
17
- import { Scrollbar } from './packages/ui/scrollbar/lib/esm/Scrollbar.js';
16
+ import Scrollbar from '@hi-ui/scrollbar';
18
17
  import { TableRow } from './TableRow.js';
19
18
  import { useTableContext } from './context.js';
20
19
  import { ColGroupContent } from './ColGroupContent.js';
@@ -24,6 +24,7 @@ var EMBED_ON_ROW_PROPS = {};
24
24
  var TableRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
25
25
  var _ref$prefixCls = _ref.prefixCls,
26
26
  prefixCls = _ref$prefixCls === void 0 ? _prefix : _ref$prefixCls,
27
+ className = _ref.className,
27
28
  rowDataProp = _ref.rowData,
28
29
  rowIndex = _ref.rowIndex,
29
30
  expandedTree = _ref.expandedTree,
@@ -46,7 +47,8 @@ var TableRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
46
47
  dragRowRef = _useTableContext.dragRowRef,
47
48
  onRow = _useTableContext.onRow,
48
49
  colWidths = _useTableContext.colWidths,
49
- virtual = _useTableContext.virtual;
50
+ virtual = _useTableContext.virtual,
51
+ cellClassName = _useTableContext.cellClassName;
50
52
  var rowData = rowDataProp.raw,
51
53
  rowId = rowDataProp.id;
52
54
  // ** ************** 拖拽管理 *************** *//
@@ -132,7 +134,7 @@ var TableRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
132
134
  // ** ************** 行状态管理 *************** *//
133
135
  var highlighted = isHighlightedRow(rowId);
134
136
  var hasError = isErrorRow(rowId);
135
- var cls = cx(prefixCls + "-row", showRowHighlight && prefixCls + "-row--hover", striped && (rowIndex & 1) === 1 && 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");
137
+ var cls = cx(prefixCls + "-row", showRowHighlight && prefixCls + "-row--hover", striped && (rowIndex & 1) === 1 && 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);
136
138
  var firstColumn = flattedColumnsWithoutChildren.find(function (item) {
137
139
  return item.dataKey !== SELECTION_DATA_KEY && item.dataKey !== EMBED_DATA_KEY;
138
140
  });
@@ -191,6 +193,7 @@ var TableRow = /*#__PURE__*/forwardRef(function (_ref, ref) {
191
193
  }), flattedColumnsWithoutChildren.map(function (column, idx) {
192
194
  return /*#__PURE__*/React__default.createElement(TableCell, {
193
195
  key: idx,
196
+ className: cellClassName === null || cellClassName === void 0 ? void 0 : cellClassName(rowDataProp, column, idx),
194
197
  column: column,
195
198
  isSwitcherCol: firstColumn ? firstColumn.id === column.id : false,
196
199
  rowData: rowDataProp,
@@ -29,7 +29,8 @@ var TbodyContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
29
  avgRow = _useTableContext.avgRow,
30
30
  hasSumColumn = _useTableContext.hasSumColumn,
31
31
  sumRow = _useTableContext.sumRow,
32
- measureRowElementRef = _useTableContext.measureRowElementRef;
32
+ measureRowElementRef = _useTableContext.measureRowElementRef,
33
+ rowClassName = _useTableContext.rowClassName;
33
34
  var getRequiredProps = useLatestCallback(function (id) {
34
35
  return {
35
36
  // @ts-ignore
@@ -47,6 +48,7 @@ var TbodyContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
47
48
  ref: index === 0 ? measureRowElementRef : null,
48
49
  // key={depth + index}
49
50
  key: row.id,
51
+ className: rowClassName === null || rowClassName === void 0 ? void 0 : rowClassName(row, index),
50
52
  // @ts-ignore
51
53
  rowIndex: index,
52
54
  rowData: row
@@ -15,6 +15,8 @@ var useColWidth = function useColWidth(_ref) {
15
15
  columns = _ref.columns,
16
16
  virtual = _ref.virtual;
17
17
  var measureRowElementRef = React__default.useRef(null);
18
+ // 是否重新设置过表格每列宽度
19
+ var hasResetWidths = React__default.useRef(false);
18
20
  var _React$useState = React__default.useState(function () {
19
21
  return getGroupItemWidth(columns);
20
22
  }),
@@ -47,7 +49,7 @@ var useColWidth = function useColWidth(_ref) {
47
49
  }, [columns]);
48
50
  useUpdateEffect(function () {
49
51
  if (virtual) {
50
- // 虚拟滚动的计算需要根据容器来做分配,不能使用没有witdh默认设置为0的方式来做表格平均分配
52
+ // 虚拟滚动的计算需要根据容器来做分配,不能使用没有width默认设置为0的方式来做表格平均分配
51
53
  setColWidths(getVirtualWidths());
52
54
  }
53
55
  }, [getVirtualWidths, virtual]);
@@ -63,24 +65,51 @@ var useColWidth = function useColWidth(_ref) {
63
65
  var _resizeObserver = new ResizeObserver(function () {
64
66
  if (virtual) {
65
67
  setColWidths(getVirtualWidths());
68
+ } else {
69
+ // 当第一行有内容时并且没有重新设置列宽时,在去设置列宽
70
+ // todo 临时方案:hasResetWidths.current 作用是防止某些浏览器下,下面逻辑死循环
71
+ if ((measureRowElement === null || measureRowElement === void 0 ? void 0 : measureRowElement.childNodes) && hasResetWidths.current === false) {
72
+ hasResetWidths.current = true;
73
+ // 超出的宽度,真实的表格宽度超出的每列总和的宽度
74
+ var exceedWidth = 0;
75
+ var _realColumnsWidth = Array.from(measureRowElement.childNodes).map(function (node, index) {
76
+ var _a;
77
+ var realWidth = node.getBoundingClientRect().width || 0;
78
+ var _ref2 = (_a = columns[index]) !== null && _a !== void 0 ? _a : {},
79
+ width = _ref2.width,
80
+ fixed = _ref2.fixed;
81
+ // 如果该列设置了 fixed 并且真实宽度大于设置的 width 则设置为 width
82
+ if (fixed && width && width < realWidth) {
83
+ exceedWidth += realWidth - width;
84
+ return width;
85
+ }
86
+ return realWidth;
87
+ });
88
+ // 如果有多余的宽度,则将多余的宽度平分到没有设置 maxWidth 的列上
89
+ if (exceedWidth > 0) {
90
+ var noFixedColumns = columns.filter(function (item) {
91
+ return !item.fixed;
92
+ });
93
+ _realColumnsWidth.map(function (item, index) {
94
+ if (!columns[index].fixed) {
95
+ return item + Math.floor(exceedWidth / noFixedColumns.length);
96
+ }
97
+ return item;
98
+ });
99
+ }
100
+ if (_realColumnsWidth.some(function (width) {
101
+ return width && width > 0;
102
+ })) {
103
+ setColWidths(_realColumnsWidth);
104
+ }
105
+ }
66
106
  }
67
- // else {
68
- // if (measureRowElement.childNodes) {
69
- // const _realColumnsWidth = Array.from(measureRowElement.childNodes).map((node) => {
70
- // return (node as HTMLElement).getBoundingClientRect().width || 0
71
- // })
72
- // if (_realColumnsWidth.some((width) => width && width > 0)) {
73
- // setColWidths(_realColumnsWidth)
74
- // }
75
- // }
76
- // }
77
107
  });
78
-
79
108
  _resizeObserver.observe(measureRowElement);
80
109
  }
81
110
  return function () {};
82
111
  // 测量元素在内容列为空时会是空,切换会使测量元素变化,导致后续的resize时间无法响应,此处测量元素变化时需要重新绑定
83
- }, [getVirtualWidths, virtual]);
112
+ }, [columns, getVirtualWidths, virtual]);
84
113
  var _React$useState2 = React__default.useState(null),
85
114
  headerTableElement = _React$useState2[0],
86
115
  setHeaderTableElement = _React$useState2[1];
@@ -106,8 +135,8 @@ var useColWidth = function useColWidth(_ref) {
106
135
  /**
107
136
  * 列宽拖拽 resize,只处理拖拽线两边的列宽度
108
137
  */
109
- var onColumnResizable = React__default.useCallback(function (_, _ref2, index) {
110
- var size = _ref2.size;
138
+ var onColumnResizable = React__default.useCallback(function (_, _ref3, index) {
139
+ var size = _ref3.size;
111
140
  var minWidth = minColWidth[index];
112
141
  var anotherMinWidth = minColWidth[index + 1];
113
142
  var nextWidth = size.width > minWidth ? size.width : minWidth;
@@ -60,17 +60,6 @@ function _iterableToArrayLimit(arr, i) {
60
60
  function _arrayWithHoles(arr) {
61
61
  if (Array.isArray(arr)) return arr;
62
62
  }
63
-
64
- /**
65
- * To get exact height to avoid scrolling deviation
66
- */
67
- function getOuterHeight(el) {
68
- var height = el.offsetHeight;
69
- var computedStyle = window.getComputedStyle(el);
70
- height += parseInt(computedStyle.marginTop, 10);
71
- height += parseInt(computedStyle.marginBottom, 10);
72
- return height;
73
- }
74
63
  function useHeights(getKey, onItemAdd, onItemRemove) {
75
64
  var _React$useState = React.useState(0),
76
65
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -88,9 +77,9 @@ function useHeights(getKey, onItemAdd, onItemRemove) {
88
77
  instanceRef.current.forEach(function (element, key) {
89
78
  if (element && element.offsetParent) {
90
79
  var htmlElement = findDOMNode(element);
91
- var outerHeight = getOuterHeight(htmlElement);
92
- if (heightsRef.current.get(key) !== outerHeight) {
93
- heightsRef.current.set(key, outerHeight);
80
+ var offsetHeight = htmlElement.offsetHeight;
81
+ if (heightsRef.current.get(key) !== offsetHeight) {
82
+ heightsRef.current.set(key, htmlElement.offsetHeight);
94
83
  }
95
84
  }
96
85
  }); // Always trigger update mark to tell parent that should re-calculate heights when resized
@@ -8,4 +8,4 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import List from './List.js';
11
- export { default } from './List.js';
11
+ export { List as default };
@@ -9,7 +9,6 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { __exports as reactIs_development } from '../../../_virtual/react-is.development.js';
12
- export { __exports as default } from '../../../_virtual/react-is.development.js';
13
12
 
14
13
  /** @license React v16.13.1
15
14
  * react-is.development.js
@@ -175,3 +174,4 @@ if (process.env.NODE_ENV !== "production") {
175
174
  reactIs_development.typeOf = typeOf;
176
175
  })();
177
176
  }
177
+ export { reactIs_development as default };
@@ -9,7 +9,6 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { __exports as reactIs_production_min } from '../../../_virtual/react-is.production.min.js';
12
- export { __exports as default } from '../../../_virtual/react-is.production.min.js';
13
12
 
14
13
  /** @license React v16.13.1
15
14
  * react-is.production.min.js
@@ -125,3 +124,4 @@ reactIs_production_min.isValidElementType = function (a) {
125
124
  return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === _typeof(a) && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
126
125
  };
127
126
  reactIs_production_min.typeOf = z;
127
+ export { reactIs_production_min as default };
@@ -8,6 +8,6 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import __styleInject__ from '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 table tbody > tr:not(.hi-v4-table-empty-content) > td {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md table tbody > tr:not(.hi-v4-table-empty-content) > td.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-md table thead > tr > th {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md table thead > tr > th.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table tbody > tr:not(.hi-v4-table-empty-content) > td {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table tbody > tr:not(.hi-v4-table-empty-content) > td.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table thead > tr > th {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table thead > tr > th.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg table tbody > tr:not(.hi-v4-table-empty-content) > td {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg table tbody > tr:not(.hi-v4-table-empty-content) > td.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg table thead > tr > th {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg table thead > tr > th.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--bordered table thead > tr > th {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered table td {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered .hi-v4-table-header {border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered .hi-v4-table-body {border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.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-handle {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;border-left: 2px solid var(--hi-v4-color-gray-50, #f5f7fa);cursor: col-resize;z-index: 1;}.hi-v4-table-header__resizable:hover .hi-v4-table-header__resizable-handle {background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.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--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-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;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);}.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-empty-content td {text-align: center;padding: var(--hi-v4-spacing-12, 24px) 0;}.hi-v4-table--bordered .hi-v4-table-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__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-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__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-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-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 table tbody > tr:not(.hi-v4-table-empty-content) > td {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md table tbody > tr:not(.hi-v4-table-empty-content) > td.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-md table thead > tr > th {padding: var(--hi-v4-spacing-7, 14px);}.hi-v4-table--size-md table thead > tr > th.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-7, 14px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table tbody > tr:not(.hi-v4-table-empty-content) > td {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table tbody > tr:not(.hi-v4-table-empty-content) > td.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table thead > tr > th {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-sm table thead > tr > th.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg table tbody > tr:not(.hi-v4-table-empty-content) > td {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg table tbody > tr:not(.hi-v4-table-empty-content) > td.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--size-lg table thead > tr > th {padding: var(--hi-v4-spacing-9, 18px);}.hi-v4-table--size-lg table thead > tr > th.hi-v4-table__selection-col {padding: var(--hi-v4-spacing-9, 18px) var(--hi-v4-spacing-5, 10px);}.hi-v4-table--bordered table thead > tr > th:not(:last-child) {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered table tr:last-child td {border-bottom: none;}.hi-v4-table--bordered table tr td:not(:last-child) {border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered .hi-v4-table-header, .hi-v4-table--bordered .hi-v4-table-body, .hi-v4-table--bordered .hi-v4-table-content {border-left: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);border-right: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered .hi-v4-table-header, .hi-v4-table--bordered .hi-v4-table-content {border-top: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.hi-v4-table--bordered .hi-v4-table-body, .hi-v4-table--bordered .hi-v4-table-content {border-bottom: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-gray-200, #ebedf0);}.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-handle {-webkit-box-sizing: content-box;box-sizing: content-box;position: absolute;width: 2px;height: 100%;bottom: 0;right: 0;border-left: 2px solid var(--hi-v4-color-gray-50, #f5f7fa);cursor: col-resize;z-index: 1;}.hi-v4-table-header__resizable:hover .hi-v4-table-header__resizable-handle {background-color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}.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--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-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;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);}.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-empty-content td {text-align: center;padding: var(--hi-v4-spacing-12, 24px) 0;}.hi-v4-table--bordered .hi-v4-table-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__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-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;}";
12
12
  __styleInject__(css_248z);
13
13
  export { css_248z as default };
@@ -75,7 +75,9 @@ var useTable = function useTable(_a) {
75
75
  fieldKey = _a$fieldKey === void 0 ? 'key' : _a$fieldKey,
76
76
  virtual = _a.virtual,
77
77
  scrollbar = _a.scrollbar,
78
- rootProps = __rest(_a, ["data", "columns", "defaultFixedToColumn", "fixedToColumn", "onFixedToColumn", "scrollWidth", "resizable", "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"]);
78
+ rowClassName = _a.rowClassName,
79
+ cellClassName = _a.cellClassName,
80
+ rootProps = __rest(_a, ["data", "columns", "defaultFixedToColumn", "fixedToColumn", "onFixedToColumn", "scrollWidth", "resizable", "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"]);
79
81
  /**
80
82
  * 获取 key 字段值
81
83
  */
@@ -554,7 +556,9 @@ var useTable = function useTable(_a) {
554
556
  showColMenu: showColMenu,
555
557
  onLoadChildren: onLoadChildren,
556
558
  setHeaderTableElement: setHeaderTableElement,
557
- scrollbar: scrollbar
559
+ scrollbar: scrollbar,
560
+ rowClassName: rowClassName,
561
+ cellClassName: cellClassName
558
562
  });
559
563
  };
560
564
  export { useTable };
@@ -17,5 +17,10 @@ export interface SettingDrawerProps extends HiBaseHTMLProps<'div'> {
17
17
  onHiddenColKeysChange?: (hiddenColKeys: string[]) => void;
18
18
  sortedColKeys?: string[];
19
19
  onSortedColKeysChange?: (sortedColKeys: string[]) => void;
20
+ cacheHiddenColKeys?: string[];
21
+ onCacheHiddenColKeysChange?: (hiddenColKeys: string[]) => void;
22
+ extraHeader?: React.ReactNode;
23
+ extraFooter?: React.ReactNode;
24
+ itemRender?: (item: TableColumnItem) => React.ReactNode;
20
25
  drawerProps?: Omit<DrawerProps, 'className'>;
21
26
  }
@@ -6,6 +6,10 @@ export interface TableRowProps {
6
6
  * 组件默认的选择器类
7
7
  */
8
8
  prefixCls?: string;
9
+ /**
10
+ * 样式类名
11
+ */
12
+ className?: string;
9
13
  /**
10
14
  * 是否为总计行
11
15
  */
@@ -41,7 +41,9 @@ export declare const TableProvider: import("react").Provider<(Omit<{
41
41
  showColMenu: boolean | undefined;
42
42
  onLoadChildren: ((item: import("./types").TableRowEventData) => void | Promise<void | any[]>) | undefined;
43
43
  setHeaderTableElement: import("react").Dispatch<import("react").SetStateAction<HTMLTableRowElement | null>>;
44
- scrollbar: boolean | import("packages/ui/scrollbar/lib/types").ScrollbarProps | undefined;
44
+ scrollbar: boolean | import("@hi-ui/scrollbar").ScrollbarProps | undefined;
45
+ rowClassName: ((record: Record<string, any>, index: number) => string) | undefined;
46
+ cellClassName: ((record: Record<string, any>, column: Record<string, any>, index: number) => string) | undefined;
45
47
  scrollLeft: number;
46
48
  scrollRight: number;
47
49
  measureRowElementRef: import("react").MutableRefObject<HTMLTableRowElement | null>;
@@ -149,7 +151,9 @@ export declare const useTableContext: () => Omit<{
149
151
  showColMenu: boolean | undefined;
150
152
  onLoadChildren: ((item: import("./types").TableRowEventData) => void | Promise<void | any[]>) | undefined;
151
153
  setHeaderTableElement: import("react").Dispatch<import("react").SetStateAction<HTMLTableRowElement | null>>;
152
- scrollbar: boolean | import("packages/ui/scrollbar/lib/types").ScrollbarProps | undefined;
154
+ scrollbar: boolean | import("@hi-ui/scrollbar").ScrollbarProps | undefined;
155
+ rowClassName: ((record: Record<string, any>, index: number) => string) | undefined;
156
+ cellClassName: ((record: Record<string, any>, column: Record<string, any>, index: number) => string) | undefined;
153
157
  scrollLeft: number;
154
158
  scrollRight: number;
155
159
  measureRowElementRef: import("react").MutableRefObject<HTMLTableRowElement | null>;
@@ -92,6 +92,10 @@ export declare type TableColumnItem = {
92
92
  * 该列宽度
93
93
  */
94
94
  width?: number;
95
+ /**
96
+ * 是否固定列宽,使用场景:设置 width 后,当所有列宽总和小于表格宽度时,多的宽度会分摊到每一列上,设置 fixed 后该列不会参与多余宽度均分。
97
+ */
98
+ fixed?: boolean;
95
99
  /**
96
100
  * 列对齐方式
97
101
  */
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { PaginationProps } from '@hi-ui/pagination';
3
3
  import { ScrollbarProps } from '@hi-ui/scrollbar';
4
4
  import { TableColumnItem, TableFrozenColumnOptions, TableRowEventData, TableRowSelection, FlattedTableColumnItemData, FlattedTableRowData } from './types';
5
- export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColumn, fixedToColumn: fixedToColumnProp, onFixedToColumn, scrollWidth, resizable, 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, ...rootProps }: UseTableProps) => {
5
+ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColumn, fixedToColumn: fixedToColumnProp, onFixedToColumn, scrollWidth, resizable, 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, ...rootProps }: UseTableProps) => {
6
6
  getColgroupProps: (column: FlattedTableColumnItemData, index: number) => {
7
7
  style: {
8
8
  width: number | undefined;
@@ -44,6 +44,8 @@ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColu
44
44
  onLoadChildren: ((item: TableRowEventData) => Promise<any[] | void> | void) | undefined;
45
45
  setHeaderTableElement: React.Dispatch<React.SetStateAction<HTMLTableRowElement | null>>;
46
46
  scrollbar: boolean | ScrollbarProps | undefined;
47
+ rowClassName: ((record: Record<string, any>, index: number) => string) | undefined;
48
+ cellClassName: ((record: Record<string, any>, column: Record<string, any>, index: number) => string) | undefined;
47
49
  scrollLeft: number;
48
50
  scrollRight: number;
49
51
  measureRowElementRef: React.MutableRefObject<HTMLTableRowElement | null>;
@@ -279,5 +281,13 @@ export interface UseTableProps {
279
281
  * 配置滚动条,滚动条样式使用HiUI自带的滚动条风格
280
282
  */
281
283
  scrollbar?: boolean | ScrollbarProps;
284
+ /**
285
+ * 设置行类名
286
+ */
287
+ rowClassName?: (record: Record<string, any>, index: number) => string;
288
+ /**
289
+ * 设置单元格类名
290
+ */
291
+ cellClassName?: (record: Record<string, any>, column: Record<string, any>, index: number) => string;
282
292
  }
283
293
  export declare type UseTableReturn = ReturnType<typeof useTable>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/table",
3
- "version": "4.3.4",
3
+ "version": "4.4.0-alpha.1",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -59,6 +59,7 @@
59
59
  "@hi-ui/pagination": "^4.0.14",
60
60
  "@hi-ui/popper": "^4.1.3",
61
61
  "@hi-ui/react-utils": "^4.0.4",
62
+ "@hi-ui/scrollbar": "^4.1.0-alpha.0",
62
63
  "@hi-ui/select": "^4.2.5",
63
64
  "@hi-ui/spinner": "^4.0.8",
64
65
  "@hi-ui/times": "^4.0.4",