@hi-ui/tree-select 4.1.1 → 4.1.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/CHANGELOG.md +48 -0
- package/lib/cjs/TreeSelect.js +16 -6
- package/lib/esm/TreeSelect.js +2 -2
- package/package.json +20 -20
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,53 @@
|
|
1
1
|
# @hi-ui/tree-select
|
2
2
|
|
3
|
+
## 4.1.3
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- build: rollup2 构建
|
8
|
+
- Updated dependencies
|
9
|
+
- @hi-ui/core@4.0.8
|
10
|
+
- @hi-ui/use-data-source@4.0.4
|
11
|
+
- @hi-ui/use-search-mode@4.1.4
|
12
|
+
- @hi-ui/use-toggle@4.0.4
|
13
|
+
- @hi-ui/use-uncontrolled-state@4.0.4
|
14
|
+
- @hi-ui/icons@4.0.18
|
15
|
+
- @hi-ui/highlighter@4.0.8
|
16
|
+
- @hi-ui/input@4.0.13
|
17
|
+
- @hi-ui/picker@4.1.4
|
18
|
+
- @hi-ui/popper@4.1.3
|
19
|
+
- @hi-ui/tree@4.5.8
|
20
|
+
- @hi-ui/array-utils@4.0.4
|
21
|
+
- @hi-ui/classname@4.0.4
|
22
|
+
- @hi-ui/env@4.0.4
|
23
|
+
- @hi-ui/func-utils@4.0.4
|
24
|
+
- @hi-ui/tree-utils@4.1.4
|
25
|
+
- @hi-ui/type-assertion@4.0.4
|
26
|
+
|
27
|
+
## 4.1.2
|
28
|
+
|
29
|
+
### Patch Changes
|
30
|
+
|
31
|
+
- fix: 修复 rollup3 打包 cjs 模块问题
|
32
|
+
- Updated dependencies
|
33
|
+
- @hi-ui/env@4.0.3
|
34
|
+
- @hi-ui/core@4.0.7
|
35
|
+
- @hi-ui/use-data-source@4.0.3
|
36
|
+
- @hi-ui/use-search-mode@4.1.3
|
37
|
+
- @hi-ui/use-toggle@4.0.3
|
38
|
+
- @hi-ui/use-uncontrolled-state@4.0.3
|
39
|
+
- @hi-ui/icons@4.0.17
|
40
|
+
- @hi-ui/highlighter@4.0.7
|
41
|
+
- @hi-ui/input@4.0.12
|
42
|
+
- @hi-ui/picker@4.1.3
|
43
|
+
- @hi-ui/popper@4.1.2
|
44
|
+
- @hi-ui/tree@4.5.7
|
45
|
+
- @hi-ui/array-utils@4.0.3
|
46
|
+
- @hi-ui/classname@4.0.3
|
47
|
+
- @hi-ui/func-utils@4.0.3
|
48
|
+
- @hi-ui/tree-utils@4.1.3
|
49
|
+
- @hi-ui/type-assertion@4.0.3
|
50
|
+
|
3
51
|
## 4.1.1
|
4
52
|
|
5
53
|
### Patch Changes
|
package/lib/cjs/TreeSelect.js
CHANGED
@@ -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');
|
@@ -26,6 +30,12 @@ var icons = require('@hi-ui/icons');
|
|
26
30
|
var core = require('@hi-ui/core');
|
27
31
|
var funcUtils = require('@hi-ui/func-utils');
|
28
32
|
var useSearchMode = require('@hi-ui/use-search-mode');
|
33
|
+
function _interopDefaultLegacy(e) {
|
34
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
35
|
+
'default': e
|
36
|
+
};
|
37
|
+
}
|
38
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
29
39
|
var TREE_SELECT_PREFIX = classname.getPrefixCls('tree-select');
|
30
40
|
var DEFAULT_DATA = [];
|
31
41
|
// const DEFAULT_VALUE = [] as []
|
@@ -179,7 +189,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
179
189
|
}
|
180
190
|
// 本地搜索执行默认高亮规则
|
181
191
|
var highlight = !!searchValue && (searchMode === 'highlight' || searchMode === 'filter');
|
182
|
-
var ret = highlight ? /*#__PURE__*/
|
192
|
+
var ret = highlight ? /*#__PURE__*/React__default["default"].createElement(highlighter.Highlighter, {
|
183
193
|
keyword: searchValue
|
184
194
|
}, node.title) : true;
|
185
195
|
return ret;
|
@@ -206,7 +216,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
206
216
|
return flattedData;
|
207
217
|
}, [selectedItem, flattedData]);
|
208
218
|
var cls = classname.cx(prefixCls, className);
|
209
|
-
return /*#__PURE__*/
|
219
|
+
return /*#__PURE__*/React__default["default"].createElement(picker.Picker, Object.assign({
|
210
220
|
ref: ref,
|
211
221
|
className: cls
|
212
222
|
}, rest, {
|
@@ -220,7 +230,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
220
230
|
searchable: searchable,
|
221
231
|
onSearch: funcUtils.callAllFuncs(onSearchProp, onSearch),
|
222
232
|
loading: rest.loading !== undefined ? rest.loading : loading,
|
223
|
-
trigger: /*#__PURE__*/
|
233
|
+
trigger: /*#__PURE__*/React__default["default"].createElement(input.MockInput
|
224
234
|
// disabled={disabled}
|
225
235
|
, {
|
226
236
|
// disabled={disabled}
|
@@ -228,7 +238,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
228
238
|
clearable: clearable,
|
229
239
|
placeholder: placeholder,
|
230
240
|
displayRender: displayRenderProp,
|
231
|
-
suffix: menuVisible ? /*#__PURE__*/
|
241
|
+
suffix: menuVisible ? /*#__PURE__*/React__default["default"].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null),
|
232
242
|
focused: menuVisible,
|
233
243
|
value: value,
|
234
244
|
onChange: tryChangeValue,
|
@@ -237,7 +247,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
237
247
|
invalid: invalid,
|
238
248
|
appearance: appearance
|
239
249
|
})
|
240
|
-
}), typeAssertion.isArrayNonEmpty(treeProps.data) ? /*#__PURE__*/
|
250
|
+
}), typeAssertion.isArrayNonEmpty(treeProps.data) ? ( /*#__PURE__*/React__default["default"].createElement(tree.Tree, Object.assign({
|
241
251
|
size: 'md',
|
242
252
|
className: prefixCls + "__tree",
|
243
253
|
selectable: true,
|
@@ -250,7 +260,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
250
260
|
virtual: virtual,
|
251
261
|
itemHeight: itemHeight,
|
252
262
|
height: height
|
253
|
-
}, treeProps)) : null);
|
263
|
+
}, treeProps))) : null);
|
254
264
|
});
|
255
265
|
if (env.__DEV__) {
|
256
266
|
TreeSelect.displayName = 'TreeSelect';
|
package/lib/esm/TreeSelect.js
CHANGED
@@ -235,7 +235,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
235
235
|
invalid: invalid,
|
236
236
|
appearance: appearance
|
237
237
|
})
|
238
|
-
}), isArrayNonEmpty(treeProps.data) ? /*#__PURE__*/React.createElement(Tree, Object.assign({
|
238
|
+
}), isArrayNonEmpty(treeProps.data) ? ( /*#__PURE__*/React.createElement(Tree, Object.assign({
|
239
239
|
size: 'md',
|
240
240
|
className: prefixCls + "__tree",
|
241
241
|
selectable: true,
|
@@ -248,7 +248,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
248
248
|
virtual: virtual,
|
249
249
|
itemHeight: itemHeight,
|
250
250
|
height: height
|
251
|
-
}, treeProps)) : null);
|
251
|
+
}, treeProps))) : null);
|
252
252
|
});
|
253
253
|
if (__DEV__) {
|
254
254
|
TreeSelect.displayName = 'TreeSelect';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hi-ui/tree-select",
|
3
|
-
"version": "4.1.
|
3
|
+
"version": "4.1.3",
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
5
5
|
"keywords": [],
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
@@ -43,31 +43,31 @@
|
|
43
43
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@hi-ui/array-utils": "^4.0.
|
47
|
-
"@hi-ui/classname": "^4.0.
|
48
|
-
"@hi-ui/env": "^4.0.
|
49
|
-
"@hi-ui/func-utils": "^4.0.
|
50
|
-
"@hi-ui/highlighter": "^4.0.
|
51
|
-
"@hi-ui/icons": "^4.0.
|
52
|
-
"@hi-ui/input": "^4.0.
|
53
|
-
"@hi-ui/picker": "^4.1.
|
54
|
-
"@hi-ui/popper": "^4.1.
|
55
|
-
"@hi-ui/tree": "^4.5.
|
56
|
-
"@hi-ui/tree-utils": "^4.1.
|
57
|
-
"@hi-ui/type-assertion": "^4.0.
|
58
|
-
"@hi-ui/use-data-source": "^4.0.
|
59
|
-
"@hi-ui/use-search-mode": "^4.1.
|
60
|
-
"@hi-ui/use-toggle": "^4.0.
|
61
|
-
"@hi-ui/use-uncontrolled-state": "^4.0.
|
46
|
+
"@hi-ui/array-utils": "^4.0.4",
|
47
|
+
"@hi-ui/classname": "^4.0.4",
|
48
|
+
"@hi-ui/env": "^4.0.4",
|
49
|
+
"@hi-ui/func-utils": "^4.0.4",
|
50
|
+
"@hi-ui/highlighter": "^4.0.8",
|
51
|
+
"@hi-ui/icons": "^4.0.18",
|
52
|
+
"@hi-ui/input": "^4.0.13",
|
53
|
+
"@hi-ui/picker": "^4.1.4",
|
54
|
+
"@hi-ui/popper": "^4.1.3",
|
55
|
+
"@hi-ui/tree": "^4.5.8",
|
56
|
+
"@hi-ui/tree-utils": "^4.1.4",
|
57
|
+
"@hi-ui/type-assertion": "^4.0.4",
|
58
|
+
"@hi-ui/use-data-source": "^4.0.4",
|
59
|
+
"@hi-ui/use-search-mode": "^4.1.4",
|
60
|
+
"@hi-ui/use-toggle": "^4.0.4",
|
61
|
+
"@hi-ui/use-uncontrolled-state": "^4.0.4"
|
62
62
|
},
|
63
63
|
"peerDependencies": {
|
64
|
-
"@hi-ui/core": ">=4.0.
|
64
|
+
"@hi-ui/core": ">=4.0.8",
|
65
65
|
"react": ">=16.8.6",
|
66
66
|
"react-dom": ">=16.8.6"
|
67
67
|
},
|
68
68
|
"devDependencies": {
|
69
|
-
"@hi-ui/core": "^4.0.
|
70
|
-
"@hi-ui/core-css": "^4.1.
|
69
|
+
"@hi-ui/core": "^4.0.8",
|
70
|
+
"@hi-ui/core-css": "^4.1.5",
|
71
71
|
"react": "^17.0.1",
|
72
72
|
"react-dom": "^17.0.1"
|
73
73
|
}
|