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.
- package/CHANGELOG.md +466 -0
- package/dist/acud.css +4 -32
- package/dist/acud.css.map +1 -1
- package/dist/acud.js +1091 -482
- package/dist/acud.js.map +1 -1
- package/dist/acud.min.css +1 -1
- package/dist/acud.min.css.map +1 -1
- package/dist/acud.min.js +8 -6
- package/dist/acud.min.js.map +1 -1
- package/es/card/style/index.css +0 -1
- package/es/date-picker/src/PickerPanel.js +0 -1
- package/es/date-picker/src/RangePicker.js +0 -1
- package/es/dialog-box/style/index.css +0 -1
- package/es/form/style/index.css +1 -2
- package/es/input-number/src/hooks/useFrame.d.ts +1 -1
- package/es/input-number/style/index.css +0 -7
- package/es/locale/zh_CN.js +2 -1
- package/es/modal/style/index.css +0 -1
- package/es/pagination/pagination.js +3 -3
- package/es/pagination/rc-pagination/Options.js +1 -1
- package/es/pagination/style/index.css +0 -2
- package/es/popover/style/index.css +0 -1
- package/es/rate/style/index.css +0 -1
- package/es/select/style/index.css +0 -2
- package/es/slider/style/index.css +0 -1
- package/es/switch/style/index.css +0 -1
- package/es/tabs/style/index.css +0 -1
- package/es/tag/style/index.css +0 -1
- package/es/timeline/style/index.css +0 -2
- package/es/transfer/DataSource.d.ts +2 -0
- package/es/transfer/DataSource.js +54 -24
- package/es/transfer/Target.d.ts +2 -0
- package/es/transfer/Target.js +86 -18
- package/es/transfer/index.d.ts +3 -0
- package/es/transfer/index.js +14 -5
- package/es/transfer/style/index.css +2 -1
- package/es/transfer/style/index.less +2 -1
- package/es/tree/style/index.css +0 -3
- package/es/tree-select/style/index.css +0 -3
- package/es/virtual-list/List.js +0 -7
- package/lib/card/style/index.css +0 -1
- package/lib/date-picker/src/PickerPanel.js +0 -1
- package/lib/date-picker/src/RangePicker.js +0 -1
- package/lib/dialog-box/style/index.css +0 -1
- package/lib/form/style/index.css +1 -2
- package/lib/input-number/src/hooks/useFrame.d.ts +1 -1
- package/lib/input-number/style/index.css +0 -7
- package/lib/locale/zh_CN.js +2 -1
- package/lib/modal/style/index.css +0 -1
- package/lib/pagination/pagination.js +3 -3
- package/lib/pagination/rc-pagination/Options.js +1 -1
- package/lib/pagination/style/index.css +0 -2
- package/lib/popover/style/index.css +0 -1
- package/lib/rate/style/index.css +0 -1
- package/lib/select/style/index.css +0 -2
- package/lib/slider/style/index.css +0 -1
- package/lib/switch/style/index.css +0 -1
- package/lib/tabs/style/index.css +0 -1
- package/lib/tag/style/index.css +0 -1
- package/lib/timeline/style/index.css +0 -2
- package/lib/transfer/DataSource.d.ts +2 -0
- package/lib/transfer/DataSource.js +54 -24
- package/lib/transfer/Target.d.ts +2 -0
- package/lib/transfer/Target.js +88 -18
- package/lib/transfer/index.d.ts +3 -0
- package/lib/transfer/index.js +15 -5
- package/lib/transfer/style/index.css +2 -1
- package/lib/transfer/style/index.less +2 -1
- package/lib/tree/style/index.css +0 -3
- package/lib/tree-select/style/index.css +0 -3
- package/lib/virtual-list/List.js +0 -7
- package/package.json +1 -1
package/lib/transfer/index.js
CHANGED
|
@@ -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$
|
|
79
|
-
_React$
|
|
80
|
-
tKeys = _React$
|
|
81
|
-
setTKeys = _React$
|
|
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
|
}
|
package/lib/tree/style/index.css
CHANGED
|
@@ -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 {
|
package/lib/virtual-list/List.js
CHANGED
|
@@ -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,
|