@burdenoff/microfe-devportal 2026.1014.1 → 2026.1026.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 (40) hide show
  1. package/dist/devportal/components/PackageValidationPanel.d.ts +31 -0
  2. package/dist/devportal/components/PackageValidationPanel.d.ts.map +1 -0
  3. package/dist/devportal/components/PackageValidationPanel.js +104 -0
  4. package/dist/devportal/components/PackageValidationPanel.js.map +1 -0
  5. package/dist/devportal/components/index.d.ts +1 -0
  6. package/dist/devportal/components/index.d.ts.map +1 -1
  7. package/dist/devportal/components/index.js +1 -0
  8. package/dist/devportal/hooks/useSellerOrganization.d.ts.map +1 -1
  9. package/dist/devportal/hooks/useSellerOrganization.js +23 -22
  10. package/dist/devportal/hooks/useSellerOrganization.js.map +1 -1
  11. package/dist/devportal/pages/AdminReviewPage.d.ts.map +1 -1
  12. package/dist/devportal/pages/AdminReviewPage.js +192 -181
  13. package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
  14. package/dist/devportal/pages/ApplicationVersionsPage.d.ts.map +1 -1
  15. package/dist/devportal/pages/ApplicationVersionsPage.js +117 -115
  16. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  17. package/dist/devportal/pages/CreatePhysicalItemPage.d.ts.map +1 -1
  18. package/dist/devportal/pages/CreatePhysicalItemPage.js +119 -118
  19. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
  20. package/dist/devportal/pages/EditPhysicalItemPage.d.ts.map +1 -1
  21. package/dist/devportal/pages/EditPhysicalItemPage.js +61 -60
  22. package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
  23. package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
  24. package/dist/devportal/pages/SellerDashboardPage.js +142 -141
  25. package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
  26. package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
  27. package/dist/devportal/pages/SellerItemsPage.js +190 -189
  28. package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
  29. package/dist/devportal/pages/SellerOrdersPage.d.ts.map +1 -1
  30. package/dist/devportal/pages/SellerOrdersPage.js +43 -42
  31. package/dist/devportal/pages/SellerOrdersPage.js.map +1 -1
  32. package/dist/devportal/utils/graphqlEndpoint.d.ts +6 -0
  33. package/dist/devportal/utils/graphqlEndpoint.d.ts.map +1 -0
  34. package/dist/devportal/utils/graphqlEndpoint.js +9 -0
  35. package/dist/devportal/utils/graphqlEndpoint.js.map +1 -0
  36. package/dist/generated/global-operations.d.ts +1 -0
  37. package/dist/generated/global-operations.d.ts.map +1 -1
  38. package/dist/generated/global-operations.js +1 -0
  39. package/dist/generated/global-operations.js.map +1 -1
  40. package/package.json +1 -1
@@ -3,17 +3,18 @@ import { EmptyState as t } from "../components/EmptyState.js";
3
3
  import { PageLayout as n } from "../components/PageLayout.js";
4
4
  import { PermissionGuard as r } from "../components/PermissionGuard.js";
5
5
  import "../components/index.js";
6
- import { useEffect as i, useMemo as a, useState as o } from "react";
7
- import { AlertCircle as s, Edit as c, Grid as ee, List as l, Loader2 as u, Package as d, Plus as f, Search as p, Tag as m } from "lucide-react";
8
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
9
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
- import { EmphasisPanel as v, GlassCard as y } from "@burdenoff/fe-libs/ui";
6
+ import { resolveGlobalGraphqlEndpoint as i } from "../utils/graphqlEndpoint.js";
7
+ import { useEffect as a, useMemo as o, useState as s } from "react";
8
+ import { AlertCircle as c, Edit as l, Grid as u, List as ee, Loader2 as d, Package as f, Plus as p, Search as m, Tag as h } from "lucide-react";
9
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
10
+ import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { EmphasisPanel as y, GlassCard as b } from "@burdenoff/fe-libs/ui";
11
12
  //#region src/devportal/pages/SellerItemsPage.tsx
