@kdcloudjs/kdesign 1.8.13 → 1.8.14

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/es/table/api.js CHANGED
@@ -115,6 +115,10 @@ export default function getApi(pipelineRef) {
115
115
  var pipeline = pipelineRef.current;
116
116
  return (_a = pipeline.ref) === null || _a === void 0 ? void 0 : _a.current.rowHeightManager.cache;
117
117
  }
118
+ function getFeatureApi(featureName) {
119
+ var pipeline = pipelineRef.current;
120
+ return pipeline.getFeatureApi(featureName);
121
+ }
118
122
  return {
119
123
  getColumns: getColumns,
120
124
  getDataSource: getDataSource,
@@ -122,6 +126,7 @@ export default function getApi(pipelineRef) {
122
126
  clearRangeSelection: clearRangeSelection,
123
127
  ensureRowIndexVisible: ensureRowIndexVisible,
124
128
  ensureColumnVisible: ensureColumnVisible,
125
- getHeightCache: getHeightCache
129
+ getHeightCache: getHeightCache,
130
+ getFeatureApi: getFeatureApi
126
131
  };
127
132
  }
@@ -1,3 +1,3 @@
1
1
  import { TableRowDrag, TablePipeline } from '../interface';
2
- declare function useRowDrag(pipeline: TablePipeline, rowDrag?: TableRowDrag, estimatedRowHeight?: number): void;
2
+ declare function useRowDrag(pipeline: TablePipeline, rowDrag?: TableRowDrag): void;
3
3
  export default useRowDrag;
