@hi-ui/table 4.3.2 → 4.3.4
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/CHANGELOG.md +74 -0
- package/lib/cjs/BaseTable.js +31 -21
- package/lib/cjs/ColGroupContent.js +12 -2
- package/lib/cjs/SettingDrawer.js +23 -12
- package/lib/cjs/Table.js +27 -14
- package/lib/cjs/TableAdvancedFilter.js +25 -13
- package/lib/cjs/TableBody.js +21 -11
- package/lib/cjs/TableCell.js +18 -8
- package/lib/cjs/TableColumnMenu.js +26 -15
- package/lib/cjs/TableEmbedRow.js +15 -4
- package/lib/cjs/TableHeader.js +13 -3
- package/lib/cjs/TableRow.js +23 -13
- package/lib/cjs/TableSettingMenu.js +26 -15
- package/lib/cjs/TbodyContent.js +19 -9
- package/lib/cjs/TheadContent.js +18 -8
- package/lib/cjs/_virtual/index.js +3 -0
- package/lib/cjs/_virtual/index2.js +3 -0
- package/lib/cjs/_virtual/react-is.development.js +3 -0
- package/lib/cjs/_virtual/react-is.production.min.js +3 -0
- package/lib/cjs/context.js +3 -0
- package/lib/cjs/hooks/use-async-switch.js +14 -4
- package/lib/cjs/hooks/use-check.js +15 -5
- package/lib/cjs/hooks/use-col-hidden.js +3 -0
- package/lib/cjs/hooks/use-col-set.js +3 -0
- package/lib/cjs/hooks/use-col-sorter.js +3 -0
- package/lib/cjs/hooks/use-col-width.js +17 -7
- package/lib/cjs/hooks/use-colgroup.js +13 -3
- package/lib/cjs/hooks/use-drag.js +11 -1
- package/lib/cjs/hooks/use-embed-expand.js +14 -3
- package/lib/cjs/hooks/use-expand.js +3 -0
- package/lib/cjs/hooks/use-pagination.js +17 -6
- package/lib/cjs/hooks/use-queue.js +3 -0
- package/lib/cjs/icons/index.js +14 -4
- package/lib/cjs/node_modules/rc-resize-observer/es/index.js +19 -7
- package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +8 -1
- package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Dom/findDOMNode.js +8 -1
- package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +11 -1
- package/lib/cjs/node_modules/rc-util/es/Dom/findDOMNode.js +8 -1
- package/lib/cjs/node_modules/rc-util/es/hooks/useLayoutEffect.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/Filler.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/Item.js +6 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/List.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/ScrollBar.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useChildren.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useDiffItem.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useHeights.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useScrollTo.js +3 -2
- package/lib/cjs/node_modules/rc-virtual-list/es/utils/algorithmUtil.js +5 -0
- package/lib/cjs/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +74 -75
- package/lib/cjs/packages/hooks/use-merge-refs/lib/esm/index.js +3 -0
- package/lib/cjs/packages/ui/scrollbar/lib/esm/Scrollbar.js +12 -2
- package/lib/cjs/packages/ui/scrollbar/lib/esm/styles/index.scss.js +8 -1
- package/lib/cjs/packages/ui/scrollbar/lib/esm/utils/index.js +4 -0
- package/lib/cjs/use-table.js +18 -8
- package/lib/cjs/utils/index.js +3 -0
- package/lib/esm/BaseTable.js +7 -7
- package/lib/esm/Table.js +8 -8
- package/lib/esm/TableAdvancedFilter.js +5 -5
- package/lib/esm/TableBody.js +3 -3
- package/lib/esm/TableColumnMenu.js +3 -3
- package/lib/esm/TableEmbedRow.js +2 -2
- package/lib/esm/TableRow.js +2 -2
- package/lib/esm/TbodyContent.js +4 -4
- package/lib/esm/TheadContent.js +4 -4
- package/lib/esm/node_modules/rc-virtual-list/es/index.js +1 -1
- package/lib/esm/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/lib/esm/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/lib/esm/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +74 -75
- package/package.json +33 -33
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
13
|
Object.defineProperty(exports, '__esModule', {
|
|
13
14
|
value: true
|
|
14
15
|
});
|
|
@@ -23,7 +24,13 @@ var toArray = require('../node_modules/rc-util/es/Children/toArray.js');
|
|
|
23
24
|
var warning = require('../node_modules/rc-util/es/warning.js');
|
|
24
25
|
var ref = require('../node_modules/rc-util/es/ref.js');
|
|
25
26
|
var ResizeObserver_es = require('../../resize-observer-polyfill/dist/ResizeObserver.es.js');
|
|
26
|
-
function
|
|
27
|
+
function _interopDefaultLegacy(e) {
|
|
28
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
29
|
+
'default': e
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _interopNamespace(e) {
|
|
33
|
+
if (e && e.__esModule) return e;
|
|
27
34
|
var n = Object.create(null);
|
|
28
35
|
if (e) {
|
|
29
36
|
Object.keys(e).forEach(function (k) {
|
|
@@ -41,15 +48,20 @@ function _interopNamespaceDefault(e) {
|
|
|
41
48
|
n["default"] = e;
|
|
42
49
|
return Object.freeze(n);
|
|
43
50
|
}
|
|
44
|
-
var
|
|
51
|
+
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
52
|
+
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
53
|
+
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
54
|
+
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
55
|
+
var _createSuper__default = /*#__PURE__*/_interopDefaultLegacy(_createSuper);
|
|
56
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
45
57
|
var INTERNAL_PREFIX_KEY = 'rc-observer-key'; // Still need to be compatible with React 15, we use class component here
|
|
46
58
|
|
|
47
59
|
var ReactResizeObserver = /*#__PURE__*/function (_React$Component) {
|
|
48
|
-
|
|
49
|
-
var _super =
|
|
60
|
+
_inherits__default["default"](ReactResizeObserver, _React$Component);
|
|
61
|
+
var _super = _createSuper__default["default"](ReactResizeObserver);
|
|
50
62
|
function ReactResizeObserver() {
|
|
51
63
|
var _this;
|
|
52
|
-
|
|
64
|
+
_classCallCheck__default["default"](this, ReactResizeObserver);
|
|
53
65
|
_this = _super.apply(this, arguments);
|
|
54
66
|
_this.resizeObserver = null;
|
|
55
67
|
_this.childNode = null;
|
|
@@ -87,7 +99,7 @@ var ReactResizeObserver = /*#__PURE__*/function (_React$Component) {
|
|
|
87
99
|
if (onResize) {
|
|
88
100
|
// defer the callback but not defer to next frame
|
|
89
101
|
Promise.resolve().then(function () {
|
|
90
|
-
onResize(
|
|
102
|
+
onResize(_objectSpread__default["default"](_objectSpread__default["default"]({}, size), {}, {
|
|
91
103
|
offsetWidth: offsetWidth,
|
|
92
104
|
offsetHeight: offsetHeight
|
|
93
105
|
}), target);
|
|
@@ -100,7 +112,7 @@ var ReactResizeObserver = /*#__PURE__*/function (_React$Component) {
|
|
|
100
112
|
};
|
|
101
113
|
return _this;
|
|
102
114
|
}
|
|
103
|
-
|
|
115
|
+
_createClass__default["default"](ReactResizeObserver, [{
|
|
104
116
|
key: "componentDidMount",
|
|
105
117
|
value: function componentDidMount() {
|
|
106
118
|
this.onComponentUpdated();
|
|
@@ -9,16 +9,23 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
13
|
Object.defineProperty(exports, '__esModule', {
|
|
13
14
|
value: true
|
|
14
15
|
});
|
|
15
16
|
var React = require('react');
|
|
16
17
|
require('../../../../../react-is/index.js');
|
|
17
18
|
var index = require('../../../../../../_virtual/index2.js');
|
|
19
|
+
function _interopDefaultLegacy(e) {
|
|
20
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
21
|
+
'default': e
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
25
|
function toArray(children) {
|
|
19
26
|
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
20
27
|
var ret = [];
|
|
21
|
-
|
|
28
|
+
React__default["default"].Children.forEach(children, function (child) {
|
|
22
29
|
if ((child === undefined || child === null) && !option.keepEmpty) {
|
|
23
30
|
return;
|
|
24
31
|
}
|
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
13
|
Object.defineProperty(exports, '__esModule', {
|
|
13
14
|
value: true
|
|
14
15
|
});
|
|
15
16
|
var ReactDOM = require('react-dom');
|
|
17
|
+
function _interopDefaultLegacy(e) {
|
|
18
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
19
|
+
'default': e
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
16
23
|
|
|
17
24
|
/**
|
|
18
25
|
* Return if a node is a DOM node. Else will return by `findDOMNode`
|
|
@@ -22,6 +29,6 @@ function findDOMNode(node) {
|
|
|
22
29
|
if (node instanceof HTMLElement) {
|
|
23
30
|
return node;
|
|
24
31
|
}
|
|
25
|
-
return
|
|
32
|
+
return ReactDOM__default["default"].findDOMNode(node);
|
|
26
33
|
}
|
|
27
34
|
exports["default"] = findDOMNode;
|
|
@@ -9,13 +9,23 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof2 = require("@babel/runtime/helpers/typeof");
|
|
13
|
+
Object.defineProperty(exports, '__esModule', {
|
|
14
|
+
value: true
|
|
15
|
+
});
|
|
12
16
|
var _typeof = require('@babel/runtime/helpers/esm/typeof');
|
|
13
17
|
require('../../../../react-is/index.js');
|
|
14
18
|
var index = require('../../../../../_virtual/index2.js');
|
|
19
|
+
function _interopDefaultLegacy(e) {
|
|
20
|
+
return e && _typeof2(e) === 'object' && 'default' in e ? e : {
|
|
21
|
+
'default': e
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
|
|
15
25
|
function fillRef(ref, node) {
|
|
16
26
|
if (typeof ref === 'function') {
|
|
17
27
|
ref(node);
|
|
18
|
-
} else if (
|
|
28
|
+
} else if (_typeof__default["default"](ref) === 'object' && ref && 'current' in ref) {
|
|
19
29
|
ref.current = node;
|
|
20
30
|
}
|
|
21
31
|
}
|
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
13
|
Object.defineProperty(exports, '__esModule', {
|
|
13
14
|
value: true
|
|
14
15
|
});
|
|
15
16
|
var ReactDOM = require('react-dom');
|
|
17
|
+
function _interopDefaultLegacy(e) {
|
|
18
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
19
|
+
'default': e
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
16
23
|
|
|
17
24
|
/**
|
|
18
25
|
* Return if a node is a DOM node. Else will return by `findDOMNode`
|
|
@@ -22,6 +29,6 @@ function findDOMNode(node) {
|
|
|
22
29
|
if (node instanceof HTMLElement) {
|
|
23
30
|
return node;
|
|
24
31
|
}
|
|
25
|
-
return
|
|
32
|
+
return ReactDOM__default["default"].findDOMNode(node);
|
|
26
33
|
}
|
|
27
34
|
exports["default"] = findDOMNode;
|
|
@@ -14,7 +14,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
14
14
|
});
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var canUseDom = require('../Dom/canUseDom.js');
|
|
17
|
-
function
|
|
17
|
+
function _interopNamespace(e) {
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
18
19
|
var n = Object.create(null);
|
|
19
20
|
if (e) {
|
|
20
21
|
Object.keys(e).forEach(function (k) {
|
|
@@ -32,7 +33,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
33
|
n["default"] = e;
|
|
33
34
|
return Object.freeze(n);
|
|
34
35
|
}
|
|
35
|
-
var React__namespace = /*#__PURE__*/
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
@@ -15,7 +15,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var index = require('../../rc-resize-observer/es/index.js');
|
|
17
17
|
var index$1 = require('../../classnames/index.js');
|
|
18
|
-
function
|
|
18
|
+
function _interopNamespace(e) {
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
19
20
|
var n = Object.create(null);
|
|
20
21
|
if (e) {
|
|
21
22
|
Object.keys(e).forEach(function (k) {
|
|
@@ -33,7 +34,7 @@ function _interopNamespaceDefault(e) {
|
|
|
33
34
|
n["default"] = e;
|
|
34
35
|
return Object.freeze(n);
|
|
35
36
|
}
|
|
36
|
-
var React__namespace = /*#__PURE__*/
|
|
37
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
38
|
function ownKeys(object, enumerableOnly) {
|
|
38
39
|
var keys = Object.keys(object);
|
|
39
40
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
Object.defineProperty(exports, '__esModule', {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
12
15
|
var React = require('react');
|
|
13
|
-
function
|
|
16
|
+
function _interopNamespace(e) {
|
|
17
|
+
if (e && e.__esModule) return e;
|
|
14
18
|
var n = Object.create(null);
|
|
15
19
|
if (e) {
|
|
16
20
|
Object.keys(e).forEach(function (k) {
|
|
@@ -28,7 +32,7 @@ function _interopNamespaceDefault(e) {
|
|
|
28
32
|
n["default"] = e;
|
|
29
33
|
return Object.freeze(n);
|
|
30
34
|
}
|
|
31
|
-
var React__namespace = /*#__PURE__*/
|
|
35
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
32
36
|
function Item(_ref) {
|
|
33
37
|
var children = _ref.children,
|
|
34
38
|
setRef = _ref.setRef;
|
|
@@ -24,7 +24,8 @@ var useFrameWheel = require('./hooks/useFrameWheel.js');
|
|
|
24
24
|
var useMobileTouchMove = require('./hooks/useMobileTouchMove.js');
|
|
25
25
|
var useOriginScroll = require('./hooks/useOriginScroll.js');
|
|
26
26
|
var useLayoutEffect = require('../../rc-util/es/hooks/useLayoutEffect.js');
|
|
27
|
-
function
|
|
27
|
+
function _interopNamespace(e) {
|
|
28
|
+
if (e && e.__esModule) return e;
|
|
28
29
|
var n = Object.create(null);
|
|
29
30
|
if (e) {
|
|
30
31
|
Object.keys(e).forEach(function (k) {
|
|
@@ -42,7 +43,7 @@ function _interopNamespaceDefault(e) {
|
|
|
42
43
|
n["default"] = e;
|
|
43
44
|
return Object.freeze(n);
|
|
44
45
|
}
|
|
45
|
-
var React__namespace = /*#__PURE__*/
|
|
46
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
46
47
|
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "component", "onScroll", "onVisibleChange"];
|
|
47
48
|
function _extends() {
|
|
48
49
|
_extends = Object.assign || function (target) {
|
|
@@ -15,7 +15,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var index = require('../../classnames/index.js');
|
|
17
17
|
var raf = require('../../rc-util/es/raf.js');
|
|
18
|
-
function
|
|
18
|
+
function _interopNamespace(e) {
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
19
20
|
var n = Object.create(null);
|
|
20
21
|
if (e) {
|
|
21
22
|
Object.keys(e).forEach(function (k) {
|
|
@@ -33,7 +34,7 @@ function _interopNamespaceDefault(e) {
|
|
|
33
34
|
n["default"] = e;
|
|
34
35
|
return Object.freeze(n);
|
|
35
36
|
}
|
|
36
|
-
var React__namespace = /*#__PURE__*/
|
|
37
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
38
|
function _typeof(obj) {
|
|
38
39
|
"@babel/helpers - typeof";
|
|
39
40
|
|
|
@@ -14,7 +14,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
14
14
|
});
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var Item = require('../Item.js');
|
|
17
|
-
function
|
|
17
|
+
function _interopNamespace(e) {
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
18
19
|
var n = Object.create(null);
|
|
19
20
|
if (e) {
|
|
20
21
|
Object.keys(e).forEach(function (k) {
|
|
@@ -32,7 +33,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
33
|
n["default"] = e;
|
|
33
34
|
return Object.freeze(n);
|
|
34
35
|
}
|
|
35
|
-
var React__namespace = /*#__PURE__*/
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
function useChildren(list, startIndex, endIndex, setNodeRef, renderFunc, _ref) {
|
|
37
38
|
var getKey = _ref.getKey;
|
|
38
39
|
return list.slice(startIndex, endIndex + 1).map(function (item, index) {
|
|
@@ -14,7 +14,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
14
14
|
});
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var algorithmUtil = require('../utils/algorithmUtil.js');
|
|
17
|
-
function
|
|
17
|
+
function _interopNamespace(e) {
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
18
19
|
var n = Object.create(null);
|
|
19
20
|
if (e) {
|
|
20
21
|
Object.keys(e).forEach(function (k) {
|
|
@@ -32,7 +33,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
33
|
n["default"] = e;
|
|
33
34
|
return Object.freeze(n);
|
|
34
35
|
}
|
|
35
|
-
var React__namespace = /*#__PURE__*/
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
function _slicedToArray(arr, i) {
|
|
37
38
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
38
39
|
}
|
|
@@ -16,7 +16,8 @@ var React = require('react');
|
|
|
16
16
|
var findDOMNode = require('../../../rc-util/es/Dom/findDOMNode.js');
|
|
17
17
|
var raf = require('../../../rc-util/es/raf.js');
|
|
18
18
|
var CacheMap = require('../utils/CacheMap.js');
|
|
19
|
-
function
|
|
19
|
+
function _interopNamespace(e) {
|
|
20
|
+
if (e && e.__esModule) return e;
|
|
20
21
|
var n = Object.create(null);
|
|
21
22
|
if (e) {
|
|
22
23
|
Object.keys(e).forEach(function (k) {
|
|
@@ -34,7 +35,7 @@ function _interopNamespaceDefault(e) {
|
|
|
34
35
|
n["default"] = e;
|
|
35
36
|
return Object.freeze(n);
|
|
36
37
|
}
|
|
37
|
-
var React__namespace = /*#__PURE__*/
|
|
38
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
38
39
|
function _slicedToArray(arr, i) {
|
|
39
40
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
40
41
|
}
|
|
@@ -14,7 +14,8 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
14
14
|
});
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var raf = require('../../../rc-util/es/raf.js');
|
|
17
|
-
function
|
|
17
|
+
function _interopNamespace(e) {
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
18
19
|
var n = Object.create(null);
|
|
19
20
|
if (e) {
|
|
20
21
|
Object.keys(e).forEach(function (k) {
|
|
@@ -32,7 +33,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
33
|
n["default"] = e;
|
|
33
34
|
return Object.freeze(n);
|
|
34
35
|
}
|
|
35
|
-
var React__namespace = /*#__PURE__*/
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
36
37
|
function _typeof(obj) {
|
|
37
38
|
"@babel/helpers - typeof";
|
|
38
39
|
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
Object.defineProperty(exports, '__esModule', {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
|
|
12
16
|
/**
|
|
13
17
|
* Get index with specific start index one by one. e.g.
|
|
14
18
|
* min: 3, max: 9, start: 6
|
|
@@ -26,6 +30,7 @@
|
|
|
26
30
|
* We assume that 2 list has only 1 item diff and others keeping the order.
|
|
27
31
|
* So we can use dichotomy algorithm to find changed one.
|
|
28
32
|
*/
|
|
33
|
+
|
|
29
34
|
function findListDiffIndex(originList, targetList, getKey) {
|
|
30
35
|
var originLen = originList.length;
|
|
31
36
|
var targetLen = targetList.length;
|
|
@@ -42,83 +42,82 @@ var MapShim = function () {
|
|
|
42
42
|
});
|
|
43
43
|
return result;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @returns {boolean}
|
|
52
|
-
*/
|
|
53
|
-
get: function get() {
|
|
54
|
-
return this.__entries__.length;
|
|
55
|
-
},
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true
|
|
58
|
-
});
|
|
59
|
-
/**
|
|
60
|
-
* @param {*} key
|
|
61
|
-
* @returns {*}
|
|
62
|
-
*/
|
|
63
|
-
class_1.prototype.get = function (key) {
|
|
64
|
-
var index = getIndex(this.__entries__, key);
|
|
65
|
-
var entry = this.__entries__[index];
|
|
66
|
-
return entry && entry[1];
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* @param {*} key
|
|
70
|
-
* @param {*} value
|
|
71
|
-
* @returns {void}
|
|
72
|
-
*/
|
|
73
|
-
class_1.prototype.set = function (key, value) {
|
|
74
|
-
var index = getIndex(this.__entries__, key);
|
|
75
|
-
if (~index) {
|
|
76
|
-
this.__entries__[index][1] = value;
|
|
77
|
-
} else {
|
|
78
|
-
this.__entries__.push([key, value]);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* @param {*} key
|
|
83
|
-
* @returns {void}
|
|
84
|
-
*/
|
|
85
|
-
class_1.prototype["delete"] = function (key) {
|
|
86
|
-
var entries = this.__entries__;
|
|
87
|
-
var index = getIndex(entries, key);
|
|
88
|
-
if (~index) {
|
|
89
|
-
entries.splice(index, 1);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* @param {*} key
|
|
94
|
-
* @returns {void}
|
|
95
|
-
*/
|
|
96
|
-
class_1.prototype.has = function (key) {
|
|
97
|
-
return !!~getIndex(this.__entries__, key);
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* @returns {void}
|
|
101
|
-
*/
|
|
102
|
-
class_1.prototype.clear = function () {
|
|
103
|
-
this.__entries__.splice(0);
|
|
104
|
-
};
|
|
45
|
+
return /** @class */function () {
|
|
46
|
+
function class_1() {
|
|
47
|
+
this.__entries__ = [];
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperty(class_1.prototype, "size", {
|
|
105
50
|
/**
|
|
106
|
-
* @
|
|
107
|
-
* @param {*} [ctx=null]
|
|
108
|
-
* @returns {void}
|
|
51
|
+
* @returns {boolean}
|
|
109
52
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
53
|
+
get: function get() {
|
|
54
|
+
return this.__entries__.length;
|
|
55
|
+
},
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* @param {*} key
|
|
61
|
+
* @returns {*}
|
|
62
|
+
*/
|
|
63
|
+
class_1.prototype.get = function (key) {
|
|
64
|
+
var index = getIndex(this.__entries__, key);
|
|
65
|
+
var entry = this.__entries__[index];
|
|
66
|
+
return entry && entry[1];
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @param {*} key
|
|
70
|
+
* @param {*} value
|
|
71
|
+
* @returns {void}
|
|
72
|
+
*/
|
|
73
|
+
class_1.prototype.set = function (key, value) {
|
|
74
|
+
var index = getIndex(this.__entries__, key);
|
|
75
|
+
if (~index) {
|
|
76
|
+
this.__entries__[index][1] = value;
|
|
77
|
+
} else {
|
|
78
|
+
this.__entries__.push([key, value]);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* @param {*} key
|
|
83
|
+
* @returns {void}
|
|
84
|
+
*/
|
|
85
|
+
class_1.prototype["delete"] = function (key) {
|
|
86
|
+
var entries = this.__entries__;
|
|
87
|
+
var index = getIndex(entries, key);
|
|
88
|
+
if (~index) {
|
|
89
|
+
entries.splice(index, 1);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* @param {*} key
|
|
94
|
+
* @returns {void}
|
|
95
|
+
*/
|
|
96
|
+
class_1.prototype.has = function (key) {
|
|
97
|
+
return !!~getIndex(this.__entries__, key);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* @returns {void}
|
|
101
|
+
*/
|
|
102
|
+
class_1.prototype.clear = function () {
|
|
103
|
+
this.__entries__.splice(0);
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* @param {Function} callback
|
|
107
|
+
* @param {*} [ctx=null]
|
|
108
|
+
* @returns {void}
|
|
109
|
+
*/
|
|
110
|
+
class_1.prototype.forEach = function (callback, ctx) {
|
|
111
|
+
if (ctx === void 0) {
|
|
112
|
+
ctx = null;
|
|
113
|
+
}
|
|
114
|
+
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
115
|
+
var entry = _a[_i];
|
|
116
|
+
callback.call(ctx, entry[1], entry[0]);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return class_1;
|
|
120
|
+
}();
|
|
122
121
|
}();
|
|
123
122
|
|
|
124
123
|
/**
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
13
|
+
Object.defineProperty(exports, '__esModule', {
|
|
14
|
+
value: true
|
|
15
|
+
});
|
|
12
16
|
var tslib = require('tslib');
|
|
13
17
|
var React = require('react');
|
|
14
18
|
var classname = require('@hi-ui/classname');
|
|
@@ -16,6 +20,12 @@ var env = require('@hi-ui/env');
|
|
|
16
20
|
var index$1 = require('../../../../hooks/use-merge-refs/lib/esm/index.js');
|
|
17
21
|
var perfectScrollbar_esm = require('../../../../../node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js');
|
|
18
22
|
var index = require('./utils/index.js');
|
|
23
|
+
function _interopDefaultLegacy(e) {
|
|
24
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
25
|
+
'default': e
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
29
|
|
|
20
30
|
/** @LICENSE
|
|
21
31
|
* @hi-ui/scrollbar
|
|
@@ -129,14 +139,14 @@ var Scrollbar = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
129
139
|
});
|
|
130
140
|
}
|
|
131
141
|
}, [containerElement]);
|
|
132
|
-
return /*#__PURE__*/
|
|
142
|
+
return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
|
133
143
|
ref: index$1.useMergeRefs(setContainer, ref),
|
|
134
144
|
role: role,
|
|
135
145
|
className: cls,
|
|
136
146
|
style: Object.assign(Object.assign({}, style), {
|
|
137
147
|
position: position
|
|
138
148
|
})
|
|
139
|
-
}, injectProps), /*#__PURE__*/
|
|
149
|
+
}, injectProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
140
150
|
className: prefixCls + "__wrapper",
|
|
141
151
|
ref: setWrapperElement
|
|
142
152
|
}, children));
|
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
12
13
|
Object.defineProperty(exports, '__esModule', {
|
|
13
14
|
value: true
|
|
14
15
|
});
|
|
15
16
|
var __styleInject__ = require('style-inject');
|
|
17
|
+
function _interopDefaultLegacy(e) {
|
|
18
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
|
19
|
+
'default': e
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
var __styleInject____default = /*#__PURE__*/_interopDefaultLegacy(__styleInject__);
|
|
16
23
|
|
|
17
24
|
/** @LICENSE
|
|
18
25
|
* @hi-ui/scrollbar
|
|
@@ -24,5 +31,5 @@ var __styleInject__ = require('style-inject');
|
|
|
24
31
|
* LICENSE file in the root directory of this source tree.
|
|
25
32
|
*/
|
|
26
33
|
var css_248z = "/** Container style*/.ps {overflow: hidden !important;overflow-anchor: none;-ms-overflow-style: none;touch-action: auto;-ms-touch-action: auto;}/** Scrollbar rail styles*/.ps__rail-x {display: none;opacity: 0;transition: background-color 0.2s linear, opacity 0.2s linear;-webkit-transition: background-color 0.2s linear, opacity 0.2s linear;height: 15px;/* there must be 'bottom' or 'top' for ps__rail-x */bottom: 0px;/* please don't change 'position' */position: absolute;}.ps__rail-y {display: none;opacity: 0;transition: background-color 0.2s linear, opacity 0.2s linear;-webkit-transition: background-color 0.2s linear, opacity 0.2s linear;width: 15px;/* there must be 'right' or 'left' for ps__rail-y */right: 0;/* please don't change 'position' */position: absolute;}.ps--active-x > .ps__rail-x,.ps--active-y > .ps__rail-y {display: block;background-color: transparent;}.ps:hover > .ps__rail-x,.ps:hover > .ps__rail-y,.ps--focus > .ps__rail-x,.ps--focus > .ps__rail-y,.ps--scrolling-x > .ps__rail-x,.ps--scrolling-y > .ps__rail-y {opacity: 0.6;}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking {background-color: #eee;opacity: 0.9;}/** Scrollbar thumb styles*/.ps__thumb-x {background-color: #aaa;border-radius: 6px;transition: background-color 0.2s linear, height 0.2s ease-in-out;-webkit-transition: background-color 0.2s linear, height 0.2s ease-in-out;height: 6px;/* there must be 'bottom' for ps__thumb-x */bottom: 2px;/* please don't change 'position' */position: absolute;}.ps__thumb-y {background-color: #aaa;border-radius: 6px;transition: background-color 0.2s linear, width 0.2s ease-in-out;-webkit-transition: background-color 0.2s linear, width 0.2s ease-in-out;width: 6px;/* there must be 'right' for ps__thumb-y */right: 2px;/* please don't change 'position' */position: absolute;}.ps__rail-x:hover > .ps__thumb-x,.ps__rail-x:focus > .ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x {background-color: #999;height: 11px;}.ps__rail-y:hover > .ps__thumb-y,.ps__rail-y:focus > .ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y {background-color: #999;width: 11px;}/* MS supports */@supports (-ms-overflow-style: none) {.ps {overflow: auto !important;}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {.ps {overflow: auto !important;}}.hi-v4-scrollbar {overflow: hidden;width: 100%;height: 100%;}.hi-v4-scrollbar__wrapper {width: -webkit-fit-content;width: -moz-fit-content;width: fit-content;height: -webkit-fit-content;height: -moz-fit-content;height: fit-content;min-width: 100%;min-height: 100%;}.hi-v4-scrollbar--keep-visible.priority > .ps__rail-y, .hi-v4-scrollbar--keep-visible.priority > .ps__rail-x {opacity: 0.8;}.hi-v4-scrollbar--keep-visible.priority .ps__thumb-y,.hi-v4-scrollbar--keep-visible.priority .ps__thumb-x {background-color: var(--hi-v4-color-gray-400, #b5bcc7);}.hi-v4-scrollbar.priority:hover > .ps__rail-y, .hi-v4-scrollbar.priority:hover > .ps__rail-x, .hi-v4-scrollbar.priority:focus > .ps__rail-y, .hi-v4-scrollbar.priority:focus > .ps__rail-x {opacity: 0.8;}.hi-v4-scrollbar.priority > .ps__rail-y,.hi-v4-scrollbar.priority .ps__thumb-y {width: 8px;border-radius: 4px;right: 0;-webkit-transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));}.hi-v4-scrollbar.priority > .ps__rail-y:hover, .hi-v4-scrollbar.priority > .ps__rail-y:focus, .hi-v4-scrollbar.priority > .ps__rail-y.ps--clicking {width: 8px;background-color: var(--hi-v4-color-gray-200, #ebedf0);opacity: 0.8;}.hi-v4-scrollbar.priority > .ps__rail-y:hover .ps__thumb-y, .hi-v4-scrollbar.priority > .ps__rail-y:focus .ps__thumb-y, .hi-v4-scrollbar.priority > .ps__rail-y.ps--clicking .ps__thumb-y {width: 8px;right: 0;background-color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-scrollbar.priority > .ps__rail-x,.hi-v4-scrollbar.priority .ps__thumb-x {height: 8px;border-radius: 4px;bottom: 0;-webkit-transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));}.hi-v4-scrollbar.priority > .ps__rail-x:hover, .hi-v4-scrollbar.priority > .ps__rail-x:focus, .hi-v4-scrollbar.priority > .ps__rail-x.ps--clicking {height: 8px;background-color: var(--hi-v4-color-gray-200, #ebedf0);opacity: 0.8;}.hi-v4-scrollbar.priority > .ps__rail-x:hover .ps__thumb-x, .hi-v4-scrollbar.priority > .ps__rail-x:focus .ps__thumb-x, .hi-v4-scrollbar.priority > .ps__rail-x.ps--clicking .ps__thumb-x {height: 8px;bottom: 0;background-color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-scrollbar--only-scroll-visible.priority:not(.ps--scrolling-y) > .ps__rail-y:not(:hover):not(:focus), .hi-v4-scrollbar--only-scroll-visible.priority:not(.ps--scrolling-x) > .ps__rail-x:not(:hover):not(:focus) {opacity: 0;}";
|
|
27
|
-
|
|
34
|
+
__styleInject____default["default"](css_248z);
|
|
28
35
|
exports["default"] = css_248z;
|