@burdenoff/microfe-store 2026.805.1 → 2026.819.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.
Files changed (67) hide show
  1. package/dist/StoreAdminRoutes.js +27 -27
  2. package/dist/StoreRoot.js +78 -45
  3. package/dist/StoreRoot.js.map +1 -1
  4. package/dist/StoreRoutes.js +163 -85
  5. package/dist/StoreRoutes.js.map +1 -1
  6. package/dist/components/sourcing/SourcingConfirmationDialog.d.ts +15 -0
  7. package/dist/components/sourcing/SourcingConfirmationDialog.js +61 -0
  8. package/dist/components/sourcing/SourcingConfirmationDialog.js.map +1 -0
  9. package/dist/components/sourcing/SourcingUi.d.ts +51 -0
  10. package/dist/components/sourcing/SourcingUi.js +176 -0
  11. package/dist/components/sourcing/SourcingUi.js.map +1 -0
  12. package/dist/generated/global-operations.d.ts +713 -0
  13. package/dist/generated/global-operations.js +557 -175
  14. package/dist/generated/global-operations.js.map +1 -1
  15. package/dist/generated/global-types.d.ts +2152 -2159
  16. package/dist/generated/global-types.js +8 -2
  17. package/dist/generated/global-types.js.map +1 -1
  18. package/dist/hooks/useBackendCart.js +17 -17
  19. package/dist/hooks/useInstallations.js +32 -32
  20. package/dist/hooks/useOrders.js +7 -7
  21. package/dist/hooks/useSourcing.d.ts +319 -0
  22. package/dist/hooks/useSourcing.js +87 -0
  23. package/dist/hooks/useSourcing.js.map +1 -0
  24. package/dist/hooks/useStoreGraphQL.js +163 -163
  25. package/dist/index.js +12 -12
  26. package/dist/pages/AdminDashboardPage.js +132 -132
  27. package/dist/pages/AdminReviewModerationPage.js +55 -55
  28. package/dist/pages/AdminStoresPage.js +95 -95
  29. package/dist/pages/AdminSubmissionsQueuePage.js +297 -297
  30. package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
  31. package/dist/pages/AppDetailPage.js +65 -65
  32. package/dist/pages/AppSettingsPage.js +32 -32
  33. package/dist/pages/CartPage.js +66 -66
  34. package/dist/pages/CreateSourcingRequestPage.d.ts +3 -0
  35. package/dist/pages/CreateSourcingRequestPage.js +439 -0
  36. package/dist/pages/CreateSourcingRequestPage.js.map +1 -0
  37. package/dist/pages/InstalledAppsPage.js +15 -15
  38. package/dist/pages/InstalledAppsPage.js.map +1 -1
  39. package/dist/pages/MarketplaceHomePage.js +384 -384
  40. package/dist/pages/MarketplaceHomePage.js.map +1 -1
  41. package/dist/pages/MyLicensesPage.js +39 -39
  42. package/dist/pages/OrderConfirmationPage.js +57 -57
  43. package/dist/pages/OrdersPage.js +3 -3
  44. package/dist/pages/OrdersPage.js.map +1 -1
  45. package/dist/pages/ProductDetailPage.js +6 -6
  46. package/dist/pages/SellerSourcingOffersPage.d.ts +3 -0
  47. package/dist/pages/SellerSourcingOffersPage.js +284 -0
  48. package/dist/pages/SellerSourcingOffersPage.js.map +1 -0
  49. package/dist/pages/SellerSourcingOpportunitiesPage.d.ts +3 -0
  50. package/dist/pages/SellerSourcingOpportunitiesPage.js +272 -0
  51. package/dist/pages/SellerSourcingOpportunitiesPage.js.map +1 -0
  52. package/dist/pages/SellerSourcingOpportunityDetailPage.d.ts +3 -0
  53. package/dist/pages/SellerSourcingOpportunityDetailPage.js +465 -0
  54. package/dist/pages/SellerSourcingOpportunityDetailPage.js.map +1 -0
  55. package/dist/pages/SourcingRequestDetailPage.d.ts +3 -0
  56. package/dist/pages/SourcingRequestDetailPage.js +447 -0
  57. package/dist/pages/SourcingRequestDetailPage.js.map +1 -0
  58. package/dist/pages/SourcingRequestsPage.d.ts +3 -0
  59. package/dist/pages/SourcingRequestsPage.js +272 -0
  60. package/dist/pages/SourcingRequestsPage.js.map +1 -0
  61. package/dist/providers/SourcingAccessProvider.d.ts +21 -0
  62. package/dist/providers/SourcingAccessProvider.js +95 -0
  63. package/dist/providers/SourcingAccessProvider.js.map +1 -0
  64. package/dist/translations/en.d.ts +3 -0
  65. package/dist/translations/en.js +3 -0
  66. package/dist/translations/en.js.map +1 -1
  67. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
