@kdcloudjs/table 1.2.2-canary.17 → 1.2.2-canary.19
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/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.js +3628 -3146
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +11 -19
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/es/_utils/formatUtil.js +1 -5
- package/es/_utils/hooks.js +3 -3
- package/es/_utils/usePopper.js +26 -26
- package/es/locale/locale.js +6 -7
- package/es/table/base/calculations.js +3 -3
- package/es/table/base/empty.js +2 -2
- package/es/table/base/globalStyleComponent.js +6 -8
- package/es/table/base/header.js +15 -13
- 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.js +16 -8
- package/es/table/base/loading.js +2 -2
- package/es/table/base/renderTemplates.js +17 -19
- package/es/table/base/styles.js +8 -4
- package/es/table/base/table.d.ts +1 -0
- package/es/table/base/table.js +22 -23
- package/es/table/base/utils.js +3 -3
- package/es/table/interfaces.d.ts +19 -0
- package/es/table/internals.d.ts +2 -1
- 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.js +4 -5
- package/es/table/pipeline/features/filter/Filter.js +2 -3
- package/es/table/pipeline/features/mergeCellHover.js +21 -15
- package/es/table/pipeline/features/multiSelect.d.ts +3 -1
- package/es/table/pipeline/features/multiSelect.js +38 -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/singleSelect.d.ts +3 -1
- package/es/table/pipeline/features/singleSelect.js +35 -11
- 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.js +1 -3
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
- 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/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 +7 -4
- 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.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/table/base/BlankComponent.js +4 -7
- package/lib/table/base/calculations.js +3 -3
- package/lib/table/base/empty.js +3 -4
- package/lib/table/base/globalStyleComponent.js +9 -13
- package/lib/table/base/header.js +15 -13
- 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.js +16 -8
- package/lib/table/base/loading.js +2 -2
- package/lib/table/base/renderTemplates.js +18 -21
- package/lib/table/base/styles.js +16 -21
- package/lib/table/base/table.d.ts +1 -0
- package/lib/table/base/table.js +33 -34
- package/lib/table/base/utils.js +13 -22
- package/lib/table/common-views.js +4 -8
- package/lib/table/interfaces.d.ts +19 -0
- package/lib/table/internals.d.ts +2 -1
- 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 +2 -3
- 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.js +6 -9
- package/lib/table/pipeline/features/filter/Filter.js +4 -7
- 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/multiSelect.d.ts +3 -1
- package/lib/table/pipeline/features/multiSelect.js +38 -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/singleSelect.d.ts +3 -1
- package/lib/table/pipeline/features/singleSelect.js +35 -11
- 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.js +3 -6
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
- 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/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 +7 -4
- 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 +1 -1
- package/CHANGELOG.md +0 -0
|
@@ -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 _hidePopup2 = 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, _hidePopup2, 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, _hidePopup2, true);
|
|
40
40
|
});
|
|
41
41
|
}, 0);
|
|
42
42
|
});
|
|
43
|
-
return
|
|
43
|
+
return _hidePopup2;
|
|
44
44
|
};
|
|
45
45
|
var onContextMenu = function onContextMenu(e) {
|
|
46
46
|
if (canShowContextMenu(e, pipeline)) {
|
|
@@ -289,12 +289,10 @@ function keepWithinBounds(popupParent, ePopup, x, y) {
|
|
|
289
289
|
var maxX = parentWidth - minWidth;
|
|
290
290
|
x = Math.min(Math.max(x, 0), Math.abs(maxX)); // 目前位置,最大支持的位置
|
|
291
291
|
}
|
|
292
|
-
|
|
293
292
|
if (y) {
|
|
294
293
|
var maxY = parentHeight - ePopupRect.height;
|
|
295
294
|
y = Math.min(Math.max(y, 0), Math.abs(maxY)); // 目前位置,最大支持的位置
|
|
296
295
|
}
|
|
297
|
-
|
|
298
296
|
return {
|
|
299
297
|
x: x,
|
|
300
298
|
y: y
|
|
@@ -10,7 +10,7 @@ var RowDragApi = /*#__PURE__*/function () {
|
|
|
10
10
|
this.rowDropZones = [];
|
|
11
11
|
this.dragStatus = 'finished';
|
|
12
12
|
}
|
|
13
|
-
_createClass(RowDragApi, [{
|
|
13
|
+
return _createClass(RowDragApi, [{
|
|
14
14
|
key: "getRowDropZoneParams",
|
|
15
15
|
value: function getRowDropZoneParams() {
|
|
16
16
|
return this.rowDropZoneParams;
|
|
@@ -62,6 +62,5 @@ var RowDragApi = /*#__PURE__*/function () {
|
|
|
62
62
|
return this.dragStatus;
|
|
63
63
|
}
|
|
64
64
|
}]);
|
|
65
|
-
return RowDragApi;
|
|
66
65
|
}();
|
|
67
66
|
export { RowDragApi as default };
|
|
@@ -12,7 +12,6 @@ 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;
|
|
16
15
|
var setFilterModel = _ref.setFilterModel,
|
|
17
16
|
filterModel = _ref.filterModel,
|
|
18
17
|
hidePanel = _ref.hidePanel,
|
|
@@ -75,7 +74,7 @@ function DefaultFilterContent(_ref) {
|
|
|
75
74
|
}
|
|
76
75
|
}, (_a = localeText[option.key]) !== null && _a !== void 0 ? _a : option.title)
|
|
77
76
|
);
|
|
78
|
-
}))), selectedValue !== 'notIsNull' && selectedValue !== 'isNull' && /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
}))), selectedValue !== 'notIsNull' && selectedValue !== 'isNull' && (/*#__PURE__*/React.createElement("div", {
|
|
79
78
|
className: 'filter-search'
|
|
80
79
|
}, /*#__PURE__*/React.createElement("input", {
|
|
81
80
|
className: 'filter-search-inner',
|
|
@@ -85,7 +84,7 @@ function DefaultFilterContent(_ref) {
|
|
|
85
84
|
},
|
|
86
85
|
onKeyDown: handleKeyDown,
|
|
87
86
|
ref: inputRef
|
|
88
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
89
88
|
className: 'filter-footer'
|
|
90
89
|
}, /*#__PURE__*/React.createElement("button", {
|
|
91
90
|
className: cx(_defineProperty({
|
|
@@ -93,9 +92,9 @@ function DefaultFilterContent(_ref) {
|
|
|
93
92
|
}, Classes.button, true)),
|
|
94
93
|
onClick: reset
|
|
95
94
|
}, (_a = localeText.resetFilter) !== null && _a !== void 0 ? _a : '重置'), /*#__PURE__*/React.createElement("button", {
|
|
96
|
-
className: cx((
|
|
95
|
+
className: cx(_defineProperty(_defineProperty({
|
|
97
96
|
'filter-btn': true
|
|
98
|
-
},
|
|
97
|
+
}, Classes.button, true), Classes.buttonPrimary, true)),
|
|
99
98
|
onClick: confirm
|
|
100
99
|
}, (_b = localeText.confirmFilter) !== null && _b !== void 0 ? _b : '确定')));
|
|
101
100
|
}
|
|
@@ -54,7 +54,6 @@ function Panel(_ref) {
|
|
|
54
54
|
}, renderPanelContent()));
|
|
55
55
|
}
|
|
56
56
|
function Filter(_ref2) {
|
|
57
|
-
var _cx;
|
|
58
57
|
var _ref2$size = _ref2.size,
|
|
59
58
|
size = _ref2$size === void 0 ? 12 : _ref2$size,
|
|
60
59
|
style = _ref2.style,
|
|
@@ -118,7 +117,7 @@ function Filter(_ref2) {
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
};
|
|
121
|
-
var iconClassName = cx((
|
|
120
|
+
var iconClassName = cx(_defineProperty(_defineProperty({}, className, true), 'filter-panel-open', showPanel));
|
|
122
121
|
var displayFilterIcon = typeof filterIcon === 'function' ? filterIcon(isFilterActive) : filterIcon;
|
|
123
122
|
var popupParent = (getPopupParent === null || getPopupParent === void 0 ? void 0 : getPopupParent(iconWrapRef.current)) || document.body;
|
|
124
123
|
return /*#__PURE__*/React.createElement(FilterIconSpanStyle, {
|
|
@@ -134,7 +133,7 @@ function Filter(_ref2) {
|
|
|
134
133
|
}, displayFilterIcon || /*#__PURE__*/React.createElement(DefaultFilterIcon, {
|
|
135
134
|
width: size,
|
|
136
135
|
height: size
|
|
137
|
-
})), showPanel && /*#__PURE__*/createPortal(
|
|
136
|
+
})), showPanel && /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(Panel, {
|
|
138
137
|
ele: hideFilterPopupHeader ? iconWrapRef.current : iconRef.current,
|
|
139
138
|
filterIcon: displayFilterIcon,
|
|
140
139
|
hidePanel: hidePanel,
|
|
@@ -2,6 +2,22 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
2
2
|
import { isLeafNode, makeRecursiveMapper, mergeCellProps } from '../../utils';
|
|
3
3
|
export function mergeCellHover() {
|
|
4
4
|
return function (pipeline) {
|
|
5
|
+
var onMouseEnter = function onMouseEnter(e) {
|
|
6
|
+
var InRangeRow = pipeline.ref.current.domHelper.getInRangeRowByCellEvent(e);
|
|
7
|
+
InRangeRow.forEach(function (row) {
|
|
8
|
+
row.classList.add('row-hover');
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var onMouseLeave = function onMouseLeave(e) {
|
|
12
|
+
var InRangeRow = pipeline.ref.current.domHelper.getInRangeRowByCellEvent(e);
|
|
13
|
+
InRangeRow.forEach(function (row) {
|
|
14
|
+
row.classList.remove('row-hover');
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var hoverHandlers = {
|
|
18
|
+
onMouseEnter: onMouseEnter,
|
|
19
|
+
onMouseLeave: onMouseLeave
|
|
20
|
+
};
|
|
5
21
|
return pipeline.mapColumns(makeRecursiveMapper(function (col) {
|
|
6
22
|
if (!isLeafNode(col)) {
|
|
7
23
|
return col;
|
|
@@ -9,21 +25,11 @@ export function mergeCellHover() {
|
|
|
9
25
|
var prevGetCellProps = col.getCellProps;
|
|
10
26
|
return _extends(_extends({}, col), {
|
|
11
27
|
getCellProps: function getCellProps(value, record, rowIndex) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
row.classList.add('row-hover');
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
21
|
-
var InRangeRow = pipeline.ref.current.domHelper.getInRangeRowByCellEvent(e);
|
|
22
|
-
InRangeRow.forEach(function (row) {
|
|
23
|
-
row.classList.remove('row-hover');
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
28
|
+
// 大多数列没有自定义 getCellProps,直接返回静态 handlers 避免 mergeCellProps 开销
|
|
29
|
+
if (!prevGetCellProps) return hoverHandlers;
|
|
30
|
+
var prevCellProps = prevGetCellProps(value, record, rowIndex);
|
|
31
|
+
if (!prevCellProps) return hoverHandlers;
|
|
32
|
+
return mergeCellProps(prevCellProps, hoverHandlers);
|
|
27
33
|
}
|
|
28
34
|
});
|
|
29
35
|
}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArtColumn, selectRenderProps } from '../../interfaces';
|
|
2
3
|
import { TablePipeline } from '../pipeline';
|
|
3
4
|
export interface MultiSelectFeatureOptions {
|
|
4
5
|
/** 非受控用法:默认选中的值 */
|
|
@@ -23,5 +24,6 @@ export interface MultiSelectFeatureOptions {
|
|
|
23
24
|
clickArea?: 'checkbox' | 'cell' | 'row';
|
|
24
25
|
/** 是否对触发 onChange 的 click 事件调用 event.stopPropagation() */
|
|
25
26
|
stopClickEventPropagation?: boolean;
|
|
27
|
+
customRender?: (ctx: selectRenderProps) => React.ReactNode;
|
|
26
28
|
}
|
|
27
29
|
export declare function multiSelect(opts?: MultiSelectFeatureOptions): (pipeline: TablePipeline) => TablePipeline;
|
|
@@ -112,23 +112,46 @@ export function multiSelect() {
|
|
|
112
112
|
var key = internals.safeGetRowKey(primaryKey, row, rowIndex);
|
|
113
113
|
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new _Set();
|
|
114
114
|
var checked = selectValueSet.has(key);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (opts.stopClickEventPropagation) {
|
|
126
|
-
nativeEvent.stopPropagation();
|
|
127
|
-
}
|
|
128
|
-
onCheckboxChange(checked, key, nativeEvent.shiftKey);
|
|
115
|
+
var disabled = isDisabled(row, rowIndex);
|
|
116
|
+
var defaultOnChange = clickArea === 'checkbox' ? function (arg1, arg2) {
|
|
117
|
+
var _a;
|
|
118
|
+
// 这里要同时兼容 antd 和 fusion 的用法
|
|
119
|
+
// fusion: arg2?.nativeEvent
|
|
120
|
+
// antd: arg1.nativeEvent
|
|
121
|
+
var nativeEvent = (_a = arg2 === null || arg2 === void 0 ? void 0 : arg2.nativeEvent) !== null && _a !== void 0 ? _a : arg1.nativeEvent;
|
|
122
|
+
if (nativeEvent) {
|
|
123
|
+
if (opts.stopClickEventPropagation) {
|
|
124
|
+
nativeEvent.stopPropagation();
|
|
129
125
|
}
|
|
130
|
-
|
|
126
|
+
onCheckboxChange(checked, key, nativeEvent.shiftKey);
|
|
127
|
+
}
|
|
128
|
+
} : undefined;
|
|
129
|
+
var defaultElement = /*#__PURE__*/React.createElement(Checkbox, {
|
|
130
|
+
checked: checked,
|
|
131
|
+
disabled: disabled,
|
|
132
|
+
onChange: defaultOnChange
|
|
131
133
|
});
|
|
134
|
+
var ctx = {
|
|
135
|
+
type: 'multi',
|
|
136
|
+
row: row,
|
|
137
|
+
rowIndex: rowIndex,
|
|
138
|
+
rowKey: key,
|
|
139
|
+
checked: checked,
|
|
140
|
+
disabled: disabled,
|
|
141
|
+
defaultElement: defaultElement,
|
|
142
|
+
actions: {
|
|
143
|
+
select: function select() {
|
|
144
|
+
if (!checked) onCheckboxChange(false, key, false);
|
|
145
|
+
},
|
|
146
|
+
toggle: function toggle(batch) {
|
|
147
|
+
return onCheckboxChange(checked, key, !!batch);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
if (opts.customRender) {
|
|
152
|
+
return opts.customRender(ctx);
|
|
153
|
+
}
|
|
154
|
+
return defaultElement;
|
|
132
155
|
},
|
|
133
156
|
features: _extends(_extends({}, (_l = opts.checkboxColumn) === null || _l === void 0 ? void 0 : _l.features), _defineProperty({}, MULTI_SELECT_MARK_PROPNAME, true))
|
|
134
157
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
2
|
-
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
3
2
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
4
3
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
5
4
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
@@ -187,6 +186,8 @@ export function rangeSelection(opts) {
|
|
|
187
186
|
}); // todo: 后面可以把mousedown放到一个流里面
|
|
188
187
|
return pipeline.mapColumns(makeRecursiveMapper(function (col) {
|
|
189
188
|
var cellRanges = pipeline.getStateAtKey(rangeSelectionKey) || [];
|
|
189
|
+
// 没有选区时,不包装 getCellProps,避免每个 cell 多一层函数调用和 isCellInRange 检查
|
|
190
|
+
if (cellRanges.length === 0) return col;
|
|
190
191
|
var prevGetCellProps = col.getCellProps;
|
|
191
192
|
return _extends(_extends({}, col), {
|
|
192
193
|
getCellProps: function getCellProps(value, record, rowIndex) {
|
|
@@ -210,9 +211,8 @@ export function rangeSelection(opts) {
|
|
|
210
211
|
};
|
|
211
212
|
}
|
|
212
213
|
function getTargetCell(target, columns) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
var _ret = function () {
|
|
214
|
+
var _loop = function _loop() {
|
|
215
|
+
if (target.getAttribute('data-role') === 'table-cell') {
|
|
216
216
|
var columnCode = target.getAttribute('data-code');
|
|
217
217
|
var column = findByTree(columns, function (item, index) {
|
|
218
218
|
return item.code === columnCode;
|
|
@@ -229,10 +229,13 @@ function getTargetCell(target, columns) {
|
|
|
229
229
|
isFooterCell: isEleInFooter(target)
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
232
|
+
}
|
|
233
|
+
target = target.parentElement;
|
|
234
|
+
},
|
|
235
|
+
_ret;
|
|
236
|
+
while (target) {
|
|
237
|
+
_ret = _loop();
|
|
238
|
+
if (_ret) return _ret.v;
|
|
236
239
|
}
|
|
237
240
|
return null;
|
|
238
241
|
}
|
|
@@ -421,7 +424,6 @@ export function getCellRangeId(cellRange) {
|
|
|
421
424
|
* @returns
|
|
422
425
|
*/
|
|
423
426
|
function getCellRangesClassName(cellRanges, _ref2) {
|
|
424
|
-
var _cx;
|
|
425
427
|
var isFooterCell = _ref2.isFooterCell,
|
|
426
428
|
rowIndex = _ref2.rowIndex,
|
|
427
429
|
col = _ref2.col,
|
|
@@ -437,7 +439,7 @@ function getCellRangesClassName(cellRanges, _ref2) {
|
|
|
437
439
|
matchCellRangeBottom = _getMatchBorderStyle.matchCellRangeBottom,
|
|
438
440
|
matchCellRangeRight = _getMatchBorderStyle.matchCellRangeRight;
|
|
439
441
|
var isSingleCell = isCellRangeSingleCell(cellRanges);
|
|
440
|
-
var className = cx((
|
|
442
|
+
var className = cx(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Classes.tableCellRangeSingleCell, isSingleCell), Classes.tableCellRangeSelected, !isSingleCell), Classes.tableCellRangeTop, !isSingleCell && matchCellRangeTop), Classes.tableCellRangeLeft, !isSingleCell && matchCellRangeLeft), Classes.tableCellRangeBottom, !isSingleCell && matchCellRangeBottom), Classes.tableCellRangeRight, !isSingleCell && matchCellRangeRight));
|
|
441
443
|
return className;
|
|
442
444
|
}
|
|
443
445
|
function getMatchBorderStyle(cellRanges, _ref3) {
|
|
@@ -2,6 +2,7 @@ import _toArray from "@babel/runtime-corejs3/helpers/toArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
3
3
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
4
4
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
5
|
+
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; }
|
|
5
6
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
6
7
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
7
8
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
@@ -85,6 +86,7 @@ export function rowDetail() {
|
|
|
85
86
|
}
|
|
86
87
|
});
|
|
87
88
|
function processColumns(columns) {
|
|
89
|
+
var _context4;
|
|
88
90
|
if (columns.length === 0) {
|
|
89
91
|
return columns;
|
|
90
92
|
}
|
|
@@ -180,7 +182,7 @@ export function rowDetail() {
|
|
|
180
182
|
};
|
|
181
183
|
var _tableColumns = _toArray(tableColumns),
|
|
182
184
|
firstCol = _tableColumns[0],
|
|
183
|
-
others = _sliceInstanceProperty(_tableColumns).call(
|
|
185
|
+
others = _sliceInstanceProperty(_context4 = _arrayLikeToArray(_tableColumns)).call(_context4, 1);
|
|
184
186
|
var firstColRender = function firstColRender(value, row, rowIndex) {
|
|
185
187
|
if (row[rowDetailMetaKey]) {
|
|
186
188
|
var renderRowDetail = getTableRenderTemplate('rowDetail');
|
|
@@ -212,12 +214,12 @@ export function rowDetail() {
|
|
|
212
214
|
}
|
|
213
215
|
});
|
|
214
216
|
tableColumns[expandColumnIndex] = _extends(_extends({}, expandCol), {
|
|
215
|
-
title: /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
title: (/*#__PURE__*/React.createElement("div", {
|
|
216
218
|
style: {
|
|
217
219
|
display: 'inline-block',
|
|
218
220
|
marginLeft: textOffset
|
|
219
221
|
}
|
|
220
|
-
}, internals.safeRenderHeader(expandCol)),
|
|
222
|
+
}, internals.safeRenderHeader(expandCol))),
|
|
221
223
|
render: render,
|
|
222
224
|
getCellProps: clickArea === 'cell' ? getCellProps : expandCol.getCellProps,
|
|
223
225
|
getSpanRect: function getSpanRect(value, row, rowIndex) {
|
|
@@ -362,7 +362,7 @@ export function rowDrag(opt) {
|
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
364
|
// 判断是鼠标事件还是触摸事件,分别监听对应的移动和结束事件
|
|
365
|
-
var isTouchEvent =
|
|
365
|
+
var isTouchEvent = 'touches' in startEvent;
|
|
366
366
|
if (isTouchEvent) {
|
|
367
367
|
// 触摸事件处理
|
|
368
368
|
var touchmove$ = fromEvent(window, 'touchmove', {
|
|
@@ -440,7 +440,6 @@ export function rowDrag(opt) {
|
|
|
440
440
|
onTouchStart: onTouchStart
|
|
441
441
|
});
|
|
442
442
|
pipeline.appendRowPropsGetter(function (row, rowIndex) {
|
|
443
|
-
var _cx;
|
|
444
443
|
var rowDragEvent = pipeline.getStateAtKey(rowDragKey) || {};
|
|
445
444
|
var dragStatus = rowDragApi.getDragStatus();
|
|
446
445
|
var startRowIndex = rowDragEvent.startRowIndex,
|
|
@@ -462,7 +461,7 @@ export function rowDrag(opt) {
|
|
|
462
461
|
return internals.safeGetRowKey(primaryKey, row, -1) === parentRowKey;
|
|
463
462
|
});
|
|
464
463
|
}
|
|
465
|
-
var className = cx((
|
|
464
|
+
var className = cx(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Classes.rowDragStart, rowIndex === startRowIndex && dragStatus !== 'finished'), Classes.rowDragEnd, rowIndex === endRowIndex), Classes.rowDragEndParent, isTreeTable && rowIndex === parentRowKeyIndex && dragPosition !== 'into'), Classes.rowDragEndInto, rowIndex === endRowIndex && dragPosition === 'into'), Classes.rowDragEndToTop, rowIndex === endRowIndex && dragPosition === 'top'), Classes.rowDragEndToBottom, rowIndex === endRowIndex && dragPosition === 'bottom'));
|
|
466
465
|
return {
|
|
467
466
|
className: className
|
|
468
467
|
};
|
|
@@ -2,6 +2,7 @@ import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray
|
|
|
2
2
|
import _toArray from "@babel/runtime-corejs3/helpers/toArray";
|
|
3
3
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
4
4
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
5
|
+
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; }
|
|
5
6
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
6
7
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
7
8
|
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
@@ -78,14 +79,14 @@ export function rowGrouping() {
|
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
81
|
function processColumns(columns) {
|
|
81
|
-
var
|
|
82
|
+
var _context2, _context4;
|
|
82
83
|
if (columns.length === 0) {
|
|
83
84
|
return columns;
|
|
84
85
|
}
|
|
85
86
|
var columnFlatCount = collectNodes(columns, 'leaf-only').length;
|
|
86
87
|
var _columns = _toArray(columns),
|
|
87
88
|
firstCol = _columns[0],
|
|
88
|
-
others = _sliceInstanceProperty(_columns).call(
|
|
89
|
+
others = _sliceInstanceProperty(_context2 = _arrayLikeToArray(_columns)).call(_context2, 1);
|
|
89
90
|
var render = function render(value, row, rowIndex) {
|
|
90
91
|
var _a, _b;
|
|
91
92
|
var content = internals.safeRender(firstCol, row, rowIndex);
|
|
@@ -130,8 +131,8 @@ export function rowGrouping() {
|
|
|
130
131
|
return key !== rowKey;
|
|
131
132
|
}), rowKey, 'collapse');
|
|
132
133
|
} else {
|
|
133
|
-
var
|
|
134
|
-
onChangeOpenKeys(_concatInstanceProperty(
|
|
134
|
+
var _context3;
|
|
135
|
+
onChangeOpenKeys(_concatInstanceProperty(_context3 = []).call(_context3, _toConsumableArray(openKeys), [rowKey]), rowKey, 'expand');
|
|
135
136
|
}
|
|
136
137
|
};
|
|
137
138
|
}
|
|
@@ -143,13 +144,13 @@ export function rowGrouping() {
|
|
|
143
144
|
}
|
|
144
145
|
});
|
|
145
146
|
};
|
|
146
|
-
return _concatInstanceProperty(
|
|
147
|
-
title: /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
return _concatInstanceProperty(_context4 = [_extends(_extends({}, firstCol), {
|
|
148
|
+
title: (/*#__PURE__*/React.createElement("div", {
|
|
148
149
|
style: {
|
|
149
150
|
display: 'inline-block',
|
|
150
151
|
marginLeft: textOffset
|
|
151
152
|
}
|
|
152
|
-
}, internals.safeRenderHeader(firstCol)),
|
|
153
|
+
}, internals.safeRenderHeader(firstCol))),
|
|
153
154
|
render: render,
|
|
154
155
|
getCellProps: getCellProps,
|
|
155
156
|
getSpanRect: function getSpanRect(value, row, rowIndex) {
|
|
@@ -162,7 +163,7 @@ export function rowGrouping() {
|
|
|
162
163
|
};
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
|
-
})]).call(
|
|
166
|
+
})]).call(_context4, _toConsumableArray(others));
|
|
166
167
|
}
|
|
167
168
|
};
|
|
168
169
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArtColumn, selectRenderProps } from '../../interfaces';
|
|
2
3
|
import { TablePipeline } from '../pipeline';
|
|
3
4
|
export interface SingleSelectFeatureOptions {
|
|
4
5
|
/** 是否高亮被选中的行 */
|
|
@@ -19,5 +20,6 @@ export interface SingleSelectFeatureOptions {
|
|
|
19
20
|
radioPlacement?: 'start' | 'end';
|
|
20
21
|
/** 是否对触发 onChange 的 click 事件调用 event.stopPropagation() */
|
|
21
22
|
stopClickEventPropagation?: boolean;
|
|
23
|
+
customRender?: (ctx: selectRenderProps) => React.ReactNode;
|
|
22
24
|
}
|
|
23
25
|
export declare function singleSelect(opts?: SingleSelectFeatureOptions): (pipeline: TablePipeline) => TablePipeline;
|
|
@@ -54,18 +54,42 @@ export function singleSelect() {
|
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
var rowKey = internals.safeGetRowKey(primaryKey, row, rowIndex);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
var checked = value === rowKey;
|
|
58
|
+
var disabled = isDisabled(row, rowIndex);
|
|
59
|
+
var defaultOnChange = clickArea === 'radio' ? function (arg1, arg2) {
|
|
60
|
+
var _a;
|
|
61
|
+
var nativeEvent = (_a = arg2 === null || arg2 === void 0 ? void 0 : arg2.nativeEvent) !== null && _a !== void 0 ? _a : arg1 === null || arg1 === void 0 ? void 0 : arg1.nativeEvent;
|
|
62
|
+
if (nativeEvent && opts.stopClickEventPropagation) {
|
|
63
|
+
nativeEvent.stopPropagation();
|
|
64
|
+
}
|
|
65
|
+
onChange(rowKey);
|
|
66
|
+
} : undefined;
|
|
67
|
+
var defaultElement = /*#__PURE__*/React.createElement(Radio, {
|
|
68
|
+
checked: checked,
|
|
69
|
+
disabled: disabled,
|
|
70
|
+
onChange: defaultOnChange
|
|
68
71
|
});
|
|
72
|
+
var ctx = {
|
|
73
|
+
type: 'single',
|
|
74
|
+
row: row,
|
|
75
|
+
rowIndex: rowIndex,
|
|
76
|
+
rowKey: rowKey,
|
|
77
|
+
checked: checked,
|
|
78
|
+
disabled: disabled,
|
|
79
|
+
defaultElement: defaultElement,
|
|
80
|
+
actions: {
|
|
81
|
+
select: function select() {
|
|
82
|
+
return onChange(rowKey);
|
|
83
|
+
},
|
|
84
|
+
toggle: function toggle() {
|
|
85
|
+
return onChange(rowKey);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
if (opts.customRender) {
|
|
90
|
+
return opts.customRender(ctx);
|
|
91
|
+
}
|
|
92
|
+
return defaultElement;
|
|
69
93
|
},
|
|
70
94
|
features: _extends(_extends({}, (_e = opts.radioColumn) === null || _e === void 0 ? void 0 : _e.features), _defineProperty({}, SINGLE_SELECT_MARK_PROPNAME, true))
|
|
71
95
|
});
|
|
@@ -5,9 +5,9 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
5
5
|
import _taggedTemplateLiteral from "@babel/runtime-corejs3/helpers/taggedTemplateLiteral";
|
|
6
6
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
7
7
|
var _templateObject;
|
|
8
|
-
function _createForOfIteratorHelper(
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
8
|
+
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; } } }; }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context4; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context4 = {}.toString.call(r)).call(_context4, 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; } }
|
|
10
|
+
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; }
|
|
11
11
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
12
12
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
13
13
|
import _Map from "@babel/runtime-corejs3/core-js-stable/map";
|
|
@@ -47,7 +47,6 @@ function SortIcon(_ref) {
|
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
49
|
function DefaultSortHeaderCell(_ref2) {
|
|
50
|
-
var _cx;
|
|
51
50
|
var children = _ref2.children,
|
|
52
51
|
column = _ref2.column,
|
|
53
52
|
onToggle = _ref2.onToggle,
|
|
@@ -67,10 +66,10 @@ function DefaultSortHeaderCell(_ref2) {
|
|
|
67
66
|
marginLeft: 2,
|
|
68
67
|
flexShrink: 0
|
|
69
68
|
},
|
|
70
|
-
className: cx((
|
|
69
|
+
className: cx(_defineProperty(_defineProperty({}, Classes.tableSortIcon, true), "active", sortOrder === 'desc' || sortOrder === 'asc')),
|
|
71
70
|
size: 16,
|
|
72
71
|
order: sortOrder
|
|
73
|
-
}), sortOptions.mode === 'multiple' && sortIndex !== -1 && /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
}), sortOptions.mode === 'multiple' && sortIndex !== -1 && (/*#__PURE__*/React.createElement("div", {
|
|
74
73
|
style: {
|
|
75
74
|
userSelect: 'none',
|
|
76
75
|
marginLeft: 2,
|
|
@@ -79,7 +78,7 @@ function DefaultSortHeaderCell(_ref2) {
|
|
|
79
78
|
fontSize: 10,
|
|
80
79
|
fontFamily: 'monospace'
|
|
81
80
|
}
|
|
82
|
-
}, sortIndex + 1));
|
|
81
|
+
}, sortIndex + 1)));
|
|
83
82
|
}
|
|
84
83
|
function hasAnySortableColumns(cols) {
|
|
85
84
|
return cols.some(function (col) {
|
|
@@ -24,12 +24,12 @@ export function tips() {
|
|
|
24
24
|
}
|
|
25
25
|
var justifyContent = col.align === 'right' ? 'flex-end' : col.align === 'center' ? 'center' : 'flex-start';
|
|
26
26
|
return _extends(_extends({}, col), {
|
|
27
|
-
title: /*#__PURE__*/React.createElement(HeaderCellWithTips, {
|
|
27
|
+
title: (/*#__PURE__*/React.createElement(HeaderCellWithTips, {
|
|
28
28
|
style: {
|
|
29
29
|
justifyContent: justifyContent
|
|
30
30
|
},
|
|
31
31
|
direction: pipeline.ctx.direction
|
|
32
|
-
}, internals.safeRenderHeader(col), Balloon ?
|
|
32
|
+
}, internals.safeRenderHeader(col), Balloon ? (
|
|
33
33
|
/*#__PURE__*/
|
|
34
34
|
// fusion/hippo
|
|
35
35
|
React.createElement(Balloon, {
|
|
@@ -39,7 +39,7 @@ export function tips() {
|
|
|
39
39
|
}, /*#__PURE__*/React.createElement(icons.Info, {
|
|
40
40
|
className: "tip-icon"
|
|
41
41
|
}))
|
|
42
|
-
}, col.features.tips) :
|
|
42
|
+
}, col.features.tips)) : (
|
|
43
43
|
/*#__PURE__*/
|
|
44
44
|
// antd
|
|
45
45
|
React.createElement(Tooltip, {
|
|
@@ -48,7 +48,7 @@ export function tips() {
|
|
|
48
48
|
className: "tip-icon-wrapper"
|
|
49
49
|
}, /*#__PURE__*/React.createElement(icons.Info, {
|
|
50
50
|
className: "tip-icon"
|
|
51
|
-
}))))
|
|
51
|
+
}))))))
|
|
52
52
|
});
|
|
53
53
|
}));
|
|
54
54
|
};
|
|
@@ -4,9 +4,9 @@ import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-meth
|
|
|
4
4
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
5
5
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
6
6
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
7
|
-
function _createForOfIteratorHelper(
|
|
8
|
-
function _unsupportedIterableToArray(
|
|
9
|
-
function _arrayLikeToArray(
|
|
7
|
+
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; } } }; }
|
|
8
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context3; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context3 = {}.toString.call(r)).call(_context3, 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; } }
|
|
9
|
+
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; }
|
|
10
10
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
11
11
|
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
12
12
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
@@ -219,12 +219,12 @@ export function treeMode() {
|
|
|
219
219
|
});
|
|
220
220
|
};
|
|
221
221
|
columns[expandColIndex] = _extends(_extends({}, expandCol), {
|
|
222
|
-
title: /*#__PURE__*/React.createElement("span", {
|
|
222
|
+
title: (/*#__PURE__*/React.createElement("span", {
|
|
223
223
|
style: {
|
|
224
224
|
marginLeft: iconIndent + iconWidth + iconGap,
|
|
225
225
|
display: 'flex'
|
|
226
226
|
}
|
|
227
|
-
}, internals.safeRenderHeader(expandCol)),
|
|
227
|
+
}, internals.safeRenderHeader(expandCol))),
|
|
228
228
|
render: render,
|
|
229
229
|
getCellProps: getCellProps
|
|
230
230
|
});
|