12
- var b = new Set([
13
+ var x = new Set([
13
14
  "APP",
14
15
  "NODE",
15
16
  "WORKFLOW"
16
- ]), x = {
17
+ ]), S = {
17
18
  MERCHANDISE: "Merchandise",
18
19
  HARDWARE: "Hardware",
19
20
  ACCESSORY: "Accessory",
@@ -22,7 +23,7 @@ var b = new Set([
22
23
  APPAREL: "Apparel",
23
24
  COLLECTIBLE: "Collectible",
24
25
  CONSUMABLE: "Consumable"
25
- }, S = {
26
+ }, C = {
26
27
  PUBLISHED: {
27
28
  label: "Published",
28
29
  className: "text-status-success-text bg-status-success-bg-subtle"
@@ -43,7 +44,7 @@ var b = new Set([
43
44
  label: "Inactive",
44
45
  className: "text-text-muted bg-bg-muted"
45
46
  }
46
- }, C = [
47
+ }, te = [
47
48
  {
48
49
  value: "",
49
50
  label: "All Status"
@@ -79,59 +80,59 @@ function w(e, t) {
79
80
  }).format(e)} ${n}`;
80
81
  }
81
82
  function T(e) {
82
- return x[e] ?? e.replace(/_/g, " ");
83
+ return S[e] ?? e.replace(/_/g, " ");
83
84
  }
84
- var te = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", ne = "\n query SellerItems($publisherId: String!) {\n products(filter: { publisherId: $publisherId, nature: PHYSICAL }, limit: 100, offset: 0) {\n id\n name\n slug\n type\n status\n price\n currency\n stockQuantity\n sku\n brand\n icon\n createdAt\n }\n }\n", E = () => {
85
- let { navigate: m, basePath: x, apiGatewayUrl: E, authToken: O } = e(), { t: k } = _(), A = (e, t) => {
86
- let n = k(e);
85
+ var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", D = "\n query SellerItems($publisherId: String!) {\n products(filter: { publisherId: $publisherId, nature: PHYSICAL }, limit: 100, offset: 0) {\n id\n name\n slug\n type\n status\n price\n currency\n stockQuantity\n sku\n brand\n icon\n createdAt\n }\n }\n", O = () => {
86
+ let { navigate: h, basePath: S, apiGatewayUrl: O, authToken: A } = e(), { t: j } = v(), M = (e, t) => {
87
+ let n = j(e);
87
88
  return n === e ? t : n;
88
- }, j = E ?? "/global/graphql", [M, N] = o(!0), [P, F] = o(!1), [I, L] = o(null), [R, z] = o([]), [B, V] = o(null), [H, U] = o(0), [W, G] = o("grid"), [K, q] = o(""), [J, Y] = o(""), X = (e) => {
89
- m?.(`${x}${e}`);
89
+ }, N = i(O), [P, F] = s(!0), [I, L] = s(!1), [R, z] = s(null), [B, V] = s([]), [H, U] = s(null), [W, G] = s(0), [K, q] = s("grid"), [J, ne] = s(""), [Y, re] = s(""), X = (e) => {
90
+ h?.(`${S}${e}`);
90
91
  };
91
- i(() => {
92
+ a(() => {
92
93
  let e = !1;
93
- return N(!0), V(null), (async () => {
94
+ return F(!0), U(null), (async () => {
94
95
  try {
95
- let t = await fetch(j, {
96
+ let t = await fetch(N, {
96
97
  method: "POST",
97
98
  headers: {
98
99
  "Content-Type": "application/json",
99
- Authorization: `Bearer ${O ?? ""}`
100
+ Authorization: `Bearer ${A ?? ""}`
100
101
  },
101
- body: JSON.stringify({ query: te })
102
+ body: JSON.stringify({ query: E })
102
103
  });
103
104
  if (e) return;
104
105
  if (!t.ok) throw Error(`Request failed with status ${t.status}`);
105
106
  let n = await t.json();
106
107
  if (e) return;
107
108
  if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Unknown GraphQL error");
108
- L(n.data?.myPublisher?.id ?? null);
109
+ z(n.data?.myPublisher?.id ?? null);
109
110
  } catch (t) {
110
- e || V(t instanceof Error ? t.message : "Failed to load publisher");
111
+ e || U(t instanceof Error ? t.message : "Failed to load publisher");
111
112
  } finally {
112
- e || N(!1);
113
+ e || F(!1);
113
114
  }
114
115
  })(), () => {
115
116
  e = !0;
116
117
  };
117
118
  }, [
118
- j,
119
- O,
120
- H
121
- ]), i(() => {
122
- if (!I) return;
119
+ N,
120
+ A,
121
+ W
122
+ ]), a(() => {
123
+ if (!R) return;
123
124
  let e = !1;
124
- return F(!0), V(null), (async () => {
125
+ return L(!0), U(null), (async () => {
125
126
  try {
126
- let t = await fetch(j, {
127
+ let t = await fetch(N, {
127
128
  method: "POST",
128
129
  headers: {
129
130
  "Content-Type": "application/json",
130
- Authorization: `Bearer ${O ?? ""}`
131
+ Authorization: `Bearer ${A ?? ""}`
131
132
  },
132
133
  body: JSON.stringify({
133
- query: ne,
134
- variables: { publisherId: I }
134
+ query: D,
135
+ variables: { publisherId: R }
135
136
  })
136
137
  });
137
138
  if (e) return;
@@ -139,179 +140,179 @@ var te = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }
139
140
  let n = await t.json();
140
141
  if (e) return;
141
142
  if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Unknown GraphQL error");
142
- z((n.data?.products ?? []).map((e) => ({
143
+ V((n.data?.products ?? []).map((e) => ({
143
144
  ...e,
144
145
  status: e.status
145
146
  })));
146
147
  } catch (t) {
147
- e || V(t instanceof Error ? t.message : "Failed to load items");
148
+ e || U(t instanceof Error ? t.message : "Failed to load items");
148
149
  } finally {
149
- e || F(!1);
150
+ e || L(!1);
150
151
  }
151
152
  })(), () => {
152
153
  e = !0;
153
154
  };
154
155
  }, [
155
- I,
156
- j,
157
- O,
158
- H
156
+ R,
157
+ N,
158
+ A,
159
+ W
159
160
  ]);
160
- let Z = a(() => R.filter((e) => !b.has(e.type)), [R]), Q = a(() => Z.filter((e) => {
161
- let t = !K || e.name.toLowerCase().includes(K.toLowerCase()), n = !J || e.status === J;
161
+ let Z = o(() => B.filter((e) => !x.has(e.type)), [B]), Q = o(() => Z.filter((e) => {
162
+ let t = !J || e.name.toLowerCase().includes(J.toLowerCase()), n = !Y || e.status === Y;
162
163
  return t && n;
163
164
  }), [
164
165
  Z,
165
- K,
166
- J
167
- ]), $ = a(() => ({
166
+ J,
167
+ Y
168
+ ]), $ = o(() => ({
168
169
  total: Z.length,
169
170
  published: Z.filter((e) => e.status === "PUBLISHED").length,
170
171
  pendingReview: Z.filter((e) => e.status === "PENDING_REVIEW").length,
171
172
  outOfStock: Z.filter((e) => e.stockQuantity === 0).length
172
173
  }), [Z]);
173
- if (M && R.length === 0 && !B) return /* @__PURE__ */ h(n, {
174
- title: A("devportal.myItems", "My Items"),
175
- description: A("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
176
- children: /* @__PURE__ */ g("div", {
174
+ if (P && B.length === 0 && !H) return /* @__PURE__ */ g(n, {
175
+ title: M("devportal.myItems", "My Items"),
176
+ description: M("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
177
+ children: /* @__PURE__ */ _("div", {
177
178
  className: "flex items-center justify-center py-12",
178
- children: [/* @__PURE__ */ h(u, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ h("span", {
179
+ children: [/* @__PURE__ */ g(d, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ g("span", {
179
180
  className: "ml-2 text-text-secondary",
180
- children: A("devportal.loadingItems", "Loading items...")
181
+ children: M("devportal.loadingItems", "Loading items...")
181
182
  })]
182
183
  })
183
184
  });
184
- if (B && R.length === 0) return /* @__PURE__ */ h(n, {
185
- title: A("devportal.myItems", "My Items"),
186
- description: A("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
187
- children: /* @__PURE__ */ g("div", {
185
+ if (H && B.length === 0) return /* @__PURE__ */ g(n, {
186
+ title: M("devportal.myItems", "My Items"),
187
+ description: M("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
188
+ children: /* @__PURE__ */ _("div", {
188
189
  className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
189
190
  children: [
190
- /* @__PURE__ */ h(s, { className: "mx-auto h-8 w-8 text-status-error-text" }),
191
- /* @__PURE__ */ h("h3", {
191
+ /* @__PURE__ */ g(c, { className: "mx-auto h-8 w-8 text-status-error-text" }),
192
+ /* @__PURE__ */ g("h3", {
192
193
  className: "mt-2 font-medium text-status-error-text",
193
- children: A("devportal.failedToLoadItems", "Failed to load items")
194
+ children: M("devportal.failedToLoadItems", "Failed to load items")
194
195
  }),
195
- /* @__PURE__ */ h("p", {
196
+ /* @__PURE__ */ g("p", {
196
197
  className: "mt-1 text-sm text-text-secondary",
197
- children: B
198
+ children: H
198
199
  }),
199
- /* @__PURE__ */ h("button", {
200
- onClick: () => U((e) => e + 1),
200
+ /* @__PURE__ */ g("button", {
201
+ onClick: () => G((e) => e + 1),
201
202
  className: "mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
202
- children: A("devportal.tryAgain", "Try Again")
203
+ children: M("devportal.tryAgain", "Try Again")
203
204
  })
204
205
  ]
205
206
  })
206
207
  });
207
- let re = !!(K || J);
208
- return /* @__PURE__ */ h(r, {
208
+ let ie = !!(J || Y);
209
+ return /* @__PURE__ */ g(r, {
209
210
  authOnly: !0,
210
- children: /* @__PURE__ */ g(n, {
211
- title: A("devportal.myItems", "My Items"),
212
- description: A("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
213
- actions: /* @__PURE__ */ g("button", {
211
+ children: /* @__PURE__ */ _(n, {
212
+ title: M("devportal.myItems", "My Items"),
213
+ description: M("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
214
+ actions: /* @__PURE__ */ _("button", {
214
215
  onClick: () => X("/seller/items/new"),
215
216
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
216
- children: [/* @__PURE__ */ h(f, {
217
+ children: [/* @__PURE__ */ g(p, {
217
218
  size: 16,
218
219
  "aria-hidden": "true"
219
- }), A("devportal.listAnItem", "List an Item")]
220
+ }), M("devportal.listAnItem", "List an Item")]
220
221
  }),
221
222
  children: [
222
- /* @__PURE__ */ h(v, {
223
+ /* @__PURE__ */ g(y, {
223
224
  className: "mb-4",
224
- children: /* @__PURE__ */ g("div", {
225
+ children: /* @__PURE__ */ _("div", {
225
226
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
226
227
  children: [
227
- /* @__PURE__ */ g(y, {
228
+ /* @__PURE__ */ _(b, {
228
229
  treatment: "metric",
229
230
  className: "p-4",
230
- children: [/* @__PURE__ */ h("p", {
231
+ children: [/* @__PURE__ */ g("p", {
231
232
  className: "text-sm text-text-secondary",
232
- children: A("devportal.totalItems", "Total Items")
233
- }), /* @__PURE__ */ h("p", {
233
+ children: M("devportal.totalItems", "Total Items")
234
+ }), /* @__PURE__ */ g("p", {
234
235
  className: "mt-1 text-2xl font-semibold tabular-nums",
235
- children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.total
236
+ children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.total
236
237
  })]
237
238
  }),
238
- /* @__PURE__ */ g(y, {
239
+ /* @__PURE__ */ _(b, {
239
240
  treatment: "metric",
240
241
  className: "p-4",
241
- children: [/* @__PURE__ */ h("p", {
242
+ children: [/* @__PURE__ */ g("p", {
242
243
  className: "text-sm text-status-success-text",
243
- children: A("devportal.published", "Published")
244
- }), /* @__PURE__ */ h("p", {
244
+ children: M("devportal.published", "Published")
245
+ }), /* @__PURE__ */ g("p", {
245
246
  className: "mt-1 text-2xl font-semibold tabular-nums",
246
- children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.published
247
+ children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.published
247
248
  })]
248
249
  }),
249
- /* @__PURE__ */ g(y, {
250
+ /* @__PURE__ */ _(b, {
250
251
  treatment: "metric",
251
252
  className: "p-4",
252
- children: [/* @__PURE__ */ h("p", {
253
+ children: [/* @__PURE__ */ g("p", {
253
254
  className: "text-sm text-status-warning-text",
254
- children: A("devportal.pendingReview", "Pending Review")
255
- }), /* @__PURE__ */ h("p", {
255
+ children: M("devportal.pendingReview", "Pending Review")
256
+ }), /* @__PURE__ */ g("p", {
256
257
  className: "mt-1 text-2xl font-semibold tabular-nums",
257
- children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.pendingReview
258
+ children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.pendingReview
258
259
  })]
259
260
  }),
260
- /* @__PURE__ */ g(y, {
261
+ /* @__PURE__ */ _(b, {
261
262
  treatment: "metric",
262
263
  className: "p-4",
263
- children: [/* @__PURE__ */ h("p", {
264
+ children: [/* @__PURE__ */ g("p", {
264
265
  className: "text-sm text-status-error-text",
265
- children: A("devportal.outOfStock", "Out of Stock")
266
- }), /* @__PURE__ */ h("p", {
266
+ children: M("devportal.outOfStock", "Out of Stock")
267
+ }), /* @__PURE__ */ g("p", {
267
268
  className: "mt-1 text-2xl font-semibold tabular-nums",
268
- children: P ? /* @__PURE__ */ h(u, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.outOfStock
269
+ children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.outOfStock
269
270
  })]
270
271
  })
271
272
  ]
272
273
  })
273
274
  }),
274
- /* @__PURE__ */ g("div", {
275
+ /* @__PURE__ */ _("div", {
275
276
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
276
- children: [/* @__PURE__ */ g("div", {
277
+ children: [/* @__PURE__ */ _("div", {
277
278
  className: "flex flex-1 items-center gap-3",
278
- children: [/* @__PURE__ */ g("div", {
279
+ children: [/* @__PURE__ */ _("div", {
279
280
  className: "relative flex-1 max-w-md",
280
- children: [/* @__PURE__ */ h(p, {
281
+ children: [/* @__PURE__ */ g(m, {
281
282
  size: 16,
282
283
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
283
- }), /* @__PURE__ */ h("input", {
284
+ }), /* @__PURE__ */ g("input", {
284
285
  type: "text",
285
- placeholder: A("devportal.searchItems", "Search items..."),
286
- value: K,
287
- onChange: (e) => q(e.target.value),
286
+ placeholder: M("devportal.searchItems", "Search items..."),
287
+ value: J,
288
+ onChange: (e) => ne(e.target.value),
288
289
  className: "w-full rounded-md border border-border-seam bg-bg-surface pl-9 pr-4 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary"
289
290
  })]
290
- }), /* @__PURE__ */ h("select", {
291
- value: J,
292
- onChange: (e) => Y(e.target.value),
291
+ }), /* @__PURE__ */ g("select", {
292
+ value: Y,
293
+ onChange: (e) => re(e.target.value),
293
294
  className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
294
- children: C.map((e) => /* @__PURE__ */ h("option", {
295
+ children: te.map((e) => /* @__PURE__ */ g("option", {
295
296
  value: e.value,
296
297
  children: e.label
297
298
  }, e.value))
298
299
  })]
299
- }), /* @__PURE__ */ g("div", {
300
+ }), /* @__PURE__ */ _("div", {
300
301
  className: "flex items-center gap-1 rounded-md border border-border-seam p-1",
301
- children: [/* @__PURE__ */ h("button", {
302
- onClick: () => G("grid"),
303
- className: `rounded p-1.5 transition-colors ${W === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
304
- title: A("devportal.gridView", "Grid view"),
305
- children: /* @__PURE__ */ h(ee, { size: 16 })
306
- }), /* @__PURE__ */ h("button", {
307
- onClick: () => G("list"),
308
- className: `rounded p-1.5 transition-colors ${W === "list" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
309
- title: A("devportal.listView", "List view"),
310
- children: /* @__PURE__ */ h(l, { size: 16 })
302
+ children: [/* @__PURE__ */ g("button", {
303
+ onClick: () => q("grid"),
304
+ className: `rounded p-1.5 transition-colors ${K === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
305
+ title: M("devportal.gridView", "Grid view"),
306
+ children: /* @__PURE__ */ g(u, { size: 16 })
307
+ }), /* @__PURE__ */ g("button", {
308
+ onClick: () => q("list"),
309
+ className: `rounded p-1.5 transition-colors ${K === "list" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
310
+ title: M("devportal.listView", "List view"),
311
+ children: /* @__PURE__ */ g(ee, { size: 16 })
311
312
  })]
312
313
  })]
313
314
  }),
314
- Z.length > 0 && /* @__PURE__ */ g("p", {
315
+ Z.length > 0 && /* @__PURE__ */ _("p", {
315
316
  className: "text-sm text-text-secondary",
316
317
  children: [
317
318
  Q.length,
@@ -320,213 +321,213 @@ var te = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }
320
321
  " found"
321
322
  ]
322
323
  }),
323
- !I && !M ? /* @__PURE__ */ h(t, {
324
+ !R && !P ? /* @__PURE__ */ g(t, {
324
325
  illustration: "empty-generic",
325
- icon: /* @__PURE__ */ h(d, { size: 32 }),
326
- title: A("devportal.noPublisherProfileYet", "No publisher profile yet"),
327
- description: A("devportal.listAnItemToGetStarted", "List an item to get started. Your publisher profile will be created automatically."),
328
- action: /* @__PURE__ */ g("button", {
326
+ icon: /* @__PURE__ */ g(f, { size: 32 }),
327
+ title: M("devportal.noPublisherProfileYet", "No publisher profile yet"),
328
+ description: M("devportal.listAnItemToGetStarted", "List an item to get started. Your publisher profile will be created automatically."),
329
+ action: /* @__PURE__ */ _("button", {
329
330
  onClick: () => X("/seller/items/new"),
330
331
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
331
- children: [/* @__PURE__ */ h(f, { size: 16 }), A("devportal.listAnItem", "List an Item")]
332
+ children: [/* @__PURE__ */ g(p, { size: 16 }), M("devportal.listAnItem", "List an Item")]
332
333
  })
333
- }) : P ? /* @__PURE__ */ g("div", {
334
+ }) : I ? /* @__PURE__ */ _("div", {
334
335
  className: "flex items-center justify-center py-12",
335
- children: [/* @__PURE__ */ h(u, { className: "h-6 w-6 animate-spin text-text-secondary" }), /* @__PURE__ */ h("span", {
336
+ children: [/* @__PURE__ */ g(d, { className: "h-6 w-6 animate-spin text-text-secondary" }), /* @__PURE__ */ g("span", {
336
337
  className: "ml-2 text-text-secondary",
337
- children: A("devportal.loadingItems", "Loading items...")
338
+ children: M("devportal.loadingItems", "Loading items...")
338
339
  })]
339
- }) : Q.length > 0 ? W === "grid" ? /* @__PURE__ */ h("div", {
340
+ }) : Q.length > 0 ? K === "grid" ? /* @__PURE__ */ g("div", {
340
341
  className: "grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
341
- children: Q.map((e) => /* @__PURE__ */ h(D, {
342
+ children: Q.map((e) => /* @__PURE__ */ g(k, {
342
343
  item: e,
343
344
  onEdit: () => X(`/seller/items/${e.id}`)
344
345
  }, e.id))
345
- }) : /* @__PURE__ */ h("div", {
346
+ }) : /* @__PURE__ */ g("div", {
346
347
  className: "overflow-x-auto rounded-lg border border-border-seam",
347
- children: /* @__PURE__ */ g("table", {
348
+ children: /* @__PURE__ */ _("table", {
348
349
  className: "w-full text-sm",
349
- children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
350
+ children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
350
351
  className: "border-b border-border-seam bg-bg-sunken",
351
352
  children: [
352
- /* @__PURE__ */ h("th", {
353
+ /* @__PURE__ */ g("th", {
353
354
  className: "px-4 py-3 text-left font-medium text-text-secondary",
354
355
  children: "Item"
355
356
  }),
356
- /* @__PURE__ */ h("th", {
357
+ /* @__PURE__ */ g("th", {
357
358
  className: "px-4 py-3 text-left font-medium text-text-secondary",
358
359
  children: "Type"
359
360
  }),
360
- /* @__PURE__ */ h("th", {
361
+ /* @__PURE__ */ g("th", {
361
362
  className: "px-4 py-3 text-left font-medium text-text-secondary",
362
363
  children: "Price"
363
364
  }),
364
- /* @__PURE__ */ h("th", {
365
+ /* @__PURE__ */ g("th", {
365
366
  className: "px-4 py-3 text-left font-medium text-text-secondary",
366
367
  children: "Stock"
367
368
  }),
368
- /* @__PURE__ */ h("th", {
369
+ /* @__PURE__ */ g("th", {
369
370
  className: "px-4 py-3 text-left font-medium text-text-secondary",
370
371
  children: "Status"
371
372
  }),
372
- /* @__PURE__ */ h("th", {
373
+ /* @__PURE__ */ g("th", {
373
374
  className: "px-4 py-3 text-right font-medium text-text-secondary",
374
375
  children: "Actions"
375
376
  })
376
377
  ]
377
- }) }), /* @__PURE__ */ h("tbody", { children: Q.map((e) => {
378
- let t = S[e.status] ?? S.DRAFT;
379
- return /* @__PURE__ */ g("tr", {
378
+ }) }), /* @__PURE__ */ g("tbody", { children: Q.map((e) => {
379
+ let t = C[e.status] ?? C.DRAFT;
380
+ return /* @__PURE__ */ _("tr", {
380
381
  className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/50 transition-colors",
381
382
  children: [
382
- /* @__PURE__ */ h("td", {
383
+ /* @__PURE__ */ g("td", {
383
384
  className: "px-4 py-3",
384
- children: /* @__PURE__ */ g("div", {
385
+ children: /* @__PURE__ */ _("div", {
385
386
  className: "flex items-center gap-3",
386
- children: [e.icon ? /* @__PURE__ */ h("img", {
387
+ children: [e.icon ? /* @__PURE__ */ g("img", {
387
388
  src: e.icon,
388
389
  alt: e.name,
389
390
  className: "h-8 w-8 rounded-lg object-cover shrink-0"
390
- }) : /* @__PURE__ */ h("div", {
391
+ }) : /* @__PURE__ */ g("div", {
391
392
  className: "flex h-8 w-8 items-center justify-center rounded-lg bg-bg-sunken shrink-0",
392
- children: /* @__PURE__ */ h(d, {
393
+ children: /* @__PURE__ */ g(f, {
393
394
  size: 14,
394
395
  className: "text-text-muted"
395
396
  })
396
- }), /* @__PURE__ */ g("div", {
397
+ }), /* @__PURE__ */ _("div", {
397
398
  className: "min-w-0",
398
- children: [/* @__PURE__ */ h("p", {
399
+ children: [/* @__PURE__ */ g("p", {
399
400
  className: "font-medium text-text-primary truncate",
400
401
  children: e.name
401
- }), e.sku && /* @__PURE__ */ g("p", {
402
+ }), e.sku && /* @__PURE__ */ _("p", {
402
403
  className: "text-xs text-text-muted",
403
404
  children: ["SKU: ", e.sku]
404
405
  })]
405
406
  })]
406
407
  })
407
408
  }),
408
- /* @__PURE__ */ h("td", {
409
+ /* @__PURE__ */ g("td", {
409
410
  className: "px-4 py-3 text-text-secondary",
410
411
  children: T(e.type)
411
412
  }),
412
- /* @__PURE__ */ h("td", {
413
+ /* @__PURE__ */ g("td", {
413
414
  className: "px-4 py-3 text-text-primary tabular-nums",
414
415
  children: w(e.price, e.currency)
415
416
  }),
416
- /* @__PURE__ */ h("td", {
417
+ /* @__PURE__ */ g("td", {
417
418
  className: "px-4 py-3",
418
- children: e.stockQuantity === 0 ? /* @__PURE__ */ h("span", {
419
+ children: e.stockQuantity === 0 ? /* @__PURE__ */ g("span", {
419
420
  className: "text-status-error-text",
420
421
  children: "Out of stock"
421
- }) : /* @__PURE__ */ h("span", {
422
+ }) : /* @__PURE__ */ g("span", {
422
423
  className: "text-text-primary tabular-nums",
423
424
  children: e.stockQuantity
424
425
  })
425
426
  }),
426
- /* @__PURE__ */ h("td", {
427
+ /* @__PURE__ */ g("td", {
427
428
  className: "px-4 py-3",
428
- children: /* @__PURE__ */ h("span", {
429
+ children: /* @__PURE__ */ g("span", {
429
430
  className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${t.className}`,
430
431
  children: t.label
431
432
  })
432
433
  }),
433
- /* @__PURE__ */ h("td", {
434
+ /* @__PURE__ */ g("td", {
434
435
  className: "px-4 py-3 text-right",
435
- children: /* @__PURE__ */ g("button", {
436
+ children: /* @__PURE__ */ _("button", {
436
437
  onClick: () => X(`/seller/items/${e.id}`),
437
438
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
438
- children: [/* @__PURE__ */ h(c, { size: 12 }), A("devportal.edit", "Edit")]
439
+ children: [/* @__PURE__ */ g(l, { size: 12 }), M("devportal.edit", "Edit")]
439
440
  })
440
441
  })
441
442
  ]
442
443
  }, e.id);
443
444
  }) })]
