@ucloud-fe/react-components 1.3.16 → 1.3.19

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.
@@ -0,0 +1,15 @@
1
+ export default Group;
2
+ declare class Group extends React.Component<any, any, any> {
3
+ static propTypes: {
4
+ /** @ignore */
5
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
6
+ /**
7
+ * 紧凑型布局
8
+ */
9
+ compact: PropTypes.Requireable<boolean>;
10
+ };
11
+ constructor(props: any);
12
+ constructor(props: any, context: any);
13
+ }
14
+ import React from "react";
15
+ import PropTypes from "prop-types";
@@ -0,0 +1,32 @@
1
+ export default Icon;
2
+ declare class Icon extends React.PureComponent<any, any, any> {
3
+ static propTypes: {
4
+ /** @ignore */
5
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
6
+ /**
7
+ * 自定义 icon
8
+ */
9
+ icon: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
10
+ /** 同 Icon 组件 prefix */
11
+ prefix: PropTypes.Requireable<string>;
12
+ /**
13
+ * 样式风格
14
+ */
15
+ styleType: PropTypes.Requireable<string>;
16
+ /**
17
+ * 自定义样式
18
+ */
19
+ customStyle: PropTypes.Requireable<PropTypes.InferProps<{
20
+ /** 字色/图标色 */
21
+ color: PropTypes.Requireable<string>;
22
+ /** 边框色 */
23
+ borderColor: PropTypes.Requireable<string>;
24
+ /** 背景色 */
25
+ background: PropTypes.Requireable<string>;
26
+ }>>;
27
+ };
28
+ constructor(props: any);
29
+ constructor(props: any, context: any);
30
+ }
31
+ import React from "react";
32
+ import PropTypes from "prop-types";
@@ -0,0 +1,51 @@
1
+ export default Tag;
2
+ declare class Tag extends React.PureComponent<any, any, any> {
3
+ static propTypes: {
4
+ /** @ignore */
5
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
6
+ /**
7
+ * 样式风格
8
+ */
9
+ styleType: PropTypes.Requireable<string>;
10
+ /**
11
+ * 是否显示关闭按钮
12
+ */
13
+ closable: PropTypes.Requireable<boolean>;
14
+ /**
15
+ * 关闭回调
16
+ */
17
+ onClose: PropTypes.Requireable<(...args: any[]) => any>;
18
+ /**
19
+ * 自定义前置 icon
20
+ */
21
+ icon: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
22
+ /**
23
+ * 是否禁用
24
+ */
25
+ disabled: PropTypes.Requireable<boolean>;
26
+ /**
27
+ * 自定义样式
28
+ */
29
+ customStyle: PropTypes.Requireable<PropTypes.InferProps<{
30
+ /** 字色/图标色 */
31
+ color: PropTypes.Requireable<string>;
32
+ /** 边框色 */
33
+ borderColor: PropTypes.Requireable<string>;
34
+ /** 背景色 */
35
+ background: PropTypes.Requireable<string>;
36
+ /** 关闭按钮 hover 背景色 */
37
+ closeIconHoverBackground: PropTypes.Requireable<string>;
38
+ }>>;
39
+ };
40
+ static defaultProps: {
41
+ styleType: string;
42
+ };
43
+ constructor(props: any);
44
+ constructor(props: any, context: any);
45
+ }
46
+ declare namespace Tag {
47
+ export { StyleType };
48
+ }
49
+ export const StyleType: string[];
50
+ import React from "react";
51
+ import PropTypes from "prop-types";
@@ -0,0 +1,8 @@
1
+ import Tag from './Tag';
2
+ import Group from './Group';
3
+ import IconTag from './Icon';
4
+ declare const ExportTag: typeof Tag & {
5
+ Group: typeof Group;
6
+ Icon: typeof IconTag;
7
+ };
8
+ export default ExportTag;
@@ -7,13 +7,17 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
+ var _type = require("../../type");
11
+
10
12
  var _Tag = _interopRequireDefault(require("./Tag"));
11
13
 
12
14
  var _Group = _interopRequireDefault(require("./Group"));
13
15
 
14
16
  var _Icon = _interopRequireDefault(require("./Icon"));
15
17
 
