@burdenoff/microfe-devportal 2026.1112.2 → 2026.1113.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.
- package/dist/devportal/components/AppCard.js +73 -70
- package/dist/devportal/components/AppCard.js.map +1 -1
- package/dist/devportal/components/ImageUploadField.js +82 -80
- package/dist/devportal/components/ImageUploadField.js.map +1 -1
- package/dist/devportal/components/StoreImage.d.ts +15 -0
- package/dist/devportal/components/StoreImage.js +30 -0
- package/dist/devportal/components/StoreImage.js.map +1 -0
- package/dist/devportal/components/index.d.ts +1 -0
- package/dist/devportal/components/index.js +17 -16
- package/dist/devportal/hooks/usePackageUpload.d.ts +46 -4
- package/dist/devportal/hooks/usePackageUpload.js +90 -36
- package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +205 -202
- package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +2 -2
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +201 -199
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.js +2 -2
- package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.js +312 -307
- package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +175 -171
- package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +118 -116
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.js +202 -199
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/StoreSubmissionPage.js +133 -131
- package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,14 +3,15 @@ import { CheckboxField as n, InputField as r, SelectField as i, TextareaField as
|
|
|
3
3
|
import { ImageUploadField as o, ScreenshotGallery as ee } from "../components/ImageUploadField.js";
|
|
4
4
|
import { DetailList as s } from "../components/DataTable.js";
|
|
5
5
|
import { useDevportal as te } from "../providers/DevportalProvider.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useAssetUpload as c } from "../hooks/usePackageUpload.js";
|
|
7
7
|
import { cn as l } from "../utils/cn.js";
|
|
8
8
|
import { resolveGlobalGraphqlEndpoint as ne } from "../utils/graphqlEndpoint.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { StoreImage as u, StoreImagePlaceholder as d } from "../components/StoreImage.js";
|
|
10
|
+
import { useEffect as re, useState as f } from "react";
|
|
11
|
+
import { AlertCircle as ie, CheckCircle as ae, Clock as oe, Edit as se, ImageOff as ce, Info as le, Loader2 as p, XCircle as ue } from "lucide-react";
|
|
11
12
|
import { useParams as de } from "react-router";
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { EmphasisPanel as fe, GlassCard as
|
|
13
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
|
+
import { EmphasisPanel as fe, GlassCard as _ } from "@burdenoff/fe-libs/ui";
|
|
14
15
|
// src/devportal/pages/EditPhysicalItemPage.tsx
|
|
15
16
|
var pe = [
|
|
16
17
|
{
|
|
@@ -67,7 +68,7 @@ var pe = [
|
|
|
67
68
|
value: "METER",
|
|
68
69
|
label: "Meters (m)"
|
|
69
70
|
}
|
|
70
|
-
],
|
|
71
|
+
], v = [
|
|
71
72
|
"name",
|
|
72
73
|
"shortDescription",
|
|
73
74
|
"price",
|
|
@@ -105,23 +106,23 @@ var pe = [
|
|
|
105
106
|
}
|
|
106
107
|
}, ve = "\n query GetPhysicalProduct($id: ID!) {\n product(id: $id) {\n id\n name\n slug\n type\n status\n nature\n description\n longDescription\n price\n currency\n tags\n stockQuantity\n sku\n trackInventory\n allowBackorder\n lowStockThreshold\n requiresShipping\n weight\n weightUnit\n length\n width\n height\n dimensionUnit\n brand\n manufacturer\n countryOfOrigin\n warrantyInfo\n returnPolicy\n icon\n bannerUrl\n screenshots\n category\n viewCount\n rating\n reviewCount\n createdAt\n updatedAt\n submittedAt\n reviewedAt\n reviewNotes\n rejectedReason\n publishedAt\n }\n }\n", ye = "\n mutation UpdatePhysicalProduct(\n $id: ID!\n $input: UpdatePhysicalProductInput!\n ) {\n updatePhysicalProduct(id: $id, input: $input) {\n id\n name\n status\n }\n }\n", be = "\n mutation SubmitProductForReview($id: ID!, $notes: String) {\n submitProduct(id: $id, notes: $notes) {\n id\n status\n }\n }\n";
|
|
107
108
|
function xe(e) {
|
|
108
|
-
return
|
|
109
|
+
return v.every((t) => {
|
|
109
110
|
let n = e[t];
|
|
110
111
|
return typeof n == "boolean" || String(n).trim() !== "";
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
|
-
var
|
|
114
|
+
var y = ({ label: e, value: t }) => /* @__PURE__ */ g(_, {
|
|
114
115
|
treatment: "metric",
|
|
115
116
|
className: "p-4",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ h("p", {
|
|
117
118
|
className: "text-sm text-text-secondary",
|
|
118
119
|
children: e
|
|
119
|
-
}), /* @__PURE__ */
|
|
120
|
+
}), /* @__PURE__ */ h("p", {
|
|
120
121
|
className: "text-2xl font-bold tabular-nums",
|
|
121
122
|
children: t
|
|
122
123
|
})]
|
|
123
|
-
}),
|
|
124
|
-
let { navigate:
|
|
124
|
+
}), b = () => {
|
|
125
|
+
let { navigate: _, basePath: v, apiGatewayUrl: b, authToken: x, workspacesGatewayUrl: S, workspaceId: C, getWorkspaceToken: w } = te(), { itemId: T } = de(), E = ne(b), [Se, D] = f(!0), [O, k] = f(null), [A, Ce] = f(null), [j, M] = f("overview"), [N, we] = f(null), [P, F] = f({
|
|
125
126
|
name: "",
|
|
126
127
|
shortDescription: "",
|
|
127
128
|
longDescription: "",
|
|
@@ -145,13 +146,13 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
|
|
|
145
146
|
countryOfOrigin: "",
|
|
146
147
|
warrantyInfo: "",
|
|
147
148
|
returnPolicy: ""
|
|
148
|
-
}), [
|
|
149
|
-
async function
|
|
150
|
-
let n = await (await fetch(
|
|
149
|
+
}), [I, Te] = f(""), [L, R] = f(""), [z, B] = f([]), { upload: Ee, uploading: V, progress: De, error: Oe } = c(S, x, C, w), { upload: ke, uploading: H, progress: Ae, error: je } = c(S, x, C, w), { upload: Me, uploading: U, progress: Ne, error: Pe } = c(S, x, C, w), [W, G] = f(!1), [K, q] = f(null), [Fe, Ie] = f(!1), Le = V || H || U, J = xe(P) && !Le;
|
|
150
|
+
async function Y(e, t) {
|
|
151
|
+
let n = await (await fetch(E, {
|
|
151
152
|
method: "POST",
|
|
152
153
|
headers: {
|
|
153
154
|
"Content-Type": "application/json",
|
|
154
|
-
...
|
|
155
|
+
...x ? { Authorization: `Bearer ${x}` } : {}
|
|
155
156
|
},
|
|
156
157
|
credentials: "include",
|
|
157
158
|
body: JSON.stringify({
|
|
@@ -163,18 +164,18 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
|
|
|
163
164
|
return n.data;
|
|
164
165
|
}
|
|
165
166
|
re(() => {
|
|
166
|
-
if (!
|
|
167
|
+
if (!T) return;
|
|
167
168
|
let e = !1;
|
|
168
|
-
return
|
|
169
|
+
return D(!0), k(null), (async () => {
|
|
169
170
|
try {
|
|
170
|
-
let t = await
|
|
171
|
+
let t = await Y(ve, { id: T });
|
|
171
172
|
if (e) return;
|
|
172
173
|
let n = t.product;
|
|
173
174
|
if (!n) {
|
|
174
|
-
|
|
175
|
+
k("Product not found.");
|
|
175
176
|
return;
|
|
176
177
|
}
|
|
177
|
-
Ce(n.status),
|
|
178
|
+
Ce(n.status), F({
|
|
178
179
|
name: n.name,
|
|
179
180
|
shortDescription: n.description ?? "",
|
|
180
181
|
longDescription: n.longDescription ?? "",
|
|
@@ -212,221 +213,222 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
|
|
|
212
213
|
reviewNotes: n.reviewNotes,
|
|
213
214
|
rejectedReason: n.rejectedReason,
|
|
214
215
|
publishedAt: n.publishedAt
|
|
215
|
-
}), Te(n.icon ?? ""),
|
|
216
|
+
}), Te(n.icon ?? ""), R(n.bannerUrl ?? ""), B(n.screenshots ?? []);
|
|
216
217
|
} catch (t) {
|
|
217
|
-
e ||
|
|
218
|
+
e || k(t instanceof Error ? t.message : "Failed to load product");
|
|
218
219
|
} finally {
|
|
219
|
-
e ||
|
|
220
|
+
e || D(!1);
|
|
220
221
|
}
|
|
221
222
|
})(), () => {
|
|
222
223
|
e = !0;
|
|
223
224
|
};
|
|
224
225
|
}, [
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
T,
|
|
227
|
+
E,
|
|
228
|
+
x
|
|
228
229
|
]);
|
|
229
|
-
let
|
|
230
|
-
|
|
230
|
+
let X = (e, t) => {
|
|
231
|
+
F((n) => ({
|
|
231
232
|
...n,
|
|
232
233
|
[e]: t
|
|
233
234
|
}));
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
},
|
|
237
|
-
if (
|
|
238
|
-
|
|
235
|
+
}, Z = (e) => (t) => {
|
|
236
|
+
X(e, t.target.checked);
|
|
237
|
+
}, Re = async (e = !1) => {
|
|
238
|
+
if (J && !W && T) {
|
|
239
|
+
G(!0), q(null), Ie(!1);
|
|
239
240
|
try {
|
|
240
|
-
let t =
|
|
241
|
-
await
|
|
242
|
-
id:
|
|
241
|
+
let t = P.tags.split(",").map((e) => e.trim()).filter(Boolean), n = P.length.trim() || P.width.trim() || P.height.trim();
|
|
242
|
+
await Y(ye, {
|
|
243
|
+
id: T,
|
|
243
244
|
input: {
|
|
244
|
-
name:
|
|
245
|
-
description:
|
|
246
|
-
longDescription:
|
|
247
|
-
price: parseFloat(
|
|
248
|
-
currency:
|
|
245
|
+
name: P.name.trim(),
|
|
246
|
+
description: P.shortDescription.trim(),
|
|
247
|
+
longDescription: P.longDescription.trim() || null,
|
|
248
|
+
price: parseFloat(P.price),
|
|
249
|
+
currency: P.currency,
|
|
249
250
|
tags: t.length > 0 ? t : null,
|
|
250
|
-
stockQuantity: parseInt(
|
|
251
|
-
sku:
|
|
252
|
-
trackInventory:
|
|
253
|
-
allowBackorder:
|
|
254
|
-
lowStockThreshold:
|
|
255
|
-
requiresShipping:
|
|
256
|
-
weight:
|
|
257
|
-
weightUnit:
|
|
258
|
-
length:
|
|
259
|
-
width:
|
|
260
|
-
height:
|
|
261
|
-
dimensionUnit:
|
|
262
|
-
brand:
|
|
263
|
-
manufacturer:
|
|
264
|
-
countryOfOrigin:
|
|
265
|
-
warrantyInfo:
|
|
266
|
-
returnPolicy:
|
|
267
|
-
icon:
|
|
268
|
-
bannerUrl:
|
|
269
|
-
screenshots:
|
|
251
|
+
stockQuantity: parseInt(P.stockQuantity, 10),
|
|
252
|
+
sku: P.sku.trim() || null,
|
|
253
|
+
trackInventory: P.trackInventory,
|
|
254
|
+
allowBackorder: P.allowBackorder,
|
|
255
|
+
lowStockThreshold: P.lowStockThreshold.trim() ? parseInt(P.lowStockThreshold, 10) : null,
|
|
256
|
+
requiresShipping: P.requiresShipping,
|
|
257
|
+
weight: P.requiresShipping && P.weightKg.trim() ? parseFloat(P.weightKg) : null,
|
|
258
|
+
weightUnit: P.requiresShipping && P.weightKg.trim() ? P.weightUnit : null,
|
|
259
|
+
length: P.requiresShipping && P.length.trim() ? parseFloat(P.length) : null,
|
|
260
|
+
width: P.requiresShipping && P.width.trim() ? parseFloat(P.width) : null,
|
|
261
|
+
height: P.requiresShipping && P.height.trim() ? parseFloat(P.height) : null,
|
|
262
|
+
dimensionUnit: P.requiresShipping && n ? P.dimensionUnit : null,
|
|
263
|
+
brand: P.brand.trim() || null,
|
|
264
|
+
manufacturer: P.manufacturer.trim() || null,
|
|
265
|
+
countryOfOrigin: P.countryOfOrigin.trim() || null,
|
|
266
|
+
warrantyInfo: P.warrantyInfo.trim() || null,
|
|
267
|
+
returnPolicy: P.returnPolicy.trim() || null,
|
|
268
|
+
icon: I || null,
|
|
269
|
+
bannerUrl: L || null,
|
|
270
|
+
screenshots: z.length > 0 ? z : null
|
|
270
271
|
}
|
|
271
|
-
}), e && await
|
|
272
|
-
id:
|
|
272
|
+
}), e && await Y(be, {
|
|
273
|
+
id: T,
|
|
273
274
|
notes: "Resubmitted after edits"
|
|
274
|
-
}),
|
|
275
|
-
|
|
275
|
+
}), Ie(!0), setTimeout(() => {
|
|
276
|
+
_?.(`${v}/seller/items`);
|
|
276
277
|
}, 1500);
|
|
277
278
|
} catch (e) {
|
|
278
|
-
|
|
279
|
+
q(e instanceof Error ? e.message : "Save failed. Please try again.");
|
|
279
280
|
} finally {
|
|
280
|
-
|
|
281
|
+
G(!1);
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
};
|
|
284
|
-
if (Se) return /* @__PURE__ */
|
|
285
|
+
if (Se) return /* @__PURE__ */ h(e, {
|
|
285
286
|
title: "Edit Item",
|
|
286
287
|
backLink: "/seller/items",
|
|
287
288
|
backLabel: "Back to My Items",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ h("div", {
|
|
289
290
|
className: "flex items-center justify-center py-20",
|
|
290
|
-
children: /* @__PURE__ */ p
|
|
291
|
+
children: /* @__PURE__ */ h(p, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
291
292
|
})
|
|
292
293
|
});
|
|
293
|
-
if (
|
|
294
|
+
if (O) return /* @__PURE__ */ h(e, {
|
|
294
295
|
title: "Edit Item",
|
|
295
296
|
backLink: "/seller/items",
|
|
296
297
|
backLabel: "Back to My Items",
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ g("div", {
|
|
298
299
|
className: "flex items-center gap-3 rounded-lg border border-status-error-border/50 bg-status-error-bg/10 px-4 py-3 text-sm",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ h(ie, {
|
|
300
301
|
size: 16,
|
|
301
302
|
className: "shrink-0 text-status-error-text"
|
|
302
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ h("span", {
|
|
303
304
|
className: "text-status-error-text",
|
|
304
|
-
children:
|
|
305
|
+
children: O
|
|
305
306
|
})]
|
|
306
307
|
})
|
|
307
308
|
});
|
|
308
|
-
let Q =
|
|
309
|
-
return /* @__PURE__ */
|
|
310
|
-
title: /* @__PURE__ */
|
|
309
|
+
let Q = A === "DRAFT" || A === "REJECTED", $ = A ? _e[A] : void 0;
|
|
310
|
+
return /* @__PURE__ */ h(e, {
|
|
311
|
+
title: /* @__PURE__ */ g("div", {
|
|
311
312
|
className: "flex items-center gap-3",
|
|
312
|
-
children: [
|
|
313
|
-
src:
|
|
313
|
+
children: [/* @__PURE__ */ h(u, {
|
|
314
|
+
src: I,
|
|
314
315
|
alt: "",
|
|
315
|
-
className: "h-10 w-10 shrink-0 rounded-input border border-border-subtle object-cover"
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
className: "h-10 w-10 shrink-0 rounded-input border border-border-subtle object-cover",
|
|
317
|
+
fallback: /* @__PURE__ */ h("div", {
|
|
318
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-input border border-border-subtle bg-bg-sunken",
|
|
319
|
+
children: /* @__PURE__ */ h(ce, {
|
|
320
|
+
size: 16,
|
|
321
|
+
className: "text-text-muted"
|
|
322
|
+
})
|
|
321
323
|
})
|
|
322
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ h("span", { children: P.name || "Item" })]
|
|
323
325
|
}),
|
|
324
|
-
description:
|
|
326
|
+
description: P.shortDescription || void 0,
|
|
325
327
|
purpose: "Everything about this listing in one place — its performance, its store presence, and its editable details. Use the tabs to review or update it.",
|
|
326
328
|
backLink: "/seller/items",
|
|
327
329
|
backLabel: "Back to My Items",
|
|
328
|
-
actions:
|
|
330
|
+
actions: j === "overview" ? /* @__PURE__ */ g("button", {
|
|
329
331
|
type: "button",
|
|
330
|
-
onClick: () =>
|
|
332
|
+
onClick: () => M("edit"),
|
|
331
333
|
className: "inline-flex items-center gap-2 rounded-button bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ h(se, { size: 15 }), "Edit Listing"]
|
|
333
335
|
}) : void 0,
|
|
334
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ g("div", {
|
|
335
337
|
className: "space-y-6",
|
|
336
338
|
children: [
|
|
337
|
-
Fe && /* @__PURE__ */
|
|
339
|
+
Fe && /* @__PURE__ */ h("div", {
|
|
338
340
|
className: "rounded-card border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
339
341
|
children: "Saved successfully! Redirecting to your items..."
|
|
340
342
|
}),
|
|
341
|
-
|
|
343
|
+
K && /* @__PURE__ */ h("div", {
|
|
342
344
|
className: "rounded-card border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
343
|
-
children:
|
|
345
|
+
children: K
|
|
344
346
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ g("div", {
|
|
346
348
|
className: "flex flex-wrap items-center gap-2",
|
|
347
349
|
children: [
|
|
348
|
-
$ && /* @__PURE__ */
|
|
350
|
+
$ && /* @__PURE__ */ h("span", {
|
|
349
351
|
className: l("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", $.className),
|
|
350
352
|
children: $.label
|
|
351
353
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ h("span", {
|
|
353
355
|
className: "text-sm text-text-secondary",
|
|
354
|
-
children: ge[
|
|
356
|
+
children: ge[N?.type ?? ""] || N?.type
|
|
355
357
|
}),
|
|
356
|
-
|
|
358
|
+
N?.category && /* @__PURE__ */ h("span", {
|
|
357
359
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
358
|
-
children:
|
|
360
|
+
children: N.category
|
|
359
361
|
})
|
|
360
362
|
]
|
|
361
363
|
}),
|
|
362
|
-
|
|
364
|
+
A === "PENDING_REVIEW" && /* @__PURE__ */ g("div", {
|
|
363
365
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ h(oe, {
|
|
365
367
|
size: 18,
|
|
366
368
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
367
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ g("div", {
|
|
368
370
|
className: "text-sm",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ h("p", {
|
|
370
372
|
className: "font-medium text-status-warning-text",
|
|
371
373
|
children: "Under Review"
|
|
372
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ g("p", {
|
|
373
375
|
className: "mt-0.5 text-text-secondary",
|
|
374
|
-
children: ["Your listing is being reviewed by our team. You'll be notified of the outcome.",
|
|
376
|
+
children: ["Your listing is being reviewed by our team. You'll be notified of the outcome.", N?.submittedAt && /* @__PURE__ */ g("span", {
|
|
375
377
|
className: "ml-1",
|
|
376
378
|
children: [
|
|
377
379
|
"Submitted",
|
|
378
380
|
" ",
|
|
379
|
-
new Date(
|
|
381
|
+
new Date(N.submittedAt).toLocaleDateString(),
|
|
380
382
|
"."
|
|
381
383
|
]
|
|
382
384
|
})]
|
|
383
385
|
})]
|
|
384
386
|
})]
|
|
385
387
|
}),
|
|
386
|
-
|
|
388
|
+
A === "REJECTED" && /* @__PURE__ */ g("div", {
|
|
387
389
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ h(ue, {
|
|
389
391
|
size: 18,
|
|
390
392
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
391
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ g("div", {
|
|
392
394
|
className: "text-sm",
|
|
393
395
|
children: [
|
|
394
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ h("p", {
|
|
395
397
|
className: "font-medium text-status-error-text",
|
|
396
398
|
children: "Review Rejected"
|
|
397
399
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ h("p", {
|
|
399
401
|
className: "mt-0.5 text-text-secondary",
|
|
400
|
-
children:
|
|
402
|
+
children: N?.rejectedReason || N?.reviewNotes || "Your submission was not approved. Please review the feedback, update your listing, and re-submit."
|
|
401
403
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ h("button", {
|
|
403
405
|
type: "button",
|
|
404
|
-
onClick: () =>
|
|
406
|
+
onClick: () => M("edit"),
|
|
405
407
|
className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-primary underline",
|
|
406
408
|
children: "Edit listing and re-submit →"
|
|
407
409
|
})
|
|
408
410
|
]
|
|
409
411
|
})]
|
|
410
412
|
}),
|
|
411
|
-
|
|
413
|
+
A === "PUBLISHED" && /* @__PURE__ */ g("div", {
|
|
412
414
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ h(ae, {
|
|
414
416
|
size: 18,
|
|
415
417
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
416
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ g("div", {
|
|
417
419
|
className: "text-sm",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ h("p", {
|
|
419
421
|
className: "font-medium text-status-success-text",
|
|
420
422
|
children: "Live in the Store"
|
|
421
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ h("p", {
|
|
422
424
|
className: "mt-0.5 text-text-secondary",
|
|
423
425
|
children: "Your listing is published and visible to buyers in the marketplace."
|
|
424
426
|
})]
|
|
425
427
|
})]
|
|
426
428
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ h("div", {
|
|
428
430
|
className: "border-b",
|
|
429
|
-
children: /* @__PURE__ */
|
|
431
|
+
children: /* @__PURE__ */ h("nav", {
|
|
430
432
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
431
433
|
role: "tablist",
|
|
432
434
|
"aria-label": "Item sections",
|
|
@@ -436,492 +438,495 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
|
|
|
436
438
|
}, {
|
|
437
439
|
id: "edit",
|
|
438
440
|
label: "Edit Listing"
|
|
439
|
-
}].map((e) => /* @__PURE__ */
|
|
441
|
+
}].map((e) => /* @__PURE__ */ h("button", {
|
|
440
442
|
id: `item-tab-${e.id}`,
|
|
441
443
|
role: "tab",
|
|
442
|
-
"aria-selected":
|
|
444
|
+
"aria-selected": j === e.id,
|
|
443
445
|
"aria-controls": `item-panel-${e.id}`,
|
|
444
|
-
onClick: () =>
|
|
445
|
-
className: l("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
446
|
+
onClick: () => M(e.id),
|
|
447
|
+
className: l("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", j === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
446
448
|
children: e.label
|
|
447
449
|
}, e.id))
|
|
448
450
|
})
|
|
449
451
|
}),
|
|
450
|
-
|
|
452
|
+
j === "overview" && /* @__PURE__ */ g("div", {
|
|
451
453
|
id: "item-panel-overview",
|
|
452
454
|
role: "tabpanel",
|
|
453
455
|
"aria-labelledby": "item-tab-overview",
|
|
454
456
|
className: "grid gap-6 lg:grid-cols-3",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ g("div", {
|
|
456
458
|
className: "lg:col-span-2 space-y-6",
|
|
457
459
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ h(fe, { children: /* @__PURE__ */ g("div", {
|
|
459
461
|
className: "grid gap-4 sm:grid-cols-4",
|
|
460
462
|
children: [
|
|
461
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ h(y, {
|
|
462
464
|
label: "Price",
|
|
463
|
-
value: `${
|
|
465
|
+
value: `${P.currency} ${Number(P.price || 0).toFixed(2)}`
|
|
464
466
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ h(y, {
|
|
466
468
|
label: "Stock",
|
|
467
|
-
value:
|
|
469
|
+
value: P.stockQuantity || "0"
|
|
468
470
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ h(y, {
|
|
470
472
|
label: "Views",
|
|
471
|
-
value: (
|
|
473
|
+
value: (N?.viewCount ?? 0).toLocaleString()
|
|
472
474
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ h(y, {
|
|
474
476
|
label: "Rating",
|
|
475
|
-
value:
|
|
477
|
+
value: N?.rating ? `${N.rating.toFixed(1)} ★` : "N/A"
|
|
476
478
|
})
|
|
477
479
|
]
|
|
478
480
|
}) }),
|
|
479
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ h(t, {
|
|
480
482
|
title: "Product Images",
|
|
481
|
-
children:
|
|
483
|
+
children: I || L || z.length > 0 ? /* @__PURE__ */ g("div", {
|
|
482
484
|
className: "space-y-4",
|
|
483
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ g("div", {
|
|
484
486
|
className: "flex flex-wrap gap-4",
|
|
485
|
-
children: [
|
|
487
|
+
children: [I && /* @__PURE__ */ g("div", {
|
|
486
488
|
className: "space-y-1",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
488
|
-
src:
|
|
489
|
+
children: [/* @__PURE__ */ h(u, {
|
|
490
|
+
src: I,
|
|
489
491
|
alt: "Icon",
|
|
490
|
-
className: "h-24 w-24 rounded-input border border-border-subtle object-cover"
|
|
491
|
-
|
|
492
|
+
className: "h-24 w-24 rounded-input border border-border-subtle object-cover",
|
|
493
|
+
fallback: /* @__PURE__ */ h(d, { className: "h-24 w-24" })
|
|
494
|
+
}), /* @__PURE__ */ h("p", {
|
|
492
495
|
className: "text-xs text-text-muted",
|
|
493
496
|
children: "Icon"
|
|
494
497
|
})]
|
|
495
|
-
}),
|
|
498
|
+
}), L && /* @__PURE__ */ g("div", {
|
|
496
499
|
className: "space-y-1",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
498
|
-
src:
|
|
500
|
+
children: [/* @__PURE__ */ h(u, {
|
|
501
|
+
src: L,
|
|
499
502
|
alt: "Banner",
|
|
500
|
-
className: "h-24 w-24 rounded-input border border-border-subtle object-cover"
|
|
501
|
-
|
|
503
|
+
className: "h-24 w-24 rounded-input border border-border-subtle object-cover",
|
|
504
|
+
fallback: /* @__PURE__ */ h(d, { className: "h-24 w-24" })
|
|
505
|
+
}), /* @__PURE__ */ h("p", {
|
|
502
506
|
className: "text-xs text-text-muted",
|
|
503
507
|
children: "Banner"
|
|
504
508
|
})]
|
|
505
509
|
})]
|
|
506
|
-
}),
|
|
510
|
+
}), z.length > 0 && /* @__PURE__ */ g("div", {
|
|
507
511
|
className: "space-y-1",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ h("p", {
|
|
509
513
|
className: "text-xs text-text-muted",
|
|
510
514
|
children: "Screenshots"
|
|
511
|
-
}), /* @__PURE__ */
|
|
515
|
+
}), /* @__PURE__ */ h("div", {
|
|
512
516
|
className: "flex flex-wrap gap-3",
|
|
513
|
-
children:
|
|
517
|
+
children: z.map((e, t) => /* @__PURE__ */ h(u, {
|
|
514
518
|
src: e,
|
|
515
519
|
alt: `Screenshot ${t + 1}`,
|
|
516
|
-
className: "h-24 w-36 rounded-input border border-border-subtle object-cover"
|
|
520
|
+
className: "h-24 w-36 rounded-input border border-border-subtle object-cover",
|
|
521
|
+
fallback: /* @__PURE__ */ h(d, { className: "h-24 w-36" })
|
|
517
522
|
}, e))
|
|
518
523
|
})]
|
|
519
524
|
})]
|
|
520
|
-
}) : /* @__PURE__ */
|
|
525
|
+
}) : /* @__PURE__ */ h("p", {
|
|
521
526
|
className: "text-sm text-text-secondary",
|
|
522
527
|
children: "No images uploaded yet."
|
|
523
528
|
})
|
|
524
529
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ g(t, {
|
|
526
531
|
title: "Description",
|
|
527
|
-
children: [
|
|
532
|
+
children: [P.shortDescription && /* @__PURE__ */ h("p", {
|
|
528
533
|
className: "text-sm font-medium text-text-primary",
|
|
529
|
-
children:
|
|
530
|
-
}),
|
|
534
|
+
children: P.shortDescription
|
|
535
|
+
}), P.longDescription ? /* @__PURE__ */ h("p", {
|
|
531
536
|
className: "mt-2 whitespace-pre-wrap text-sm text-text-secondary",
|
|
532
|
-
children:
|
|
533
|
-
}) : !
|
|
537
|
+
children: P.longDescription
|
|
538
|
+
}) : !P.shortDescription && /* @__PURE__ */ h("p", {
|
|
534
539
|
className: "text-sm text-text-secondary",
|
|
535
540
|
children: "No description provided."
|
|
536
541
|
})]
|
|
537
542
|
}),
|
|
538
|
-
|
|
543
|
+
P.tags && /* @__PURE__ */ h(t, {
|
|
539
544
|
title: "Tags",
|
|
540
|
-
children: /* @__PURE__ */
|
|
545
|
+
children: /* @__PURE__ */ h("div", {
|
|
541
546
|
className: "flex flex-wrap gap-2",
|
|
542
|
-
children:
|
|
547
|
+
children: P.tags.split(",").map((e) => e.trim()).filter(Boolean).map((e) => /* @__PURE__ */ h("span", {
|
|
543
548
|
className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-primary",
|
|
544
549
|
children: e
|
|
545
550
|
}, e))
|
|
546
551
|
})
|
|
547
552
|
})
|
|
548
553
|
]
|
|
549
|
-
}), /* @__PURE__ */
|
|
554
|
+
}), /* @__PURE__ */ g("div", {
|
|
550
555
|
className: "space-y-6",
|
|
551
|
-
children: [/* @__PURE__ */
|
|
556
|
+
children: [/* @__PURE__ */ h(t, {
|
|
552
557
|
title: "Details",
|
|
553
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ h(s, { items: [
|
|
554
559
|
{
|
|
555
560
|
label: "Item ID",
|
|
556
|
-
value: /* @__PURE__ */
|
|
561
|
+
value: /* @__PURE__ */ h("code", {
|
|
557
562
|
className: "text-xs",
|
|
558
|
-
children:
|
|
563
|
+
children: T
|
|
559
564
|
})
|
|
560
565
|
},
|
|
561
566
|
{
|
|
562
567
|
label: "Slug",
|
|
563
|
-
value:
|
|
568
|
+
value: N?.slug ?? "—"
|
|
564
569
|
},
|
|
565
570
|
{
|
|
566
571
|
label: "SKU",
|
|
567
|
-
value:
|
|
572
|
+
value: P.sku || "—"
|
|
568
573
|
},
|
|
569
574
|
{
|
|
570
575
|
label: "Brand",
|
|
571
|
-
value:
|
|
576
|
+
value: P.brand || "—"
|
|
572
577
|
},
|
|
573
578
|
{
|
|
574
579
|
label: "Created",
|
|
575
|
-
value:
|
|
580
|
+
value: N?.createdAt ? new Date(N.createdAt).toLocaleDateString() : "—"
|
|
576
581
|
},
|
|
577
582
|
{
|
|
578
583
|
label: "Updated",
|
|
579
|
-
value:
|
|
584
|
+
value: N?.updatedAt ? new Date(N.updatedAt).toLocaleDateString() : "—"
|
|
580
585
|
},
|
|
581
|
-
...
|
|
586
|
+
...N?.publishedAt ? [{
|
|
582
587
|
label: "Published",
|
|
583
|
-
value: new Date(
|
|
588
|
+
value: new Date(N.publishedAt).toLocaleDateString()
|
|
584
589
|
}] : []
|
|
585
590
|
] })
|
|
586
|
-
}), /* @__PURE__ */
|
|
591
|
+
}), /* @__PURE__ */ h(t, {
|
|
587
592
|
title: "Inventory & Shipping",
|
|
588
|
-
children: /* @__PURE__ */
|
|
593
|
+
children: /* @__PURE__ */ h(s, { items: [
|
|
589
594
|
{
|
|
590
595
|
label: "Stock quantity",
|
|
591
|
-
value:
|
|
596
|
+
value: P.stockQuantity || "0"
|
|
592
597
|
},
|
|
593
598
|
{
|
|
594
599
|
label: "Track inventory",
|
|
595
|
-
value:
|
|
600
|
+
value: P.trackInventory ? "Yes" : "No"
|
|
596
601
|
},
|
|
597
602
|
{
|
|
598
603
|
label: "Requires shipping",
|
|
599
|
-
value:
|
|
604
|
+
value: P.requiresShipping ? "Yes" : "No"
|
|
600
605
|
},
|
|
601
|
-
...
|
|
606
|
+
...P.requiresShipping && P.weightKg ? [{
|
|
602
607
|
label: "Weight",
|
|
603
|
-
value: `${
|
|
608
|
+
value: `${P.weightKg} ${P.weightUnit.toLowerCase()}`
|
|
604
609
|
}] : []
|
|
605
610
|
] })
|
|
606
611
|
})]
|
|
607
612
|
})]
|
|
608
613
|
}),
|
|
609
|
-
|
|
614
|
+
j === "edit" && /* @__PURE__ */ g("div", {
|
|
610
615
|
id: "item-panel-edit",
|
|
611
616
|
role: "tabpanel",
|
|
612
617
|
"aria-labelledby": "item-tab-edit",
|
|
613
618
|
className: "space-y-8 max-w-3xl",
|
|
614
619
|
children: [
|
|
615
|
-
|
|
620
|
+
A && /* @__PURE__ */ g("div", {
|
|
616
621
|
className: "flex items-start gap-2 rounded-input border border-border-subtle bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
|
|
617
622
|
children: [
|
|
618
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ h(le, {
|
|
619
624
|
size: 13,
|
|
620
625
|
className: "mt-0.5 shrink-0 text-text-muted"
|
|
621
626
|
}),
|
|
622
627
|
"Current status:",
|
|
623
628
|
" ",
|
|
624
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ h("span", {
|
|
625
630
|
className: "font-medium text-text-primary",
|
|
626
|
-
children:
|
|
631
|
+
children: A.replace(/_/g, " ")
|
|
627
632
|
}),
|
|
628
|
-
Q && /* @__PURE__ */
|
|
633
|
+
Q && /* @__PURE__ */ h("span", {
|
|
629
634
|
className: "ml-1",
|
|
630
635
|
children: "— use \"Save & Resubmit\" to send it for review again."
|
|
631
636
|
})
|
|
632
637
|
]
|
|
633
638
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ h(t, {
|
|
635
640
|
title: "Basic Information",
|
|
636
641
|
description: "Core details shown in the store listing.",
|
|
637
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ g("div", {
|
|
638
643
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
|
|
639
644
|
children: [
|
|
640
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ h(r, {
|
|
641
646
|
label: "Name",
|
|
642
647
|
required: !0,
|
|
643
|
-
value:
|
|
644
|
-
onChange: (e) =>
|
|
648
|
+
value: P.name,
|
|
649
|
+
onChange: (e) => X("name", e.target.value),
|
|
645
650
|
placeholder: "e.g. Wireless Ergonomic Keyboard",
|
|
646
651
|
maxLength: 120
|
|
647
652
|
}),
|
|
648
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ h(r, {
|
|
649
654
|
label: "Short Description",
|
|
650
655
|
required: !0,
|
|
651
|
-
value:
|
|
652
|
-
onChange: (e) =>
|
|
656
|
+
value: P.shortDescription,
|
|
657
|
+
onChange: (e) => X("shortDescription", e.target.value),
|
|
653
658
|
placeholder: "One-line summary shown on the store card",
|
|
654
659
|
maxLength: 160,
|
|
655
|
-
hint: `${
|
|
660
|
+
hint: `${P.shortDescription.length}/160`
|
|
656
661
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ h(a, {
|
|
658
663
|
label: "Long Description",
|
|
659
|
-
value:
|
|
660
|
-
onChange: (e) =>
|
|
664
|
+
value: P.longDescription,
|
|
665
|
+
onChange: (e) => X("longDescription", e.target.value),
|
|
661
666
|
rows: 5,
|
|
662
667
|
placeholder: "Detailed product description, features, specs…"
|
|
663
668
|
})
|
|
664
669
|
]
|
|
665
670
|
})
|
|
666
671
|
}),
|
|
667
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ h(t, {
|
|
668
673
|
title: "Product Images",
|
|
669
674
|
description: "Visual assets shown to buyers browsing the store.",
|
|
670
|
-
children: /* @__PURE__ */
|
|
675
|
+
children: /* @__PURE__ */ g("div", {
|
|
671
676
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
|
|
672
|
-
children: [/* @__PURE__ */
|
|
677
|
+
children: [/* @__PURE__ */ g("div", {
|
|
673
678
|
className: "grid gap-5 sm:grid-cols-2",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
679
|
+
children: [/* @__PURE__ */ h(o, {
|
|
675
680
|
label: "Icon",
|
|
676
|
-
value:
|
|
681
|
+
value: I,
|
|
677
682
|
onChange: Te,
|
|
678
683
|
hint: "Shown in marketplace cards and search — square proportions (1:1)",
|
|
679
684
|
aspectClass: "aspect-square",
|
|
680
685
|
upload: Ee,
|
|
681
|
-
uploading:
|
|
686
|
+
uploading: V,
|
|
682
687
|
progress: De,
|
|
683
688
|
error: Oe
|
|
684
|
-
}), /* @__PURE__ */
|
|
689
|
+
}), /* @__PURE__ */ h(o, {
|
|
685
690
|
label: "Banner",
|
|
686
|
-
value:
|
|
687
|
-
onChange:
|
|
691
|
+
value: L,
|
|
692
|
+
onChange: R,
|
|
688
693
|
hint: "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)",
|
|
689
694
|
aspectClass: "aspect-square",
|
|
690
695
|
upload: ke,
|
|
691
|
-
uploading:
|
|
696
|
+
uploading: H,
|
|
692
697
|
progress: Ae,
|
|
693
698
|
error: je
|
|
694
699
|
})]
|
|
695
|
-
}), /* @__PURE__ */
|
|
696
|
-
urls:
|
|
697
|
-
onChange:
|
|
700
|
+
}), /* @__PURE__ */ h(ee, {
|
|
701
|
+
urls: z,
|
|
702
|
+
onChange: B,
|
|
698
703
|
upload: Me,
|
|
699
|
-
uploading:
|
|
704
|
+
uploading: U,
|
|
700
705
|
progress: Ne,
|
|
701
706
|
error: Pe
|
|
702
707
|
})]
|
|
703
708
|
})
|
|
704
709
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ h(t, {
|
|
706
711
|
title: "Pricing",
|
|
707
|
-
children: /* @__PURE__ */
|
|
712
|
+
children: /* @__PURE__ */ g("div", {
|
|
708
713
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
|
|
709
|
-
children: [/* @__PURE__ */
|
|
714
|
+
children: [/* @__PURE__ */ g("div", {
|
|
710
715
|
className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
|
|
711
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ h(r, {
|
|
712
717
|
label: "Price",
|
|
713
718
|
required: !0,
|
|
714
719
|
type: "number",
|
|
715
|
-
value:
|
|
716
|
-
onChange: (e) =>
|
|
720
|
+
value: P.price,
|
|
721
|
+
onChange: (e) => X("price", e.target.value),
|
|
717
722
|
placeholder: "0.00",
|
|
718
723
|
min: .01,
|
|
719
724
|
step: "0.01"
|
|
720
|
-
}), /* @__PURE__ */
|
|
725
|
+
}), /* @__PURE__ */ h(i, {
|
|
721
726
|
label: "Currency",
|
|
722
727
|
required: !0,
|
|
723
|
-
value:
|
|
724
|
-
onChange: (e) =>
|
|
728
|
+
value: P.currency,
|
|
729
|
+
onChange: (e) => X("currency", e.target.value),
|
|
725
730
|
options: pe,
|
|
726
731
|
placeholder: "Select currency"
|
|
727
732
|
})]
|
|
728
|
-
}), /* @__PURE__ */
|
|
733
|
+
}), /* @__PURE__ */ h(r, {
|
|
729
734
|
label: "Tags",
|
|
730
|
-
value:
|
|
731
|
-
onChange: (e) =>
|
|
735
|
+
value: P.tags,
|
|
736
|
+
onChange: (e) => X("tags", e.target.value),
|
|
732
737
|
placeholder: "mechanical, wireless, ergonomic",
|
|
733
738
|
hint: "Comma-separated keywords."
|
|
734
739
|
})]
|
|
735
740
|
})
|
|
736
741
|
}),
|
|
737
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ h(t, {
|
|
738
743
|
title: "Inventory",
|
|
739
|
-
children: /* @__PURE__ */
|
|
744
|
+
children: /* @__PURE__ */ g("div", {
|
|
740
745
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
|
|
741
746
|
children: [
|
|
742
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ g("div", {
|
|
743
748
|
className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
|
|
744
|
-
children: [/* @__PURE__ */
|
|
749
|
+
children: [/* @__PURE__ */ h(r, {
|
|
745
750
|
label: "Stock Quantity",
|
|
746
751
|
required: !0,
|
|
747
752
|
type: "number",
|
|
748
|
-
value:
|
|
749
|
-
onChange: (e) =>
|
|
753
|
+
value: P.stockQuantity,
|
|
754
|
+
onChange: (e) => X("stockQuantity", e.target.value),
|
|
750
755
|
min: 0,
|
|
751
756
|
step: 1
|
|
752
|
-
}), /* @__PURE__ */
|
|
757
|
+
}), /* @__PURE__ */ h(r, {
|
|
753
758
|
label: "SKU",
|
|
754
|
-
value:
|
|
755
|
-
onChange: (e) =>
|
|
759
|
+
value: P.sku,
|
|
760
|
+
onChange: (e) => X("sku", e.target.value),
|
|
756
761
|
placeholder: "e.g. KB-WL-001",
|
|
757
762
|
hint: "Your internal stock-keeping unit reference."
|
|
758
763
|
})]
|
|
759
764
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ h(r, {
|
|
761
766
|
label: "Low Stock Threshold",
|
|
762
767
|
type: "number",
|
|
763
|
-
value:
|
|
764
|
-
onChange: (e) =>
|
|
768
|
+
value: P.lowStockThreshold,
|
|
769
|
+
onChange: (e) => X("lowStockThreshold", e.target.value),
|
|
765
770
|
placeholder: "e.g. 5",
|
|
766
771
|
min: 0,
|
|
767
772
|
step: 1,
|
|
768
773
|
hint: "Get flagged when stock falls to or below this number."
|
|
769
774
|
}),
|
|
770
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ h(n, {
|
|
771
776
|
label: "Track Inventory",
|
|
772
777
|
description: "Automatically reduce stock when orders are placed.",
|
|
773
|
-
checked:
|
|
774
|
-
onChange:
|
|
778
|
+
checked: P.trackInventory,
|
|
779
|
+
onChange: Z("trackInventory")
|
|
775
780
|
}),
|
|
776
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ h(n, {
|
|
777
782
|
label: "Allow Backorder",
|
|
778
783
|
description: "Let buyers order even when stock quantity is zero.",
|
|
779
|
-
checked:
|
|
780
|
-
onChange:
|
|
784
|
+
checked: P.allowBackorder,
|
|
785
|
+
onChange: Z("allowBackorder")
|
|
781
786
|
})
|
|
782
787
|
]
|
|
783
788
|
})
|
|
784
789
|
}),
|
|
785
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ h(t, {
|
|
786
791
|
title: "Shipping",
|
|
787
|
-
children: /* @__PURE__ */
|
|
792
|
+
children: /* @__PURE__ */ g("div", {
|
|
788
793
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
|
|
789
|
-
children: [/* @__PURE__ */
|
|
794
|
+
children: [/* @__PURE__ */ h(n, {
|
|
790
795
|
label: "Requires Shipping",
|
|
791
796
|
description: "This item will be physically shipped to the buyer.",
|
|
792
|
-
checked:
|
|
793
|
-
onChange:
|
|
794
|
-
}),
|
|
795
|
-
/* @__PURE__ */
|
|
797
|
+
checked: P.requiresShipping,
|
|
798
|
+
onChange: Z("requiresShipping")
|
|
799
|
+
}), P.requiresShipping && /* @__PURE__ */ g(m, { children: [
|
|
800
|
+
/* @__PURE__ */ g("div", {
|
|
796
801
|
className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
|
|
797
|
-
children: [/* @__PURE__ */
|
|
802
|
+
children: [/* @__PURE__ */ h(r, {
|
|
798
803
|
label: "Weight",
|
|
799
804
|
type: "number",
|
|
800
|
-
value:
|
|
801
|
-
onChange: (e) =>
|
|
805
|
+
value: P.weightKg,
|
|
806
|
+
onChange: (e) => X("weightKg", e.target.value),
|
|
802
807
|
placeholder: "0.0",
|
|
803
808
|
min: 0,
|
|
804
809
|
step: "0.01",
|
|
805
810
|
hint: "Used to calculate shipping costs."
|
|
806
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ h(i, {
|
|
807
812
|
label: "Weight Unit",
|
|
808
|
-
value:
|
|
809
|
-
onChange: (e) =>
|
|
813
|
+
value: P.weightUnit,
|
|
814
|
+
onChange: (e) => X("weightUnit", e.target.value),
|
|
810
815
|
options: me
|
|
811
816
|
})]
|
|
812
817
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ g("div", {
|
|
814
819
|
className: "grid grid-cols-1 gap-5 sm:grid-cols-3",
|
|
815
820
|
children: [
|
|
816
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ h(r, {
|
|
817
822
|
label: "Length",
|
|
818
823
|
type: "number",
|
|
819
|
-
value:
|
|
820
|
-
onChange: (e) =>
|
|
824
|
+
value: P.length,
|
|
825
|
+
onChange: (e) => X("length", e.target.value),
|
|
821
826
|
placeholder: "0.0",
|
|
822
827
|
min: 0,
|
|
823
828
|
step: "0.01"
|
|
824
829
|
}),
|
|
825
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ h(r, {
|
|
826
831
|
label: "Width",
|
|
827
832
|
type: "number",
|
|
828
|
-
value:
|
|
829
|
-
onChange: (e) =>
|
|
833
|
+
value: P.width,
|
|
834
|
+
onChange: (e) => X("width", e.target.value),
|
|
830
835
|
placeholder: "0.0",
|
|
831
836
|
min: 0,
|
|
832
837
|
step: "0.01"
|
|
833
838
|
}),
|
|
834
|
-
/* @__PURE__ */
|
|
839
|
+
/* @__PURE__ */ h(r, {
|
|
835
840
|
label: "Height",
|
|
836
841
|
type: "number",
|
|
837
|
-
value:
|
|
838
|
-
onChange: (e) =>
|
|
842
|
+
value: P.height,
|
|
843
|
+
onChange: (e) => X("height", e.target.value),
|
|
839
844
|
placeholder: "0.0",
|
|
840
845
|
min: 0,
|
|
841
846
|
step: "0.01"
|
|
842
847
|
})
|
|
843
848
|
]
|
|
844
849
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ h(i, {
|
|
846
851
|
label: "Dimension Unit",
|
|
847
|
-
value:
|
|
848
|
-
onChange: (e) =>
|
|
852
|
+
value: P.dimensionUnit,
|
|
853
|
+
onChange: (e) => X("dimensionUnit", e.target.value),
|
|
849
854
|
options: he,
|
|
850
855
|
hint: "Applies to length, width, and height above."
|
|
851
856
|
})
|
|
852
857
|
] })]
|
|
853
858
|
})
|
|
854
859
|
}),
|
|
855
|
-
/* @__PURE__ */
|
|
860
|
+
/* @__PURE__ */ h(t, {
|
|
856
861
|
title: "Product Details",
|
|
857
862
|
description: "Optional supplemental information for buyers.",
|
|
858
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ g("div", {
|
|
859
864
|
className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-5",
|
|
860
865
|
children: [
|
|
861
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ g("div", {
|
|
862
867
|
className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
|
|
863
|
-
children: [/* @__PURE__ */
|
|
868
|
+
children: [/* @__PURE__ */ h(r, {
|
|
864
869
|
label: "Brand",
|
|
865
|
-
value:
|
|
866
|
-
onChange: (e) =>
|
|
870
|
+
value: P.brand,
|
|
871
|
+
onChange: (e) => X("brand", e.target.value),
|
|
867
872
|
placeholder: "e.g. Logitech"
|
|
868
|
-
}), /* @__PURE__ */
|
|
873
|
+
}), /* @__PURE__ */ h(r, {
|
|
869
874
|
label: "Manufacturer",
|
|
870
|
-
value:
|
|
871
|
-
onChange: (e) =>
|
|
875
|
+
value: P.manufacturer,
|
|
876
|
+
onChange: (e) => X("manufacturer", e.target.value),
|
|
872
877
|
placeholder: "e.g. Logitech Manufacturing Ltd."
|
|
873
878
|
})]
|
|
874
879
|
}),
|
|
875
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ h(r, {
|
|
876
881
|
label: "Country of Origin",
|
|
877
|
-
value:
|
|
878
|
-
onChange: (e) =>
|
|
882
|
+
value: P.countryOfOrigin,
|
|
883
|
+
onChange: (e) => X("countryOfOrigin", e.target.value),
|
|
879
884
|
placeholder: "e.g. China"
|
|
880
885
|
}),
|
|
881
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ h(r, {
|
|
882
887
|
label: "Warranty Info",
|
|
883
|
-
value:
|
|
884
|
-
onChange: (e) =>
|
|
888
|
+
value: P.warrantyInfo,
|
|
889
|
+
onChange: (e) => X("warrantyInfo", e.target.value),
|
|
885
890
|
placeholder: "e.g. 1-year limited manufacturer warranty"
|
|
886
891
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ h(a, {
|
|
888
893
|
label: "Return Policy",
|
|
889
|
-
value:
|
|
890
|
-
onChange: (e) =>
|
|
894
|
+
value: P.returnPolicy,
|
|
895
|
+
onChange: (e) => X("returnPolicy", e.target.value),
|
|
891
896
|
rows: 3,
|
|
892
897
|
placeholder: "e.g. 30-day returns accepted"
|
|
893
898
|
})
|
|
894
899
|
]
|
|
895
900
|
})
|
|
896
901
|
}),
|
|
897
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ g("div", {
|
|
898
903
|
className: "flex flex-wrap items-center gap-3 pb-8",
|
|
899
904
|
children: [
|
|
900
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ h("button", {
|
|
901
906
|
type: "button",
|
|
902
|
-
onClick: () =>
|
|
907
|
+
onClick: () => _?.(`${v}/seller/items`),
|
|
903
908
|
className: "rounded-button border border-border-strong px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
904
909
|
children: "Cancel"
|
|
905
910
|
}),
|
|
906
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ h("button", {
|
|
907
912
|
type: "button",
|
|
908
|
-
onClick: () => void
|
|
909
|
-
disabled: !
|
|
910
|
-
"aria-disabled": !
|
|
911
|
-
title:
|
|
913
|
+
onClick: () => void Re(!1),
|
|
914
|
+
disabled: !J || W,
|
|
915
|
+
"aria-disabled": !J || W,
|
|
916
|
+
title: J ? void 0 : "Fill in all required fields to continue",
|
|
912
917
|
className: l("inline-flex items-center gap-2 rounded-button px-5 py-2 text-sm font-medium transition-colors", "border border-border-strong bg-bg-surface text-text-primary", "hover:bg-bg-sunken", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
913
|
-
children:
|
|
918
|
+
children: W ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
|
|
914
919
|
size: 15,
|
|
915
920
|
className: "animate-spin"
|
|
916
921
|
}), "Saving..."] }) : "Save Changes"
|
|
917
922
|
}),
|
|
918
|
-
Q && /* @__PURE__ */
|
|
923
|
+
Q && /* @__PURE__ */ h("button", {
|
|
919
924
|
type: "button",
|
|
920
|
-
onClick: () => void
|
|
921
|
-
disabled: !
|
|
922
|
-
"aria-disabled": !
|
|
925
|
+
onClick: () => void Re(!0),
|
|
926
|
+
disabled: !J || W,
|
|
927
|
+
"aria-disabled": !J || W,
|
|
923
928
|
className: l("inline-flex items-center gap-2 rounded-button px-5 py-2 text-sm font-medium transition-colors", "bg-action-primary-bg text-action-primary-text", "hover:bg-action-primary-bg/90", "disabled:opacity-50 disabled:cursor-not-allowed"),
|
|
924
|
-
children:
|
|
929
|
+
children: W ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
|
|
925
930
|
size: 15,
|
|
926
931
|
className: "animate-spin"
|
|
927
932
|
}), "Saving..."] }) : "Save & Resubmit for Review"
|
|
@@ -934,6 +939,6 @@ var _ = ({ label: e, value: t }) => /* @__PURE__ */ m(h, {
|
|
|
934
939
|
})
|
|
935
940
|
});
|
|
936
941
|
};
|
|
937
|
-
export {
|
|
942
|
+
export { b as EditPhysicalItemPage };
|
|
938
943
|
|
|
939
944
|
//# sourceMappingURL=EditPhysicalItemPage.js.map
|