@hi-ui/check-tree-select 4.1.0 → 4.2.0

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @hi-ui/check-tree-select
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2531](https://github.com/XiaoMi/hiui/pull/2531) [`0a9d90ac5`](https://github.com/XiaoMi/hiui/commit/0a9d90ac53bdf66aa2b83b698b58d2cdeb98d912) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加 tagInputProps API,支持显示内容高度自适应
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`bd5940eba`](https://github.com/XiaoMi/hiui/commit/bd5940eba7d7a80aa676f37bb804ea27544864d2), [`0a9d90ac5`](https://github.com/XiaoMi/hiui/commit/0a9d90ac53bdf66aa2b83b698b58d2cdeb98d912)]:
12
+ - @hi-ui/picker@4.1.1
13
+ - @hi-ui/popper@4.0.5
14
+ - @hi-ui/tag-input@4.0.6
15
+
3
16
  ## 4.1.0
4
17
 
5
18
  ### Minor Changes
@@ -71,7 +71,7 @@ var DEFAULT_VALUE = [];
71
71
  var DEFAULT_FIELD_NAMES = {};
72
72
  var DEFAULT_EXPANDED_IDS = [];
73
73
  /**
74
- * TODO: What is CheckTreeSelect
74
+ * 多项树形选择器
75
75
  */
76
76
 
77
77
  var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
@@ -115,7 +115,8 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
115
115
  itemHeight = _a.itemHeight,
116
116
  height = _a.height,
117
117
  showCheckAll = _a.showCheckAll,
118
- rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll"]);
118
+ tagInputProps = _a.tagInputProps,
119
+ rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "tagInputProps"]);
119
120
 
120
121
  var i18n = core.useLocaleContext();
121
122
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
@@ -334,10 +335,7 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
334
335
  onSearch: funcUtils.callAllFuncs(onSearchProp, onSearch),
335
336
  footer: renderDefaultFooter(),
336
337
  loading: rest.loading !== undefined ? rest.loading : loading,
337
- trigger: /*#__PURE__*/React__default["default"].createElement(tagInput.TagInputMock // ref={targetElementRef}
338
- // onClick={openMenu}
339
- // disabled={disabled}
340
- , {
338
+ trigger: /*#__PURE__*/React__default["default"].createElement(tagInput.TagInputMock, Object.assign({}, tagInputProps, {
341
339
  // ref={targetElementRef}
342
340
  // onClick={openMenu}
343
341
  // disabled={disabled}
@@ -353,7 +351,7 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
353
351
  data: mergedData,
354
352
  // @ts-ignore
355
353
  invalid: invalid
356
- })
354
+ }))
357
355
  }), typeAssertion.isArrayNonEmpty(treeProps.data) ?
358
356
  /*#__PURE__*/
359
357
  // 只做渲染,不做逻辑处理(比如搜索过滤后,check操作的是对过滤后的data操作,这是不符合预期的)
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', {
14
14
  });
15
15
  var css_248z = "";
16
16
 
17
- var __styleInject__ = require('inject-head-style')["default"];
17
+ var __styleInject__ = require('style-inject')["default"];
18
18
 
19
19
  __styleInject__(css_248z);
20
20
 
@@ -33,7 +33,7 @@ var DEFAULT_VALUE = [];
33
33
  var DEFAULT_FIELD_NAMES = {};
34
34
  var DEFAULT_EXPANDED_IDS = [];
35
35
  /**
36
- * TODO: What is CheckTreeSelect
36
+ * 多项树形选择器
37
37
  */
38
38
 
39
39
  var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
@@ -77,7 +77,8 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
77
77
  itemHeight = _a.itemHeight,
78
78
  height = _a.height,
79
79
  showCheckAll = _a.showCheckAll,
80
- rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll"]);
80
+ tagInputProps = _a.tagInputProps,
81
+ rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "tagInputProps"]);
81
82
 
82
83
  var i18n = useLocaleContext();
83
84
  var placeholder = isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
