@kdcloudjs/table 1.2.2-canary.18 → 1.2.2-canary.20
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/LICENSE +568 -568
- package/README.md +111 -111
- package/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.js +3908 -3253
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/kd-ui-complete.less +777 -777
- package/es/_utils/formatUtil.js +1 -5
- package/es/_utils/hooks.js +3 -3
- package/es/_utils/usePopper.d.ts +1 -1
- package/es/_utils/usePopper.js +26 -26
- package/es/locale/locale.js +6 -7
- package/es/style/color/colors.less +1 -1
- package/es/style/core/index.less +1 -1
- package/es/style/core/motion/other.less +27 -27
- package/es/style/core/motion/slide.less +53 -53
- package/es/style/core/motion.less +1 -1
- package/es/style/core/reset.less +185 -185
- package/es/style/index.less +1 -1
- package/es/style/mixins/index.less +18 -18
- package/es/style/mixins/overlay.less +21 -21
- package/es/style/mixins/reset.less +12 -12
- package/es/style/themes/default.less +445 -445
- package/es/table/base/calculations.js +3 -3
- package/es/table/base/colgroup.d.ts +2 -2
- package/es/table/base/empty.d.ts +1 -1
- package/es/table/base/empty.js +2 -2
- package/es/table/base/globalStyleComponent.d.ts +2 -2
- package/es/table/base/globalStyleComponent.js +6 -8
- package/es/table/base/header.d.ts +2 -2
- package/es/table/base/header.js +5 -7
- package/es/table/base/helpers/FastScrollManager.js +1 -2
- package/es/table/base/helpers/SpanManager.js +1 -2
- package/es/table/base/helpers/TableDOMUtils.js +5 -6
- package/es/table/base/helpers/__test__/TableDOMUtils.test.js +2 -2
- package/es/table/base/html-table.d.ts +2 -2
- package/es/table/base/html-table.js +16 -8
- package/es/table/base/loading.d.ts +1 -1
- package/es/table/base/loading.js +2 -2
- package/es/table/base/renderTemplates.js +16 -16
- package/es/table/base/table.d.ts +1 -1
- package/es/table/base/table.js +17 -21
- package/es/table/base/utils.js +3 -3
- package/es/table/common-views.d.ts +4 -4
- package/es/table/pipeline/features/colGroupExtendable.js +17 -4
- package/es/table/pipeline/features/columnDrag.js +21 -2
- package/es/table/pipeline/features/columnFilter.js +1 -3
- package/es/table/pipeline/features/columnHover.js +16 -11
- package/es/table/pipeline/features/columnRangeHover.js +18 -17
- package/es/table/pipeline/features/columnResizeWidth.js +2 -2
- package/es/table/pipeline/features/contextMenu.js +4 -6
- package/es/table/pipeline/features/featureApi/RowDragApi.js +1 -2
- package/es/table/pipeline/features/filter/DefaultFilterContent.d.ts +2 -2
- package/es/table/pipeline/features/filter/DefaultFilterContent.js +4 -5
- package/es/table/pipeline/features/filter/DefaultFilterIcon.d.ts +2 -2
- package/es/table/pipeline/features/filter/Filter.d.ts +1 -1
- package/es/table/pipeline/features/filter/Filter.js +2 -3
- package/es/table/pipeline/features/filter/FilterPanel.d.ts +2 -2
- package/es/table/pipeline/features/mergeCellHover.js +21 -15
- package/es/table/pipeline/features/rangeSelection.js +12 -10
- package/es/table/pipeline/features/rowDetail.js +5 -3
- package/es/table/pipeline/features/rowDrag.js +2 -3
- package/es/table/pipeline/features/rowGrouping.js +9 -8
- package/es/table/pipeline/features/sort.js +6 -7
- package/es/table/pipeline/features/tips.js +4 -4
- package/es/table/pipeline/features/treeMode.js +5 -5
- package/es/table/pipeline/features/treeSelect.js +2 -2
- package/es/table/pipeline/pipeline.js +1 -2
- package/es/table/pivot/cross-table/buildCrossTable.js +6 -8
- package/es/table/pivot/cross-table/cross-table.d.ts +1 -1
- package/es/table/pivot/cross-table/cross-table.js +1 -3
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
- package/es/table/pivot/cross-tree-table/cross-tree-table.d.ts +1 -1
- package/es/table/pivot/cross-tree-table/cross-tree-table.js +8 -11
- package/es/table/pivot/pivot-utils/builders.js +3 -3
- package/es/table/pivot/pivot-utils/convert-utils.js +3 -3
- package/es/table/style/index.less +1 -1
- package/es/table/transforms/autoWidth.js +3 -3
- package/es/table/transforms/columnResize.js +3 -5
- package/es/table/transforms/sort.js +6 -8
- package/es/table/transforms/tips.js +4 -4
- package/es/table/transforms/treeMode.js +10 -12
- package/es/table/utils/buildTree.js +3 -3
- package/es/table/utils/collectNodes.js +3 -3
- package/es/table/utils/exportTableAsExcel.js +3 -3
- package/es/table/utils/getTreeDepth.js +3 -3
- package/es/table/utils/groupBy.js +3 -3
- package/es/table/utils/makeRecursiveMapper.js +3 -3
- package/es/table/utils/mergeCellProps.js +0 -1
- package/es/table/utils/others.js +3 -3
- package/es/table/utils/traverseColumn.js +3 -3
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +7 -8
- package/es/table/utils/tree-data-helpers/TreeDataHelper.js +4 -5
- package/lib/_utils/arrayUtil.js +2 -3
- package/lib/_utils/formatUtil.js +1 -5
- package/lib/_utils/hooks.js +3 -3
- package/lib/_utils/index.js +2 -3
- package/lib/_utils/type.js +3 -5
- package/lib/_utils/usePopper.d.ts +1 -1
- package/lib/_utils/usePopper.js +30 -34
- package/lib/config-provider/ConfigContext.js +1 -2
- package/lib/config-provider/compDefaultProps.js +1 -2
- package/lib/config-provider/configProvider.js +2 -4
- package/lib/config-provider/defaultConfig.js +1 -2
- package/lib/config-provider/index.js +1 -2
- package/lib/locale/index.js +2 -4
- package/lib/locale/locale.js +10 -14
- package/lib/locale/zh-CN.js +1 -2
- package/lib/style/color/colors.less +1 -1
- package/lib/style/components.less +1 -1
- package/lib/style/core/index.less +1 -1
- package/lib/style/core/motion/other.less +27 -27
- package/lib/style/core/motion/slide.less +53 -53
- package/lib/style/core/motion.less +1 -1
- package/lib/style/core/reset.less +185 -185
- package/lib/style/index.less +1 -1
- package/lib/style/mixins/index.less +18 -18
- package/lib/style/mixins/overlay.less +21 -21
- package/lib/style/mixins/reset.less +12 -12
- package/lib/style/themes/default.less +445 -445
- package/lib/table/base/BlankComponent.js +4 -7
- package/lib/table/base/calculations.js +3 -3
- package/lib/table/base/colgroup.d.ts +2 -2
- package/lib/table/base/empty.d.ts +1 -1
- package/lib/table/base/empty.js +3 -4
- package/lib/table/base/globalStyleComponent.d.ts +2 -2
- package/lib/table/base/globalStyleComponent.js +9 -13
- package/lib/table/base/header.d.ts +2 -2
- package/lib/table/base/header.js +5 -7
- package/lib/table/base/helpers/FastScrollManager.js +3 -5
- package/lib/table/base/helpers/SpanManager.js +3 -5
- package/lib/table/base/helpers/TableDOMUtils.js +7 -9
- package/lib/table/base/helpers/__test__/TableDOMUtils.test.js +2 -2
- package/lib/table/base/helpers/getRichVisibleRectsStream.js +1 -2
- package/lib/table/base/html-table.d.ts +2 -2
- package/lib/table/base/html-table.js +16 -8
- package/lib/table/base/loading.d.ts +1 -1
- package/lib/table/base/loading.js +2 -2
- package/lib/table/base/renderTemplates.js +17 -18
- package/lib/table/base/styles.js +9 -18
- package/lib/table/base/table.d.ts +1 -1
- package/lib/table/base/table.js +28 -32
- package/lib/table/base/utils.js +13 -22
- package/lib/table/common-views.d.ts +4 -4
- package/lib/table/common-views.js +4 -8
- package/lib/table/internals.js +2 -3
- package/lib/table/pipeline/const.js +2 -3
- package/lib/table/pipeline/features/autoFill.js +3 -6
- package/lib/table/pipeline/features/colGroupExtendable.js +19 -7
- package/lib/table/pipeline/features/columnDrag.js +21 -2
- package/lib/table/pipeline/features/columnFilter.js +1 -3
- package/lib/table/pipeline/features/columnHover.js +16 -11
- package/lib/table/pipeline/features/columnRangeHover.js +18 -17
- package/lib/table/pipeline/features/columnResizeWidth.js +6 -10
- package/lib/table/pipeline/features/contextMenu.js +5 -8
- package/lib/table/pipeline/features/featureApi/RowDragApi.js +3 -5
- package/lib/table/pipeline/features/filter/DefaultFilterContent.d.ts +2 -2
- package/lib/table/pipeline/features/filter/DefaultFilterContent.js +6 -9
- package/lib/table/pipeline/features/filter/DefaultFilterIcon.d.ts +2 -2
- package/lib/table/pipeline/features/filter/Filter.d.ts +1 -1
- package/lib/table/pipeline/features/filter/Filter.js +4 -7
- package/lib/table/pipeline/features/filter/FilterPanel.d.ts +2 -2
- package/lib/table/pipeline/features/filter/FilterPanel.js +2 -4
- package/lib/table/pipeline/features/filter/util.js +2 -3
- package/lib/table/pipeline/features/footerDataSource.js +1 -2
- package/lib/table/pipeline/features/mergeCellHover.js +21 -15
- package/lib/table/pipeline/features/rangeSelection.js +14 -14
- package/lib/table/pipeline/features/rowDetail.js +5 -3
- package/lib/table/pipeline/features/rowDrag.js +5 -9
- package/lib/table/pipeline/features/rowGrouping.js +9 -8
- package/lib/table/pipeline/features/sort.js +6 -7
- package/lib/table/pipeline/features/tips.js +4 -4
- package/lib/table/pipeline/features/treeMode.js +7 -9
- package/lib/table/pipeline/features/treeSelect.js +2 -2
- package/lib/table/pipeline/index.js +1 -2
- package/lib/table/pipeline/pipeline.js +2 -4
- package/lib/table/pivot/cross-table/buildCrossTable.js +6 -8
- package/lib/table/pivot/cross-table/constants.js +1 -2
- package/lib/table/pivot/cross-table/cross-table.d.ts +1 -1
- package/lib/table/pivot/cross-table/cross-table.js +3 -6
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
- package/lib/table/pivot/cross-tree-table/cross-tree-table.d.ts +1 -1
- package/lib/table/pivot/cross-tree-table/cross-tree-table.js +9 -13
- package/lib/table/pivot/pivot-utils/builders.js +3 -3
- package/lib/table/pivot/pivot-utils/convert-utils.js +3 -3
- package/lib/table/style/index.less +1 -1
- package/lib/table/transforms/autoWidth.js +4 -5
- package/lib/table/transforms/columnResize.js +4 -7
- package/lib/table/transforms/sort.js +7 -10
- package/lib/table/transforms/tips.js +4 -4
- package/lib/table/transforms/treeMode.js +11 -14
- package/lib/table/use/useResizeObserver.js +1 -2
- package/lib/table/utils/browserType.js +2 -4
- package/lib/table/utils/buildTree.js +3 -3
- package/lib/table/utils/collectNodes.js +3 -3
- package/lib/table/utils/console.js +2 -3
- package/lib/table/utils/copyToClipboard.js +1 -2
- package/lib/table/utils/exportTableAsExcel.js +3 -3
- package/lib/table/utils/getTreeDepth.js +3 -3
- package/lib/table/utils/groupBy.js +3 -3
- package/lib/table/utils/keyCode.js +1 -2
- package/lib/table/utils/makeRecursiveMapper.js +3 -3
- package/lib/table/utils/mergeCellProps.js +0 -1
- package/lib/table/utils/others.js +4 -5
- package/lib/table/utils/proto.js +1 -2
- package/lib/table/utils/selectColumn.js +2 -4
- package/lib/table/utils/traverseColumn.js +3 -3
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +9 -11
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +6 -8
- package/package.json +219 -219
- package/dist/@kdcloudjs/table.min.css +0 -9
- package/dist/@kdcloudjs/table.min.js +0 -217
- package/dist/@kdcloudjs/table.min.js.map +0 -1
|
@@ -10,9 +10,9 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
10
10
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
11
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
12
12
|
import _Map from "@babel/runtime-corejs3/core-js-stable/map";
|
|
13
|
-
function _createForOfIteratorHelper(
|
|
14
|
-
function _unsupportedIterableToArray(
|
|
15
|
-
function _arrayLikeToArray(
|
|
13
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context0; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context0 = {}.toString.call(r)).call(_context0, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
16
|
import { collectNodes, isLeafNode, console } from '../utils';
|
|
17
17
|
import { AUTO_VIRTUAL_THRESHOLD, OVERSCAN_SIZE, sum } from './utils';
|
|
18
18
|
function resolveVirtualEnabled(virtualEnum, defaultValue) {
|
package/es/table/base/empty.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export interface EmptyTableProps {
|
|
|
6
6
|
emptyCellHeight?: number;
|
|
7
7
|
EmptyContent?: React.ComponentType;
|
|
8
8
|
}
|
|
9
|
-
export declare function EmptyHtmlTable({ descriptors, isLoading, emptyCellHeight, EmptyContent }: EmptyTableProps): JSX.Element;
|
|
9
|
+
export declare function EmptyHtmlTable({ descriptors, isLoading, emptyCellHeight, EmptyContent }: EmptyTableProps): React.JSX.Element;
|
package/es/table/base/empty.js
CHANGED
|
@@ -31,8 +31,8 @@ export function EmptyHtmlTable(_ref) {
|
|
|
31
31
|
style: {
|
|
32
32
|
height: emptyCellHeight !== null && emptyCellHeight !== void 0 ? emptyCellHeight : 200
|
|
33
33
|
}
|
|
34
|
-
})))), show && /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
})))), show && (/*#__PURE__*/React.createElement("div", {
|
|
35
35
|
className: Classes.emptyWrapper,
|
|
36
36
|
key: "empty"
|
|
37
|
-
}, /*#__PURE__*/React.createElement(EmptyContent, null)));
|
|
37
|
+
}, /*#__PURE__*/React.createElement(EmptyContent, null))));
|
|
38
38
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PureComponent } from 'react';
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
2
|
interface GlobalStyleComponentProps {
|
|
3
3
|
direction: string;
|
|
4
4
|
}
|
|
5
5
|
export default class GlobalStyleComponent extends PureComponent<GlobalStyleComponentProps> {
|
|
6
|
-
render(): JSX.Element;
|
|
6
|
+
render(): React.JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export {};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
2
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
5
4
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
6
5
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
7
|
-
|
|
8
|
-
function
|
|
6
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React, { PureComponent } from 'react';
|
|
10
10
|
import { GlobalStyle } from './styles';
|
|
11
11
|
var GlobalStyleComponent = /*#__PURE__*/function (_PureComponent) {
|
|
12
|
-
_inherits(GlobalStyleComponent, _PureComponent);
|
|
13
|
-
var _super = _createSuper(GlobalStyleComponent);
|
|
14
12
|
function GlobalStyleComponent() {
|
|
15
13
|
_classCallCheck(this, GlobalStyleComponent);
|
|
16
|
-
return
|
|
14
|
+
return _callSuper(this, GlobalStyleComponent, arguments);
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
_inherits(GlobalStyleComponent, _PureComponent);
|
|
17
|
+
return _createClass(GlobalStyleComponent, [{
|
|
19
18
|
key: "render",
|
|
20
19
|
value: function render() {
|
|
21
20
|
return /*#__PURE__*/React.createElement(GlobalStyle, {
|
|
@@ -23,6 +22,5 @@ var GlobalStyleComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
24
|
}]);
|
|
26
|
-
return GlobalStyleComponent;
|
|
27
25
|
}(PureComponent);
|
|
28
26
|
export { GlobalStyleComponent as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RenderInfo } from './interfaces';
|
|
3
3
|
interface TableHeaderProps {
|
|
4
4
|
info: RenderInfo;
|
|
@@ -6,5 +6,5 @@ interface TableHeaderProps {
|
|
|
6
6
|
rowCount?: number;
|
|
7
7
|
stickyRightOffset?: number;
|
|
8
8
|
}
|
|
9
|
-
export default function TableHeader({ info, theaderPosition, rowCount: _rowCount, stickyRightOffset }: TableHeaderProps): JSX.Element;
|
|
9
|
+
export default function TableHeader({ info, theaderPosition, rowCount: _rowCount, stickyRightOffset }: TableHeaderProps): React.JSX.Element;
|
|
10
10
|
export {};
|
package/es/table/base/header.js
CHANGED
|
@@ -8,9 +8,9 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
8
8
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
9
9
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
10
10
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
11
|
-
function _createForOfIteratorHelper(
|
|
12
|
-
function _unsupportedIterableToArray(
|
|
13
|
-
function _arrayLikeToArray(
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context6; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context6 = {}.toString.call(r)).call(_context6, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
14
|
import cx from 'classnames';
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import { getTreeDepth, isLeafNode } from '../utils';
|
|
@@ -205,7 +205,6 @@ export default function TableHeader(_ref2) {
|
|
|
205
205
|
var leftFlatCount = flat.left.length;
|
|
206
206
|
var rightFlatCount = flat.right.length;
|
|
207
207
|
var thead = _mapInstanceProperty(_context4 = headerRenderInfo.leveled).call(_context4, function (wrappedCols, level) {
|
|
208
|
-
var _cx2;
|
|
209
208
|
var _wrappedCols = _concatInstanceProperty(wrappedCols).call(wrappedCols);
|
|
210
209
|
// 左中右区域渲染,分组列可能单独位于一个区域,此时其他区域也需要适配分组的高度
|
|
211
210
|
// rowspan 需要空白的列头去占位, 需要补充额外的空白列头
|
|
@@ -220,7 +219,6 @@ export default function TableHeader(_ref2) {
|
|
|
220
219
|
var headerCells = _mapInstanceProperty(_wrappedCols).call(_wrappedCols, function (wrapped, index) {
|
|
221
220
|
var _a, _b, _c;
|
|
222
221
|
if (wrapped.type === 'normal') {
|
|
223
|
-
var _cx;
|
|
224
222
|
var colIndex = wrapped.colIndex,
|
|
225
223
|
colSpan = wrapped.colSpan,
|
|
226
224
|
isLeaf = wrapped.isLeaf,
|
|
@@ -247,7 +245,7 @@ export default function TableHeader(_ref2) {
|
|
|
247
245
|
var cell = /*#__PURE__*/React.createElement("th", _extends({
|
|
248
246
|
key: colIndex
|
|
249
247
|
}, headerCellProps, {
|
|
250
|
-
className: cx(Classes.tableHeaderCell, headerCellProps.className, (
|
|
248
|
+
className: cx(Classes.tableHeaderCell, headerCellProps.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Classes.first, colIndex === 0), Classes.last, colIndex + colSpan === fullFlatCount), Classes.lockLeft, colIndex < leftFlatCount || theaderPosition === 'left'), Classes.lockRight, colIndex >= fullFlatCount - rightFlatCount || theaderPosition === 'right'), Classes.leaf, wrapped.isLeaf || col.isHeaderMerge)),
|
|
251
249
|
colSpan: colSpan,
|
|
252
250
|
rowSpan: isLeaf || col.isHeaderMerge ? rowCount - level : undefined,
|
|
253
251
|
style: _extends(_extends({
|
|
@@ -277,7 +275,7 @@ export default function TableHeader(_ref2) {
|
|
|
277
275
|
});
|
|
278
276
|
return /*#__PURE__*/React.createElement("tr", {
|
|
279
277
|
key: level,
|
|
280
|
-
className: cx(Classes.tableHeaderRow, (
|
|
278
|
+
className: cx(Classes.tableHeaderRow, _defineProperty(_defineProperty({}, Classes.first, level === 0), Classes.last, level === rowCount - 1))
|
|
281
279
|
}, headerCells);
|
|
282
280
|
});
|
|
283
281
|
var colgroup = _mapInstanceProperty(_context5 = _flatInstanceProperty(headerRenderInfo)).call(_context5, function (wrapped) {
|
|
@@ -31,7 +31,7 @@ export var FastScrollManager = /*#__PURE__*/function () {
|
|
|
31
31
|
/**
|
|
32
32
|
* 检测是否接近底部(剩余滚动距离少于两屏)
|
|
33
33
|
*/
|
|
34
|
-
_createClass(FastScrollManager, [{
|
|
34
|
+
return _createClass(FastScrollManager, [{
|
|
35
35
|
key: "isNearBottom",
|
|
36
36
|
value: function isNearBottom(currentScrollTop, maxRenderHeight, totalScrollHeight) {
|
|
37
37
|
var remainingScrollDistance = totalScrollHeight - currentScrollTop - maxRenderHeight;
|
|
@@ -163,5 +163,4 @@ export var FastScrollManager = /*#__PURE__*/function () {
|
|
|
163
163
|
return _extends({}, this.config);
|
|
164
164
|
}
|
|
165
165
|
}]);
|
|
166
|
-
return FastScrollManager;
|
|
167
166
|
}();
|
|
@@ -9,7 +9,7 @@ var SpanManager = /*#__PURE__*/function () {
|
|
|
9
9
|
_classCallCheck(this, SpanManager);
|
|
10
10
|
this.rects = [];
|
|
11
11
|
}
|
|
12
|
-
_createClass(SpanManager, [{
|
|
12
|
+
return _createClass(SpanManager, [{
|
|
13
13
|
key: "testSkip",
|
|
14
14
|
value: function testSkip(rowIndex, colIndex) {
|
|
15
15
|
return this.rects.some(function (_ref) {
|
|
@@ -39,6 +39,5 @@ var SpanManager = /*#__PURE__*/function () {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
}]);
|
|
42
|
-
return SpanManager;
|
|
43
42
|
}();
|
|
44
43
|
export { SpanManager as default };
|
|
@@ -59,17 +59,17 @@ export var TableDOMHelper = /*#__PURE__*/function () {
|
|
|
59
59
|
this.getInRangeRowByCellEvent = function (e) {
|
|
60
60
|
var _context;
|
|
61
61
|
var _a;
|
|
62
|
-
var
|
|
62
|
+
var _getParentNode = function getParentNode(ele, target) {
|
|
63
63
|
if (ele.parentNode.nodeName === target) {
|
|
64
64
|
return ele.parentNode;
|
|
65
65
|
}
|
|
66
|
-
return
|
|
66
|
+
return _getParentNode(ele.parentNode, target);
|
|
67
67
|
};
|
|
68
68
|
e = e instanceof Array ? e[0] : e;
|
|
69
69
|
var curCell = e === null || e === void 0 ? void 0 : e.currentTarget;
|
|
70
|
-
var curRow =
|
|
70
|
+
var curRow = _getParentNode(curCell, 'TR');
|
|
71
71
|
var curRowSpan = parseInt(e.currentTarget.getAttribute('rowspan')) || 1;
|
|
72
|
-
var rows = (_a =
|
|
72
|
+
var rows = (_a = _getParentNode(curCell, 'TABLE')) === null || _a === void 0 ? void 0 : _a.rows;
|
|
73
73
|
return _sliceInstanceProperty(_context = _Array$from(rows)).call(_context, curRow.rowIndex, curRow.rowIndex + curRowSpan);
|
|
74
74
|
};
|
|
75
75
|
this.artTableWrapper = artTableWrapper;
|
|
@@ -86,7 +86,7 @@ export var TableDOMHelper = /*#__PURE__*/function () {
|
|
|
86
86
|
this.stickyScroll = stickyScrolls[stickyScrolls.length - 1]; // 当嵌套多层表格时,需要查找最后一个,否则会查找到父表格内嵌套的子表格的
|
|
87
87
|
this.stickyScrollItem = this.stickyScroll.querySelector(".".concat(Classes.stickyScrollItem));
|
|
88
88
|
}
|
|
89
|
-
_createClass(TableDOMHelper, [{
|
|
89
|
+
return _createClass(TableDOMHelper, [{
|
|
90
90
|
key: "getVirtualTop",
|
|
91
91
|
value: function getVirtualTop() {
|
|
92
92
|
return this.tableBody.querySelector(".".concat(Classes.virtualBlank, ".top"));
|
|
@@ -137,5 +137,4 @@ export var TableDOMHelper = /*#__PURE__*/function () {
|
|
|
137
137
|
return rowOffsetTop + tableOffsetTop;
|
|
138
138
|
}
|
|
139
139
|
}]);
|
|
140
|
-
return TableDOMHelper;
|
|
141
140
|
}();
|
|
@@ -6,9 +6,9 @@ describe("".concat(NAME), function () {
|
|
|
6
6
|
var tableDOMHelper;
|
|
7
7
|
var container;
|
|
8
8
|
beforeAll(function () {
|
|
9
|
-
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15
|
|
9
|
+
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1, _context10, _context11, _context12, _context13, _context14, _context15;
|
|
10
10
|
container = document.createElement('div');
|
|
11
|
-
container.innerHTML = _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = _concatInstanceProperty(_context4 = _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = _concatInstanceProperty(
|
|
11
|
+
container.innerHTML = _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = _concatInstanceProperty(_context4 = _concatInstanceProperty(_context5 = _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = _concatInstanceProperty(_context9 = _concatInstanceProperty(_context0 = _concatInstanceProperty(_context1 = _concatInstanceProperty(_context10 = _concatInstanceProperty(_context11 = _concatInstanceProperty(_context12 = _concatInstanceProperty(_context13 = _concatInstanceProperty(_context14 = _concatInstanceProperty(_context15 = "<div class='".concat(Classes.artTableWrapper, "'>\n <div class='")).call(_context15, Classes.loadingWrapper, "'>\n <div class='")).call(_context14, Classes.loadingIndicatorWrapper, "'>\n <div class='")).call(_context13, Classes.loadingIndicator, "'></div>\n </div> \n <div class='")).call(_context12, Classes.loadingContentWrapper, "'>\n <div class='")).call(_context11, Classes.artTable, "'>\n <div class='")).call(_context10, Classes.tableHeader, "'>\n \n </div>\n <div class='")).call(_context1, Classes.tableBody, "'>\n <div class='")).call(_context0, Classes.virtual, "'>\n <div class='")).call(_context9, Classes.virtualBlank, " top'></div>\n <table></table>\n <div class='")).call(_context8, Classes.virtualBlank, " bottom'></div>\n </div> \n </div>\n <div class='")).call(_context7, Classes.tableFooter, "'>\n </div>\n <div class='")).call(_context6, Classes.lockShadowMask, "'>\n <div class='")).call(_context5, Classes.leftLockShadow, "'></div>\n </div>\n <div class='")).call(_context4, Classes.lockShadowMask, "'>\n <div class='")).call(_context3, Classes.rightLockShadow, "'></div>\n </div>\n </div>\n <div class='")).call(_context2, Classes.stickyScroll, "'>\n <div class='")).call(_context, Classes.stickyScrollItem, "'></div>\n </div>\n </div> \n </div> \n </div>");
|
|
12
12
|
tableDOMHelper = new TableDOMHelper(container.querySelector(".".concat(Classes.artTableWrapper)));
|
|
13
13
|
});
|
|
14
14
|
afterAll(function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RenderInfo } from './interfaces';
|
|
3
3
|
import { BaseTableProps } from './table';
|
|
4
4
|
export interface HtmlTableProps extends Required<Pick<BaseTableProps, 'getRowProps' | 'primaryKey'>> {
|
|
@@ -14,4 +14,4 @@ export interface HtmlTableProps extends Required<Pick<BaseTableProps, 'getRowPro
|
|
|
14
14
|
};
|
|
15
15
|
tbodyPosition?: 'left' | 'center' | 'right';
|
|
16
16
|
}
|
|
17
|
-
export declare function HtmlTable({ tbodyHtmlTag, getRowProps, primaryKey, stickyRightOffset, data, verticalRenderInfo: verInfo, horizontalRenderInfo: hozInfo, tbodyPosition }: HtmlTableProps): JSX.Element;
|
|
17
|
+
export declare function HtmlTable({ tbodyHtmlTag, getRowProps, primaryKey, stickyRightOffset, data, verticalRenderInfo: verInfo, horizontalRenderInfo: hozInfo, tbodyPosition }: HtmlTableProps): React.JSX.Element;
|
|
@@ -29,11 +29,11 @@ export function HtmlTable(_ref) {
|
|
|
29
29
|
descriptors: hozInfo.visible
|
|
30
30
|
}), /*#__PURE__*/React.createElement(tbodyHtmlTag, null, _mapInstanceProperty(data).call(data, renderRow)));
|
|
31
31
|
function renderRow(record, i) {
|
|
32
|
-
var
|
|
32
|
+
var _context, _context2;
|
|
33
33
|
var rowIndex = verInfo.offset + i;
|
|
34
34
|
spanManager.stripUpwards(rowIndex);
|
|
35
35
|
var rowProps = getRowProps(record, rowIndex);
|
|
36
|
-
var rowClass = cx(Classes.tableRow, (
|
|
36
|
+
var rowClass = cx(Classes.tableRow, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Classes.first, rowIndex === verInfo.first), Classes.last, rowIndex === verInfo.last), Classes.even, rowIndex % 2 === 0), Classes.odd, rowIndex % 2 === 1), rowProps === null || rowProps === void 0 ? void 0 : rowProps.className);
|
|
37
37
|
var visibleColumnDescriptor = _concatInstanceProperty(_context = hozInfo.visible).call(_context);
|
|
38
38
|
// 左中右区域渲染,存在融合单元格时需要适配rowspan属性
|
|
39
39
|
// 如果固定的列均存在融合单元格,需空白一列做占位,否则融合的单元格不会渲染,导致显示异常
|
|
@@ -46,12 +46,21 @@ export function HtmlTable(_ref) {
|
|
|
46
46
|
isPlacehoder: true
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
// detail 行跳过水平虚拟化,渲染所有列,确保 column 0 的 getSpanRect 能正确执行
|
|
50
|
+
var isDetailRow = (rowProps === null || rowProps === void 0 ? void 0 : rowProps['data-row-detail-key']) != null;
|
|
51
|
+
var rowDescriptors = isDetailRow ? _mapInstanceProperty(_context2 = flat.full).call(_context2, function (col, i) {
|
|
52
|
+
return {
|
|
53
|
+
type: 'normal',
|
|
54
|
+
col: col,
|
|
55
|
+
colIndex: i
|
|
56
|
+
};
|
|
57
|
+
}) : visibleColumnDescriptor;
|
|
49
58
|
return /*#__PURE__*/React.createElement("tr", _extends({}, rowProps, {
|
|
50
59
|
className: rowClass,
|
|
51
60
|
key: (rowProps === null || rowProps === void 0 ? void 0 : rowProps['data-row-detail-key']) ? rowProps['data-row-detail-key'] : internals.safeGetRowKey(primaryKey, record, rowIndex),
|
|
52
61
|
"data-rowindex": rowIndex,
|
|
53
62
|
"data-role": 'table-row'
|
|
54
|
-
}), _mapInstanceProperty(
|
|
63
|
+
}), _mapInstanceProperty(rowDescriptors).call(rowDescriptors, function (descriptor) {
|
|
55
64
|
if (descriptor.type === 'blank') {
|
|
56
65
|
return /*#__PURE__*/React.createElement("td", {
|
|
57
66
|
key: descriptor.blankSide,
|
|
@@ -60,11 +69,10 @@ export function HtmlTable(_ref) {
|
|
|
60
69
|
}
|
|
61
70
|
});
|
|
62
71
|
}
|
|
63
|
-
return renderBodyCell(record, rowIndex, descriptor.col, descriptor.colIndex);
|
|
72
|
+
return renderBodyCell(record, rowIndex, descriptor.col, descriptor.colIndex, isDetailRow ? fullFlatCount : undefined);
|
|
64
73
|
}));
|
|
65
74
|
}
|
|
66
|
-
function renderBodyCell(record, rowIndex, column, colIndex) {
|
|
67
|
-
var _cx2;
|
|
75
|
+
function renderBodyCell(record, rowIndex, column, colIndex, colSpanLimit) {
|
|
68
76
|
var _a, _b, _c;
|
|
69
77
|
if (spanManager.testSkip(rowIndex, colIndex)) {
|
|
70
78
|
return null;
|
|
@@ -95,7 +103,7 @@ export function HtmlTable(_ref) {
|
|
|
95
103
|
}
|
|
96
104
|
// rowSpan/colSpan 不能过大,避免 rowSpan/colSpan 影响因虚拟滚动而未渲染的单元格
|
|
97
105
|
rowSpan = Math.min(rowSpan, verInfo.limit - rowIndex);
|
|
98
|
-
colSpan = Math.min(colSpan, hozInfo.visible.length - colIndex);
|
|
106
|
+
colSpan = Math.min(colSpan, (colSpanLimit !== null && colSpanLimit !== void 0 ? colSpanLimit : hozInfo.visible.length) - colIndex);
|
|
99
107
|
// todo: 右侧有列固定的情况下colSpan计算不对,这里先限制一下
|
|
100
108
|
rowSpan = Math.max(rowSpan, 1);
|
|
101
109
|
colSpan = Math.max(colSpan, 1);
|
|
@@ -119,7 +127,7 @@ export function HtmlTable(_ref) {
|
|
|
119
127
|
return /*#__PURE__*/React.createElement('td', _extends(_extends(_extends(_extends({
|
|
120
128
|
key: colIndex
|
|
121
129
|
}, cellProps), {
|
|
122
|
-
className: cx(Classes.tableCell, cellProps.className, (
|
|
130
|
+
className: cx(Classes.tableCell, cellProps.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Classes.first, colIndex === 0), Classes.last, colIndex + colSpan === fullFlatCount), Classes.lockLeft, colIndex < leftFlatCount || tbodyPosition === 'left'), Classes.lockRight, colIndex >= fullFlatCount - rightFlatCount), Classes.rowSpan, rowSpan > 1))
|
|
123
131
|
}), hasSpan ? {
|
|
124
132
|
colSpan: colSpan,
|
|
125
133
|
rowSpan: rowSpan
|
|
@@ -9,5 +9,5 @@ interface LoadingProps {
|
|
|
9
9
|
LoadingContentWrapper?: React.ComponentType<LoadingContentWrapperProps>;
|
|
10
10
|
LoadingIcon?: React.ComponentType;
|
|
11
11
|
}
|
|
12
|
-
export default function Loading({ visible, children, LoadingContentWrapper, LoadingIcon }: LoadingProps): JSX.Element;
|
|
12
|
+
export default function Loading({ visible, children, LoadingContentWrapper, LoadingIcon }: LoadingProps): React.JSX.Element;
|
|
13
13
|
export {};
|
package/es/table/base/loading.js
CHANGED
|
@@ -47,11 +47,11 @@ export default function Loading(_ref2) {
|
|
|
47
47
|
LoadingIcon = _ref2$LoadingIcon === void 0 ? DefaultLoadingIcon : _ref2$LoadingIcon;
|
|
48
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
className: Classes.loadingWrapper
|
|
50
|
-
}, visible && /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
}, visible && (/*#__PURE__*/React.createElement("div", {
|
|
51
51
|
className: Classes.loadingIndicatorWrapper
|
|
52
52
|
}, /*#__PURE__*/React.createElement("div", {
|
|
53
53
|
className: Classes.loadingIndicator
|
|
54
|
-
}, /*#__PURE__*/React.createElement(LoadingIcon, null))), /*#__PURE__*/React.createElement(LoadingContentWrapper, {
|
|
54
|
+
}, /*#__PURE__*/React.createElement(LoadingIcon, null)))), /*#__PURE__*/React.createElement(LoadingContentWrapper, {
|
|
55
55
|
visible: visible,
|
|
56
56
|
children: children
|
|
57
57
|
}));
|
|
@@ -49,7 +49,7 @@ function renderTableHeaderInIE(info, props, extra) {
|
|
|
49
49
|
style: typeof (extra === null || extra === void 0 ? void 0 : extra.stickyRightOffset) === 'number' ? {
|
|
50
50
|
width: extra === null || extra === void 0 ? void 0 : extra.stickyRightOffset
|
|
51
51
|
} : undefined
|
|
52
|
-
})), left.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
})), left.length > 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
53
53
|
className: Classes.fixedLeft
|
|
54
54
|
}, /*#__PURE__*/React.createElement(TableHeader, {
|
|
55
55
|
info: _extends(_extends({}, info), {
|
|
@@ -75,7 +75,7 @@ function renderTableHeaderInIE(info, props, extra) {
|
|
|
75
75
|
}),
|
|
76
76
|
theaderPosition: "left",
|
|
77
77
|
rowCount: rowCount
|
|
78
|
-
})) : null, right.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
}))) : null, right.length > 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
79
79
|
className: Classes.fixedRight,
|
|
80
80
|
style: fixedRightTableStyle
|
|
81
81
|
}, /*#__PURE__*/React.createElement(TableHeader, {
|
|
@@ -102,7 +102,7 @@ function renderTableHeaderInIE(info, props, extra) {
|
|
|
102
102
|
}),
|
|
103
103
|
theaderPosition: 'right',
|
|
104
104
|
rowCount: rowCount
|
|
105
|
-
})) : null);
|
|
105
|
+
}))) : null);
|
|
106
106
|
}
|
|
107
107
|
function renderTableBodyInIE(info, props, extra) {
|
|
108
108
|
var dataSource = props.dataSource,
|
|
@@ -134,33 +134,33 @@ function renderTableBodyInIE(info, props, extra) {
|
|
|
134
134
|
}, /*#__PURE__*/React.createElement("div", {
|
|
135
135
|
className: Classes.virtual,
|
|
136
136
|
tabIndex: -1
|
|
137
|
-
}, topBlank > 0 && /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
}, topBlank > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
138
138
|
key: "top-blank",
|
|
139
139
|
className: cx(Classes.virtualBlank, 'top'),
|
|
140
140
|
style: {
|
|
141
141
|
height: topBlank
|
|
142
142
|
}
|
|
143
|
-
}), /*#__PURE__*/React.createElement(HtmlTable, _extends({
|
|
143
|
+
})), /*#__PURE__*/React.createElement(HtmlTable, _extends({
|
|
144
144
|
tbodyHtmlTag: "tbody"
|
|
145
145
|
}, commonProps, {
|
|
146
146
|
tbodyPosition: hasLockColumn ? 'center' : undefined,
|
|
147
147
|
horizontalRenderInfo: info,
|
|
148
148
|
verticalRenderInfo: verticalRenderInfo
|
|
149
|
-
})), bottomBlank > 0 && /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
})), bottomBlank > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
150
150
|
key: "bottom-blank",
|
|
151
151
|
className: cx(Classes.virtualBlank, 'bottom'),
|
|
152
152
|
style: {
|
|
153
153
|
height: bottomBlank
|
|
154
154
|
}
|
|
155
|
-
})), left.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
}))), left.length > 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
156
156
|
className: Classes.fixedLeft
|
|
157
|
-
}, topBlank > 0 && /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
}, topBlank > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
158
158
|
key: "top-blank",
|
|
159
159
|
className: cx(Classes.virtualBlank, 'top'),
|
|
160
160
|
style: {
|
|
161
161
|
height: topBlank
|
|
162
162
|
}
|
|
163
|
-
}), /*#__PURE__*/React.createElement(HtmlTable, _extends({
|
|
163
|
+
})), /*#__PURE__*/React.createElement(HtmlTable, _extends({
|
|
164
164
|
tbodyHtmlTag: "tbody"
|
|
165
165
|
}, commonProps, {
|
|
166
166
|
tbodyPosition: "left",
|
|
@@ -174,21 +174,21 @@ function renderTableBodyInIE(info, props, extra) {
|
|
|
174
174
|
visible: _sliceInstanceProperty(visible).call(visible, 0, left.length)
|
|
175
175
|
}),
|
|
176
176
|
verticalRenderInfo: verticalRenderInfo
|
|
177
|
-
})), bottomBlank > 0 && /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
})), bottomBlank > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
178
178
|
key: "bottom-blank",
|
|
179
179
|
className: cx(Classes.virtualBlank, 'bottom'),
|
|
180
180
|
style: {
|
|
181
181
|
height: bottomBlank
|
|
182
182
|
}
|
|
183
|
-
})) : null, right.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
})))) : null, right.length > 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
184
184
|
className: Classes.fixedRight
|
|
185
|
-
}, topBlank > 0 && /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
}, topBlank > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
186
186
|
key: "top-blank",
|
|
187
187
|
className: cx(Classes.virtualBlank, 'top'),
|
|
188
188
|
style: {
|
|
189
189
|
height: topBlank
|
|
190
190
|
}
|
|
191
|
-
}), /*#__PURE__*/React.createElement(HtmlTable, _extends({
|
|
191
|
+
})), /*#__PURE__*/React.createElement(HtmlTable, _extends({
|
|
192
192
|
tbodyHtmlTag: "tbody"
|
|
193
193
|
}, commonProps, {
|
|
194
194
|
tbodyPosition: "right",
|
|
@@ -202,13 +202,13 @@ function renderTableBodyInIE(info, props, extra) {
|
|
|
202
202
|
visible: _sliceInstanceProperty(visible).call(visible, visible.length - right.length)
|
|
203
203
|
}),
|
|
204
204
|
verticalRenderInfo: verticalRenderInfo
|
|
205
|
-
})), bottomBlank > 0 && /*#__PURE__*/React.createElement("div", {
|
|
205
|
+
})), bottomBlank > 0 && (/*#__PURE__*/React.createElement("div", {
|
|
206
206
|
key: "bottom-blank",
|
|
207
207
|
className: cx(Classes.virtualBlank, 'bottom'),
|
|
208
208
|
style: {
|
|
209
209
|
height: bottomBlank
|
|
210
210
|
}
|
|
211
|
-
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
211
|
+
})))) : null, /*#__PURE__*/React.createElement("div", {
|
|
212
212
|
className: Classes.rowDetailContainer
|
|
213
213
|
}));
|
|
214
214
|
}
|
|
@@ -295,7 +295,7 @@ function renderRowDetailInIE(params) {
|
|
|
295
295
|
if (!domHelper) return;
|
|
296
296
|
var artTable = domHelper.artTable;
|
|
297
297
|
var rowDetailContainer = artTable && artTable.querySelector(".".concat(Classes.rowDetailContainer));
|
|
298
|
-
return /*#__PURE__*/ReactDom.createPortal(
|
|
298
|
+
return /*#__PURE__*/ReactDom.createPortal(/*#__PURE__*/React.createElement(RowDetail, _extends({}, params)), rowDetailContainer);
|
|
299
299
|
}
|
|
300
300
|
function RowDetail(props) {
|
|
301
301
|
var detailRef = useRef(null);
|
package/es/table/base/table.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ export declare class BaseTable extends React.Component<BaseTableProps, BaseTable
|
|
|
170
170
|
private renderStickyScroll;
|
|
171
171
|
private getScrollBarWidth;
|
|
172
172
|
private getStickyScrollContainerStyle;
|
|
173
|
-
render(): JSX.Element;
|
|
173
|
+
render(): React.JSX.Element;
|
|
174
174
|
componentDidMount(): void;
|
|
175
175
|
componentDidUpdate(prevProps: Readonly<BaseTableProps>, prevState: Readonly<BaseTableState>): void;
|
|
176
176
|
private didMountOrUpdate;
|