@nutui/nutui-react-taro 1.5.1 → 1.5.2-beta.1
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 +8 -0
- package/dist/esm/CountDown.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{countdown.taro-dbcb9a4f.js → countdown.taro-5b17c607.js} +3 -2
- package/dist/esm/nutui-react.es.js +2 -2
- package/dist/esm/{uploader.taro-5a53aa33.js → uploader.taro-587e6bf3.js} +2 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +27 -22
- package/dist/nutui.react.umd.js +27 -22
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/esm/CountDown.js
CHANGED
package/dist/esm/Uploader.js
CHANGED
|
@@ -10,10 +10,11 @@ const defaultProps = {
|
|
|
10
10
|
format: 'HH:mm:ss',
|
|
11
11
|
autoStart: true,
|
|
12
12
|
time: 0,
|
|
13
|
+
destroy: false,
|
|
13
14
|
};
|
|
14
15
|
const InternalCountDown = (props, ref) => {
|
|
15
16
|
useConfig();
|
|
16
|
-
const { paused, startTime, endTime, millisecond, format, autoStart, time, className, style, onEnd, onPaused, onRestart, onUpdate, children, ...rest } = { ...defaultProps, ...props };
|
|
17
|
+
const { paused, startTime, endTime, millisecond, format, autoStart, time, destroy, className, style, onEnd, onPaused, onRestart, onUpdate, children, ...rest } = { ...defaultProps, ...props };
|
|
17
18
|
const b = cn('countdown');
|
|
18
19
|
const [restTimeStamp, setRestTime] = useState(0);
|
|
19
20
|
const stateRef = useRef({
|
|
@@ -207,7 +208,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
207
208
|
return componentWillUnmount;
|
|
208
209
|
}, []);
|
|
209
210
|
const componentWillUnmount = () => {
|
|
210
|
-
|
|
211
|
+
destroy && cancelAnimationFrame(stateRef.current.timer);
|
|
211
212
|
};
|
|
212
213
|
const renderTime = (() => {
|
|
213
214
|
return formatRemainTime(stateRef.current.restTime);
|
|
@@ -44,7 +44,7 @@ export { R as Rate } from './rate.taro-6cdf03bd.js';
|
|
|
44
44
|
export { S as SearchBar } from './searchbar.taro-0c25927b.js';
|
|
45
45
|
export { S as ShortPassword } from './shortpassword.taro-9ee034f7.js';
|
|
46
46
|
export { T as TextArea } from './textarea.taro-442e7350.js';
|
|
47
|
-
export { U as Uploader } from './uploader.taro-
|
|
47
|
+
export { U as Uploader } from './uploader.taro-587e6bf3.js';
|
|
48
48
|
export { A as ActionSheet } from './actionsheet.taro-e6a51446.js';
|
|
49
49
|
export { B as BackTop } from './backtop.taro-66394a36.js';
|
|
50
50
|
export { B as Dialog } from './dialog.taro-a3267d29.js';
|
|
@@ -64,7 +64,7 @@ export { B as Badge } from './badge.taro-a4e59c11.js';
|
|
|
64
64
|
export { C as CircleProgress } from './circleprogress.taro-79854448.js';
|
|
65
65
|
export { C as Collapse } from './collapse.taro-1a9e4ba2.js';
|
|
66
66
|
export { C as CollapseItem } from './collapseitem-4d0bc55d.js';
|
|
67
|
-
export { C as CountDown } from './countdown.taro-
|
|
67
|
+
export { C as CountDown } from './countdown.taro-5b17c607.js';
|
|
68
68
|
export { E as Ellipsis } from './ellipsis.taro-f15f26da.js';
|
|
69
69
|
export { E as Empty } from './empty.taro-04ae4389.js';
|
|
70
70
|
export { I as ImagePreview } from './imagepreview.taro-c50bb0a3.js';
|
|
@@ -321,6 +321,7 @@ const InternalUploader = (props, ref) => {
|
|
|
321
321
|
responseText,
|
|
322
322
|
option,
|
|
323
323
|
fileList,
|
|
324
|
+
file: fileItem,
|
|
324
325
|
});
|
|
325
326
|
};
|
|
326
327
|
uploadOption.onFailure = (responseText, option) => {
|
|
@@ -338,6 +339,7 @@ const InternalUploader = (props, ref) => {
|
|
|
338
339
|
responseText,
|
|
339
340
|
option,
|
|
340
341
|
fileList,
|
|
342
|
+
file: fileItem,
|
|
341
343
|
});
|
|
342
344
|
};
|
|
343
345
|
const task = new UploaderTaro(uploadOption);
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v1.5.1 Wed Apr
|
|
8
|
+
* @nutui/nutui-react-taro v1.5.2-beta.1 Wed Apr 26 2023 16:35:06 GMT+0800 (中国标准时间)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -31,37 +31,37 @@ function requireClassname_production_min() {
|
|
|
31
31
|
return classname_production_min;
|
|
32
32
|
hasRequiredClassname_production_min = 1;
|
|
33
33
|
function r(r2) {
|
|
34
|
-
function
|
|
35
|
-
var f = i ?
|
|
34
|
+
function t2(t3, i, a, o) {
|
|
35
|
+
var f = i ? e + t3 + r2.e + i : e + t3, v = f;
|
|
36
36
|
if (a) {
|
|
37
|
-
var
|
|
38
|
-
for (var
|
|
39
|
-
if (a.hasOwnProperty(
|
|
40
|
-
var p = a[
|
|
41
|
-
true === p ? v +=
|
|
37
|
+
var s = " " + v + r2.m;
|
|
38
|
+
for (var u in a)
|
|
39
|
+
if (a.hasOwnProperty(u)) {
|
|
40
|
+
var p = a[u];
|
|
41
|
+
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
if (void 0 !== o)
|
|
45
|
-
for (var
|
|
46
|
-
var
|
|
47
|
-
if (
|
|
48
|
-
for (var g =
|
|
45
|
+
for (var y = 0, c = (o = Array.isArray(o) ? o : [o]).length; y < c; y++) {
|
|
46
|
+
var l = o[y];
|
|
47
|
+
if (l && "string" == typeof l.valueOf())
|
|
48
|
+
for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
49
49
|
var h = g[d];
|
|
50
50
|
h !== f && (v += " " + h);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
return v;
|
|
54
54
|
}
|
|
55
|
-
var
|
|
56
|
-
return function(r3,
|
|
55
|
+
var e = r2.n || "", n = r2.v || r2.m;
|
|
56
|
+
return function(r3, e2) {
|
|
57
57
|
return function(n2, i, a) {
|
|
58
|
-
return "string" == typeof n2 ? Array.isArray(i) ?
|
|
58
|
+
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r3, n2, void 0, i) : t2(r3, n2, i, a) : t2(r3, e2, n2, i);
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
63
|
-
var
|
|
64
|
-
classname_production_min.cn =
|
|
63
|
+
var t = r({ e: "-", m: "_" });
|
|
64
|
+
classname_production_min.cn = t, classname_production_min.withNaming = r;
|
|
65
65
|
return classname_production_min;
|
|
66
66
|
}
|
|
67
67
|
var classname_development = {};
|
|
@@ -91,6 +91,7 @@ function requireClassname_development() {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
if (mix !== void 0) {
|
|
94
|
+
mix = Array.isArray(mix) ? mix : [mix];
|
|
94
95
|
for (var i = 0, len = mix.length; i < len; i++) {
|
|
95
96
|
var value = mix[i];
|
|
96
97
|
if (!value || typeof value.valueOf() !== "string")
|
|
@@ -109,7 +110,7 @@ function requireClassname_development() {
|
|
|
109
110
|
return function cnGenerator(b2, e) {
|
|
110
111
|
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
111
112
|
if (typeof elemOrMods === "string") {
|
|
112
|
-
if (Array.isArray(elemModsOrBlockMix)) {
|
|
113
|
+
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
113
114
|
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
114
115
|
}
|
|
115
116
|
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
@@ -10519,7 +10520,8 @@ const InternalUploader = (props, ref) => {
|
|
|
10519
10520
|
onSuccess && onSuccess({
|
|
10520
10521
|
responseText,
|
|
10521
10522
|
option,
|
|
10522
|
-
fileList
|
|
10523
|
+
fileList,
|
|
10524
|
+
file: fileItem
|
|
10523
10525
|
});
|
|
10524
10526
|
};
|
|
10525
10527
|
uploadOption.onFailure = (responseText, option) => {
|
|
@@ -10535,7 +10537,8 @@ const InternalUploader = (props, ref) => {
|
|
|
10535
10537
|
onFailure && onFailure({
|
|
10536
10538
|
responseText,
|
|
10537
10539
|
option,
|
|
10538
|
-
fileList
|
|
10540
|
+
fileList,
|
|
10541
|
+
file: fileItem
|
|
10539
10542
|
});
|
|
10540
10543
|
};
|
|
10541
10544
|
const task = new UploaderTaro(uploadOption);
|
|
@@ -17353,7 +17356,8 @@ const defaultProps$q = {
|
|
|
17353
17356
|
millisecond: false,
|
|
17354
17357
|
format: "HH:mm:ss",
|
|
17355
17358
|
autoStart: true,
|
|
17356
|
-
time: 0
|
|
17359
|
+
time: 0,
|
|
17360
|
+
destroy: false
|
|
17357
17361
|
};
|
|
17358
17362
|
const InternalCountDown = (props, ref) => {
|
|
17359
17363
|
useConfig$1();
|
|
@@ -17365,6 +17369,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
17365
17369
|
format,
|
|
17366
17370
|
autoStart,
|
|
17367
17371
|
time,
|
|
17372
|
+
destroy,
|
|
17368
17373
|
className,
|
|
17369
17374
|
style,
|
|
17370
17375
|
onEnd,
|
|
@@ -17556,7 +17561,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
17556
17561
|
return componentWillUnmount;
|
|
17557
17562
|
}, []);
|
|
17558
17563
|
const componentWillUnmount = () => {
|
|
17559
|
-
|
|
17564
|
+
destroy && cancelAnimationFrame(stateRef.current.timer);
|
|
17560
17565
|
};
|
|
17561
17566
|
const renderTime = (() => {
|
|
17562
17567
|
return formatRemainTime(stateRef.current.restTime);
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v1.5.1 Wed Apr
|
|
11
|
+
* @nutui/nutui-react-taro v1.5.2-beta.1 Wed Apr 26 2023 16:35:06 GMT+0800 (中国标准时间)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -47,37 +47,37 @@ var __publicField = (obj, key, value) => {
|
|
|
47
47
|
return classname_production_min;
|
|
48
48
|
hasRequiredClassname_production_min = 1;
|
|
49
49
|
function r(r2) {
|
|
50
|
-
function
|
|
51
|
-
var f = i ?
|
|
50
|
+
function t2(t3, i, a, o) {
|
|
51
|
+
var f = i ? e + t3 + r2.e + i : e + t3, v = f;
|
|
52
52
|
if (a) {
|
|
53
|
-
var
|
|
54
|
-
for (var
|
|
55
|
-
if (a.hasOwnProperty(
|
|
56
|
-
var p = a[
|
|
57
|
-
true === p ? v +=
|
|
53
|
+
var s = " " + v + r2.m;
|
|
54
|
+
for (var u in a)
|
|
55
|
+
if (a.hasOwnProperty(u)) {
|
|
56
|
+
var p = a[u];
|
|
57
|
+
true === p ? v += s + u : p && (v += s + u + n + p);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
if (void 0 !== o)
|
|
61
|
-
for (var
|
|
62
|
-
var
|
|
63
|
-
if (
|
|
64
|
-
for (var g =
|
|
61
|
+
for (var y = 0, c = (o = Array.isArray(o) ? o : [o]).length; y < c; y++) {
|
|
62
|
+
var l = o[y];
|
|
63
|
+
if (l && "string" == typeof l.valueOf())
|
|
64
|
+
for (var g = l.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
65
65
|
var h = g[d];
|
|
66
66
|
h !== f && (v += " " + h);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
return v;
|
|
70
70
|
}
|
|
71
|
-
var
|
|
72
|
-
return function(r3,
|
|
71
|
+
var e = r2.n || "", n = r2.v || r2.m;
|
|
72
|
+
return function(r3, e2) {
|
|
73
73
|
return function(n2, i, a) {
|
|
74
|
-
return "string" == typeof n2 ? Array.isArray(i) ?
|
|
74
|
+
return "string" == typeof n2 ? "string" == typeof i || Array.isArray(i) ? t2(r3, n2, void 0, i) : t2(r3, n2, i, a) : t2(r3, e2, n2, i);
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
79
|
-
var
|
|
80
|
-
classname_production_min.cn =
|
|
79
|
+
var t = r({ e: "-", m: "_" });
|
|
80
|
+
classname_production_min.cn = t, classname_production_min.withNaming = r;
|
|
81
81
|
return classname_production_min;
|
|
82
82
|
}
|
|
83
83
|
var classname_development = {};
|
|
@@ -107,6 +107,7 @@ var __publicField = (obj, key, value) => {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
if (mix !== void 0) {
|
|
110
|
+
mix = Array.isArray(mix) ? mix : [mix];
|
|
110
111
|
for (var i = 0, len = mix.length; i < len; i++) {
|
|
111
112
|
var value = mix[i];
|
|
112
113
|
if (!value || typeof value.valueOf() !== "string")
|
|
@@ -125,7 +126,7 @@ var __publicField = (obj, key, value) => {
|
|
|
125
126
|
return function cnGenerator(b2, e) {
|
|
126
127
|
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
127
128
|
if (typeof elemOrMods === "string") {
|
|
128
|
-
if (Array.isArray(elemModsOrBlockMix)) {
|
|
129
|
+
if (typeof elemModsOrBlockMix === "string" || Array.isArray(elemModsOrBlockMix)) {
|
|
129
130
|
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
130
131
|
}
|
|
131
132
|
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
@@ -10535,7 +10536,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10535
10536
|
onSuccess && onSuccess({
|
|
10536
10537
|
responseText,
|
|
10537
10538
|
option,
|
|
10538
|
-
fileList
|
|
10539
|
+
fileList,
|
|
10540
|
+
file: fileItem
|
|
10539
10541
|
});
|
|
10540
10542
|
};
|
|
10541
10543
|
uploadOption.onFailure = (responseText, option) => {
|
|
@@ -10551,7 +10553,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10551
10553
|
onFailure && onFailure({
|
|
10552
10554
|
responseText,
|
|
10553
10555
|
option,
|
|
10554
|
-
fileList
|
|
10556
|
+
fileList,
|
|
10557
|
+
file: fileItem
|
|
10555
10558
|
});
|
|
10556
10559
|
};
|
|
10557
10560
|
const task = new UploaderTaro(uploadOption);
|
|
@@ -17369,7 +17372,8 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17369
17372
|
millisecond: false,
|
|
17370
17373
|
format: "HH:mm:ss",
|
|
17371
17374
|
autoStart: true,
|
|
17372
|
-
time: 0
|
|
17375
|
+
time: 0,
|
|
17376
|
+
destroy: false
|
|
17373
17377
|
};
|
|
17374
17378
|
const InternalCountDown = (props, ref) => {
|
|
17375
17379
|
useConfig$1();
|
|
@@ -17381,6 +17385,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17381
17385
|
format,
|
|
17382
17386
|
autoStart,
|
|
17383
17387
|
time,
|
|
17388
|
+
destroy,
|
|
17384
17389
|
className,
|
|
17385
17390
|
style,
|
|
17386
17391
|
onEnd,
|
|
@@ -17572,7 +17577,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17572
17577
|
return componentWillUnmount;
|
|
17573
17578
|
}, []);
|
|
17574
17579
|
const componentWillUnmount = () => {
|
|
17575
|
-
|
|
17580
|
+
destroy && cancelAnimationFrame(stateRef.current.timer);
|
|
17576
17581
|
};
|
|
17577
17582
|
const renderTime = (() => {
|
|
17578
17583
|
return formatRemainTime(stateRef.current.restTime);
|