2
  import { useEffect as t, useRef as n, useState as r } from "react";
3
- import { ArrowLeft as i, Check as a, MessageSquareWarning as o, Search as s, X as c } from "lucide-react";
4
- import { graphqlFetch as l } from "@burdenoff/fe-libs/shared/graphql";
5
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
- import { useNavigate as f } from "react-router";
3
+ import { useNavigate as i } from "react-router";
4
+ import { ArrowLeft as a, Check as o, MessageSquareWarning as s, Search as c, X as l } from "lucide-react";
5
+ import { graphqlFetch as u } from "@burdenoff/fe-libs/shared/graphql";
6
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
7
  import { GlassCard as p, IllustratedEmptyState as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
8
8
  //#region src/pages/AdminReviewModerationPage.tsx
9
9
  var g = "query SearchProductsForModeration($query: String!) { searchProducts(query: $query, limit: 10) { id name slug } }", _ = "query ProductReviewsForModeration($productId: String!) { productReviews(productId: $productId) { id userId rating title comment status helpful createdAt } }", v = "mutation RejectReview($id: ID!) { rejectReview(id: $id) { id status } }", y = "mutation ApproveReview($id: ID!) { approveReview(id: $id) { id status } }", b = () => {
10
- let b = f(), { authToken: x } = e(), [S, C] = r(""), [w, T] = r([]), [E, D] = r(!1), [O, k] = r(!1), [A, j] = r(null), [M, N] = r([]), [P, F] = r(!1), [I, L] = r(null), [R, z] = r(null), B = n(null), V = n(null);
10
+ let b = i(), { authToken: x } = e(), [S, C] = r(""), [w, T] = r([]), [E, D] = r(!1), [O, k] = r(!1), [A, j] = r(null), [M, N] = r([]), [P, F] = r(!1), [I, L] = r(null), [R, z] = r(null), B = n(null), V = n(null);
11
11
  t(() => {
12
12
  let e = (e) => {
13
13
  V.current && !V.current.contains(e.target) && k(!1);
@@ -22,7 +22,7 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
22
22
  B.current = setTimeout(async () => {
23
23
  D(!0);
24
24
  try {
25
- T((await l({
25
+ T((await u({
26
26
  gateway: "global",
27
27
  query: g,
28
28
  variables: { query: e },
@@ -39,7 +39,7 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
39
39
  }, W = async (e) => {
40
40
  F(!0), L(null);
41
41
  try {
42
- let t = await l({
42
+ let t = await u({
43
43
  gateway: "global",
44
44
  query: _,
45
45
  variables: { productId: e },
@@ -55,7 +55,7 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
55
55
  }, G = async (e) => {
56
56
  z(e), L(null);
57
57
  try {
58
- let t = await l({
58
+ let t = await u({
59
59
  gateway: "global",
60
60
  query: v,
61
61
  variables: { id: e },
@@ -74,7 +74,7 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
74
74
  }, K = async (e) => {
75
75
  z(e), L(null);
76
76
  try {
77
- let t = await l({
77
+ let t = await u({
78
78
  gateway: "global",
79
79
  query: y,
80
80
  variables: { id: e },
@@ -91,57 +91,57 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
91
91
  z(null);
92
92
  }
93
93
  };
94
- return /* @__PURE__ */ d("div", {
94
+ return /* @__PURE__ */ f("div", {
95
95
  className: "min-h-screen bg-surface-default",
96
- children: [/* @__PURE__ */ u("header", {
96
+ children: [/* @__PURE__ */ d("header", {
97
97
  className: "border-b border-border-seam bg-surface-raised",
98
- children: /* @__PURE__ */ d("div", {
98
+ children: /* @__PURE__ */ f("div", {
99
99
  className: "mx-auto max-w-7xl px-6 py-4",
100
- children: [/* @__PURE__ */ d("div", {
100
+ children: [/* @__PURE__ */ f("div", {
101
101
  className: "flex items-center gap-3",
102
- children: [/* @__PURE__ */ d("button", {
102
+ children: [/* @__PURE__ */ f("button", {
103
103
  type: "button",
104
104
  onClick: () => b(-1),
105
105
  "aria-label": "Go back",
106
106
  className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary",
107
- children: [/* @__PURE__ */ u(i, { className: "size-4" }), "Back"]
108
- }), /* @__PURE__ */ d("div", {
107
+ children: [/* @__PURE__ */ d(a, { className: "size-4" }), "Back"]
108
+ }), /* @__PURE__ */ f("div", {
109
109
  className: "flex items-center gap-2",
110
- children: [/* @__PURE__ */ u(o, { className: "size-5 text-text-primary" }), /* @__PURE__ */ u("h1", {
110
+ children: [/* @__PURE__ */ d(s, { className: "size-5 text-text-primary" }), /* @__PURE__ */ d("h1", {
111
111
  className: "text-xl font-semibold text-text-primary",
112
112
  children: "Review Moderation"
113
113
  })]
114
114
  })]
115
- }), /* @__PURE__ */ u("p", {
115
+ }), /* @__PURE__ */ d("p", {
116
116
  className: "mt-1 text-sm text-text-secondary",
117
117
  children: "Moderate reviews by product — approve legitimate ones or remove violations"
118
118
  })]
119
119
  })
120
- }), /* @__PURE__ */ u("main", {
120
+ }), /* @__PURE__ */ d("main", {
121
121
  className: "mx-auto max-w-7xl p-6",
122
- children: /* @__PURE__ */ d("div", {
122
+ children: /* @__PURE__ */ f("div", {
123
123
  className: "space-y-4",
124
124
  children: [
125
- /* @__PURE__ */ u(h, { children: "Keep the marketplace trustworthy. Pick any product, read every review customers have left for it, approve legitimate ones, and remove those that break content guidelines (spam, abuse, or off-topic posts). Search the exact product you need to moderate rather than scrolling an endless global feed." }),
126
- /* @__PURE__ */ d("div", {
125
+ /* @__PURE__ */ d(h, { children: "Keep the marketplace trustworthy. Pick any product, read every review customers have left for it, approve legitimate ones, and remove those that break content guidelines (spam, abuse, or off-topic posts). Search the exact product you need to moderate rather than scrolling an endless global feed." }),
126
+ /* @__PURE__ */ f("div", {
127
127
  ref: V,
128
128
  className: "relative",
129
129
  children: [
130
- /* @__PURE__ */ d(p, {
130
+ /* @__PURE__ */ f(p, {
131
131
  treatment: "glass",
132
132
  glow: !0,
133
133
  className: "p-4",
134
134
  children: [
135
- /* @__PURE__ */ u("label", {
135
+ /* @__PURE__ */ d("label", {
136
136
  htmlFor: "admin-review-product-search",
137
137
  className: "mb-1.5 block text-sm font-medium text-text-primary",
138
138
  children: "Search product by name"
139
139
  }),
140
- /* @__PURE__ */ d("div", {
140
+ /* @__PURE__ */ f("div", {
141
141
  className: "relative flex items-center",
142
142
  children: [
143
- /* @__PURE__ */ u(s, { className: "pointer-events-none absolute left-3 size-4 text-text-secondary" }),
144
- /* @__PURE__ */ u("input", {
143
+ /* @__PURE__ */ d(c, { className: "pointer-events-none absolute left-3 size-4 text-text-secondary" }),
144
+ /* @__PURE__ */ d("input", {
145
145
  id: "admin-review-product-search",
146
146
  "aria-label": "Search product by name",
147
147
  value: S,
@@ -151,22 +151,22 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
151
151
  autoComplete: "off",
152
152
  className: "w-full rounded-md border border-border-default bg-surface-default py-2 pl-9 pr-3 text-sm text-text-primary outline-none focus:border-border-accent"
153
153
  }),
154
- E && /* @__PURE__ */ u("span", {
154
+ E && /* @__PURE__ */ d("span", {
155
155
  className: "absolute right-3 text-xs text-text-secondary",
156
156
  children: "Searching…"
157
157
  })
158
158
  ]
159
159
  }),
160
- A && /* @__PURE__ */ d("p", {
160
+ A && /* @__PURE__ */ f("p", {
161
161
  className: "mt-2 text-xs text-text-secondary",
162
162
  children: [
163
163
  "Moderating:",
164
164
  " ",
165
- /* @__PURE__ */ u("span", {
165
+ /* @__PURE__ */ d("span", {
166
166
  className: "font-medium text-text-primary",
167
167
  children: A.name
168
168
  }),
169
- /* @__PURE__ */ d("span", {
169
+ /* @__PURE__ */ f("span", {
170
170
  className: "ml-1 text-text-tertiary",
171
171
  children: [
172
172
  "(",
@@ -178,23 +178,23 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
178
178
  })
179
179
  ]
180
180
  }),
181
- O && w.length > 0 && /* @__PURE__ */ u("ul", {
181
+ O && w.length > 0 && /* @__PURE__ */ d("ul", {
182
182
  className: "absolute left-0 right-0 z-50 mt-1 rounded-md border border-border-default bg-surface-raised shadow-lg",
183
- children: w.map((e) => /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
183
+ children: w.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ f("button", {
184
184
  type: "button",
185
185
  onMouseDown: (e) => e.preventDefault(),
186
186
  onClick: () => U(e),
187
187
  className: "w-full px-4 py-2.5 text-left text-sm hover:bg-surface-hover",
188
- children: [/* @__PURE__ */ u("span", {
188
+ children: [/* @__PURE__ */ d("span", {
189
189
  className: "font-medium text-text-primary",
190
190
  children: e.name
191
- }), /* @__PURE__ */ u("span", {
191
+ }), /* @__PURE__ */ d("span", {
192
192
  className: "ml-2 text-xs text-text-secondary",
193
193
  children: e.id
194
194
  })]
195
195
  }) }, e.id))
196
196
  }),
197
- O && !E && w.length === 0 && S.trim() && /* @__PURE__ */ d("div", {
197
+ O && !E && w.length === 0 && S.trim() && /* @__PURE__ */ f("div", {
198
198
  className: "absolute left-0 right-0 z-50 mt-1 rounded-md border border-border-default bg-surface-raised px-4 py-3 text-sm text-text-secondary shadow-lg",
199
199
  children: [
200
200
  "No products found for “",
@@ -204,48 +204,48 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
204
204
  })
205
205
  ]
206
206
  }),
207
- I && /* @__PURE__ */ u("div", {
207
+ I && /* @__PURE__ */ d("div", {
208
208
  role: "alert",
209
209
  className: "rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
210
210
  children: I
211
211
  }),
212
- P && /* @__PURE__ */ u("div", {
212
+ P && /* @__PURE__ */ d("div", {
213
213
  className: "rounded-lg border border-border-default bg-surface-raised p-10 text-center",
214
- children: /* @__PURE__ */ u("p", {
214
+ children: /* @__PURE__ */ d("p", {
215
215
  className: "text-sm text-text-secondary",
216
216
  children: "Loading reviews…"
217
217
  })
218
218
  }),
219
- !P && !A ? /* @__PURE__ */ u(m, {
219
+ !P && !A ? /* @__PURE__ */ d(m, {
220
220
  illustration: "empty-search",
221
221
  title: "Search a product to moderate",
222
222
  description: "Use the search box above to find a product by name. Its reviews will load here so you can inspect and remove any that violate the guidelines."
223
- }) : !P && A && M.length === 0 ? /* @__PURE__ */ u(m, {
223
+ }) : !P && A && M.length === 0 ? /* @__PURE__ */ d(m, {
224
224
  illustration: "empty-notifications",
225
225
  title: "No reviews to moderate",
226
226
  description: "This product has no reviews right now. Nothing here needs your attention."
227
- }) : /* @__PURE__ */ u("ul", {
227
+ }) : /* @__PURE__ */ d("ul", {
228
228
  className: "space-y-3",
229
- children: M.map((e) => /* @__PURE__ */ u("li", {
229
+ children: M.map((e) => /* @__PURE__ */ d("li", {
230
230
  className: "rounded-lg border border-border-seam bg-surface-raised p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
231
- children: /* @__PURE__ */ d("div", {
231
+ children: /* @__PURE__ */ f("div", {
232
232
  className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
233
- children: [/* @__PURE__ */ d("div", { children: [
234
- /* @__PURE__ */ d("div", {
233
+ children: [/* @__PURE__ */ f("div", { children: [
234
+ /* @__PURE__ */ f("div", {
235
235
  className: "flex items-center gap-2",
236
- children: [/* @__PURE__ */ u("p", {
236
+ children: [/* @__PURE__ */ d("p", {
237
237
  className: "font-medium text-text-primary",
238
238
  children: e.title || "Untitled review"
239
- }), /* @__PURE__ */ u("span", {
239
+ }), /* @__PURE__ */ d("span", {
240
240
  className: `rounded-full px-2 py-0.5 text-xs font-medium ${e.status === "APPROVED" ? "bg-surface-success-muted text-text-success" : e.status === "REJECTED" ? "bg-surface-danger-muted text-text-danger" : "bg-surface-warning-muted text-text-warning"}`,
241
241
  children: e.status
242
242
  })]
243
243
  }),
244
- /* @__PURE__ */ u("p", {
244
+ /* @__PURE__ */ d("p", {
245
245
  className: "mt-1 text-sm text-text-secondary",
246
246
  children: e.comment || "No comment provided."
247
247
  }),
248
- /* @__PURE__ */ d("p", {
248
+ /* @__PURE__ */ f("p", {
249
249
  className: "mt-2 text-xs text-text-secondary",
250
250
  children: [
251
251
  "User ",
@@ -256,20 +256,20 @@ var g = "query SearchProductsForModeration($query: String!) { searchProducts(que
256
256
  e.helpful
257
257
  ]
258
258
  })
259
- ] }), /* @__PURE__ */ d("div", {
259
+ ] }), /* @__PURE__ */ f("div", {
260
260
  className: "flex items-center gap-2",
261
- children: [e.status !== "APPROVED" && /* @__PURE__ */ d("button", {
261
+ children: [e.status !== "APPROVED" && /* @__PURE__ */ f("button", {
262
262
  type: "button",
263
263
  onClick: () => K(e.id),
264
264
  disabled: R === e.id,
265
265
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-success px-3 py-1.5 text-sm font-medium text-text-success hover:bg-surface-success-muted disabled:cursor-not-allowed disabled:opacity-60",
266
- children: [/* @__PURE__ */ u(a, { className: "size-4" }), " Approve"]
267
- }), e.status !== "REJECTED" && /* @__PURE__ */ d("button", {
266
+ children: [/* @__PURE__ */ d(o, { className: "size-4" }), " Approve"]
267
+ }), e.status !== "REJECTED" && /* @__PURE__ */ f("button", {
268
268
  type: "button",
269
269
  onClick: () => G(e.id),
270
270
  disabled: R === e.id,
271
271
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-danger px-3 py-1.5 text-sm font-medium text-text-danger hover:bg-surface-danger-muted disabled:cursor-not-allowed disabled:opacity-60",
272
- children: [/* @__PURE__ */ u(c, { className: "size-4" }), " Remove"]
272
+ children: [/* @__PURE__ */ d(l, { className: "size-4" }), " Remove"]
273
273
  })]
274
274
  })]
275
275
  })