@burdenoff/microfe-devportal 2026.624.20 → 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.
- package/dist/devportal/pages/ApplicationDetailPage.js +360 -294
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.js +306 -196
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/generated/global-operations.js +181 -167
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,118 +1,144 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
|
-
import { useGetApplicationQuery as t,
|
|
3
|
-
import { PageLayout as
|
|
4
|
-
import { Alert as
|
|
5
|
-
import { PermissionGuard as
|
|
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
|
|
8
|
-
import { useDevportalPermission as
|
|
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
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { AlertTriangle as
|
|
13
|
-
import { useParams as
|
|
14
|
-
import { Fragment as
|
|
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
|
|
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
|
-
],
|
|
22
|
-
let { appId:
|
|
23
|
-
let n =
|
|
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
|
-
}, [
|
|
26
|
-
variables: { id:
|
|
27
|
-
skip: !
|
|
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 =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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(
|
|
35
|
-
}, [
|
|
36
|
-
let
|
|
37
|
-
if (!
|
|
38
|
-
let e =
|
|
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:
|
|
42
|
-
description:
|
|
43
|
-
status:
|
|
44
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
49
|
-
description:
|
|
50
|
-
status:
|
|
51
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
56
|
-
description:
|
|
57
|
-
status:
|
|
58
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
63
|
-
description:
|
|
64
|
-
status:
|
|
65
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
70
|
-
description:
|
|
71
|
-
status:
|
|
72
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
77
|
-
description:
|
|
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__ */
|
|
101
|
+
icon: /* @__PURE__ */ b(g, { size: 20 }),
|
|
102
|
+
actionLabel: "Edit store listing →",
|
|
103
|
+
actionPath: t
|
|
80
104
|
}
|
|
81
105
|
];
|
|
82
|
-
return
|
|
106
|
+
return J && r.push({
|
|
83
107
|
id: "version",
|
|
84
|
-
label:
|
|
85
|
-
description:
|
|
86
|
-
status:
|
|
87
|
-
icon: /* @__PURE__ */
|
|
88
|
-
|
|
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:
|
|
91
|
-
description:
|
|
92
|
-
status: ["DRAFT", "REJECTED"].includes(
|
|
93
|
-
icon: /* @__PURE__ */
|
|
94
|
-
}),
|
|
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
|
-
|
|
99
|
-
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
135
|
+
case "warning": return /* @__PURE__ */ b(d, {
|
|
110
136
|
size: 20,
|
|
111
137
|
className: "text-status-warning-text"
|
|
112
138
|
});
|
|
113
|
-
default: return /* @__PURE__ */
|
|
139
|
+
default: return /* @__PURE__ */ b("div", { className: "h-5 w-5 rounded-full border-2 border-border-default" });
|
|
114
140
|
}
|
|
115
|
-
},
|
|
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
|
|
124
|
-
title:
|
|
125
|
-
description:
|
|
126
|
-
backLink: `/apps/${
|
|
127
|
-
backLabel:
|
|
128
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
156
|
+
children: /* @__PURE__ */ b(_, { className: "animate-spin h-8 w-8 text-muted-foreground" })
|
|
131
157
|
})
|
|
132
|
-
}) :
|
|
133
|
-
title:
|
|
134
|
-
description:
|
|
135
|
-
backLink: `/apps/${
|
|
136
|
-
backLabel:
|
|
137
|
-
children: /* @__PURE__ */
|
|
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:
|
|
140
|
-
children:
|
|
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__ */
|
|
143
|
-
permission:
|
|
144
|
-
children: /* @__PURE__ */
|
|
145
|
-
title:
|
|
146
|
-
description: `${
|
|
147
|
-
backLink: `/apps/${
|
|
148
|
-
backLabel:
|
|
149
|
-
actions: /* @__PURE__ */
|
|
150
|
-
onClick: () =>
|
|
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__ */
|
|
244
|
+
children: [/* @__PURE__ */ b(m, { size: 16 }), k("devportal.previewListing", "Preview Listing")]
|
|
153
245
|
}),
|
|
154
246
|
children: [
|
|
155
|
-
|
|
247
|
+
q && /* @__PURE__ */ x(o, {
|
|
156
248
|
variant: "warning",
|
|
157
|
-
title:
|
|
249
|
+
title: k("devportal.alreadySubmittedTitle", "Already Submitted"),
|
|
158
250
|
children: [
|
|
159
|
-
|
|
251
|
+
k("devportal.alreadySubmittedMsg1", "This app is currently in"),
|
|
160
252
|
" ",
|
|
161
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ b("strong", { children: K.status }),
|
|
162
254
|
" ",
|
|
163
|
-
|
|
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__ */
|
|
258
|
+
/* @__PURE__ */ x("div", {
|
|
167
259
|
className: "rounded-lg border bg-card p-6",
|
|
168
260
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ b("h2", {
|
|
170
262
|
className: "text-lg font-semibold",
|
|
171
|
-
children:
|
|
263
|
+
children: k("devportal.preSubmissionChecklist", "Pre-submission Checklist")
|
|
172
264
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ b("p", {
|
|
174
266
|
className: "mt-1 text-sm text-muted-foreground",
|
|
175
|
-
children:
|
|
267
|
+
children: k("devportal.completeAllRequiredItems", "Complete all required items before submitting for review")
|
|
176
268
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ x("div", {
|
|
178
270
|
className: "mt-4 flex gap-6",
|
|
179
271
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ x("div", {
|
|
181
273
|
className: "flex items-center gap-2",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ b(p, {
|
|
183
275
|
size: 20,
|
|
184
276
|
className: "text-status-success-text"
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
-
|
|
277
|
+
}), /* @__PURE__ */ x("span", { children: [
|
|
278
|
+
ue,
|
|
187
279
|
" ",
|
|
188
|
-
|
|
280
|
+
k("devportal.passed", "Passed")
|
|
189
281
|
] })]
|
|
190
282
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ x("div", {
|
|
192
284
|
className: "flex items-center gap-2",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ b(v, {
|
|
194
286
|
size: 20,
|
|
195
287
|
className: "text-status-error-text"
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
-
|
|
288
|
+
}), /* @__PURE__ */ x("span", { children: [
|
|
289
|
+
Z,
|
|
198
290
|
" ",
|
|
199
|
-
|
|
291
|
+
k("devportal.failed", "Failed")
|
|
200
292
|
] })]
|
|
201
293
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ x("div", {
|
|
203
295
|
className: "flex items-center gap-2",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ b(d, {
|
|
205
297
|
size: 20,
|
|
206
298
|
className: "text-status-warning-text"
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
-
|
|
299
|
+
}), /* @__PURE__ */ x("span", { children: [
|
|
300
|
+
Q,
|
|
209
301
|
" ",
|
|
210
|
-
|
|
302
|
+
k("devportal.warnings", "Warnings")
|
|
211
303
|
] })]
|
|
212
304
|
})
|
|
213
305
|
]
|
|
214
306
|
})
|
|
215
307
|
]
|
|
216
308
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ b(a, { children: /* @__PURE__ */ b("div", {
|
|
218
310
|
className: "space-y-3",
|
|
219
|
-
children:
|
|
220
|
-
className: `flex items-center gap-4 rounded-lg border p-4 ${
|
|
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__ */
|
|
314
|
+
/* @__PURE__ */ b("div", {
|
|
223
315
|
className: "rounded-lg bg-background p-2",
|
|
224
316
|
children: e.icon
|
|
225
317
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ x("div", {
|
|
227
319
|
className: "flex-1",
|
|
228
|
-
children: [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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
|
-
|
|
341
|
+
fe(e.status)
|
|
237
342
|
]
|
|
238
343
|
}, e.id))
|
|
239
344
|
}) }),
|
|
240
|
-
!
|
|
241
|
-
title:
|
|
242
|
-
description:
|
|
243
|
-
children: [/* @__PURE__ */
|
|
244
|
-
value:
|
|
245
|
-
onChange: (e) =>
|
|
246
|
-
placeholder:
|
|
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__ */
|
|
355
|
+
}), /* @__PURE__ */ x("p", {
|
|
251
356
|
className: "mt-1 text-xs text-muted-foreground text-right",
|
|
252
|
-
children: [
|
|
357
|
+
children: [I.length, "/1000"]
|
|
253
358
|
})]
|
|
254
359
|
}),
|
|
255
|
-
|
|
360
|
+
M && /* @__PURE__ */ b(o, {
|
|
256
361
|
variant: "error",
|
|
257
|
-
title:
|
|
258
|
-
children:
|
|
362
|
+
title: k("devportal.submissionFailedTitle", "Submission Failed"),
|
|
363
|
+
children: M
|
|
259
364
|
}),
|
|
260
|
-
|
|
365
|
+
Z > 0 && !q && /* @__PURE__ */ x(o, {
|
|
261
366
|
variant: "error",
|
|
262
|
-
title:
|
|
367
|
+
title: k("devportal.cannotSubmitTitle", "Cannot Submit Yet"),
|
|
263
368
|
children: [
|
|
264
|
-
|
|
369
|
+
k("devportal.pleaseFixItems1", "Please fix"),
|
|
265
370
|
" ",
|
|
266
|
-
|
|
371
|
+
Z,
|
|
267
372
|
" ",
|
|
268
|
-
|
|
269
|
-
/* @__PURE__ */
|
|
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__ */
|
|
272
|
-
onClick: () =>
|
|
376
|
+
children: [/* @__PURE__ */ b("button", {
|
|
377
|
+
onClick: () => D?.(`${O}/apps/${S}`),
|
|
273
378
|
className: "text-sm underline hover:no-underline",
|
|
274
|
-
children:
|
|
275
|
-
}),
|
|
276
|
-
onClick: () =>
|
|
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:
|
|
383
|
+
children: k("devportal.goToVersions", "Add a published version →")
|
|
279
384
|
})]
|
|
280
385
|
})
|
|
281
386
|
]
|
|
282
387
|
}),
|
|
283
|
-
|
|
388
|
+
Q > 0 && Z === 0 && !q && /* @__PURE__ */ x(o, {
|
|
284
389
|
variant: "warning",
|
|
285
|
-
title:
|
|
390
|
+
title: k("devportal.warningsTitle", "Warnings"),
|
|
286
391
|
children: [
|
|
287
|
-
|
|
392
|
+
k("devportal.warningsMsg1", "You have"),
|
|
288
393
|
" ",
|
|
289
|
-
|
|
394
|
+
Q,
|
|
290
395
|
" ",
|
|
291
|
-
|
|
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__ */
|
|
295
|
-
title:
|
|
296
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
403
|
+
children: /* @__PURE__ */ x("ul", {
|
|
299
404
|
className: "space-y-2 text-sm",
|
|
300
405
|
children: [
|
|
301
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ x("li", {
|
|
302
407
|
className: "flex items-start gap-2",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ b(p, {
|
|
304
409
|
size: 16,
|
|
305
410
|
className: "mt-0.5 text-primary"
|
|
306
|
-
}), /* @__PURE__ */
|
|
411
|
+
}), /* @__PURE__ */ b("span", { children: k("devportal.reviewProcessInfo1", "Review typically takes 3-5 business days") })]
|
|
307
412
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ x("li", {
|
|
309
414
|
className: "flex items-start gap-2",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ b(p, {
|
|
311
416
|
size: 16,
|
|
312
417
|
className: "mt-0.5 text-primary"
|
|
313
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ b("span", { children: k("devportal.reviewProcessInfo2", "You'll receive notifications about review status changes") })]
|
|
314
419
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ x("li", {
|
|
316
421
|
className: "flex items-start gap-2",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ b(p, {
|
|
318
423
|
size: 16,
|
|
319
424
|
className: "mt-0.5 text-primary"
|
|
320
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
427
|
+
/* @__PURE__ */ x("li", {
|
|
323
428
|
className: "flex items-start gap-2",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ b(p, {
|
|
325
430
|
size: 16,
|
|
326
431
|
className: "mt-0.5 text-primary"
|
|
327
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
438
|
+
/* @__PURE__ */ x("div", {
|
|
334
439
|
className: "flex gap-3",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
336
|
-
onClick: () =>
|
|
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:
|
|
339
|
-
}), /* @__PURE__ */
|
|
443
|
+
children: k("devportal.cancelButton", "Cancel")
|
|
444
|
+
}), /* @__PURE__ */ b("button", {
|
|
340
445
|
onClick: async () => {
|
|
341
|
-
if (
|
|
342
|
-
|
|
446
|
+
if (S) {
|
|
447
|
+
j(!0), N(null);
|
|
343
448
|
try {
|
|
344
|
-
let e = await
|
|
345
|
-
id:
|
|
346
|
-
notes:
|
|
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
|
-
|
|
454
|
+
await U({ variables: {
|
|
455
|
+
id: S,
|
|
456
|
+
notes: I.trim() || void 0
|
|
457
|
+
} }), F(!0);
|
|
350
458
|
} catch (e) {
|
|
351
|
-
|
|
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: !$ ||
|
|
356
|
-
"aria-disabled": !$ ||
|
|
357
|
-
title:
|
|
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:
|
|
469
|
+
children: A ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(_, {
|
|
360
470
|
size: 16,
|
|
361
471
|
className: "animate-spin"
|
|
362
|
-
}),
|
|
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 {
|
|
480
|
+
export { D as PublishPage };
|
|
371
481
|
|
|
372
482
|
//# sourceMappingURL=PublishPage.js.map
|