@kdcloudjs/table 1.2.0-canary.16 → 1.2.0-canary.17-hotfix

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/LICENSE +568 -568
  2. package/README.md +111 -111
  3. package/dist/@kdcloudjs/table.css +1 -1
  4. package/dist/@kdcloudjs/table.js +4596 -5714
  5. package/dist/@kdcloudjs/table.js.map +1 -1
  6. package/dist/@kdcloudjs/table.min.css +1 -1
  7. package/dist/@kdcloudjs/table.min.js +18 -16
  8. package/dist/@kdcloudjs/table.min.js.map +1 -1
  9. package/dist/kd-ui-complete.less +777 -777
  10. package/es/_utils/arrayUtil.js +0 -3
  11. package/es/_utils/devwarning.js +0 -1
  12. package/es/_utils/formatUtil.js +36 -101
  13. package/es/_utils/hooks.js +21 -45
  14. package/es/_utils/index.js +0 -2
  15. package/es/_utils/numberUtil.js +32 -55
  16. package/es/_utils/omit.js +0 -2
  17. package/es/_utils/type.js +0 -2
  18. package/es/_utils/usePopper.js +74 -137
  19. package/es/config-provider/compDefaultProps.js +0 -1
  20. package/es/config-provider/configProvider.js +2 -7
  21. package/es/config-provider/defaultConfig.js +0 -1
  22. package/es/index.js +0 -2
  23. package/es/locale/locale.js +9 -48
  24. package/es/style/color/colors.less +1 -1
  25. package/es/style/core/index.less +1 -1
  26. package/es/style/core/motion/other.less +27 -27
  27. package/es/style/core/motion/slide.less +53 -53
  28. package/es/style/core/motion.less +1 -1
  29. package/es/style/core/reset.less +185 -185
  30. package/es/style/index.less +1 -1
  31. package/es/style/mixins/index.less +18 -18
  32. package/es/style/mixins/overlay.less +21 -21
  33. package/es/style/mixins/reset.less +12 -12
  34. package/es/style/themes/default.less +445 -445
  35. package/es/table/base/calculations.js +25 -75
  36. package/es/table/base/colgroup.js +0 -1
  37. package/es/table/base/empty.js +6 -6
  38. package/es/table/base/header.js +19 -74
  39. package/es/table/base/helpers/SpanManager.js +4 -11
  40. package/es/table/base/helpers/TableDOMUtils.js +7 -30
  41. package/es/table/base/helpers/__test__/SpanManager.test.js +2 -2
  42. package/es/table/base/helpers/__test__/TableDOMUtils.test.js +0 -1
  43. package/es/table/base/helpers/getRichVisibleRectsStream.js +11 -44
  44. package/es/table/base/helpers/rowHeightManager.js +0 -28
  45. package/es/table/base/html-table.js +17 -39
  46. package/es/table/base/loading.js +8 -10
  47. package/es/table/base/renderTemplates.js +41 -59
  48. package/es/table/base/styles.js +0 -9
  49. package/es/table/base/table.js +110 -199
  50. package/es/table/base/utils.js +17 -57
  51. package/es/table/common-views.js +0 -7
  52. package/es/table/internals.js +0 -13
  53. package/es/table/pipeline/features/autoFill.js +11 -40
  54. package/es/table/pipeline/features/autoRowSpan.js +1 -14
  55. package/es/table/pipeline/features/colGroupExtendable.js +4 -19
  56. package/es/table/pipeline/features/columnDrag.js +41 -97
  57. package/es/table/pipeline/features/columnFilter.js +12 -51
  58. package/es/table/pipeline/features/columnHover.js +1 -7
  59. package/es/table/pipeline/features/columnRangeHover.js +1 -8
  60. package/es/table/pipeline/features/columnResizeWidth.js +13 -39
  61. package/es/table/pipeline/features/contextMenu.js +18 -91
  62. package/es/table/pipeline/features/filter/DefaultFilterContent.js +14 -30
  63. package/es/table/pipeline/features/filter/DefaultFilterIcon.js +1 -1
  64. package/es/table/pipeline/features/filter/Filter.js +26 -50
  65. package/es/table/pipeline/features/filter/FilterPanel.js +11 -25
  66. package/es/table/pipeline/features/filter/util.js +0 -4
  67. package/es/table/pipeline/features/footerDataSource.js +0 -3
  68. package/es/table/pipeline/features/mergeCellHover.js +0 -1
  69. package/es/table/pipeline/features/multiSelect.js +15 -57
  70. package/es/table/pipeline/features/rangeSelection.js +74 -154
  71. package/es/table/pipeline/features/rowDetail.js +4 -43
  72. package/es/table/pipeline/features/rowDrag.js +64 -80
  73. package/es/table/pipeline/features/rowGrouping.js +4 -37
  74. package/es/table/pipeline/features/singleSelect.js +0 -24
  75. package/es/table/pipeline/features/sort.js +37 -90
  76. package/es/table/pipeline/features/tips.js +4 -10
  77. package/es/table/pipeline/features/treeMode.js +14 -49
  78. package/es/table/pipeline/features/treeSelect.js +2 -28
  79. package/es/table/pipeline/pipeline.js +12 -53
  80. package/es/table/pivot/cross-table/buildCrossTable.js +21 -72
  81. package/es/table/pivot/cross-table/cross-table.js +23 -31
  82. package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +22 -57
  83. package/es/table/pivot/cross-tree-table/cross-tree-table.js +35 -61
  84. package/es/table/pivot/pivot-utils/buildDrillTree.js +10 -23
  85. package/es/table/pivot/pivot-utils/builders.js +34 -74
  86. package/es/table/pivot/pivot-utils/convert-utils.js +16 -42
  87. package/es/table/pivot/pivot-utils/simpleEncode.js +0 -1
  88. package/es/table/style/index.less +1 -1
  89. package/es/table/transforms/autoRowSpan.js +1 -15
  90. package/es/table/transforms/autoWidth.js +13 -35
  91. package/es/table/transforms/buildTree.js +1 -2
  92. package/es/table/transforms/columnHover.js +9 -15
  93. package/es/table/transforms/columnRangeHover.js +12 -19
  94. package/es/table/transforms/columnResize.js +18 -42
  95. package/es/table/transforms/flatten.js +0 -3
  96. package/es/table/transforms/orderField.js +0 -3
  97. package/es/table/transforms/sort.js +42 -96
  98. package/es/table/transforms/tips.js +5 -10
  99. package/es/table/transforms/treeMode.js +36 -77
  100. package/es/table/transforms/visible.js +0 -2
  101. package/es/table/use/useResizeObserver.js +1 -4
  102. package/es/table/utils/applyTransforms.js +0 -1
  103. package/es/table/utils/buildTree.js +7 -22
  104. package/es/table/utils/collectNodes.js +4 -13
  105. package/es/table/utils/console.js +0 -14
  106. package/es/table/utils/copyToClipboard.js +0 -4
  107. package/es/table/utils/element.js +14 -41
  108. package/es/table/utils/exportTableAsExcel.js +7 -43
  109. package/es/table/utils/getTreeDepth.js +4 -12
  110. package/es/table/utils/groupBy.js +4 -13
  111. package/es/table/utils/layeredFilter.js +0 -4
  112. package/es/table/utils/layeredSort.js +0 -5
  113. package/es/table/utils/makeRecursiveMapper.js +4 -15
  114. package/es/table/utils/mergeCellProps.js +6 -14
  115. package/es/table/utils/others.js +6 -19
  116. package/es/table/utils/proto.js +2 -30
  117. package/es/table/utils/smartCompare.js +4 -12
  118. package/es/table/utils/traverseColumn.js +5 -18
  119. package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +5 -27
  120. package/es/table/utils/tree-data-helpers/TreeDataHelper.js +19 -74
  121. package/lib/_utils/arrayUtil.js +2 -8
  122. package/lib/_utils/devwarning.js +0 -5
  123. package/lib/_utils/formatUtil.js +36 -105
  124. package/lib/_utils/hooks.js +21 -56
  125. package/lib/_utils/index.js +2 -9
  126. package/lib/_utils/numberUtil.js +32 -63
  127. package/lib/_utils/omit.js +0 -5
  128. package/lib/_utils/react-children.js +0 -5
  129. package/lib/_utils/type.js +3 -11
  130. package/lib/_utils/usePopper.js +79 -166
  131. package/lib/config-provider/ConfigContext.js +2 -6
  132. package/lib/config-provider/compDefaultProps.js +1 -3
  133. package/lib/config-provider/configProvider.js +6 -22
  134. package/lib/config-provider/defaultConfig.js +1 -7
  135. package/lib/config-provider/index.js +1 -8
  136. package/lib/index.js +2 -8
  137. package/lib/locale/index.js +3 -11
  138. package/lib/locale/locale.js +13 -69
  139. package/lib/locale/zh-CN.js +1 -2
  140. package/lib/style/color/colors.less +1 -1
  141. package/lib/style/components.less +1 -1
  142. package/lib/style/core/index.less +1 -1
  143. package/lib/style/core/motion/other.less +27 -27
  144. package/lib/style/core/motion/slide.less +53 -53
  145. package/lib/style/core/motion.less +1 -1
  146. package/lib/style/core/reset.less +185 -185
  147. package/lib/style/index.less +1 -1
  148. package/lib/style/mixins/index.less +18 -18
  149. package/lib/style/mixins/overlay.less +21 -21
  150. package/lib/style/mixins/reset.less +12 -12
  151. package/lib/style/themes/default.less +445 -445
  152. package/lib/table/base/calculations.js +25 -86
  153. package/lib/table/base/colgroup.js +0 -5
  154. package/lib/table/base/empty.js +8 -20
  155. package/lib/table/base/header.js +19 -84
  156. package/lib/table/base/helpers/SpanManager.js +6 -16
  157. package/lib/table/base/helpers/TableDOMUtils.js +7 -33
  158. package/lib/table/base/helpers/__test__/SpanManager.test.js +2 -4
  159. package/lib/table/base/helpers/__test__/TableDOMUtils.test.js +0 -5
  160. package/lib/table/base/helpers/__test__/rowHeightManager.test.js +0 -1
  161. package/lib/table/base/helpers/getRichVisibleRectsStream.js +13 -64
  162. package/lib/table/base/helpers/rowHeightManager.js +0 -33
  163. package/lib/table/base/html-table.js +17 -49
  164. package/lib/table/base/index.js +0 -2
  165. package/lib/table/base/loading.js +8 -14
  166. package/lib/table/base/renderTemplates.js +44 -75
  167. package/lib/table/base/styles.js +9 -37
  168. package/lib/table/base/table.js +122 -243
  169. package/lib/table/base/utils.js +27 -109
  170. package/lib/table/common-views.js +4 -24
  171. package/lib/table/index.js +0 -13
  172. package/lib/table/internals.js +2 -17
  173. package/lib/table/pipeline/features/autoFill.js +14 -53
  174. package/lib/table/pipeline/features/autoRowSpan.js +1 -19
  175. package/lib/table/pipeline/features/buildTree.js +0 -2
  176. package/lib/table/pipeline/features/colGroupExtendable.js +6 -35
  177. package/lib/table/pipeline/features/columnDrag.js +41 -103
  178. package/lib/table/pipeline/features/columnFilter.js +12 -65
  179. package/lib/table/pipeline/features/columnHover.js +1 -11
  180. package/lib/table/pipeline/features/columnRangeHover.js +1 -13
  181. package/lib/table/pipeline/features/columnResizeWidth.js +18 -63
  182. package/lib/table/pipeline/features/contextMenu.js +20 -117
  183. package/lib/table/pipeline/features/filter/DefaultFilterContent.js +17 -52
  184. package/lib/table/pipeline/features/filter/DefaultFilterIcon.js +1 -4
  185. package/lib/table/pipeline/features/filter/Filter.js +29 -76
  186. package/lib/table/pipeline/features/filter/FilterPanel.js +14 -44
  187. package/lib/table/pipeline/features/filter/index.js +0 -5
  188. package/lib/table/pipeline/features/filter/util.js +2 -10
  189. package/lib/table/pipeline/features/footerDataSource.js +1 -12
  190. package/lib/table/pipeline/features/index.js +0 -23
  191. package/lib/table/pipeline/features/mergeCellHover.js +0 -5
  192. package/lib/table/pipeline/features/multiSelect.js +15 -71
  193. package/lib/table/pipeline/features/rangeSelection.js +76 -175
  194. package/lib/table/pipeline/features/rowDetail.js +4 -67
  195. package/lib/table/pipeline/features/rowDrag.js +66 -94
  196. package/lib/table/pipeline/features/rowGrouping.js +4 -57
  197. package/lib/table/pipeline/features/singleSelect.js +0 -34
  198. package/lib/table/pipeline/features/sort.js +37 -110
  199. package/lib/table/pipeline/features/tips.js +4 -19
  200. package/lib/table/pipeline/features/treeMode.js +15 -72
  201. package/lib/table/pipeline/features/treeSelect.js +2 -36
  202. package/lib/table/pipeline/index.js +2 -10
  203. package/lib/table/pipeline/pipeline.js +13 -64
  204. package/lib/table/pivot/cross-table/buildCrossTable.js +21 -83
  205. package/lib/table/pivot/cross-table/constants.js +1 -2
  206. package/lib/table/pivot/cross-table/cross-table.js +25 -42
  207. package/lib/table/pivot/cross-table/index.js +0 -4
  208. package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +22 -70
  209. package/lib/table/pivot/cross-tree-table/cross-tree-table.js +36 -73
  210. package/lib/table/pivot/cross-tree-table/index.js +0 -3
  211. package/lib/table/pivot/pivot-utils/buildDrillTree.js +10 -29
  212. package/lib/table/pivot/pivot-utils/builders.js +34 -85
  213. package/lib/table/pivot/pivot-utils/convert-utils.js +16 -60
  214. package/lib/table/pivot/pivot-utils/index.js +0 -7
  215. package/lib/table/pivot/pivot-utils/simpleEncode.js +0 -2
  216. package/lib/table/style/css.js +0 -1
  217. package/lib/table/style/index.js +0 -1
  218. package/lib/table/style/index.less +1 -1
  219. package/lib/table/transforms/autoRowSpan.js +1 -21
  220. package/lib/table/transforms/autoWidth.js +15 -58
  221. package/lib/table/transforms/buildTree.js +1 -4
  222. package/lib/table/transforms/columnHover.js +9 -22
  223. package/lib/table/transforms/columnRangeHover.js +12 -27
  224. package/lib/table/transforms/columnResize.js +20 -63
  225. package/lib/table/transforms/flatten.js +0 -5
  226. package/lib/table/transforms/index.js +0 -12
  227. package/lib/table/transforms/orderField.js +0 -7
  228. package/lib/table/transforms/sort.js +44 -122
  229. package/lib/table/transforms/tips.js +5 -20
  230. package/lib/table/transforms/treeMode.js +38 -106
  231. package/lib/table/transforms/visible.js +0 -7
  232. package/lib/table/transforms/warnTransformsDeprecated.js +0 -4
  233. package/lib/table/use/useResizeObserver.js +2 -10
  234. package/lib/table/utils/applyTransforms.js +0 -2
  235. package/lib/table/utils/browserType.js +2 -3
  236. package/lib/table/utils/buildTree.js +7 -33
  237. package/lib/table/utils/collectNodes.js +4 -18
  238. package/lib/table/utils/console.js +2 -19
  239. package/lib/table/utils/copyToClipboard.js +1 -8
  240. package/lib/table/utils/element.js +14 -46
  241. package/lib/table/utils/exportTableAsExcel.js +7 -52
  242. package/lib/table/utils/getTreeDepth.js +4 -17
  243. package/lib/table/utils/groupBy.js +4 -17
  244. package/lib/table/utils/index.js +0 -21
  245. package/lib/table/utils/isGroupColumn.js +0 -3
  246. package/lib/table/utils/isLeafNode.js +0 -1
  247. package/lib/table/utils/keyCode.js +1 -2
  248. package/lib/table/utils/layeredFilter.js +0 -10
  249. package/lib/table/utils/layeredSort.js +0 -10
  250. package/lib/table/utils/makeRecursiveMapper.js +4 -24
  251. package/lib/table/utils/mergeCellProps.js +6 -18
  252. package/lib/table/utils/others.js +7 -36
  253. package/lib/table/utils/proto.js +3 -35
  254. package/lib/table/utils/selectColumn.js +2 -5
  255. package/lib/table/utils/smartCompare.js +4 -13
  256. package/lib/table/utils/traverseColumn.js +5 -25
  257. package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +7 -38
  258. package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +21 -90
  259. package/package.json +219 -218