16
- var _default = _Tag.default;
17
- exports.default = _default;
18
- _Tag.default.Group = _Group.default;
19
- _Tag.default.Icon = _Icon.default;
18
+ var ExportTag = (0, _type.ExportComponent)(_Tag.default, {
19
+ Group: _Group.default,
20
+ Icon: _Icon.default
21
+ });
22
+ var _default = ExportTag;
23
+ exports.default = _default;
@@ -0,0 +1,110 @@
1
+ export const prefixCls: string;
2
+ export const iconCls: string;
3
+ export namespace styleMap {
4
+ namespace gray {
5
+ const color: string;
6
+ const border: string;
7
+ const bg: string;
8
+ const iconHoverBG: string;
9
+ }
10
+ namespace green {
11
+ const color_1: string;
12
+ export { color_1 as color };
13
+ const border_1: string;
14
+ export { border_1 as border };
15
+ const bg_1: string;
16
+ export { bg_1 as bg };
17
+ const iconHoverBG_1: string;
18
+ export { iconHoverBG_1 as iconHoverBG };
19
+ }
20
+ namespace yellow {
21
+ const color_2: string;
22
+ export { color_2 as color };
23
+ const border_2: string;
24
+ export { border_2 as border };
25
+ const bg_2: string;
26
+ export { bg_2 as bg };
27
+ const iconHoverBG_2: string;
28
+ export { iconHoverBG_2 as iconHoverBG };
29
+ }
30
+ namespace red {
31
+ const color_3: string;
32
+ export { color_3 as color };
33
+ const border_3: string;
34
+ export { border_3 as border };
35
+ const bg_3: string;
36
+ export { bg_3 as bg };
37
+ const iconHoverBG_3: string;
38
+ export { iconHoverBG_3 as iconHoverBG };
39
+ }
40
+ namespace primary {
41
+ const color_4: string;
42
+ export { color_4 as color };
43
+ const border_4: string;
44
+ export { border_4 as border };
45
+ const bg_4: string;
46
+ export { bg_4 as bg };
47
+ const iconHoverBG_4: string;
48
+ export { iconHoverBG_4 as iconHoverBG };
49
+ }
50
+ namespace purple {
51
+ const color_5: string;
52
+ export { color_5 as color };
53
+ const border_5: string;
54
+ export { border_5 as border };
55
+ const bg_5: string;
56
+ export { bg_5 as bg };
57
+ const iconHoverBG_5: string;
58
+ export { iconHoverBG_5 as iconHoverBG };
59
+ }
60
+ namespace lightblue {
61
+ const color_6: string;
62
+ export { color_6 as color };
63
+ const border_6: string;
64
+ export { border_6 as border };
65
+ const bg_6: string;
66
+ export { bg_6 as bg };
67
+ const iconHoverBG_6: string;
68
+ export { iconHoverBG_6 as iconHoverBG };
69
+ }
70
+ namespace blue {
71
+ const color_7: string;
72
+ export { color_7 as color };
73
+ const border_7: string;
74
+ export { border_7 as border };
75
+ const bg_7: string;
76
+ export { bg_7 as bg };
77
+ const iconHoverBG_7: string;
78
+ export { iconHoverBG_7 as iconHoverBG };
79
+ }
80
+ namespace orange {
81
+ const color_8: string;
82
+ export { color_8 as color };
83
+ const border_8: string;
84
+ export { border_8 as border };
85
+ const bg_8: string;
86
+ export { bg_8 as bg };
87
+ const iconHoverBG_8: string;
88
+ export { iconHoverBG_8 as iconHoverBG };
89
+ }
90
+ namespace cyan {
91
+ const color_9: string;
92
+ export { color_9 as color };
93
+ const border_9: string;
94
+ export { border_9 as border };
95
+ const bg_9: string;
96
+ export { bg_9 as bg };
97
+ const iconHoverBG_9: string;
98
+ export { iconHoverBG_9 as iconHoverBG };
99
+ }
100
+ }
101
+ export const CloseIcon: import("@emotion/styled-base").StyledComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<SvgIcon>, Pick<Pick<any, string | number | symbol> & import("react").RefAttributes<SvgIcon>, string | number | symbol>, object>;
102
+ export const CloseIconWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
103
+ export const PrefixIcon: import("@emotion/styled-base").StyledComponent<import("../../Icon/Icon").IconProps & Omit<import("react").HTMLAttributes<HTMLElement>, keyof import("../../Icon/Icon").IconProps>, Pick<import("../../Icon/Icon").IconProps & Omit<import("react").HTMLAttributes<HTMLElement>, keyof import("../../Icon/Icon").IconProps>, "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof import("../../Icon/Icon").IconProps>, object>;
104
+ export const PrefixIconWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
105
+ export const TagWrapper: import("react").SFC<import("emotion-theming/types/helper").AddOptionalTo<Pick<any, string | number | symbol> & import("react").RefAttributes<any>, "theme">>;
106
+ export const ContentWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
107
+ export const IconTag: import("@emotion/styled-base").StyledComponent<import("../../Icon/Icon").IconProps & Omit<import("react").HTMLAttributes<HTMLElement>, keyof import("../../Icon/Icon").IconProps>, Pick<import("../../Icon/Icon").IconProps & Omit<import("react").HTMLAttributes<HTMLElement>, keyof import("../../Icon/Icon").IconProps>, "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof import("../../Icon/Icon").IconProps>, object>;
108
+ export const IconTagWrapper: import("react").SFC<import("emotion-theming/types/helper").AddOptionalTo<Pick<any, string | number | symbol> & import("react").RefAttributes<any>, "theme">>;
109
+ export const TagGroupWrapper: import("react").SFC<import("emotion-theming/types/helper").AddOptionalTo<Pick<any, string | number | symbol> & import("react").RefAttributes<any>, "theme">>;
110
+ import SvgIcon from "../../../components/SvgIcon";
@@ -64,8 +64,8 @@ var groupDataSource = function groupDataSource(dataSource) {
64
64
 
65
65
  (0, _newArrowCheck2.default)(this, _this);
66
66
  var group = {};
67
- var allKeys = [];
68
- var allDisabledKeys = [];
67
+ var validKeys = [];
68
+ var disabledKeys = [];
69
69
  if (!dataSource) dataSource = [];
70
70
 
71
71
  var _groupData2 = function _groupData(children, disabled) {
@@ -96,10 +96,10 @@ var groupDataSource = function groupDataSource(dataSource) {
96
96
  } else {
97
97
  if (finalDisabled) {
98
98
  disabledKeys.push(key);
99
- allDisabledKeys.push(key);
99
+ disabledKeys.push(key);
100
100
  } else {
101
101
  keys.push(key);
102
- allKeys.push(key);
102
+ validKeys.push(key);
103
103
  }
104
104
  }
105
105
  }.bind(this));
