@burdenoff/microfe-devportal 2026.624.18 → 2026.624.21

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.
@@ -1,118 +1,144 @@
1
1
  import { useDevportal as e } from "../providers/DevportalProvider.js";
2
- import { useGetApplicationQuery as t, useSubmitApplicationMutation as n } from "../../generated/global-operations.js";
3
- import { PageLayout as r, PageSection as i } from "../components/PageLayout.js";
4
- import { Alert as a } from "../components/ConfirmDialog.js";
5
- import { PermissionGuard as o } from "../components/PermissionGuard.js";
2
+ import { useGetApplicationQuery as t, useSubmitApplicationForReviewMutation as n, useSubmitApplicationMutation as r } from "../../generated/global-operations.js";
3
+ import { PageLayout as i, PageSection as a } from "../components/PageLayout.js";
4
+ import { Alert as o } from "../components/ConfirmDialog.js";
5
+ import { PermissionGuard as s } from "../components/PermissionGuard.js";
6
6
  import "../components/index.js";
7
- import { DEVPORTAL_PERMISSIONS as s } from "../constants/permissions.js";
8
- import { useDevportalPermission as c } from "../hooks/usePermission.js";
7
+ import { DEVPORTAL_PERMISSIONS as c } from "../constants/permissions.js";
8
+ import { useDevportalPermission as ee } from "../hooks/usePermission.js";
9
9
  import "../hooks/index.js";
10
- import { useEffect as l, useMemo as u, useState as d } from "react";
11
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { AlertTriangle as p, CheckCircle as m, Eye as h, FileText as g, Globe as _, Image as v, Loader2 as y, Send as b, Shield as x, XCircle as S } from "lucide-react";
13
- import { useParams as C } from "react-router-dom";
14
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
10
+ import { useEffect as te, useMemo as l, useState as u } from "react";
11
+ import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { AlertTriangle as d, ArrowRight as f, CheckCircle as p, Eye as m, FileText as h, Globe as re, Image as g, Loader2 as _, PartyPopper as ie, Send as ae, Shield as oe, XCircle as v } from "lucide-react";
13
+ import { useParams as se } from "react-router-dom";
14
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ import { gql as S } from "@apollo/client";
16
+ import { useQuery as C } from "@apollo/client/react";
15
17
  //#region src/devportal/pages/PublishPage.tsx
