@burdenoff/microfe-devportal 2026.716.2 → 2026.720.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 (58) hide show
  1. package/dist/devportal/components/PermissionGuard.d.ts +14 -1
  2. package/dist/devportal/components/PermissionGuard.d.ts.map +1 -1
  3. package/dist/devportal/components/PermissionGuard.js +16 -13
  4. package/dist/devportal/components/PermissionGuard.js.map +1 -1
  5. package/dist/devportal/hooks/usePackageUpload.d.ts.map +1 -1
  6. package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
  7. package/dist/devportal/pages/AdminReviewPage.js +9 -9
  8. package/dist/devportal/pages/ApiKeysPage.js +180 -181
  9. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  10. package/dist/devportal/pages/ApplicationDetailPage.js +3 -3
  11. package/dist/devportal/pages/ApplicationVersionsPage.js +4 -4
  12. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  13. package/dist/devportal/pages/ApplicationsPage.js +4 -4
  14. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  15. package/dist/devportal/pages/CreateApiKeyPage.js +1 -1
  16. package/dist/devportal/pages/CreateApplicationPage.d.ts.map +1 -1
  17. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  18. package/dist/devportal/pages/CreateOAuthClientPage.js +1 -1
  19. package/dist/devportal/pages/CreateOrganizationPage.js +1 -1
  20. package/dist/devportal/pages/CreatePhysicalItemPage.d.ts.map +1 -1
  21. package/dist/devportal/pages/CreatePhysicalItemPage.js +147 -116
  22. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
  23. package/dist/devportal/pages/CreateWebhookPage.js +25 -25
  24. package/dist/devportal/pages/DashboardPage.d.ts.map +1 -1
  25. package/dist/devportal/pages/DashboardPage.js +110 -111
  26. package/dist/devportal/pages/DashboardPage.js.map +1 -1
  27. package/dist/devportal/pages/DelegationsPage.js +1 -1
  28. package/dist/devportal/pages/EditApplicationPage.d.ts.map +1 -1
  29. package/dist/devportal/pages/EditApplicationPage.js +4 -4
  30. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  31. package/dist/devportal/pages/ListingPreviewPage.d.ts.map +1 -1
  32. package/dist/devportal/pages/ListingPreviewPage.js +160 -161
  33. package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
  34. package/dist/devportal/pages/OAuthClientDetailPage.d.ts.map +1 -1
  35. package/dist/devportal/pages/OAuthClientDetailPage.js +166 -167
  36. package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
  37. package/dist/devportal/pages/OAuthClientsPage.d.ts.map +1 -1
  38. package/dist/devportal/pages/OAuthClientsPage.js +121 -122
  39. package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
  40. package/dist/devportal/pages/OrganizationDetailPage.js +3 -3
  41. package/dist/devportal/pages/OrganizationMembersPage.js +4 -4
  42. package/dist/devportal/pages/OrganizationsPage.js +1 -1
  43. package/dist/devportal/pages/PublishPage.d.ts.map +1 -1
  44. package/dist/devportal/pages/PublishPage.js +246 -246
  45. package/dist/devportal/pages/PublishPage.js.map +1 -1
  46. package/dist/devportal/pages/PublisherProfilePage.js +4 -4
  47. package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
  48. package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
  49. package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
  50. package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
  51. package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
  52. package/dist/devportal/pages/StoreSubmissionPage.js +3 -3
  53. package/dist/devportal/pages/WebhookDetailPage.js +3 -3
  54. package/dist/devportal/pages/WebhooksPage.js +129 -129
  55. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  56. package/dist/devportal/types/index.d.ts.map +1 -1
  57. package/dist/devportal/types/index.js.map +1 -1
  58. package/package.json +1 -1
@@ -2,8 +2,8 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { PageLayout as n, PageSection as r } from "../components/PageLayout.js";
4
4
  import { CheckboxField as i, InputField as a, SelectField as o, TextareaField as s } from "../components/FormField.js";