@@ -4,13 +4,9 @@ import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
4
4
  import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
5
5
  import _typeof from "@babel/runtime-corejs3/helpers/typeof";
6
6
  import _extends from "@babel/runtime-corejs3/helpers/extends";
7
-
8
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
9
-
10
- function _unsupportedIterableToArray(o, minLen) { var _context; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
-
12
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
13
-
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 _context; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context = {}.toString.call(r)).call(_context, 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; }
14
10
  import _Set from "@babel/runtime-corejs3/core-js-stable/set";
15
11
  import _Object$is from "@babel/runtime-corejs3/core-js-stable/object/is";
16
12
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
@@ -24,7 +20,6 @@ import { browserType } from '../utils';
24
20
  import { defaultCSSVariables } from './styles';
25
21
  import { hasScroll } from '../utils/element';
26
22
  /** styled-components 类库的版本,ali-react-table 同时支持 v3 和 v5 */
27
-
28
23
  export var STYLED_VERSION = styledComponents.createGlobalStyle != null ? 'v5' : 'v3';
29
24
  export var STYLED_REF_PROP = STYLED_VERSION === 'v3' ? 'innerRef' : 'ref';
30
25
  export var OVERSCAN_SIZE = 100;
@@ -35,8 +30,8 @@ export function sum(arr) {
35
30
  result += x;
36
31
  });
