@kdcloudjs/table 1.2.2-canary.11 → 1.2.2-canary.13
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 +3628 -3483
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +11 -13
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/dist/kd-ui-complete.less +777 -777
- package/es/_utils/formatUtil.js +5 -1
- package/es/_utils/hooks.js +3 -3
- package/es/_utils/usePopper.js +13 -13
- package/es/locale/locale.js +7 -6
- 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/BlankComponent.d.ts +11 -0
- package/es/table/base/BlankComponent.js +61 -0
- package/es/table/base/calculations.js +3 -3
- package/es/table/base/empty.js +2 -2
- package/es/table/base/globalStyleComponent.d.ts +5 -1
- package/es/table/base/globalStyleComponent.js +11 -7
- package/es/table/base/header.js +19 -8
- package/es/table/base/helpers/FastScrollManager.d.ts +96 -0
- package/es/table/base/helpers/FastScrollManager.js +167 -0
- package/es/table/base/helpers/SpanManager.js +2 -1
- package/es/table/base/helpers/TableDOMUtils.js +6 -5
- package/es/table/base/html-table.d.ts +1 -1
- package/es/table/base/html-table.js +16 -5
- package/es/table/base/interfaces.d.ts +2 -0
- package/es/table/base/loading.js +2 -2
- package/es/table/base/renderTemplates.js +16 -16
- package/es/table/base/styles.d.ts +2 -2
- package/es/table/base/styles.js +59 -4
- package/es/table/base/table.d.ts +14 -0
- package/es/table/base/table.js +163 -98
- package/es/table/base/utils.d.ts +1 -0
- package/es/table/base/utils.js +9 -3
- package/es/table/pipeline/features/colGroupExtendable.d.ts +1 -1
- package/es/table/pipeline/features/colGroupExtendable.js +7 -3
- package/es/table/pipeline/features/columnDrag.js +21 -12
- package/es/table/pipeline/features/columnFilter.js +5 -2
- package/es/table/pipeline/features/columnResizeWidth.js +11 -4
- package/es/table/pipeline/features/contextMenu.js +15 -8
- package/es/table/pipeline/features/featureApi/RowDragApi.js +2 -1
- package/es/table/pipeline/features/filter/DefaultFilterContent.js +5 -4
- package/es/table/pipeline/features/filter/Filter.d.ts +2 -1
- package/es/table/pipeline/features/filter/Filter.js +13 -8
- package/es/table/pipeline/features/filter/FilterPanel.d.ts +3 -1
- package/es/table/pipeline/features/filter/FilterPanel.js +15 -5
- package/es/table/pipeline/features/rangeSelection.js +10 -10
- package/es/table/pipeline/features/rowDetail.js +2 -2
- package/es/table/pipeline/features/rowDrag.js +47 -19
- package/es/table/pipeline/features/rowGrouping.js +2 -2
- package/es/table/pipeline/features/sort.js +7 -6
- package/es/table/pipeline/features/tips.js +10 -6
- package/es/table/pipeline/features/treeMode.js +5 -5
- package/es/table/pipeline/features/treeSelect.js +2 -2
- package/es/table/pipeline/pipeline.js +2 -1
- package/es/table/pivot/cross-table/buildCrossTable.js +8 -6
- package/es/table/pivot/cross-table/cross-table.js +3 -1
- package/es/table/pivot/cross-table/interfaces.d.ts +1 -1
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +10 -8
- package/es/table/pivot/cross-tree-table/cross-tree-table.js +11 -8
- 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 +5 -3
- package/es/table/transforms/sort.js +8 -6
- package/es/table/transforms/tips.js +4 -4
- package/es/table/transforms/treeMode.js +8 -6
- package/es/table/utils/buildTree.js +3 -3
- package/es/table/utils/collectNodes.js +3 -3
- package/es/table/utils/element.d.ts +1 -1
- package/es/table/utils/element.js +5 -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 +1 -0
- 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 +8 -7
- package/es/table/utils/tree-data-helpers/TreeDataHelper.js +5 -4
- package/lib/_utils/arrayUtil.js +3 -2
- package/lib/_utils/formatUtil.js +5 -1
- package/lib/_utils/hooks.js +3 -3
- package/lib/_utils/index.js +3 -2
- package/lib/_utils/type.js +5 -3
- package/lib/_utils/usePopper.js +21 -18
- package/lib/config-provider/ConfigContext.js +2 -1
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/config-provider/configProvider.js +4 -3
- package/lib/config-provider/defaultConfig.js +2 -1
- package/lib/config-provider/index.js +2 -1
- package/lib/locale/index.js +4 -3
- package/lib/locale/locale.js +14 -10
- package/lib/locale/zh-CN.js +2 -1
- 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.d.ts +11 -0
- package/lib/table/base/BlankComponent.js +75 -0
- package/lib/table/base/calculations.js +3 -3
- package/lib/table/base/empty.js +4 -4
- package/lib/table/base/globalStyleComponent.d.ts +5 -1
- package/lib/table/base/globalStyleComponent.js +16 -11
- package/lib/table/base/header.js +19 -8
- package/lib/table/base/helpers/FastScrollManager.d.ts +96 -0
- package/lib/table/base/helpers/FastScrollManager.js +175 -0
- package/lib/table/base/helpers/SpanManager.js +5 -3
- package/lib/table/base/helpers/TableDOMUtils.js +9 -7
- package/lib/table/base/helpers/getRichVisibleRectsStream.js +2 -2
- package/lib/table/base/html-table.d.ts +1 -1
- package/lib/table/base/html-table.js +16 -5
- package/lib/table/base/interfaces.d.ts +2 -0
- package/lib/table/base/loading.js +2 -2
- package/lib/table/base/renderTemplates.js +18 -18
- package/lib/table/base/styles.d.ts +2 -2
- package/lib/table/base/styles.js +74 -11
- package/lib/table/base/table.d.ts +14 -0
- package/lib/table/base/table.js +173 -109
- package/lib/table/base/utils.d.ts +1 -0
- package/lib/table/base/utils.js +28 -13
- package/lib/table/common-views.js +8 -4
- package/lib/table/internals.js +3 -2
- package/lib/table/pipeline/const.js +3 -2
- package/lib/table/pipeline/features/autoFill.js +6 -3
- package/lib/table/pipeline/features/colGroupExtendable.d.ts +1 -1
- package/lib/table/pipeline/features/colGroupExtendable.js +10 -5
- package/lib/table/pipeline/features/columnDrag.js +21 -12
- package/lib/table/pipeline/features/columnFilter.js +5 -2
- package/lib/table/pipeline/features/columnResizeWidth.js +19 -9
- package/lib/table/pipeline/features/contextMenu.js +16 -9
- package/lib/table/pipeline/features/featureApi/RowDragApi.js +5 -3
- package/lib/table/pipeline/features/filter/DefaultFilterContent.js +9 -7
- package/lib/table/pipeline/features/filter/Filter.d.ts +2 -1
- package/lib/table/pipeline/features/filter/Filter.js +17 -11
- package/lib/table/pipeline/features/filter/FilterPanel.d.ts +3 -1
- package/lib/table/pipeline/features/filter/FilterPanel.js +19 -8
- package/lib/table/pipeline/features/filter/util.js +3 -2
- package/lib/table/pipeline/features/footerDataSource.js +2 -1
- package/lib/table/pipeline/features/rangeSelection.js +14 -12
- package/lib/table/pipeline/features/rowDetail.js +2 -2
- package/lib/table/pipeline/features/rowDrag.js +53 -22
- package/lib/table/pipeline/features/rowGrouping.js +2 -2
- package/lib/table/pipeline/features/sort.js +7 -6
- package/lib/table/pipeline/features/tips.js +10 -6
- package/lib/table/pipeline/features/treeMode.js +9 -7
- package/lib/table/pipeline/features/treeSelect.js +2 -2
- package/lib/table/pipeline/index.js +2 -2
- package/lib/table/pipeline/pipeline.js +4 -2
- package/lib/table/pivot/cross-table/buildCrossTable.js +8 -6
- package/lib/table/pivot/cross-table/constants.js +2 -1
- package/lib/table/pivot/cross-table/cross-table.js +6 -3
- package/lib/table/pivot/cross-table/interfaces.d.ts +1 -1
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +10 -8
- package/lib/table/pivot/cross-tree-table/cross-tree-table.js +13 -9
- 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 +5 -5
- package/lib/table/transforms/columnResize.js +7 -5
- package/lib/table/transforms/sort.js +10 -8
- package/lib/table/transforms/tips.js +4 -4
- package/lib/table/transforms/treeMode.js +10 -8
- package/lib/table/use/useResizeObserver.js +2 -1
- package/lib/table/utils/browserType.js +4 -2
- package/lib/table/utils/buildTree.js +3 -3
- package/lib/table/utils/collectNodes.js +3 -3
- package/lib/table/utils/console.js +3 -2
- package/lib/table/utils/copyToClipboard.js +2 -1
- package/lib/table/utils/element.d.ts +1 -1
- package/lib/table/utils/element.js +5 -3
- 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 +2 -1
- package/lib/table/utils/makeRecursiveMapper.js +3 -3
- package/lib/table/utils/mergeCellProps.js +1 -0
- package/lib/table/utils/others.js +5 -4
- package/lib/table/utils/proto.js +2 -1
- package/lib/table/utils/selectColumn.js +4 -2
- package/lib/table/utils/traverseColumn.js +3 -3
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +11 -9
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +8 -6
- package/package.json +218 -218
|
@@ -24,9 +24,16 @@ function sortColumns(columns, sort) {
|
|
|
24
24
|
function stopClickPropagation(e) {
|
|
25
25
|
e.stopPropagation();
|
|
26
26
|
}
|
|
27
|
+
function adjustTranslation(isRTL) {
|
|
28
|
+
return function (value) {
|
|
29
|
+
return isRTL ? -value : value;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
27
32
|
export function columnDrag() {
|
|
28
33
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
34
|
return function (pipeline) {
|
|
35
|
+
var direction = pipeline.ctx.direction;
|
|
36
|
+
var _adjustTranslation = adjustTranslation(direction === 'rtl');
|
|
30
37
|
var _pipeline$getStateAtK = pipeline.getStateAtKey(stateKey, {}),
|
|
31
38
|
cloumnsTranslateData = _pipeline$getStateAtK.cloumnsTranslateData;
|
|
32
39
|
var columns = pipeline.getColumns();
|
|
@@ -78,7 +85,7 @@ export function columnDrag() {
|
|
|
78
85
|
});
|
|
79
86
|
var currentTarget = e.currentTarget;
|
|
80
87
|
var rect = e.currentTarget.parentElement.getClientRects()[0];
|
|
81
|
-
var startX = rect.left;
|
|
88
|
+
var startX = direction === 'rtl' ? rect.right : rect.left;
|
|
82
89
|
var mouseDownClientX = e.clientX;
|
|
83
90
|
var mouseDownClientY = e.clientY;
|
|
84
91
|
var moveData = [];
|
|
@@ -102,9 +109,10 @@ export function columnDrag() {
|
|
|
102
109
|
clientY: e.clientY
|
|
103
110
|
};
|
|
104
111
|
var scrollDistance = pipeline.ref.current.domHelper.virtual.scrollLeft - startScrollLeft;
|
|
105
|
-
var
|
|
112
|
+
var startPosition = startX - scrollDistance; // 表头最左边起点
|
|
113
|
+
var offsetDistance = direction === 'rtl' ? startPosition - e.clientX : e.clientX - startPosition;
|
|
106
114
|
updateScrollPosition(client);
|
|
107
|
-
if (
|
|
115
|
+
if (offsetDistance < 20) {
|
|
108
116
|
return;
|
|
109
117
|
} else {
|
|
110
118
|
e.stopPropagation();
|
|
@@ -141,7 +149,7 @@ export function columnDrag() {
|
|
|
141
149
|
// 计算平移位置
|
|
142
150
|
var replaceIndex = 0;
|
|
143
151
|
var totalWitdth = getColumnWidth(columns[replaceIndex]);
|
|
144
|
-
while (totalWitdth <
|
|
152
|
+
while (totalWitdth < offsetDistance && replaceIndex < columns.length - 1) {
|
|
145
153
|
replaceIndex++;
|
|
146
154
|
totalWitdth += getColumnWidth(columns[replaceIndex]);
|
|
147
155
|
}
|
|
@@ -166,12 +174,12 @@ export function columnDrag() {
|
|
|
166
174
|
code: code,
|
|
167
175
|
lock: lock
|
|
168
176
|
})) {
|
|
169
|
-
cloumnsTranslateData[code] += optionColumn.width;
|
|
177
|
+
cloumnsTranslateData[code] += _adjustTranslation(optionColumn.width);
|
|
170
178
|
if (isLeafNode(columns[index])) {
|
|
171
|
-
cloumnsTranslateData[optionColumn.code] -= width;
|
|
179
|
+
cloumnsTranslateData[optionColumn.code] -= _adjustTranslation(width);
|
|
172
180
|
} else {
|
|
173
|
-
cloumnsTranslateData[optionColumn.code] -= getColumnWidth(columns[index]);
|
|
174
|
-
moveAllChildren(children, cloumnsTranslateData, optionColumn.width);
|
|
181
|
+
cloumnsTranslateData[optionColumn.code] -= _adjustTranslation(getColumnWidth(columns[index]));
|
|
182
|
+
moveAllChildren(children, cloumnsTranslateData, _adjustTranslation(optionColumn.width));
|
|
175
183
|
}
|
|
176
184
|
columnMoved = true;
|
|
177
185
|
}
|
|
@@ -189,12 +197,12 @@ export function columnDrag() {
|
|
|
189
197
|
code: _code,
|
|
190
198
|
lock: _lock
|
|
191
199
|
})) {
|
|
192
|
-
cloumnsTranslateData[_code] -= optionColumn.width;
|
|
200
|
+
cloumnsTranslateData[_code] -= _adjustTranslation(optionColumn.width);
|
|
193
201
|
if (isLeafNode(columns[index])) {
|
|
194
|
-
cloumnsTranslateData[optionColumn.code] += _width;
|
|
202
|
+
cloumnsTranslateData[optionColumn.code] += _adjustTranslation(_width);
|
|
195
203
|
} else {
|
|
196
|
-
cloumnsTranslateData[optionColumn.code] += getColumnWidth(columns[index]);
|
|
197
|
-
moveAllChildren(_children, cloumnsTranslateData, optionColumn.width, true);
|
|
204
|
+
cloumnsTranslateData[optionColumn.code] += _adjustTranslation(getColumnWidth(columns[index]));
|
|
205
|
+
moveAllChildren(_children, cloumnsTranslateData, _adjustTranslation(optionColumn.width), true);
|
|
198
206
|
}
|
|
199
207
|
columnMoved = true;
|
|
200
208
|
}
|
|
@@ -216,6 +224,7 @@ export function columnDrag() {
|
|
|
216
224
|
e.stopPropagation(); // 存在移动就阻止冒泡
|
|
217
225
|
currentTarget.addEventListener('click', stopClickPropagation); // 阻止列头点击事件,防止拖动后触发列头过滤事件
|
|
218
226
|
}
|
|
227
|
+
|
|
219
228
|
window.requestAnimationFrame(function () {
|
|
220
229
|
// 取消阻止列头点击事件
|
|
221
230
|
currentTarget.removeEventListener('click', stopClickPropagation);
|
|
@@ -45,6 +45,7 @@ export function filter() {
|
|
|
45
45
|
var filterable = col.code && ((_a = col.features) === null || _a === void 0 ? void 0 : _a.filterable);
|
|
46
46
|
var filterActive = !!(filterable && (inputFiltersMap === null || inputFiltersMap === void 0 ? void 0 : inputFiltersMap.get(col.code)));
|
|
47
47
|
if (filterable) {
|
|
48
|
+
var _cx;
|
|
48
49
|
var handleFilterChanged = function handleFilterChanged(filterItem) {
|
|
49
50
|
var nextFiltersMap = new _Map(inputFiltersMap);
|
|
50
51
|
var currentFilter = _extends({
|
|
@@ -79,12 +80,13 @@ export function filter() {
|
|
|
79
80
|
setFilterModel: handleFilterChanged,
|
|
80
81
|
setFilter: setFilter,
|
|
81
82
|
isFilterActive: filterActive,
|
|
82
|
-
className: cx(
|
|
83
|
+
className: cx((_cx = {}, _defineProperty(_cx, Classes.tableFilterTrigger, true), _defineProperty(_cx, "active", filterActive), _cx)),
|
|
83
84
|
stopClickEventPropagation: stopClickEventPropagation,
|
|
84
85
|
stopESCKeyDownEventPropagation: stopESCKeyDownEventPropagation,
|
|
85
86
|
hideFilterPopupHeader: hideFilterPopupHeader,
|
|
86
87
|
getPopupParent: getPopupParent,
|
|
87
|
-
localeText: localeText
|
|
88
|
+
localeText: localeText,
|
|
89
|
+
direction: pipeline.ctx.direction
|
|
88
90
|
});
|
|
89
91
|
if (col.renderHeader) {
|
|
90
92
|
result.title = col.renderHeader(result.title, _Filter);
|
|
@@ -98,6 +100,7 @@ export function filter() {
|
|
|
98
100
|
// }
|
|
99
101
|
// })
|
|
100
102
|
}
|
|
103
|
+
|
|
101
104
|
if (!isLeafNode(col)) {
|
|
102
105
|
var _context3;
|
|
103
106
|
result.children = _mapInstanceProperty(_context3 = col.children).call(_context3, dfs);
|
|
@@ -11,7 +11,12 @@ import * as op from 'rxjs/operators';
|
|
|
11
11
|
import { mergeCellProps, collectNodes, makeRecursiveMapper, isGroupColumn } from '../../utils';
|
|
12
12
|
import { internals } from '../../internals';
|
|
13
13
|
import { Classes } from '../../base/styles';
|
|
14
|
-
|
|
14
|
+
import { swapRTLDirection } from '../../base/utils';
|
|
15
|
+
var TableHeaderCellResize = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n ", ": -5px;\n height: 100%;\n width: 10px;\n cursor: ew-resize;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index:1;\n\n &:after {\n content: \"\";\n position: absolute;\n display: block;\n ", ": calc(50% - 1px);\n width: 1px;\n height: calc(100% - 14px);\n top: 7px;\n }\n"])), function (props) {
|
|
16
|
+
return swapRTLDirection(props.direction, 'right');
|
|
17
|
+
}, function (props) {
|
|
18
|
+
return swapRTLDirection(props.direction, 'left');
|
|
19
|
+
});
|
|
15
20
|
var TableHeaderGroupCellResize = styled(function (props) {
|
|
16
21
|
return /*#__PURE__*/React.createElement(TableHeaderCellResize, _extends({}, props));
|
|
17
22
|
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &:after {\n height: 100%;\n top: 0;\n }\n"])));
|
|
@@ -78,7 +83,7 @@ export function columnResize() {
|
|
|
78
83
|
var nextSize$ = fromEvent(window, 'mousemove').pipe(op.takeUntil(fromEvent(window, 'mouseup')), op.map(function (e) {
|
|
79
84
|
var movingX = e.clientX;
|
|
80
85
|
var nextColumnSize = _extends({}, columnSize);
|
|
81
|
-
var deltaSum = movingX - startX;
|
|
86
|
+
var deltaSum = pipeline.ctx.direction === 'rtl' ? startX - movingX : movingX - startX;
|
|
82
87
|
var deltaRemaining = deltaSum;
|
|
83
88
|
if ((children === null || children === void 0 ? void 0 : children.length) > 0) {
|
|
84
89
|
var leafChildColumns = collectNodes(children, 'leaf-only');
|
|
@@ -143,7 +148,8 @@ export function columnResize() {
|
|
|
143
148
|
width = col.width;
|
|
144
149
|
return _extends(_extends({}, col), {
|
|
145
150
|
width: (_a = columnSize[code]) !== null && _a !== void 0 ? _a : width,
|
|
146
|
-
title:
|
|
151
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, prevTitle, (features === null || features === void 0 ? void 0 : features.resizeable) !== false && (isGroup ? /*#__PURE__*/React.createElement(TableHeaderGroupCellResize, {
|
|
152
|
+
direction: pipeline.ctx.direction,
|
|
147
153
|
className: Classes.tableHeaderCellResize,
|
|
148
154
|
onDoubleClick: function onDoubleClick(e) {
|
|
149
155
|
return handleDoubleClick(e, col);
|
|
@@ -152,6 +158,7 @@ export function columnResize() {
|
|
|
152
158
|
return handleMouseDown(e, col);
|
|
153
159
|
}
|
|
154
160
|
}) : /*#__PURE__*/React.createElement(TableHeaderCellResize, {
|
|
161
|
+
direction: pipeline.ctx.direction,
|
|
155
162
|
className: Classes.tableHeaderCellResize,
|
|
156
163
|
onDoubleClick: function onDoubleClick(e) {
|
|
157
164
|
return handleDoubleClick(e, col);
|
|
@@ -159,7 +166,7 @@ export function columnResize() {
|
|
|
159
166
|
onMouseDown: function onMouseDown(e) {
|
|
160
167
|
return handleMouseDown(e, col);
|
|
161
168
|
}
|
|
162
|
-
})))
|
|
169
|
+
}))),
|
|
163
170
|
headerCellProps: mergeCellProps(col.headerCellProps, {
|
|
164
171
|
className: 'resizeable'
|
|
165
172
|
})
|
|
@@ -3,7 +3,7 @@ import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
4
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
5
5
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
6
|
-
import React, { useRef,
|
|
6
|
+
import React, { useRef, useLayoutEffect } from 'react';
|
|
7
7
|
import ReactDOM from 'react-dom';
|
|
8
8
|
import cx from 'classnames';
|
|
9
9
|
import { ContextMenuStyleWrap } from '../../common-views';
|
|
@@ -23,24 +23,24 @@ export function contextMenu() {
|
|
|
23
23
|
popupParent.appendChild(ePopupDiv);
|
|
24
24
|
var popupHidden = false;
|
|
25
25
|
var eventList = ['mousedown', 'contextmenu'];
|
|
26
|
-
var
|
|
26
|
+
var hidePopup = function hidePopup(event) {
|
|
27
27
|
if (isEventFromCurrentPopup(event, ePopupDiv) || popupHidden) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
popupHidden = true;
|
|
31
31
|
popupParent.removeChild(ePopupDiv);
|
|
32
32
|
eventList.forEach(function (eventType) {
|
|
33
|
-
window.removeEventListener(eventType,
|
|
33
|
+
window.removeEventListener(eventType, hidePopup, true);
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
ReactDOM.render(menu, ePopupDiv, function () {
|
|
37
37
|
setTimeout(function () {
|
|
38
38
|
eventList.forEach(function (eventType) {
|
|
39
|
-
window.addEventListener(eventType,
|
|
39
|
+
window.addEventListener(eventType, hidePopup, true);
|
|
40
40
|
});
|
|
41
41
|
}, 0);
|
|
42
42
|
});
|
|
43
|
-
return
|
|
43
|
+
return hidePopup;
|
|
44
44
|
};
|
|
45
45
|
var onContextMenu = function onContextMenu(e) {
|
|
46
46
|
if (canShowContextMenu(e, pipeline)) {
|
|
@@ -106,7 +106,8 @@ export function contextMenu() {
|
|
|
106
106
|
hideContextMenu: hideContextMenu,
|
|
107
107
|
position: position,
|
|
108
108
|
getPopupParent: getPopupParent,
|
|
109
|
-
className: menuClassName
|
|
109
|
+
className: menuClassName,
|
|
110
|
+
direction: pipeline.ctx.direction
|
|
110
111
|
});
|
|
111
112
|
var _hidePopup = addPopup(menu);
|
|
112
113
|
menuHelper.init(_hidePopup);
|
|
@@ -136,18 +137,22 @@ function Menu(props) {
|
|
|
136
137
|
position = props.position,
|
|
137
138
|
getPopupParent = props.getPopupParent;
|
|
138
139
|
var menuRef = useRef();
|
|
139
|
-
|
|
140
|
+
useLayoutEffect(function () {
|
|
140
141
|
if (menuRef.current) {
|
|
141
142
|
var popupParent = getPopupParent();
|
|
142
143
|
var x = position.x,
|
|
143
144
|
y = position.y;
|
|
145
|
+
var isRTL = props.direction === 'rtl';
|
|
146
|
+
if (isRTL) {
|
|
147
|
+
x -= menuRef.current.offsetWidth;
|
|
148
|
+
}
|
|
144
149
|
var _keepWithinBounds = keepWithinBounds(popupParent, menuRef.current, x, y),
|
|
145
150
|
_x = _keepWithinBounds.x,
|
|
146
151
|
_y = _keepWithinBounds.y;
|
|
147
152
|
menuRef.current.style.left = _x + 'px';
|
|
148
153
|
menuRef.current.style.top = _y + 'px';
|
|
149
154
|
}
|
|
150
|
-
}, [position]);
|
|
155
|
+
}, [position, props.direction]);
|
|
151
156
|
return /*#__PURE__*/React.createElement(ContextMenuStyleWrap, {
|
|
152
157
|
className: cx(MenuClasses.menu, className),
|
|
153
158
|
ref: menuRef,
|
|
@@ -284,10 +289,12 @@ function keepWithinBounds(popupParent, ePopup, x, y) {
|
|
|
284
289
|
var maxX = parentWidth - minWidth;
|
|
285
290
|
x = Math.min(Math.max(x, 0), Math.abs(maxX)); // 目前位置,最大支持的位置
|
|
286
291
|
}
|
|
292
|
+
|
|
287
293
|
if (y) {
|
|
288
294
|
var maxY = parentHeight - ePopupRect.height;
|
|
289
295
|
y = Math.min(Math.max(y, 0), Math.abs(maxY)); // 目前位置,最大支持的位置
|
|
290
296
|
}
|
|
297
|
+
|
|
291
298
|
return {
|
|
292
299
|
x: x,
|
|
293
300
|
y: y
|
|
@@ -10,7 +10,7 @@ var RowDragApi = /*#__PURE__*/function () {
|
|
|
10
10
|
this.rowDropZones = [];
|
|
11
11
|
this.dragStatus = 'finished';
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
_createClass(RowDragApi, [{
|
|
14
14
|
key: "getRowDropZoneParams",
|
|
15
15
|
value: function getRowDropZoneParams() {
|
|
16
16
|
return this.rowDropZoneParams;
|
|
@@ -62,5 +62,6 @@ var RowDragApi = /*#__PURE__*/function () {
|
|
|
62
62
|
return this.dragStatus;
|
|
63
63
|
}
|
|
64
64
|
}]);
|
|
65
|
+
return RowDragApi;
|
|
65
66
|
}();
|
|
66
67
|
export { RowDragApi as default };
|
|
@@ -12,6 +12,7 @@ import { Classes, ButtonCSS } from '../../../base/styles';
|
|
|
12
12
|
import KeyCode from '../../../utils/keyCode';
|
|
13
13
|
var DefaultFilterContentStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background-color: #ffffff;\n border-radius: 2px;\n width: 100%;\n\n ", "\n .filter-option-list {\n display: flex;\n flex-direction: column;\n margin-top: 8px;\n ul {\n margin: 0;\n padding: 0;\n li {\n display: flex;\n position: relative;\n flex-shrink: 0;\n height: 32px;\n align-items: center;\n border-radius: 2px;\n font-size: 12px;\n color: var(--color);\n padding: 0 12px;\n overflow: hidden;\n cursor: pointer;\n &:hover{\n background-color: var(--primary-color-level1);\n }\n }\n li.active{\n background-color: var(--primary-color-level1);\n }\n }\n }\n\n .filter-search {\n display: flex;\n padding: 6px 12px;\n\n .filter-search-inner {\n width: 100%;\n font-size: 12px;\n color: #333333;\n height: 28px;\n line-height: 28px;\n padding: 0 8px;\n outline: none;\n background-color: #FAFAFA;\n border-radius: 2px;\n border: 1px solid var(--strong-border-color);\n &:hover{\n border-color: var(--primary-color)\n } \n &:focus{\n border-color: var(--primary-color)\n } \n }\n }\n\n .filter-footer {\n display: flex;\n flex-direction: row;\n padding: 8px 12px;\n justify-content: space-between;\n\n .filter-btn {\n text-align: center;\n font-size: 12px;\n width: 60px;\n height: 24px;\n line-height: 24px;\n }\n \n }\n"])), ButtonCSS);
|
|
14
14
|
function DefaultFilterContent(_ref) {
|
|
15
|
+
var _cx2;
|
|
15
16
|
var setFilterModel = _ref.setFilterModel,
|
|
16
17
|
filterModel = _ref.filterModel,
|
|
17
18
|
hidePanel = _ref.hidePanel,
|
|
@@ -74,7 +75,7 @@ function DefaultFilterContent(_ref) {
|
|
|
74
75
|
}
|
|
75
76
|
}, (_a = localeText[option.key]) !== null && _a !== void 0 ? _a : option.title)
|
|
76
77
|
);
|
|
77
|
-
}))), selectedValue !== 'notIsNull' && selectedValue !== 'isNull' &&
|
|
78
|
+
}))), selectedValue !== 'notIsNull' && selectedValue !== 'isNull' && /*#__PURE__*/React.createElement("div", {
|
|
78
79
|
className: 'filter-search'
|
|
79
80
|
}, /*#__PURE__*/React.createElement("input", {
|
|
80
81
|
className: 'filter-search-inner',
|
|
@@ -84,7 +85,7 @@ function DefaultFilterContent(_ref) {
|
|
|
84
85
|
},
|
|
85
86
|
onKeyDown: handleKeyDown,
|
|
86
87
|
ref: inputRef
|
|
87
|
-
}))
|
|
88
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
88
89
|
className: 'filter-footer'
|
|
89
90
|
}, /*#__PURE__*/React.createElement("button", {
|
|
90
91
|
className: cx(_defineProperty({
|
|
@@ -92,9 +93,9 @@ function DefaultFilterContent(_ref) {
|
|
|
92
93
|
}, Classes.button, true)),
|
|
93
94
|
onClick: reset
|
|
94
95
|
}, (_a = localeText.resetFilter) !== null && _a !== void 0 ? _a : '重置'), /*#__PURE__*/React.createElement("button", {
|
|
95
|
-
className: cx(
|
|
96
|
+
className: cx((_cx2 = {
|
|
96
97
|
'filter-btn': true
|
|
97
|
-
}, Classes.button, true), Classes.buttonPrimary, true)),
|
|
98
|
+
}, _defineProperty(_cx2, Classes.button, true), _defineProperty(_cx2, Classes.buttonPrimary, true), _cx2)),
|
|
98
99
|
onClick: confirm
|
|
99
100
|
}, (_b = localeText.confirmFilter) !== null && _b !== void 0 ? _b : '确定')));
|
|
100
101
|
}
|
|
@@ -18,6 +18,7 @@ interface FilterProps {
|
|
|
18
18
|
localeText?: {
|
|
19
19
|
[key: string]: string;
|
|
20
20
|
};
|
|
21
|
+
direction?: string;
|
|
21
22
|
}
|
|
22
|
-
declare function Filter({ size, style, className, FilterPanelContent, filterIcon, setFilter, setFilterModel, filterModel, isFilterActive, stopClickEventPropagation, stopESCKeyDownEventPropagation, hideFilterPopupHeader, getPopupParent, localeText }: FilterProps): JSX.Element;
|
|
23
|
+
declare function Filter({ size, style, className, FilterPanelContent, filterIcon, setFilter, setFilterModel, filterModel, isFilterActive, stopClickEventPropagation, stopESCKeyDownEventPropagation, hideFilterPopupHeader, getPopupParent, localeText, direction }: FilterProps): JSX.Element;
|
|
23
24
|
export default Filter;
|
|
@@ -22,9 +22,10 @@ function Panel(_ref) {
|
|
|
22
22
|
hidePanel = _ref.hidePanel,
|
|
23
23
|
renderPanelContent = _ref.renderPanelContent,
|
|
24
24
|
hideFilterPopupHeader = _ref.hideFilterPopupHeader,
|
|
25
|
-
popupParent = _ref.popupParent
|
|
25
|
+
popupParent = _ref.popupParent,
|
|
26
|
+
direction = _ref.direction;
|
|
26
27
|
var filterPanelRef = React.useRef(null);
|
|
27
|
-
var _React$useState = React.useState(calculatePopupRelative(ele, popupParent, _getPanelOffset(ele, hideFilterPopupHeader))),
|
|
28
|
+
var _React$useState = React.useState(calculatePopupRelative(ele, popupParent, _getPanelOffset(ele, hideFilterPopupHeader), direction)),
|
|
28
29
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
29
30
|
position = _React$useState2[0],
|
|
30
31
|
setPosition = _React$useState2[1];
|
|
@@ -33,7 +34,7 @@ function Panel(_ref) {
|
|
|
33
34
|
zIndex: 1050
|
|
34
35
|
};
|
|
35
36
|
var handleFilterPanelResize = function handleFilterPanelResize(resize) {
|
|
36
|
-
setPosition(calculatePopupRelative(ele, popupParent, _getPanelOffset(ele, hideFilterPopupHeader)));
|
|
37
|
+
setPosition(calculatePopupRelative(ele, popupParent, _getPanelOffset(ele, hideFilterPopupHeader), direction));
|
|
37
38
|
};
|
|
38
39
|
useEffect(function () {
|
|
39
40
|
var resizeObserver = addResizeObserver(filterPanelRef.current.children[0], handleFilterPanelResize);
|
|
@@ -48,10 +49,12 @@ function Panel(_ref) {
|
|
|
48
49
|
onClose: hidePanel,
|
|
49
50
|
position: position,
|
|
50
51
|
filterIcon: filterIcon,
|
|
51
|
-
hideFilterPopupHeader: hideFilterPopupHeader
|
|
52
|
+
hideFilterPopupHeader: hideFilterPopupHeader,
|
|
53
|
+
direction: direction
|
|
52
54
|
}, renderPanelContent()));
|
|
53
55
|
}
|
|
54
56
|
function Filter(_ref2) {
|
|
57
|
+
var _cx;
|
|
55
58
|
var _ref2$size = _ref2.size,
|
|
56
59
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
57
60
|
style = _ref2.style,
|
|
@@ -66,7 +69,8 @@ function Filter(_ref2) {
|
|
|
66
69
|
stopESCKeyDownEventPropagation = _ref2.stopESCKeyDownEventPropagation,
|
|
67
70
|
hideFilterPopupHeader = _ref2.hideFilterPopupHeader,
|
|
68
71
|
getPopupParent = _ref2.getPopupParent,
|
|
69
|
-
localeText = _ref2.localeText
|
|
72
|
+
localeText = _ref2.localeText,
|
|
73
|
+
direction = _ref2.direction;
|
|
70
74
|
var _React$useState3 = React.useState(false),
|
|
71
75
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
72
76
|
showPanel = _React$useState4[0],
|
|
@@ -114,7 +118,7 @@ function Filter(_ref2) {
|
|
|
114
118
|
}
|
|
115
119
|
}
|
|
116
120
|
};
|
|
117
|
-
var iconClassName = cx(
|
|
121
|
+
var iconClassName = cx((_cx = {}, _defineProperty(_cx, className, true), _defineProperty(_cx, 'filter-panel-open', showPanel), _cx));
|
|
118
122
|
var displayFilterIcon = typeof filterIcon === 'function' ? filterIcon(isFilterActive) : filterIcon;
|
|
119
123
|
var popupParent = (getPopupParent === null || getPopupParent === void 0 ? void 0 : getPopupParent(iconWrapRef.current)) || document.body;
|
|
120
124
|
return /*#__PURE__*/React.createElement(FilterIconSpanStyle, {
|
|
@@ -130,13 +134,14 @@ function Filter(_ref2) {
|
|
|
130
134
|
}, displayFilterIcon || /*#__PURE__*/React.createElement(DefaultFilterIcon, {
|
|
131
135
|
width: size,
|
|
132
136
|
height: size
|
|
133
|
-
})), showPanel && /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(Panel, {
|
|
137
|
+
})), showPanel && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Panel, {
|
|
134
138
|
ele: hideFilterPopupHeader ? iconWrapRef.current : iconRef.current,
|
|
135
139
|
filterIcon: displayFilterIcon,
|
|
136
140
|
hidePanel: hidePanel,
|
|
137
141
|
renderPanelContent: renderPanelContent,
|
|
138
142
|
hideFilterPopupHeader: hideFilterPopupHeader,
|
|
139
|
-
popupParent: popupParent
|
|
143
|
+
popupParent: popupParent,
|
|
144
|
+
direction: direction
|
|
140
145
|
}), popupParent));
|
|
141
146
|
}
|
|
142
147
|
function _getPanelOffset(ele, hideFilterPopupHeader) {
|
|
@@ -9,13 +9,15 @@ export interface FilterPanel {
|
|
|
9
9
|
style?: CSSProperties;
|
|
10
10
|
filterIcon: ReactNode;
|
|
11
11
|
children?: ReactNode;
|
|
12
|
+
direction?: string;
|
|
12
13
|
}
|
|
13
|
-
declare function FilterPanel({ style, children, position, filterIcon, onClose, hideFilterPopupHeader }: {
|
|
14
|
+
declare function FilterPanel({ style, children, position, filterIcon, onClose, hideFilterPopupHeader, direction }: {
|
|
14
15
|
style: any;
|
|
15
16
|
children: any;
|
|
16
17
|
position: any;
|
|
17
18
|
filterIcon: any;
|
|
18
19
|
onClose: any;
|
|
19
20
|
hideFilterPopupHeader: any;
|
|
21
|
+
direction: any;
|
|
20
22
|
}): JSX.Element;
|
|
21
23
|
export default FilterPanel;
|
|
@@ -27,7 +27,8 @@ function FilterPanel(_ref) {
|
|
|
27
27
|
position = _ref.position,
|
|
28
28
|
filterIcon = _ref.filterIcon,
|
|
29
29
|
onClose = _ref.onClose,
|
|
30
|
-
hideFilterPopupHeader = _ref.hideFilterPopupHeader
|
|
30
|
+
hideFilterPopupHeader = _ref.hideFilterPopupHeader,
|
|
31
|
+
direction = _ref.direction;
|
|
31
32
|
var _useState = useState(position),
|
|
32
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
34
|
perfectPosition = _useState2[0],
|
|
@@ -41,9 +42,16 @@ function FilterPanel(_ref) {
|
|
|
41
42
|
return isElementInEventPath(ref.current, e);
|
|
42
43
|
};
|
|
43
44
|
useEffect(function () {
|
|
44
|
-
|
|
45
|
+
var _a;
|
|
46
|
+
var isRTL = direction === 'rtl';
|
|
47
|
+
var x = position.x,
|
|
48
|
+
y = position.y;
|
|
49
|
+
if (isRTL) {
|
|
50
|
+
x -= (_a = ref.current) === null || _a === void 0 ? void 0 : _a.offsetWidth;
|
|
51
|
+
}
|
|
52
|
+
setPerfectPosition(keepWithinBounds(document.body, ref.current, x, y, true));
|
|
45
53
|
setVisible(true);
|
|
46
|
-
}, [position]);
|
|
54
|
+
}, [position, direction]);
|
|
47
55
|
var hasPopupMouseEvent = useRef(false);
|
|
48
56
|
var handleMouseEvent = function handleMouseEvent() {
|
|
49
57
|
// 当弹出的过滤面板内部发生鼠标按下、抬起事件时,标记当前事件,并在click捕获期清除标记,用来确定鼠标按下、抬起发生在过滤面板内部
|
|
@@ -65,13 +73,15 @@ function FilterPanel(_ref) {
|
|
|
65
73
|
style: _extends(_extends({}, style), {
|
|
66
74
|
left: visible ? perfectPosition.x : 0,
|
|
67
75
|
top: visible ? perfectPosition.y : 0,
|
|
68
|
-
opacity: visible ? 1 : 0
|
|
76
|
+
opacity: visible ? 1 : 0,
|
|
77
|
+
direction: direction
|
|
69
78
|
}),
|
|
70
79
|
onMouseDown: handleMouseEvent,
|
|
71
80
|
onMouseUp: handleMouseEvent,
|
|
72
81
|
onKeyDown: handleKeyDown,
|
|
73
82
|
ref: ref,
|
|
74
|
-
tabIndex: -1
|
|
83
|
+
tabIndex: -1,
|
|
84
|
+
direction: direction
|
|
75
85
|
}, !hideFilterPopupHeader ? /*#__PURE__*/React.createElement("div", {
|
|
76
86
|
className: Classes.popupHeader
|
|
77
87
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
2
|
+
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
2
3
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
3
4
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
4
5
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
@@ -209,8 +210,9 @@ export function rangeSelection(opts) {
|
|
|
209
210
|
};
|
|
210
211
|
}
|
|
211
212
|
function getTargetCell(target, columns) {
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
while (target) {
|
|
214
|
+
if (target.getAttribute('data-role') === 'table-cell') {
|
|
215
|
+
var _ret = function () {
|
|
214
216
|
var columnCode = target.getAttribute('data-code');
|
|
215
217
|
var column = findByTree(columns, function (item, index) {
|
|
216
218
|
return item.code === columnCode;
|
|
@@ -227,13 +229,10 @@ function getTargetCell(target, columns) {
|
|
|
227
229
|
isFooterCell: isEleInFooter(target)
|
|
228
230
|
}
|
|
229
231
|
};
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
while (target) {
|
|
235
|
-
_ret = _loop();
|
|
236
|
-
if (_ret) return _ret.v;
|
|
232
|
+
}();
|
|
233
|
+
if (_typeof(_ret) === "object") return _ret.v;
|
|
234
|
+
}
|
|
235
|
+
target = target.parentElement;
|
|
237
236
|
}
|
|
238
237
|
return null;
|
|
239
238
|
}
|
|
@@ -422,6 +421,7 @@ export function getCellRangeId(cellRange) {
|
|
|
422
421
|
* @returns
|
|
423
422
|
*/
|
|
424
423
|
function getCellRangesClassName(cellRanges, _ref2) {
|
|
424
|
+
var _cx;
|
|
425
425
|
var isFooterCell = _ref2.isFooterCell,
|
|
426
426
|
rowIndex = _ref2.rowIndex,
|
|
427
427
|
col = _ref2.col,
|
|
@@ -437,7 +437,7 @@ function getCellRangesClassName(cellRanges, _ref2) {
|
|
|
437
437
|
matchCellRangeBottom = _getMatchBorderStyle.matchCellRangeBottom,
|
|
438
438
|
matchCellRangeRight = _getMatchBorderStyle.matchCellRangeRight;
|
|
439
439
|
var isSingleCell = isCellRangeSingleCell(cellRanges);
|
|
440
|
-
var className = cx(
|
|
440
|
+
var className = cx((_cx = {}, _defineProperty(_cx, Classes.tableCellRangeSingleCell, isSingleCell), _defineProperty(_cx, Classes.tableCellRangeSelected, !isSingleCell), _defineProperty(_cx, Classes.tableCellRangeTop, !isSingleCell && matchCellRangeTop), _defineProperty(_cx, Classes.tableCellRangeLeft, !isSingleCell && matchCellRangeLeft), _defineProperty(_cx, Classes.tableCellRangeBottom, !isSingleCell && matchCellRangeBottom), _defineProperty(_cx, Classes.tableCellRangeRight, !isSingleCell && matchCellRangeRight), _cx));
|
|
441
441
|
return className;
|
|
442
442
|
}
|
|
443
443
|
function getMatchBorderStyle(cellRanges, _ref3) {
|
|
@@ -212,12 +212,12 @@ export function rowDetail() {
|
|
|
212
212
|
}
|
|
213
213
|
});
|
|
214
214
|
tableColumns[expandColumnIndex] = _extends(_extends({}, expandCol), {
|
|
215
|
-
title:
|
|
215
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
216
216
|
style: {
|
|
217
217
|
display: 'inline-block',
|
|
218
218
|
marginLeft: textOffset
|
|
219
219
|
}
|
|
220
|
-
}, internals.safeRenderHeader(expandCol))
|
|
220
|
+
}, internals.safeRenderHeader(expandCol)),
|
|
221
221
|
render: render,
|
|
222
222
|
getCellProps: clickArea === 'cell' ? getCellProps : expandCol.getCellProps,
|
|
223
223
|
getSpanRect: function getSpanRect(value, row, rowIndex) {
|