@aloudata/aloudata-design 1.10.1 → 1.10.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.
@@ -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, 'userId');
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
- return searchUserList.concat(selectedUserList);
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: theme.NL50
126
+ color: '#B1B1B1'
126
127
  }, "\u5C55\u5F00"), showLine, nodeProps));
127
128
  },
128
129
  draggable: draggableConfig
@@ -19,6 +19,10 @@
19
19
  .antTreeFn(@tree-prefix-cls);
20
20
  }
21
21
 
22
+ .ald-tree.draggable-tree {
23
+ padding: 3px 0;
24
+ }
25
+
22
26
  .ald-tree-treenode {
23
27
  display: flex;
24
28
  align-items: center;
@@ -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
- inset: 0 0 @tree-node-padding 0;
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;
@@ -11,7 +11,7 @@
11
11
  }
12
12
  }
13
13
 
14
- .fade-motion(fade, antFade);
14
+ .fade-motion(fade, ant-fade);
15
15
 
16
16
  @keyframes ald-fade-in {
17
17
  0% {
@@ -13,10 +13,10 @@
13
13
  }
14
14
  }
15
15
 
16
- .slide-motion(slide-up, antSlideUp);
17
- .slide-motion(slide-down, antSlideDown);
18
- .slide-motion(slide-left, antSlideLeft);
19
- .slide-motion(slide-right, antSlideRight);
16
+ .slide-motion(slide-up, ald-slide-up);
17
+ .slide-motion(slide-down, ald-slide-down);
18
+ .slide-motion(slide-left, ald-slide-left);
19
+ .slide-motion(slide-right, ald-slide-right);
20
20
 
21
21
  @keyframes ald-slide-up-in {
22
22
  0% {
@@ -17,16 +17,16 @@
17
17
  }
18
18
 
19
19
  // For Modal, Select choosen item
20
- .zoom-motion(zoom, antZoom);
20
+ .zoom-motion(zoom, ald-zoom);
21
21
  // For Popover, Popconfirm, Dropdown
22
- .zoom-motion(zoom-big, antZoomBig);
22
+ .zoom-motion(zoom-big, ald-zoom-big);
23
23
  // For Tooltip
24
- .zoom-motion(zoom-big-fast, antZoomBig, @animation-duration-fast);
24
+ .zoom-motion(zoom-big-fast, ald-zoom-big, @animation-duration-fast);
25
25
 
26
- .zoom-motion(zoom-up, antZoomUp);
27
- .zoom-motion(zoom-down, antZoomDown);
28
- .zoom-motion(zoom-left, antZoomLeft);
29
- .zoom-motion(zoom-right, antZoomRight);
26
+ .zoom-motion(zoom-up, ald-zoom-up);
27
+ .zoom-motion(zoom-down, ald-zoom-down);
28
+ .zoom-motion(zoom-left, ald-zoom-left);
29
+ .zoom-motion(zoom-right, ald-zoom-right);
30
30
 
31
31
  @keyframes ald-zoom-in {
32
32
  0% {
@@ -4,6 +4,7 @@
4
4
  @import './themes/default/scrollBar.less';
5
5
  @import './themes/default/index.less';
6
6
  @ald-prefix: ald;
7
+ @ant-prefix: ant;
7
8
 
8
9
  body {
9
10
  font-family: Inter, 'PingFang SC', SimSun, -apple-system, BlinkMacSystemFont,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",