@hortiview/modulebase 0.0.13101-beta → 0.0.13102-beta
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/dist/{isRestoring-LSIsLTaI.js → IsRestoringProvider-B1U_sG8s.js} +86 -78
- package/dist/{ModuleCore-BWvRhZyP.js → ModuleCore-DcwaLp89.js} +4360 -4318
- package/dist/{QueryClientProvider-BSM1ol7r.js → QueryClientProvider-C7EHlqBQ.js} +102 -98
- package/dist/chunk-QMGIS6GS-C4bgXQXY.js +9203 -0
- package/dist/components/ModuleBase.js +2 -2
- package/dist/components/ModuleCore.js +1 -1
- package/dist/hooks/useCustom.js +1 -1
- package/dist/hooks/useCustomMutation.js +2 -2
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOffline.js +1 -1
- package/dist/hooks/useOption.js +1 -1
- package/dist/hooks/useServiceBus.js +1 -1
- package/dist/lib/hooks/useCustom.d.ts +1 -1
- package/dist/lib/hooks/useStores.d.ts +2 -1
- package/dist/lib/types/ActionStorage.d.ts +1 -0
- package/dist/lib/types/BaseProps.d.ts +1 -0
- package/dist/main.js +126 -118
- package/dist/module-router.js +101 -93
- package/dist/{mutation-EhVtpjb0.js → mutation-CJplExaP.js} +17 -14
- package/dist/types/ActionStorage.js +2 -2
- package/dist/{useMutation-BYO7aks8.js → useMutation-BEK2_IOo.js} +16 -17
- package/dist/{useQuery-Jx956wwH.js → useQuery-B23OSvXW.js} +124 -136
- package/dist/utils/helper.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-IR6S3I6Y-BmDdD3SP.js +0 -8162
- package/dist/utils-DxRR_XLb.js +0 -9
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { S as
|
|
2
|
-
import { f as
|
|
1
|
+
import { S as H, p as M, d as f, s as E, f as R, a as Q, k as T, l as _, t as N, m as V, r as L, n as q, b as z, u as W } from "./QueryClientProvider-C7EHlqBQ.js";
|
|
2
|
+
import { f as K, u as $ } from "./IsRestoringProvider-B1U_sG8s.js";
|
|
3
3
|
import * as y from "react";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
var G = class extends B {
|
|
5
|
+
var G = class extends H {
|
|
7
6
|
constructor(e, t) {
|
|
8
|
-
super(), this.options = t, this.#s = e, this.#
|
|
7
|
+
super(), this.options = t, this.#s = e, this.#i = null, this.#r = M(), this.options.experimental_prefetchInRender || this.#r.reject(
|
|
9
8
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
10
9
|
), this.bindMethods(), this.setOptions(t);
|
|
11
10
|
}
|
|
@@ -15,8 +14,8 @@ var G = class extends B {
|
|
|
15
14
|
#t = void 0;
|
|
16
15
|
#a;
|
|
17
16
|
#c;
|
|
18
|
-
#i;
|
|
19
17
|
#r;
|
|
18
|
+
#i;
|
|
20
19
|
#y;
|
|
21
20
|
#l;
|
|
22
21
|
// This property keeps track of the last query with defined data.
|
|
@@ -36,14 +35,14 @@ var G = class extends B {
|
|
|
36
35
|
this.hasListeners() || this.destroy();
|
|
37
36
|
}
|
|
38
37
|
shouldFetchOnReconnect() {
|
|
39
|
-
return
|
|
38
|
+
return I(
|
|
40
39
|
this.#e,
|
|
41
40
|
this.options,
|
|
42
41
|
this.options.refetchOnReconnect
|
|
43
42
|
);
|
|
44
43
|
}
|
|
45
44
|
shouldFetchOnWindowFocus() {
|
|
46
|
-
return
|
|
45
|
+
return I(
|
|
47
46
|
this.#e,
|
|
48
47
|
this.options,
|
|
49
48
|
this.options.refetchOnWindowFocus
|
|
@@ -58,20 +57,20 @@ var G = class extends B {
|
|
|
58
57
|
throw new Error(
|
|
59
58
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
60
59
|
);
|
|
61
|
-
this.#C(), this.#e.setOptions(this.options), t._defaulted && !
|
|
60
|
+
this.#C(), this.#e.setOptions(this.options), t._defaulted && !E(this.options, t) && this.#s.getQueryCache().notify({
|
|
62
61
|
type: "observerOptionsUpdated",
|
|
63
62
|
query: this.#e,
|
|
64
63
|
observer: this
|
|
65
64
|
});
|
|
66
65
|
const r = this.hasListeners();
|
|
67
|
-
r &&
|
|
66
|
+
r && A(
|
|
68
67
|
this.#e,
|
|
69
68
|
s,
|
|
70
69
|
this.options,
|
|
71
70
|
t
|
|
72
|
-
) && this.#u(), this.updateResult(), r && (this.#e !== s || f(this.options.enabled, this.#e) !== f(t.enabled, this.#e) ||
|
|
73
|
-
const
|
|
74
|
-
r && (this.#e !== s || f(this.options.enabled, this.#e) !== f(t.enabled, this.#e) ||
|
|
71
|
+
) && this.#u(), this.updateResult(), r && (this.#e !== s || f(this.options.enabled, this.#e) !== f(t.enabled, this.#e) || R(this.options.staleTime, this.#e) !== R(t.staleTime, this.#e)) && this.#m();
|
|
72
|
+
const n = this.#b();
|
|
73
|
+
r && (this.#e !== s || f(this.options.enabled, this.#e) !== f(t.enabled, this.#e) || n !== this.#n) && this.#g(n);
|
|
75
74
|
}
|
|
76
75
|
getOptimisticResult(e) {
|
|
77
76
|
const t = this.#s.getQueryCache().build(this.#s, e), s = this.createResult(t, e);
|
|
@@ -81,14 +80,9 @@ var G = class extends B {
|
|
|
81
80
|
return this.#t;
|
|
82
81
|
}
|
|
83
82
|
trackResult(e, t) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
configurable: !1,
|
|
88
|
-
enumerable: !0,
|
|
89
|
-
get: () => (this.trackProp(r), t?.(r), e[r])
|
|
90
|
-
});
|
|
91
|
-
}), s;
|
|
83
|
+
return new Proxy(e, {
|
|
84
|
+
get: (s, r) => (this.trackProp(r), t?.(r), Reflect.get(s, r))
|
|
85
|
+
});
|
|
92
86
|
}
|
|
93
87
|
trackProp(e) {
|
|
94
88
|
this.#f.add(e);
|
|
@@ -117,31 +111,31 @@ var G = class extends B {
|
|
|
117
111
|
this.options,
|
|
118
112
|
e
|
|
119
113
|
);
|
|
120
|
-
return e?.throwOnError || (t = t.catch(
|
|
114
|
+
return e?.throwOnError || (t = t.catch(Q)), t;
|
|
121
115
|
}
|
|
122
|
-
#
|
|
116
|
+
#m() {
|
|
123
117
|
this.#v();
|
|
124
|
-
const e =
|
|
118
|
+
const e = R(
|
|
125
119
|
this.options.staleTime,
|
|
126
120
|
this.#e
|
|
127
121
|
);
|
|
128
|
-
if (
|
|
122
|
+
if (T || this.#t.isStale || !_(e))
|
|
129
123
|
return;
|
|
130
124
|
const s = N(this.#t.dataUpdatedAt, e) + 1;
|
|
131
125
|
this.#o = setTimeout(() => {
|
|
132
126
|
this.#t.isStale || this.updateResult();
|
|
133
127
|
}, s);
|
|
134
128
|
}
|
|
135
|
-
#
|
|
129
|
+
#b() {
|
|
136
130
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
|
|
137
131
|
}
|
|
138
132
|
#g(e) {
|
|
139
|
-
this.#O(), this.#n = e, !(
|
|
133
|
+
this.#O(), this.#n = e, !(T || f(this.options.enabled, this.#e) === !1 || !_(this.#n) || this.#n === 0) && (this.#h = setInterval(() => {
|
|
140
134
|
(this.options.refetchIntervalInBackground || V.isFocused()) && this.#u();
|
|
141
135
|
}, this.#n));
|
|
142
136
|
}
|
|
143
137
|
#R() {
|
|
144
|
-
this.#
|
|
138
|
+
this.#m(), this.#g(this.#b());
|
|
145
139
|
}
|
|
146
140
|
#v() {
|
|
147
141
|
this.#o && (clearTimeout(this.#o), this.#o = void 0);
|
|
@@ -150,90 +144,82 @@ var G = class extends B {
|
|
|
150
144
|
this.#h && (clearInterval(this.#h), this.#h = void 0);
|
|
151
145
|
}
|
|
152
146
|
createResult(e, t) {
|
|
153
|
-
const s = this.#e, r = this.options,
|
|
154
|
-
let
|
|
147
|
+
const s = this.#e, r = this.options, n = this.#t, u = this.#a, i = this.#c, o = e !== s ? e.state : this.#p, { state: l } = e;
|
|
148
|
+
let a = { ...l }, g = !1, h;
|
|
155
149
|
if (t._optimisticResults) {
|
|
156
|
-
const
|
|
157
|
-
(
|
|
158
|
-
...
|
|
159
|
-
...
|
|
160
|
-
}), t._optimisticResults === "isRestoring" && (
|
|
150
|
+
const c = this.hasListeners(), v = !c && j(e, t), b = c && A(e, s, t, r);
|
|
151
|
+
(v || b) && (a = {
|
|
152
|
+
...a,
|
|
153
|
+
...K(l.data, e.options)
|
|
154
|
+
}), t._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
|
|
161
155
|
}
|
|
162
|
-
let { error:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
this.#y = t.select, u = t.select(n.data), u = M(a?.data, u, t), this.#l = u, this.#r = null;
|
|
169
|
-
} catch (h) {
|
|
170
|
-
this.#r = h;
|
|
171
|
-
}
|
|
172
|
-
else
|
|
173
|
-
u = n.data;
|
|
174
|
-
if (t.placeholderData !== void 0 && u === void 0 && p === "pending") {
|
|
175
|
-
let h;
|
|
176
|
-
if (a?.isPlaceholderData && t.placeholderData === i?.placeholderData)
|
|
177
|
-
h = a.data;
|
|
178
|
-
else if (h = typeof t.placeholderData == "function" ? t.placeholderData(
|
|
156
|
+
let { error: x, errorUpdatedAt: D, status: p } = a;
|
|
157
|
+
h = a.data;
|
|
158
|
+
let P = !1;
|
|
159
|
+
if (t.placeholderData !== void 0 && h === void 0 && p === "pending") {
|
|
160
|
+
let c;
|
|
161
|
+
n?.isPlaceholderData && t.placeholderData === i?.placeholderData ? (c = n.data, P = !0) : c = typeof t.placeholderData == "function" ? t.placeholderData(
|
|
179
162
|
this.#d?.state.data,
|
|
180
163
|
this.#d
|
|
181
|
-
) : t.placeholderData,
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
} catch (m) {
|
|
185
|
-
this.#r = m;
|
|
186
|
-
}
|
|
187
|
-
h !== void 0 && (p = "success", u = M(
|
|
188
|
-
a?.data,
|
|
189
|
-
h,
|
|
164
|
+
) : t.placeholderData, c !== void 0 && (p = "success", h = L(
|
|
165
|
+
n?.data,
|
|
166
|
+
c,
|
|
190
167
|
t
|
|
191
|
-
),
|
|
168
|
+
), g = !0);
|
|
192
169
|
}
|
|
193
|
-
|
|
194
|
-
|
|
170
|
+
if (t.select && h !== void 0 && !P)
|
|
171
|
+
if (n && h === u?.data && t.select === this.#y)
|
|
172
|
+
h = this.#l;
|
|
173
|
+
else
|
|
174
|
+
try {
|
|
175
|
+
this.#y = t.select, h = t.select(h), h = L(n?.data, h, t), this.#l = h, this.#i = null;
|
|
176
|
+
} catch (c) {
|
|
177
|
+
this.#i = c;
|
|
178
|
+
}
|
|
179
|
+
this.#i && (x = this.#i, h = this.#l, D = Date.now(), p = "error");
|
|
180
|
+
const C = a.fetchStatus === "fetching", S = p === "pending", w = p === "error", U = S && C, k = h !== void 0, d = {
|
|
195
181
|
status: p,
|
|
196
|
-
fetchStatus:
|
|
182
|
+
fetchStatus: a.fetchStatus,
|
|
197
183
|
isPending: S,
|
|
198
184
|
isSuccess: p === "success",
|
|
199
|
-
isError:
|
|
200
|
-
isInitialLoading:
|
|
201
|
-
isLoading:
|
|
202
|
-
data:
|
|
203
|
-
dataUpdatedAt:
|
|
204
|
-
error:
|
|
205
|
-
errorUpdatedAt:
|
|
206
|
-
failureCount:
|
|
207
|
-
failureReason:
|
|
208
|
-
errorUpdateCount:
|
|
209
|
-
isFetched:
|
|
210
|
-
isFetchedAfterMount:
|
|
185
|
+
isError: w,
|
|
186
|
+
isInitialLoading: U,
|
|
187
|
+
isLoading: U,
|
|
188
|
+
data: h,
|
|
189
|
+
dataUpdatedAt: a.dataUpdatedAt,
|
|
190
|
+
error: x,
|
|
191
|
+
errorUpdatedAt: D,
|
|
192
|
+
failureCount: a.fetchFailureCount,
|
|
193
|
+
failureReason: a.fetchFailureReason,
|
|
194
|
+
errorUpdateCount: a.errorUpdateCount,
|
|
195
|
+
isFetched: a.dataUpdateCount > 0 || a.errorUpdateCount > 0,
|
|
196
|
+
isFetchedAfterMount: a.dataUpdateCount > o.dataUpdateCount || a.errorUpdateCount > o.errorUpdateCount,
|
|
211
197
|
isFetching: C,
|
|
212
198
|
isRefetching: C && !S,
|
|
213
|
-
isLoadingError:
|
|
214
|
-
isPaused:
|
|
215
|
-
isPlaceholderData:
|
|
216
|
-
isRefetchError:
|
|
217
|
-
isStale:
|
|
199
|
+
isLoadingError: w && !k,
|
|
200
|
+
isPaused: a.fetchStatus === "paused",
|
|
201
|
+
isPlaceholderData: g,
|
|
202
|
+
isRefetchError: w && k,
|
|
203
|
+
isStale: F(e, t),
|
|
218
204
|
refetch: this.refetch,
|
|
219
|
-
promise: this.#
|
|
205
|
+
promise: this.#r
|
|
220
206
|
};
|
|
221
207
|
if (this.options.experimental_prefetchInRender) {
|
|
222
|
-
const
|
|
223
|
-
d.status === "error" ?
|
|
224
|
-
},
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
switch (
|
|
208
|
+
const c = (O) => {
|
|
209
|
+
d.status === "error" ? O.reject(d.error) : d.data !== void 0 && O.resolve(d.data);
|
|
210
|
+
}, v = () => {
|
|
211
|
+
const O = this.#r = d.promise = M();
|
|
212
|
+
c(O);
|
|
213
|
+
}, b = this.#r;
|
|
214
|
+
switch (b.status) {
|
|
229
215
|
case "pending":
|
|
230
|
-
e.queryHash === s.queryHash &&
|
|
216
|
+
e.queryHash === s.queryHash && c(b);
|
|
231
217
|
break;
|
|
232
218
|
case "fulfilled":
|
|
233
|
-
(d.status === "error" || d.data !==
|
|
219
|
+
(d.status === "error" || d.data !== b.value) && v();
|
|
234
220
|
break;
|
|
235
221
|
case "rejected":
|
|
236
|
-
(d.status !== "error" || d.error !==
|
|
222
|
+
(d.status !== "error" || d.error !== b.reason) && v();
|
|
237
223
|
break;
|
|
238
224
|
}
|
|
239
225
|
}
|
|
@@ -241,21 +227,21 @@ var G = class extends B {
|
|
|
241
227
|
}
|
|
242
228
|
updateResult() {
|
|
243
229
|
const e = this.#t, t = this.createResult(this.#e, this.options);
|
|
244
|
-
if (this.#a = this.#e.state, this.#c = this.options, this.#a.data !== void 0 && (this.#d = this.#e),
|
|
230
|
+
if (this.#a = this.#e.state, this.#c = this.options, this.#a.data !== void 0 && (this.#d = this.#e), E(t, e))
|
|
245
231
|
return;
|
|
246
232
|
this.#t = t;
|
|
247
233
|
const s = () => {
|
|
248
234
|
if (!e)
|
|
249
235
|
return !0;
|
|
250
|
-
const { notifyOnChangeProps: r } = this.options,
|
|
251
|
-
if (
|
|
236
|
+
const { notifyOnChangeProps: r } = this.options, n = typeof r == "function" ? r() : r;
|
|
237
|
+
if (n === "all" || !n && !this.#f.size)
|
|
252
238
|
return !0;
|
|
253
|
-
const
|
|
254
|
-
|
|
239
|
+
const u = new Set(
|
|
240
|
+
n ?? this.#f
|
|
255
241
|
);
|
|
256
|
-
return this.options.throwOnError &&
|
|
257
|
-
const
|
|
258
|
-
return this.#t[
|
|
242
|
+
return this.options.throwOnError && u.add("error"), Object.keys(this.#t).some((i) => {
|
|
243
|
+
const m = i;
|
|
244
|
+
return this.#t[m] !== e[m] && u.has(m);
|
|
259
245
|
});
|
|
260
246
|
};
|
|
261
247
|
this.#S({ listeners: s() });
|
|
@@ -271,7 +257,7 @@ var G = class extends B {
|
|
|
271
257
|
this.updateResult(), this.hasListeners() && this.#R();
|
|
272
258
|
}
|
|
273
259
|
#S(e) {
|
|
274
|
-
|
|
260
|
+
q.batch(() => {
|
|
275
261
|
e.listeners && this.listeners.forEach((t) => {
|
|
276
262
|
t(this.#t);
|
|
277
263
|
}), this.#s.getQueryCache().notify({
|
|
@@ -285,23 +271,23 @@ function J(e, t) {
|
|
|
285
271
|
return f(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
286
272
|
}
|
|
287
273
|
function j(e, t) {
|
|
288
|
-
return J(e, t) || e.state.data !== void 0 &&
|
|
274
|
+
return J(e, t) || e.state.data !== void 0 && I(e, t, t.refetchOnMount);
|
|
289
275
|
}
|
|
290
|
-
function
|
|
291
|
-
if (f(t.enabled, e) !== !1) {
|
|
276
|
+
function I(e, t, s) {
|
|
277
|
+
if (f(t.enabled, e) !== !1 && R(t.staleTime, e) !== "static") {
|
|
292
278
|
const r = typeof s == "function" ? s(e) : s;
|
|
293
|
-
return r === "always" || r !== !1 &&
|
|
279
|
+
return r === "always" || r !== !1 && F(e, t);
|
|
294
280
|
}
|
|
295
281
|
return !1;
|
|
296
282
|
}
|
|
297
|
-
function
|
|
298
|
-
return (e !== t || f(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") &&
|
|
283
|
+
function A(e, t, s, r) {
|
|
284
|
+
return (e !== t || f(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && F(e, s);
|
|
299
285
|
}
|
|
300
|
-
function
|
|
301
|
-
return f(t.enabled, e) !== !1 && e.isStaleByTime(
|
|
286
|
+
function F(e, t) {
|
|
287
|
+
return f(t.enabled, e) !== !1 && e.isStaleByTime(R(t.staleTime, e));
|
|
302
288
|
}
|
|
303
289
|
function X(e, t) {
|
|
304
|
-
return !
|
|
290
|
+
return !E(e.getCurrentResult(), t);
|
|
305
291
|
}
|
|
306
292
|
function Y() {
|
|
307
293
|
let e = !1;
|
|
@@ -326,11 +312,13 @@ var Z = y.createContext(Y()), ee = () => y.useContext(Z), te = (e, t) => {
|
|
|
326
312
|
errorResetBoundary: t,
|
|
327
313
|
throwOnError: s,
|
|
328
314
|
query: r,
|
|
329
|
-
suspense:
|
|
330
|
-
}) => e.isError && !t.isReset() && !e.isFetching && r && (
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
315
|
+
suspense: n
|
|
316
|
+
}) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || z(s, [e.error, r])), ie = (e) => {
|
|
317
|
+
if (e.suspense) {
|
|
318
|
+
const t = (r) => r === "static" ? r : Math.max(r ?? 1e3, 1e3), s = e.staleTime;
|
|
319
|
+
e.staleTime = typeof s == "function" ? (...r) => t(s(...r)) : t(s), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3));
|
|
320
|
+
}
|
|
321
|
+
}, ne = (e, t) => e.isLoading && e.isFetching && !t, ae = (e, t) => e?.suspense && t.isPending, B = (e, t, s) => t.fetchOptimistic(e).catch(() => {
|
|
334
322
|
s.clearReset();
|
|
335
323
|
});
|
|
336
324
|
function oe(e, t, s) {
|
|
@@ -338,58 +326,58 @@ function oe(e, t, s) {
|
|
|
338
326
|
throw new Error(
|
|
339
327
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
340
328
|
);
|
|
341
|
-
const r =
|
|
342
|
-
|
|
329
|
+
const r = $(), n = ee(), u = W(s), i = u.defaultQueryOptions(e);
|
|
330
|
+
u.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
343
331
|
i
|
|
344
332
|
), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
|
|
345
333
|
`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
346
|
-
)), i._optimisticResults =
|
|
347
|
-
const
|
|
334
|
+
)), i._optimisticResults = r ? "isRestoring" : "optimistic", ie(i), te(i, n), se(n);
|
|
335
|
+
const m = !u.getQueryCache().get(i.queryHash), [o] = y.useState(
|
|
348
336
|
() => new t(
|
|
349
|
-
|
|
337
|
+
u,
|
|
350
338
|
i
|
|
351
339
|
)
|
|
352
|
-
), l = o.getOptimisticResult(i),
|
|
340
|
+
), l = o.getOptimisticResult(i), a = !r && e.subscribed !== !1;
|
|
353
341
|
if (y.useSyncExternalStore(
|
|
354
342
|
y.useCallback(
|
|
355
|
-
(
|
|
356
|
-
const
|
|
357
|
-
return o.updateResult(),
|
|
343
|
+
(g) => {
|
|
344
|
+
const h = a ? o.subscribe(q.batchCalls(g)) : Q;
|
|
345
|
+
return o.updateResult(), h;
|
|
358
346
|
},
|
|
359
|
-
[o,
|
|
347
|
+
[o, a]
|
|
360
348
|
),
|
|
361
349
|
() => o.getCurrentResult(),
|
|
362
350
|
() => o.getCurrentResult()
|
|
363
351
|
), y.useEffect(() => {
|
|
364
352
|
o.setOptions(i);
|
|
365
353
|
}, [i, o]), ae(i, l))
|
|
366
|
-
throw
|
|
354
|
+
throw B(i, o, n);
|
|
367
355
|
if (re({
|
|
368
356
|
result: l,
|
|
369
|
-
errorResetBoundary:
|
|
357
|
+
errorResetBoundary: n,
|
|
370
358
|
throwOnError: i.throwOnError,
|
|
371
|
-
query:
|
|
359
|
+
query: u.getQueryCache().get(i.queryHash),
|
|
372
360
|
suspense: i.suspense
|
|
373
361
|
}))
|
|
374
362
|
throw l.error;
|
|
375
|
-
return
|
|
363
|
+
return u.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
376
364
|
i,
|
|
377
365
|
l
|
|
378
|
-
), i.experimental_prefetchInRender && !
|
|
366
|
+
), i.experimental_prefetchInRender && !T && ne(l, r) && (m ? (
|
|
379
367
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
380
|
-
|
|
368
|
+
B(i, o, n)
|
|
381
369
|
) : (
|
|
382
370
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
383
|
-
|
|
384
|
-
))?.catch(
|
|
371
|
+
u.getQueryCache().get(i.queryHash)?.promise
|
|
372
|
+
))?.catch(Q).finally(() => {
|
|
385
373
|
o.updateResult();
|
|
386
374
|
}), i.notifyOnChangeProps ? l : o.trackResult(l);
|
|
387
375
|
}
|
|
388
|
-
function
|
|
376
|
+
function de(e, t) {
|
|
389
377
|
return oe(e, G, t);
|
|
390
378
|
}
|
|
391
379
|
export {
|
|
392
380
|
G as Q,
|
|
393
381
|
oe as a,
|
|
394
|
-
|
|
382
|
+
de as u
|
|
395
383
|
};
|
package/dist/utils/helper.js
CHANGED
|
@@ -25,7 +25,7 @@ const g = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
25
25
|
}, a = (r, e) => {
|
|
26
26
|
const t = c(r), n = c(e), o = t.pop(), i = n.pop(), s = p(t, n);
|
|
27
27
|
return s !== 0 ? s : o && i ? p(o.split("."), i.split(".")) : o || i ? o ? -1 : 1 : 0;
|
|
28
|
-
}, d = "0.0.
|
|
28
|
+
}, d = "0.0.13101-beta", w = (r) => m.every((e) => y(e, r)), y = (r, e) => {
|
|
29
29
|
if (!e[r]) {
|
|
30
30
|
if (e.throwError)
|
|
31
31
|
return e.throwError(`Missing required prop: ${r}`, 404), !1;
|
package/package.json
CHANGED