16
- var D = [
18
+ var w = S`query PublishPagePublisher { myPublisher { id } }`, T = S`
19
+ query PublishPageProducts($publisherId: String!) {
20
+ products(filter: { publisherId: $publisherId }) { id productId }
21
+ }
22
+ `, E = [
17
23
  "SUBMITTED",
18
24
  "IN_REVIEW",
19
25
  "APPROVED",
20
26
  "PUBLISHED"
21
- ], O = () => {
22
- let { appId: O } = C(), { navigate: k, basePath: A } = e(), { t: j } = f(), M = (e, t) => {
23
- let n = j(e);
27
+ ], D = () => {
28
+ let { appId: S } = se(), { navigate: D, basePath: O } = e(), { t: ce } = ne(), k = (e, t) => {
29
+ let n = ce(e);
24
30
  return n === e ? t : n;
25
- }, [N, P] = d(!1), [F, I] = d(null), [L, R] = d(""), z = c(s.APP_SUBMIT), { data: B, loading: V, error: H } = t({
26
- variables: { id: O },
27
- skip: !O,
31
+ }, [A, j] = u(!1), [M, N] = u(null), [P, F] = u(!1), [I, L] = u(""), R = ee(c.APP_SUBMIT), { data: z, loading: B, error: V } = t({
32
+ variables: { id: S },
33
+ skip: !S,
28
34
  fetchPolicy: "network-only"
29
- }), [U] = n(), W = B?.application;
30
- l(() => {
31
- let e = W?.name;
32
- if (!O || !e) return;
35
+ }), [H] = r(), [U] = n(), { data: W } = C(w, { fetchPolicy: "cache-first" }), G = W?.myPublisher?.id ?? null, { data: le } = C(T, {
36
+ variables: { publisherId: G ?? "" },
37
+ skip: !G,
38
+ fetchPolicy: "cache-first"
39
+ });
40
+ le?.products?.find((e) => e.productId === S)?.id;
41
+ let K = z?.application;
42
+ te(() => {
43
+ let e = K?.name;
44
+ if (!S || !e) return;
33
45
  let t = window.__breadcrumbRegistry;
34
- return t?.register(O, e), () => t?.unregister(O);
35
- }, [O, W?.name]);
36
- let G = D.includes(W?.status ?? ""), K = W?.appType === "NODE" || W?.appType === "WORKFLOW", q = W?.versions?.totalCount ?? 0, J = u(() => {
37
- if (!W) return [];
38
- let e = W.screenshots?.length ?? 0, t = [
46
+ return t?.register(S, e), () => t?.unregister(S);
47
+ }, [S, K?.name]);
48
+ let q = E.includes(K?.status ?? ""), J = K?.appType === "NODE" || K?.appType === "WORKFLOW", Y = K?.versions?.totalCount ?? 0, X = l(() => {
49
+ if (!K) return [];
50
+ let e = K.screenshots?.length ?? 0, t = `/apps/${S}?tab=store-listing`, n = `/apps/${S}/versions`, r = [
39
51
  {
40
52
  id: "name",
41
- label: M("devportal.checklistNameLabel", "Name & Short Description"),
42
- description: M("devportal.checklistNameDesc", "Name and short description are required for the store card"),
43
- status: W.name && W.shortDescription ? "passed" : "failed",
44
- icon: /* @__PURE__ */ T(g, { size: 20 })
53
+ label: k("devportal.checklistNameLabel", "Name & Short Description"),
54
+ description: k("devportal.checklistNameDesc", "Name and short description are required for the store card"),
55
+ status: K.name && K.shortDescription ? "passed" : "failed",
56
+ icon: /* @__PURE__ */ b(h, { size: 20 }),
57
+ actionLabel: "Edit store listing →",
58
+ actionPath: t
45
59
  },
46
60
  {
47
61
  id: "category",
48
- label: M("devportal.checklistCategoryLabel", "Category"),
49
- description: M("devportal.checklistCategoryDesc", "A category helps users find your item in the marketplace"),
50
- status: W.category ? "passed" : "failed",
51
- icon: /* @__PURE__ */ T(_, { size: 20 })
62
+ label: k("devportal.checklistCategoryLabel", "Category"),
63
+ description: k("devportal.checklistCategoryDesc", "A category helps users find your item in the marketplace"),
64
+ status: K.category ? "passed" : "failed",
65
+ icon: /* @__PURE__ */ b(re, { size: 20 }),
66
+ actionLabel: "Edit store listing →",
67
+ actionPath: t
52
68
  },
53
69
  {
54
70
  id: "privacy",
55
- label: M("devportal.checklistPrivacyLabel", "Privacy Policy"),
56
- description: M("devportal.checklistPrivacyDesc", "Privacy policy URL is required for store submission"),
57
- status: W.privacyPolicyUrl ? "passed" : "failed",
58
- icon: /* @__PURE__ */ T(x, { size: 20 })
71
+ label: k("devportal.checklistPrivacyLabel", "Privacy Policy"),
72
+ description: k("devportal.checklistPrivacyDesc", "Privacy policy URL is required for store submission"),
73
+ status: K.privacyPolicyUrl ? "passed" : "failed",
74
+ icon: /* @__PURE__ */ b(oe, { size: 20 }),
75
+ actionLabel: "Edit store listing →",
76
+ actionPath: t
59
77
  },
60
78
  {
61
79
  id: "terms",
62
- label: M("devportal.checklistTermsLabel", "Terms of Service"),
63
- description: M("devportal.checklistTermsDesc", "Terms of service URL is required for store submission"),
64
- status: W.termsOfServiceUrl ? "passed" : "failed",
65
- icon: /* @__PURE__ */ T(g, { size: 20 })
80
+ label: k("devportal.checklistTermsLabel", "Terms of Service"),
81
+ description: k("devportal.checklistTermsDesc", "Terms of service URL is required for store submission"),
82
+ status: K.termsOfServiceUrl ? "passed" : "failed",
83
+ icon: /* @__PURE__ */ b(h, { size: 20 }),
84
+ actionLabel: "Edit store listing →",
85
+ actionPath: t
66
86
  },
67
87
  {
68
88
  id: "icon",
69
- label: M("devportal.checklistIconLabel", "App Icon"),
70
- description: M("devportal.checklistIconDesc", "An icon makes your listing stand out in the marketplace"),
71
- status: W.iconUrl ? "passed" : "warning",
72
- icon: /* @__PURE__ */ T(v, { size: 20 })
89
+ label: k("devportal.checklistIconLabel", "App Icon"),
90
+ description: k("devportal.checklistIconDesc", "An icon makes your listing stand out in the marketplace"),
91
+ status: K.iconUrl ? "passed" : "warning",
92
+ icon: /* @__PURE__ */ b(g, { size: 20 }),
93
+ actionLabel: "Edit store listing →",
94
+ actionPath: t
73
95
  },
74
96
  {
75
97
  id: "screenshots",
76
- label: M("devportal.checklistScreenshotsLabel", "Screenshots"),
77
- description: M("devportal.checklistScreenshotsDesc", "At least 3 screenshots are recommended"),
98
+ label: k("devportal.checklistScreenshotsLabel", "Screenshots"),
99
+ description: k("devportal.checklistScreenshotsDesc", "At least 3 screenshots are recommended"),
78
100
  status: e >= 3 ? "passed" : "warning",
79
- icon: /* @__PURE__ */ T(v, { size: 20 })
101
+ icon: /* @__PURE__ */ b(g, { size: 20 }),
102
+ actionLabel: "Edit store listing →",
103
+ actionPath: t
80
104
  }
81
105
  ];
82
- return K && t.push({
106
+ return J && r.push({
83
107
  id: "version",
84
- label: M("devportal.checklistVersionLabel", "Published Version"),
85
- description: M("devportal.checklistVersionDesc", "At least one published version (ZIP + manifest) is required before submitting a NODE or WORKFLOW to the store"),
86
- status: q > 0 ? "passed" : "failed",
87
- icon: /* @__PURE__ */ T(m, { size: 20 })
88
- }), t.push({
108
+ label: k("devportal.checklistVersionLabel", "Published Version"),
109
+ description: k("devportal.checklistVersionDesc", K?.appType === "WORKFLOW" ? "At least one published version (manifest JSON) is required before submitting to the store" : "At least one published version (ZIP + manifest) is required before submitting to the store"),
110
+ status: Y > 0 ? "passed" : "failed",
111
+ icon: /* @__PURE__ */ b(p, { size: 20 }),
112
+ actionLabel: "Create a version →",
113
+ actionPath: n
114
+ }), r.push({
89
115
  id: "status",
90
- label: M("devportal.checklistStatusLabel", "App Status"),
91
- description: M("devportal.checklistStatusDesc", "App must be in DRAFT or REJECTED state to submit"),
92
- status: ["DRAFT", "REJECTED"].includes(W.status ?? "") ? "passed" : "warning",
93
- icon: /* @__PURE__ */ T(m, { size: 20 })
94
- }), t;
116
+ label: k("devportal.checklistStatusLabel", "App Status"),
117
+ description: k("devportal.checklistStatusDesc", "App must be in DRAFT or REJECTED state to submit"),
118
+ status: ["DRAFT", "REJECTED"].includes(K.status ?? "") ? "passed" : "warning",
119
+ icon: /* @__PURE__ */ b(p, { size: 20 })
120
+ }), r;
95
121
  }, [
96
- W,
97
122
  K,
98
- q
99
- ]), Y = J.filter((e) => e.status === "passed").length, X = J.filter((e) => e.status === "failed").length, Z = J.filter((e) => e.status === "warning").length, Q = ["DRAFT", "REJECTED"].includes(W?.status ?? ""), $ = !V && !H && X === 0 && !!W && !G && Q, ee = (e) => {
123
+ J,
124
+ Y
125
+ ]), ue = X.filter((e) => e.status === "passed").length, Z = X.filter((e) => e.status === "failed").length, Q = X.filter((e) => e.status === "warning").length, de = ["DRAFT", "REJECTED"].includes(K?.status ?? ""), $ = !B && !V && Z === 0 && !!K && !q && de, fe = (e) => {
100
126
  switch (e) {
101
- case "passed": return /* @__PURE__ */ T(m, {
127
+ case "passed": return /* @__PURE__ */ b(p, {
102
128
  size: 20,
103
129
  className: "text-status-success-text"
104
130
  });
105
- case "failed": return /* @__PURE__ */ T(S, {
131
+ case "failed": return /* @__PURE__ */ b(v, {
106
132
  size: 20,
107
133
  className: "text-status-error-text"
108
134
  });
109
- case "warning": return /* @__PURE__ */ T(p, {
135
+ case "warning": return /* @__PURE__ */ b(d, {
110
136
  size: 20,
111
137
  className: "text-status-warning-text"
112
138
  });
113
- default: return /* @__PURE__ */ T("div", { className: "h-5 w-5 rounded-full border-2 border-border-default" });
139
+ default: return /* @__PURE__ */ b("div", { className: "h-5 w-5 rounded-full border-2 border-border-default" });
114
140
  }
115
- }, te = (e) => {
141
+ }, pe = (e) => {
116
142
  switch (e) {
117
143
  case "passed": return "bg-status-success-bg-subtle border-border-subtle";
118
144
  case "failed": return "bg-status-error-bg-subtle border-border-subtle";
@@ -120,246 +146,330 @@ var D = [
120
146
  default: return "bg-bg-canvas border-border-subtle";
121
147
  }
122
148
  };
123
- return V ? /* @__PURE__ */ T(r, {
124
- title: M("devportal.publishToStoreTitle", "Publish to Store"),
125
- description: M("devportal.loadingApplicationDetails", "Loading application details..."),
126
- backLink: `/apps/${O}`,
127
- backLabel: M("devportal.backToApplication", "Back to Application"),
128
- children: /* @__PURE__ */ T("div", {
149
+ return B ? /* @__PURE__ */ b(i, {
150
+ title: k("devportal.publishToStoreTitle", "Publish to Store"),
151
+ description: k("devportal.loadingApplicationDetails", "Loading application details..."),
152
+ backLink: `/apps/${S}`,
153
+ backLabel: k("devportal.backToApplication", "Back to Application"),
154
+ children: /* @__PURE__ */ b("div", {
129
155
  className: "flex items-center justify-center py-12",
130
- children: /* @__PURE__ */ T(y, { className: "animate-spin h-8 w-8 text-muted-foreground" })
156
+ children: /* @__PURE__ */ b(_, { className: "animate-spin h-8 w-8 text-muted-foreground" })
131
157
  })
132
- }) : H || !W ? /* @__PURE__ */ T(r, {
133
- title: M("devportal.publishToStoreTitle", "Publish to Store"),
134
- description: M("devportal.couldNotLoadApplication", "Could not load application"),
135
- backLink: `/apps/${O}`,
136
- backLabel: M("devportal.backToApplication", "Back to Application"),
137
- children: /* @__PURE__ */ T(a, {
158
+ }) : V || !K ? /* @__PURE__ */ b(i, {
159
+ title: k("devportal.publishToStoreTitle", "Publish to Store"),
160
+ description: k("devportal.couldNotLoadApplication", "Could not load application"),
161
+ backLink: `/apps/${S}`,
162
+ backLabel: k("devportal.backToApplication", "Back to Application"),
163
+ children: /* @__PURE__ */ b(o, {
138
164
  variant: "error",
139
- title: M("devportal.failedToLoadApplication", "Failed to load application"),
140
- children: H?.message ?? M("devportal.applicationNotFound", "Application not found")
165
+ title: k("devportal.failedToLoadApplication", "Failed to load application"),
166
+ children: V?.message ?? k("devportal.applicationNotFound", "Application not found")
167
+ })
168
+ }) : P ? /* @__PURE__ */ b(s, {
169
+ permission: c.APP_SUBMIT,
170
+ children: /* @__PURE__ */ b(i, {
171
+ title: k("devportal.publishToStoreTitle", "Publish to Store"),
172
+ backLink: `/apps/${S}`,
173
+ backLabel: k("devportal.backToApplication", "Back to Application"),
174
+ children: /* @__PURE__ */ x("div", {
175
+ className: "flex flex-col items-center justify-center py-16 gap-6 text-center",
176
+ children: [
177
+ /* @__PURE__ */ b("div", {
178
+ className: "rounded-full bg-status-success-bg p-4",
179
+ children: /* @__PURE__ */ b(ie, {
180
+ size: 40,
181
+ className: "text-status-success-text"
182
+ })
183
+ }),
184
+ /* @__PURE__ */ x("div", {
185
+ className: "space-y-2",
186
+ children: [/* @__PURE__ */ b("h2", {
187
+ className: "text-2xl font-bold",
188
+ children: k("devportal.submittedSuccessTitle", "Submitted for Review!")
189
+ }), /* @__PURE__ */ b("p", {
190
+ className: "text-muted-foreground max-w-md",
191
+ children: k("devportal.submittedSuccessMsg", "Your app has been submitted to the marketplace review queue. You'll receive email notifications as the review progresses — typically 3–5 business days.")
192
+ })]
193
+ }),
194
+ /* @__PURE__ */ x("div", {
195
+ className: "rounded-lg border bg-muted/40 px-6 py-4 text-sm text-left space-y-2 max-w-md w-full",
196
+ children: [/* @__PURE__ */ b("p", {
197
+ className: "font-medium",
198
+ children: "What happens next:"
199
+ }), /* @__PURE__ */ x("ul", {
200
+ className: "space-y-1 text-muted-foreground list-none",
201
+ children: [
202
+ /* @__PURE__ */ x("li", {
203
+ className: "flex items-start gap-2",
204
+ children: [/* @__PURE__ */ b(p, {
205
+ size: 14,
206
+ className: "mt-0.5 text-status-success-text shrink-0"
207
+ }), " Our team reviews your submission"]
208
+ }),
209
+ /* @__PURE__ */ x("li", {
210
+ className: "flex items-start gap-2",
211
+ children: [/* @__PURE__ */ b(p, {
212
+ size: 14,
213
+ className: "mt-0.5 text-status-success-text shrink-0"
214
+ }), " You'll get an email on approval or if changes are needed"]
215
+ }),
216
+ /* @__PURE__ */ x("li", {
217
+ className: "flex items-start gap-2",
218
+ children: [/* @__PURE__ */ b(p, {
219
+ size: 14,
220
+ className: "mt-0.5 text-status-success-text shrink-0"
221
+ }), " Once approved, your app goes live in the marketplace"]
222
+ })
223
+ ]
224
+ })]
225
+ }),
226
+ /* @__PURE__ */ b("button", {
227
+ onClick: () => D?.(`${O}/apps/${S}`),
228
+ className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted",
229
+ children: "Back to App"
230
+ })
231
+ ]
232
+ })
141
233
  })
142
- }) : /* @__PURE__ */ T(o, {
143
- permission: s.APP_SUBMIT,
144
- children: /* @__PURE__ */ E(r, {
145
- title: M("devportal.publishToStoreTitle", "Publish to Store"),
146
- description: `${M("devportal.submitAppForReview", "Submit")} "${W.name}" ${M("devportal.forReviewAndPublication", "for review and publication")}`,
147
- backLink: `/apps/${O}`,
148
- backLabel: M("devportal.backToApplication", "Back to Application"),
149
- actions: /* @__PURE__ */ E("button", {
150
- onClick: () => k?.(`${A}/apps/${O}/listing`),
234
+ }) : /* @__PURE__ */ b(s, {
235
+ permission: c.APP_SUBMIT,
236
+ children: /* @__PURE__ */ x(i, {
237
+ title: k("devportal.publishToStoreTitle", "Publish to Store"),
238
+ description: `${k("devportal.submitAppForReview", "Submit")} "${K.name}" ${k("devportal.forReviewAndPublication", "for review and publication")}`,
239
+ backLink: `/apps/${S}`,
240
+ backLabel: k("devportal.backToApplication", "Back to Application"),
241
+ actions: /* @__PURE__ */ x("button", {
242
+ onClick: () => D?.(`${O}/apps/${S}/listing`),
151
243
  className: "inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm font-medium hover:bg-muted",
152
- children: [/* @__PURE__ */ T(h, { size: 16 }), M("devportal.previewListing", "Preview Listing")]
244
+ children: [/* @__PURE__ */ b(m, { size: 16 }), k("devportal.previewListing", "Preview Listing")]
153
245
  }),
154
246
  children: [
155
- G && /* @__PURE__ */ E(a, {
247
+ q && /* @__PURE__ */ x(o, {
156
248
  variant: "warning",
157
- title: M("devportal.alreadySubmittedTitle", "Already Submitted"),
249
+ title: k("devportal.alreadySubmittedTitle", "Already Submitted"),
158
250
  children: [
159
- M("devportal.alreadySubmittedMsg1", "This app is currently in"),
251
+ k("devportal.alreadySubmittedMsg1", "This app is currently in"),
160
252
  " ",
161
- /* @__PURE__ */ T("strong", { children: W.status }),
253
+ /* @__PURE__ */ b("strong", { children: K.status }),
162
254
  " ",
163
- M("devportal.alreadySubmittedMsg2", "state and cannot be re-submitted until the review process is complete or the app is rejected.")
255
+ k("devportal.alreadySubmittedMsg2", "state and cannot be re-submitted until the review process is complete or the app is rejected.")
164
256
  ]
165
257
  }),
166
- /* @__PURE__ */ E("div", {
258
+ /* @__PURE__ */ x("div", {
167
259
  className: "rounded-lg border bg-card p-6",
168
260
  children: [
169
- /* @__PURE__ */ T("h2", {
261
+ /* @__PURE__ */ b("h2", {
170
262
  className: "text-lg font-semibold",
171
- children: M("devportal.preSubmissionChecklist", "Pre-submission Checklist")
263
+ children: k("devportal.preSubmissionChecklist", "Pre-submission Checklist")
172
264
  }),
173
- /* @__PURE__ */ T("p", {
265
+ /* @__PURE__ */ b("p", {
174
266
  className: "mt-1 text-sm text-muted-foreground",
175
- children: M("devportal.completeAllRequiredItems", "Complete all required items before submitting for review")
267
+ children: k("devportal.completeAllRequiredItems", "Complete all required items before submitting for review")
176
268
  }),
177
- /* @__PURE__ */ E("div", {
269
+ /* @__PURE__ */ x("div", {
178
270
  className: "mt-4 flex gap-6",
179
271
  children: [
180
- /* @__PURE__ */ E("div", {
272
+ /* @__PURE__ */ x("div", {
181
273
  className: "flex items-center gap-2",
182
- children: [/* @__PURE__ */ T(m, {
274
+ children: [/* @__PURE__ */ b(p, {
183
275
  size: 20,
184
276
  className: "text-status-success-text"
185
- }), /* @__PURE__ */ E("span", { children: [
186
- Y,
277
+ }), /* @__PURE__ */ x("span", { children: [
278
+ ue,
187
279
  " ",
188
- M("devportal.passed", "Passed")
280
+ k("devportal.passed", "Passed")
189
281
  ] })]
190
282
  }),
191
- /* @__PURE__ */ E("div", {
283
+ /* @__PURE__ */ x("div", {
192
284
  className: "flex items-center gap-2",
193
- children: [/* @__PURE__ */ T(S, {
285
+ children: [/* @__PURE__ */ b(v, {
194
286
  size: 20,
195
287
  className: "text-status-error-text"
196
- }), /* @__PURE__ */ E("span", { children: [
197
- X,
288
+ }), /* @__PURE__ */ x("span", { children: [
289
+ Z,
198
290
  " ",
199
- M("devportal.failed", "Failed")
291
+ k("devportal.failed", "Failed")
200
292
  ] })]
201
293
  }),
202
- /* @__PURE__ */ E("div", {
294
+ /* @__PURE__ */ x("div", {
203
295
  className: "flex items-center gap-2",
204
- children: [/* @__PURE__ */ T(p, {
296
+ children: [/* @__PURE__ */ b(d, {
205
297
  size: 20,
206
298
  className: "text-status-warning-text"
207
- }), /* @__PURE__ */ E("span", { children: [
208
- Z,
299
+ }), /* @__PURE__ */ x("span", { children: [
300
+ Q,
209
301
  " ",
210
- M("devportal.warnings", "Warnings")
302
+ k("devportal.warnings", "Warnings")
211
303
  ] })]
212
304
  })
213
305
  ]
214
306
  })
215
307
  ]
216
308
  }),
217
- /* @__PURE__ */ T(i, { children: /* @__PURE__ */ T("div", {
309
+ /* @__PURE__ */ b(a, { children: /* @__PURE__ */ b("div", {
218
310
  className: "space-y-3",
219
- children: J.map((e) => /* @__PURE__ */ E("div", {
220
- className: `flex items-center gap-4 rounded-lg border p-4 ${te(e.status)}`,
311
+ children: X.map((e) => /* @__PURE__ */ x("div", {
312
+ className: `flex items-center gap-4 rounded-lg border p-4 ${pe(e.status)}`,
221
313
  children: [
222
- /* @__PURE__ */ T("div", {
314
+ /* @__PURE__ */ b("div", {
223
315
  className: "rounded-lg bg-background p-2",
224
316
  children: e.icon
225
317
  }),
226
- /* @__PURE__ */ E("div", {
318
+ /* @__PURE__ */ x("div", {
227
319
  className: "flex-1",
228
- children: [/* @__PURE__ */ T("p", {
229
- className: "font-medium",
230
- children: e.label
231
- }), /* @__PURE__ */ T("p", {
232
- className: "text-sm text-muted-foreground",
233
- children: e.description
234
- })]
320
+ children: [
321
+ /* @__PURE__ */ b("p", {
322
+ className: "font-medium",
323
+ children: e.label
324
+ }),
325
+ /* @__PURE__ */ b("p", {
326
+ className: "text-sm text-muted-foreground",
327
+ children: e.description
328
+ }),
329
+ e.status !== "passed" && e.actionPath && /* @__PURE__ */ x("button", {
330
+ type: "button",
331
+ onClick: () => D?.(`${O}${e.actionPath}`),
332
+ className: "mt-1 inline-flex items-center gap-1 text-xs text-primary hover:underline",
333
+ children: [
334
+ e.actionLabel ?? "Fix this",
335
+ " ",
336
+ /* @__PURE__ */ b(f, { size: 11 })
337
+ ]
338
+ })
339
+ ]
235
340
  }),
236
- ee(e.status)
341
+ fe(e.status)
237
342
  ]
238
343
  }, e.id))
239
344
  }) }),
240
- !G && /* @__PURE__ */ E(i, {
241
- title: M("devportal.notesForReviewerTitle", "Notes for Reviewer"),
242
- description: M("devportal.notesForReviewerDesc", "Optional message to the review team"),
243
- children: [/* @__PURE__ */ T("textarea", {
244
- value: L,
245
- onChange: (e) => R(e.target.value),
246
- placeholder: M("devportal.notesForReviewerPlaceholder", "Describe what your app does, any special review considerations, or testing instructions..."),
345
+ !q && /* @__PURE__ */ x(a, {
346
+ title: k("devportal.notesForReviewerTitle", "Notes for Reviewer"),
347
+ description: k("devportal.notesForReviewerDesc", "Optional message to the review team"),
348
+ children: [/* @__PURE__ */ b("textarea", {
349
+ value: I,
350
+ onChange: (e) => L(e.target.value),
351
+ placeholder: k("devportal.notesForReviewerPlaceholder", "Describe what your app does, any special review considerations, or testing instructions..."),
247
352
  rows: 4,
248
353
  maxLength: 1e3,
249
354
  className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring resize-none"
250
- }), /* @__PURE__ */ E("p", {
355
+ }), /* @__PURE__ */ x("p", {
251
356
  className: "mt-1 text-xs text-muted-foreground text-right",
252
- children: [L.length, "/1000"]
357
+ children: [I.length, "/1000"]
253
358
  })]
254
359
  }),
255
- F && /* @__PURE__ */ T(a, {
360
+ M && /* @__PURE__ */ b(o, {
256
361
  variant: "error",
257
- title: M("devportal.submissionFailedTitle", "Submission Failed"),
258
- children: F
362
+ title: k("devportal.submissionFailedTitle", "Submission Failed"),
363
+ children: M
259
364
  }),
260
- X > 0 && !G && /* @__PURE__ */ E(a, {
365
+ Z > 0 && !q && /* @__PURE__ */ x(o, {
261
366
  variant: "error",
262
- title: M("devportal.cannotSubmitTitle", "Cannot Submit Yet"),
367
+ title: k("devportal.cannotSubmitTitle", "Cannot Submit Yet"),
263
368
  children: [
264
- M("devportal.pleaseFixItems1", "Please fix"),
369
+ k("devportal.pleaseFixItems1", "Please fix"),
265
370
  " ",
266
- X,
371
+ Z,
267
372
  " ",
268
- M("devportal.pleaseFixItems2", "required item(s) before submitting for review."),
269
- /* @__PURE__ */ E("div", {
373
+ k("devportal.pleaseFixItems2", "required item(s) before submitting for review."),
374
+ /* @__PURE__ */ x("div", {
270
375
  className: "mt-2 flex flex-wrap gap-3",
271
- children: [/* @__PURE__ */ T("button", {
272
- onClick: () => k?.(`${A}/apps/${O}`),
376
+ children: [/* @__PURE__ */ b("button", {
377
+ onClick: () => D?.(`${O}/apps/${S}`),
273
378
  className: "text-sm underline hover:no-underline",
274
- children: M("devportal.goToMarketplaceListing", "Update marketplace listing →")
275
- }), K && q === 0 && /* @__PURE__ */ T("button", {
276
- onClick: () => k?.(`${A}/apps/${O}/versions`),
379
+ children: k("devportal.goToMarketplaceListing", "Update marketplace listing →")
380
+ }), J && Y === 0 && /* @__PURE__ */ b("button", {
381
+ onClick: () => D?.(`${O}/apps/${S}/versions`),
277
382
  className: "text-sm underline hover:no-underline",
278
- children: M("devportal.goToVersions", "Add a published version →")
383
+ children: k("devportal.goToVersions", "Add a published version →")
279
384
  })]
280
385
  })
281
386
  ]
282
387
  }),
283
- Z > 0 && X === 0 && !G && /* @__PURE__ */ E(a, {
388
+ Q > 0 && Z === 0 && !q && /* @__PURE__ */ x(o, {
284
389
  variant: "warning",
285
- title: M("devportal.warningsTitle", "Warnings"),
390
+ title: k("devportal.warningsTitle", "Warnings"),
286
391
  children: [
287
- M("devportal.warningsMsg1", "You have"),
392
+ k("devportal.warningsMsg1", "You have"),
288
393
  " ",
289
- Z,
394
+ Q,
290
395
  " ",
291
- M("devportal.warningsMsg2", "warning(s). While you can submit, addressing these may improve your app's chances of approval.")
396
+ k("devportal.warningsMsg2", "warning(s). While you can submit, addressing these may improve your app's chances of approval.")
292
397
  ]
293
398
  }),
294
- /* @__PURE__ */ T(i, {
295
- title: M("devportal.reviewProcessTitle", "Review Process"),
296
- children: /* @__PURE__ */ T("div", {
399
+ /* @__PURE__ */ b(a, {
400
+ title: k("devportal.reviewProcessTitle", "Review Process"),
401
+ children: /* @__PURE__ */ b("div", {
297
402
  className: "rounded-lg border bg-muted/50 p-4",
298
- children: /* @__PURE__ */ E("ul", {
403
+ children: /* @__PURE__ */ x("ul", {
299
404
  className: "space-y-2 text-sm",
300
405
  children: [
301
- /* @__PURE__ */ E("li", {
406
+ /* @__PURE__ */ x("li", {
302
407
  className: "flex items-start gap-2",
303
- children: [/* @__PURE__ */ T(m, {
408
+ children: [/* @__PURE__ */ b(p, {
304
409
  size: 16,
305
410
  className: "mt-0.5 text-primary"
306
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo1", "Review typically takes 3-5 business days") })]
411
+ }), /* @__PURE__ */ b("span", { children: k("devportal.reviewProcessInfo1", "Review typically takes 3-5 business days") })]
307
412
  }),
308
- /* @__PURE__ */ E("li", {
413
+ /* @__PURE__ */ x("li", {
309
414
  className: "flex items-start gap-2",
310
- children: [/* @__PURE__ */ T(m, {
415
+ children: [/* @__PURE__ */ b(p, {
311
416
  size: 16,
312
417
  className: "mt-0.5 text-primary"
313
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo2", "You'll receive notifications about review status changes") })]
418
+ }), /* @__PURE__ */ b("span", { children: k("devportal.reviewProcessInfo2", "You'll receive notifications about review status changes") })]
314
419
  }),
315
- /* @__PURE__ */ E("li", {
420
+ /* @__PURE__ */ x("li", {
316
421
  className: "flex items-start gap-2",
317
- children: [/* @__PURE__ */ T(m, {
422
+ children: [/* @__PURE__ */ b(p, {
318
423
  size: 16,
319
424
  className: "mt-0.5 text-primary"
320
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo3", "If changes are requested, you can resubmit without losing your place in the queue") })]
425
+ }), /* @__PURE__ */ b("span", { children: k("devportal.reviewProcessInfo3", "If changes are requested, you can resubmit without losing your place in the queue") })]
321
426
  }),
322
- /* @__PURE__ */ E("li", {
427
+ /* @__PURE__ */ x("li", {
323
428
  className: "flex items-start gap-2",
324
- children: [/* @__PURE__ */ T(m, {
429
+ children: [/* @__PURE__ */ b(p, {
325
430
  size: 16,
326
431
  className: "mt-0.5 text-primary"
327
- }), /* @__PURE__ */ T("span", { children: M("devportal.reviewProcessInfo4", "Once approved and published, your app will be visible in the marketplace") })]
432
+ }), /* @__PURE__ */ b("span", { children: k("devportal.reviewProcessInfo4", "Once approved and published, your app will be visible in the marketplace") })]
328
433
  })
329
434
  ]
330
435
  })
331
436
  })
332
437
  }),
333
- /* @__PURE__ */ E("div", {
438
+ /* @__PURE__ */ x("div", {
334
439
  className: "flex gap-3",
335
- children: [/* @__PURE__ */ T("button", {
336
- onClick: () => k?.(`${A}/apps/${O}`),
440
+ children: [/* @__PURE__ */ b("button", {
441
+ onClick: () => D?.(`${O}/apps/${S}`),
337
442
  className: "rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted",
338
- children: M("devportal.cancelButton", "Cancel")
339
- }), /* @__PURE__ */ T("button", {
443
+ children: k("devportal.cancelButton", "Cancel")
444
+ }), /* @__PURE__ */ b("button", {
340
445
  onClick: async () => {
341
- if (O) {
342
- P(!0), I(null);
446
+ if (S) {
447
+ j(!0), N(null);
343
448
  try {
344
- let e = await U({ variables: {
345
- id: O,
346
- notes: L.trim() || void 0
449
+ let e = await H({ variables: {
450
+ id: S,
451
+ notes: I.trim() || void 0
347
452
  } });
348
453
  if (e.error) throw e.error;
349
- k?.(`${A}/apps/${O}`);
454
+ await U({ variables: {
455
+ id: S,
456
+ notes: I.trim() || void 0
457
+ } }), F(!0);
350
458
  } catch (e) {
351
- I(e instanceof Error ? e.message : M("devportal.submitFailedDefault", "Failed to submit for review")), P(!1);
459
+ N(e instanceof Error ? e.message : k("devportal.submitFailedDefault", "Failed to submit for review"));
460
+ } finally {
461
+ j(!1);
352
462
  }
353
463
  }
354
464
  },
355
- disabled: !$ || N || !z.allowed,
356
- "aria-disabled": !$ || N || !z.allowed,
357
- title: z.allowed ? void 0 : M("devportal.common.noPermission", "You do not have permission to perform this action"),
465
+ disabled: !$ || A || !R.allowed,
466
+ "aria-disabled": !$ || A || !R.allowed,
467
+ title: R.allowed ? void 0 : k("devportal.common.noPermission", "You do not have permission to perform this action"),
358
468
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
359
- children: N ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(y, {
469
+ children: A ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(_, {
360
470
  size: 16,
361
471
  className: "animate-spin"
362
- }), M("devportal.submittingButton", "Submitting...")] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(b, { size: 16 }), M("devportal.submitForReviewButton", "Submit for Review")] })
472
+ }), k("devportal.submittingButton", "Submitting...")] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(ae, { size: 16 }), k("devportal.submitForReviewButton", "Submit for Review")] })
363
473
  })]
364
474
  })
365
475
  ]
@@ -367,6 +477,6 @@ var D = [
367
477
  });
368
478
  };
369
479
  //#endregion
370
- export { O as PublishPage };
480
+ export { D as PublishPage };
371
481
 
372
482
  //# sourceMappingURL=PublishPage.js.map