@kdcloudjs/table 1.0.0 → 1.0.3
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/LICENSE +1 -1
- package/README.md +34 -33
- package/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.css.map +1 -1
- package/dist/@kdcloudjs/table.js +6554 -3389
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +32 -24
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/es/_utils/hooks.js +1 -2
- package/es/_utils/numberUtil.js +3 -4
- package/es/locale/locale.js +1 -2
- package/es/table/base/calculations.js +3 -4
- package/es/table/base/empty.js +2 -2
- package/es/table/base/header.d.ts +6 -2
- package/es/table/base/header.js +41 -22
- package/es/table/base/helpers/SpanManager.js +1 -1
- package/es/table/base/helpers/TableDOMUtils.d.ts +3 -0
- package/es/table/base/helpers/TableDOMUtils.js +23 -5
- package/es/table/base/helpers/getRichVisibleRectsStream.d.ts +23 -0
- package/es/table/base/helpers/getRichVisibleRectsStream.js +216 -0
- package/es/table/base/html-table.d.ts +3 -1
- package/es/table/base/html-table.js +43 -26
- package/es/table/base/interfaces.d.ts +1 -0
- package/es/table/base/renderTemplates.d.ts +1 -0
- package/es/table/base/renderTemplates.js +344 -0
- package/es/table/base/styles.d.ts +24 -0
- package/es/table/base/styles.js +31 -9
- package/es/table/base/table.d.ts +12 -4
- package/es/table/base/table.js +183 -136
- package/es/table/base/utils.d.ts +6 -3
- package/es/table/base/utils.js +27 -6
- package/es/table/common-views.js +3 -3
- package/es/table/pipeline/features/__test__/treeMode.test.js +2 -1
- package/es/table/pipeline/features/autoFill.js +7 -1
- package/es/table/pipeline/features/columnDrag.js +168 -59
- package/es/table/pipeline/features/columnFilter.js +7 -9
- package/es/table/pipeline/features/columnResizeWidth.d.ts +3 -0
- package/es/table/pipeline/features/columnResizeWidth.js +11 -4
- package/es/table/pipeline/features/contextMenu.js +78 -31
- package/es/table/pipeline/features/filter/Filter.js +74 -37
- package/es/table/pipeline/features/index.d.ts +1 -0
- package/es/table/pipeline/features/index.js +2 -1
- package/es/table/pipeline/features/multiSelect.js +83 -79
- package/es/table/pipeline/features/rangeSelection.d.ts +10 -0
- package/es/table/pipeline/features/rangeSelection.js +231 -0
- package/es/table/pipeline/features/rowDetail.js +39 -16
- package/es/table/pipeline/features/rowGrouping.js +2 -1
- package/es/table/pipeline/features/singleSelect.js +4 -1
- package/es/table/pipeline/features/sort.js +2 -3
- package/es/table/pipeline/features/treeMode.js +4 -4
- package/es/table/pipeline/pipeline.d.ts +8 -0
- package/es/table/pipeline/pipeline.js +49 -5
- package/es/table/pivot/cross-table/buildCrossTable.js +1 -2
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +1 -2
- package/es/table/pivot/pivot-utils/builders.js +1 -2
- package/es/table/pivot/pivot-utils/convert-utils.js +5 -4
- package/es/table/transforms/autoWidth.js +1 -2
- package/es/table/transforms/sort.js +1 -2
- package/es/table/transforms/treeMode.js +1 -2
- package/es/table/utils/applyTransforms.js +1 -3
- package/es/table/utils/browserType.d.ts +6 -0
- package/es/table/utils/browserType.js +6 -0
- package/es/table/utils/buildTree.js +4 -5
- package/es/table/utils/collectNodes.js +1 -2
- package/es/table/utils/exportTableAsExcel.js +1 -2
- package/es/table/utils/getTreeDepth.js +1 -2
- package/es/table/utils/groupBy.js +1 -2
- package/es/table/utils/index.d.ts +1 -0
- package/es/table/utils/index.js +2 -1
- package/es/table/utils/layeredSort.js +5 -2
- package/es/table/utils/makeRecursiveMapper.js +4 -5
- package/es/table/utils/others.d.ts +1 -1
- package/es/table/utils/others.js +20 -14
- package/es/table/utils/traverseColumn.js +1 -2
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +4 -5
- package/es/table/utils/tree-data-helpers/TreeDataHelper.js +4 -5
- package/lib/_utils/formatUtil.js +1 -1
- package/lib/_utils/hooks.js +2 -4
- package/lib/_utils/numberUtil.js +7 -9
- package/lib/_utils/usePopper.js +9 -1
- package/lib/config-provider/configProvider.js +9 -1
- package/lib/config-provider/index.js +5 -5
- package/lib/locale/index.js +14 -6
- package/lib/locale/locale.js +2 -4
- package/lib/table/base/calculations.js +4 -6
- package/lib/table/base/empty.js +11 -3
- package/lib/table/base/header.d.ts +6 -2
- package/lib/table/base/header.js +39 -19
- package/lib/table/base/helpers/SpanManager.js +1 -1
- package/lib/table/base/helpers/TableDOMUtils.d.ts +3 -0
- package/lib/table/base/helpers/TableDOMUtils.js +21 -5
- package/lib/table/base/helpers/getRichVisibleRectsStream.d.ts +23 -0
- package/lib/table/base/helpers/getRichVisibleRectsStream.js +246 -0
- package/lib/table/base/html-table.d.ts +3 -1
- package/lib/table/base/html-table.js +44 -26
- package/lib/table/base/index.js +4 -4
- package/lib/table/base/interfaces.d.ts +1 -0
- package/lib/table/base/renderTemplates.d.ts +1 -0
- package/lib/table/base/renderTemplates.js +370 -0
- package/lib/table/base/styles.d.ts +24 -0
- package/lib/table/base/styles.js +42 -13
- package/lib/table/base/table.d.ts +12 -4
- package/lib/table/base/table.js +191 -137
- package/lib/table/base/utils.d.ts +6 -3
- package/lib/table/base/utils.js +47 -10
- package/lib/table/common-views.js +3 -3
- package/lib/table/pipeline/features/__test__/sort.test.js +5 -3
- package/lib/table/pipeline/features/__test__/treeMode.test.js +3 -1
- package/lib/table/pipeline/features/autoFill.js +9 -2
- package/lib/table/pipeline/features/columnDrag.js +168 -59
- package/lib/table/pipeline/features/columnFilter.js +6 -9
- package/lib/table/pipeline/features/columnResizeWidth.d.ts +3 -0
- package/lib/table/pipeline/features/columnResizeWidth.js +21 -5
- package/lib/table/pipeline/features/contextMenu.js +89 -32
- package/lib/table/pipeline/features/filter/DefaultFilterContent.js +10 -2
- package/lib/table/pipeline/features/filter/Filter.js +88 -37
- package/lib/table/pipeline/features/filter/FilterPanel.js +10 -2
- package/lib/table/pipeline/features/filter/index.js +4 -4
- package/lib/table/pipeline/features/index.d.ts +1 -0
- package/lib/table/pipeline/features/index.js +37 -27
- package/lib/table/pipeline/features/multiSelect.js +79 -75
- package/lib/table/pipeline/features/rangeSelection.d.ts +10 -0
- package/lib/table/pipeline/features/rangeSelection.js +256 -0
- package/lib/table/pipeline/features/rowDetail.js +42 -16
- package/lib/table/pipeline/features/rowGrouping.js +3 -1
- package/lib/table/pipeline/features/singleSelect.js +4 -1
- package/lib/table/pipeline/features/sort.js +2 -4
- package/lib/table/pipeline/features/treeMode.js +6 -6
- package/lib/table/pipeline/index.js +11 -3
- package/lib/table/pipeline/pipeline.d.ts +8 -0
- package/lib/table/pipeline/pipeline.js +50 -7
- package/lib/table/pivot/cross-table/buildCrossTable.js +1 -3
- package/lib/table/pivot/cross-table/index.js +4 -4
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +1 -3
- package/lib/table/pivot/pivot-utils/builders.js +2 -4
- package/lib/table/pivot/pivot-utils/convert-utils.js +7 -5
- package/lib/table/pivot/pivot-utils/index.js +4 -4
- package/lib/table/transforms/autoWidth.js +10 -4
- package/lib/table/transforms/columnResize.js +10 -2
- package/lib/table/transforms/index.js +32 -32
- package/lib/table/transforms/sort.js +10 -4
- package/lib/table/transforms/treeMode.js +9 -3
- package/lib/table/utils/applyTransforms.js +1 -5
- package/lib/table/utils/browserType.d.ts +6 -0
- package/lib/table/utils/browserType.js +13 -0
- package/lib/table/utils/buildTree.js +1 -3
- package/lib/table/utils/collectNodes.js +1 -3
- package/lib/table/utils/copyToClipboard.js +1 -1
- package/lib/table/utils/element.js +3 -3
- package/lib/table/utils/exportTableAsExcel.js +1 -3
- package/lib/table/utils/getTreeDepth.js +1 -3
- package/lib/table/utils/groupBy.js +1 -3
- package/lib/table/utils/index.d.ts +1 -0
- package/lib/table/utils/index.js +57 -49
- package/lib/table/utils/layeredSort.js +6 -2
- package/lib/table/utils/makeRecursiveMapper.js +1 -3
- package/lib/table/utils/others.d.ts +1 -1
- package/lib/table/utils/others.js +23 -18
- package/lib/table/utils/traverseColumn.js +1 -3
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +5 -7
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +5 -7
- package/package.json +7 -2
- package/dist/kd-table.css +0 -422
- package/dist/kd-table.css.map +0 -1
- package/dist/kd-table.js +0 -38578
- package/dist/kd-table.js.map +0 -1
- package/dist/kd-table.min.css +0 -9
- package/dist/kd-table.min.js +0 -208
- package/dist/kd-table.min.js.map +0 -1
- package/es/table/base/helpers/__test__/visible-part.test.d.ts +0 -1
- package/es/table/base/helpers/__test__/visible-part.test.js +0 -28
- package/es/table/base/helpers/visible-part.d.ts +0 -23
- package/es/table/base/helpers/visible-part.js +0 -58
- package/lib/table/base/helpers/__test__/visible-part.test.d.ts +0 -1
- package/lib/table/base/helpers/__test__/visible-part.test.js +0 -31
- package/lib/table/base/helpers/visible-part.d.ts +0 -23
- package/lib/table/base/helpers/visible-part.js +0 -72
|
@@ -4,9 +4,8 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
4
4
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
5
5
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
6
6
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
7
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
8
7
|
|
|
9
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
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; } } }; }
|
|
10
9
|
|
|
11
10
|
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); }
|
|
12
11
|
|
|
@@ -2,9 +2,8 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
2
2
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
3
3
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
4
4
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
6
5
|
|
|
7
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
6
|
+
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
7
|
|
|
9
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); }
|
|
10
9
|
|
|
@@ -2,9 +2,8 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
2
2
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
3
3
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
4
4
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
6
5
|
|
|
7
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
6
|
+
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
7
|
|
|
9
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); }
|
|
10
9
|
|
|
@@ -16,3 +16,4 @@ export { copyDataToClipboard, executeOnTempElement } from './copyToClipboard';
|
|
|
16
16
|
export { default as layeredFilter } from './layeredFilter';
|
|
17
17
|
export { getEventPath, isElementInEventPath, getTargetEleInEventPath, calculatePointerRelative, calculatePopupRelative, keepWithinBounds } from './element';
|
|
18
18
|
export { default as console } from './console';
|
|
19
|
+
export { browserType } from './browserType';
|
package/es/table/utils/index.js
CHANGED
|
@@ -15,4 +15,5 @@ export { default as traverseColumn } from './traverseColumn';
|
|
|
15
15
|
export { copyDataToClipboard, executeOnTempElement } from './copyToClipboard';
|
|
16
16
|
export { default as layeredFilter } from './layeredFilter';
|
|
17
17
|
export { getEventPath, isElementInEventPath, getTargetEleInEventPath, calculatePointerRelative, calculatePopupRelative, keepWithinBounds } from './element';
|
|
18
|
-
export { default as console } from './console';
|
|
18
|
+
export { default as console } from './console';
|
|
19
|
+
export { browserType } from './browserType';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
|
|
2
3
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
3
4
|
import isLeafNode from './isLeafNode';
|
|
4
5
|
/** 对树状结构的数据进行排序.
|
|
@@ -9,11 +10,13 @@ export default function layeredSort(array, compare) {
|
|
|
9
10
|
return dfs(array);
|
|
10
11
|
|
|
11
12
|
function dfs(rows) {
|
|
13
|
+
var _context;
|
|
14
|
+
|
|
12
15
|
if (!Array.isArray(array)) {
|
|
13
16
|
return array;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
return _mapInstanceProperty(rows).call(rows, function (row) {
|
|
19
|
+
return _sortInstanceProperty(_context = _mapInstanceProperty(rows).call(rows, function (row) {
|
|
17
20
|
if (isLeafNode(row)) {
|
|
18
21
|
return row;
|
|
19
22
|
}
|
|
@@ -21,6 +24,6 @@ export default function layeredSort(array, compare) {
|
|
|
21
24
|
return _extends(_extends({}, row), {
|
|
22
25
|
children: dfs(row.children)
|
|
23
26
|
});
|
|
24
|
-
}).
|
|
27
|
+
})).call(_context, compare);
|
|
25
28
|
}
|
|
26
29
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
2
|
-
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
3
|
-
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
4
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
5
1
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
6
2
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
7
3
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
4
|
+
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
5
|
+
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
6
|
+
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
8
7
|
|
|
9
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
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; } } }; }
|
|
10
9
|
|
|
11
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); }
|
|
12
11
|
|
|
@@ -12,5 +12,5 @@ interface treeItem {
|
|
|
12
12
|
children?: any[];
|
|
13
13
|
code?: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function findByTree<T extends treeItem, U>(array: T[],
|
|
15
|
+
export declare function findByTree<T extends treeItem, U>(array: T[], condition: (item: T, index: number) => boolean): T;
|
|
16
16
|
export {};
|
package/es/table/utils/others.js
CHANGED
|
@@ -2,17 +2,16 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
2
2
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
3
3
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
4
4
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
6
5
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
7
6
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
8
7
|
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
9
8
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
10
9
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
11
|
-
import
|
|
10
|
+
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
|
|
12
11
|
|
|
13
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
12
|
+
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; } } }; }
|
|
14
13
|
|
|
15
|
-
function _unsupportedIterableToArray(o, minLen) { var
|
|
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); }
|
|
16
15
|
|
|
17
16
|
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; }
|
|
18
17
|
|
|
@@ -64,17 +63,24 @@ export function always(value) {
|
|
|
64
63
|
return value;
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
|
-
export function findByTree(array,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
export function findByTree(array, condition) {
|
|
67
|
+
var index = 0;
|
|
68
|
+
var len = array.length;
|
|
69
|
+
var stack = [];
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
while (index < len || stack.length) {
|
|
72
|
+
var item = array[index++] || stack.pop();
|
|
73
|
+
|
|
74
|
+
if (condition(item, index)) {
|
|
75
|
+
return item;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
if (item.children) {
|
|
79
|
+
var _context;
|
|
80
|
+
|
|
81
|
+
_spliceInstanceProperty(stack).apply(stack, _concatInstanceProperty(_context = [0, 0]).call(_context, _toConsumableArray(item.children)));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return null;
|
|
80
86
|
}
|
|
@@ -2,11 +2,10 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
2
2
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
3
3
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
4
4
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
6
5
|
import _toConsumableArray from "@babel/runtime-corejs3/helpers/toConsumableArray";
|
|
7
6
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
8
7
|
|
|
9
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
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; } } }; }
|
|
10
9
|
|
|
11
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); }
|
|
12
11
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
2
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
3
3
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
4
4
|
|
|
5
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
5
|
+
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; } } }; }
|
|
6
6
|
|
|
7
7
|
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); }
|
|
8
8
|
|
|
@@ -14,15 +14,14 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
14
14
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
15
15
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
16
16
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
17
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
18
17
|
import isLeafNode from '../isLeafNode';
|
|
19
18
|
import { arrayUtils } from '../others';
|
|
20
19
|
|
|
21
|
-
var Wrapper = function Wrapper(input) {
|
|
20
|
+
var Wrapper = /*#__PURE__*/_createClass(function Wrapper(input) {
|
|
22
21
|
_classCallCheck(this, Wrapper);
|
|
23
22
|
|
|
24
23
|
_extends(this, input);
|
|
25
|
-
};
|
|
24
|
+
});
|
|
26
25
|
|
|
27
26
|
var StrictTreeDataHelper = /*#__PURE__*/function () {
|
|
28
27
|
function StrictTreeDataHelper(opts) {
|
|
@@ -2,12 +2,11 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
|
2
2
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
3
3
|
import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
|
|
4
4
|
import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
|
|
5
|
-
import _getIterator from "@babel/runtime-corejs3/core-js/get-iterator";
|
|
6
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
7
5
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
6
|
+
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
8
7
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
9
8
|
|
|
10
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
9
|
+
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; } } }; }
|
|
11
10
|
|
|
12
11
|
function _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context3 = Object.prototype.toString.call(o)).call(_context3, 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); }
|
|
13
12
|
|
|
@@ -21,11 +20,11 @@ import isLeafNode from '../isLeafNode';
|
|
|
21
20
|
import { arrayUtils } from '../others';
|
|
22
21
|
import console from '../console';
|
|
23
22
|
|
|
24
|
-
var Wrapper = function Wrapper(input) {
|
|
23
|
+
var Wrapper = /*#__PURE__*/_createClass(function Wrapper(input) {
|
|
25
24
|
_classCallCheck(this, Wrapper);
|
|
26
25
|
|
|
27
26
|
_extends(this, input);
|
|
28
|
-
};
|
|
27
|
+
});
|
|
29
28
|
|
|
30
29
|
var TreeDataHelper = /*#__PURE__*/function () {
|
|
31
30
|
function TreeDataHelper(opts) {
|
package/lib/_utils/formatUtil.js
CHANGED
|
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.formatNumber = formatNumber;
|
|
9
8
|
exports.formatEditNumber = formatEditNumber;
|
|
9
|
+
exports.formatNumber = formatNumber;
|
|
10
10
|
|
|
11
11
|
var _getOwnPropertySymbols = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"));
|
|
12
12
|
|
package/lib/_utils/hooks.js
CHANGED
|
@@ -8,15 +8,13 @@ var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
|
8
8
|
|
|
9
9
|
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
10
10
|
|
|
11
|
-
var _getIterator = require("@babel/runtime-corejs3/core-js/get-iterator");
|
|
12
|
-
|
|
13
11
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
14
12
|
|
|
15
13
|
Object.defineProperty(exports, "__esModule", {
|
|
16
14
|
value: true
|
|
17
15
|
});
|
|
18
|
-
exports.useOnClickOutside = useOnClickOutside;
|
|
19
16
|
exports.useMergedState = useMergedState;
|
|
17
|
+
exports.useOnClickOutside = useOnClickOutside;
|
|
20
18
|
exports.usePrevious = usePrevious;
|
|
21
19
|
exports.useResizeObserver = useResizeObserver;
|
|
22
20
|
|
|
@@ -30,7 +28,7 @@ var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-po
|
|
|
30
28
|
|
|
31
29
|
var _devwarning = _interopRequireDefault(require("./devwarning"));
|
|
32
30
|
|
|
33
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
31
|
+
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; } } }; }
|
|
34
32
|
|
|
35
33
|
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); }
|
|
36
34
|
|
package/lib/_utils/numberUtil.js
CHANGED
|
@@ -5,19 +5,17 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
9
|
-
exports.supplementZero = supplementZero;
|
|
10
|
-
exports.serialization = serialization;
|
|
8
|
+
exports.exponentToFloat = exponentToFloat;
|
|
11
9
|
exports.getMaxNumberByPrecision = getMaxNumberByPrecision;
|
|
12
10
|
exports.isExp = isExp;
|
|
13
|
-
exports.
|
|
11
|
+
exports.serialization = serialization;
|
|
12
|
+
exports.supplementZero = supplementZero;
|
|
13
|
+
exports.toFixed = toFixed;
|
|
14
14
|
|
|
15
15
|
var _isNan = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/number/is-nan"));
|
|
16
16
|
|
|
17
17
|
var _slice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/slice"));
|
|
18
18
|
|
|
19
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
20
|
-
|
|
21
19
|
var _fill = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/fill"));
|
|
22
20
|
|
|
23
21
|
/**
|
|
@@ -151,12 +149,12 @@ function serialization(strNumber) {
|
|
|
151
149
|
|
|
152
150
|
|
|
153
151
|
function getMaxNumberByPrecision(integerPrecision, decimalPrecision) {
|
|
154
|
-
var _context2, _context3
|
|
152
|
+
var _context2, _context3;
|
|
155
153
|
|
|
156
|
-
var integerString = (0,
|
|
154
|
+
var integerString = (0, _fill.default)(_context2 = Array(integerPrecision)).call(_context2, '9').reduce(function (res, value) {
|
|
157
155
|
return res += value;
|
|
158
156
|
}, '');
|
|
159
|
-
return decimalPrecision <= 0 ? Number(integerString) : Number((0,
|
|
157
|
+
return decimalPrecision <= 0 ? Number(integerString) : Number((0, _fill.default)(_context3 = Array(decimalPrecision)).call(_context3, '9').reduce(function (res, value) {
|
|
160
158
|
return res += value;
|
|
161
159
|
}, integerString + '.'));
|
|
162
160
|
}
|
package/lib/_utils/usePopper.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
6
|
+
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4
8
|
|
|
5
9
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
10
|
|
|
@@ -35,6 +39,10 @@ var _devwarning = _interopRequireDefault(require("../_utils/devwarning"));
|
|
|
35
39
|
|
|
36
40
|
var _hooks = require("../_utils/hooks");
|
|
37
41
|
|
|
42
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
38
46
|
var Placements = (0, _type.tuple)('top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom');
|
|
39
47
|
exports.Placements = Placements;
|
|
40
48
|
var Triggers = (0, _type.tuple)('hover', 'focus', 'click', 'contextMenu');
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
6
|
+
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4
8
|
|
|
5
9
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
10
|
|
|
@@ -19,6 +23,10 @@ var _defaultConfig = _interopRequireDefault(require("./defaultConfig"));
|
|
|
19
23
|
|
|
20
24
|
var _index = _interopRequireWildcard(require("../locale/index"));
|
|
21
25
|
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
22
30
|
/**
|
|
23
31
|
* 对外暴露用于注入全局配置属性的Context.Provider
|
|
24
32
|
*/
|
|
@@ -5,25 +5,25 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "ConfigContext", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
11
|
-
return
|
|
11
|
+
return _ConfigContext.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
14
|
+
Object.defineProperty(exports, "compDefaultProps", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function get() {
|
|
17
|
-
return
|
|
17
|
+
return _compDefaultProps.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
+
exports.default = void 0;
|
|
20
21
|
Object.defineProperty(exports, "defaultConfig", {
|
|
21
22
|
enumerable: true,
|
|
22
23
|
get: function get() {
|
|
23
24
|
return _defaultConfig.default;
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
|
-
exports.default = void 0;
|
|
27
27
|
|
|
28
28
|
var _configProvider = _interopRequireDefault(require("./configProvider"));
|
|
29
29
|
|
package/lib/locale/index.js
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
6
|
+
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4
8
|
|
|
5
9
|
Object.defineProperty(exports, "__esModule", {
|
|
6
10
|
value: true
|
|
7
11
|
});
|
|
8
|
-
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
Object.defineProperty(exports, "getCompLangMsg", {
|
|
9
14
|
enumerable: true,
|
|
10
15
|
get: function get() {
|
|
11
|
-
return _locale.
|
|
16
|
+
return _locale.getCompLangMsg;
|
|
12
17
|
}
|
|
13
18
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
19
|
+
Object.defineProperty(exports, "getLangMsg", {
|
|
15
20
|
enumerable: true,
|
|
16
21
|
get: function get() {
|
|
17
|
-
return _locale.
|
|
22
|
+
return _locale.getLangMsg;
|
|
18
23
|
}
|
|
19
24
|
});
|
|
20
|
-
exports.default = void 0;
|
|
21
25
|
|
|
22
26
|
var _locale = _interopRequireWildcard(require("./locale"));
|
|
23
27
|
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
24
32
|
var _default = _locale.default;
|
|
25
33
|
exports.default = _default;
|
package/lib/locale/locale.js
CHANGED
|
@@ -8,14 +8,12 @@ var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
|
8
8
|
|
|
9
9
|
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
10
10
|
|
|
11
|
-
var _getIterator = require("@babel/runtime-corejs3/core-js/get-iterator");
|
|
12
|
-
|
|
13
11
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
14
12
|
|
|
15
13
|
Object.defineProperty(exports, "__esModule", {
|
|
16
14
|
value: true
|
|
17
15
|
});
|
|
18
|
-
exports.
|
|
16
|
+
exports.getLangMsg = exports.getCompLangMsg = exports.default = void 0;
|
|
19
17
|
|
|
20
18
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
21
19
|
|
|
@@ -33,7 +31,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
33
31
|
|
|
34
32
|
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
35
33
|
|
|
36
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
34
|
+
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; } } }; }
|
|
37
35
|
|
|
38
36
|
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); }
|
|
39
37
|
|
|
@@ -8,15 +8,13 @@ var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
|
8
8
|
|
|
9
9
|
var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
|
|
10
10
|
|
|
11
|
-
var _getIterator = require("@babel/runtime-corejs3/core-js/get-iterator");
|
|
12
|
-
|
|
13
11
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
14
12
|
|
|
15
13
|
Object.defineProperty(exports, "__esModule", {
|
|
16
14
|
value: true
|
|
17
15
|
});
|
|
18
|
-
exports.getLeftNestedLockCount = getLeftNestedLockCount;
|
|
19
16
|
exports.calculateRenderInfo = calculateRenderInfo;
|
|
17
|
+
exports.getLeftNestedLockCount = getLeftNestedLockCount;
|
|
20
18
|
|
|
21
19
|
var _flat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/flat"));
|
|
22
20
|
|
|
@@ -40,7 +38,7 @@ var _utils = require("../utils");
|
|
|
40
38
|
|
|
41
39
|
var _utils2 = require("./utils");
|
|
42
40
|
|
|
43
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it
|
|
41
|
+
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; } } }; }
|
|
44
42
|
|
|
45
43
|
function _unsupportedIterableToArray(o, minLen) { var _context10; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty2(_context10 = Object.prototype.toString.call(o)).call(_context10, 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); }
|
|
46
44
|
|
|
@@ -205,7 +203,7 @@ function getHorizontalRenderRange(_ref) {
|
|
|
205
203
|
while (leftIndex + centerCount < flat.center.length) {
|
|
206
204
|
var _col = flat.center[leftIndex + centerCount];
|
|
207
205
|
|
|
208
|
-
if (
|
|
206
|
+
if (centerRenderWidth < minCenterRenderWidth) {
|
|
209
207
|
centerRenderWidth += _col.width;
|
|
210
208
|
centerCount += 1;
|
|
211
209
|
} else {
|
|
@@ -220,7 +218,7 @@ function getHorizontalRenderRange(_ref) {
|
|
|
220
218
|
return {
|
|
221
219
|
leftIndex: leftIndex,
|
|
222
220
|
leftBlank: leftBlank,
|
|
223
|
-
rightIndex: leftIndex + centerCount
|
|
221
|
+
rightIndex: leftIndex + centerCount,
|
|
224
222
|
rightBlank: rightBlank
|
|
225
223
|
};
|
|
226
224
|
} // 一顿计算,将表格本次渲染所需要的数据都给算出来(代码写得有点乱,有较大优化空间)
|
package/lib/table/base/empty.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
6
|
+
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
4
8
|
|
|
5
9
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
10
|
|
|
@@ -17,6 +21,10 @@ var _colgroup = require("./colgroup");
|
|
|
17
21
|
|
|
18
22
|
var _styles = require("./styles");
|
|
19
23
|
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
20
28
|
var DefaultEmptyContent = /*#__PURE__*/_react.default.memo(function () {
|
|
21
29
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
22
30
|
alt: "empty-image",
|
|
@@ -39,10 +47,10 @@ function EmptyHtmlTable(_ref) {
|
|
|
39
47
|
}, /*#__PURE__*/_react.default.createElement(_colgroup.Colgroup, {
|
|
40
48
|
descriptors: descriptors
|
|
41
49
|
}), /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", {
|
|
42
|
-
className: (0, _classnames.default)(_styles.Classes.tableRow,
|
|
50
|
+
className: (0, _classnames.default)(_styles.Classes.tableRow, _styles.Classes.first, _styles.Classes.last, 'no-hover'),
|
|
43
51
|
"data-rowindex": 0
|
|
44
52
|
}, /*#__PURE__*/_react.default.createElement("td", {
|
|
45
|
-
className: (0, _classnames.default)(_styles.Classes.tableCell,
|
|
53
|
+
className: (0, _classnames.default)(_styles.Classes.tableCell, _styles.Classes.first, _styles.Classes.last),
|
|
46
54
|
colSpan: descriptors.length,
|
|
47
55
|
style: {
|
|
48
56
|
height: emptyCellHeight !== null && emptyCellHeight !== void 0 ? emptyCellHeight : 200
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RenderInfo } from './interfaces';
|
|
3
|
-
|
|
3
|
+
interface TableHeaderProps {
|
|
4
4
|
info: RenderInfo;
|
|
5
|
-
|
|
5
|
+
theaderPosition?: 'left' | 'center' | 'right';
|
|
6
|
+
rowCount?: number;
|
|
7
|
+
}
|
|
8
|
+
export default function TableHeader({ info, theaderPosition, rowCount: _rowCount }: TableHeaderProps): JSX.Element;
|
|
9
|
+
export {};
|