@kdcloudjs/table 1.2.1-canary.7-hotfix.1 → 1.2.2-canary.11

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 (199) 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.css.map +0 -0
  5. package/dist/@kdcloudjs/table.js +4095 -2984
  6. package/dist/@kdcloudjs/table.js.map +1 -1
  7. package/dist/@kdcloudjs/table.min.css +1 -1
  8. package/dist/@kdcloudjs/table.min.js +12 -10
  9. package/dist/@kdcloudjs/table.min.js.map +1 -1
  10. package/dist/default-theme.js +0 -0
  11. package/dist/kd-ui-complete.less +777 -777
  12. package/dist/kd-ui.less +0 -0
  13. package/dist/theme.js +0 -0
  14. package/es/_utils/formatUtil.js +1 -5
  15. package/es/_utils/hooks.js +3 -3
  16. package/es/_utils/usePopper.js +13 -13
  17. package/es/locale/locale.js +6 -7
  18. package/es/style/color/colors.less +1 -1
  19. package/es/style/core/index.less +1 -1
  20. package/es/style/core/motion/other.less +27 -27
  21. package/es/style/core/motion/slide.less +53 -53
  22. package/es/style/core/motion.less +1 -1
  23. package/es/style/core/reset.less +185 -185
  24. package/es/style/index.less +1 -1
  25. package/es/style/mixins/index.less +18 -18
  26. package/es/style/mixins/overlay.less +21 -21
  27. package/es/style/mixins/reset.less +12 -12
  28. package/es/style/themes/default.less +445 -445
  29. package/es/table/base/calculations.js +3 -3
  30. package/es/table/base/empty.js +2 -2
  31. package/es/table/base/globalStyleComponent.d.ts +4 -0
  32. package/es/table/base/globalStyleComponent.js +24 -0
  33. package/es/table/base/header.js +5 -7
  34. package/es/table/base/helpers/SpanManager.js +1 -2
  35. package/es/table/base/helpers/TableDOMUtils.js +5 -6
  36. package/es/table/base/html-table.js +3 -4
  37. package/es/table/base/loading.js +2 -2
  38. package/es/table/base/renderTemplates.js +16 -16
  39. package/es/table/base/styles.d.ts +11 -0
  40. package/es/table/base/styles.js +18 -7
  41. package/es/table/base/table.js +18 -20
  42. package/es/table/base/utils.js +3 -3
  43. package/es/table/interfaces.d.ts +41 -0
  44. package/es/table/pipeline/const.d.ts +3 -0
  45. package/es/table/pipeline/const.js +3 -0
  46. package/es/table/pipeline/features/columnDrag.js +0 -1
  47. package/es/table/pipeline/features/columnFilter.js +1 -3
  48. package/es/table/pipeline/features/columnResizeWidth.js +2 -2
  49. package/es/table/pipeline/features/contextMenu.js +4 -6
  50. package/es/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
  51. package/es/table/pipeline/features/featureApi/RowDragApi.js +66 -0
  52. package/es/table/pipeline/features/featureApi/utils.d.ts +2 -0
  53. package/es/table/pipeline/features/featureApi/utils.js +10 -0
  54. package/es/table/pipeline/features/filter/DefaultFilterContent.js +4 -5
  55. package/es/table/pipeline/features/filter/Filter.js +2 -3
  56. package/es/table/pipeline/features/rangeSelection.js +10 -10
  57. package/es/table/pipeline/features/rowDetail.js +2 -2
  58. package/es/table/pipeline/features/rowDrag.d.ts +12 -12
  59. package/es/table/pipeline/features/rowDrag.js +605 -192
  60. package/es/table/pipeline/features/rowGrouping.js +2 -2
  61. package/es/table/pipeline/features/sort.js +6 -7
  62. package/es/table/pipeline/features/tips.js +4 -4
  63. package/es/table/pipeline/features/treeMode.d.ts +1 -0
  64. package/es/table/pipeline/features/treeMode.js +39 -12
  65. package/es/table/pipeline/features/treeSelect.js +2 -2
  66. package/es/table/pipeline/pipeline.d.ts +3 -0
  67. package/es/table/pipeline/pipeline.js +24 -3
  68. package/es/table/pivot/cross-table/buildCrossTable.js +6 -8
  69. package/es/table/pivot/cross-table/cross-table.js +1 -3
  70. package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
  71. package/es/table/pivot/cross-tree-table/cross-tree-table.js +8 -11
  72. package/es/table/pivot/pivot-utils/builders.js +3 -3
  73. package/es/table/pivot/pivot-utils/convert-utils.js +3 -3
  74. package/es/table/style/index.less +1 -1
  75. package/es/table/transforms/autoWidth.js +3 -3
  76. package/es/table/transforms/columnResize.js +3 -5
  77. package/es/table/transforms/sort.js +6 -8
  78. package/es/table/transforms/tips.js +4 -4
  79. package/es/table/transforms/treeMode.js +6 -8
  80. package/es/table/utils/buildTree.js +3 -3
  81. package/es/table/utils/collectNodes.js +3 -3
  82. package/es/table/utils/exportTableAsExcel.js +3 -3
  83. package/es/table/utils/getTreeDepth.js +3 -3
  84. package/es/table/utils/groupBy.js +3 -3
  85. package/es/table/utils/makeRecursiveMapper.js +3 -3
  86. package/es/table/utils/mergeCellProps.js +0 -1
  87. package/es/table/utils/others.js +3 -3
  88. package/es/table/utils/traverseColumn.js +3 -3
  89. package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +7 -8
  90. package/es/table/utils/tree-data-helpers/TreeDataHelper.js +4 -5
  91. package/lib/_utils/arrayUtil.js +2 -3
  92. package/lib/_utils/formatUtil.js +1 -5
  93. package/lib/_utils/hooks.js +3 -3
  94. package/lib/_utils/index.js +2 -3
  95. package/lib/_utils/type.js +3 -5
  96. package/lib/_utils/usePopper.js +18 -21
  97. package/lib/config-provider/ConfigContext.js +1 -2
  98. package/lib/config-provider/compDefaultProps.js +1 -2
  99. package/lib/config-provider/configProvider.js +3 -4
  100. package/lib/config-provider/defaultConfig.js +1 -2
  101. package/lib/config-provider/index.js +1 -2
  102. package/lib/locale/index.js +3 -4
  103. package/lib/locale/locale.js +10 -14
  104. package/lib/locale/zh-CN.js +1 -2
  105. package/lib/style/color/colors.less +2 -0
  106. package/lib/style/components.less +1 -1
  107. package/lib/style/core/index.less +2 -0
  108. package/lib/style/core/motion/other.less +28 -0
  109. package/lib/style/core/motion/slide.less +53 -0
  110. package/lib/style/core/motion.less +2 -0
  111. package/lib/style/core/reset.less +186 -0
  112. package/lib/style/index.css +410 -0
  113. package/lib/style/index.less +2 -0
  114. package/lib/style/mixins/index.less +19 -0
  115. package/lib/style/mixins/overlay.less +22 -0
  116. package/lib/style/mixins/reset.less +13 -0
  117. package/lib/style/themes/default.less +445 -0
  118. package/lib/style/themes/index.less +1 -0
  119. package/lib/table/base/calculations.js +3 -3
  120. package/lib/table/base/empty.js +4 -4
  121. package/lib/table/base/globalStyleComponent.d.ts +4 -0
  122. package/lib/table/base/globalStyleComponent.js +35 -0
  123. package/lib/table/base/header.js +5 -7
  124. package/lib/table/base/helpers/SpanManager.js +3 -5
  125. package/lib/table/base/helpers/TableDOMUtils.js +7 -9
  126. package/lib/table/base/helpers/getRichVisibleRectsStream.js +2 -2
  127. package/lib/table/base/html-table.js +3 -4
  128. package/lib/table/base/loading.js +2 -2
  129. package/lib/table/base/renderTemplates.js +18 -18
  130. package/lib/table/base/styles.d.ts +11 -0
  131. package/lib/table/base/styles.js +25 -21
  132. package/lib/table/base/table.js +30 -31
  133. package/lib/table/base/utils.js +13 -20
  134. package/lib/table/common-views.js +4 -8
  135. package/lib/table/interfaces.d.ts +41 -0
  136. package/lib/table/internals.js +2 -3
  137. package/lib/table/pipeline/const.d.ts +3 -0
  138. package/lib/table/pipeline/const.js +9 -0
  139. package/lib/table/pipeline/features/autoFill.js +3 -6
  140. package/lib/table/pipeline/features/colGroupExtendable.js +2 -3
  141. package/lib/table/pipeline/features/columnDrag.js +0 -1
  142. package/lib/table/pipeline/features/columnFilter.js +1 -3
  143. package/lib/table/pipeline/features/columnResizeWidth.js +7 -10
  144. package/lib/table/pipeline/features/contextMenu.js +6 -8
  145. package/lib/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
  146. package/lib/table/pipeline/features/featureApi/RowDragApi.js +72 -0
  147. package/lib/table/pipeline/features/featureApi/utils.d.ts +2 -0
  148. package/lib/table/pipeline/features/featureApi/utils.js +17 -0
  149. package/lib/table/pipeline/features/filter/DefaultFilterContent.js +7 -9
  150. package/lib/table/pipeline/features/filter/Filter.js +5 -7
  151. package/lib/table/pipeline/features/filter/FilterPanel.js +3 -4
  152. package/lib/table/pipeline/features/filter/util.js +2 -3
  153. package/lib/table/pipeline/features/footerDataSource.js +1 -2
  154. package/lib/table/pipeline/features/rangeSelection.js +12 -14
  155. package/lib/table/pipeline/features/rowDetail.js +2 -2
  156. package/lib/table/pipeline/features/rowDrag.d.ts +12 -12
  157. package/lib/table/pipeline/features/rowDrag.js +608 -197
  158. package/lib/table/pipeline/features/rowGrouping.js +2 -2
  159. package/lib/table/pipeline/features/sort.js +6 -7
  160. package/lib/table/pipeline/features/tips.js +4 -4
  161. package/lib/table/pipeline/features/treeMode.d.ts +1 -0
  162. package/lib/table/pipeline/features/treeMode.js +41 -14
  163. package/lib/table/pipeline/features/treeSelect.js +2 -2
  164. package/lib/table/pipeline/index.js +2 -2
  165. package/lib/table/pipeline/pipeline.d.ts +3 -0
  166. package/lib/table/pipeline/pipeline.js +25 -5
  167. package/lib/table/pivot/cross-table/buildCrossTable.js +6 -8
  168. package/lib/table/pivot/cross-table/constants.js +1 -2
  169. package/lib/table/pivot/cross-table/cross-table.js +3 -6
  170. package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
  171. package/lib/table/pivot/cross-tree-table/cross-tree-table.js +9 -13
  172. package/lib/table/pivot/pivot-utils/builders.js +3 -3
  173. package/lib/table/pivot/pivot-utils/convert-utils.js +3 -3
  174. package/lib/table/style/index.css +0 -0
  175. package/lib/table/style/index.less +1 -0
  176. package/lib/table/transforms/autoWidth.js +5 -5
  177. package/lib/table/transforms/columnResize.js +5 -7
  178. package/lib/table/transforms/sort.js +8 -10
  179. package/lib/table/transforms/tips.js +4 -4
  180. package/lib/table/transforms/treeMode.js +8 -10
  181. package/lib/table/use/useResizeObserver.js +1 -2
  182. package/lib/table/utils/browserType.js +2 -4
  183. package/lib/table/utils/buildTree.js +3 -3
  184. package/lib/table/utils/collectNodes.js +3 -3
  185. package/lib/table/utils/console.js +2 -3
  186. package/lib/table/utils/copyToClipboard.js +1 -2
  187. package/lib/table/utils/exportTableAsExcel.js +3 -3
  188. package/lib/table/utils/getTreeDepth.js +3 -3
  189. package/lib/table/utils/groupBy.js +3 -3
  190. package/lib/table/utils/keyCode.js +1 -2
  191. package/lib/table/utils/makeRecursiveMapper.js +3 -3
  192. package/lib/table/utils/mergeCellProps.js +0 -1
  193. package/lib/table/utils/others.js +4 -5
  194. package/lib/table/utils/proto.js +1 -2
  195. package/lib/table/utils/selectColumn.js +2 -4
  196. package/lib/table/utils/traverseColumn.js +3 -3
  197. package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +9 -11
  198. package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +6 -8
  199. package/package.json +218 -219