5
- import { useCallback as c, useRef as l, useState as u } from "react";
6
- import { Info as d, Loader2 as f, Upload as ee, X as p } from "lucide-react";
5
+ import { useCallback as ee, useRef as c, useState as l } from "react";
6
+ import { Info as u, Loader2 as d, Upload as f, X as p } from "lucide-react";
7
7
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
8
8
  //#region src/devportal/pages/CreatePhysicalItemPage.tsx
9
9
  var _ = [
@@ -40,6 +40,27 @@ var _ = [
40
40
  label: "Consumable"
41
41
  }
42
42
  ], v = [
43
+ {
44
+ value: "agri-seeds",
45
+ label: "Agri-Inputs — Seeds"
46
+ },
47
+ {
48
+ value: "agri-fertilizer",
49
+ label: "Agri-Inputs — Organic Fertilizer"
50
+ },
51
+ {
52
+ value: "agri-biopesticide",
53
+ label: "Agri-Inputs — Bio-Pesticides"
54
+ },
55
+ {
56
+ value: "agri-tools",
57
+ label: "Agri-Inputs — Tools"
58
+ },
59
+ {
60
+ value: "agri-irrigation",
61
+ label: "Agri-Inputs — Irrigation"
62
+ }
63
+ ], y = [
43
64
  {
44
65
  value: "USD",
45
66
  label: "USD — US Dollar"
@@ -64,7 +85,7 @@ var _ = [
64
85
  value: "AED",
65
86
  label: "AED — UAE Dirham"
66
87
  }
67
- ], y = [
88
+ ], b = [
68
89
  "name",
69
90
  "slug",
70
91
  "type",
@@ -72,21 +93,22 @@ var _ = [
72
93
  "price",
73
94
  "currency",
74
95
  "stockQuantity"
75
- ], b = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", x = "\n query SellerOrgForPublisher {\n developerOrganizations(limit: 1, offset: 0) {\n edges {\n node {\n name\n contactEmail\n websiteUrl\n legalEntityName\n taxCountry\n }\n }\n }\n }\n", S = "\n mutation RegisterPublisher($input: RegisterPublisherInput!) {\n registerPublisher(input: $input) {\n id\n name\n email\n }\n }\n", C = "\n mutation CreatePhysicalProduct($input: CreatePhysicalProductInput!) {\n createPhysicalProduct(input: $input) {\n id\n name\n slug\n status\n nature\n type\n price\n currency\n }\n }\n", w = "\n mutation SubmitProduct($id: ID!, $notes: String) {\n submitProduct(id: $id, notes: $notes) {\n id\n status\n }\n }\n";
76
- function T(e) {
96
+ ], x = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", S = "\n query SellerOrgForPublisher {\n developerOrganizations(limit: 1, offset: 0) {\n edges {\n node {\n name\n contactEmail\n websiteUrl\n legalEntityName\n taxCountry\n }\n }\n }\n }\n", C = "\n mutation RegisterPublisher($input: RegisterPublisherInput!) {\n registerPublisher(input: $input) {\n id\n name\n email\n }\n }\n", w = "\n mutation CreatePhysicalProduct($input: CreatePhysicalProductInput!) {\n createPhysicalProduct(input: $input) {\n id\n name\n slug\n status\n nature\n type\n price\n currency\n }\n }\n", T = "\n mutation SubmitProduct($id: ID!, $notes: String) {\n submitProduct(id: $id, notes: $notes) {\n id\n status\n }\n }\n";
97
+ function E(e) {
77
98
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-");
78
99
  }
79
- function E(e) {
80
- return y.every((t) => {
100
+ function D(e) {
101
+ return b.every((t) => {
81
102
  let n = e[t];
82
103
  return typeof n == "boolean" ? !0 : n.trim() !== "";
83
104
  });
84
105
  }
85
- var D = () => {
86
- let { navigate: y, basePath: D, apiGatewayUrl: O, authToken: k } = e(), [A, j] = u({
106
+ var O = () => {
107
+ let { navigate: b, basePath: O, apiGatewayUrl: k, authToken: A } = e(), [j, M] = l({
87
108
  name: "",
88
109
  slug: "",
89
110
  type: "",
111
+ category: "",
90
112
  shortDescription: "",
91
113
  longDescription: "",
92
114
  price: "",
@@ -101,44 +123,44 @@ var D = () => {
101
123
  countryOfOrigin: "",
102
124
  warrantyInfo: "",
103
125
  returnPolicy: ""
104
- }), [M, N] = u([]), [P, F] = u(!1), I = l(null), [L, R] = u(!1), [z, B] = u(null), [V, H] = u(!1), U = E(A), W = `${O || ""}/global/graphql`, G = (e, t) => {
105
- j((n) => ({
126
+ }), [N, P] = l([]), [F, I] = l(!1), L = c(null), [R, z] = l(!1), [B, V] = l(null), [H, U] = l(!1), W = D(j), G = `${k || ""}/global/graphql`, K = (e, t) => {
127
+ M((n) => ({
106
128
  ...n,
107
129
  [e]: t
108
130
  }));
109
- }, K = (e) => {
131
+ }, q = (e) => {
110
132
  let t = e.target.value;
111
- j((e) => ({
133
+ M((e) => ({
112
134
  ...e,
113
135
  name: t,
114
- slug: T(t)
136
+ slug: E(t)
115
137
  }));
116
- }, q = (e) => (t) => {
117
- G(e, t.target.checked);
118
- }, J = c((e) => {
138
+ }, J = (e) => (t) => {
139
+ K(e, t.target.checked);
140
+ }, Y = ee((e) => {
119
141
  let t = Array.from(e).filter((e) => e.type.startsWith("image/")).map((e) => ({
120
142
  file: e,
121
143
  url: URL.createObjectURL(e)
122
144
  }));
123
- N((e) => [...e, ...t]);
124
- }, []), Y = (e) => {
125
- e.target.files && J(e.target.files), e.target.value = "";
126
- }, X = (e) => {
127
- e.preventDefault(), F(!1), e.dataTransfer.files && J(e.dataTransfer.files);
145
+ P((e) => [...e, ...t]);
146
+ }, []), X = (e) => {
147
+ e.target.files && Y(e.target.files), e.target.value = "";
128
148
  }, Z = (e) => {
129
- e.preventDefault(), F(!0);
130
- }, Q = () => F(!1), te = (e) => {
131
- N((t) => {
149
+ e.preventDefault(), I(!1), e.dataTransfer.files && Y(e.dataTransfer.files);
150
+ }, Q = (e) => {
151
+ e.preventDefault(), I(!0);
152
+ }, te = () => I(!1), ne = (e) => {
153
+ P((t) => {
132
154
  let n = [...t];
133
155
  return URL.revokeObjectURL(n[e].url), n.splice(e, 1), n;
134
156
  });
135
157
  };
136
158
  async function $(e, t) {
137
- let n = await (await fetch(W, {
159
+ let n = await (await fetch(G, {
138
160
  method: "POST",
139
161
  headers: {
140
162
  "Content-Type": "application/json",
141
- ...k ? { Authorization: `Bearer ${k}` } : {}
163
+ ...A ? { Authorization: `Bearer ${A}` } : {}
142
164
  },
143
165
  credentials: "include",
144
166
  body: JSON.stringify({
@@ -157,13 +179,13 @@ var D = () => {
157
179
  children: /* @__PURE__ */ g("div", {
158
180
  className: "space-y-8 max-w-3xl",
159
181
  children: [
160
- V && /* @__PURE__ */ h("div", {
182
+ H && /* @__PURE__ */ h("div", {
161
183
  className: "rounded-card border border-status-success-text/30 bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
162
184
  children: "Your listing has been submitted for review! Redirecting..."
163
185
  }),
164
- z && /* @__PURE__ */ h("div", {
186
+ B && /* @__PURE__ */ h("div", {
165
187
  className: "rounded-card border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
166
- children: z
188
+ children: B
167
189
  }),
168
190
  /* @__PURE__ */ h(r, {
169
191
  title: "Basic Information",
@@ -174,40 +196,48 @@ var D = () => {
174
196
  /* @__PURE__ */ h(a, {
175
197
  label: "Name",
176
198
  required: !0,
177
- value: A.name,
178
- onChange: K,
199
+ value: j.name,
200
+ onChange: q,
179
201
  placeholder: "e.g. Wireless Ergonomic Keyboard",
180
202
  maxLength: 120
181
203
  }),
182
204
  /* @__PURE__ */ h(a, {
183
205
  label: "Slug",
184
206
  required: !0,
185
- value: A.slug,
186
- onChange: (e) => G("slug", e.target.value),
207
+ value: j.slug,
208
+ onChange: (e) => K("slug", e.target.value),
187
209
  placeholder: "auto-derived-from-name",
188
210
  hint: "URL-friendly identifier. Auto-derived from name; you can edit it."
189
211
  }),
190
212
  /* @__PURE__ */ h(o, {
191
- label: "Product Category",
213
+ label: "Product Type",
192
214
  required: !0,
193
- value: A.type,
194
- onChange: (e) => G("type", e.target.value),
215
+ value: j.type,
216
+ onChange: (e) => K("type", e.target.value),
195
217
  options: _,
196
- placeholder: "Select a category"
218
+ placeholder: "Select a type"
219
+ }),
220
+ /* @__PURE__ */ h(o, {
221
+ label: "Store Category",
222
+ value: j.category,
223
+ onChange: (e) => K("category", e.target.value),
224
+ options: v,
225
+ placeholder: "General / uncategorised",
226
+ hint: "Pick an Agri-Inputs category to list this item in the HealthyBowl Agri-Inputs Store. Leave blank for a general store listing."
197
227
  }),
198
228
  /* @__PURE__ */ h(a, {
199
229
  label: "Short Description",
200
230
  required: !0,
201
- value: A.shortDescription,
202
- onChange: (e) => G("shortDescription", e.target.value),
231
+ value: j.shortDescription,
232
+ onChange: (e) => K("shortDescription", e.target.value),
203
233
  placeholder: "One-line summary shown on the store card",
204
234
  maxLength: 160,
205
- hint: `${A.shortDescription.length}/160`
235
+ hint: `${j.shortDescription.length}/160`
206
236
  }),
207
237
  /* @__PURE__ */ h(s, {
208
238
  label: "Long Description",
209
- value: A.longDescription,
210
- onChange: (e) => G("longDescription", e.target.value),
239
+ value: j.longDescription,
240
+ onChange: (e) => K("longDescription", e.target.value),
211
241
  rows: 5,
212
242
  placeholder: "Detailed product description, features, specs…"
213
243
  })
@@ -221,15 +251,15 @@ var D = () => {
221
251
  className: "rounded-card border border-border-seam bg-bg-surface p-6 space-y-4",
222
252
  children: [
223
253
  /* @__PURE__ */ g("div", {
224
- onDrop: X,
225
- onDragOver: Z,
226
- onDragLeave: Q,
227
- onClick: () => I.current?.click(),
228
- className: t("flex flex-col items-center justify-center gap-3 rounded-input border-2 border-dashed px-6 py-10 cursor-pointer transition-colors", P ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-subtle hover:border-border-strong"),
254
+ onDrop: Z,
255
+ onDragOver: Q,
256
+ onDragLeave: te,
257
+ onClick: () => L.current?.click(),
258
+ className: t("flex flex-col items-center justify-center gap-3 rounded-input border-2 border-dashed px-6 py-10 cursor-pointer transition-colors", F ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-subtle hover:border-border-strong"),
229
259
  children: [
230
- /* @__PURE__ */ h(ee, {
260
+ /* @__PURE__ */ h(f, {
231
261
  size: 28,
232
- className: P ? "text-action-primary-bg" : "text-text-muted"
262
+ className: F ? "text-action-primary-bg" : "text-text-muted"
233
263
  }),
234
264
  /* @__PURE__ */ g("div", {
235
265
  className: "text-center space-y-1",
@@ -242,18 +272,18 @@ var D = () => {
242
272
  })]
243
273
  }),
244
274
  /* @__PURE__ */ h("input", {
245
- ref: I,
275
+ ref: L,
246
276
  type: "file",
247
277
  accept: "image/*",
248
278
  multiple: !0,
249
279
  className: "sr-only",
250
- onChange: Y
280
+ onChange: X
251
281
  })
252
282
  ]
253
283
  }),
254
- M.length > 0 && /* @__PURE__ */ h("div", {
284
+ N.length > 0 && /* @__PURE__ */ h("div", {
255
285
  className: "flex flex-wrap gap-3",
256
- children: M.map((e, t) => /* @__PURE__ */ g("div", {
286
+ children: N.map((e, t) => /* @__PURE__ */ g("div", {
257
287
  className: "relative group",
258
288
  children: [
259
289
  /* @__PURE__ */ h("img", {
@@ -268,7 +298,7 @@ var D = () => {
268
298
  /* @__PURE__ */ h("button", {
269
299
  type: "button",
270
300
  onClick: (e) => {
271
- e.stopPropagation(), te(t);
301
+ e.stopPropagation(), ne(t);
272
302
  },
273
303
  className: "absolute -top-1.5 -right-1.5 hidden group-hover:flex h-5 w-5 items-center justify-center rounded-full bg-bg-surface border border-border-subtle text-text-muted hover:text-status-error-text hover:border-status-error-text/40 transition-colors",
274
304
  "aria-label": "Remove image",
@@ -279,7 +309,7 @@ var D = () => {
279
309
  }),
280
310
  /* @__PURE__ */ g("p", {
281
311
  className: "flex items-start gap-2 rounded-input border border-border-subtle bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
282
- children: [/* @__PURE__ */ h(d, {
312
+ children: [/* @__PURE__ */ h(u, {
283
313
  size: 13,
284
314
  className: "mt-0.5 shrink-0 text-text-muted"
285
315
  }), "At least 1 image helps buyers — high quality photos increase conversions."]
@@ -297,23 +327,23 @@ var D = () => {
297
327
  label: "Price",
298
328
  required: !0,
299
329
  type: "number",
300
- value: A.price,
301
- onChange: (e) => G("price", e.target.value),
330
+ value: j.price,
331
+ onChange: (e) => K("price", e.target.value),
302
332
  placeholder: "0.00",
303
333
  min: .01,
304
334
  step: "0.01"
305
335
  }), /* @__PURE__ */ h(o, {
306
336
  label: "Currency",
307
337
  required: !0,
308
- value: A.currency,
309
- onChange: (e) => G("currency", e.target.value),
310
- options: v,
338
+ value: j.currency,
339
+ onChange: (e) => K("currency", e.target.value),
340
+ options: y,
311
341
  placeholder: "Select currency"
312
342
  })]
313
343
  }), /* @__PURE__ */ h(a, {
314
344
  label: "Tags",
315
- value: A.tags,
316
- onChange: (e) => G("tags", e.target.value),
345
+ value: j.tags,
346
+ onChange: (e) => K("tags", e.target.value),
317
347
  placeholder: "mechanical, wireless, ergonomic",
318
348
  hint: "Comma-separated keywords to help buyers find your item."
319
349
  })]
@@ -329,22 +359,22 @@ var D = () => {
329
359
  label: "Stock Quantity",
330
360
  required: !0,
331
361
  type: "number",
332
- value: A.stockQuantity,
333
- onChange: (e) => G("stockQuantity", e.target.value),
362
+ value: j.stockQuantity,
363
+ onChange: (e) => K("stockQuantity", e.target.value),
334
364
  min: 0,
335
365
  step: 1
336
366
  }), /* @__PURE__ */ h(a, {
337
367
  label: "SKU",
338
- value: A.sku,
339
- onChange: (e) => G("sku", e.target.value),
368
+ value: j.sku,
369
+ onChange: (e) => K("sku", e.target.value),
340
370
  placeholder: "e.g. KB-WL-001",
341
371
  hint: "Your internal stock-keeping unit reference."
342
372
  })]
343
373
  }), /* @__PURE__ */ h(i, {
344
374
  label: "Track Inventory",
345
375
  description: "Automatically reduce stock when orders are placed.",
346
- checked: A.trackInventory,
347
- onChange: q("trackInventory")
376
+ checked: j.trackInventory,
377
+ onChange: J("trackInventory")
348
378
  })]
349
379
  })
350
380
  }),
@@ -356,14 +386,14 @@ var D = () => {
356
386
  /* @__PURE__ */ h(i, {
357
387
  label: "Requires Shipping",
358
388
  description: "This item will be physically shipped to the buyer.",
359
- checked: A.requiresShipping,
360
- onChange: q("requiresShipping")
389
+ checked: j.requiresShipping,
390
+ onChange: J("requiresShipping")
361
391
  }),
362
- A.requiresShipping && /* @__PURE__ */ h(a, {
392
+ j.requiresShipping && /* @__PURE__ */ h(a, {
363
393
  label: "Weight (kg)",
364
394
  type: "number",
365
- value: A.weightKg,
366
- onChange: (e) => G("weightKg", e.target.value),
395
+ value: j.weightKg,
396
+ onChange: (e) => K("weightKg", e.target.value),
367
397
  placeholder: "0.0",
368
398
  min: 0,
369
399
  step: "0.01",
@@ -371,7 +401,7 @@ var D = () => {
371
401
  }),
372
402
  /* @__PURE__ */ g("p", {
373
403
  className: "flex items-start gap-2 rounded-input border border-border-subtle bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
374
- children: [/* @__PURE__ */ h(d, {
404
+ children: [/* @__PURE__ */ h(u, {
375
405
  size: 13,
376
406
  className: "mt-0.5 shrink-0 text-text-muted"
377
407
  }), "Delivery fees are configured at the organization level in store settings."]
@@ -389,26 +419,26 @@ var D = () => {
389
419
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
390
420
  children: [/* @__PURE__ */ h(a, {
391
421
  label: "Brand",
392
- value: A.brand,
393
- onChange: (e) => G("brand", e.target.value),
422
+ value: j.brand,
423
+ onChange: (e) => K("brand", e.target.value),
394
424
  placeholder: "e.g. Logitech"
395
425
  }), /* @__PURE__ */ h(a, {
396
426
  label: "Country of Origin",
397
- value: A.countryOfOrigin,
398
- onChange: (e) => G("countryOfOrigin", e.target.value),
427
+ value: j.countryOfOrigin,
428
+ onChange: (e) => K("countryOfOrigin", e.target.value),
399
429
  placeholder: "e.g. China"
400
430
  })]
401
431
  }),
402
432
  /* @__PURE__ */ h(a, {
403
433
  label: "Warranty Info",
404
- value: A.warrantyInfo,
405
- onChange: (e) => G("warrantyInfo", e.target.value),
434
+ value: j.warrantyInfo,
435
+ onChange: (e) => K("warrantyInfo", e.target.value),
406
436
  placeholder: "e.g. 1-year limited manufacturer warranty"
407
437
  }),
408
438
  /* @__PURE__ */ h(s, {
409
439
  label: "Return Policy",
410
- value: A.returnPolicy,
411
- onChange: (e) => G("returnPolicy", e.target.value),
440
+ value: j.returnPolicy,
441
+ onChange: (e) => K("returnPolicy", e.target.value),
412
442
  rows: 3,
413
443
  placeholder: "e.g. 30-day returns accepted"
414
444
  })
@@ -419,7 +449,7 @@ var D = () => {
419
449
  className: "flex items-center gap-3 pb-8",
420
450
  children: [/* @__PURE__ */ h("button", {
421
451
  type: "button",
422
- onClick: () => y?.(`${D}/seller/items`),
452
+ onClick: () => b?.(`${O}/seller/items`),
423
453
  className: "rounded-button border border-border-strong px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
424
454
  children: "Cancel"
425
455
  }), /* @__PURE__ */ h("div", {
@@ -427,13 +457,13 @@ var D = () => {
427
457
  children: /* @__PURE__ */ h("button", {
428
458
  type: "button",
429
459
  onClick: async () => {
430
- if (!(!U || L)) {
431
- R(!0), B(null);
460
+ if (!(!W || R)) {
461
+ z(!0), V(null);
432
462
  try {
433
- let e = (await $(b)).myPublisher?.id ?? null;
463
+ let e = (await $(x)).myPublisher?.id ?? null;
434
464
  if (!e) {
435
- let t = (await $(x)).developerOrganizations.edges[0]?.node ?? null;
436
- e = (await $(S, { input: {
465
+ let t = (await $(S)).developerOrganizations.edges[0]?.node ?? null;
466
+ e = (await $(C, { input: {
437
467
  name: t?.legalEntityName ?? t?.name ?? "My Store",
438
468
  email: t?.contactEmail ?? "seller@burdenoff.com",
439
469
  websiteUrl: t?.websiteUrl ?? null,
@@ -442,43 +472,44 @@ var D = () => {
442
472
  contactEmail: t?.contactEmail ?? null
443
473
  } })).registerPublisher.id;
444
474
  }
445
- let t = A.tags.split(",").map((e) => e.trim()).filter(Boolean), n = (await $(C, { input: {
446
- name: A.name.trim(),
447
- slug: A.slug.trim(),
448
- type: A.type,
449
- description: A.shortDescription.trim(),
450
- longDescription: A.longDescription.trim() || null,
451
- price: parseFloat(A.price),
452
- currency: A.currency,
475
+ let t = j.tags.split(",").map((e) => e.trim()).filter(Boolean), n = (await $(w, { input: {
476
+ name: j.name.trim(),
477
+ slug: j.slug.trim(),
478
+ type: j.type,
479
+ category: j.category.trim() || null,
480
+ description: j.shortDescription.trim(),
481
+ longDescription: j.longDescription.trim() || null,
482
+ price: parseFloat(j.price),
483
+ currency: j.currency,
453
484
  tags: t.length > 0 ? t : null,
454
- stockQuantity: parseInt(A.stockQuantity, 10),
455
- sku: A.sku.trim() || null,
456
- trackInventory: A.trackInventory,
457
- requiresShipping: A.requiresShipping,
458
- weight: A.requiresShipping && A.weightKg.trim() ? parseFloat(A.weightKg) : null,
459
- brand: A.brand.trim() || null,
460
- countryOfOrigin: A.countryOfOrigin.trim() || null,
461
- warrantyInfo: A.warrantyInfo.trim() || null,
462
- returnPolicy: A.returnPolicy.trim() || null
485
+ stockQuantity: parseInt(j.stockQuantity, 10),
486
+ sku: j.sku.trim() || null,
487
+ trackInventory: j.trackInventory,
488
+ requiresShipping: j.requiresShipping,
489
+ weight: j.requiresShipping && j.weightKg.trim() ? parseFloat(j.weightKg) : null,
490
+ brand: j.brand.trim() || null,
491
+ countryOfOrigin: j.countryOfOrigin.trim() || null,
492
+ warrantyInfo: j.warrantyInfo.trim() || null,
493
+ returnPolicy: j.returnPolicy.trim() || null
463
494
  } })).createPhysicalProduct.id;
464
- await $(w, {
495
+ await $(T, {
465
496
  id: n,
466
497
  notes: "Submitted from seller portal"
467
- }), H(!0), setTimeout(() => {
468
- y?.(`${D}/seller/items`);
498
+ }), U(!0), setTimeout(() => {
499
+ b?.(`${O}/seller/items`);
469
500
  }, 2e3);
470
501
  } catch (e) {
471
- B(e instanceof Error ? e.message : "Submission failed. Please try again.");
502
+ V(e instanceof Error ? e.message : "Submission failed. Please try again.");
472
503
  } finally {
473
- R(!1);
504
+ z(!1);
474
505
  }
475
506
  }
476
507
  },
477
- disabled: !U || L,
478
- "aria-disabled": !U || L,
479
- title: U ? void 0 : "Fill in all required fields to continue",
508
+ disabled: !W || R,
509
+ "aria-disabled": !W || R,
510
+ title: W ? void 0 : "Fill in all required fields to continue",
480
511
  className: t("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", "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"),
481
- children: L ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(f, {
512
+ children: R ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(d, {
482
513
  size: 15,
483
514
  className: "animate-spin"
484
515
  }), "Submitting..."] }) : "Create & Submit for Review"
@@ -490,6 +521,6 @@ var D = () => {
490
521
  });
491
522
  };
492
523
  //#endregion
493
- export { D as CreatePhysicalItemPage };
524
+ export { O as CreatePhysicalItemPage };
494
525
 
495
526
  //# sourceMappingURL=CreatePhysicalItemPage.js.map