@burdenoff/microfe-store 2026.626.1 → 2026.626.2
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/StoreRoot.js +47 -90
- package/dist/StoreRoot.js.map +1 -1
- package/dist/StoreRoutes.js +90 -155
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/hooks/useStoreGraphQL.js +107 -177
- package/dist/hooks/useStoreGraphQL.js.map +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/pages/ProductReviewsPage.js +0 -92
- package/dist/pages/ProductReviewsPage.js.map +0 -1
- package/dist/pages/PublisherDashboardPage.js +0 -195
- package/dist/pages/PublisherDashboardPage.js.map +0 -1
- package/dist/pages/PublisherRevenuePage.js +0 -142
- package/dist/pages/PublisherRevenuePage.js.map +0 -1
- package/dist/pages/PublisherSubmissionsPage.js +0 -188
- package/dist/pages/PublisherSubmissionsPage.js.map +0 -1
- package/dist/pages/PublisherSubmitPage.js +0 -243
- package/dist/pages/PublisherSubmitPage.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useStore as e } from "../providers/StoreProvider.js";
|
|
2
2
|
import { useStoreGraphQLWithContext as t } from "./useStoreGraphQLWithContext.js";
|
|
3
|
-
import { BrowseStoreDocument as n, CategoriesDocument as r, CheckEntitlementDocument as i, CreateReviewDocument as a, DeleteReviewDocument as o,
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { useApolloClient as
|
|
3
|
+
import { BrowseStoreDocument as n, CategoriesDocument as r, CheckEntitlementDocument as i, CreateReviewDocument as a, DeleteReviewDocument as o, FeaturedProductsDocument as s, FilterOptionsDocument as c, HomeGroupedProductsDocument as l, MarkReviewHelpfulDocument as u, MyEntitlementsDocument as d, ProductReviewsDocument as f, SearchSuggestionsDocument as p, StoreProductDetailsDocument as m, TrendingSearchesDocument as h, UpdateReviewDocument as g, UserReviewForProductDocument as _, WorkspaceStoreOrdersDocument as v } from "../generated/global-operations.js";
|
|
4
|
+
import { useCallback as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
5
|
+
import { useApolloClient as w } from "@apollo/client/react";
|
|
6
6
|
//#region src/hooks/useStoreGraphQL.ts
|
|
7
|
-
function
|
|
8
|
-
return
|
|
7
|
+
function T() {
|
|
8
|
+
return w();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
let t =
|
|
10
|
+
function E(e = {}) {
|
|
11
|
+
let t = T(), [r, i] = C([]), [a, o] = C(0), [s, c] = C(!1), [l, u] = C(void 0), [d, f] = C(!0), [p, m] = C(null), h = JSON.stringify(e), g = y(async () => {
|
|
12
12
|
f(!0), m(null);
|
|
13
13
|
try {
|
|
14
14
|
let e = await t.query({
|
|
@@ -23,7 +23,7 @@ function O(e = {}) {
|
|
|
23
23
|
f(!1);
|
|
24
24
|
}
|
|
25
25
|
}, [t, h]);
|
|
26
|
-
return
|
|
26
|
+
return b(() => {
|
|
27
27
|
g();
|
|
28
28
|
}, [g]), {
|
|
29
29
|
products: r,
|
|
@@ -35,20 +35,20 @@ function O(e = {}) {
|
|
|
35
35
|
refetch: g
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
let { query: a, hasOrganizationContext: o } = t(), s =
|
|
38
|
+
function D(r = {}, i) {
|
|
39
|
+
let { query: a, hasOrganizationContext: o } = t(), s = w(), { defaultCompatibleWith: c } = e(), [l, u] = C([]), [d, f] = C(0), [p, m] = C(!1), [h, g] = C(void 0), [_, v] = C(!i?.skip), [T, E] = C(null), [D, O] = C(r.pagination?.offset ?? 0), k = i?.skip, A = x(() => {
|
|
40
40
|
if (!c) return r;
|
|
41
41
|
let e = { ...r };
|
|
42
42
|
return e.filter ? (e.filter = { ...e.filter }, e.filter.compatibleWith || (e.filter.compatibleWith = c)) : e.filter = { compatibleWith: c }, e;
|
|
43
|
-
}, [r, c]), j =
|
|
43
|
+
}, [r, c]), j = x(() => {
|
|
44
44
|
let { pagination: e, ...t } = A;
|
|
45
45
|
return JSON.stringify(t);
|
|
46
|
-
}, [A]), M = r.pagination?.limit ?? 30, N =
|
|
46
|
+
}, [A]), M = r.pagination?.limit ?? 30, N = y(async (e, t) => {
|
|
47
47
|
if (k) {
|
|
48
48
|
v(!1);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
v(!0),
|
|
51
|
+
v(!0), E(null);
|
|
52
52
|
try {
|
|
53
53
|
let r = {
|
|
54
54
|
...JSON.parse(j),
|
|
@@ -70,7 +70,7 @@ function k(r = {}, i) {
|
|
|
70
70
|
let c = i.data?.browseStore?.products ?? [];
|
|
71
71
|
u(t ? (e) => [...e, ...c] : c), f(i.data?.browseStore?.totalCount ?? 0), m(i.data?.browseStore?.hasMore ?? !1), g(i.data?.browseStore?.facets), O(e + c.length);
|
|
72
72
|
} catch (e) {
|
|
73
|
-
|
|
73
|
+
E(e);
|
|
74
74
|
} finally {
|
|
75
75
|
v(!1);
|
|
76
76
|
}
|
|
@@ -82,10 +82,10 @@ function k(r = {}, i) {
|
|
|
82
82
|
k,
|
|
83
83
|
M,
|
|
84
84
|
A.pagination
|
|
85
|
-
]), P =
|
|
85
|
+
]), P = S(N);
|
|
86
86
|
P.current = N;
|
|
87
|
-
let F =
|
|
88
|
-
return F.current = r.pagination?.offset ?? 0,
|
|
87
|
+
let F = S(r.pagination?.offset ?? 0);
|
|
88
|
+
return F.current = r.pagination?.offset ?? 0, b(() => {
|
|
89
89
|
P.current(F.current, !1);
|
|
90
90
|
}, [j, k]), {
|
|
91
91
|
products: l,
|
|
@@ -93,9 +93,9 @@ function k(r = {}, i) {
|
|
|
93
93
|
hasMore: p,
|
|
94
94
|
facets: h,
|
|
95
95
|
loading: _,
|
|
96
|
-
error:
|
|
96
|
+
error: T,
|
|
97
97
|
refetch: () => N(r.pagination?.offset ?? 0, !1),
|
|
98
|
-
loadMore:
|
|
98
|
+
loadMore: y(() => {
|
|
99
99
|
!p || _ || N(D, !0);
|
|
100
100
|
}, [
|
|
101
101
|
N,
|
|
@@ -105,10 +105,10 @@ function k(r = {}, i) {
|
|
|
105
105
|
])
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
let e =
|
|
108
|
+
function O() {
|
|
109
|
+
let e = T(), [t, r] = C([]), [i, a] = C(0), [o, s] = C(!1), [c, l] = C(void 0), [u, d] = C(!1), [f, p] = C(null);
|
|
110
110
|
return {
|
|
111
|
-
browseStore:
|
|
111
|
+
browseStore: y(async (t = {}) => {
|
|
112
112
|
d(!0), p(null);
|
|
113
113
|
try {
|
|
114
114
|
let i = (await e.query({
|
|
@@ -131,8 +131,8 @@ function A() {
|
|
|
131
131
|
error: f
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
let { query: n, hasOrganizationContext: r } = t(), i =
|
|
134
|
+
function k(e) {
|
|
135
|
+
let { query: n, hasOrganizationContext: r } = t(), i = w(), [a, o] = C(null), [s, c] = C(!0), [l, u] = C(null), d = !e.id && !e.slug, f = JSON.stringify(e), p = S(null), h = y(async () => {
|
|
136
136
|
if (d) {
|
|
137
137
|
c(!1);
|
|
138
138
|
return;
|
|
@@ -141,11 +141,11 @@ function j(e) {
|
|
|
141
141
|
p.current = f, c(!0), u(null);
|
|
142
142
|
try {
|
|
143
143
|
o((r ? await n({
|
|
144
|
-
query:
|
|
144
|
+
query: m,
|
|
145
145
|
variables: { input: JSON.parse(f) },
|
|
146
146
|
fetchPolicy: "network-only"
|
|
147
147
|
}) : await i.query({
|
|
148
|
-
query:
|
|
148
|
+
query: m,
|
|
149
149
|
variables: { input: JSON.parse(f) },
|
|
150
150
|
fetchPolicy: "network-only"
|
|
151
151
|
})).data?.storeProductDetails ?? null);
|
|
@@ -162,26 +162,26 @@ function j(e) {
|
|
|
162
162
|
n,
|
|
163
163
|
d
|
|
164
164
|
]);
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
}, [
|
|
165
|
+
return b(() => {
|
|
166
|
+
h();
|
|
167
|
+
}, [h]), {
|
|
168
168
|
data: a,
|
|
169
169
|
loading: s,
|
|
170
170
|
error: l,
|
|
171
|
-
refetch: () => (p.current = null,
|
|
171
|
+
refetch: () => (p.current = null, h())
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
let { query: e, hasOrganizationContext: n } = t(), r =
|
|
174
|
+
function A() {
|
|
175
|
+
let { query: e, hasOrganizationContext: n } = t(), r = w(), [i, a] = C(null), [o, s] = C(!1), [c, l] = C(null);
|
|
176
176
|
return {
|
|
177
|
-
getProductDetails:
|
|
177
|
+
getProductDetails: y(async (t) => {
|
|
178
178
|
s(!0), l(null);
|
|
179
179
|
try {
|
|
180
180
|
let i = (n ? await e({
|
|
181
|
-
query:
|
|
181
|
+
query: m,
|
|
182
182
|
variables: { input: t }
|
|
183
183
|
}) : await r.query({
|
|
184
|
-
query:
|
|
184
|
+
query: m,
|
|
185
185
|
variables: { input: t }
|
|
186
186
|
})).data?.storeProductDetails ?? null;
|
|
187
187
|
return a(i), i;
|
|
@@ -200,21 +200,21 @@ function M() {
|
|
|
200
200
|
error: c
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
let n =
|
|
203
|
+
function j(t) {
|
|
204
|
+
let n = T(), { defaultCompatibleWith: r } = e(), [i, a] = C(null), [o, s] = C(!t?.skip), [c, u] = C(null), d = t?.skip, f = y(async () => {
|
|
205
205
|
if (d) {
|
|
206
206
|
s(!1);
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
|
-
s(!0),
|
|
209
|
+
s(!0), u(null);
|
|
210
210
|
try {
|
|
211
211
|
a((await n.query({
|
|
212
|
-
query:
|
|
212
|
+
query: l,
|
|
213
213
|
variables: { compatibleWith: r ?? null },
|
|
214
214
|
fetchPolicy: "cache-first"
|
|
215
215
|
})).data?.homeGroupedProducts ?? null);
|
|
216
216
|
} catch (e) {
|
|
217
|
-
|
|
217
|
+
u(e);
|
|
218
218
|
} finally {
|
|
219
219
|
s(!1);
|
|
220
220
|
}
|
|
@@ -223,7 +223,7 @@ function N(t) {
|
|
|
223
223
|
r,
|
|
224
224
|
d
|
|
225
225
|
]);
|
|
226
|
-
return
|
|
226
|
+
return b(() => {
|
|
227
227
|
f();
|
|
228
228
|
}, [f]), {
|
|
229
229
|
data: i,
|
|
@@ -236,22 +236,22 @@ function N(t) {
|
|
|
236
236
|
refetch: f
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
let t =
|
|
241
|
-
a(!0),
|
|
239
|
+
function M(e) {
|
|
240
|
+
let t = T(), [n, r] = C([]), [i, a] = C(!0), [o, c] = C(null), l = y(async () => {
|
|
241
|
+
a(!0), c(null);
|
|
242
242
|
try {
|
|
243
243
|
r((await t.query({
|
|
244
|
-
query:
|
|
244
|
+
query: s,
|
|
245
245
|
variables: { limit: e },
|
|
246
246
|
fetchPolicy: "cache-first"
|
|
247
247
|
})).data?.featuredProducts ?? []);
|
|
248
248
|
} catch (e) {
|
|
249
|
-
|
|
249
|
+
c(e);
|
|
250
250
|
} finally {
|
|
251
251
|
a(!1);
|
|
252
252
|
}
|
|
253
253
|
}, [t, e]);
|
|
254
|
-
return
|
|
254
|
+
return b(() => {
|
|
255
255
|
l();
|
|
256
256
|
}, [l]), {
|
|
257
257
|
products: n,
|
|
@@ -260,8 +260,8 @@ function P(e) {
|
|
|
260
260
|
refetch: l
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
let n =
|
|
263
|
+
function N(e, t) {
|
|
264
|
+
let n = T(), [r, i] = C([]), [a, o] = C(!1), [s, c] = C(null), l = e.length < 2, u = y(async () => {
|
|
265
265
|
if (l) {
|
|
266
266
|
i([]);
|
|
267
267
|
return;
|
|
@@ -269,7 +269,7 @@ function F(e, t) {
|
|
|
269
269
|
o(!0), c(null);
|
|
270
270
|
try {
|
|
271
271
|
i((await n.query({
|
|
272
|
-
query:
|
|
272
|
+
query: p,
|
|
273
273
|
variables: {
|
|
274
274
|
query: e,
|
|
275
275
|
limit: t?.limit,
|
|
@@ -289,7 +289,7 @@ function F(e, t) {
|
|
|
289
289
|
t?.types,
|
|
290
290
|
l
|
|
291
291
|
]);
|
|
292
|
-
return
|
|
292
|
+
return b(() => {
|
|
293
293
|
u();
|
|
294
294
|
}, [u]), {
|
|
295
295
|
suggestions: r,
|
|
@@ -298,15 +298,15 @@ function F(e, t) {
|
|
|
298
298
|
refetch: u
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
let e =
|
|
301
|
+
function P() {
|
|
302
|
+
let e = T(), [t, n] = C([]), [r, i] = C(!1), [a, o] = C(null);
|
|
303
303
|
return {
|
|
304
|
-
getSuggestions:
|
|
304
|
+
getSuggestions: y(async (t, r) => {
|
|
305
305
|
if (t.length < 2) return n([]), [];
|
|
306
306
|
i(!0), o(null);
|
|
307
307
|
try {
|
|
308
308
|
let i = (await e.query({
|
|
309
|
-
query:
|
|
309
|
+
query: p,
|
|
310
310
|
variables: {
|
|
311
311
|
query: t,
|
|
312
312
|
limit: r?.limit,
|
|
@@ -326,12 +326,12 @@ function I() {
|
|
|
326
326
|
error: a
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
let t =
|
|
329
|
+
function F(e) {
|
|
330
|
+
let t = T(), [n, r] = C([]), [i, a] = C(!0), [o, s] = C(null), c = y(async () => {
|
|
331
331
|
a(!0), s(null);
|
|
332
332
|
try {
|
|
333
333
|
r((await t.query({
|
|
334
|
-
query:
|
|
334
|
+
query: h,
|
|
335
335
|
variables: {
|
|
336
336
|
limit: e?.limit,
|
|
337
337
|
type: e?.type
|
|
@@ -348,7 +348,7 @@ function L(e) {
|
|
|
348
348
|
e?.limit,
|
|
349
349
|
e?.type
|
|
350
350
|
]);
|
|
351
|
-
return
|
|
351
|
+
return b(() => {
|
|
352
352
|
c();
|
|
353
353
|
}, [c]), {
|
|
354
354
|
terms: n,
|
|
@@ -357,12 +357,12 @@ function L(e) {
|
|
|
357
357
|
refetch: c
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
let t =
|
|
360
|
+
function I(e) {
|
|
361
|
+
let t = T(), [n, r] = C(null), [i, a] = C(!0), [o, s] = C(null), l = y(async () => {
|
|
362
362
|
a(!0), s(null);
|
|
363
363
|
try {
|
|
364
364
|
r((await t.query({
|
|
365
|
-
query:
|
|
365
|
+
query: c,
|
|
366
366
|
variables: {
|
|
367
367
|
type: e?.type,
|
|
368
368
|
withProducts: e?.withProducts
|
|
@@ -379,17 +379,17 @@ function R(e) {
|
|
|
379
379
|
e?.type,
|
|
380
380
|
e?.withProducts
|
|
381
381
|
]);
|
|
382
|
-
return
|
|
383
|
-
|
|
384
|
-
}, [
|
|
382
|
+
return b(() => {
|
|
383
|
+
l();
|
|
384
|
+
}, [l]), {
|
|
385
385
|
filterOptions: n,
|
|
386
386
|
loading: i,
|
|
387
387
|
error: o,
|
|
388
|
-
refetch:
|
|
388
|
+
refetch: l
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
let e =
|
|
391
|
+
function L() {
|
|
392
|
+
let e = T(), [t, n] = C([]), [i, a] = C(!0), [o, s] = C(null), c = y(async () => {
|
|
393
393
|
a(!0), s(null);
|
|
394
394
|
try {
|
|
395
395
|
n((await e.query({
|
|
@@ -402,7 +402,7 @@ function z() {
|
|
|
402
402
|
a(!1);
|
|
403
403
|
}
|
|
404
404
|
}, [e]);
|
|
405
|
-
return
|
|
405
|
+
return b(() => {
|
|
406
406
|
c();
|
|
407
407
|
}, [c]), {
|
|
408
408
|
categories: t,
|
|
@@ -411,8 +411,8 @@ function z() {
|
|
|
411
411
|
refetch: c
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
let n =
|
|
414
|
+
function R(e, t) {
|
|
415
|
+
let n = T(), [r, i] = C([]), [a, o] = C(!0), [s, c] = C(null), l = y(async () => {
|
|
416
416
|
if (!e) {
|
|
417
417
|
o(!1);
|
|
418
418
|
return;
|
|
@@ -420,7 +420,7 @@ function B(e, t) {
|
|
|
420
420
|
o(!0), c(null);
|
|
421
421
|
try {
|
|
422
422
|
i((await n.query({
|
|
423
|
-
query:
|
|
423
|
+
query: f,
|
|
424
424
|
variables: {
|
|
425
425
|
productId: e,
|
|
426
426
|
status: t?.status
|
|
@@ -437,7 +437,7 @@ function B(e, t) {
|
|
|
437
437
|
e,
|
|
438
438
|
t?.status
|
|
439
439
|
]);
|
|
440
|
-
return
|
|
440
|
+
return b(() => {
|
|
441
441
|
l();
|
|
442
442
|
}, [l]), {
|
|
443
443
|
reviews: r,
|
|
@@ -446,8 +446,8 @@ function B(e, t) {
|
|
|
446
446
|
refetch: l
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
let t =
|
|
449
|
+
function z(e) {
|
|
450
|
+
let t = T(), [n, r] = C(null), [i, a] = C(!0), [o, s] = C(null), c = y(async () => {
|
|
451
451
|
if (!e) {
|
|
452
452
|
a(!1);
|
|
453
453
|
return;
|
|
@@ -455,7 +455,7 @@ function V(e) {
|
|
|
455
455
|
a(!0), s(null);
|
|
456
456
|
try {
|
|
457
457
|
r((await t.query({
|
|
458
|
-
query:
|
|
458
|
+
query: _,
|
|
459
459
|
variables: { productId: e },
|
|
460
460
|
fetchPolicy: "network-only"
|
|
461
461
|
})).data?.userReviewForProduct ?? null);
|
|
@@ -465,7 +465,7 @@ function V(e) {
|
|
|
465
465
|
a(!1);
|
|
466
466
|
}
|
|
467
467
|
}, [t, e]);
|
|
468
|
-
return
|
|
468
|
+
return b(() => {
|
|
469
469
|
c();
|
|
470
470
|
}, [c]), {
|
|
471
471
|
review: n,
|
|
@@ -474,10 +474,10 @@ function V(e) {
|
|
|
474
474
|
refetch: c
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
let e =
|
|
477
|
+
function B() {
|
|
478
|
+
let e = T(), [t, n] = C(null), [r, i] = C(!1), [o, s] = C(null);
|
|
479
479
|
return {
|
|
480
|
-
createReview:
|
|
480
|
+
createReview: y(async (t) => {
|
|
481
481
|
i(!0), s(null);
|
|
482
482
|
try {
|
|
483
483
|
let r = (await e.mutate({
|
|
@@ -496,14 +496,14 @@ function H() {
|
|
|
496
496
|
error: o
|
|
497
497
|
};
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
let e =
|
|
499
|
+
function V() {
|
|
500
|
+
let e = T(), [t, n] = C(null), [r, i] = C(!1), [a, o] = C(null);
|
|
501
501
|
return {
|
|
502
|
-
updateReview:
|
|
502
|
+
updateReview: y(async (t, r) => {
|
|
503
503
|
i(!0), o(null);
|
|
504
504
|
try {
|
|
505
505
|
let i = (await e.mutate({
|
|
506
|
-
mutation:
|
|
506
|
+
mutation: g,
|
|
507
507
|
variables: {
|
|
508
508
|
id: t,
|
|
509
509
|
input: r
|
|
@@ -521,10 +521,10 @@ function U() {
|
|
|
521
521
|
error: a
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
let e =
|
|
524
|
+
function H() {
|
|
525
|
+
let e = T(), [t, n] = C(!1), [r, i] = C(null);
|
|
526
526
|
return {
|
|
527
|
-
deleteReview:
|
|
527
|
+
deleteReview: y(async (t) => {
|
|
528
528
|
n(!0), i(null);
|
|
529
529
|
try {
|
|
530
530
|
return (await e.mutate({
|
|
@@ -541,14 +541,14 @@ function W() {
|
|
|
541
541
|
error: r
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
let e =
|
|
544
|
+
function U() {
|
|
545
|
+
let e = T(), [t, n] = C(!1), [r, i] = C(null);
|
|
546
546
|
return {
|
|
547
|
-
markHelpful:
|
|
547
|
+
markHelpful: y(async (t) => {
|
|
548
548
|
n(!0), i(null);
|
|
549
549
|
try {
|
|
550
550
|
return (await e.mutate({
|
|
551
|
-
mutation:
|
|
551
|
+
mutation: u,
|
|
552
552
|
variables: { id: t }
|
|
553
553
|
})).data?.markReviewHelpful ?? null;
|
|
554
554
|
} catch (e) {
|
|
@@ -561,19 +561,19 @@ function G() {
|
|
|
561
561
|
error: r
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
565
|
-
let { query: e, hasOrganizationContext: n } = t(), r =
|
|
566
|
-
|
|
564
|
+
function W() {
|
|
565
|
+
let { query: e, hasOrganizationContext: n } = t(), r = w(), [i, a] = C([]), [o, s] = C(!1), [c, l] = C(0), [u, f] = C(!0), [p, m] = C(null), h = y(async (t = 0, i = !1) => {
|
|
566
|
+
f(!0), m(null);
|
|
567
567
|
try {
|
|
568
568
|
let o = {
|
|
569
569
|
limit: 20,
|
|
570
570
|
offset: t
|
|
571
571
|
}, c = (n ? await e({
|
|
572
|
-
query:
|
|
572
|
+
query: d,
|
|
573
573
|
variables: o,
|
|
574
574
|
fetchPolicy: "network-only"
|
|
575
575
|
}) : await r.query({
|
|
576
|
-
query:
|
|
576
|
+
query: d,
|
|
577
577
|
variables: o,
|
|
578
578
|
fetchPolicy: "network-only"
|
|
579
579
|
})).data?.myEntitlements ?? [];
|
|
@@ -581,14 +581,14 @@ function K() {
|
|
|
581
581
|
} catch (e) {
|
|
582
582
|
m(e);
|
|
583
583
|
} finally {
|
|
584
|
-
|
|
584
|
+
f(!1);
|
|
585
585
|
}
|
|
586
586
|
}, [
|
|
587
587
|
r,
|
|
588
588
|
n,
|
|
589
589
|
e
|
|
590
590
|
]);
|
|
591
|
-
return
|
|
591
|
+
return b(() => {
|
|
592
592
|
h(0);
|
|
593
593
|
}, [h]), {
|
|
594
594
|
entitlements: i,
|
|
@@ -596,7 +596,7 @@ function K() {
|
|
|
596
596
|
loading: u,
|
|
597
597
|
error: p,
|
|
598
598
|
refetch: () => h(0),
|
|
599
|
-
loadMore:
|
|
599
|
+
loadMore: y(() => {
|
|
600
600
|
!o || u || h(c + 20, !0);
|
|
601
601
|
}, [
|
|
602
602
|
h,
|
|
@@ -606,8 +606,8 @@ function K() {
|
|
|
606
606
|
])
|
|
607
607
|
};
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
let t =
|
|
609
|
+
function G(e) {
|
|
610
|
+
let t = T(), [n, r] = C(null), [a, o] = C(!0), [s, c] = C(null), l = y(async () => {
|
|
611
611
|
if (!e) {
|
|
612
612
|
o(!1);
|
|
613
613
|
return;
|
|
@@ -625,7 +625,7 @@ function q(e) {
|
|
|
625
625
|
o(!1);
|
|
626
626
|
}
|
|
627
627
|
}, [t, e]);
|
|
628
|
-
return
|
|
628
|
+
return b(() => {
|
|
629
629
|
l();
|
|
630
630
|
}, [l]), {
|
|
631
631
|
entitlement: n,
|
|
@@ -634,8 +634,8 @@ function q(e) {
|
|
|
634
634
|
refetch: l
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
let i =
|
|
637
|
+
function K(e, t, n, r) {
|
|
638
|
+
let i = T(), [a, o] = C([]), [s, c] = C(0), [l, u] = C(!0), [d, f] = C(null), p = y(async () => {
|
|
639
639
|
if (!e) {
|
|
640
640
|
u(!1);
|
|
641
641
|
return;
|
|
@@ -643,7 +643,7 @@ function J(e, t, n, r) {
|
|
|
643
643
|
u(!0), f(null);
|
|
644
644
|
try {
|
|
645
645
|
let a = await i.query({
|
|
646
|
-
query:
|
|
646
|
+
query: v,
|
|
647
647
|
variables: {
|
|
648
648
|
billingAccountId: e,
|
|
649
649
|
page: t,
|
|
@@ -667,7 +667,7 @@ function J(e, t, n, r) {
|
|
|
667
667
|
r?.status,
|
|
668
668
|
r?.search
|
|
669
669
|
]);
|
|
670
|
-
return
|
|
670
|
+
return b(() => {
|
|
671
671
|
p();
|
|
672
672
|
}, [p]), {
|
|
673
673
|
orders: a,
|
|
@@ -677,77 +677,7 @@ function J(e, t, n, r) {
|
|
|
677
677
|
refetch: p
|
|
678
678
|
};
|
|
679
679
|
}
|
|
680
|
-
function Y() {
|
|
681
|
-
let e = D(), [t, n] = T([]), [r, i] = T(!1), [a, o] = T(0), [s, c] = T(!0), [l, u] = T(null), d = x(async (t = 0, r = !1) => {
|
|
682
|
-
c(!0), u(null);
|
|
683
|
-
try {
|
|
684
|
-
let a = (await e.query({
|
|
685
|
-
query: p,
|
|
686
|
-
variables: {
|
|
687
|
-
limit: 20,
|
|
688
|
-
offset: t
|
|
689
|
-
},
|
|
690
|
-
fetchPolicy: "network-only"
|
|
691
|
-
})).data?.publishedProducts ?? [];
|
|
692
|
-
n(r ? (e) => [...e, ...a] : a), i(a.length === 20), o(t + a.length);
|
|
693
|
-
} catch (e) {
|
|
694
|
-
u(e);
|
|
695
|
-
} finally {
|
|
696
|
-
c(!1);
|
|
697
|
-
}
|
|
698
|
-
}, [e]), f = x(() => {
|
|
699
|
-
!r || s || d(a, !0);
|
|
700
|
-
}, [
|
|
701
|
-
d,
|
|
702
|
-
r,
|
|
703
|
-
s,
|
|
704
|
-
a
|
|
705
|
-
]);
|
|
706
|
-
return S(() => {
|
|
707
|
-
d(0, !1);
|
|
708
|
-
}, [d]), {
|
|
709
|
-
products: t,
|
|
710
|
-
hasMore: r,
|
|
711
|
-
loading: s,
|
|
712
|
-
error: l,
|
|
713
|
-
refetch: () => d(0, !1),
|
|
714
|
-
loadMore: f
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
function X(e) {
|
|
718
|
-
let { query: n, hasOrganizationContext: r } = t(), i = E(), [a, o] = T(null), [c, l] = T(!0), [u, d] = T(null), f = x(async () => {
|
|
719
|
-
l(!0), d(null);
|
|
720
|
-
try {
|
|
721
|
-
o((r ? await n({
|
|
722
|
-
query: s,
|
|
723
|
-
variables: { input: e },
|
|
724
|
-
fetchPolicy: "network-only"
|
|
725
|
-
}) : await i.query({
|
|
726
|
-
query: s,
|
|
727
|
-
variables: { input: e },
|
|
728
|
-
fetchPolicy: "network-only"
|
|
729
|
-
})).data?.developerEarnings ?? null);
|
|
730
|
-
} catch (e) {
|
|
731
|
-
d(e);
|
|
732
|
-
} finally {
|
|
733
|
-
l(!1);
|
|
734
|
-
}
|
|
735
|
-
}, [
|
|
736
|
-
i,
|
|
737
|
-
r,
|
|
738
|
-
e,
|
|
739
|
-
n
|
|
740
|
-
]);
|
|
741
|
-
return S(() => {
|
|
742
|
-
f();
|
|
743
|
-
}, [f]), {
|
|
744
|
-
earnings: a,
|
|
745
|
-
loading: c,
|
|
746
|
-
error: u,
|
|
747
|
-
refetch: f
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
680
|
//#endregion
|
|
751
|
-
export {
|
|
681
|
+
export { E as useBrowseStore, D as useBrowseStoreWithContext, L as useCategories, G as useCheckEntitlement, B as useCreateReview, H as useDeleteReview, M as useFeaturedProducts, I as useFilterOptions, j as useHomeGroupedProducts, O as useLazyBrowseStore, P as useLazySearchSuggestions, A as useLazyStoreProductDetails, U as useMarkReviewHelpful, W as useMyEntitlements, R as useProductReviews, N as useSearchSuggestions, k as useStoreProductDetails, F as useTrendingSearches, V as useUpdateReview, z as useUserReviewForProduct, K as useWorkspaceStoreOrders };
|
|
752
682
|
|
|
753
683
|
//# sourceMappingURL=useStoreGraphQL.js.map
|