@@ -7,17 +7,17 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
7
7
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
8
8
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
9
9
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
10
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
11
10
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
12
11
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
13
- 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(_e2) { throw _e2; }, 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(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
14
- function _unsupportedIterableToArray(o, minLen) { var _context2; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context2 = Object.prototype.toString.call(o)).call(_context2, 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); }
15
- 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; }
12
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
13
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
14
+ function _unsupportedIterableToArray(r, a) { if (r) { var _context2; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context2 = {}.toString.call(r)).call(_context2, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
15
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
16
16
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
17
17
  import _flatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/flat";
18
18
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
19
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
20
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
19
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
20
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
21
  import cx from 'classnames';
22
22
  import React from 'react';
23
23
  import { BehaviorSubject, combineLatest, noop, Subscription, Subject, from } from 'rxjs';
@@ -31,6 +31,7 @@ import { TableDOMHelper } from './helpers/TableDOMUtils';
31
31
  import { HtmlTable } from './html-table';
32
32
  import Loading from './loading';
33
33
  import { Classes, LOCK_SHADOW_PADDING, StyledArtTableWrapper } from './styles';
34
+ import GlobalStyleComponent from './globalStyleComponent';
34
35
  import { addResizeObserver, getScrollbarSize, OVERSCAN_SIZE, shallowEqual, STYLED_REF_PROP, sum, syncScrollLeft, throttledWindowResize$, getTableScrollFooterDOM, getTableScrollHeaderDOM, cssPolifill } from './utils';
35
36
  import { console, browserType, isStickyUIDegrade } from '../utils';
36
37
  import getTableRenderTemplate from './renderTemplates';
@@ -42,12 +43,10 @@ function warnPropsDotEmptyContentIsDeprecated() {
42
43
  }
43
44
  }
44
45
  export var BaseTable = /*#__PURE__*/function (_React$Component) {
45
- _inherits(BaseTable, _React$Component);
46
- var _super = _createSuper(BaseTable);
47
46
  function BaseTable(props) {
48
47
  var _this;
49
48
  _classCallCheck(this, BaseTable);
50
- _this = _super.call(this, props);
49
+ _this = _callSuper(this, BaseTable, [props]);
51
50
  _this.rowHeightManager = makeRowHeightManager(_this.props.dataSource.length, _this.props.estimatedRowHeight);
52
51
  _this.artTableWrapperRef = /*#__PURE__*/React.createRef();
53
52
  _this.hasScrollY = false;
@@ -122,13 +121,13 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
122
121
  className: Classes.virtual,
123
122
  tabIndex: -1,
124
123
  style: virtualStyle
125
- }, topBlank > 0 && /*#__PURE__*/React.createElement("div", {
124
+ }, topBlank > 0 && (/*#__PURE__*/React.createElement("div", {
126
125
  key: "top-blank",
127
126
  className: cx(Classes.virtualBlank, 'top'),
128
127
  style: {
129
128
  height: topBlank
130
129
  }
131
- }), /*#__PURE__*/React.createElement(HtmlTable, {
130
+ })), /*#__PURE__*/React.createElement(HtmlTable, {
132
131
  tbodyHtmlTag: "tbody",
133
132
  getRowProps: getRowProps,
134
133
  primaryKey: primaryKey,
@@ -140,13 +139,13 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
140
139
  limit: bottomIndex,
141
140
  last: dataSource.length - 1
142
141
  }
143
- }), bottomBlank > 0 && /*#__PURE__*/React.createElement("div", {
142
+ }), bottomBlank > 0 && (/*#__PURE__*/React.createElement("div", {
144
143
  key: "bottom-blank",
145
144
  className: cx(Classes.virtualBlank, 'bottom'),
146
145
  style: {
147
146
  height: bottomBlank
148
147
  }
149
- })));
148
+ }))));
150
149
  };