37
32
  return result;
38
- } // 使用 defer 避免过早引用 window,导致在 SSR 场景下报错
39
-
33
+ }
34
+ // 使用 defer 避免过早引用 window,导致在 SSR 场景下报错
40
35
  export var throttledWindowResize$ = defer(function () {
41
36
  return fromEvent(window, 'resize', {
42
37
  passive: true
@@ -50,23 +45,18 @@ export var addResizeObserver = function addResizeObserver(element, handler) {
50
45
  if (!entries[0] || !entries[0].contentRect) {
51
46
  return;
52
47
  }
53
-
54
48
  var contentRect = entries[0].contentRect;
55
49
  var hide = contentRect.width === 0 && contentRect.height === 0; // 隐藏条件:高宽都为0
56
-
57
50
  var rect = _extends({
58
51
  hide: hide
59
52
  }, contentRect);
60
-
61
53
  handler && handler(rect);
62
54
  };
63
-
64
55
  var resizeObserver = new ResizeObserver(measure);
65
56
  resizeObserver && resizeObserver.observe(element);
66
57
  return resizeObserver;
67
58
  };
68
59
  /** 获取默认的滚动条大小 */
69
-
70
60
  function getScrollbarSizeImpl() {
71
61
  var scrollDiv = document.createElement('div');
72
62
  scrollDiv.style.position = 'absolute';
@@ -83,7 +73,6 @@ function getScrollbarSizeImpl() {
83
73
  height: scrollbarHeight
84
74
  };
85
75
  }
86
-
87
76
  var scrollBarSize$;
88
77
  export function getScrollbarSize() {
89
78
  if (scrollBarSize$ == null) {
@@ -92,28 +81,21 @@ export function getScrollbarSize() {
92
81
  return getScrollbarSizeImpl();
93
82
  })).subscribe(scrollBarSize$);
94
83
  }
95
-
96
84
  return scrollBarSize$.value;
97
85
  }
98
86
  /** 同步多个元素之间的 scrollLeft, 每当 scrollLeft 发生变化时 callback 会被调用 */
99
-
100
87
  export function syncScrollLeft(elements, callback) {
101
88
  var bypassSet = new _Set();
102
-
103
89
  function publishScrollLeft(origin, scrollLeft) {
104
90
  bypassSet.clear();
105
-
106
91
  var _iterator = _createForOfIteratorHelper(elements),
107
- _step;
108
-
92
+ _step;
109
93
  try {
110
94
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
111
95
  var elem = _step.value;
112
-
113
96
  if (elem === origin) {
114
97
  continue;
115
98
  }
116
-
117
99
  elem.scrollLeft = scrollLeft;
118
100
  bypassSet.add(elem);
119
101
  }
@@ -123,32 +105,25 @@ export function syncScrollLeft(elements, callback) {
123
105
  _iterator.f();
124
106
  }
125
107
  }
126
-
127
108
  var subscription = new Subscription();
128
-
129
109
  var _iterator2 = _createForOfIteratorHelper(elements),
130
- _step2;
131
-
110
+ _step2;
132
111
  try {
133
112
  var _loop = function _loop() {
134
113
  var ele = _step2.value;
135
-
136
114
  var listener = function listener() {
137
115
  if (bypassSet.has(ele)) {
138
116
  bypassSet.delete(ele);
139
117
  return;
140
118
  }
141
-
142
- var scrollLeft = ele.scrollLeft; // 某一元素当滚动条消失时会触发scroll事件(scrolLeft重置为0),不同步其他其他元素的scrollLeft
143
-
119
+ var scrollLeft = ele.scrollLeft;
120
+ // 某一元素当滚动条消失时会触发scroll事件(scrolLeft重置为0),不同步其他其他元素的scrollLeft
144
121
  if (scrollLeft === 0 && !hasScroll(ele)) {
145
122
  return;
146
123
  }
147
-
148
124
  publishScrollLeft(ele, scrollLeft);
149
125
  callback(scrollLeft);
150
126
  };
151
-
152
127
  ele.addEventListener('scroll', listener, {
153
128
  passive: true
154
129
  });
@@ -156,7 +131,6 @@ export function syncScrollLeft(elements, callback) {
156
131
  return ele.removeEventListener('scroll', listener);
157
132
  });
158
133
  };
159
-
160
134
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
161
135
  _loop();
162
136
  }
@@ -165,7 +139,6 @@ export function syncScrollLeft(elements, callback) {
165
139
  } finally {
166
140
  _iterator2.f();
167
141
  }
168
-
169
142
  return subscription;
170
143
  }
