@kdcloudjs/table 1.1.5-canary.1 → 1.1.5-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.js +7 -13
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +2 -2
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/es/table/base/table.d.ts +1 -1
- package/es/table/base/table.js +3 -2
- package/es/table/pipeline/pipeline.d.ts +0 -4
- package/es/table/pipeline/pipeline.js +4 -10
- package/lib/table/base/table.d.ts +1 -1
- package/lib/table/base/table.js +3 -2
- package/lib/table/pipeline/pipeline.d.ts +0 -4
- package/lib/table/pipeline/pipeline.js +4 -11
- package/package.json +1 -1
package/es/table/base/table.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export interface BaseTableProps {
|
|
|
77
77
|
getTableProps?(): React.HTMLAttributes<HTMLTableElement>;
|
|
78
78
|
setTableWidth?(tableWidth: number): void;
|
|
79
79
|
setTableDomHelper?(domHelper: TableDOMHelper): void;
|
|
80
|
-
|
|
80
|
+
setRowHeightManager?(rowHeightManager: any): void;
|
|
81
81
|
cssVariables?: {
|
|
82
82
|
[key: string]: any;
|
|
83
83
|
};
|
package/es/table/base/table.js
CHANGED
|
@@ -11,7 +11,7 @@ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
|
11
11
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
12
12
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
13
13
|
|
|
14
|
-
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(
|
|
14
|
+
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; } } }; }
|
|
15
15
|
|
|
16
16
|
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); }
|
|
17
17
|
|
|
@@ -496,7 +496,7 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
|
|
|
496
496
|
}, {
|
|
497
497
|
key: "componentDidMount",
|
|
498
498
|
value: function componentDidMount() {
|
|
499
|
-
var _a, _b, _c, _d; // console.log('did mount start')
|
|
499
|
+
var _a, _b, _c, _d, _e, _f; // console.log('did mount start')
|
|
500
500
|
// console.log('update dom helper start')
|
|
501
501
|
|
|
502
502
|
|
|
@@ -517,6 +517,7 @@ export var BaseTable = /*#__PURE__*/function (_React$Component) {
|
|
|
517
517
|
});
|
|
518
518
|
(_b = (_a = this.props).setTableWidth) === null || _b === void 0 ? void 0 : _b.call(_a, this.domHelper.tableBody.clientWidth);
|
|
519
519
|
(_d = (_c = this.props).setTableDomHelper) === null || _d === void 0 ? void 0 : _d.call(_c, this.domHelper);
|
|
520
|
+
(_f = (_e = this.props).setRowHeightManager) === null || _f === void 0 ? void 0 : _f.call(_e, this.rowHeightManager);
|
|
520
521
|
}
|
|
521
522
|
}, {
|
|
522
523
|
key: "componentDidUpdate",
|
|
@@ -88,10 +88,6 @@ export declare class TablePipeline {
|
|
|
88
88
|
setFeatureOptions(optionKey: string, value: any): void;
|
|
89
89
|
/** 获取 BaseTable 的 props,结果中包含 dataSource/columns/primaryKey/getRowProps 四个字段 */
|
|
90
90
|
getProps(this: TablePipeline): TableProps;
|
|
91
|
-
/**
|
|
92
|
-
* 清除范围选中内容
|
|
93
|
-
*/
|
|
94
|
-
clearRangeSelection(): void;
|
|
95
91
|
}
|
|
96
92
|
export declare function useTablePipeline(ctx?: Partial<TablePipelineCtx>): TablePipeline;
|
|
97
93
|
export {};
|
|
@@ -8,7 +8,6 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
8
8
|
import { useState, useRef } from 'react';
|
|
9
9
|
import { mergeCellProps } from '../utils';
|
|
10
10
|
import { autoFillTableWidth, tableWidthKey } from './features/autoFill';
|
|
11
|
-
import { rangeSelectionKey } from './features/rangeSelection';
|
|
12
11
|
/**
|
|
13
12
|
* 表格数据处理流水线。TablePipeline 提供了表格数据处理过程中的一些上下方与工具方法,包括……
|
|
14
13
|
*
|
|
@@ -279,16 +278,11 @@ export var TablePipeline = /*#__PURE__*/function () {
|
|
|
279
278
|
_this2.ref.current.domHelper = domHelper;
|
|
280
279
|
};
|
|
281
280
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
* 清除范围选中内容
|
|
286
|
-
*/
|
|
281
|
+
result.setRowHeightManager = function (rowHeightManager) {
|
|
282
|
+
_this2.ref.current.rowHeightManager = rowHeightManager;
|
|
283
|
+
};
|
|
287
284
|
|
|
288
|
-
|
|
289
|
-
key: "clearRangeSelection",
|
|
290
|
-
value: function clearRangeSelection() {
|
|
291
|
-
this.setStateAtKey(rangeSelectionKey, null);
|
|
285
|
+
return result;
|
|
292
286
|
}
|
|
293
287
|
}]);
|
|
294
288
|
|
|
@@ -77,7 +77,7 @@ export interface BaseTableProps {
|
|
|
77
77
|
getTableProps?(): React.HTMLAttributes<HTMLTableElement>;
|
|
78
78
|
setTableWidth?(tableWidth: number): void;
|
|
79
79
|
setTableDomHelper?(domHelper: TableDOMHelper): void;
|
|
80
|
-
|
|
80
|
+
setRowHeightManager?(rowHeightManager: any): void;
|
|
81
81
|
cssVariables?: {
|
|
82
82
|
[key: string]: any;
|
|
83
83
|
};
|
package/lib/table/base/table.js
CHANGED
|
@@ -81,7 +81,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
|
|
|
81
81
|
|
|
82
82
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
83
83
|
|
|
84
|
-
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(
|
|
84
|
+
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; } } }; }
|
|
85
85
|
|
|
86
86
|
function _unsupportedIterableToArray(o, minLen) { var _context2; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty2(_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); }
|
|
87
87
|
|
|
@@ -543,7 +543,7 @@ var BaseTable = /*#__PURE__*/function (_React$Component) {
|
|
|
543
543
|
}, {
|
|
544
544
|
key: "componentDidMount",
|
|
545
545
|
value: function componentDidMount() {
|
|
546
|
-
var _a, _b, _c, _d; // console.log('did mount start')
|
|
546
|
+
var _a, _b, _c, _d, _e, _f; // console.log('did mount start')
|
|
547
547
|
// console.log('update dom helper start')
|
|
548
548
|
|
|
549
549
|
|
|
@@ -564,6 +564,7 @@ var BaseTable = /*#__PURE__*/function (_React$Component) {
|
|
|
564
564
|
});
|
|
565
565
|
(_b = (_a = this.props).setTableWidth) === null || _b === void 0 ? void 0 : _b.call(_a, this.domHelper.tableBody.clientWidth);
|
|
566
566
|
(_d = (_c = this.props).setTableDomHelper) === null || _d === void 0 ? void 0 : _d.call(_c, this.domHelper);
|
|
567
|
+
(_f = (_e = this.props).setRowHeightManager) === null || _f === void 0 ? void 0 : _f.call(_e, this.rowHeightManager);
|
|
567
568
|
}
|
|
568
569
|
}, {
|
|
569
570
|
key: "componentDidUpdate",
|
|
@@ -88,10 +88,6 @@ export declare class TablePipeline {
|
|
|
88
88
|
setFeatureOptions(optionKey: string, value: any): void;
|
|
89
89
|
/** 获取 BaseTable 的 props,结果中包含 dataSource/columns/primaryKey/getRowProps 四个字段 */
|
|
90
90
|
getProps(this: TablePipeline): TableProps;
|
|
91
|
-
/**
|
|
92
|
-
* 清除范围选中内容
|
|
93
|
-
*/
|
|
94
|
-
clearRangeSelection(): void;
|
|
95
91
|
}
|
|
96
92
|
export declare function useTablePipeline(ctx?: Partial<TablePipelineCtx>): TablePipeline;
|
|
97
93
|
export {};
|
|
@@ -28,8 +28,6 @@ var _utils = require("../utils");
|
|
|
28
28
|
|
|
29
29
|
var _autoFill = require("./features/autoFill");
|
|
30
30
|
|
|
31
|
-
var _rangeSelection = require("./features/rangeSelection");
|
|
32
|
-
|
|
33
31
|
/**
|
|
34
32
|
* 表格数据处理流水线。TablePipeline 提供了表格数据处理过程中的一些上下方与工具方法,包括……
|
|
35
33
|
*
|
|
@@ -296,16 +294,11 @@ var TablePipeline = /*#__PURE__*/function () {
|
|
|
296
294
|
_this2.ref.current.domHelper = domHelper;
|
|
297
295
|
};
|
|
298
296
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
* 清除范围选中内容
|
|
303
|
-
*/
|
|
297
|
+
result.setRowHeightManager = function (rowHeightManager) {
|
|
298
|
+
_this2.ref.current.rowHeightManager = rowHeightManager;
|
|
299
|
+
};
|
|
304
300
|
|
|
305
|
-
|
|
306
|
-
key: "clearRangeSelection",
|
|
307
|
-
value: function clearRangeSelection() {
|
|
308
|
-
this.setStateAtKey(_rangeSelection.rangeSelectionKey, null);
|
|
301
|
+
return result;
|
|
309
302
|
}
|
|
310
303
|
}]);
|
|
311
304
|
return TablePipeline;
|