151
150
  _this.state = {
152
151
  hasScroll: true,
@@ -163,7 +162,8 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
163
162
  return _this;
164
163
  }
165
164
  /** @deprecated BaseTable.getDoms() 已经过时,请勿调用 */
166
- _createClass(BaseTable, [{
165
+ _inherits(BaseTable, _React$Component);
166
+ return _createClass(BaseTable, [{
167
167
  key: "getDoms",
168
168
  value: function getDoms() {
169
169
  console.warn('[kd-table] BaseTable.getDoms() 已经过时');
@@ -445,7 +445,6 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
445
445
  }, {
446
446
  key: "render",
447
447
  value: function render() {
448
- var _cx;
449
448
  // console.log('render table')
450
449
  var info = calculateRenderInfo(this);
451
450
  this.lastInfo = info;
@@ -463,7 +462,7 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
463
462
  footerDataSource = _this$props7.footerDataSource,
464
463
  components = _this$props7.components,
465
464
  bordered = _this$props7.bordered;
466
- var artTableWrapperClassName = cx(Classes.artTableWrapper, (_cx = {
465
+ var artTableWrapperClassName = cx(Classes.artTableWrapper, _defineProperty(_defineProperty(_defineProperty({
467
466
  'use-outer-border': useOuterBorder,
468
467
  empty: dataSource.length === 0,
469
468
  lock: info.hasLockColumn,
@@ -471,19 +470,19 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
471
470
  'sticky-header': isStickyHeader !== null && isStickyHeader !== void 0 ? isStickyHeader : isStickyHead,
472
471
  'has-footer': footerDataSource.length > 0,
473
472
  'sticky-footer': isStickyFooter
474
- }, _defineProperty(_cx, Classes.artTableBordered, bordered), _defineProperty(_cx, 'ie-polyfill-wrapper', browserType.isIE), _defineProperty(_cx, 'sticky-polyfill-wrapper', isStickyUIDegrade()), _cx), className);
473
+ }, Classes.artTableBordered, bordered), 'ie-polyfill-wrapper', browserType.isIE), 'sticky-polyfill-wrapper', isStickyUIDegrade()), className);
475
474
  var artTableWrapperProps = _defineProperty({
476
475
  className: artTableWrapperClassName,
477
476
  style: style
478
477
  }, STYLED_REF_PROP, this.artTableWrapperRef);
479
478
  var tableProps = getTableProps() || {};
480
- return /*#__PURE__*/React.createElement(StyledArtTableWrapper, _extends({}, artTableWrapperProps), /*#__PURE__*/React.createElement(Loading, {
479
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GlobalStyleComponent, null), /*#__PURE__*/React.createElement(StyledArtTableWrapper, _extends({}, artTableWrapperProps), /*#__PURE__*/React.createElement(Loading, {
481
480
  visible: isLoading,
482
481
  LoadingIcon: components.LoadingIcon,
483
482
  LoadingContentWrapper: components.LoadingContentWrapper
484
483
  }, /*#__PURE__*/React.createElement("div", _extends({}, tableProps, {
485
484
  className: cx(Classes.artTable, tableProps.className)
486
- }), this.renderTableHeader(info), this.renderTableBody(info), this.renderTableFooter(info), this.renderLockShadows(info)), this.renderStickyScroll(info)));
485
+ }), this.renderTableHeader(info), this.renderTableBody(info), this.renderTableFooter(info), this.renderLockShadows(info)), this.renderStickyScroll(info))));
487
486
  }
488
487
  }, {
489
488
  key: "componentDidMount",
@@ -751,7 +750,6 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
751
750
  }
752
751
  }
753
752
  }]);