@@ -296,10 +297,7 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
296
297
  onSearch: callAllFuncs(onSearchProp, onSearch),
297
298
  footer: renderDefaultFooter(),
298
299
  loading: rest.loading !== undefined ? rest.loading : loading,
299
- trigger: /*#__PURE__*/React.createElement(TagInputMock // ref={targetElementRef}
300
- // onClick={openMenu}
301
- // disabled={disabled}
302
- , {
300
+ trigger: /*#__PURE__*/React.createElement(TagInputMock, Object.assign({}, tagInputProps, {
303
301
  // ref={targetElementRef}
304
302
  // onClick={openMenu}
305
303
  // disabled={disabled}
@@ -315,7 +313,7 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
315
313
  data: mergedData,
316
314
  // @ts-ignore
317
315
  invalid: invalid
318
- })
316
+ }))
319
317
  }), isArrayNonEmpty(treeProps.data) ?
320
318
  /*#__PURE__*/
321
319
  // 只做渲染,不做逻辑处理(比如搜索过滤后,check操作的是对过滤后的data操作,这是不符合预期的)
@@ -7,7 +7,7 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- import __styleInject__ from 'inject-head-style';
10
+ import __styleInject__ from 'style-inject';
11
11
  var css_248z = "";
12
12
 
13
13
  __styleInject__(css_248z);
@@ -2,8 +2,9 @@ import React from 'react';
2
2
  import { CheckTreeSelectDataItem, CheckTreeSelectItemEventData, CheckTreeSelectAppearanceEnum } from './types';
3
3
  import { FlattedTreeNodeData } from '@hi-ui/tree';
4
4
  import { PickerProps } from '@hi-ui/picker';
5
+ import { TagInputMockProps } from '@hi-ui/tag-input';
5
6
  /**
6
- * TODO: What is CheckTreeSelect
7
+ * 多项树形选择器
7
8
  */
8
9
  export declare const CheckTreeSelect: React.ForwardRefExoticComponent<CheckTreeSelectProps & React.RefAttributes<HTMLDivElement | null>>;
9
10
  export interface CheckTreeSelectProps extends Omit<PickerProps, 'data' | 'onChange' | 'value' | 'trigger' | 'scrollable'> {
@@ -135,6 +136,10 @@ export interface CheckTreeSelectProps extends Omit<PickerProps, 'data' | 'onChan
135
136
  * 是否开启全选功能,需要对数据全量操作。异步数据场景暂不支持,可自行渲染弹层底部实现
136
137
  */
137
138
  showCheckAll?: boolean;
139
+ /**
140
+ * TagInput 参数设置
141
+ */
142
+ tagInputProps?: TagInputMockProps;
138
143
  }
139
144
  /**
140
145
  * 在 checkedIdsSet 为数据合法的情况下,查找所有的半选中态的节点 ids
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-tree-select",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -50,9 +50,9 @@
50
50
  "@hi-ui/func-utils": "^4.0.1",
51
51
  "@hi-ui/highlighter": "^4.0.5",
52
52
  "@hi-ui/icons": "^4.0.4",
53
- "@hi-ui/picker": "^4.0.6",
54
- "@hi-ui/popper": "^4.0.4",
55
- "@hi-ui/tag-input": "^4.0.5",
53
+ "@hi-ui/picker": "^4.1.1",
54
+ "@hi-ui/popper": "^4.0.5",
55
+ "@hi-ui/tag-input": "^4.0.6",
56
56
  "@hi-ui/tree": "^4.0.9",
57
57
  "@hi-ui/tree-utils": "^4.0.2",
58
58
  "@hi-ui/type-assertion": "^4.0.1",
@@ -70,7 +70,6 @@
70
70
  "devDependencies": {
71
71
  "@hi-ui/core": "^4.0.4",
72
72
  "@hi-ui/core-css": "^4.0.1",
73
- "@hi-ui/hi-build": "^4.0.1",
74
73
  "react": "^17.0.1",
75
74
  "react-dom": "^17.0.1"
76
75
  }