acud 1.0.7 → 1.0.10

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +466 -0
  2. package/dist/acud.css +4 -32
  3. package/dist/acud.css.map +1 -1
  4. package/dist/acud.js +1091 -482
  5. package/dist/acud.js.map +1 -1
  6. package/dist/acud.min.css +1 -1
  7. package/dist/acud.min.css.map +1 -1
  8. package/dist/acud.min.js +8 -6
  9. package/dist/acud.min.js.map +1 -1
  10. package/es/card/style/index.css +0 -1
  11. package/es/date-picker/src/PickerPanel.js +0 -1
  12. package/es/date-picker/src/RangePicker.js +0 -1
  13. package/es/dialog-box/style/index.css +0 -1
  14. package/es/form/style/index.css +1 -2
  15. package/es/input-number/src/hooks/useFrame.d.ts +1 -1
  16. package/es/input-number/style/index.css +0 -7
  17. package/es/locale/zh_CN.js +2 -1
  18. package/es/modal/style/index.css +0 -1
  19. package/es/pagination/pagination.js +3 -3
  20. package/es/pagination/rc-pagination/Options.js +1 -1
  21. package/es/pagination/style/index.css +0 -2
  22. package/es/popover/style/index.css +0 -1
  23. package/es/rate/style/index.css +0 -1
  24. package/es/select/style/index.css +0 -2
  25. package/es/slider/style/index.css +0 -1
  26. package/es/switch/style/index.css +0 -1
  27. package/es/tabs/style/index.css +0 -1
  28. package/es/tag/style/index.css +0 -1
  29. package/es/timeline/style/index.css +0 -2
  30. package/es/transfer/DataSource.d.ts +2 -0
  31. package/es/transfer/DataSource.js +54 -24
  32. package/es/transfer/Target.d.ts +2 -0
  33. package/es/transfer/Target.js +86 -18
  34. package/es/transfer/index.d.ts +3 -0
  35. package/es/transfer/index.js +14 -5
  36. package/es/transfer/style/index.css +2 -1
  37. package/es/transfer/style/index.less +2 -1
  38. package/es/tree/style/index.css +0 -3
  39. package/es/tree-select/style/index.css +0 -3
  40. package/es/virtual-list/List.js +0 -7
  41. package/lib/card/style/index.css +0 -1
  42. package/lib/date-picker/src/PickerPanel.js +0 -1
  43. package/lib/date-picker/src/RangePicker.js +0 -1
  44. package/lib/dialog-box/style/index.css +0 -1
  45. package/lib/form/style/index.css +1 -2
  46. package/lib/input-number/src/hooks/useFrame.d.ts +1 -1
  47. package/lib/input-number/style/index.css +0 -7
  48. package/lib/locale/zh_CN.js +2 -1
  49. package/lib/modal/style/index.css +0 -1
  50. package/lib/pagination/pagination.js +3 -3
  51. package/lib/pagination/rc-pagination/Options.js +1 -1
  52. package/lib/pagination/style/index.css +0 -2
  53. package/lib/popover/style/index.css +0 -1
  54. package/lib/rate/style/index.css +0 -1
  55. package/lib/select/style/index.css +0 -2
  56. package/lib/slider/style/index.css +0 -1
  57. package/lib/switch/style/index.css +0 -1
  58. package/lib/tabs/style/index.css +0 -1
  59. package/lib/tag/style/index.css +0 -1
  60. package/lib/timeline/style/index.css +0 -2
  61. package/lib/transfer/DataSource.d.ts +2 -0
  62. package/lib/transfer/DataSource.js +54 -24
  63. package/lib/transfer/Target.d.ts +2 -0
  64. package/lib/transfer/Target.js +88 -18
  65. package/lib/transfer/index.d.ts +3 -0
  66. package/lib/transfer/index.js +15 -5
  67. package/lib/transfer/style/index.css +2 -1
  68. package/lib/transfer/style/index.less +2 -1
  69. package/lib/tree/style/index.css +0 -3
  70. package/lib/tree-select/style/index.css +0 -3
  71. package/lib/virtual-list/List.js +0 -7
  72. package/package.json +1 -1