@@ -1,10 +1,8 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import { features } from '@kdcloudjs/table';
3
- function useRowDrag(pipeline, rowDrag, estimatedRowHeight) {
3
+ function useRowDrag(pipeline, rowDrag) {
4
4
  if (rowDrag) {
5
- pipeline.use(features.rowDrag(_extends({
6
- rowHeight: estimatedRowHeight
7
- }, rowDrag)));
5
+ pipeline.use(features.rowDrag(_extends({}, rowDrag)));
8
6
  }
9
7
  }
10
8
  export default useRowDrag;
@@ -18,6 +18,7 @@ export declare type TableApi = {
18
18
  getHeightCache: () => number[];
19
19
  ensureRowIndexVisible: (rowIndex: number, position?: string | undefined) => void;
20
20
  ensureColumnVisible: (code: string) => void;
21
+ getFeatureApi: (featureName: string) => any;
21
22
  };
22
23
  export declare type TableInstance = {
23
24
  api: TableApi;
package/es/table/table.js CHANGED
@@ -98,7 +98,7 @@ var Table = forwardRef(function (props, ref) {
98
98
  useRangeSelection(pipeline, rangeSelection);
99
99
  useMergeCellHover(pipeline);
100
100
  useFooterDataSource(pipeline, footerDataSource);
101
- useRowDrag(pipeline, rowDrag, estimatedRowHeight);
101
+ useRowDrag(pipeline, rowDrag);
102
102
  if (typeof getRowProps === 'function') {
103
103
  pipeline.appendRowPropsGetter(getRowProps);
104
104
  } else {
package/es/tree/tree.js CHANGED
@@ -252,6 +252,7 @@ var InternalTree = React.forwardRef(function (props, ref) {
252
252
  setCheckedKeys(checkState.checkedKeys);
253
253
  setHalfCheckedKeys(checkState.halfCheckedKeys);
254
254
  }
255
+ setScrollKey(undefined);
255
256
  onCheck && onCheck(checkState.checkedKeys, {
256
257
  event: event,
257
258
  node: node,
package/lib/table/api.js CHANGED
@@ -122,6 +122,10 @@ function getApi(pipelineRef) {
122
122
  var pipeline = pipelineRef.current;
123
123
  return (_a = pipeline.ref) === null || _a === void 0 ? void 0 : _a.current.rowHeightManager.cache;
124
124
  }
125
+ function getFeatureApi(featureName) {
126
+ var pipeline = pipelineRef.current;
127
+ return pipeline.getFeatureApi(featureName);
128
+ }
125
129
  return {
126
130
  getColumns: getColumns,
127
131
  getDataSource: getDataSource,
@@ -129,6 +133,7 @@ function getApi(pipelineRef) {
129
133
  clearRangeSelection: clearRangeSelection,
130
134
  ensureRowIndexVisible: ensureRowIndexVisible,
131
135
  ensureColumnVisible: ensureColumnVisible,
132
- getHeightCache: getHeightCache
136
+ getHeightCache: getHeightCache,
137
+ getFeatureApi: getFeatureApi
133
138
  };
134
139
  }
@@ -1,3 +1,3 @@
1
1
  import { TableRowDrag, TablePipeline } from '../interface';
2
- declare function useRowDrag(pipeline: TablePipeline, rowDrag?: TableRowDrag, estimatedRowHeight?: number): void;
2
+ declare function useRowDrag(pipeline: TablePipeline, rowDrag?: TableRowDrag): void;
3
3
  export default useRowDrag;
@@ -7,11 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
9
9
  var _table = require("@kdcloudjs/table");
10
- function useRowDrag(pipeline, rowDrag, estimatedRowHeight) {
10
+ function useRowDrag(pipeline, rowDrag) {
11
11
  if (rowDrag) {
12
- pipeline.use(_table.features.rowDrag((0, _extends2.default)({
13
- rowHeight: estimatedRowHeight
14
- }, rowDrag)));
12
+ pipeline.use(_table.features.rowDrag((0, _extends2.default)({}, rowDrag)));
15
13
  }
16
14
  }
17
15
  var _default = useRowDrag;
@@ -18,6 +18,7 @@ export declare type TableApi = {
18
18
  getHeightCache: () => number[];
19
19
  ensureRowIndexVisible: (rowIndex: number, position?: string | undefined) => void;
20
20
  ensureColumnVisible: (code: string) => void;
21
+ getFeatureApi: (featureName: string) => any;
21
22
  };
22
23
  export declare type TableInstance = {
23
24
  api: TableApi;
@@ -110,7 +110,7 @@ var Table = (0, _react.forwardRef)(function (props, ref) {
110
110
  (0, _useRangeSelection.default)(pipeline, rangeSelection);
111
111
  (0, _mergeCellHover.default)(pipeline);
112
112
  (0, _useFooterDataSource.default)(pipeline, footerDataSource);
113
- (0, _useRowDrag.default)(pipeline, rowDrag, estimatedRowHeight);
113
+ (0, _useRowDrag.default)(pipeline, rowDrag);
114
114
  if (typeof getRowProps === 'function') {
115
115
  pipeline.appendRowPropsGetter(getRowProps);
116
116
  } else {
package/lib/tree/tree.js CHANGED
@@ -264,6 +264,7 @@ var InternalTree = _react.default.forwardRef(function (props, ref) {
264
264
  setCheckedKeys(checkState.checkedKeys);
265
265
  setHalfCheckedKeys(checkState.halfCheckedKeys);
266
266
  }
267
+ setScrollKey(undefined);
267
268
  onCheck && onCheck(checkState.checkedKeys, {
268
269
  event: event,
269
270
  node: node,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.8.13",
3
+ "version": "1.8.14",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [
@@ -78,7 +78,7 @@
78
78
  "@babel/runtime-corejs3": "^7.11.2",
79
79
  "@babel/standalone": "^7.14.3",
80
80
  "@kdcloudjs/kdesign-icons": "^1.0.5",
81
- "@kdcloudjs/table": "1.2.1-canary.7",
81
+ "@kdcloudjs/table": "1.2.2-canary.3",
82
82
  "@popperjs/core": "^2.11.8",
83
83
  "@types/js-cookie": "^3.0.3",
84
84
  "async-validator": "^3.5.1",