171
144
  /**
@@ -173,45 +146,35 @@ export function syncScrollLeft(elements, callback) {
173
146
  * when any key has values which are not strictly equal between the arguments.
174
147
  * Returns true when the values of all keys are strictly equal.
175
148
  */
176
-
177
149
  export function shallowEqual(objA, objB) {
178
150
  var hasOwnProperty = Object.prototype.hasOwnProperty;
179
-
180
151
  if (_Object$is(objA, objB)) {
181
152
  return true;
182
153
  }
183
-
184
154
  if (_typeof(objA) !== 'object' || objA === null || _typeof(objB) !== 'object' || objB === null) {
185
155
  return false;
186
156
  }
187
-
188
157
  var keysA = _Object$keys(objA);
189
-
190
158
  var keysB = _Object$keys(objB);
191
-
192
159
  if (keysA.length !== keysB.length) {
193
160
  return false;
194
- } // Test for A's keys different from B.
195
-
196
-
161
+ }
162
+ // Test for A's keys different from B.
197
163
  for (var i = 0; i < keysA.length; i++) {
198
164
  if (!hasOwnProperty.call(objB, keysA[i]) || !_Object$is(objA[keysA[i]], objB[keysA[i]])) {
199
165
  return false;
200
166
  }
201
167
  }
