@burdenoff/microfe-devportal 2026.629.11 → 2026.702.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.
@@ -4,27 +4,29 @@ import { useDevportalPermission as n } from "../hooks/usePermission.js";
4
4
  import "../hooks/index.js";
5
5
  import { useTr as r } from "../utils/i18n.js";
6
6
  import { useEffect as i, useState as a } from "react";
7
- import { AlertTriangle as o, ArrowLeft as s, CheckCircle2 as c, Clock as l, RefreshCw as u, Store as d, XCircle as f } from "lucide-react";
8
- import { useNavigate as p, useParams as m } from "react-router-dom";
9
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
10
- import { IllustratedEmptyState as _, PagePurpose as v } from "@burdenoff/fe-libs/ui";
11
- import { graphqlFetch as y } from "@burdenoff/fe-libs/shared/graphql";
7
+ import { AlertTriangle as o, ArrowLeft as s, CheckCircle2 as c, Clock as l, EyeOff as u, RefreshCw as d, Store as f, XCircle as p } from "lucide-react";
8
+ import { useNavigate as m, useParams as h } from "react-router-dom";
9
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
10
+ import { IllustratedEmptyState as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
11
+ import { graphqlFetch as b } from "@burdenoff/fe-libs/shared/graphql";
12
12
  //#region src/devportal/pages/StoreSubmissionPage.tsx
13
- var b = "\n query DevportalAppForSubmission($id: ID!) {\n application(id: $id) {\n id\n name\n slug\n status\n reviewStatus\n iconUrl\n metadata\n }\n }\n", x = "\n mutation DevportalSubmitForReview($id: ID!, $notes: String) {\n submitApplicationForReview(id: $id, notes: $notes) {\n id\n status\n submittedAt\n metadata\n }\n }\n";
14
- function S(e) {
13
+ var x = "\n query DevportalAppForSubmission($id: ID!) {\n application(id: $id) {\n id\n name\n slug\n status\n reviewStatus\n reviewNotes\n iconUrl\n submittedAt\n metadata\n }\n }\n", S = "\n mutation DevportalSubmitForReview($id: ID!, $notes: String) {\n submitApplicationForReview(id: $id, notes: $notes) {\n id\n status\n submittedAt\n metadata\n }\n }\n", C = "\n mutation DevportalUnlistProduct($id: ID!) {\n unlistProduct(id: $id) {\n id\n status\n }\n }\n";
14
+ function w(e) {
15
15
  if (!e) return null;
16
- let t = e.metadata ?? {}, n = typeof t.storeProductId == "string" ? t.storeProductId : "", r = typeof t.storeSubmissionStatus == "string" ? t.storeSubmissionStatus : null;
16
+ let t = e.metadata ?? {}, n = typeof t.storeProductId == "string" ? t.storeProductId : "", r = typeof t.storeSubmissionStatus == "string" ? t.storeSubmissionStatus : null, i;
17
+ i = r === "PENDING_REVIEW" || r === "PUBLISHED" || r === "REJECTED" || r === "DRAFT" ? r : e.status === "SUBMITTED" ? "PENDING_REVIEW" : e.status === "PUBLISHED" ? "PUBLISHED" : e.status === "REJECTED" ? "REJECTED" : "UNKNOWN";
18
+ let a = typeof t.storeSubmissionAt == "string" ? t.storeSubmissionAt : null;
17
19
  return {
18
20
  productId: n,
19
- status: r === "PENDING_REVIEW" || r === "PUBLISHED" || r === "REJECTED" || r === "DRAFT" ? r : "UNKNOWN",
20
- submittedAt: typeof t.storeSubmissionAt == "string" ? t.storeSubmissionAt : null,
21
+ status: i,
22
+ submittedAt: a ?? e.submittedAt,
21
23
  reviewedAt: null,
22
24
  publishedAt: null,
23
25
  reviewNotes: null,
24
26
  rejectedReason: null
25
27
  };
26
28
  }
27
- var C = {
29
+ var T = {
28
30
  DRAFT: {
29
31
  i18nKey: "devportal.storeSubmission.status.draft",
30
32
  fallback: "Draft",
@@ -43,10 +45,16 @@ var C = {
43
45
  icon: c,
44
46
  tone: "text-status-success-text"
45
47
  },
48
+ UNLISTED: {
49
+ i18nKey: "devportal.storeSubmission.status.unlisted",
50
+ fallback: "Unlisted",
51
+ icon: u,
52
+ tone: "text-text-secondary"
53
+ },
46
54
  REJECTED: {
47
55
  i18nKey: "devportal.storeSubmission.status.rejected",
48
56
  fallback: "Rejected",
49
- icon: f,
57
+ icon: p,
50
58
  tone: "text-status-danger-text"
51
59
  },
52
60
  UNKNOWN: {
@@ -55,289 +63,403 @@ var C = {
55
63
  icon: o,
56
64
  tone: "text-text-tertiary"
57
65
  }
58
- }, w = () => {
59
- let { appId: o } = m(), f = p(), w = e(), T = r(), E = n(t.APP_SUBMIT), [D, O] = a(null), [k, A] = a(!0), [j, M] = a(null), [N, P] = a(!1), [F, I] = a(""), L = async () => {
66
+ }, E = () => {
67
+ let { appId: o } = h(), E = m(), D = e(), O = r(), k = n(t.APP_SUBMIT), [A, j] = a(null), [M, N] = a(!0), [P, F] = a(null), [I, L] = a(!1), [R, z] = a(!1), [B, V] = a(!1), [H, U] = a(null), [W, G] = a(""), K = async () => {
60
68
  if (o) {
61
- A(!0), M(null);
69
+ N(!0), F(null);
62
70
  try {
63
- let e = await y({
71
+ let e = await b({
64
72
  gateway: "global",
65
- query: b,
73
+ query: x,
66
74
  variables: { id: o }
67
75
  });
68
- if (e.errors?.length) throw Error(e.errors[0]?.message ?? T("devportal.storeSubmission.errors.loadFailed", "Failed to load application"));
69
- O(e.data?.application ?? null);
76
+ if (e.errors?.length) throw Error(e.errors[0]?.message ?? O("devportal.storeSubmission.errors.loadFailed", "Failed to load application"));
77
+ j(e.data?.application ?? null);
70
78
  } catch (e) {
71
- M(e instanceof Error ? e.message : T("devportal.storeSubmission.errors.loadFailed", "Failed to load application"));
79
+ F(e instanceof Error ? e.message : O("devportal.storeSubmission.errors.loadFailed", "Failed to load application"));
72
80
  } finally {
73
- A(!1);
81
+ N(!1);
74
82
  }
75
83
  }
76
84
  };
77
85
  i(() => {
78
- L();
86
+ K();
79
87
  }, [o]), i(() => {
80
- let e = D?.name;
88
+ let e = A?.name;
81
89
  if (!o || !e) return;
82
90
  let t = window.__breadcrumbRegistry;
83
91
  return t?.register(o, e), () => t?.unregister(o);
84
- }, [o, D?.name]);
85
- let R = async () => {
92
+ }, [o, A?.name]);
93
+ let q = async () => {
86
94
  if (o) {
87
- P(!0), M(null);
95
+ L(!0), F(null);
88
96
  try {
89
- let e = await y({
97
+ let e = await b({
90
98
  gateway: "global",
91
- query: x,
99
+ query: S,
92
100
  variables: {
93
101
  id: o,
94
- notes: F || null
102
+ notes: W || null
95
103
  }
96
104
  });
97
- if (e.errors?.length) throw Error(e.errors[0]?.message ?? T("devportal.storeSubmission.errors.submitFailed", "Submission failed"));
98
- w.emit("devportal.app.submitted", { appId: o }), await L();
105
+ if (e.errors?.length) throw Error(e.errors[0]?.message ?? O("devportal.storeSubmission.errors.submitFailed", "Submission failed"));
106
+ D.emit("devportal.app.submitted", { appId: o }), await K();
99
107
  } catch (e) {
100
- M(e instanceof Error ? e.message : T("devportal.storeSubmission.errors.submitFailed", "Submission failed"));
108
+ F(e instanceof Error ? e.message : O("devportal.storeSubmission.errors.submitFailed", "Submission failed"));
101
109
  } finally {
102
- P(!1);
110
+ L(!1);
103
111
  }
104
112
  }
105
- }, z = S(D), B = z ? C[z.status] : C.UNKNOWN, V = B.icon;
106
- return /* @__PURE__ */ g("main", {
113
+ }, J = async () => {
114
+ let e = w(A)?.productId;
115
+ if (e) {
116
+ z(!0), F(null);
117
+ try {
118
+ let t = await b({
119
+ gateway: "global",
120
+ query: C,
121
+ variables: { id: e }
122
+ });
123
+ if (t.errors?.length) throw Error(t.errors[0]?.message ?? O("devportal.storeSubmission.errors.unlistFailed", "Failed to unlist"));
124
+ U("UNLISTED");
125
+ } catch (e) {
126
+ F(e instanceof Error ? e.message : O("devportal.storeSubmission.errors.unlistFailed", "Failed to unlist"));
127
+ } finally {
128
+ z(!1), V(!1);
129
+ }
130
+ }
131
+ }, Y = w(A), X = H ?? Y?.status ?? "UNKNOWN", Z = T[X], Q = Z.icon;
132
+ return /* @__PURE__ */ _("main", {
107
133
  className: "min-h-screen bg-surface-default",
108
134
  "aria-labelledby": "store-submission-heading",
109
- children: [/* @__PURE__ */ h("div", {
110
- className: "border-b border-border-default bg-surface-raised",
111
- children: /* @__PURE__ */ h("div", {
112
- className: "mx-auto max-w-3xl px-6 py-4",
135
+ children: [
136
+ /* @__PURE__ */ g("div", {
137
+ className: "border-b border-border-default bg-surface-raised",
113
138
  children: /* @__PURE__ */ g("div", {
114
- className: "flex items-center gap-3",
115
- children: [/* @__PURE__ */ g("button", {
116
- type: "button",
117
- onClick: () => f(-1),
118
- className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
119
- children: [/* @__PURE__ */ h(s, {
120
- className: "h-4 w-4",
121
- "aria-hidden": "true"
122
- }), T("devportal.common.back", "Back")]
123
- }), /* @__PURE__ */ g("div", {
124
- className: "flex items-center gap-2",
125
- children: [/* @__PURE__ */ h(d, {
126
- className: "h-5 w-5 text-text-primary",
139
+ className: "mx-auto max-w-3xl px-6 py-4",
140
+ children: /* @__PURE__ */ _("div", {
141
+ className: "flex items-center gap-3",
142
+ children: [/* @__PURE__ */ _("button", {
143
+ type: "button",
144
+ onClick: () => E(-1),
145
+ className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
146
+ children: [/* @__PURE__ */ g(s, {
147
+ className: "h-4 w-4",
148
+ "aria-hidden": "true"
149
+ }), O("devportal.common.back", "Back")]
150
+ }), /* @__PURE__ */ _("div", {
151
+ className: "flex items-center gap-2",
152
+ children: [/* @__PURE__ */ g(f, {
153
+ className: "h-5 w-5 text-text-primary",
154
+ "aria-hidden": "true"
155
+ }), /* @__PURE__ */ g("h1", {
156
+ id: "store-submission-heading",
157
+ className: "text-xl font-semibold text-text-primary",
158
+ children: O("devportal.storeSubmission.title", "Store submission")
159
+ })]
160
+ })]
161
+ })
162
+ })
163
+ }),
164
+ B && /* @__PURE__ */ g("div", {
165
+ role: "dialog",
166
+ "aria-modal": "true",
167
+ "aria-labelledby": "unlist-dialog-title",
168
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
169
+ children: /* @__PURE__ */ _("div", {
170
+ className: "w-full max-w-md rounded-lg border border-border-default bg-surface-raised p-6 shadow-xl",
171
+ children: [/* @__PURE__ */ _("div", {
172
+ className: "mb-4 flex items-start gap-3",
173
+ children: [/* @__PURE__ */ g(u, {
174
+ className: "mt-0.5 h-5 w-5 shrink-0 text-text-secondary",
127
175
  "aria-hidden": "true"
128
- }), /* @__PURE__ */ h("h1", {
129
- id: "store-submission-heading",
130
- className: "text-xl font-semibold text-text-primary",
131
- children: T("devportal.storeSubmission.title", "Store submission")
176
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h2", {
177
+ id: "unlist-dialog-title",
178
+ className: "text-base font-semibold text-text-primary",
179
+ children: O("devportal.storeSubmission.unlistTitle", "Unlist from marketplace?")
180
+ }), /* @__PURE__ */ g("p", {
181
+ className: "mt-1 text-sm text-text-secondary",
182
+ children: O("devportal.storeSubmission.unlistDescription", "Your app will no longer appear in the marketplace for new users. Existing installations are not affected — users who already have it installed can continue using it.")
183
+ })] })]
184
+ }), /* @__PURE__ */ _("div", {
185
+ className: "flex justify-end gap-3",
186
+ children: [/* @__PURE__ */ g("button", {
187
+ type: "button",
188
+ onClick: () => V(!1),
189
+ className: "rounded-md border border-border-default px-4 py-2 text-sm font-medium text-text-secondary hover:bg-surface-hover",
190
+ children: O("devportal.common.cancel", "Cancel")
191
+ }), /* @__PURE__ */ _("button", {
192
+ type: "button",
193
+ onClick: () => void J(),
194
+ disabled: R,
195
+ className: "inline-flex items-center gap-2 rounded-md bg-surface-danger px-4 py-2 text-sm font-semibold text-text-on-danger hover:opacity-90 disabled:opacity-60",
196
+ children: [R && /* @__PURE__ */ g(d, {
197
+ className: "h-4 w-4 animate-spin",
198
+ "aria-hidden": "true"
199
+ }), O("devportal.storeSubmission.confirmUnlist", "Unlist app")]
132
200
  })]
133
201
  })]
134
202
  })
135
- })
136
- }), /* @__PURE__ */ g("div", {
137
- className: "mx-auto max-w-3xl px-6 py-6",
138
- children: [
139
- /* @__PURE__ */ h(v, {
140
- className: "mb-5",
141
- children: T("devportal.storeSubmission.purpose", "Finalize the details the marketplace needs before your app can be reviewed — pricing, categories, and required assets. Completing this is what makes the app eligible to submit for publication.")
142
- }),
143
- j && /* @__PURE__ */ h("div", {
144
- role: "alert",
145
- className: "mb-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
146
- children: j
147
- }),
148
- k && !D ? /* @__PURE__ */ h("div", {
149
- className: "py-16 text-center text-text-secondary",
150
- role: "status",
151
- "aria-live": "polite",
152
- children: T("devportal.storeSubmission.loading", "Loading application…")
153
- }) : D ? /* @__PURE__ */ g("div", {
154
- className: "space-y-4",
155
- children: [
156
- /* @__PURE__ */ h("div", {
157
- className: "rounded-lg border border-border-default bg-surface-raised p-4",
158
- children: /* @__PURE__ */ g("div", {
159
- className: "flex items-center gap-3",
203
+ }),
204
+ /* @__PURE__ */ _("div", {
205
+ className: "mx-auto max-w-3xl px-6 py-6",
206
+ children: [
207
+ (M || !Y || X === "UNKNOWN" || X === "DRAFT" || X === "REJECTED") && /* @__PURE__ */ g(y, {
208
+ className: "mb-5",
209
+ children: O("devportal.storeSubmission.purpose", "Finalize the details the marketplace needs before your app can be reviewed — pricing, categories, and required assets. Completing this is what makes the app eligible to submit for publication.")
210
+ }),
211
+ P && /* @__PURE__ */ g("div", {
212
+ role: "alert",
213
+ className: "mb-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
214
+ children: P
215
+ }),
216
+ M && !A ? /* @__PURE__ */ g("div", {
217
+ className: "py-16 text-center text-text-secondary",
218
+ role: "status",
219
+ "aria-live": "polite",
220
+ children: O("devportal.storeSubmission.loading", "Loading application…")
221
+ }) : A ? /* @__PURE__ */ _("div", {
222
+ className: "space-y-4",
223
+ children: [
224
+ /* @__PURE__ */ g("div", {
225
+ className: "rounded-lg border border-border-default bg-surface-raised p-4",
226
+ children: /* @__PURE__ */ _("div", {
227
+ className: "flex items-center gap-3",
228
+ children: [
229
+ A.iconUrl ? /* @__PURE__ */ g("img", {
230
+ src: A.iconUrl,
231
+ alt: "",
232
+ className: "h-14 w-14 flex-shrink-0 rounded-md object-cover"
233
+ }) : /* @__PURE__ */ g("div", {
234
+ className: "flex h-14 w-14 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-text-secondary text-sm font-medium",
235
+ children: A.name.slice(0, 2).toUpperCase()
236
+ }),
237
+ /* @__PURE__ */ _("div", {
238
+ className: "min-w-0 flex-1",
239
+ children: [/* @__PURE__ */ g("h2", {
240
+ className: "text-lg font-semibold text-text-primary",
241
+ children: A.name
242
+ }), /* @__PURE__ */ g("p", {
243
+ className: "font-mono text-xs text-text-tertiary",
244
+ children: A.slug
245
+ })]
246
+ }),
247
+ /* @__PURE__ */ _("div", {
248
+ className: `flex items-center gap-1.5 ${Z.tone}`,
249
+ role: "status",
250
+ children: [/* @__PURE__ */ g(Q, {
251
+ className: "h-5 w-5",
252
+ "aria-hidden": "true"
253
+ }), /* @__PURE__ */ g("span", {
254
+ className: "text-sm font-medium",
255
+ children: O(Z.i18nKey, Z.fallback)
256
+ })]
257
+ })
258
+ ]
259
+ })
260
+ }),
261
+ X === "PENDING_REVIEW" && /* @__PURE__ */ _("div", {
262
+ className: "rounded-lg border border-primary/20 bg-action-primary-bg/5 p-5 space-y-4",
160
263
  children: [
161
- D.iconUrl ? /* @__PURE__ */ h("img", {
162
- src: D.iconUrl,
163
- alt: "",
164
- className: "h-14 w-14 flex-shrink-0 rounded-md object-cover"
165
- }) : /* @__PURE__ */ h("div", {
166
- className: "flex h-14 w-14 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-text-secondary",
167
- children: D.name.slice(0, 2).toUpperCase()
168
- }),
169
- /* @__PURE__ */ g("div", {
170
- className: "min-w-0 flex-1",
171
- children: [/* @__PURE__ */ h("h2", {
172
- className: "text-lg font-semibold text-text-primary",
173
- children: D.name
174
- }), /* @__PURE__ */ h("p", {
175
- className: "font-mono text-xs text-text-tertiary",
176
- children: D.slug
177
- })]
178
- }),
179
- /* @__PURE__ */ g("div", {
180
- className: `flex items-center gap-1.5 ${B.tone}`,
181
- role: "status",
182
- children: [/* @__PURE__ */ h(V, {
183
- className: "h-5 w-5",
264
+ /* @__PURE__ */ _("div", {
265
+ className: "flex items-start gap-3",
266
+ children: [/* @__PURE__ */ g(l, {
267
+ className: "h-5 w-5 mt-0.5 shrink-0 text-primary",
184
268
  "aria-hidden": "true"
185
- }), /* @__PURE__ */ h("span", {
186
- className: "text-sm font-medium",
187
- children: T(B.i18nKey, B.fallback)
188
- })]
189
- })
190
- ]
191
- })
192
- }),
193
- z && z.status !== "UNKNOWN" && /* @__PURE__ */ g("div", {
194
- className: "rounded-lg border border-border-default bg-surface-raised p-4",
195
- children: [
196
- /* @__PURE__ */ h("h3", {
197
- className: "mb-3 text-sm font-semibold text-text-primary",
198
- children: T("devportal.storeSubmission.timeline", "Submission timeline")
199
- }),
200
- /* @__PURE__ */ g("ul", {
201
- className: "space-y-2 text-sm",
202
- children: [
203
- z.submittedAt && /* @__PURE__ */ g("li", {
204
- className: "flex items-center gap-2",
269
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
270
+ className: "text-sm font-semibold text-text-primary",
271
+ children: O("devportal.storeSubmission.underReview", "Your app is under review")
272
+ }), A.submittedAt && /* @__PURE__ */ _("p", {
273
+ className: "mt-0.5 text-xs text-text-secondary",
205
274
  children: [
206
- /* @__PURE__ */ h(l, {
207
- className: "h-4 w-4 text-text-tertiary",
208
- "aria-hidden": "true"
209
- }),
210
- /* @__PURE__ */ h("span", {
211
- className: "text-text-secondary",
212
- children: T("devportal.storeSubmission.submitted", "Submitted:")
213
- }),
214
- /* @__PURE__ */ h("span", {
215
- className: "text-text-primary",
216
- children: new Date(z.submittedAt).toLocaleString()
217
- })
275
+ O("devportal.storeSubmission.submittedOn", "Submitted on"),
276
+ " ",
277
+ new Date(A.submittedAt).toLocaleString()
218
278
  ]
219
- }),
220
- z.reviewedAt && /* @__PURE__ */ g("li", {
221
- className: "flex items-center gap-2",
279
+ })] })]
280
+ }),
281
+ /* @__PURE__ */ _("div", {
282
+ className: "border-t border-border-default pt-4",
283
+ children: [/* @__PURE__ */ g("p", {
284
+ className: "text-xs font-medium text-text-secondary mb-3",
285
+ children: O("devportal.storeSubmission.whatNext", "What happens next")
286
+ }), /* @__PURE__ */ _("ol", {
287
+ className: "space-y-2.5 text-sm text-text-secondary",
222
288
  children: [
223
- /* @__PURE__ */ h(c, {
224
- className: "h-4 w-4 text-text-tertiary",
225
- "aria-hidden": "true"
289
+ /* @__PURE__ */ _("li", {
290
+ className: "flex items-start gap-2",
291
+ children: [/* @__PURE__ */ g("span", {
292
+ className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-surface-muted text-xs font-medium text-text-tertiary",
293
+ children: "1"
294
+ }), "Our team reviews your app's listing, assets, and compliance."]
226
295
  }),
227
- /* @__PURE__ */ h("span", {
228
- className: "text-text-secondary",
229
- children: T("devportal.storeSubmission.reviewed", "Reviewed:")
296
+ /* @__PURE__ */ _("li", {
297
+ className: "flex items-start gap-2",
298
+ children: [/* @__PURE__ */ g("span", {
299
+ className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-surface-muted text-xs font-medium text-text-tertiary",
300
+ children: "2"
301
+ }), "You'll receive a notification when a decision is made."]
230
302
  }),
231
- /* @__PURE__ */ h("span", {
232
- className: "text-text-primary",
233
- children: new Date(z.reviewedAt).toLocaleString()
303
+ /* @__PURE__ */ _("li", {
304
+ className: "flex items-start gap-2",
305
+ children: [/* @__PURE__ */ g("span", {
306
+ className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-surface-muted text-xs font-medium text-text-tertiary",
307
+ children: "3"
308
+ }), "If approved, your app goes live in the marketplace automatically."]
234
309
  })
235
310
  ]
236
- }),
237
- z.publishedAt && /* @__PURE__ */ g("li", {
238
- className: "flex items-center gap-2",
311
+ })]
312
+ }),
313
+ A.reviewNotes && /* @__PURE__ */ _("div", {
314
+ className: "border-t border-border-default pt-4",
315
+ children: [/* @__PURE__ */ g("p", {
316
+ className: "text-xs font-medium text-text-secondary mb-1",
317
+ children: O("devportal.storeSubmission.reviewerNotes", "Reviewer notes")
318
+ }), /* @__PURE__ */ g("p", {
319
+ className: "text-sm text-text-primary",
320
+ children: A.reviewNotes
321
+ })]
322
+ })
323
+ ]
324
+ }),
325
+ X === "PUBLISHED" && /* @__PURE__ */ _("div", {
326
+ className: "rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-5 space-y-4",
327
+ children: [/* @__PURE__ */ _("div", {
328
+ className: "flex items-start gap-3",
329
+ children: [/* @__PURE__ */ g(c, {
330
+ className: "h-5 w-5 mt-0.5 shrink-0 text-status-success-text",
331
+ "aria-hidden": "true"
332
+ }), /* @__PURE__ */ _("div", {
333
+ className: "flex-1 min-w-0",
334
+ children: [/* @__PURE__ */ g("p", {
335
+ className: "text-sm font-semibold text-status-success-text",
336
+ children: O("devportal.storeSubmission.publishedTitle", "Your app is live in the marketplace")
337
+ }), Y?.publishedAt && /* @__PURE__ */ _("p", {
338
+ className: "mt-0.5 text-xs text-text-secondary",
239
339
  children: [
240
- /* @__PURE__ */ h(c, {
241
- className: "h-4 w-4 text-status-success-text",
242
- "aria-hidden": "true"
243
- }),
244
- /* @__PURE__ */ h("span", {
245
- className: "text-text-secondary",
246
- children: T("devportal.storeSubmission.published", "Published:")
247
- }),
248
- /* @__PURE__ */ h("span", {
249
- className: "text-text-primary",
250
- children: new Date(z.publishedAt).toLocaleString()
251
- })
340
+ O("devportal.storeSubmission.publishedOn", "Published on"),
341
+ " ",
342
+ new Date(Y.publishedAt).toLocaleString()
252
343
  ]
253
- })
254
- ]
255
- }),
256
- z.reviewNotes && /* @__PURE__ */ g("div", {
257
- className: "mt-3 rounded-md bg-surface-muted p-3",
258
- children: [/* @__PURE__ */ h("p", {
259
- className: "text-xs font-medium text-text-secondary",
260
- children: T("devportal.storeSubmission.reviewerNotes", "Reviewer notes")
261
- }), /* @__PURE__ */ h("p", {
262
- className: "mt-1 text-sm text-text-primary",
263
- children: z.reviewNotes
344
+ })]
264
345
  })]
265
- }),
266
- z.rejectedReason && /* @__PURE__ */ g("div", {
267
- className: "mt-3 rounded-md border border-border-danger bg-surface-danger-muted p-3",
268
- role: "alert",
269
- children: [/* @__PURE__ */ h("p", {
270
- className: "text-xs font-medium text-text-danger",
271
- children: T("devportal.storeSubmission.rejectionReason", "Rejection reason")
272
- }), /* @__PURE__ */ h("p", {
273
- className: "mt-1 text-sm text-text-primary",
274
- children: z.rejectedReason
346
+ }), Y?.productId && /* @__PURE__ */ _("div", {
347
+ className: "border-t border-status-success-bg pt-4",
348
+ children: [/* @__PURE__ */ g("p", {
349
+ className: "mb-2 text-xs text-text-secondary",
350
+ children: O("devportal.storeSubmission.unlistHint", "Need to remove this app from the marketplace? Unlisting hides it from new users while keeping existing installations active.")
351
+ }), /* @__PURE__ */ _("button", {
352
+ type: "button",
353
+ onClick: () => V(!0),
354
+ className: "inline-flex items-center gap-2 rounded-md border border-border-default bg-surface-raised px-3 py-1.5 text-sm font-medium text-text-secondary hover:bg-surface-hover hover:text-text-primary",
355
+ children: [/* @__PURE__ */ g(u, {
356
+ className: "h-4 w-4",
357
+ "aria-hidden": "true"
358
+ }), O("devportal.storeSubmission.unlistButton", "Unlist from marketplace")]
275
359
  })]
276
- })
277
- ]
278
- }),
279
- (!z || z.status === "UNKNOWN" || z.status === "DRAFT" || z.status === "REJECTED") && /* @__PURE__ */ g("div", {
280
- className: "rounded-lg border border-border-default bg-surface-raised p-4",
281
- children: [
282
- /* @__PURE__ */ h("h3", {
283
- className: "mb-2 text-sm font-semibold text-text-primary",
284
- children: z?.status === "REJECTED" ? T("devportal.storeSubmission.resubmitForReview", "Resubmit for review") : T("devportal.storeSubmission.submitForReview", "Submit for review")
285
- }),
286
- /* @__PURE__ */ h("p", {
287
- className: "mb-3 text-sm text-text-secondary",
288
- children: T("devportal.storeSubmission.help", "Your application will be sent to the store's review queue. Whether it's auto-published or requires admin approval depends on the target store's configuration.")
289
- }),
290
- /* @__PURE__ */ h("label", {
291
- className: "block",
292
- htmlFor: "store-submission-notes",
293
- children: /* @__PURE__ */ h("span", {
294
- className: "sr-only",
295
- children: T("devportal.storeSubmission.notesLabel", "Notes for the reviewer (optional)")
296
- })
297
- }),
298
- /* @__PURE__ */ h("textarea", {
299
- id: "store-submission-notes",
300
- value: F,
301
- onChange: (e) => I(e.target.value),
302
- rows: 3,
303
- placeholder: T("devportal.storeSubmission.notesLabel", "Notes for the reviewer (optional)"),
304
- className: "mb-3 w-full rounded-md border border-border-default bg-surface-default px-3 py-2 text-sm text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
305
- }),
306
- /* @__PURE__ */ g("button", {
307
- type: "button",
308
- onClick: () => void R(),
309
- disabled: N || !E.allowed,
310
- "aria-disabled": N || !E.allowed,
311
- title: E.allowed ? void 0 : T("devportal.common.noPermission", "You do not have permission to perform this action"),
312
- className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text hover:opacity-90 disabled:opacity-60 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
313
- children: [N && /* @__PURE__ */ h(u, {
314
- className: "h-4 w-4 animate-spin",
360
+ })]
361
+ }),
362
+ X === "UNLISTED" && /* @__PURE__ */ _("div", {
363
+ className: "rounded-lg border border-border-default bg-surface-muted p-5 flex items-start gap-3",
364
+ children: [/* @__PURE__ */ g(u, {
365
+ className: "h-5 w-5 mt-0.5 shrink-0 text-text-secondary",
366
+ "aria-hidden": "true"
367
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
368
+ className: "text-sm font-semibold text-text-primary",
369
+ children: O("devportal.storeSubmission.unlistedTitle", "Your app has been unlisted")
370
+ }), /* @__PURE__ */ g("p", {
371
+ className: "mt-0.5 text-xs text-text-secondary",
372
+ children: O("devportal.storeSubmission.unlistedDescription", "It no longer appears in the marketplace for new users. Existing installations remain active and unaffected.")
373
+ })] })]
374
+ }),
375
+ X === "REJECTED" && /* @__PURE__ */ _("div", {
376
+ className: "rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-5 space-y-3",
377
+ children: [/* @__PURE__ */ _("div", {
378
+ className: "flex items-start gap-3",
379
+ children: [/* @__PURE__ */ g(p, {
380
+ className: "h-5 w-5 mt-0.5 shrink-0 text-status-error-text",
315
381
  "aria-hidden": "true"
316
- }), z?.status === "REJECTED" ? T("devportal.storeSubmission.resubmit", "Resubmit") : T("devportal.storeSubmission.submitForReview", "Submit for review")]
317
- })
318
- ]
319
- }),
320
- z?.productId && /* @__PURE__ */ g("div", {
321
- className: "rounded-lg border border-border-default bg-surface-raised p-4",
322
- children: [/* @__PURE__ */ h("p", {
323
- className: "text-xs font-medium text-text-secondary",
324
- children: T("devportal.storeSubmission.storeProductId", "Store product ID")
325
- }), /* @__PURE__ */ h("code", {
326
- className: "mt-1 block break-all font-mono text-xs text-text-primary",
327
- children: z.productId
328
- })]
329
- })
330
- ]
331
- }) : /* @__PURE__ */ h(_, {
332
- illustration: "empty-generic",
333
- title: T("devportal.storeSubmission.notFoundTitle", "Application not found"),
334
- description: T("devportal.storeSubmission.notFound", "Application not found.")
335
- })
336
- ]
337
- })]
382
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
383
+ className: "text-sm font-semibold text-status-error-text",
384
+ children: O("devportal.storeSubmission.rejectedTitle", "Submission was not approved")
385
+ }), /* @__PURE__ */ g("p", {
386
+ className: "mt-0.5 text-xs text-text-secondary",
387
+ children: O("devportal.storeSubmission.rejectedHint", "Address the feedback below and resubmit.")
388
+ })] })]
389
+ }), A.reviewNotes && /* @__PURE__ */ _("div", {
390
+ className: "rounded-md bg-surface-muted p-3",
391
+ children: [/* @__PURE__ */ g("p", {
392
+ className: "text-xs font-medium text-text-secondary mb-1",
393
+ children: O("devportal.storeSubmission.reviewerFeedback", "Reviewer feedback")
394
+ }), /* @__PURE__ */ g("p", {
395
+ className: "text-sm text-text-primary",
396
+ children: A.reviewNotes
397
+ })]
398
+ })]
399
+ }),
400
+ (X === "UNKNOWN" || X === "DRAFT" || X === "REJECTED") && /* @__PURE__ */ _("div", {
401
+ className: "rounded-lg border border-border-default bg-surface-raised p-4",
402
+ children: [
403
+ /* @__PURE__ */ g("h3", {
404
+ className: "mb-2 text-sm font-semibold text-text-primary",
405
+ children: X === "REJECTED" ? O("devportal.storeSubmission.resubmitForReview", "Resubmit for review") : O("devportal.storeSubmission.submitForReview", "Submit for review")
406
+ }),
407
+ /* @__PURE__ */ g("p", {
408
+ className: "mb-3 text-sm text-text-secondary",
409
+ children: O("devportal.storeSubmission.help", "Your application will be sent to the store's review queue. Whether it's auto-published or requires admin approval depends on the target store's configuration.")
410
+ }),
411
+ /* @__PURE__ */ g("label", {
412
+ className: "block",
413
+ htmlFor: "store-submission-notes",
414
+ children: /* @__PURE__ */ g("span", {
415
+ className: "sr-only",
416
+ children: O("devportal.storeSubmission.notesLabel", "Notes for the reviewer (optional)")
417
+ })
418
+ }),
419
+ /* @__PURE__ */ g("textarea", {
420
+ id: "store-submission-notes",
421
+ value: W,
422
+ onChange: (e) => G(e.target.value),
423
+ rows: 3,
424
+ placeholder: O("devportal.storeSubmission.notesLabel", "Notes for the reviewer (optional)"),
425
+ className: "mb-3 w-full rounded-md border border-border-default bg-surface-default px-3 py-2 text-sm text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"
426
+ }),
427
+ /* @__PURE__ */ _("button", {
428
+ type: "button",
429
+ onClick: () => void q(),
430
+ disabled: I || !k.allowed,
431
+ "aria-disabled": I || !k.allowed,
432
+ title: k.allowed ? void 0 : O("devportal.common.noPermission", "You do not have permission to perform this action"),
433
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text hover:opacity-90 disabled:opacity-60 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
434
+ children: [I && /* @__PURE__ */ g(d, {
435
+ className: "h-4 w-4 animate-spin",
436
+ "aria-hidden": "true"
437
+ }), X === "REJECTED" ? O("devportal.storeSubmission.resubmit", "Resubmit") : O("devportal.storeSubmission.submitForReview", "Submit for review")]
438
+ })
439
+ ]
440
+ }),
441
+ Y?.productId && /* @__PURE__ */ _("div", {
442
+ className: "rounded-lg border border-border-default bg-surface-raised p-4",
443
+ children: [/* @__PURE__ */ g("p", {
444
+ className: "text-xs font-medium text-text-secondary",
445
+ children: O("devportal.storeSubmission.storeProductId", "Store product ID")
446
+ }), /* @__PURE__ */ g("code", {
447
+ className: "mt-1 block break-all font-mono text-xs text-text-primary",
448
+ children: Y.productId
449
+ })]
450
+ })
451
+ ]
452
+ }) : /* @__PURE__ */ g(v, {
453
+ illustration: "empty-generic",
454
+ title: O("devportal.storeSubmission.notFoundTitle", "Application not found"),
455
+ description: O("devportal.storeSubmission.notFound", "Application not found.")
456
+ })
457
+ ]
458
+ })
459
+ ]
338
460
  });
339
461
  };
340
462
  //#endregion
341
- export { w as StoreSubmissionPage };
463
+ export { E as StoreSubmissionPage };
342
464
 
343
465
  //# sourceMappingURL=StoreSubmissionPage.js.map