754
- return BaseTable;
755
753
  }(React.Component);
756
754
  BaseTable.defaultProps = {
757
755
  hasHeader: true,
@@ -4,9 +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
- 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; } } }; }
8
- 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); }
9
- 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; }
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; }
10
10
  import _Set from "@babel/runtime-corejs3/core-js-stable/set";
11
11
  import _Object$is from "@babel/runtime-corejs3/core-js-stable/object/is";
12
12
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
@@ -101,3 +101,44 @@ export interface CustomeFilterPanelProps extends FilterPanelProps {
101
101
  filterModel: FilterItem;
102
102
  }
103
103
  export declare type FilterPanel = React.ComponentType<DefaultFilterPanelProps | CustomeFilterPanelProps>;
104
+ export interface RowDragEvent {
105
+ startRowIndex: number;
106
+ startRow: any;
107
+ endRowIndex: number;
108
+ endRow: any;
109
+ isFinished: boolean;
110
+ dragPosition: string;
111
+ startDropZoneTagret: Element;
112
+ startCommonParams: any;
113
+ commonParams?: any;
114
+ dropZoneTarget: Element;
115
+ event: MouseEvent;
116
+ x: number;
117
+ y: number;
118
+ }
119
+ export interface DragEvent {
120
+ dragItem: any;
121
+ startDropZoneTagret: Element;
122
+ startCommonParams: any;
123
+ commonParams?: any;
124
+ dropZoneTarget: Element;
125
+ dropZoneTableParams?: RowDropZoneTableParams;
126
+ event: MouseEvent;
127
+ x: number;
128
+ y: number;
129
+ }
130
+ export interface RowDropZoneParams {
131
+ getContainer: () => HTMLElement;
132
+ onDragEnter?: (params: DragEvent) => void;
133
+ onDragLeave?: (params: DragEvent) => void;
134
+ onDragging?: (params: DragEvent) => void;
135
+ onDragStop?: (params: DragEvent, source?: string) => void;
136
+ isTable?: boolean;
137
+ tableParams?: RowDropZoneTableParams;
138
+ }
139
+ interface RowDropZoneTableParams {
140
+ getDataSource: () => any[];
141
+ getTreeModeOptions: () => any;
142
+ getRowDragOptions: () => any;
143
+ }
144
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const FeatureName: {
2
+ rowDrag: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ export var FeatureName = {
2
+ rowDrag: 'rowDrag'
3
+ };
@@ -216,7 +216,6 @@ export function columnDrag() {
216
216
  e.stopPropagation(); // 存在移动就阻止冒泡
217
217
  currentTarget.addEventListener('click', stopClickPropagation); // 阻止列头点击事件,防止拖动后触发列头过滤事件
218
218
  }
219
-
220
219
  window.requestAnimationFrame(function () {
221
220
  // 取消阻止列头点击事件
222
221
  currentTarget.removeEventListener('click', stopClickPropagation);
@@ -45,7 +45,6 @@ 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;
49
48
  var handleFilterChanged = function handleFilterChanged(filterItem) {
50
49
  var nextFiltersMap = new _Map(inputFiltersMap);
51
50
  var currentFilter = _extends({
@@ -80,7 +79,7 @@ export function filter() {
80
79
  setFilterModel: handleFilterChanged,
81
80
  setFilter: setFilter,
82
81
  isFilterActive: filterActive,
83
- className: cx((_cx = {}, _defineProperty(_cx, Classes.tableFilterTrigger, true), _defineProperty(_cx, "active", filterActive), _cx)),
82
+ className: cx(_defineProperty(_defineProperty({}, Classes.tableFilterTrigger, true), "active", filterActive)),
84
83
  stopClickEventPropagation: stopClickEventPropagation,
85
84
  stopESCKeyDownEventPropagation: stopESCKeyDownEventPropagation,
86
85
  hideFilterPopupHeader: hideFilterPopupHeader,
@@ -99,7 +98,6 @@ export function filter() {
99
98
  // }
100
99
  // })
101
100
  }
102
-
103
101
  if (!isLeafNode(col)) {
104
102
  var _context3;
105
103
  result.children = _mapInstanceProperty(_context3 = col.children).call(_context3, dfs);
@@ -143,7 +143,7 @@ export function columnResize() {
143
143
  width = col.width;
144
144
  return _extends(_extends({}, col), {
145
145
  width: (_a = columnSize[code]) !== null && _a !== void 0 ? _a : width,
146
- title: /*#__PURE__*/React.createElement(React.Fragment, null, prevTitle, (features === null || features === void 0 ? void 0 : features.resizeable) !== false && (isGroup ? /*#__PURE__*/React.createElement(TableHeaderGroupCellResize, {
146
+ title: (/*#__PURE__*/React.createElement(React.Fragment, null, prevTitle, (features === null || features === void 0 ? void 0 : features.resizeable) !== false && (isGroup ? /*#__PURE__*/React.createElement(TableHeaderGroupCellResize, {
147
147
  className: Classes.tableHeaderCellResize,
148
148
  onDoubleClick: function onDoubleClick(e) {
149
149
  return handleDoubleClick(e, col);
@@ -159,7 +159,7 @@ export function columnResize() {
159
159
  onMouseDown: function onMouseDown(e) {
160
160
  return handleMouseDown(e, col);
161
161
  }
162
- }))),
162
+ })))),
163
163
  headerCellProps: mergeCellProps(col.headerCellProps, {
164
164
  className: 'resizeable'
165
165
  })
@@ -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 hidePopup = function hidePopup(event) {
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, hidePopup, true);
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, hidePopup, true);
39
+ window.addEventListener(eventType, _hidePopup2, true);
40
40
  });
41
41
  }, 0);
42
42
  });
43
- return hidePopup;
43
+ return _hidePopup2;
44
44
  };
45
45
  var onContextMenu = function onContextMenu(e) {
46
46
  if (canShowContextMenu(e, pipeline)) {
@@ -284,12 +284,10 @@ function keepWithinBounds(popupParent, ePopup, x, y) {
284
284
  var maxX = parentWidth - minWidth;
285
285
  x = Math.min(Math.max(x, 0), Math.abs(maxX)); // 目前位置,最大支持的位置
286
286
  }
287
-
288
287
  if (y) {
289
288
  var maxY = parentHeight - ePopupRect.height;
290
289
  y = Math.min(Math.max(y, 0), Math.abs(maxY)); // 目前位置,最大支持的位置
291
290
  }
292
-
293
291
  return {
294
292
  x: x,
295
293
  y: y
@@ -0,0 +1,15 @@
1
+ import { RowDropZoneParams } from '../../../interfaces';
2
+ export default class RowDragApi {
3
+ private pipeline;
4
+ private rowDropZoneParams;
5
+ private rowDropZones;
6
+ private dragStatus;
7
+ constructor(pipeline: any);
8
+ getRowDropZoneParams(): RowDropZoneParams;
9
+ setRowDropZoneParams(params: any): void;
10
+ addRowDropZone(rowDropZone: any): void;
11
+ getRowDropZone(): RowDropZoneParams[];
12
+ removeRowDropZone(rowDropZone: any): void;
13
+ private setDragStatus;
14
+ private getDragStatus;
15
+ }
@@ -0,0 +1,66 @@
1
+ import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
3
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
+ var ROW_DRAG_STATUS = 'rowDragStatus';
5
+ var RowDragApi = /*#__PURE__*/function () {
6
+ function RowDragApi(pipeline) {
7
+ _classCallCheck(this, RowDragApi);
8
+ this.pipeline = pipeline;
9
+ this.rowDropZoneParams = null;
10
+ this.rowDropZones = [];
11
+ this.dragStatus = 'finished';
12
+ }
13
+ return _createClass(RowDragApi, [{
14
+ key: "getRowDropZoneParams",
15
+ value: function getRowDropZoneParams() {
16
+ return this.rowDropZoneParams;
17
+ }
18
+ }, {
19
+ key: "setRowDropZoneParams",
20
+ value: function setRowDropZoneParams(params) {
21
+ this.rowDropZoneParams = params;
22
+ }
23
+ }, {
24
+ key: "addRowDropZone",
25
+ value: function addRowDropZone(rowDropZone) {
26
+ if (!rowDropZone || !(rowDropZone === null || rowDropZone === void 0 ? void 0 : rowDropZone.getContainer())) {
27
+ return;
28
+ }
29
+ var isExist = this.rowDropZones.some(function (zone) {
30
+ return zone.getContainer() === rowDropZone.getContainer();
31
+ });
32
+ if (isExist) {
33
+ return;
34
+ }
35
+ this.rowDropZones.push(rowDropZone);
36
+ }
37
+ }, {
38
+ key: "getRowDropZone",
39
+ value: function getRowDropZone() {
40
+ return this.rowDropZones;
41
+ }
42
+ }, {
43
+ key: "removeRowDropZone",
44
+ value: function removeRowDropZone(rowDropZone) {
45
+ var _context;
46
+ this.rowDropZones = _filterInstanceProperty(_context = this.rowDropZones).call(_context, function (zone) {
47
+ return zone.getContainer() !== rowDropZone.getContainer();
48
+ });
49
+ }
50
+ }, {
51
+ key: "setDragStatus",
52
+ value: function setDragStatus(status) {
53
+ var currentStatus = this.dragStatus;
54
+ this.dragStatus = status;
55
+ if (currentStatus !== status) {
56
+ this.pipeline.setStateAtKey(ROW_DRAG_STATUS, status);
57
+ }
58
+ }
59
+ }, {
60
+ key: "getDragStatus",
61
+ value: function getDragStatus() {
62
+ return this.dragStatus;
63
+ }
64
+ }]);
65
+ }();
66
+ export { RowDragApi as default };
@@ -0,0 +1,2 @@
1
+ import RowDragApi from './RowDragApi';
2
+ export declare function createFeatureApi(type: any, pipeline: any): RowDragApi;
@@ -0,0 +1,10 @@
1
+ import RowDragApi from './RowDragApi';
2
+ import { FeatureName } from '../../const';
3
+ export function createFeatureApi(type, pipeline) {
4
+ switch (type) {
5
+ case FeatureName.rowDrag:
6
+ return new RowDragApi(pipeline);
7
+ default:
8
+ break;
9
+ }
10
+ }
@@ -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((_cx2 = {
95
+ className: cx(_defineProperty(_defineProperty({
97
96
  'filter-btn': true
98
- }, _defineProperty(_cx2, Classes.button, true), _defineProperty(_cx2, Classes.buttonPrimary, true), _cx2)),
97
+ }, Classes.button, true), Classes.buttonPrimary, true)),
99
98
  onClick: confirm
100
99
  }, (_b = localeText.confirmFilter) !== null && _b !== void 0 ? _b : '确定')));
101
100
  }
@@ -52,7 +52,6 @@ function Panel(_ref) {
52
52
  }, renderPanelContent()));
53
53
  }
