@aloudata/aloudata-design 1.10.1 → 1.10.2
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.
|
@@ -7,6 +7,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
import { message } from "../..";
|
|
9
9
|
import ConfigProvider from "../../ConfigProvider";
|
|
10
|
+
import { EUserType } from "../../ConfigProvider/getUserList";
|
|
10
11
|
import { useRequest } from 'ahooks';
|
|
11
12
|
import _ from 'lodash';
|
|
12
13
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
@@ -79,7 +80,10 @@ export var PanelWrapper = function PanelWrapper(_ref) {
|
|
|
79
80
|
run = _useRequest.run;
|
|
80
81
|
var totalUserList = useMemo(function () {
|
|
81
82
|
var totalUsers = searchUserList.concat(selectedUserList);
|
|
82
|
-
return _.uniqBy(totalUsers,
|
|
83
|
+
return _.uniqBy(totalUsers, function (data) {
|
|
84
|
+
if (data.type === EUserType.USER) return data.userId;
|
|
85
|
+
return data.groupId;
|
|
86
|
+
});
|
|
83
87
|
}, [searchUserList, selectedUserList]);
|
|
84
88
|
useEffect(function () {
|
|
85
89
|
run();
|
|
@@ -12,6 +12,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { useRequest } from 'ahooks';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
+
import _ from 'lodash';
|
|
15
16
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
17
|
import ConfigProvider from "../ConfigProvider";
|
|
17
18
|
import { EUserType } from "../ConfigProvider/getUserList";
|
|
@@ -104,7 +105,11 @@ var MemberSelector = function MemberSelector(_ref) {
|
|
|
104
105
|
loading = _useRequest.loading,
|
|
105
106
|
run = _useRequest.run;
|
|
106
107
|
var totalUserList = useMemo(function () {
|
|
107
|
-
|
|
108
|
+
var totalUsers = searchUserList.concat(selectedUserList);
|
|
109
|
+
return _.uniqBy(totalUsers, function (data) {
|
|
110
|
+
if (data.type === EUserType.USER) return data.userId;
|
|
111
|
+
return data.groupId;
|
|
112
|
+
});
|
|
108
113
|
}, [searchUserList, selectedUserList]);
|
|
109
114
|
useEffect(function () {
|
|
110
115
|
if (!dropdownOpen) return;
|
package/dist/Tree/Tree.js
CHANGED
|
@@ -101,7 +101,8 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
101
101
|
indentWidth += level * (iconSize / 2);
|
|
102
102
|
return /*#__PURE__*/React.createElement("span", {
|
|
103
103
|
style: {
|
|
104
|
-
width: indentWidth
|
|
104
|
+
width: indentWidth,
|
|
105
|
+
flexShrink: 0
|
|
105
106
|
}
|
|
106
107
|
});
|
|
107
108
|
};
|
|
@@ -122,7 +123,7 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
122
123
|
switcherIcon: function switcherIcon(nodeProps) {
|
|
123
124
|
return /*#__PURE__*/React.createElement(React.Fragment, null, renderIndent(nodeProps), renderSwitcherIcon(prefixCls, /*#__PURE__*/React.createElement(ChevronDownLine, {
|
|
124
125
|
size: size === 'small' ? TREE_SWITCH_CION_SIZE : TREE_SWITCH_LARGE_ICON_SIZE,
|
|
125
|
-
color:
|
|
126
|
+
color: '#B1B1B1'
|
|
126
127
|
}, "\u5C55\u5F00"), showLine, nodeProps));
|
|
127
128
|
},
|
|
128
129
|
draggable: draggableConfig
|
|
@@ -27,18 +27,6 @@
|
|
|
27
27
|
background-color: @primary-color;
|
|
28
28
|
border-radius: 1px;
|
|
29
29
|
pointer-events: none;
|
|
30
|
-
|
|
31
|
-
&::after {
|
|
32
|
-
position: absolute;
|
|
33
|
-
top: -3px;
|
|
34
|
-
left: -6px;
|
|
35
|
-
width: 8px;
|
|
36
|
-
height: 8px;
|
|
37
|
-
background-color: transparent;
|
|
38
|
-
border: 2px solid @primary-color;
|
|
39
|
-
border-radius: 50%;
|
|
40
|
-
content: '';
|
|
41
|
-
}
|
|
42
30
|
}
|
|
43
31
|
}
|
|
44
32
|
|
|
@@ -74,7 +62,10 @@
|
|
|
74
62
|
|
|
75
63
|
&::after {
|
|
76
64
|
position: absolute;
|
|
77
|
-
|
|
65
|
+
left: 0;
|
|
66
|
+
top: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
bottom: 0;
|
|
78
69
|
border: 1px solid @primary-color;
|
|
79
70
|
opacity: 0;
|
|
80
71
|
animation: ant-tree-node-fx-do-not-use 0.3s;
|
|
@@ -90,9 +81,6 @@
|
|
|
90
81
|
// ===================== TreeNode =====================
|
|
91
82
|
.@{custom-tree-node-prefix-cls} {
|
|
92
83
|
display: flex;
|
|
93
|
-
align-items: flex-start;
|
|
94
|
-
padding: 0 0 @tree-node-padding 0;
|
|
95
|
-
outline: none;
|
|
96
84
|
// Disabled
|
|
97
85
|
&-disabled {
|
|
98
86
|
// >>> Title
|
|
@@ -137,18 +125,6 @@
|
|
|
137
125
|
}
|
|
138
126
|
}
|
|
139
127
|
|
|
140
|
-
// >>> Indent
|
|
141
|
-
&-indent {
|
|
142
|
-
align-self: stretch;
|
|
143
|
-
white-space: nowrap;
|
|
144
|
-
user-select: none;
|
|
145
|
-
|
|
146
|
-
&-unit {
|
|
147
|
-
display: inline-block;
|
|
148
|
-
width: @tree-title-height;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
128
|
// >>> Drag Handler
|
|
153
129
|
&-draggable-icon {
|
|
154
130
|
visibility: hidden;
|
|
@@ -161,7 +137,6 @@
|
|
|
161
137
|
position: relative;
|
|
162
138
|
flex: none;
|
|
163
139
|
align-self: stretch;
|
|
164
|
-
width: @tree-title-height;
|
|
165
140
|
margin: 0;
|
|
166
141
|
line-height: @tree-title-height;
|
|
167
142
|
text-align: center;
|