@burdenoff/microfe-store 2026.1028.1 → 2026.1102.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/StoreAdminRoutes.js +22 -12
- package/dist/StoreAdminRoutes.js.map +1 -1
- package/dist/StoreRoot.js +47 -36
- package/dist/StoreRoot.js.map +1 -1
- package/dist/StoreRoutes.js +72 -59
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/components/TemplateRevisionsQueue.d.ts +10 -0
- package/dist/components/TemplateRevisionsQueue.js +300 -0
- package/dist/components/TemplateRevisionsQueue.js.map +1 -0
- package/dist/components/WorkflowTemplatePreviewPanel.d.ts +50 -0
- package/dist/components/WorkflowTemplatePreviewPanel.js +221 -0
- package/dist/components/WorkflowTemplatePreviewPanel.js.map +1 -0
- package/dist/components/governance/ReportListingCard.d.ts +11 -0
- package/dist/components/governance/ReportListingCard.js +100 -0
- package/dist/components/governance/ReportListingCard.js.map +1 -0
- package/dist/pages/AdminDashboardPage.js +48 -27
- package/dist/pages/AdminDashboardPage.js.map +1 -1
- package/dist/pages/AdminGovernancePage.d.ts +3 -0
- package/dist/pages/AdminGovernancePage.js +883 -0
- package/dist/pages/AdminGovernancePage.js.map +1 -0
- package/dist/pages/AdminSubmissionsQueuePage.js +468 -335
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +220 -215
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/dist/pages/PublisherGovernancePage.d.ts +3 -0
- package/dist/pages/PublisherGovernancePage.js +230 -0
- package/dist/pages/PublisherGovernancePage.js.map +1 -0
- package/dist/utils/governance.d.ts +158 -0
- package/dist/utils/governance.js +129 -0
- package/dist/utils/governance.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,35 +1,45 @@
|
|
|
1
1
|
import { useStore as e } from "../providers/StoreProvider.js";
|
|
2
2
|
import { formatPriceForModel as t } from "../utils/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { GOVERNANCE_STATS_QUERY as n, runGovernanceOperation as r } from "../utils/governance.js";
|
|
4
|
+
import { Markdown as i } from "../node_modules/react-markdown/lib/index.js";
|
|
5
|
+
import { InstallAppModal as a } from "../components/InstallAppModal.js";
|
|
6
|
+
import { WORKFLOW_TEMPLATE_PREVIEW_FIELDS as o, WorkflowTemplatePreviewPanel as ee } from "../components/WorkflowTemplatePreviewPanel.js";
|
|
7
|
+
import { TEMPLATE_REVISION_COUNT_QUERY as te, TemplateRevisionsQueue as ne } from "../components/TemplateRevisionsQueue.js";
|
|
8
|
+
import { useCallback as s, useEffect as c, useRef as re, useState as l } from "react";
|
|
9
|
+
import { useNavigate as ie } from "react-router";
|
|
10
|
+
import { ArrowLeft as ae, Check as oe, ChevronDown as se, ChevronUp as ce, Clock as le, Download as u, ExternalLink as ue, FileJson as d, FlaskConical as de, GitBranch as fe, Hash as pe, History as me, PackageCheck as he, RefreshCw as f, ShieldCheck as ge, Tag as _e, User as ve, X as p } from "lucide-react";
|
|
11
|
+
import { graphqlFetch as m } from "@burdenoff/fe-libs/shared/graphql";
|
|
12
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
+
import { IllustratedEmptyState as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
|
|
11
14
|
//#region src/pages/AdminSubmissionsQueuePage.tsx
|
|
12
|
-
function
|
|
15
|
+
function _(e) {
|
|
13
16
|
let t = e?.sandboxBuildStatus;
|
|
14
17
|
return typeof t == "string" ? t : null;
|
|
15
18
|
}
|
|
16
|
-
function
|
|
19
|
+
function v(e) {
|
|
17
20
|
let t = e?.sandboxBuildError;
|
|
18
21
|
return typeof t == "string" ? t : null;
|
|
19
22
|
}
|
|
20
|
-
var
|
|
23
|
+
var xe = {
|
|
21
24
|
PENDING: "Build pending",
|
|
22
25
|
READY: "Build ready",
|
|
23
26
|
FAILED: "Build failed",
|
|
24
27
|
DISPATCH_FAILED: "Dispatch failed",
|
|
25
28
|
UNSUPPORTED: "Unsupported provider"
|
|
26
|
-
},
|
|
29
|
+
}, Se = {
|
|
27
30
|
PENDING: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
28
31
|
READY: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
29
32
|
FAILED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
|
|
30
33
|
DISPATCH_FAILED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
|
|
31
34
|
UNSUPPORTED: "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]"
|
|
32
|
-
},
|
|
35
|
+
}, Ce = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendingReviewProducts(limit: $limit, offset: $offset) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n reviewDueAt\n isReviewOverdue\n category\n icon\n productId\n zipFileUrl\n manifest\n requiredPermissions\n publisher {\n id\n name\n email\n }\n }\n }\n }\n", we = "\n query AdminProducts($limit: Int, $offset: Int, $status: ProductStatus) {\n products(filter: { status: $status }, limit: $limit, offset: $offset) {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n productId\n zipFileUrl\n manifest\n requiredPermissions\n publisher {\n id\n name\n email\n }\n }\n }\n", Te = `
|
|
36
|
+
query AdminWorkflowTemplatePreview($id: ID!) {
|
|
37
|
+
product(id: $id) {
|
|
38
|
+
id
|
|
39
|
+
workflowTemplatePreview { ${o} }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`, y = 50, Ee = "\n mutation ApproveProduct($id: ID!, $notes: String) {\n approveProduct(id: $id, notes: $notes) {\n id\n status\n publishedAt\n }\n }\n", De = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n rejectedReason\n }\n }\n", Oe = "\n mutation DelistProduct($id: ID!, $reason: String) {\n delistProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", ke = "\n query AdminAppPackageUrl($id: ID!) {\n application(id: $id) {\n id\n versions(first: 1) {\n edges {\n node {\n id\n packageUrl\n metadata\n }\n }\n }\n }\n }\n", Ae = "\n mutation RefreshApplicationVersionPackageUrl($id: ID!) {\n refreshApplicationVersionPackageUrl(id: $id)\n }\n", je = "\n query AdminPendingVersionApps($limit: Int, $offset: Int) {\n applicationsWithPendingVersions(limit: $limit, offset: $offset) {\n totalCount\n edges {\n node {\n id\n name\n slug\n appType\n iconUrl\n shortDescription\n description\n versions(first: 5) {\n edges {\n node {\n id\n version\n status\n releaseNotes\n packageUrl\n packageSize\n isLatest\n reviewNotes\n manifest\n metadata\n createdAt\n }\n }\n }\n }\n }\n }\n }\n", Me = "\n mutation AdminApproveApplicationVersion($id: ID!, $notes: String) {\n approveApplicationVersion(id: $id, notes: $notes) {\n id\n status\n }\n }\n", Ne = "\n mutation AdminRejectApplicationVersion($id: ID!, $reason: String!) {\n rejectApplicationVersion(id: $id, reason: $reason) {\n id\n status\n }\n }\n", Pe = "\n mutation AdminRetryNodeSandboxBuild($id: ID!) {\n retryNodeSandboxBuild(id: $id)\n }\n", Fe = [
|
|
33
43
|
{
|
|
34
44
|
label: "Pending review",
|
|
35
45
|
value: "PENDING_REVIEW"
|
|
@@ -42,6 +52,10 @@ var ge = {
|
|
|
42
52
|
label: "Rejected",
|
|
43
53
|
value: "REJECTED"
|
|
44
54
|
},
|
|
55
|
+
{
|
|
56
|
+
label: "Template revisions",
|
|
57
|
+
value: "TEMPLATE_REVISIONS"
|
|
58
|
+
},
|
|
45
59
|
{
|
|
46
60
|
label: "Version Updates",
|
|
47
61
|
value: "VERSION_UPDATES"
|
|
@@ -50,16 +64,16 @@ var ge = {
|
|
|
50
64
|
label: "All",
|
|
51
65
|
value: "ALL"
|
|
52
66
|
}
|
|
53
|
-
],
|
|
67
|
+
], b = {
|
|
54
68
|
NODE: "bg-[var(--color-status-info-bg-subtle)] text-[var(--color-status-info-text)]",
|
|
55
69
|
WORKFLOW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
56
70
|
INTEGRATION: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
57
71
|
VIBEMODULE: "bg-[var(--color-surface-accent-muted)] text-[var(--color-text-accent)]"
|
|
58
|
-
},
|
|
72
|
+
}, x = {
|
|
59
73
|
PENDING_REVIEW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
60
74
|
PUBLISHED: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
61
75
|
REJECTED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]"
|
|
62
|
-
},
|
|
76
|
+
}, S = new Set([
|
|
63
77
|
"NODE",
|
|
64
78
|
"WORKFLOW",
|
|
65
79
|
"VIBEMODULE",
|
|
@@ -67,13 +81,13 @@ var ge = {
|
|
|
67
81
|
"DATASINK",
|
|
68
82
|
"CONSOLE"
|
|
69
83
|
]);
|
|
70
|
-
function
|
|
71
|
-
return
|
|
84
|
+
function Ie(e) {
|
|
85
|
+
return b[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
|
|
72
86
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
87
|
+
function Le(e) {
|
|
88
|
+
return x[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
|
|
75
89
|
}
|
|
76
|
-
function
|
|
90
|
+
function C(e) {
|
|
77
91
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
78
92
|
month: "short",
|
|
79
93
|
day: "numeric",
|
|
@@ -82,138 +96,177 @@ function x(e) {
|
|
|
82
96
|
minute: "2-digit"
|
|
83
97
|
}) : "—";
|
|
84
98
|
}
|
|
85
|
-
var
|
|
86
|
-
let
|
|
87
|
-
|
|
99
|
+
var w = () => {
|
|
100
|
+
let o = ie(), { authToken: b, basePath: x } = e(), [w, Re] = l([]), [T, ze] = l(0), [Be, Ve] = l(!1), [He, Ue] = l(0);
|
|
101
|
+
c(() => {
|
|
102
|
+
let e = !1;
|
|
103
|
+
return r(n, void 0, b, "Failed to load the review SLA counters").then((t) => {
|
|
104
|
+
e || Ue(t.storeGovernanceStats.overdueSubmissions);
|
|
105
|
+
}).catch(() => {
|
|
106
|
+
e || Ue(0);
|
|
107
|
+
}), () => {
|
|
108
|
+
e = !0;
|
|
109
|
+
};
|
|
110
|
+
}, [b, T]);
|
|
111
|
+
let [E, D] = l({}), O = re({});
|
|
112
|
+
c(() => {
|
|
113
|
+
O.current = E;
|
|
114
|
+
}, [E]);
|
|
115
|
+
let [k, A] = l(!1), [We, j] = l(null), [M, N] = l(null), [P, Ge] = l("PENDING_REVIEW"), [Ke, F] = l(null), [I, L] = l(""), [R, qe] = l(null), [z, B] = l(null), [V, Je] = l([]), [Ye, Xe] = l(0), [H, U] = l(null), [W, Ze] = l(null), [Qe, G] = l(null), [K, q] = l(""), [$e, J] = l(null), [Y, et] = l({}), [X, tt] = l(null), [Z, nt] = l(0), rt = re(0), [it, at] = l(0);
|
|
116
|
+
c(() => {
|
|
117
|
+
let e = !1;
|
|
118
|
+
return (async () => {
|
|
119
|
+
try {
|
|
120
|
+
let t = await m({
|
|
121
|
+
gateway: "global",
|
|
122
|
+
query: te,
|
|
123
|
+
authToken: b || void 0
|
|
124
|
+
});
|
|
125
|
+
e || nt(t.data?.pendingWorkflowTemplateRevisions.totalCount ?? 0);
|
|
126
|
+
} catch {}
|
|
127
|
+
})(), () => {
|
|
128
|
+
e = !0;
|
|
129
|
+
};
|
|
130
|
+
}, [b]);
|
|
131
|
+
let Q = s(async () => {
|
|
132
|
+
A(!0), j(null);
|
|
88
133
|
try {
|
|
89
|
-
let e = await
|
|
134
|
+
let e = await m({
|
|
90
135
|
gateway: "global",
|
|
91
|
-
query:
|
|
136
|
+
query: je,
|
|
92
137
|
variables: {
|
|
93
|
-
limit:
|
|
138
|
+
limit: 20,
|
|
94
139
|
offset: 0
|
|
95
140
|
},
|
|
96
|
-
authToken:
|
|
141
|
+
authToken: b || void 0
|
|
97
142
|
});
|
|
98
143
|
if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load version updates");
|
|
99
|
-
|
|
144
|
+
Je((e.data?.applicationsWithPendingVersions.edges ?? []).map((e) => e.node)), Xe(e.data?.applicationsWithPendingVersions.totalCount ?? 0);
|
|
100
145
|
} catch (e) {
|
|
101
|
-
|
|
146
|
+
j(e instanceof Error ? e.message : "Failed to load version updates");
|
|
102
147
|
} finally {
|
|
103
|
-
|
|
148
|
+
A(!1);
|
|
104
149
|
}
|
|
105
|
-
}, [
|
|
106
|
-
U(e),
|
|
150
|
+
}, [b]), ot = async (e, t, n) => {
|
|
151
|
+
U(e), j(null);
|
|
107
152
|
try {
|
|
108
|
-
let t = await
|
|
153
|
+
let t = await m({
|
|
109
154
|
gateway: "global",
|
|
110
|
-
query:
|
|
155
|
+
query: Me,
|
|
111
156
|
variables: {
|
|
112
157
|
id: e,
|
|
113
158
|
notes: n || null
|
|
114
159
|
},
|
|
115
|
-
authToken:
|
|
160
|
+
authToken: b || void 0
|
|
116
161
|
});
|
|
117
162
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
|
|
118
|
-
await
|
|
163
|
+
await Q();
|
|
119
164
|
} catch (e) {
|
|
120
|
-
|
|
165
|
+
j(e instanceof Error ? e.message : "Approval failed");
|
|
121
166
|
} finally {
|
|
122
167
|
U(null);
|
|
123
168
|
}
|
|
124
|
-
},
|
|
169
|
+
}, st = async (e, t, n) => {
|
|
125
170
|
if (!n.trim()) {
|
|
126
|
-
|
|
171
|
+
j("Rejection reason is required");
|
|
127
172
|
return;
|
|
128
173
|
}
|
|
129
|
-
U(e),
|
|
174
|
+
U(e), j(null);
|
|
130
175
|
try {
|
|
131
|
-
let t = await
|
|
176
|
+
let t = await m({
|
|
132
177
|
gateway: "global",
|
|
133
|
-
query:
|
|
178
|
+
query: Ne,
|
|
134
179
|
variables: {
|
|
135
180
|
id: e,
|
|
136
181
|
reason: n.trim()
|
|
137
182
|
},
|
|
138
|
-
authToken:
|
|
183
|
+
authToken: b || void 0
|
|
139
184
|
});
|
|
140
185
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
|
|
141
|
-
G(null), q(""), J(null), await
|
|
186
|
+
G(null), q(""), J(null), await Q();
|
|
142
187
|
} catch (e) {
|
|
143
|
-
|
|
188
|
+
j(e instanceof Error ? e.message : "Rejection failed");
|
|
144
189
|
} finally {
|
|
145
190
|
U(null);
|
|
146
191
|
}
|
|
147
|
-
},
|
|
148
|
-
|
|
192
|
+
}, ct = async (e) => {
|
|
193
|
+
Ze(e), j(null);
|
|
149
194
|
try {
|
|
150
|
-
let t = await
|
|
195
|
+
let t = await m({
|
|
151
196
|
gateway: "global",
|
|
152
|
-
query:
|
|
197
|
+
query: Pe,
|
|
153
198
|
variables: { id: e },
|
|
154
|
-
authToken:
|
|
199
|
+
authToken: b || void 0
|
|
155
200
|
});
|
|
156
201
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Retry failed");
|
|
157
|
-
await Promise.all([
|
|
202
|
+
await Promise.all([Q(), $(P)]);
|
|
158
203
|
} catch (e) {
|
|
159
|
-
|
|
204
|
+
j(e instanceof Error ? e.message : "Retry failed");
|
|
160
205
|
} finally {
|
|
161
|
-
|
|
206
|
+
Ze(null);
|
|
162
207
|
}
|
|
163
|
-
},
|
|
208
|
+
}, $ = s(async (e, t = 0) => {
|
|
209
|
+
let n = ++rt.current, r = () => n === rt.current;
|
|
164
210
|
if (e === "VERSION_UPDATES") {
|
|
165
|
-
await
|
|
211
|
+
await Q();
|
|
166
212
|
return;
|
|
167
213
|
}
|
|
168
|
-
|
|
214
|
+
if (e === "TEMPLATE_REVISIONS") {
|
|
215
|
+
A(!1), at((e) => e + 1);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
A(!0), j(null), t === 0 && (O.current = {}, D({}));
|
|
169
219
|
try {
|
|
170
220
|
if (e === "PENDING_REVIEW") {
|
|
171
|
-
let e = await
|
|
221
|
+
let e = await m({
|
|
172
222
|
gateway: "global",
|
|
173
|
-
query:
|
|
223
|
+
query: Ce,
|
|
174
224
|
variables: {
|
|
175
|
-
limit:
|
|
176
|
-
offset:
|
|
225
|
+
limit: y,
|
|
226
|
+
offset: t
|
|
177
227
|
},
|
|
178
|
-
authToken:
|
|
228
|
+
authToken: b || void 0
|
|
179
229
|
});
|
|
230
|
+
if (!r()) return;
|
|
180
231
|
if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load pending products");
|
|
181
|
-
|
|
232
|
+
let n = e.data?.pendingReviewProducts.products ?? [], i = e.data?.pendingReviewProducts.totalCount ?? 0;
|
|
233
|
+
Re((e) => t > 0 ? [...e, ...n] : n), ze(i), Ve(t + n.length < i);
|
|
182
234
|
} else {
|
|
183
|
-
let
|
|
235
|
+
let n = await m({
|
|
184
236
|
gateway: "global",
|
|
185
|
-
query:
|
|
237
|
+
query: we,
|
|
186
238
|
variables: {
|
|
187
|
-
limit:
|
|
188
|
-
offset:
|
|
239
|
+
limit: y,
|
|
240
|
+
offset: t,
|
|
189
241
|
...e !== "ALL" && { status: e }
|
|
190
242
|
},
|
|
191
|
-
authToken:
|
|
243
|
+
authToken: b || void 0
|
|
192
244
|
});
|
|
193
|
-
if (
|
|
194
|
-
|
|
195
|
-
|
|
245
|
+
if (!r()) return;
|
|
246
|
+
if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Failed to load products");
|
|
247
|
+
let i = n.data?.products ?? [];
|
|
248
|
+
Re((e) => t > 0 ? [...e, ...i] : i), ze((e) => t > 0 ? e + i.length : i.length), Ve(i.length === y);
|
|
196
249
|
}
|
|
197
250
|
} catch (e) {
|
|
198
|
-
|
|
251
|
+
r() && j(e instanceof Error ? e.message : "Failed to load products");
|
|
199
252
|
} finally {
|
|
200
|
-
|
|
253
|
+
r() && A(!1);
|
|
201
254
|
}
|
|
202
|
-
}, [
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}, [
|
|
206
|
-
|
|
207
|
-
}, [
|
|
208
|
-
let e =
|
|
255
|
+
}, [b, Q]);
|
|
256
|
+
c(() => {
|
|
257
|
+
$(P);
|
|
258
|
+
}, [$, P]), c(() => {
|
|
259
|
+
Q();
|
|
260
|
+
}, [Q]), c(() => {
|
|
261
|
+
let e = w.filter((e) => e.productId && (e.type === "NODE" || S.has(e.type) && !e.zipFileUrl));
|
|
209
262
|
e.length !== 0 && (async () => {
|
|
210
|
-
let t = await Promise.allSettled(e.map((e) =>
|
|
263
|
+
let t = await Promise.allSettled(e.map((e) => m({
|
|
211
264
|
gateway: "global",
|
|
212
|
-
query:
|
|
265
|
+
query: ke,
|
|
213
266
|
variables: { id: e.productId },
|
|
214
|
-
authToken:
|
|
267
|
+
authToken: b || void 0
|
|
215
268
|
})));
|
|
216
|
-
|
|
269
|
+
et((n) => {
|
|
217
270
|
let r = { ...n };
|
|
218
271
|
return t.forEach((t, n) => {
|
|
219
272
|
if (t.status === "fulfilled") {
|
|
@@ -227,275 +280,324 @@ var S = () => {
|
|
|
227
280
|
}), r;
|
|
228
281
|
});
|
|
229
282
|
})();
|
|
230
|
-
}, [
|
|
231
|
-
let
|
|
232
|
-
|
|
283
|
+
}, [w, b]);
|
|
284
|
+
let lt = async (e) => {
|
|
285
|
+
tt(e);
|
|
233
286
|
try {
|
|
234
|
-
let t = (await
|
|
287
|
+
let t = (await m({
|
|
235
288
|
gateway: "global",
|
|
236
|
-
query:
|
|
289
|
+
query: Ae,
|
|
237
290
|
variables: { id: e },
|
|
238
|
-
authToken:
|
|
291
|
+
authToken: b || void 0
|
|
239
292
|
})).data?.refreshApplicationVersionPackageUrl;
|
|
240
|
-
t ? window.open(t, "_blank", "noreferrer") :
|
|
293
|
+
t ? window.open(t, "_blank", "noreferrer") : j("Could not generate a download URL. S3 credentials may not be configured.");
|
|
241
294
|
} catch (e) {
|
|
242
|
-
|
|
295
|
+
j(e instanceof Error ? e.message : "Failed to refresh download URL");
|
|
243
296
|
} finally {
|
|
244
|
-
|
|
297
|
+
tt(null);
|
|
298
|
+
}
|
|
299
|
+
}, ut = s(async (e) => {
|
|
300
|
+
let t = O.current[e]?.state;
|
|
301
|
+
if (!(t === "loaded" || t === "loading")) {
|
|
302
|
+
O.current = {
|
|
303
|
+
...O.current,
|
|
304
|
+
[e]: { state: "loading" }
|
|
305
|
+
}, D((t) => ({
|
|
306
|
+
...t,
|
|
307
|
+
[e]: { state: "loading" }
|
|
308
|
+
}));
|
|
309
|
+
try {
|
|
310
|
+
let t = await m({
|
|
311
|
+
gateway: "global",
|
|
312
|
+
query: Te,
|
|
313
|
+
variables: { id: e },
|
|
314
|
+
authToken: b || void 0
|
|
315
|
+
});
|
|
316
|
+
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to load the template contents");
|
|
317
|
+
let n = t.data?.product?.workflowTemplatePreview ?? null;
|
|
318
|
+
D((t) => ({
|
|
319
|
+
...t,
|
|
320
|
+
[e]: {
|
|
321
|
+
state: "loaded",
|
|
322
|
+
preview: n
|
|
323
|
+
}
|
|
324
|
+
}));
|
|
325
|
+
} catch (t) {
|
|
326
|
+
let n = t instanceof Error ? t.message : "Failed to load the template contents";
|
|
327
|
+
D((t) => ({
|
|
328
|
+
...t,
|
|
329
|
+
[e]: {
|
|
330
|
+
state: "error",
|
|
331
|
+
message: n
|
|
332
|
+
}
|
|
333
|
+
}));
|
|
334
|
+
}
|
|
245
335
|
}
|
|
246
|
-
},
|
|
247
|
-
|
|
336
|
+
}, [b]), dt = async (e) => {
|
|
337
|
+
N(e), j(null);
|
|
248
338
|
try {
|
|
249
|
-
let t = await
|
|
339
|
+
let t = await m({
|
|
250
340
|
gateway: "global",
|
|
251
|
-
query:
|
|
341
|
+
query: Ee,
|
|
252
342
|
variables: {
|
|
253
343
|
id: e,
|
|
254
344
|
notes: null
|
|
255
345
|
},
|
|
256
|
-
authToken:
|
|
346
|
+
authToken: b || void 0
|
|
257
347
|
});
|
|
258
348
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
|
|
259
|
-
await
|
|
349
|
+
await $(P);
|
|
260
350
|
} catch (e) {
|
|
261
|
-
|
|
351
|
+
j(e instanceof Error ? e.message : "Approval failed");
|
|
262
352
|
} finally {
|
|
263
|
-
|
|
353
|
+
N(null);
|
|
264
354
|
}
|
|
265
|
-
},
|
|
266
|
-
if (!
|
|
267
|
-
|
|
355
|
+
}, ft = async (e) => {
|
|
356
|
+
if (!I.trim()) {
|
|
357
|
+
j("Rejection reason is required");
|
|
268
358
|
return;
|
|
269
359
|
}
|
|
270
|
-
|
|
360
|
+
N(e), j(null);
|
|
271
361
|
try {
|
|
272
|
-
let t = await
|
|
362
|
+
let t = await m({
|
|
273
363
|
gateway: "global",
|
|
274
|
-
query:
|
|
364
|
+
query: De,
|
|
275
365
|
variables: {
|
|
276
366
|
id: e,
|
|
277
|
-
reason:
|
|
367
|
+
reason: I.trim()
|
|
278
368
|
},
|
|
279
|
-
authToken:
|
|
369
|
+
authToken: b || void 0
|
|
280
370
|
});
|
|
281
371
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
|
|
282
|
-
|
|
372
|
+
F(null), L(""), await $(P);
|
|
283
373
|
} catch (e) {
|
|
284
|
-
|
|
374
|
+
j(e instanceof Error ? e.message : "Rejection failed");
|
|
285
375
|
} finally {
|
|
286
|
-
|
|
376
|
+
N(null);
|
|
287
377
|
}
|
|
288
|
-
},
|
|
289
|
-
|
|
378
|
+
}, pt = async (e) => {
|
|
379
|
+
N(e), j(null);
|
|
290
380
|
try {
|
|
291
|
-
let t = await
|
|
381
|
+
let t = await m({
|
|
292
382
|
gateway: "global",
|
|
293
|
-
query:
|
|
383
|
+
query: Oe,
|
|
294
384
|
variables: {
|
|
295
385
|
id: e,
|
|
296
|
-
reason:
|
|
386
|
+
reason: I.trim() || void 0
|
|
297
387
|
},
|
|
298
|
-
authToken:
|
|
388
|
+
authToken: b || void 0
|
|
299
389
|
});
|
|
300
390
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Delist failed");
|
|
301
|
-
|
|
391
|
+
F(null), L(""), await $(P);
|
|
302
392
|
} catch (e) {
|
|
303
|
-
|
|
393
|
+
j(e instanceof Error ? e.message : "Delist failed");
|
|
304
394
|
} finally {
|
|
305
|
-
|
|
395
|
+
N(null);
|
|
306
396
|
}
|
|
307
|
-
},
|
|
308
|
-
return /* @__PURE__ */
|
|
397
|
+
}, mt = w.filter((e) => e.status === "PENDING_REVIEW").length;
|
|
398
|
+
return /* @__PURE__ */ g("div", {
|
|
309
399
|
className: "min-h-screen bg-[var(--color-surface-default)]",
|
|
310
400
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ h("header", {
|
|
312
402
|
className: "sticky top-0 z-10 border-b border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
|
|
313
|
-
children: /* @__PURE__ */
|
|
403
|
+
children: /* @__PURE__ */ g("div", {
|
|
314
404
|
className: "mx-auto max-w-5xl px-6 py-4",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ g("div", {
|
|
316
406
|
className: "flex items-center justify-between gap-4",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ g("div", {
|
|
318
408
|
className: "flex items-center gap-3 min-w-0",
|
|
319
409
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ g("button", {
|
|
321
411
|
type: "button",
|
|
322
|
-
onClick: () =>
|
|
412
|
+
onClick: () => o(`${x}/dashboard`),
|
|
323
413
|
className: "inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ h(ae, { className: "size-4 shrink-0" }), "Back"]
|
|
325
415
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ h("div", { className: "h-5 w-px bg-[var(--color-border-seam)]" }),
|
|
417
|
+
/* @__PURE__ */ h(he, { className: "size-5 shrink-0 text-[var(--color-text-primary)]" }),
|
|
418
|
+
/* @__PURE__ */ h("h1", {
|
|
329
419
|
className: "text-lg font-semibold text-[var(--color-text-primary)] truncate",
|
|
330
420
|
children: "Submission Queue"
|
|
331
421
|
}),
|
|
332
|
-
T > 0 && /* @__PURE__ */
|
|
422
|
+
T > 0 && /* @__PURE__ */ h("span", {
|
|
333
423
|
className: "shrink-0 rounded-full bg-[var(--color-status-warning-bg-subtle)] px-2 py-0.5 text-xs font-semibold text-[var(--color-status-warning-text)]",
|
|
334
424
|
children: T
|
|
425
|
+
}),
|
|
426
|
+
He > 0 && /* @__PURE__ */ g("span", {
|
|
427
|
+
className: "shrink-0 rounded-full bg-[var(--color-status-error-bg-subtle)] px-2 py-0.5 text-xs font-semibold text-[var(--color-status-error-text)]",
|
|
428
|
+
children: [He, " overdue"]
|
|
335
429
|
})
|
|
336
430
|
]
|
|
337
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ g("button", {
|
|
338
432
|
type: "button",
|
|
339
|
-
onClick: () => void
|
|
433
|
+
onClick: () => void $(P),
|
|
340
434
|
className: "shrink-0 inline-flex items-center gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-sm text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors disabled:opacity-50",
|
|
341
|
-
disabled:
|
|
342
|
-
children: [/* @__PURE__ */
|
|
435
|
+
disabled: k,
|
|
436
|
+
children: [/* @__PURE__ */ h(f, { className: `size-4 ${k ? "animate-spin" : ""}` }), "Refresh"]
|
|
343
437
|
})]
|
|
344
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ h("div", {
|
|
345
439
|
className: "mt-3 flex gap-1.5 flex-wrap",
|
|
346
|
-
children:
|
|
440
|
+
children: Fe.map((e) => /* @__PURE__ */ g("button", {
|
|
347
441
|
type: "button",
|
|
348
|
-
onClick: () =>
|
|
349
|
-
className: `rounded-full px-3.5 py-1 text-xs font-medium transition-colors ${
|
|
442
|
+
onClick: () => Ge(e.value),
|
|
443
|
+
className: `rounded-full px-3.5 py-1 text-xs font-medium transition-colors ${P === e.value ? "bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]" : "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)]"}`,
|
|
350
444
|
children: [
|
|
351
445
|
e.label,
|
|
352
|
-
e.value === "PENDING_REVIEW" &&
|
|
446
|
+
e.value === "PENDING_REVIEW" && mt > 0 && P !== "PENDING_REVIEW" && /* @__PURE__ */ h("span", {
|
|
353
447
|
className: "ml-1.5 rounded-full bg-[var(--color-status-warning-text)] px-1.5 py-0.5 text-[10px] text-white",
|
|
354
|
-
children:
|
|
448
|
+
children: mt
|
|
449
|
+
}),
|
|
450
|
+
e.value === "TEMPLATE_REVISIONS" && Z > 0 && P !== "TEMPLATE_REVISIONS" && /* @__PURE__ */ h("span", {
|
|
451
|
+
className: "ml-1.5 rounded-full bg-[var(--color-status-info-text)] px-1.5 py-0.5 text-[10px] text-[var(--color-text-inverse)]",
|
|
452
|
+
children: Z
|
|
355
453
|
}),
|
|
356
|
-
e.value === "VERSION_UPDATES" &&
|
|
454
|
+
e.value === "VERSION_UPDATES" && Ye > 0 && P !== "VERSION_UPDATES" && /* @__PURE__ */ h("span", {
|
|
357
455
|
className: "ml-1.5 rounded-full bg-[var(--color-status-info-text)] px-1.5 py-0.5 text-[10px] text-white",
|
|
358
|
-
children:
|
|
456
|
+
children: Ye
|
|
359
457
|
})
|
|
360
458
|
]
|
|
361
459
|
}, e.value))
|
|
362
460
|
})]
|
|
363
461
|
})
|
|
364
462
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ g("main", {
|
|
366
464
|
className: "mx-auto max-w-5xl space-y-4 p-6",
|
|
367
465
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ h(be, {
|
|
369
467
|
className: "mb-2",
|
|
370
468
|
children: "Every publisher submission lands here for your review. Inspect the manifest, permissions, and package details — then approve to publish or reject with a clear reason the developer will see."
|
|
371
469
|
}),
|
|
372
|
-
|
|
470
|
+
We && /* @__PURE__ */ h("div", {
|
|
373
471
|
role: "alert",
|
|
374
472
|
className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-3 text-sm text-[var(--color-text-danger)]",
|
|
375
|
-
children:
|
|
473
|
+
children: We
|
|
376
474
|
}),
|
|
377
|
-
|
|
475
|
+
P === "TEMPLATE_REVISIONS" ? /* @__PURE__ */ h(ne, {
|
|
476
|
+
authToken: b,
|
|
477
|
+
onCountChange: nt,
|
|
478
|
+
refreshKey: it
|
|
479
|
+
}) : P === "VERSION_UPDATES" ? k && V.length === 0 ? /* @__PURE__ */ h("div", {
|
|
378
480
|
className: "flex items-center justify-center py-24",
|
|
379
|
-
children: /* @__PURE__ */
|
|
380
|
-
}) :
|
|
481
|
+
children: /* @__PURE__ */ h(f, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
|
|
482
|
+
}) : V.length === 0 ? /* @__PURE__ */ h(ye, {
|
|
381
483
|
illustration: "empty-data",
|
|
382
484
|
title: "No pending version updates",
|
|
383
485
|
description: "All published apps are up to date. When a developer submits a new version, it will appear here for your review."
|
|
384
|
-
}) : /* @__PURE__ */
|
|
486
|
+
}) : /* @__PURE__ */ h("ul", {
|
|
385
487
|
className: "space-y-4",
|
|
386
|
-
children:
|
|
488
|
+
children: V.map((e) => {
|
|
387
489
|
let t = e.versions.edges.map((e) => e.node).filter((e) => e.status === "pending_review");
|
|
388
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
490
|
+
return t.length === 0 ? null : /* @__PURE__ */ g("li", {
|
|
389
491
|
className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ g("div", {
|
|
391
493
|
className: "flex items-center gap-4 p-5 border-b border-[var(--color-border-seam)]",
|
|
392
494
|
children: [
|
|
393
|
-
e.iconUrl ? /* @__PURE__ */
|
|
495
|
+
e.iconUrl ? /* @__PURE__ */ h("img", {
|
|
394
496
|
src: e.iconUrl,
|
|
395
497
|
alt: "",
|
|
396
498
|
className: "size-12 shrink-0 rounded-xl object-cover shadow-sm"
|
|
397
|
-
}) : /* @__PURE__ */
|
|
499
|
+
}) : /* @__PURE__ */ h("div", {
|
|
398
500
|
className: "flex size-12 shrink-0 items-center justify-center rounded-xl bg-[var(--color-surface-muted)] text-sm font-bold text-[var(--color-text-muted)] uppercase",
|
|
399
501
|
children: e.name.slice(0, 2)
|
|
400
502
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ g("div", {
|
|
402
504
|
className: "flex-1 min-w-0",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
505
|
+
children: [/* @__PURE__ */ g("div", {
|
|
404
506
|
className: "flex items-center gap-2 flex-wrap",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
507
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
406
508
|
className: "text-base font-semibold text-[var(--color-text-primary)]",
|
|
407
509
|
children: e.name
|
|
408
|
-
}), /* @__PURE__ */
|
|
510
|
+
}), /* @__PURE__ */ g("span", {
|
|
409
511
|
className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-status-info-bg-subtle)] px-2 py-0.5 text-[11px] font-semibold text-[var(--color-status-info-text)]",
|
|
410
512
|
children: [
|
|
411
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ h(fe, { className: "size-3" }),
|
|
412
514
|
t.length,
|
|
413
515
|
" version",
|
|
414
516
|
t.length === 1 ? "" : "s",
|
|
415
517
|
" pending"
|
|
416
518
|
]
|
|
417
519
|
})]
|
|
418
|
-
}), (e.shortDescription ?? e.description) && /* @__PURE__ */
|
|
520
|
+
}), (e.shortDescription ?? e.description) && /* @__PURE__ */ h("p", {
|
|
419
521
|
className: "mt-0.5 text-sm text-[var(--color-text-secondary)] line-clamp-1",
|
|
420
522
|
children: e.shortDescription ?? e.description
|
|
421
523
|
})]
|
|
422
524
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ g("a", {
|
|
424
526
|
href: `/devportal/apps/${e.id}`,
|
|
425
527
|
target: "_blank",
|
|
426
528
|
rel: "noreferrer",
|
|
427
529
|
className: "shrink-0 inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ h(ue, { className: "size-3.5" }), "Devportal"]
|
|
429
531
|
})
|
|
430
532
|
]
|
|
431
|
-
}), /* @__PURE__ */
|
|
533
|
+
}), /* @__PURE__ */ h("div", {
|
|
432
534
|
className: "divide-y divide-[var(--color-border-seam)]",
|
|
433
|
-
children: t.map((t) => /* @__PURE__ */
|
|
535
|
+
children: t.map((t) => /* @__PURE__ */ g("div", {
|
|
434
536
|
className: "p-5 space-y-3",
|
|
435
537
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ g("div", {
|
|
437
539
|
className: "flex items-center gap-2 flex-wrap",
|
|
438
540
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ h(fe, { className: "size-4 text-[var(--color-text-secondary)] shrink-0" }),
|
|
542
|
+
/* @__PURE__ */ h("span", {
|
|
441
543
|
className: "font-mono font-semibold text-sm text-[var(--color-text-primary)]",
|
|
442
544
|
children: t.version
|
|
443
545
|
}),
|
|
444
|
-
t.isLatest && /* @__PURE__ */
|
|
546
|
+
t.isLatest && /* @__PURE__ */ h("span", {
|
|
445
547
|
className: "rounded-full bg-[var(--color-surface-muted)] px-2 py-0.5 text-[10px] text-[var(--color-text-secondary)]",
|
|
446
548
|
children: "Latest"
|
|
447
549
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ h("span", {
|
|
449
551
|
className: "rounded-full bg-[var(--color-status-warning-bg-subtle)] px-2 py-0.5 text-[10px] font-medium text-[var(--color-status-warning-text)] uppercase",
|
|
450
552
|
children: "New Version"
|
|
451
553
|
}),
|
|
452
554
|
e.appType === "NODE" && (() => {
|
|
453
|
-
let e =
|
|
454
|
-
return e ? /* @__PURE__ */
|
|
455
|
-
className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${
|
|
456
|
-
title:
|
|
457
|
-
children:
|
|
555
|
+
let e = _(t.metadata);
|
|
556
|
+
return e ? /* @__PURE__ */ h("span", {
|
|
557
|
+
className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${Se[e]}`,
|
|
558
|
+
title: v(t.metadata) ?? void 0,
|
|
559
|
+
children: xe[e]
|
|
458
560
|
}) : null;
|
|
459
561
|
})(),
|
|
460
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ g("span", {
|
|
461
563
|
className: "ml-auto flex items-center gap-1 text-xs text-[var(--color-text-secondary)]",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
564
|
+
children: [/* @__PURE__ */ h(le, { className: "size-3" }), C(t.createdAt)]
|
|
463
565
|
})
|
|
464
566
|
]
|
|
465
567
|
}),
|
|
466
|
-
t.releaseNotes && /* @__PURE__ */
|
|
568
|
+
t.releaseNotes && /* @__PURE__ */ h("div", {
|
|
467
569
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
468
|
-
children: /* @__PURE__ */
|
|
570
|
+
children: /* @__PURE__ */ h(i, { children: t.releaseNotes })
|
|
469
571
|
}),
|
|
470
|
-
e.appType === "NODE" &&
|
|
572
|
+
e.appType === "NODE" && v(t.metadata) && /* @__PURE__ */ h("p", {
|
|
471
573
|
className: "text-xs text-[var(--color-status-error-text)]",
|
|
472
|
-
children:
|
|
574
|
+
children: v(t.metadata)
|
|
473
575
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ g("div", {
|
|
475
577
|
className: "flex flex-wrap gap-2",
|
|
476
578
|
children: [
|
|
477
|
-
e.appType === "NODE" &&
|
|
579
|
+
e.appType === "NODE" && _(t.metadata) !== "READY" && /* @__PURE__ */ g("button", {
|
|
478
580
|
type: "button",
|
|
479
|
-
onClick: () => void
|
|
581
|
+
onClick: () => void ct(t.id),
|
|
480
582
|
disabled: W === t.id,
|
|
481
583
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-accent)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-accent)] hover:bg-[var(--color-surface-accent-muted)] transition-colors disabled:opacity-50",
|
|
482
|
-
children: [W === t.id ? /* @__PURE__ */
|
|
584
|
+
children: [W === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5" }), "Retry Deployment"]
|
|
483
585
|
}),
|
|
484
|
-
e.appType === "NODE" && /* @__PURE__ */
|
|
586
|
+
e.appType === "NODE" && /* @__PURE__ */ g("button", {
|
|
485
587
|
type: "button",
|
|
486
|
-
onClick: () =>
|
|
588
|
+
onClick: () => o(`${x}/sandbox-builds?versionId=${t.id}`),
|
|
487
589
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ h(me, { className: "size-3.5" }), "View build history"]
|
|
489
591
|
}),
|
|
490
|
-
t.packageUrl && /* @__PURE__ */
|
|
592
|
+
t.packageUrl && /* @__PURE__ */ g("button", {
|
|
491
593
|
type: "button",
|
|
492
|
-
onClick: () => void
|
|
594
|
+
onClick: () => void lt(t.id),
|
|
493
595
|
disabled: X === t.id,
|
|
494
596
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors disabled:opacity-50",
|
|
495
597
|
children: [
|
|
496
|
-
X === t.id ? /* @__PURE__ */
|
|
598
|
+
X === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(u, { className: "size-3.5" }),
|
|
497
599
|
"Download Package",
|
|
498
|
-
t.packageSize != null && /* @__PURE__ */
|
|
600
|
+
t.packageSize != null && /* @__PURE__ */ g("span", {
|
|
499
601
|
className: "text-[var(--color-text-muted)]",
|
|
500
602
|
children: [
|
|
501
603
|
"(",
|
|
@@ -505,48 +607,48 @@ var S = () => {
|
|
|
505
607
|
})
|
|
506
608
|
]
|
|
507
609
|
}),
|
|
508
|
-
t.manifest && /* @__PURE__ */
|
|
610
|
+
t.manifest && /* @__PURE__ */ g("button", {
|
|
509
611
|
type: "button",
|
|
510
|
-
onClick: () =>
|
|
612
|
+
onClick: () => qe(R === t.id ? null : t.id),
|
|
511
613
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
512
614
|
children: [
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
|
|
515
|
-
|
|
615
|
+
/* @__PURE__ */ h(d, { className: "size-3.5" }),
|
|
616
|
+
R === t.id ? "Hide manifest" : "View manifest",
|
|
617
|
+
R === t.id ? /* @__PURE__ */ h(ce, { className: "size-3" }) : /* @__PURE__ */ h(se, { className: "size-3" })
|
|
516
618
|
]
|
|
517
619
|
})
|
|
518
620
|
]
|
|
519
621
|
}),
|
|
520
|
-
|
|
622
|
+
R === t.id && t.manifest && /* @__PURE__ */ h("pre", {
|
|
521
623
|
className: "overflow-x-auto rounded-lg border border-[var(--color-border-seam)] bg-[var(--color-surface-default)] p-4 text-[11px] leading-relaxed text-[var(--color-text-primary)] max-h-48 overflow-y-auto",
|
|
522
624
|
children: JSON.stringify(t.manifest, null, 2)
|
|
523
625
|
}),
|
|
524
|
-
|
|
626
|
+
Qe === t.id && $e === e.id && /* @__PURE__ */ g("div", {
|
|
525
627
|
className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)]/30 p-3 space-y-2",
|
|
526
628
|
children: [
|
|
527
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ h("p", {
|
|
528
630
|
className: "text-xs font-semibold text-[var(--color-text-danger)]",
|
|
529
631
|
children: "Rejection reason (the developer will see this)"
|
|
530
632
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ h("textarea", {
|
|
532
634
|
value: K,
|
|
533
635
|
onChange: (e) => q(e.target.value),
|
|
534
636
|
rows: 2,
|
|
535
637
|
className: "w-full rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none",
|
|
536
638
|
placeholder: "Be specific — what needs to change before this version can be approved…"
|
|
537
639
|
}),
|
|
538
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ g("div", {
|
|
539
641
|
className: "flex gap-2 justify-end",
|
|
540
|
-
children: [/* @__PURE__ */
|
|
642
|
+
children: [/* @__PURE__ */ h("button", {
|
|
541
643
|
type: "button",
|
|
542
644
|
onClick: () => {
|
|
543
645
|
G(null), q(""), J(null);
|
|
544
646
|
},
|
|
545
647
|
className: "rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
546
648
|
children: "Cancel"
|
|
547
|
-
}), /* @__PURE__ */
|
|
649
|
+
}), /* @__PURE__ */ h("button", {
|
|
548
650
|
type: "button",
|
|
549
|
-
onClick: () => void
|
|
651
|
+
onClick: () => void st(t.id, e.id, K),
|
|
550
652
|
disabled: !K.trim() || H === t.id,
|
|
551
653
|
className: "rounded-md bg-[var(--color-surface-danger)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-danger)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
552
654
|
children: "Submit rejection"
|
|
@@ -554,22 +656,22 @@ var S = () => {
|
|
|
554
656
|
})
|
|
555
657
|
]
|
|
556
658
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ g("div", {
|
|
558
660
|
className: "flex items-center gap-2",
|
|
559
|
-
children: [/* @__PURE__ */
|
|
661
|
+
children: [/* @__PURE__ */ g("button", {
|
|
560
662
|
type: "button",
|
|
561
|
-
onClick: () => void
|
|
663
|
+
onClick: () => void ot(t.id, e.id, ""),
|
|
562
664
|
disabled: H === t.id,
|
|
563
665
|
className: "inline-flex items-center gap-1.5 rounded-md bg-[var(--color-surface-success)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-on-success)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
564
|
-
children: [H === t.id ? /* @__PURE__ */
|
|
565
|
-
}),
|
|
666
|
+
children: [H === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(oe, { className: "size-3.5" }), "Approve version"]
|
|
667
|
+
}), Qe !== t.id && /* @__PURE__ */ g("button", {
|
|
566
668
|
type: "button",
|
|
567
669
|
onClick: () => {
|
|
568
670
|
G(t.id), q(""), J(e.id);
|
|
569
671
|
},
|
|
570
672
|
disabled: H === t.id,
|
|
571
673
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-danger)] hover:bg-[var(--color-surface-danger)] hover:text-[var(--color-text-on-danger)] disabled:opacity-50 transition-colors",
|
|
572
|
-
children: [/* @__PURE__ */ p
|
|
674
|
+
children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), "Reject version"]
|
|
573
675
|
})]
|
|
574
676
|
})
|
|
575
677
|
]
|
|
@@ -577,71 +679,71 @@ var S = () => {
|
|
|
577
679
|
})]
|
|
578
680
|
}, e.id);
|
|
579
681
|
})
|
|
580
|
-
}) :
|
|
682
|
+
}) : k && w.length === 0 ? /* @__PURE__ */ h("div", {
|
|
581
683
|
className: "flex items-center justify-center py-24",
|
|
582
|
-
children: /* @__PURE__ */
|
|
583
|
-
}) :
|
|
584
|
-
illustration:
|
|
585
|
-
title:
|
|
586
|
-
description:
|
|
587
|
-
}) : /* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ h(f, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
|
|
685
|
+
}) : w.length === 0 ? /* @__PURE__ */ h(ye, {
|
|
686
|
+
illustration: P === "PENDING_REVIEW" ? "empty-notifications" : "empty-data",
|
|
687
|
+
title: P === "PENDING_REVIEW" ? "Queue is clear" : "No products match this filter",
|
|
688
|
+
description: P === "PENDING_REVIEW" ? "No submissions are awaiting review. New submissions will appear here as publishers send them in." : "Nothing matches the current filter. Try switching to a different status above."
|
|
689
|
+
}) : /* @__PURE__ */ h("ul", {
|
|
588
690
|
className: "space-y-3",
|
|
589
|
-
children:
|
|
691
|
+
children: w.map((e) => /* @__PURE__ */ g("li", {
|
|
590
692
|
className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)] transition-[box-shadow,border-color] hover:border-[var(--color-border-strong)] hover:shadow-[var(--shadow-elevation-2)]",
|
|
591
693
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ g("div", {
|
|
593
695
|
className: "flex items-start gap-4 p-5",
|
|
594
|
-
children: [e.icon ? /* @__PURE__ */
|
|
696
|
+
children: [e.icon ? /* @__PURE__ */ h("img", {
|
|
595
697
|
src: e.icon,
|
|
596
698
|
alt: "",
|
|
597
699
|
className: "size-14 shrink-0 rounded-xl object-cover shadow-sm"
|
|
598
|
-
}) : /* @__PURE__ */
|
|
700
|
+
}) : /* @__PURE__ */ h("div", {
|
|
599
701
|
className: "flex size-14 shrink-0 items-center justify-center rounded-xl bg-[var(--color-surface-muted)] text-sm font-bold text-[var(--color-text-muted)] uppercase",
|
|
600
702
|
children: e.type.slice(0, 2)
|
|
601
|
-
}), /* @__PURE__ */
|
|
703
|
+
}), /* @__PURE__ */ g("div", {
|
|
602
704
|
className: "min-w-0 flex-1",
|
|
603
705
|
children: [
|
|
604
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ g("div", {
|
|
605
707
|
className: "flex flex-wrap items-center gap-2",
|
|
606
708
|
children: [
|
|
607
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ h("h3", {
|
|
608
710
|
className: "text-base font-semibold text-[var(--color-text-primary)]",
|
|
609
711
|
children: e.name
|
|
610
712
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
className: `rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${
|
|
713
|
+
/* @__PURE__ */ h("span", {
|
|
714
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${Ie(e.type)}`,
|
|
613
715
|
children: e.type
|
|
614
716
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${
|
|
717
|
+
/* @__PURE__ */ h("span", {
|
|
718
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Le(e.status)}`,
|
|
617
719
|
children: e.status.replace("_", " ")
|
|
618
720
|
}),
|
|
619
721
|
e.type === "NODE" && e.productId && (() => {
|
|
620
|
-
let t =
|
|
621
|
-
return t ? /* @__PURE__ */
|
|
622
|
-
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${
|
|
623
|
-
title:
|
|
624
|
-
children:
|
|
722
|
+
let t = _(Y[e.productId]?.metadata);
|
|
723
|
+
return t ? /* @__PURE__ */ h("span", {
|
|
724
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Se[t]}`,
|
|
725
|
+
title: v(Y[e.productId]?.metadata) ?? void 0,
|
|
726
|
+
children: xe[t]
|
|
625
727
|
}) : null;
|
|
626
728
|
})()
|
|
627
729
|
]
|
|
628
730
|
}),
|
|
629
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ g("div", {
|
|
630
732
|
className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-[var(--color-text-secondary)]",
|
|
631
733
|
children: [
|
|
632
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ g("span", {
|
|
633
735
|
className: "flex items-center gap-1",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ h(pe, { className: "size-3" }), /* @__PURE__ */ h("span", {
|
|
635
737
|
className: "font-mono",
|
|
636
738
|
children: e.slug
|
|
637
739
|
})]
|
|
638
740
|
}),
|
|
639
|
-
e.publisher && /* @__PURE__ */
|
|
741
|
+
e.publisher && /* @__PURE__ */ g("span", {
|
|
640
742
|
className: "flex items-center gap-1",
|
|
641
743
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ h(ve, { className: "size-3" }),
|
|
643
745
|
e.publisher.name,
|
|
644
|
-
e.publisher.email && /* @__PURE__ */
|
|
746
|
+
e.publisher.email && /* @__PURE__ */ g("span", {
|
|
645
747
|
className: "text-[var(--color-text-muted)]",
|
|
646
748
|
children: [
|
|
647
749
|
"(",
|
|
@@ -651,137 +753,144 @@ var S = () => {
|
|
|
651
753
|
})
|
|
652
754
|
]
|
|
653
755
|
}),
|
|
654
|
-
e.submittedAt && /* @__PURE__ */
|
|
756
|
+
e.submittedAt && /* @__PURE__ */ g("span", {
|
|
655
757
|
className: "flex items-center gap-1",
|
|
656
|
-
children: [/* @__PURE__ */
|
|
758
|
+
children: [/* @__PURE__ */ h(le, { className: "size-3" }), C(e.submittedAt)]
|
|
657
759
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
760
|
+
e.reviewDueAt && /* @__PURE__ */ g("span", {
|
|
761
|
+
className: e.isReviewOverdue ? "inline-flex items-center gap-1 rounded-full bg-[var(--color-status-error-bg-subtle)] px-2 py-0.5 font-semibold text-[var(--color-status-error-text)]" : "flex items-center gap-1",
|
|
762
|
+
children: [e.isReviewOverdue ? "Overdue · was due " : "Due ", C(e.reviewDueAt)]
|
|
763
|
+
}),
|
|
764
|
+
/* @__PURE__ */ g("span", {
|
|
659
765
|
className: "flex items-center gap-1",
|
|
660
|
-
children: [/* @__PURE__ */
|
|
766
|
+
children: [/* @__PURE__ */ h(_e, { className: "size-3" }), t(e.price, e.currency, e.pricingModel)]
|
|
661
767
|
})
|
|
662
768
|
]
|
|
663
769
|
}),
|
|
664
|
-
e.description && /* @__PURE__ */
|
|
770
|
+
e.description && /* @__PURE__ */ h("p", {
|
|
665
771
|
className: "mt-2 line-clamp-2 text-sm text-[var(--color-text-secondary)]",
|
|
666
772
|
children: e.description
|
|
667
773
|
}),
|
|
668
|
-
e.type === "NODE" && e.productId &&
|
|
774
|
+
e.type === "NODE" && e.productId && v(Y[e.productId]?.metadata) && /* @__PURE__ */ h("p", {
|
|
669
775
|
className: "mt-2 text-xs text-[var(--color-status-error-text)]",
|
|
670
|
-
children:
|
|
776
|
+
children: v(Y[e.productId]?.metadata)
|
|
671
777
|
})
|
|
672
778
|
]
|
|
673
779
|
})]
|
|
674
780
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ g("div", {
|
|
676
782
|
className: "flex flex-wrap items-center justify-between gap-2 border-t border-[var(--color-border-seam)] bg-[var(--color-surface-muted)] px-5 py-3",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
783
|
+
children: [/* @__PURE__ */ g("div", {
|
|
678
784
|
className: "flex flex-wrap items-center gap-2",
|
|
679
785
|
children: [
|
|
680
|
-
e.productId && /* @__PURE__ */
|
|
786
|
+
e.productId && /* @__PURE__ */ g("a", {
|
|
681
787
|
href: `/devportal/apps/${e.productId}`,
|
|
682
788
|
target: "_blank",
|
|
683
789
|
rel: "noreferrer",
|
|
684
790
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
685
|
-
children: [/* @__PURE__ */
|
|
791
|
+
children: [/* @__PURE__ */ h(ue, { className: "size-3.5" }), "Devportal"]
|
|
686
792
|
}),
|
|
687
|
-
|
|
688
|
-
let t = e.productId ? Y[e.productId]?.versionId ??
|
|
793
|
+
S.has(e.type) && (() => {
|
|
794
|
+
let t = e.productId ? Y[e.productId]?.versionId ?? V.find((t) => t.id === e.productId)?.versions?.edges?.[0]?.node?.id : void 0;
|
|
689
795
|
if (!t && !e.zipFileUrl) return null;
|
|
690
796
|
let n = X === t;
|
|
691
|
-
return t ? /* @__PURE__ */
|
|
797
|
+
return t ? /* @__PURE__ */ g("button", {
|
|
692
798
|
type: "button",
|
|
693
|
-
onClick: () => void
|
|
799
|
+
onClick: () => void lt(t),
|
|
694
800
|
disabled: n,
|
|
695
801
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors disabled:opacity-50",
|
|
696
|
-
children: [n ? /* @__PURE__ */
|
|
697
|
-
}) : /* @__PURE__ */
|
|
802
|
+
children: [n ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(u, { className: "size-3.5" }), "Download Package"]
|
|
803
|
+
}) : /* @__PURE__ */ g("a", {
|
|
698
804
|
href: e.zipFileUrl,
|
|
699
805
|
download: !0,
|
|
700
806
|
target: "_blank",
|
|
701
807
|
rel: "noreferrer",
|
|
702
808
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
703
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), "Download Package"]
|
|
704
810
|
});
|
|
705
811
|
})(),
|
|
706
|
-
e.type === "NODE" && e.productId && Y[e.productId]?.versionId &&
|
|
812
|
+
e.type === "NODE" && e.productId && Y[e.productId]?.versionId && _(Y[e.productId]?.metadata) !== "READY" && /* @__PURE__ */ g("button", {
|
|
707
813
|
type: "button",
|
|
708
|
-
onClick: () => void
|
|
814
|
+
onClick: () => void ct(Y[e.productId].versionId),
|
|
709
815
|
disabled: W === Y[e.productId]?.versionId,
|
|
710
816
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-accent)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-accent)] hover:bg-[var(--color-surface-accent-muted)] transition-colors disabled:opacity-50",
|
|
711
|
-
children: [W === Y[e.productId]?.versionId ? /* @__PURE__ */
|
|
817
|
+
children: [W === Y[e.productId]?.versionId ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5" }), "Retry Deployment"]
|
|
712
818
|
}),
|
|
713
|
-
|
|
819
|
+
S.has(e.type) && /* @__PURE__ */ g("button", {
|
|
714
820
|
type: "button",
|
|
715
|
-
onClick: () =>
|
|
821
|
+
onClick: () => B(e),
|
|
716
822
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-accent)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-accent)] hover:bg-[var(--color-surface-accent-muted)] transition-colors",
|
|
717
|
-
children: [/* @__PURE__ */
|
|
823
|
+
children: [/* @__PURE__ */ h(de, { className: "size-3.5" }), "Test in workspace"]
|
|
718
824
|
}),
|
|
719
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ g("button", {
|
|
720
826
|
type: "button",
|
|
721
|
-
onClick: () =>
|
|
827
|
+
onClick: () => {
|
|
828
|
+
let t = R !== e.id;
|
|
829
|
+
qe(t ? e.id : null), t && e.type === "WORKFLOW" && ut(e.id);
|
|
830
|
+
},
|
|
722
831
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
723
832
|
children: [
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
|
|
726
|
-
|
|
833
|
+
/* @__PURE__ */ h(d, { className: "size-3.5" }),
|
|
834
|
+
R === e.id ? "Hide details" : "Inspect details",
|
|
835
|
+
R === e.id ? /* @__PURE__ */ h(ce, { className: "size-3" }) : /* @__PURE__ */ h(se, { className: "size-3" })
|
|
727
836
|
]
|
|
728
837
|
})
|
|
729
838
|
]
|
|
730
|
-
}), /* @__PURE__ */
|
|
839
|
+
}), /* @__PURE__ */ g("div", {
|
|
731
840
|
className: "flex items-center gap-2",
|
|
732
841
|
children: [
|
|
733
|
-
e.status !== "PUBLISHED" && /* @__PURE__ */
|
|
842
|
+
e.status !== "PUBLISHED" && /* @__PURE__ */ g("button", {
|
|
734
843
|
type: "button",
|
|
735
|
-
onClick: () => void
|
|
736
|
-
disabled:
|
|
844
|
+
onClick: () => void dt(e.id),
|
|
845
|
+
disabled: M === e.id,
|
|
737
846
|
className: "inline-flex items-center gap-1.5 rounded-md bg-[var(--color-surface-success)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-on-success)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
738
|
-
children: [/* @__PURE__ */
|
|
847
|
+
children: [/* @__PURE__ */ h(oe, { className: "size-3.5" }), "Approve"]
|
|
739
848
|
}),
|
|
740
|
-
e.status === "PENDING_REVIEW" && /* @__PURE__ */
|
|
849
|
+
e.status === "PENDING_REVIEW" && /* @__PURE__ */ g("button", {
|
|
741
850
|
type: "button",
|
|
742
851
|
onClick: () => {
|
|
743
|
-
|
|
852
|
+
F(e.id), L("");
|
|
744
853
|
},
|
|
745
|
-
disabled:
|
|
854
|
+
disabled: M === e.id,
|
|
746
855
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-danger)] hover:bg-[var(--color-surface-danger)] hover:text-[var(--color-text-on-danger)] disabled:opacity-50 transition-colors",
|
|
747
|
-
children: [/* @__PURE__ */ p
|
|
856
|
+
children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), "Reject"]
|
|
748
857
|
}),
|
|
749
|
-
e.status === "PUBLISHED" && /* @__PURE__ */
|
|
858
|
+
e.status === "PUBLISHED" && /* @__PURE__ */ g("button", {
|
|
750
859
|
type: "button",
|
|
751
860
|
onClick: () => {
|
|
752
|
-
|
|
861
|
+
F(e.id), L("");
|
|
753
862
|
},
|
|
754
|
-
disabled:
|
|
863
|
+
disabled: M === e.id,
|
|
755
864
|
className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-warning)] bg-[var(--color-surface-warning-muted)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-warning)] hover:bg-[var(--color-surface-warning)] hover:text-[var(--color-text-on-warning)] disabled:opacity-50 transition-colors",
|
|
756
|
-
children: [/* @__PURE__ */ p
|
|
865
|
+
children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), "Delist"]
|
|
757
866
|
})
|
|
758
867
|
]
|
|
759
868
|
})]
|
|
760
869
|
}),
|
|
761
|
-
|
|
870
|
+
R === e.id && /* @__PURE__ */ g("div", {
|
|
762
871
|
className: "border-t border-[var(--color-border-seam)] bg-[var(--color-surface-muted)] p-5 space-y-5",
|
|
763
872
|
children: [
|
|
764
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ g("div", {
|
|
765
874
|
className: "grid grid-cols-2 gap-x-8 gap-y-3 text-xs sm:grid-cols-3",
|
|
766
875
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
768
877
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
769
878
|
children: "Store product ID"
|
|
770
|
-
}), /* @__PURE__ */
|
|
879
|
+
}), /* @__PURE__ */ h("dd", {
|
|
771
880
|
className: "mt-0.5 font-mono text-[var(--color-text-primary)] break-all",
|
|
772
881
|
children: e.id
|
|
773
882
|
})] }),
|
|
774
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
775
884
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
776
885
|
children: "Slug"
|
|
777
|
-
}), /* @__PURE__ */
|
|
886
|
+
}), /* @__PURE__ */ h("dd", {
|
|
778
887
|
className: "mt-0.5 font-mono text-[var(--color-text-primary)]",
|
|
779
888
|
children: e.slug
|
|
780
889
|
})] }),
|
|
781
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
782
891
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
783
892
|
children: "Type / Nature"
|
|
784
|
-
}), /* @__PURE__ */
|
|
893
|
+
}), /* @__PURE__ */ g("dd", {
|
|
785
894
|
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
786
895
|
children: [
|
|
787
896
|
e.type,
|
|
@@ -789,22 +898,22 @@ var S = () => {
|
|
|
789
898
|
e.nature
|
|
790
899
|
]
|
|
791
900
|
})] }),
|
|
792
|
-
e.category && /* @__PURE__ */
|
|
901
|
+
e.category && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
793
902
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
794
903
|
children: "Category"
|
|
795
|
-
}), /* @__PURE__ */
|
|
904
|
+
}), /* @__PURE__ */ h("dd", {
|
|
796
905
|
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
797
906
|
children: e.category
|
|
798
907
|
})] }),
|
|
799
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
800
909
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
801
910
|
children: "Pricing"
|
|
802
|
-
}), /* @__PURE__ */
|
|
911
|
+
}), /* @__PURE__ */ g("dd", {
|
|
803
912
|
className: "mt-0.5 text-[var(--color-text-primary)]",
|
|
804
913
|
children: [
|
|
805
914
|
t(e.price, e.currency, e.pricingModel),
|
|
806
915
|
" ",
|
|
807
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ g("span", {
|
|
808
917
|
className: "text-[var(--color-text-muted)]",
|
|
809
918
|
children: [
|
|
810
919
|
"(",
|
|
@@ -814,81 +923,95 @@ var S = () => {
|
|
|
814
923
|
})
|
|
815
924
|
]
|
|
816
925
|
})] }),
|
|
817
|
-
e.productId && /* @__PURE__ */
|
|
926
|
+
e.productId && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
818
927
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
819
928
|
children: "Devportal app ID"
|
|
820
|
-
}), /* @__PURE__ */
|
|
929
|
+
}), /* @__PURE__ */ h("dd", {
|
|
821
930
|
className: "mt-0.5 font-mono text-[var(--color-text-primary)] break-all",
|
|
822
931
|
children: e.productId
|
|
823
932
|
})] }),
|
|
824
|
-
e.submittedBy && /* @__PURE__ */
|
|
933
|
+
e.submittedBy && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
|
|
825
934
|
className: "font-medium text-[var(--color-text-secondary)]",
|
|
826
935
|
children: "Submitted by (actor)"
|
|
827
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ h("dd", {
|
|
828
937
|
className: "mt-0.5 font-mono text-[var(--color-text-primary)] break-all",
|
|
829
938
|
children: e.submittedBy
|
|
830
939
|
})] })
|
|
831
940
|
]
|
|
832
941
|
}),
|
|
833
|
-
e.requiredPermissions && e.requiredPermissions.length > 0 && /* @__PURE__ */
|
|
942
|
+
e.requiredPermissions && e.requiredPermissions.length > 0 && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h4", {
|
|
834
943
|
className: "mb-2 flex items-center gap-1.5 text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wide",
|
|
835
|
-
children: [/* @__PURE__ */
|
|
836
|
-
}), /* @__PURE__ */
|
|
944
|
+
children: [/* @__PURE__ */ h(ge, { className: "size-3.5 text-[var(--color-status-success-text)]" }), "Required Permissions"]
|
|
945
|
+
}), /* @__PURE__ */ h("div", {
|
|
837
946
|
className: "flex flex-wrap gap-1.5",
|
|
838
|
-
children: e.requiredPermissions.map((e) => /* @__PURE__ */
|
|
947
|
+
children: e.requiredPermissions.map((e) => /* @__PURE__ */ h("span", {
|
|
839
948
|
className: "inline-flex items-center gap-1 rounded-md bg-[var(--color-surface-default)] border border-[var(--color-border-seam)] px-2 py-1 text-xs font-mono text-[var(--color-text-primary)]",
|
|
840
949
|
children: e
|
|
841
950
|
}, e))
|
|
842
951
|
})] }),
|
|
843
|
-
e.
|
|
952
|
+
e.type === "WORKFLOW" && (() => {
|
|
953
|
+
let t = E[e.id];
|
|
954
|
+
return !t || t.state === "loading" ? /* @__PURE__ */ g("p", {
|
|
955
|
+
className: "flex items-center gap-2 text-xs text-[var(--color-text-muted)]",
|
|
956
|
+
children: [/* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }), "Loading template contents…"]
|
|
957
|
+
}) : t.state === "error" ? /* @__PURE__ */ g("p", {
|
|
958
|
+
role: "alert",
|
|
959
|
+
className: "text-xs text-[var(--color-text-danger)]",
|
|
960
|
+
children: ["Could not load the template contents: ", t.message]
|
|
961
|
+
}) : t.preview ? /* @__PURE__ */ h(ee, { preview: t.preview }) : /* @__PURE__ */ h("p", {
|
|
962
|
+
className: "text-xs text-[var(--color-text-muted)]",
|
|
963
|
+
children: "This submission has no workflow definition to preview."
|
|
964
|
+
});
|
|
965
|
+
})(),
|
|
966
|
+
e.manifest && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h4", {
|
|
844
967
|
className: "mb-2 flex items-center gap-1.5 text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wide",
|
|
845
|
-
children: [/* @__PURE__ */
|
|
846
|
-
}), /* @__PURE__ */
|
|
968
|
+
children: [/* @__PURE__ */ h(d, { className: "size-3.5" }), "Manifest"]
|
|
969
|
+
}), /* @__PURE__ */ h("pre", {
|
|
847
970
|
className: "overflow-x-auto rounded-lg border border-[var(--color-border-seam)] bg-[var(--color-surface-default)] p-4 text-[11px] leading-relaxed text-[var(--color-text-primary)] max-h-72 overflow-y-auto scrollbar-thin",
|
|
848
971
|
children: JSON.stringify(e.manifest, null, 2)
|
|
849
972
|
})] })
|
|
850
973
|
]
|
|
851
974
|
}),
|
|
852
|
-
|
|
975
|
+
Ke === e.id && /* @__PURE__ */ g("div", {
|
|
853
976
|
className: `border-t border-[var(--color-border-seam)] px-5 py-4 ${e.status === "PUBLISHED" ? "bg-[var(--color-surface-warning-muted)]/30" : "bg-[var(--color-surface-danger-muted)]/30"}`,
|
|
854
977
|
children: [
|
|
855
|
-
e.status === "PUBLISHED" ? /* @__PURE__ */
|
|
978
|
+
e.status === "PUBLISHED" ? /* @__PURE__ */ h("p", {
|
|
856
979
|
className: "mb-2 text-xs font-semibold text-[var(--color-text-warning)]",
|
|
857
980
|
children: "Delist — this removes the product from the store for new users. Existing installs keep working. Reason is optional."
|
|
858
|
-
}) : /* @__PURE__ */
|
|
981
|
+
}) : /* @__PURE__ */ h("p", {
|
|
859
982
|
className: "mb-2 text-xs font-semibold text-[var(--color-text-danger)]",
|
|
860
983
|
children: "Reject — provide a reason (the publisher will see this)"
|
|
861
984
|
}),
|
|
862
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ h("textarea", {
|
|
863
986
|
id: `reject-reason-${e.id}`,
|
|
864
987
|
"aria-label": e.status === "PUBLISHED" ? "Delist reason" : "Rejection reason",
|
|
865
|
-
value:
|
|
866
|
-
onChange: (e) =>
|
|
988
|
+
value: I,
|
|
989
|
+
onChange: (e) => L(e.target.value),
|
|
867
990
|
rows: 3,
|
|
868
991
|
required: e.status !== "PUBLISHED",
|
|
869
992
|
"aria-required": e.status !== "PUBLISHED",
|
|
870
993
|
className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] focus:border-[var(--color-border-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none",
|
|
871
994
|
placeholder: e.status === "PUBLISHED" ? "Optional — reason for delisting…" : "Be specific — e.g. 'Manifest is missing the identity.version field' or 'ZIP file is empty'…"
|
|
872
995
|
}),
|
|
873
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ g("div", {
|
|
874
997
|
className: "mt-2 flex items-center justify-end gap-2",
|
|
875
|
-
children: [/* @__PURE__ */
|
|
998
|
+
children: [/* @__PURE__ */ h("button", {
|
|
876
999
|
type: "button",
|
|
877
1000
|
onClick: () => {
|
|
878
|
-
|
|
1001
|
+
F(null), L("");
|
|
879
1002
|
},
|
|
880
1003
|
className: "rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
881
1004
|
children: "Cancel"
|
|
882
|
-
}), e.status === "PUBLISHED" ? /* @__PURE__ */
|
|
1005
|
+
}), e.status === "PUBLISHED" ? /* @__PURE__ */ h("button", {
|
|
883
1006
|
type: "button",
|
|
884
|
-
onClick: () => void
|
|
885
|
-
disabled:
|
|
1007
|
+
onClick: () => void pt(e.id),
|
|
1008
|
+
disabled: M === e.id,
|
|
886
1009
|
className: "rounded-md bg-[var(--color-surface-warning)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-warning)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
887
1010
|
children: "Confirm delist"
|
|
888
|
-
}) : /* @__PURE__ */
|
|
1011
|
+
}) : /* @__PURE__ */ h("button", {
|
|
889
1012
|
type: "button",
|
|
890
|
-
onClick: () => void
|
|
891
|
-
disabled: !
|
|
1013
|
+
onClick: () => void ft(e.id),
|
|
1014
|
+
disabled: !I.trim() || M === e.id,
|
|
892
1015
|
className: "rounded-md bg-[var(--color-surface-danger)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-danger)] hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
893
1016
|
children: "Submit rejection"
|
|
894
1017
|
})]
|
|
@@ -897,23 +1020,33 @@ var S = () => {
|
|
|
897
1020
|
})
|
|
898
1021
|
]
|
|
899
1022
|
}, e.id))
|
|
1023
|
+
}),
|
|
1024
|
+
P !== "VERSION_UPDATES" && P !== "TEMPLATE_REVISIONS" && Be && w.length > 0 && /* @__PURE__ */ h("div", {
|
|
1025
|
+
className: "flex justify-center",
|
|
1026
|
+
children: /* @__PURE__ */ g("button", {
|
|
1027
|
+
type: "button",
|
|
1028
|
+
onClick: () => void $(P, w.length),
|
|
1029
|
+
disabled: k,
|
|
1030
|
+
className: "inline-flex items-center gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-4 py-1.5 text-sm text-[var(--color-text-primary)] transition-colors hover:bg-[var(--color-surface-hover)] disabled:opacity-50",
|
|
1031
|
+
children: [k && /* @__PURE__ */ h(f, { className: "size-4 animate-spin" }), "Load more"]
|
|
1032
|
+
})
|
|
900
1033
|
})
|
|
901
1034
|
]
|
|
902
1035
|
}),
|
|
903
|
-
|
|
1036
|
+
z && /* @__PURE__ */ h(a, {
|
|
904
1037
|
isOpen: !0,
|
|
905
|
-
onClose: () =>
|
|
1038
|
+
onClose: () => B(null),
|
|
906
1039
|
app: {
|
|
907
|
-
id:
|
|
908
|
-
name:
|
|
909
|
-
slug:
|
|
910
|
-
icon:
|
|
911
|
-
type:
|
|
912
|
-
permissions:
|
|
1040
|
+
id: z.id,
|
|
1041
|
+
name: z.name,
|
|
1042
|
+
slug: z.slug,
|
|
1043
|
+
icon: z.icon ?? void 0,
|
|
1044
|
+
type: z.type,
|
|
1045
|
+
permissions: z.requiredPermissions?.length ? z.requiredPermissions : void 0
|
|
913
1046
|
},
|
|
914
1047
|
purchaseState: "free",
|
|
915
1048
|
onInstallSuccess: () => {
|
|
916
|
-
|
|
1049
|
+
B(null);
|
|
917
1050
|
},
|
|
918
1051
|
onInstallError: () => {}
|
|
919
1052
|
})
|
|
@@ -921,6 +1054,6 @@ var S = () => {
|
|
|
921
1054
|
});
|
|
922
1055
|
};
|
|
923
1056
|
//#endregion
|
|
924
|
-
export {
|
|
1057
|
+
export { w as AdminSubmissionsQueuePage };
|
|
925
1058
|
|
|
926
1059
|
//# sourceMappingURL=AdminSubmissionsQueuePage.js.map
|