54
54
  function Filter(_ref2) {
55
- var _cx;
56
55
  var _ref2$size = _ref2.size,
57
56
  size = _ref2$size === void 0 ? 12 : _ref2$size,
58
57
  style = _ref2.style,
@@ -115,7 +114,7 @@ function Filter(_ref2) {
115
114
  }
116
115
  }
117
116
  };
118
- var iconClassName = cx((_cx = {}, _defineProperty(_cx, className, true), _defineProperty(_cx, 'filter-panel-open', showPanel), _cx));
117
+ var iconClassName = cx(_defineProperty(_defineProperty({}, className, true), 'filter-panel-open', showPanel));
119
118
  var displayFilterIcon = typeof filterIcon === 'function' ? filterIcon(isFilterActive) : filterIcon;
120
119
  var popupParent = (getPopupParent === null || getPopupParent === void 0 ? void 0 : getPopupParent(iconWrapRef.current)) || document.body;
121
120
  return /*#__PURE__*/React.createElement(FilterIconSpanStyle, {
@@ -131,7 +130,7 @@ function Filter(_ref2) {
131
130
  }, displayFilterIcon || /*#__PURE__*/React.createElement(DefaultFilterIcon, {
132
131
  width: size,
133
132
  height: size
134
- })), showPanel && /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Panel, {
133
+ })), showPanel && /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(Panel, {
135
134
  ele: hideFilterPopupHeader ? iconWrapRef.current : iconRef.current,
136
135
  filterIcon: displayFilterIcon,
137
136
  hidePanel: hidePanel,
@@ -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";
@@ -210,9 +209,8 @@ export function rangeSelection(opts) {
210
209
  };
211
210
  }
212
211
  function getTargetCell(target, columns) {
213
- while (target) {
214
- if (target.getAttribute('data-role') === 'table-cell') {
215
- var _ret = function () {
212
+ var _loop = function _loop() {
213
+ if (target.getAttribute('data-role') === 'table-cell') {
216
214
  var columnCode = target.getAttribute('data-code');
217
215
  var column = findByTree(columns, function (item, index) {
218
216
  return item.code === columnCode;
@@ -229,10 +227,13 @@ function getTargetCell(target, columns) {
229
227
  isFooterCell: isEleInFooter(target)
230
228
  }
231
229
  };
232
- }();
233
- if (_typeof(_ret) === "object") return _ret.v;
234
- }
235
- target = target.parentElement;
230
+ }
231
+ target = target.parentElement;
232
+ },
233
+ _ret;
234
+ while (target) {
235
+ _ret = _loop();
236
+ if (_ret) return _ret.v;
236
237
  }
237
238
  return null;
238
239
  }
@@ -421,7 +422,6 @@ export function getCellRangeId(cellRange) {
421
422
  * @returns
422
423
  */
423
424
  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((_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));
440
+ 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
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: /*#__PURE__*/React.createElement("div", {
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) {
@@ -1,13 +1,5 @@
1
1
  import { TablePipeline } from '../pipeline';
2
- import { ArtColumn } from '../../interfaces';
3
- interface RowDragEvent {
4
- startRowIndex: number;
5
- startRow: any;
6
- endRowIndex: number;
7
- endRow: any;
8
- isFinished: boolean;
9
- dragPosition: string;
10
- }
2
+ import { ArtColumn, RowDragEvent } from '../../interfaces';
11
3
  export interface RowDragFeatureOptions {
12
4
  /** 拖拽开始事件 */
13
5
  onDragStart?: (event: RowDragEvent) => void;
@@ -15,16 +7,24 @@ export interface RowDragFeatureOptions {
15
7
  onDragMove?: (event: RowDragEvent) => void;
16
8
  /** 拖拽结束事件 */
17
9
  onDragEnd?: (event: RowDragEvent) => void;
10
+ /** 拖拽离开事件 */
11
+ onDragLeave?: (event: RowDragEvent) => void;
12
+ /** 拖拽进入事件 */
13
+ onDragEnter?: (event: RowDragEvent) => void;
18
14
  /** 判断一行是否要禁用拖拽 */
19
15
  isDisabled?: (row: any, rowIndex: number) => boolean;
16
+ /** 拖拽时显示的文本 */
17
+ rowDragText: (row: any, rowIndex: number) => string;
20
18
  /** 拖拽列定义 */
21
19
  rowDragColumn?: ArtColumn;
22
- /** 行高 */
23
- rowHeight?: number;
24
20
  /** 拖拽过程中是否禁止滚动条滚动 */
25
21
  suppressScrollMove?: boolean;
22
+ /** 树型表格是否允许拖拽插入行 */
23
+ allowDragIntoRow?: boolean;
24
+ /** 公共参数,作为拖拽回调参数,可在此提供业务层取数接口 */
25
+ commonParams?: any;
26
26
  }
27
27
  export declare const ROW_DRAG_COLUMN_CODE = "$_row_drag_column_&";
28
28
  export declare const rowDragKey = "rowDragKey";
29
+ export declare const rowDragOptionsKey = "rowDragOptions";
29
30
  export declare function rowDrag(opt: RowDragFeatureOptions): (pipeline: TablePipeline) => TablePipeline;
30
- export {};