@@ -45,7 +45,13 @@ function transfer(props) {
45
45
  _props$locale = props.locale,
46
46
  locale = _props$locale === void 0 ? {} : _props$locale,
47
47
  dataSource = props.dataSource;
48
- var userLocale = (0, _extends2["default"])((0, _extends2["default"])({}, _default["default"].Transfer), locale); // 二级数据展开成一级数据
48
+ var userLocale = (0, _extends2["default"])((0, _extends2["default"])({}, _default["default"].Transfer), locale);
49
+
50
+ var _React$useState = React.useState(false),
51
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
52
+ loading = _React$useState2[0],
53
+ setLoading = _React$useState2[1]; // 二级数据展开成一级数据
54
+
49
55
 
50
56
  var expansionSource = React.useMemo(function () {
51
57
  var expansionArr = [];
@@ -75,10 +81,10 @@ function transfer(props) {
75
81
  return expansionArr;
76
82
  }, [dataSource]);
77
83
 
78
- var _React$useState = React.useState(targetKeys || []),
79
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
80
- tKeys = _React$useState2[0],
81
- setTKeys = _React$useState2[1];
84
+ var _React$useState3 = React.useState(targetKeys || []),
85
+ _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
86
+ tKeys = _React$useState4[0],
87
+ setTKeys = _React$useState4[1];
82
88
 
83
89
  var mergedKeys = 'targetKeys' in props ? targetKeys : tKeys;
84
90
  React.useEffect(function () {
@@ -93,6 +99,8 @@ function transfer(props) {
93
99
  prefixCls: prefixCls,
94
100
  tKeys: mergedKeys,
95
101
  setTKeys: setTKeys,
102
+ loading: loading,
103
+ setLoading: setLoading,
96
104
  expansionSource: expansionSource
97
105
  })), /*#__PURE__*/React.createElement(_Target["default"], (0, _extends2["default"])({}, props, {
98
106
  displayType: displayType,
@@ -100,6 +108,8 @@ function transfer(props) {
100
108
  prefixCls: prefixCls,
101
109
  tKeys: mergedKeys,
102
110
  setTKeys: setTKeys,
111
+ loading: loading,
112
+ setLoading: setLoading,
103
113
  expansionSource: expansionSource
104
114
  })));
105
115
  }
@@ -49,7 +49,8 @@
49
49
  .acud-transfer-datasource-label {
50
50
  color: #151B26;
51
51
  font-size: 12px;
52
- font-weight: #FFECD4;
52
+ font-weight: 400;
53
+ word-break: break-all;
53
54
  }
54
55
  .acud-transfer-datasource-body {
55
56
  overflow: hidden;
@@ -42,7 +42,8 @@
42
42
  &-label {
43
43
  color: @G2;
44
44
  font-size: @T2;
45
- font-weight: @W2;
45
+ font-weight: @font-weight-400;
46
+ word-break: break-all;
46
47
  }
47
48
  &-body {
48
49
  overflow: hidden;
@@ -277,7 +277,6 @@
277
277
  white-space: nowrap;
278
278
  -webkit-user-select: none;
279
279
  -moz-user-select: none;
280
- -ms-user-select: none;
281
280
  user-select: none;
282
281
  }
283
282
  .acud-tree-indent-unit {
@@ -295,7 +294,6 @@
295
294
  cursor: pointer;
296
295
  -webkit-user-select: none;
297
296
  -moz-user-select: none;
298
- -ms-user-select: none;
299
297
  user-select: none;
300
298
  }
301
299
  .acud-tree-switcher .acud-tree-switcher-icon,
@@ -437,7 +435,6 @@
437
435
  line-height: 24px;
438
436
  -webkit-user-select: none;
439
437
  -moz-user-select: none;
440
- -ms-user-select: none;
441
438
  user-select: none;
442
439
  }
443
440
  .acud-tree-node-content-wrapper .acud-tree-drop-indicator {
@@ -292,7 +292,6 @@
292
292
  white-space: nowrap;
293
293
  -webkit-user-select: none;
294
294
  -moz-user-select: none;
295
- -ms-user-select: none;
296
295
  user-select: none;
297
296
  }
298
297
  .acud-select-tree-indent-unit {
@@ -310,7 +309,6 @@
310
309
  cursor: pointer;
311
310
  -webkit-user-select: none;
312
311
  -moz-user-select: none;
313
- -ms-user-select: none;
314
312
  user-select: none;
315
313
  }
316
314
  .acud-select-tree-switcher .acud-tree-switcher-icon,
@@ -452,7 +450,6 @@
452
450
  line-height: 24px;
453
451
  -webkit-user-select: none;
454
452
  -moz-user-select: none;
455
- -ms-user-select: none;
456
453
  user-select: none;
457
454
  }
458
455
  .acud-select-tree-node-content-wrapper .acud-tree-drop-indicator {
@@ -165,7 +165,6 @@ function RawList(props, ref) {
165
165
  } // Always use virtual scroll bar in avoid shaking
166
166
 
167
167
 
168
- // Always use virtual scroll bar in avoid shaking
169
168
  if (!inVirtual) {
170
169
  return {
171
170
  scrollHeight: ((_a = fillerInnerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0,
@@ -187,14 +186,12 @@ function RawList(props, ref) {
187
186
  var cacheHeight = heights.get(key);
188
187
  var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight); // Check item top in the range
189
188
 
190
- // Check item top in the range
191
189
  if (currentItemBottom >= scrollTop && startIndex === undefined) {
192
190
  startIndex = i;
193
191
  startOffset = itemTop;
194
192
  } // Check item bottom in the range. We will render additional one item for motion usage
195
193
 
196
194
 
197
- // Check item bottom in the range. We will render additional one item for motion usage
198
195
  if (currentItemBottom > scrollTop + height && endIndex === undefined) {
199
196
  endIndex = i;
200
197
  }
@@ -205,9 +202,6 @@ function RawList(props, ref) {
205
202
  /* istanbul ignore next */
206
203
 
207
204
 
208
- // Fallback to normal if not match. This code should never reach
209
-
210
- /* istanbul ignore next */
211
205
  if (startIndex === undefined) {
212
206
  startIndex = 0;
213
207
  startOffset = 0;
@@ -218,7 +212,6 @@ function RawList(props, ref) {
218
212
  } // Give cache to improve scroll experience
219
213
 
220
214
 
221
- // Give cache to improve scroll experience
222
215
  endIndex = Math.min(endIndex + 1, mergedData.length);
223
216
  return {
224
217
  scrollHeight: itemTop,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acud",
3
- "version": "1.0.7",
3
+ "version": "1.0.10",
4
4
  "description": "acg react 组件库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",