444
445
  })
445
- }) : Z.length > 0 && re ? /* @__PURE__ */ h(t, {
446
+ }) : Z.length > 0 && ie ? /* @__PURE__ */ g(t, {
446
447
  illustration: "empty-search",
447
- title: A("devportal.noItemsMatchYourSearch", "No items match your search"),
448
- description: A("devportal.tryAdjustingFilters", "Try adjusting your search or filters")
449
- }) : /* @__PURE__ */ h(t, {
448
+ title: M("devportal.noItemsMatchYourSearch", "No items match your search"),
449
+ description: M("devportal.tryAdjustingFilters", "Try adjusting your search or filters")
450
+ }) : /* @__PURE__ */ g(t, {
450
451
  illustration: "empty-data",
451
- icon: /* @__PURE__ */ h(d, { size: 32 }),
452
- title: A("devportal.noItemsYet", "No items yet"),
453
- description: A("devportal.addYourFirstPhysicalProduct", "Add your first physical product listing to start selling"),
454
- action: /* @__PURE__ */ g("button", {
452
+ icon: /* @__PURE__ */ g(f, { size: 32 }),
453
+ title: M("devportal.noItemsYet", "No items yet"),
454
+ description: M("devportal.addYourFirstPhysicalProduct", "Add your first physical product listing to start selling"),
455
+ action: /* @__PURE__ */ _("button", {
455
456
  onClick: () => X("/seller/items/new"),
456
457
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
457
- children: [/* @__PURE__ */ h(f, { size: 16 }), A("devportal.listAnItem", "List an Item")]
458
+ children: [/* @__PURE__ */ g(p, { size: 16 }), M("devportal.listAnItem", "List an Item")]
458
459
  })
459
460
  })
460
461
  ]
461
462
  })