202
-
203
168
  return true;
204
- } // todo: 抽出mergeRowProps
205
-
169
+ }
170
+ // todo: 抽出mergeRowProps
206
171
  export function composeRowPropsGetter(getRowProps, pendingRowProps) {
207
172
  var keys = _Object$keys(pendingRowProps);
208
-
209
173
  if (keys.length) {
210
174
  return function (row, rowIndex) {
211
175
  return mergeCellProps(getRowProps(row, rowIndex), pendingRowProps);
212
176
  };
213
177
  }
214
-
215
178
  return getRowProps;
216
179
  }
217
180
  export function getTableScrollHeaderDOM(domHelper) {
@@ -222,20 +185,17 @@ export function getTableScrollFooterDOM(domHelper) {
222
185
  }
223
186
  export var cssPolifill = function cssPolifill(_ref) {
224
187
  var variables = _ref.variables,
225
- enableCSSVariables = _ref.enableCSSVariables,
226
- bordered = _ref.bordered;
227
-
188
+ enableCSSVariables = _ref.enableCSSVariables,
189
+ bordered = _ref.bordered;
228
190
  if (enableCSSVariables === false) {
229
191
  return;
230
192
  }
231
-
232
- var conditionCSSVariables = {}; // 默认情况下存在td、th无左右边框,开启`bordered`属性后才开启,否则隐藏这两种属性
233
-
193
+ var conditionCSSVariables = {};
194
+ // 默认情况下存在td、th无左右边框,开启`bordered`属性后才开启,否则隐藏这两种属性
234
195
  if (!bordered) {
235
196
  conditionCSSVariables['--cell-border-vertical'] = 'none';
236
197
  conditionCSSVariables['--header-cell-border-vertical'] = 'none';
237
198
  }
238
-
239
199
  cssVars({
240
200
  // exclude: 'link[href*="semantic-ui"]',
241
201
  // onlyLegacy: false,
@@ -1,8 +1,6 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _taggedTemplateLiteral from "@babel/runtime-corejs3/helpers/taggedTemplateLiteral";
3
-
4
3
  var _templateObject, _templateObject2, _templateObject3;
5
-
6
4
  import React from 'react';
7
5
  import styled from 'styled-components';
8
6
  import { MenuClasses, Classes } from './base/styles';
@@ -10,7 +8,6 @@ export var InlineFlexCell = styled.div(_templateObject || (_templateObject = _ta
10
8
  export var ExpansionCell = styled(function (props) {
11
9
  return /*#__PURE__*/React.createElement(InlineFlexCell, _extends({}, props));
12
10
  })(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n cursor: default;\n }\n\n .expansion-icon {\n fill: #999;\n flex: 0 0 16px;\n transition: transform 200ms;\n\n &.", " {\n transform-origin: center center;\n transform: rotate(90deg);\n }\n }\n"])), Classes.leaf, Classes.expanded);
13
-
14
11
  function CaretDownIcon(props) {
15
12
  return /*#__PURE__*/React.createElement("svg", _extends({
16
13
  focusable: "false",
@@ -23,7 +20,6 @@ function CaretDownIcon(props) {
23
20
  d: "M24 12L16 22 8 12z"
24
21
  }));
25
22
  }
26
-
27
23
  function InfoIcon(props) {
28
24
  return /*#__PURE__*/React.createElement("svg", _extends({
29
25
  focusable: "false",
@@ -38,7 +34,6 @@ function InfoIcon(props) {
38
34
  d: "M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"
39
35
  }));
40
36
  }
41
-
42
37
  function CaretRightIcon(props) {
43
38
  return /*#__PURE__*/React.createElement("svg", _extends({
44
39
  focusable: "false",
@@ -51,7 +46,6 @@ function CaretRightIcon(props) {
51
46
  d: "M12 8L22 16 12 24z"
52
47
  }));
53
48
  }
54
-
55
49
  function LoadingIcon(props) {
56
50
  return /*#__PURE__*/React.createElement("svg", _extends({
57
51
  width: "16",
@@ -62,7 +56,6 @@ function LoadingIcon(props) {
62
56
  d: "M512 74.667c-17.067 0-32 14.933-32 32V256c0 17.067 14.933 32 32 32s32-14.933 32-32V106.667c0-17.067-14.933-32-32-32zm181.333 288c8.534 0 17.067-2.134 23.467-8.534L821.333 249.6c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0L672 309.333c-12.8 12.8-12.8 32 0 44.8 4.267 6.4 12.8 8.534 21.333 8.534zm224 117.333H768c-17.067 0-32 14.933-32 32s14.933 32 32 32h149.333c17.067 0 32-14.933 32-32s-14.933-32-32-32zM714.667 669.867c-12.8-12.8-32-12.8-44.8 0s-12.8 32 0 44.8L774.4 819.2c6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533c12.8-12.8 12.8-32 0-44.8L714.667 669.867zM512 736c-17.067 0-32 14.933-32 32v149.333c0 17.067 14.933 32 32 32s32-14.933 32-32V768c0-17.067-14.933-32-32-32zm-202.667-66.133L204.8 774.4c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533l104.534-104.533c12.8-12.8 12.8-32 0-44.8s-36.267-12.8-46.934 0zM288 512c0-17.067-14.933-32-32-32H106.667c-17.067 0-32 14.933-32 32s14.933 32 32 32H256c17.067 0 32-14.933 32-32zm-40.533-309.333c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8L307.2 352c6.4 6.4 14.933 8.533 23.467 8.533s17.066-2.133 23.466-8.533c12.8-12.8 12.8-32 0-44.8L247.467 202.667z"
63
57
  }));
64
58
  }
65
-
66
59
  export var icons = {
67
60
  Loading: LoadingIcon,
68
61
  CaretDown: CaretDownIcon,
@@ -1,52 +1,39 @@
1
1
  function safeRenderHeader(column) {
2
2
  var _a;
3
-
4
3
  return (_a = column.title) !== null && _a !== void 0 ? _a : column.name;
5
4
  }
6
-
7
5
  function safeGetValue(column, record, rowIndex) {
8
6
  if (column.getValue) {
9
7
  return column.getValue(record, rowIndex);
10
8
  }
11
-
12
9
  return record[column.code];
13
10
  }
14
-
15
11
  function safeGetRowKey(primaryKey, record, rowIndex) {
16
12
  var key;
17
-
18
13
  if (typeof primaryKey === 'string') {
19
14
  key = record[primaryKey];
20
15
  } else if (typeof primaryKey === 'function') {
21
16
  key = primaryKey(record);
22
17
  }
23
-
24
18
  if (key == null) {
25
19
  key = String(rowIndex);
26
20
  }
27
-
28
21
  return key;
29
22
  }
30
-
31
23
  function safeGetCellProps(column, record, rowIndex) {
32
24
  if (column.getCellProps) {
33
25
  var value = safeGetValue(column, record, rowIndex);
34
26
  return column.getCellProps(value, record, rowIndex) || {};
35
27
  }
36
-
37
28
  return {};
38
29
  }
39
-
40
30
  function safeRender(column, record, rowIndex) {
41
31
  var value = safeGetValue(column, record, rowIndex);
42
-
43
32
  if (column.render) {
44
33
  return column.render(value, record, rowIndex);
45
34
  }
46
-
47
35
  return value;
48
36
  }
49
-
50
37
  export var internals = {
51
38
  safeRenderHeader: safeRenderHeader,
52
39
  safeGetValue: safeGetValue,
@@ -11,18 +11,14 @@ import { Classes } from '../../base/styles';
11
11
  import { COLUMN_SIZE_KEY, LAST_RESIZED_COLUMN_KEY, RESIZED_COLUMN_KEY } from './columnResizeWidth';
12
12
  export var FILL_COLUMN_CODE = '$_fill_column_&';
13
13
  export var tableWidthKey = 'tableWidth';
14
-
15
14
  var FLEX_COLUMN_COUNT = _Symbol('flexCount');
16
-
17
15
  export var autoFillTableWidth = function autoFillTableWidth() {
18
16
  return function (pipeline) {
19
17
  var flexColumnResult = findFlexColumns(pipeline);
20
18
  var flexCount = flexColumnResult.get(FLEX_COLUMN_COUNT);
21
-
22
19
  if (flexCount) {
23
20
  // 设置了flex宽度,flex列平分剩余宽度
24
21
  var remainingWidth = getTableRemainingWidth(pipeline) || 0;
25
-
26
22
  if (remainingWidth > 0) {
27
23
  // 保存剩余的flex总和和剩余宽度总和宽度
28
24
  var residualFlexCount = flexCount;
@@ -31,28 +27,25 @@ export var autoFillTableWidth = function autoFillTableWidth() {
31
27
  var enableColumnResizeWidthFeature = !!columnSize;
32
28
  pipeline.mapColumns(makeRecursiveMapper(function (col, recursiveFlatMapInfo) {
33
29
  var isLeaf = recursiveFlatMapInfo.isLeaf;
34
-
35
30
  if (isLeaf && isValidFlexColumn(col, pipeline)) {
36
31
  var code = col.code,
37
- _col$features = col.features,
38
- features = _col$features === void 0 ? {} : _col$features;
32
+ _col$features = col.features,
33
+ features = _col$features === void 0 ? {} : _col$features;
39
34
  var flex = features.flex,
40
- _features$minWidth = features.minWidth,
41
- minWidth = _features$minWidth === void 0 ? 0 : _features$minWidth,
42
- _features$maxWidth = features.maxWidth,
43
- maxWidth = _features$maxWidth === void 0 ? _Number$MAX_SAFE_INTEGER : _features$maxWidth;
35
+ _features$minWidth = features.minWidth,
36
+ minWidth = _features$minWidth === void 0 ? 0 : _features$minWidth,
37
+ _features$maxWidth = features.maxWidth,
38
+ maxWidth = _features$maxWidth === void 0 ? _Number$MAX_SAFE_INTEGER : _features$maxWidth;
44
39
  var usedRemainingWidth = Math.floor(remainingWidth * flex / flexCount);
45
- var preColWidth = col.width; // 如果当前已经是最后一个flex列,将剩余的宽度添加到该列,其他计算相应的列
46
-
40
+ var preColWidth = col.width;
41
+ // 如果当前已经是最后一个flex列,将剩余的宽度添加到该列,其他计算相应的列
47
42
  col.width = clamp(minWidth, preColWidth + (residualFlexCount === flex ? residualFlexWidth : usedRemainingWidth), maxWidth);
48
43
  residualFlexCount -= flex;
49
44
  residualFlexWidth -= col.width - preColWidth;
50
-
51
45
  if (enableColumnResizeWidthFeature) {
52
46
  columnSize[code] = col.width;
53
47
  }
54
48
  }
55
-
56
49
  return col;
57
50
  }));
58
51
  enableColumnResizeWidthFeature && pipeline.setFeatureOptions(COLUMN_SIZE_KEY, columnSize);
@@ -60,13 +53,10 @@ export var autoFillTableWidth = function autoFillTableWidth() {
60
53
  } else {
61
54
  // 未设置了flex宽度,创建占位列
62
55
  var columns = pipeline.getColumns();
63
-
64
56
  var fillColumns = _findInstanceProperty(columns).call(columns, function (col) {
65
57
  return col.code === FILL_COLUMN_CODE;
66
58
  });
67
-
68
59
  var width = getTableRemainingWidth(pipeline) || 0;
69
-
70
60
  if (fillColumns) {
71
61
  fillColumns.width = width;
72
62
  } else {
@@ -85,20 +75,15 @@ export var autoFillTableWidth = function autoFillTableWidth() {
85
75
  };
86
76
  }
87
77
  };
88
-
89
78
  _spliceInstanceProperty(columns).call(columns, spliceIndex || columns.length, 0, _fillColumns);
90
79
  }
91
-
92
80
  pipeline.columns(columns);
93
81
  }
94
-
95
82
  return pipeline;
96
-
97
83
  function findFlexColumns(pipeline) {
98
84
  var result = new _Map([[FLEX_COLUMN_COUNT, 0]]);
99
85
  dfs(pipeline.getColumns(), result);
100
86
  return result;
101
-
102
87
  function dfs(columns, result) {
103
88
  columns.forEach(function (col) {
104
89
  if (isLeafNode(col)) {
@@ -113,15 +98,12 @@ export var autoFillTableWidth = function autoFillTableWidth() {
113
98
  }
114
99
  };
115
100
  };
116
-
117
101
  function getColumnWidthSum(pipeline) {
118
102
  return dfs(pipeline.getColumns());
119
-
120
103
  function dfs(columns) {
121
104
  return columns.reduce(function (acc, col) {
122
105
  var width = col.width,
123
- code = col.code;
124
-
106
+ code = col.code;
125
107
  if (isLeafNode(col) && code !== FILL_COLUMN_CODE) {
126
108
  var resizeColumn = pipeline.getFeatureOptions(COLUMN_SIZE_KEY);
127
109
  return acc + (resizeColumn && resizeColumn[code] || width);
@@ -131,46 +113,35 @@ function getColumnWidthSum(pipeline) {
131
113
  }, 0);
132
114
  }
133
115
  }
134
-
135
116
  function getTableRemainingWidth(pipeline) {
136
117
  var _a, _b;
137
-
138
118
  var tableWidth = ((_b = (_a = pipeline.ref.current.domHelper) === null || _a === void 0 ? void 0 : _a.tableBody) === null || _b === void 0 ? void 0 : _b.clientWidth) || pipeline.getStateAtKey(tableWidthKey);
139
119
  if (!tableWidth) return;
140
120
  var remainingWidth = Math.floor(tableWidth - getColumnWidthSum(pipeline));
141
121
  return remainingWidth > 0 ? remainingWidth : 0;
142
122
  }
143
-
144
123
  function isAfterLastResizeCol(column, pipeline) {
145
124
  var _context, _context2;
146
-
147
125
  var lastResizedColumnCode = pipeline.getFeatureOptions(LAST_RESIZED_COLUMN_KEY);
148
126
  if (lastResizedColumnCode === undefined) return true;
149
-
150
127
  var lastResizedColumnIndex = _findIndexInstanceProperty(_context = pipeline.getColumns()).call(_context, function (col) {
151
128
  return col.code === lastResizedColumnCode;
152
129
  });
153
-
154
130
  var colIndex = _findIndexInstanceProperty(_context2 = pipeline.getColumns()).call(_context2, function (col) {
155
131
  return col.code === column.code;
156
132
  });
157
-
158
133
  return colIndex > lastResizedColumnIndex;
159
134
  }
160
-
161
135
  function isValidFlexColumn(col, pipeline) {
162
136
  var _a;
163
-
164
- var resizeColumn = pipeline.getFeatureOptions(RESIZED_COLUMN_KEY); // 拖拽列自动禁止flex
165
-
137
+ var resizeColumn = pipeline.getFeatureOptions(RESIZED_COLUMN_KEY);
138
+ // 拖拽列自动禁止flex
166
139
  if (resizeColumn === null || resizeColumn === void 0 ? void 0 : resizeColumn.has(col.code)) {
167
140
  return false;
168
141
  }
169
-
170
142
  var flex = (_a = col.features) === null || _a === void 0 ? void 0 : _a.flex;
171
143
  return typeof flex === 'number' && flex > 0 && isAfterLastResizeCol(col, pipeline);
172
144
  }
173
-
174
145
  function clamp(min, x, max) {
175
146
  return Math.max(min, Math.min(max, x));
176
147
  }
@@ -1,39 +1,31 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import { internals } from '../../internals';
3
3
  import { isLeafNode, makeRecursiveMapper } from '../../utils';
4
-
5
4
  function isIdentity(x, y) {
6
5
  return x === y;
7
6
  }
8
-
9
7
  export function autoRowSpan() {
10
8
  return function autoRowSpanStep(pipeline) {
11
9
  var dataSource = pipeline.getDataSource();
12
10
  return pipeline.mapColumns(makeRecursiveMapper(function (col, _ref) {
13
11
  var startIndex = _ref.startIndex,
14
- endIndex = _ref.endIndex;
15
-
12
+ endIndex = _ref.endIndex;
16
13
  var _a;
17
-
18
14
  if (!((_a = col.features) === null || _a === void 0 ? void 0 : _a.autoRowSpan)) {
19
15
  return col;
20
16
  }
21
-
22
17
  if (!isLeafNode(col)) {
23
18
  return col;
24
19
  }
25
-
26
20
  var isFunc = typeof col.features.autoRowSpan === 'function';
27
21
  var shouldMergeCell = isFunc ? col.features.autoRowSpan : isIdentity;
28
22
  var spanRects = [];
29
23
  var lastBottom = 0;
30
24
  var prevValue = null;
31
25
  var prevRow = null;
32
-
33
26
  for (var rowIndex = 0; rowIndex < dataSource.length; rowIndex++) {
34
27
  var row = dataSource[rowIndex];
35
28
  var value = internals.safeGetValue(col, row, rowIndex);
36
-
37
29
  if (rowIndex === 0 || !shouldMergeCell(prevValue, value, prevRow, row)) {
38
30
  var spanRect = {
39
31
  top: lastBottom,
@@ -41,18 +33,14 @@ export function autoRowSpan() {
41
33
  left: startIndex,
42
34
  right: endIndex
43
35
  };
44
-
45
36
  for (var i = lastBottom; i < rowIndex; i++) {
46
37
  spanRects.push(spanRect);
47
38
  }
48
-
49
39
  lastBottom = rowIndex;
50
40
  }
51
-
52
41
  prevValue = value;
53
42
  prevRow = row;
54
43
  }
55
-
56
44
  for (var _i = lastBottom; _i < dataSource.length; _i++) {
57
45
  spanRects.push({
58
46
  top: lastBottom,
@@ -61,7 +49,6 @@ export function autoRowSpan() {
61
49
  right: endIndex
62
50
  });
63
51
  }
64
-
65
52
  return _extends(_extends({}, col), {
66
53
  getSpanRect: function getSpanRect(value, row, rowIndex) {
67
54
  return spanRects[rowIndex];
@@ -1,9 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
3
3
  import _taggedTemplateLiteral from "@babel/runtime-corejs3/helpers/taggedTemplateLiteral";
4
-
5
4
  var _templateObject;
6
-
7
5
  import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
8
6
  import React from 'react';
9
7
  import styled from 'styled-components';
@@ -13,12 +11,11 @@ import cx from 'classnames';
13
11
  import { Classes } from '../../base/styles';
14
12
  var ExtendIconStyle = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size:12px;\n margin-left:4px;\n"])));
15
13
  var stateKey = 'colExtend';
16
-
17
14
  var ExpandIcon = function ExpandIcon(_ref) {
18
15
  var style = _ref.style,
19
- className = _ref.className,
20
- size = _ref.size,
21
- isExtend = _ref.isExtend;
16
+ className = _ref.className,
17
+ size = _ref.size,
18
+ isExtend = _ref.isExtend;
22
19
  return isExtend ? /*#__PURE__*/React.createElement("svg", {
23
20
  className: className,
24
21
  width: size,
@@ -37,29 +34,23 @@ var ExpandIcon = function ExpandIcon(_ref) {
37
34
  d: "M321.652913 178.347087C309.449029 166.143203 309.449029 146.356797 321.652913 134.152913C333.856797 121.949029 353.643203 121.949029 365.847088 134.152913L709.597087 477.902913C721.800972 490.106797 721.800972 509.893203 709.597087 522.097087L365.847088 865.847087C353.643203 878.050972 333.856797 878.050972 321.652913 865.847087C309.449029 853.643203 309.449029 833.856797 321.652913 821.652913L643.305825 500L321.652913 178.347087z"
38
35
  }));
39
36
  };
40
-
41
37
  export var colGroupExtendable = function colGroupExtendable() {
42
38
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
43
39
  return function (pipeline) {
44
40
  var _a, _b;
45
-
46
41
  var columns = pipeline.getColumns();
47
42
  var curState = (_b = (_a = opts.extendStatus) !== null && _a !== void 0 ? _a : pipeline.getStateAtKey(stateKey)) !== null && _b !== void 0 ? _b : {};
48
-
49
43
  var processColumns = function processColumns(columns) {
50
44
  // 当组合列可伸缩,且处于收缩状态时,只渲染一个子列,其他不渲染
51
45
  var toggle = function toggle(col) {
52
46
  // 对应的 col 进行状态切换
53
47
  var changedValue = _defineProperty({}, col.code, !curState[col.code]);
54
-
55
48
  curState[col.code] = !curState[col.code];
56
49
  pipeline.setStateAtKey(stateKey, _extends({}, curState));
57
50
  (opts === null || opts === void 0 ? void 0 : opts.onChangeExtendStatus) && opts.onChangeExtendStatus(curState, changedValue);
58
51
  };
59
-
60
52
  var addIcon = function addIcon(col) {
61
53
  var result = _extends({}, col);
62
-
63
54
  var curColState = curState[col.code];
64
55
  var displaycolExtendIcon = typeof opts.extendIcon === 'function' ? opts.extendIcon(curColState) : opts.extendIcon;
65
56
  var addIconNode = /*#__PURE__*/React.createElement(React.Fragment, null, internals.safeRenderHeader(_extends({}, col)), /*#__PURE__*/React.createElement(ExtendIconStyle, {
@@ -81,24 +72,18 @@ export var colGroupExtendable = function colGroupExtendable() {
81
72
  result.title = addIconNode;
82
73
  return result;
83
74
  };
84
-
85
75
  return makeRecursiveMapper(function (col) {
86
76
  var _a;
87
-
88
77
  var _ref2 = (col === null || col === void 0 ? void 0 : col.features) || {},
89
- showExtendIcon = _ref2.showExtendIcon;
90
-
78
+ showExtendIcon = _ref2.showExtendIcon;
91
79
  if (showExtendIcon === true && ((_a = col.children) === null || _a === void 0 ? void 0 : _a.length) > 1) {
92
80
  var _context;
93
-
94
81
  col = addIcon(col);
95
82
  curState[col.code] === false && _spliceInstanceProperty(_context = col.children).call(_context, 1, col.children.length);
96
83
  }
97
-
98
84
  return col;
99
85
  })(columns);
100
86
  };
101
-
102
87
  pipeline.columns(processColumns(columns));
103
88
  return pipeline;
104
89
  };