@@ -108,7 +108,7 @@ var groupDataSource = function groupDataSource(dataSource) {
108
108
 
109
109
  _groupData2(dataSource);
110
110
 
111
- return [group, allKeys, allDisabledKeys];
111
+ return [group, validKeys, disabledKeys];
112
112
  }.bind(void 0);
113
113
 
114
114
  var keysToMap = function keysToMap() {
@@ -213,8 +213,8 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
213
213
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
214
214
  _useState2$ = (0, _slicedToArray2.default)(_useState2[0], 3),
215
215
  group = _useState2$[0],
216
- allKeys = _useState2$[1],
217
- allDisabledKeys = _useState2$[2],
216
+ validKeys = _useState2$[1],
217
+ disabledKeys = _useState2$[2],
218
218
  setGroup = _useState2[1];
219
219
 
220
220
  var _useUncontrolled = (0, _useUncontrolled7.default)(_selectedKeys, defaultSelectedKeys || [], _onChange),
@@ -240,11 +240,11 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
240
240
  var selectKeys = [];
241
241
  var unselectKeys = [];
242
242
  var newSelectedMap = keysToMap(newSelectedKeys);
243
- var allMap = keysToMap(allKeys);
243
+ var validMap = keysToMap(validKeys);
244
244
 
245
245
  for (var newKey in newSelectedMap) {
246
246
  // don't in dataSource, ignore
247
- if (!(newKey in allMap)) continue;
247
+ if (!(newKey in validMap)) continue;
248
248
 
249
249
  if (!(newKey in selectedMap)) {
250
250
  selectKeys.push(newKey);
@@ -253,7 +253,7 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
253
253
 
254
254
  for (var oldKey in selectedMap) {
255
255
  // don't in dataSource, ignore
256
- if (!(oldKey in allMap)) continue;
256
+ if (!(oldKey in validMap)) continue;
257
257
 
258
258
  if (!(oldKey in newSelectedMap)) {
259
259
  unselectKeys.push(oldKey);
@@ -264,7 +264,7 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
264
264
  select: selectKeys,
265
265
  unselect: unselectKeys
266
266
  });
267
- }.bind(this), [allKeys, onDiff, selectedMap]);
267
+ }.bind(this), [validKeys, onDiff, selectedMap]);
268
268
  var finalOnChange = (0, _react.useCallback)(function (selectedKeys) {
269
269
  (0, _newArrowCheck2.default)(this, _this7);
270
270
  onChange(selectedKeys);
@@ -299,11 +299,11 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
299
299
  }
300
300
 
301
301
  var disabledSelectedKeys = [];
302
- allDisabledKeys.forEach(function (v) {
302
+ disabledKeys.forEach(function (v) {
303
303
  (0, _newArrowCheck2.default)(this, _this9);
304
304
  if (selectedMap[v]) disabledSelectedKeys.push(v);
305
305
  }.bind(this));
306
- var selectedKeys = [].concat((0, _toConsumableArray2.default)(allKeys), disabledSelectedKeys);
306
+ var selectedKeys = [].concat((0, _toConsumableArray2.default)(validKeys), disabledSelectedKeys);
307
307
  finalOnChange(selectedKeys);
308
308
  }.bind(this),
309
309
  unSelectAll: function unSelectAll() {
@@ -311,7 +311,7 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
311
311
 
312
312
  (0, _newArrowCheck2.default)(this, _this8);
313
313
  var disabledSelectedKeys = [];
314
- allDisabledKeys.forEach(function (v) {
314
+ disabledKeys.forEach(function (v) {
315
315
  (0, _newArrowCheck2.default)(this, _this10);
316
316
  if (selectedMap[v]) disabledSelectedKeys.push(v);
317
317
  }.bind(this));
@@ -328,12 +328,12 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
328
328
  }
329
329
 
330
330
  var disabledSelectedKeys = [];
331
- allDisabledKeys.forEach(function (v) {
331
+ disabledKeys.forEach(function (v) {
332
332
  (0, _newArrowCheck2.default)(this, _this11);
333
333
  if (selectedMap[v]) disabledSelectedKeys.push(v);
334
334
  }.bind(this));
335
335
  var selectedKeys = [].concat(disabledSelectedKeys);
336
- allKeys.forEach(function (v) {
336
+ validKeys.forEach(function (v) {
337
337
  (0, _newArrowCheck2.default)(this, _this11);
338
338
 
339
339
  if (!selectedMap[v]) {
@@ -343,7 +343,7 @@ var CommonTree = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
343
343
  finalOnChange(selectedKeys);
344
344
  }.bind(this)
345
345
  };
346
- }.bind(this), [multiple, allDisabledKeys, allKeys, finalOnChange, selectedMap]);
346
+ }.bind(this), [multiple, disabledKeys, validKeys, finalOnChange, selectedMap]);
347
347
  var onSelect = (0, _react.useCallback)(function (_selectedMap) {
348
348
  (0, _newArrowCheck2.default)(this, _this7);
349
349
  var selectedKeys;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucloud-fe/react-components",
3
- "version": "1.3.16",
3
+ "version": "1.3.19",
4
4
  "title": "UCloud react components",
5
5
  "description": "UCloud react components",
6
6
  "keywords": [
@@ -72,7 +72,7 @@
72
72
  "mini-store": "^1.0.2",
73
73
  "moment": "^2.22.2",
74
74
  "prop-types": "^15.7.2",
75
- "rc-dialog": "7.2.1",
75
+ "rc-dialog": "8.5.1",
76
76
  "rc-form": "2.4.12",
77
77
  "rc-slider": "8.6.13",
78
78
  "rc-trigger": "2.5.3",