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