462
463
  });
463
- }, D = ({ item: e, onEdit: t }) => {
464
- let n = S[e.status] ?? S.DRAFT;
465
- return /* @__PURE__ */ g(y, {
464
+ }, k = ({ item: e, onEdit: t }) => {
465
+ let n = C[e.status] ?? C.DRAFT;
466
+ return /* @__PURE__ */ _(b, {
466
467
  treatment: "insight",
467
468
  className: "flex flex-col gap-3 p-4",
468
- children: [/* @__PURE__ */ g("div", {
469
+ children: [/* @__PURE__ */ _("div", {
469
470
  className: "flex items-start gap-3",
470
- children: [e.icon ? /* @__PURE__ */ h("img", {
471
+ children: [e.icon ? /* @__PURE__ */ g("img", {
471
472
  src: e.icon,
472
473
  alt: e.name,
473
474
  className: "h-20 w-20 rounded-xl object-cover shrink-0"
474
- }) : /* @__PURE__ */ h("div", {
475
+ }) : /* @__PURE__ */ g("div", {
475
476
  className: "flex h-20 w-20 items-center justify-center rounded-xl bg-bg-sunken shrink-0",
476
- children: /* @__PURE__ */ h(d, {
477
+ children: /* @__PURE__ */ g(f, {
477
478
  size: 32,
478
479
  className: "text-text-muted"
479
480
  })
480
- }), /* @__PURE__ */ g("div", {
481
+ }), /* @__PURE__ */ _("div", {
481
482
  className: "min-w-0 flex-1",
482
483
  children: [
483
- /* @__PURE__ */ h("p", {
484
+ /* @__PURE__ */ g("p", {
484
485
  className: "font-semibold text-text-primary truncate",
485
486
  children: e.name
486
487
  }),
487
- e.brand && /* @__PURE__ */ h("p", {
488
+ e.brand && /* @__PURE__ */ g("p", {
488
489
  className: "text-xs text-text-muted mt-0.5",
489
490
  children: e.brand
490
491
  }),
491
- /* @__PURE__ */ h("p", {
492
+ /* @__PURE__ */ g("p", {
492
493
  className: "text-sm text-text-secondary mt-1",
493
494
  children: w(e.price, e.currency)
494
495
  }),
495
- /* @__PURE__ */ g("div", {
496
+ /* @__PURE__ */ _("div", {
496
497
  className: "flex items-center gap-2 mt-2 flex-wrap",
497
- children: [/* @__PURE__ */ h("span", {
498
+ children: [/* @__PURE__ */ g("span", {
498
499
  className: `rounded-full px-2 py-0.5 text-xs font-medium ${n.className}`,
499
500
  children: n.label
500
- }), /* @__PURE__ */ h("span", {
501
+ }), /* @__PURE__ */ g("span", {
501
502
  className: "rounded-full px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-secondary",
502
503
  children: T(e.type)
503
504
  })]
504
505
  })
505
506
  ]
506
507
  })]
507
- }), /* @__PURE__ */ g("div", {
508
+ }), /* @__PURE__ */ _("div", {
508
509
  className: "flex items-center justify-between pt-2 border-t border-border-subtle",
509
- children: [/* @__PURE__ */ g("div", {
510
+ children: [/* @__PURE__ */ _("div", {
510
511
  className: "flex items-center gap-1.5 text-sm",
511
- children: [/* @__PURE__ */ h(m, {
512
+ children: [/* @__PURE__ */ g(h, {
512
513
  size: 12,
513
514
  className: "text-text-muted shrink-0"
514
- }), e.stockQuantity === 0 ? /* @__PURE__ */ h("span", {
515
+ }), e.stockQuantity === 0 ? /* @__PURE__ */ g("span", {
515
516
  className: "text-status-error-text",
516
517
  children: "Out of stock"
517
- }) : /* @__PURE__ */ g("span", {
518
+ }) : /* @__PURE__ */ _("span", {
518
519
  className: "text-text-secondary",
519
520
  children: [e.stockQuantity, " in stock"]
520
521
  })]
521
- }), /* @__PURE__ */ g("button", {
522
+ }), /* @__PURE__ */ _("button", {
522
523
  onClick: t,
523
524
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
524
- children: [/* @__PURE__ */ h(c, { size: 12 }), "Edit"]
525
+ children: [/* @__PURE__ */ g(l, { size: 12 }), "Edit"]
525
526
  })]
526
527
  })]
527
528
  });
528
529
  };
529
530
  //#endregion
530
- export { E as SellerItemsPage };
531
+ export { O as SellerItemsPage };
531
532
 
532
533
  //# sourceMappingURL=SellerItemsPage.js.map