react-toolkits 0.8.14 → 0.8.16
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 +12 -0
- package/lib/{index-5azX_9Kl.chunk.js → index--7vO30v5.chunk.js} +23 -23
- package/lib/index-Muq4Hp6W.chunk.js +5535 -0
- package/lib/{index-9YrrLA8i.chunk.js → index-OUUskcWR.chunk.js} +9 -9
- package/lib/{index-Dc1A4am1.chunk.js → index-VHDWlKrf.chunk.js} +12 -12
- package/lib/index-e-8lXv03.chunk.js +39 -0
- package/lib/{index-1LrZBiTl.chunk.js → index-jZQC_7sU.chunk.js} +11 -11
- package/lib/index.d.ts +14 -2
- package/lib/index.js +33 -29
- package/package.json +3 -3
- package/lib/index-E5HZX0Fa.chunk.js +0 -5121
- package/lib/index-UK1MnaVk.chunk.js +0 -52
- package/lib/index-d0Huxz8c.chunk.js +0 -39
- package/lib/index-r-DD8f-j.chunk.js +0 -378
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as O, w as W,
|
|
1
|
+
import { I as O, w as W, e as h, f as x, s as z, m as w, g as V, U as R, h as U, d as G, r as n, c as K } from "./index-Muq4Hp6W.chunk.js";
|
|
2
2
|
import L, { useRef as o, useCallback as N, useState as $ } from "react";
|
|
3
3
|
const P = O ? (e) => {
|
|
4
4
|
e();
|
|
@@ -28,8 +28,8 @@ const P = O ? (e) => {
|
|
|
28
28
|
data: R,
|
|
29
29
|
error: R,
|
|
30
30
|
isMutating: !1
|
|
31
|
-
}),
|
|
32
|
-
async (
|
|
31
|
+
}), S = g.current, v = N(
|
|
32
|
+
async (T, k) => {
|
|
33
33
|
const [y, I] = z(d.current);
|
|
34
34
|
if (!m.current)
|
|
35
35
|
throw new Error("Can’t trigger the mutation: missing fetcher.");
|
|
@@ -38,22 +38,22 @@ const P = O ? (e) => {
|
|
|
38
38
|
const l = w(w({
|
|
39
39
|
populateCache: !1,
|
|
40
40
|
throwOnError: !0
|
|
41
|
-
}, c.current),
|
|
42
|
-
a.current =
|
|
41
|
+
}, c.current), k), b = V();
|
|
42
|
+
a.current = b, s({
|
|
43
43
|
isMutating: !0
|
|
44
44
|
});
|
|
45
45
|
try {
|
|
46
46
|
const u = await i(
|
|
47
47
|
y,
|
|
48
48
|
m.current(I, {
|
|
49
|
-
arg:
|
|
49
|
+
arg: T
|
|
50
50
|
}),
|
|
51
51
|
// We must throw the error here so we can catch and update the states.
|
|
52
52
|
w(l, {
|
|
53
53
|
throwOnError: !0
|
|
54
54
|
})
|
|
55
55
|
);
|
|
56
|
-
if (a.current <=
|
|
56
|
+
if (a.current <= b) {
|
|
57
57
|
var M, C;
|
|
58
58
|
P(() => s({
|
|
59
59
|
data: u,
|
|
@@ -63,7 +63,7 @@ const P = O ? (e) => {
|
|
|
63
63
|
}
|
|
64
64
|
return u;
|
|
65
65
|
} catch (u) {
|
|
66
|
-
if (a.current <=
|
|
66
|
+
if (a.current <= b) {
|
|
67
67
|
var E, A;
|
|
68
68
|
if (P(() => s({
|
|
69
69
|
error: u,
|
|
@@ -75,7 +75,7 @@ const P = O ? (e) => {
|
|
|
75
75
|
},
|
|
76
76
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
77
|
[]
|
|
78
|
-
),
|
|
78
|
+
), D = N(() => {
|
|
79
79
|
a.current = V(), s({
|
|
80
80
|
data: R,
|
|
81
81
|
error: R,
|
|
@@ -86,15 +86,15 @@ const P = O ? (e) => {
|
|
|
86
86
|
d.current = e, m.current = t, c.current = r;
|
|
87
87
|
}), {
|
|
88
88
|
trigger: v,
|
|
89
|
-
reset:
|
|
89
|
+
reset: D,
|
|
90
90
|
get data() {
|
|
91
|
-
return p.data = !0,
|
|
91
|
+
return p.data = !0, S.data;
|
|
92
92
|
},
|
|
93
93
|
get error() {
|
|
94
|
-
return p.error = !0,
|
|
94
|
+
return p.error = !0, S.error;
|
|
95
95
|
},
|
|
96
96
|
get isMutating() {
|
|
97
|
-
return p.isMutating = !0,
|
|
97
|
+
return p.isMutating = !0, S.isMutating;
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
}, f = W(h, q);
|
|
@@ -199,14 +199,14 @@ function re() {
|
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
export {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
ee as a,
|
|
203
|
+
J as b,
|
|
204
|
+
te as c,
|
|
205
|
+
_ as d,
|
|
206
|
+
X as e,
|
|
207
|
+
Z as f,
|
|
208
|
+
Q as g,
|
|
209
|
+
B as h,
|
|
210
|
+
H as i,
|
|
211
|
+
re as u
|
|
212
212
|
};
|