@burdenoff/microfe-store 2026.1031.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/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 +189 -169
- 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,15 +1,16 @@
|
|
|
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 {
|
|
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";
|
|
10
11
|
import { graphqlFetch as m } from "@burdenoff/fe-libs/shared/graphql";
|
|
11
12
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
-
import { IllustratedEmptyState as
|
|
13
|
+
import { IllustratedEmptyState as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/pages/AdminSubmissionsQueuePage.tsx
|
|
14
15
|
function _(e) {
|
|
15
16
|
let t = e?.sandboxBuildStatus;
|
|
@@ -19,26 +20,26 @@ function v(e) {
|
|
|
19
20
|
let t = e?.sandboxBuildError;
|
|
20
21
|
return typeof t == "string" ? t : null;
|
|
21
22
|
}
|
|
22
|
-
var
|
|
23
|
+
var xe = {
|
|
23
24
|
PENDING: "Build pending",
|
|
24
25
|
READY: "Build ready",
|
|
25
26
|
FAILED: "Build failed",
|
|
26
27
|
DISPATCH_FAILED: "Dispatch failed",
|
|
27
28
|
UNSUPPORTED: "Unsupported provider"
|
|
28
|
-
},
|
|
29
|
+
}, Se = {
|
|
29
30
|
PENDING: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
30
31
|
READY: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
31
32
|
FAILED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
|
|
32
33
|
DISPATCH_FAILED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
|
|
33
34
|
UNSUPPORTED: "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]"
|
|
34
|
-
},
|
|
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 = `
|
|
35
36
|
query AdminWorkflowTemplatePreview($id: ID!) {
|
|
36
37
|
product(id: $id) {
|
|
37
38
|
id
|
|
38
|
-
workflowTemplatePreview { ${
|
|
39
|
+
workflowTemplatePreview { ${o} }
|
|
39
40
|
}
|
|
40
41
|
}
|
|
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 = [
|
|
42
43
|
{
|
|
43
44
|
label: "Pending review",
|
|
44
45
|
value: "PENDING_REVIEW"
|
|
@@ -63,16 +64,16 @@ var ye = {
|
|
|
63
64
|
label: "All",
|
|
64
65
|
value: "ALL"
|
|
65
66
|
}
|
|
66
|
-
],
|
|
67
|
+
], b = {
|
|
67
68
|
NODE: "bg-[var(--color-status-info-bg-subtle)] text-[var(--color-status-info-text)]",
|
|
68
69
|
WORKFLOW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
69
70
|
INTEGRATION: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
70
71
|
VIBEMODULE: "bg-[var(--color-surface-accent-muted)] text-[var(--color-text-accent)]"
|
|
71
|
-
},
|
|
72
|
+
}, x = {
|
|
72
73
|
PENDING_REVIEW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
|
|
73
74
|
PUBLISHED: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
|
|
74
75
|
REJECTED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]"
|
|
75
|
-
},
|
|
76
|
+
}, S = new Set([
|
|
76
77
|
"NODE",
|
|
77
78
|
"WORKFLOW",
|
|
78
79
|
"VIBEMODULE",
|
|
@@ -80,13 +81,13 @@ var ye = {
|
|
|
80
81
|
"DATASINK",
|
|
81
82
|
"CONSOLE"
|
|
82
83
|
]);
|
|
83
|
-
function
|
|
84
|
-
return
|
|
84
|
+
function Ie(e) {
|
|
85
|
+
return b[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
87
|
+
function Le(e) {
|
|
88
|
+
return x[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function C(e) {
|
|
90
91
|
return e ? new Date(e).toLocaleString(void 0, {
|
|
91
92
|
month: "short",
|
|
92
93
|
day: "numeric",
|
|
@@ -96,56 +97,67 @@ function Fe(e) {
|
|
|
96
97
|
}) : "—";
|
|
97
98
|
}
|
|
98
99
|
var w = () => {
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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(() => {
|
|
105
117
|
let e = !1;
|
|
106
118
|
return (async () => {
|
|
107
119
|
try {
|
|
108
120
|
let t = await m({
|
|
109
121
|
gateway: "global",
|
|
110
|
-
query:
|
|
111
|
-
authToken:
|
|
122
|
+
query: te,
|
|
123
|
+
authToken: b || void 0
|
|
112
124
|
});
|
|
113
|
-
e ||
|
|
125
|
+
e || nt(t.data?.pendingWorkflowTemplateRevisions.totalCount ?? 0);
|
|
114
126
|
} catch {}
|
|
115
127
|
})(), () => {
|
|
116
128
|
e = !0;
|
|
117
129
|
};
|
|
118
|
-
}, [
|
|
119
|
-
let Q =
|
|
120
|
-
|
|
130
|
+
}, [b]);
|
|
131
|
+
let Q = s(async () => {
|
|
132
|
+
A(!0), j(null);
|
|
121
133
|
try {
|
|
122
134
|
let e = await m({
|
|
123
135
|
gateway: "global",
|
|
124
|
-
query:
|
|
136
|
+
query: je,
|
|
125
137
|
variables: {
|
|
126
138
|
limit: 20,
|
|
127
139
|
offset: 0
|
|
128
140
|
},
|
|
129
|
-
authToken:
|
|
141
|
+
authToken: b || void 0
|
|
130
142
|
});
|
|
131
143
|
if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load version updates");
|
|
132
|
-
|
|
144
|
+
Je((e.data?.applicationsWithPendingVersions.edges ?? []).map((e) => e.node)), Xe(e.data?.applicationsWithPendingVersions.totalCount ?? 0);
|
|
133
145
|
} catch (e) {
|
|
134
146
|
j(e instanceof Error ? e.message : "Failed to load version updates");
|
|
135
147
|
} finally {
|
|
136
|
-
|
|
148
|
+
A(!1);
|
|
137
149
|
}
|
|
138
|
-
}, [
|
|
150
|
+
}, [b]), ot = async (e, t, n) => {
|
|
139
151
|
U(e), j(null);
|
|
140
152
|
try {
|
|
141
153
|
let t = await m({
|
|
142
154
|
gateway: "global",
|
|
143
|
-
query:
|
|
155
|
+
query: Me,
|
|
144
156
|
variables: {
|
|
145
157
|
id: e,
|
|
146
158
|
notes: n || null
|
|
147
159
|
},
|
|
148
|
-
authToken:
|
|
160
|
+
authToken: b || void 0
|
|
149
161
|
});
|
|
150
162
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
|
|
151
163
|
await Q();
|
|
@@ -154,7 +166,7 @@ var w = () => {
|
|
|
154
166
|
} finally {
|
|
155
167
|
U(null);
|
|
156
168
|
}
|
|
157
|
-
},
|
|
169
|
+
}, st = async (e, t, n) => {
|
|
158
170
|
if (!n.trim()) {
|
|
159
171
|
j("Rejection reason is required");
|
|
160
172
|
return;
|
|
@@ -163,12 +175,12 @@ var w = () => {
|
|
|
163
175
|
try {
|
|
164
176
|
let t = await m({
|
|
165
177
|
gateway: "global",
|
|
166
|
-
query:
|
|
178
|
+
query: Ne,
|
|
167
179
|
variables: {
|
|
168
180
|
id: e,
|
|
169
181
|
reason: n.trim()
|
|
170
182
|
},
|
|
171
|
-
authToken:
|
|
183
|
+
authToken: b || void 0
|
|
172
184
|
});
|
|
173
185
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
|
|
174
186
|
G(null), q(""), J(null), await Q();
|
|
@@ -177,84 +189,84 @@ var w = () => {
|
|
|
177
189
|
} finally {
|
|
178
190
|
U(null);
|
|
179
191
|
}
|
|
180
|
-
},
|
|
181
|
-
|
|
192
|
+
}, ct = async (e) => {
|
|
193
|
+
Ze(e), j(null);
|
|
182
194
|
try {
|
|
183
195
|
let t = await m({
|
|
184
196
|
gateway: "global",
|
|
185
|
-
query:
|
|
197
|
+
query: Pe,
|
|
186
198
|
variables: { id: e },
|
|
187
|
-
authToken:
|
|
199
|
+
authToken: b || void 0
|
|
188
200
|
});
|
|
189
201
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Retry failed");
|
|
190
202
|
await Promise.all([Q(), $(P)]);
|
|
191
203
|
} catch (e) {
|
|
192
204
|
j(e instanceof Error ? e.message : "Retry failed");
|
|
193
205
|
} finally {
|
|
194
|
-
|
|
206
|
+
Ze(null);
|
|
195
207
|
}
|
|
196
|
-
}, $ =
|
|
197
|
-
let n =
|
|
208
|
+
}, $ = s(async (e, t = 0) => {
|
|
209
|
+
let n = ++rt.current, r = () => n === rt.current;
|
|
198
210
|
if (e === "VERSION_UPDATES") {
|
|
199
211
|
await Q();
|
|
200
212
|
return;
|
|
201
213
|
}
|
|
202
214
|
if (e === "TEMPLATE_REVISIONS") {
|
|
203
|
-
|
|
215
|
+
A(!1), at((e) => e + 1);
|
|
204
216
|
return;
|
|
205
217
|
}
|
|
206
|
-
|
|
218
|
+
A(!0), j(null), t === 0 && (O.current = {}, D({}));
|
|
207
219
|
try {
|
|
208
220
|
if (e === "PENDING_REVIEW") {
|
|
209
221
|
let e = await m({
|
|
210
222
|
gateway: "global",
|
|
211
|
-
query:
|
|
223
|
+
query: Ce,
|
|
212
224
|
variables: {
|
|
213
|
-
limit:
|
|
225
|
+
limit: y,
|
|
214
226
|
offset: t
|
|
215
227
|
},
|
|
216
|
-
authToken:
|
|
228
|
+
authToken: b || void 0
|
|
217
229
|
});
|
|
218
230
|
if (!r()) return;
|
|
219
231
|
if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load pending products");
|
|
220
232
|
let n = e.data?.pendingReviewProducts.products ?? [], i = e.data?.pendingReviewProducts.totalCount ?? 0;
|
|
221
|
-
|
|
233
|
+
Re((e) => t > 0 ? [...e, ...n] : n), ze(i), Ve(t + n.length < i);
|
|
222
234
|
} else {
|
|
223
235
|
let n = await m({
|
|
224
236
|
gateway: "global",
|
|
225
|
-
query:
|
|
237
|
+
query: we,
|
|
226
238
|
variables: {
|
|
227
|
-
limit:
|
|
239
|
+
limit: y,
|
|
228
240
|
offset: t,
|
|
229
241
|
...e !== "ALL" && { status: e }
|
|
230
242
|
},
|
|
231
|
-
authToken:
|
|
243
|
+
authToken: b || void 0
|
|
232
244
|
});
|
|
233
245
|
if (!r()) return;
|
|
234
246
|
if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Failed to load products");
|
|
235
247
|
let i = n.data?.products ?? [];
|
|
236
|
-
|
|
248
|
+
Re((e) => t > 0 ? [...e, ...i] : i), ze((e) => t > 0 ? e + i.length : i.length), Ve(i.length === y);
|
|
237
249
|
}
|
|
238
250
|
} catch (e) {
|
|
239
251
|
r() && j(e instanceof Error ? e.message : "Failed to load products");
|
|
240
252
|
} finally {
|
|
241
|
-
r() &&
|
|
253
|
+
r() && A(!1);
|
|
242
254
|
}
|
|
243
|
-
}, [
|
|
244
|
-
|
|
255
|
+
}, [b, Q]);
|
|
256
|
+
c(() => {
|
|
245
257
|
$(P);
|
|
246
|
-
}, [$, P]),
|
|
258
|
+
}, [$, P]), c(() => {
|
|
247
259
|
Q();
|
|
248
|
-
}, [Q]),
|
|
249
|
-
let e = w.filter((e) => e.productId && (e.type === "NODE" ||
|
|
260
|
+
}, [Q]), c(() => {
|
|
261
|
+
let e = w.filter((e) => e.productId && (e.type === "NODE" || S.has(e.type) && !e.zipFileUrl));
|
|
250
262
|
e.length !== 0 && (async () => {
|
|
251
263
|
let t = await Promise.allSettled(e.map((e) => m({
|
|
252
264
|
gateway: "global",
|
|
253
|
-
query:
|
|
265
|
+
query: ke,
|
|
254
266
|
variables: { id: e.productId },
|
|
255
|
-
authToken:
|
|
267
|
+
authToken: b || void 0
|
|
256
268
|
})));
|
|
257
|
-
|
|
269
|
+
et((n) => {
|
|
258
270
|
let r = { ...n };
|
|
259
271
|
return t.forEach((t, n) => {
|
|
260
272
|
if (t.status === "fulfilled") {
|
|
@@ -268,42 +280,42 @@ var w = () => {
|
|
|
268
280
|
}), r;
|
|
269
281
|
});
|
|
270
282
|
})();
|
|
271
|
-
}, [w,
|
|
272
|
-
let
|
|
273
|
-
|
|
283
|
+
}, [w, b]);
|
|
284
|
+
let lt = async (e) => {
|
|
285
|
+
tt(e);
|
|
274
286
|
try {
|
|
275
287
|
let t = (await m({
|
|
276
288
|
gateway: "global",
|
|
277
|
-
query:
|
|
289
|
+
query: Ae,
|
|
278
290
|
variables: { id: e },
|
|
279
|
-
authToken:
|
|
291
|
+
authToken: b || void 0
|
|
280
292
|
})).data?.refreshApplicationVersionPackageUrl;
|
|
281
293
|
t ? window.open(t, "_blank", "noreferrer") : j("Could not generate a download URL. S3 credentials may not be configured.");
|
|
282
294
|
} catch (e) {
|
|
283
295
|
j(e instanceof Error ? e.message : "Failed to refresh download URL");
|
|
284
296
|
} finally {
|
|
285
|
-
|
|
297
|
+
tt(null);
|
|
286
298
|
}
|
|
287
|
-
},
|
|
288
|
-
let t =
|
|
299
|
+
}, ut = s(async (e) => {
|
|
300
|
+
let t = O.current[e]?.state;
|
|
289
301
|
if (!(t === "loaded" || t === "loading")) {
|
|
290
|
-
|
|
291
|
-
...
|
|
302
|
+
O.current = {
|
|
303
|
+
...O.current,
|
|
292
304
|
[e]: { state: "loading" }
|
|
293
|
-
},
|
|
305
|
+
}, D((t) => ({
|
|
294
306
|
...t,
|
|
295
307
|
[e]: { state: "loading" }
|
|
296
308
|
}));
|
|
297
309
|
try {
|
|
298
310
|
let t = await m({
|
|
299
311
|
gateway: "global",
|
|
300
|
-
query:
|
|
312
|
+
query: Te,
|
|
301
313
|
variables: { id: e },
|
|
302
|
-
authToken:
|
|
314
|
+
authToken: b || void 0
|
|
303
315
|
});
|
|
304
316
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to load the template contents");
|
|
305
317
|
let n = t.data?.product?.workflowTemplatePreview ?? null;
|
|
306
|
-
|
|
318
|
+
D((t) => ({
|
|
307
319
|
...t,
|
|
308
320
|
[e]: {
|
|
309
321
|
state: "loaded",
|
|
@@ -312,7 +324,7 @@ var w = () => {
|
|
|
312
324
|
}));
|
|
313
325
|
} catch (t) {
|
|
314
326
|
let n = t instanceof Error ? t.message : "Failed to load the template contents";
|
|
315
|
-
|
|
327
|
+
D((t) => ({
|
|
316
328
|
...t,
|
|
317
329
|
[e]: {
|
|
318
330
|
state: "error",
|
|
@@ -321,17 +333,17 @@ var w = () => {
|
|
|
321
333
|
}));
|
|
322
334
|
}
|
|
323
335
|
}
|
|
324
|
-
}, [
|
|
336
|
+
}, [b]), dt = async (e) => {
|
|
325
337
|
N(e), j(null);
|
|
326
338
|
try {
|
|
327
339
|
let t = await m({
|
|
328
340
|
gateway: "global",
|
|
329
|
-
query:
|
|
341
|
+
query: Ee,
|
|
330
342
|
variables: {
|
|
331
343
|
id: e,
|
|
332
344
|
notes: null
|
|
333
345
|
},
|
|
334
|
-
authToken:
|
|
346
|
+
authToken: b || void 0
|
|
335
347
|
});
|
|
336
348
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
|
|
337
349
|
await $(P);
|
|
@@ -340,7 +352,7 @@ var w = () => {
|
|
|
340
352
|
} finally {
|
|
341
353
|
N(null);
|
|
342
354
|
}
|
|
343
|
-
},
|
|
355
|
+
}, ft = async (e) => {
|
|
344
356
|
if (!I.trim()) {
|
|
345
357
|
j("Rejection reason is required");
|
|
346
358
|
return;
|
|
@@ -349,12 +361,12 @@ var w = () => {
|
|
|
349
361
|
try {
|
|
350
362
|
let t = await m({
|
|
351
363
|
gateway: "global",
|
|
352
|
-
query:
|
|
364
|
+
query: De,
|
|
353
365
|
variables: {
|
|
354
366
|
id: e,
|
|
355
367
|
reason: I.trim()
|
|
356
368
|
},
|
|
357
|
-
authToken:
|
|
369
|
+
authToken: b || void 0
|
|
358
370
|
});
|
|
359
371
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
|
|
360
372
|
F(null), L(""), await $(P);
|
|
@@ -363,17 +375,17 @@ var w = () => {
|
|
|
363
375
|
} finally {
|
|
364
376
|
N(null);
|
|
365
377
|
}
|
|
366
|
-
},
|
|
378
|
+
}, pt = async (e) => {
|
|
367
379
|
N(e), j(null);
|
|
368
380
|
try {
|
|
369
381
|
let t = await m({
|
|
370
382
|
gateway: "global",
|
|
371
|
-
query:
|
|
383
|
+
query: Oe,
|
|
372
384
|
variables: {
|
|
373
385
|
id: e,
|
|
374
386
|
reason: I.trim() || void 0
|
|
375
387
|
},
|
|
376
|
-
authToken:
|
|
388
|
+
authToken: b || void 0
|
|
377
389
|
});
|
|
378
390
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Delist failed");
|
|
379
391
|
F(null), L(""), await $(P);
|
|
@@ -382,7 +394,7 @@ var w = () => {
|
|
|
382
394
|
} finally {
|
|
383
395
|
N(null);
|
|
384
396
|
}
|
|
385
|
-
},
|
|
397
|
+
}, mt = w.filter((e) => e.status === "PENDING_REVIEW").length;
|
|
386
398
|
return /* @__PURE__ */ g("div", {
|
|
387
399
|
className: "min-h-screen bg-[var(--color-surface-default)]",
|
|
388
400
|
children: [
|
|
@@ -397,47 +409,51 @@ var w = () => {
|
|
|
397
409
|
children: [
|
|
398
410
|
/* @__PURE__ */ g("button", {
|
|
399
411
|
type: "button",
|
|
400
|
-
onClick: () =>
|
|
412
|
+
onClick: () => o(`${x}/dashboard`),
|
|
401
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",
|
|
402
|
-
children: [/* @__PURE__ */ h(
|
|
414
|
+
children: [/* @__PURE__ */ h(ae, { className: "size-4 shrink-0" }), "Back"]
|
|
403
415
|
}),
|
|
404
416
|
/* @__PURE__ */ h("div", { className: "h-5 w-px bg-[var(--color-border-seam)]" }),
|
|
405
|
-
/* @__PURE__ */ h(
|
|
417
|
+
/* @__PURE__ */ h(he, { className: "size-5 shrink-0 text-[var(--color-text-primary)]" }),
|
|
406
418
|
/* @__PURE__ */ h("h1", {
|
|
407
419
|
className: "text-lg font-semibold text-[var(--color-text-primary)] truncate",
|
|
408
420
|
children: "Submission Queue"
|
|
409
421
|
}),
|
|
410
|
-
|
|
422
|
+
T > 0 && /* @__PURE__ */ h("span", {
|
|
411
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)]",
|
|
412
|
-
children:
|
|
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"]
|
|
413
429
|
})
|
|
414
430
|
]
|
|
415
431
|
}), /* @__PURE__ */ g("button", {
|
|
416
432
|
type: "button",
|
|
417
433
|
onClick: () => void $(P),
|
|
418
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",
|
|
419
|
-
disabled:
|
|
420
|
-
children: [/* @__PURE__ */ h(f, { className: `size-4 ${
|
|
435
|
+
disabled: k,
|
|
436
|
+
children: [/* @__PURE__ */ h(f, { className: `size-4 ${k ? "animate-spin" : ""}` }), "Refresh"]
|
|
421
437
|
})]
|
|
422
438
|
}), /* @__PURE__ */ h("div", {
|
|
423
439
|
className: "mt-3 flex gap-1.5 flex-wrap",
|
|
424
|
-
children:
|
|
440
|
+
children: Fe.map((e) => /* @__PURE__ */ g("button", {
|
|
425
441
|
type: "button",
|
|
426
|
-
onClick: () =>
|
|
442
|
+
onClick: () => Ge(e.value),
|
|
427
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)]"}`,
|
|
428
444
|
children: [
|
|
429
445
|
e.label,
|
|
430
|
-
e.value === "PENDING_REVIEW" &&
|
|
446
|
+
e.value === "PENDING_REVIEW" && mt > 0 && P !== "PENDING_REVIEW" && /* @__PURE__ */ h("span", {
|
|
431
447
|
className: "ml-1.5 rounded-full bg-[var(--color-status-warning-text)] px-1.5 py-0.5 text-[10px] text-white",
|
|
432
|
-
children:
|
|
448
|
+
children: mt
|
|
433
449
|
}),
|
|
434
|
-
e.value === "TEMPLATE_REVISIONS" &&
|
|
450
|
+
e.value === "TEMPLATE_REVISIONS" && Z > 0 && P !== "TEMPLATE_REVISIONS" && /* @__PURE__ */ h("span", {
|
|
435
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)]",
|
|
436
|
-
children:
|
|
452
|
+
children: Z
|
|
437
453
|
}),
|
|
438
|
-
e.value === "VERSION_UPDATES" &&
|
|
454
|
+
e.value === "VERSION_UPDATES" && Ye > 0 && P !== "VERSION_UPDATES" && /* @__PURE__ */ h("span", {
|
|
439
455
|
className: "ml-1.5 rounded-full bg-[var(--color-status-info-text)] px-1.5 py-0.5 text-[10px] text-white",
|
|
440
|
-
children:
|
|
456
|
+
children: Ye
|
|
441
457
|
})
|
|
442
458
|
]
|
|
443
459
|
}, e.value))
|
|
@@ -447,23 +463,23 @@ var w = () => {
|
|
|
447
463
|
/* @__PURE__ */ g("main", {
|
|
448
464
|
className: "mx-auto max-w-5xl space-y-4 p-6",
|
|
449
465
|
children: [
|
|
450
|
-
/* @__PURE__ */ h(
|
|
466
|
+
/* @__PURE__ */ h(be, {
|
|
451
467
|
className: "mb-2",
|
|
452
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."
|
|
453
469
|
}),
|
|
454
|
-
|
|
470
|
+
We && /* @__PURE__ */ h("div", {
|
|
455
471
|
role: "alert",
|
|
456
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)]",
|
|
457
|
-
children:
|
|
473
|
+
children: We
|
|
458
474
|
}),
|
|
459
|
-
P === "TEMPLATE_REVISIONS" ? /* @__PURE__ */ h(
|
|
460
|
-
authToken:
|
|
461
|
-
onCountChange:
|
|
462
|
-
refreshKey:
|
|
463
|
-
}) : P === "VERSION_UPDATES" ?
|
|
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", {
|
|
464
480
|
className: "flex items-center justify-center py-24",
|
|
465
481
|
children: /* @__PURE__ */ h(f, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
|
|
466
|
-
}) : V.length === 0 ? /* @__PURE__ */ h(
|
|
482
|
+
}) : V.length === 0 ? /* @__PURE__ */ h(ye, {
|
|
467
483
|
illustration: "empty-data",
|
|
468
484
|
title: "No pending version updates",
|
|
469
485
|
description: "All published apps are up to date. When a developer submits a new version, it will appear here for your review."
|
|
@@ -494,7 +510,7 @@ var w = () => {
|
|
|
494
510
|
}), /* @__PURE__ */ g("span", {
|
|
495
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)]",
|
|
496
512
|
children: [
|
|
497
|
-
/* @__PURE__ */ h(
|
|
513
|
+
/* @__PURE__ */ h(fe, { className: "size-3" }),
|
|
498
514
|
t.length,
|
|
499
515
|
" version",
|
|
500
516
|
t.length === 1 ? "" : "s",
|
|
@@ -511,7 +527,7 @@ var w = () => {
|
|
|
511
527
|
target: "_blank",
|
|
512
528
|
rel: "noreferrer",
|
|
513
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",
|
|
514
|
-
children: [/* @__PURE__ */ h(
|
|
530
|
+
children: [/* @__PURE__ */ h(ue, { className: "size-3.5" }), "Devportal"]
|
|
515
531
|
})
|
|
516
532
|
]
|
|
517
533
|
}), /* @__PURE__ */ h("div", {
|
|
@@ -522,7 +538,7 @@ var w = () => {
|
|
|
522
538
|
/* @__PURE__ */ g("div", {
|
|
523
539
|
className: "flex items-center gap-2 flex-wrap",
|
|
524
540
|
children: [
|
|
525
|
-
/* @__PURE__ */ h(
|
|
541
|
+
/* @__PURE__ */ h(fe, { className: "size-4 text-[var(--color-text-secondary)] shrink-0" }),
|
|
526
542
|
/* @__PURE__ */ h("span", {
|
|
527
543
|
className: "font-mono font-semibold text-sm text-[var(--color-text-primary)]",
|
|
528
544
|
children: t.version
|
|
@@ -538,20 +554,20 @@ var w = () => {
|
|
|
538
554
|
e.appType === "NODE" && (() => {
|
|
539
555
|
let e = _(t.metadata);
|
|
540
556
|
return e ? /* @__PURE__ */ h("span", {
|
|
541
|
-
className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${
|
|
557
|
+
className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${Se[e]}`,
|
|
542
558
|
title: v(t.metadata) ?? void 0,
|
|
543
|
-
children:
|
|
559
|
+
children: xe[e]
|
|
544
560
|
}) : null;
|
|
545
561
|
})(),
|
|
546
562
|
/* @__PURE__ */ g("span", {
|
|
547
563
|
className: "ml-auto flex items-center gap-1 text-xs text-[var(--color-text-secondary)]",
|
|
548
|
-
children: [/* @__PURE__ */ h(
|
|
564
|
+
children: [/* @__PURE__ */ h(le, { className: "size-3" }), C(t.createdAt)]
|
|
549
565
|
})
|
|
550
566
|
]
|
|
551
567
|
}),
|
|
552
568
|
t.releaseNotes && /* @__PURE__ */ h("div", {
|
|
553
569
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
554
|
-
children: /* @__PURE__ */ h(
|
|
570
|
+
children: /* @__PURE__ */ h(i, { children: t.releaseNotes })
|
|
555
571
|
}),
|
|
556
572
|
e.appType === "NODE" && v(t.metadata) && /* @__PURE__ */ h("p", {
|
|
557
573
|
className: "text-xs text-[var(--color-status-error-text)]",
|
|
@@ -562,24 +578,24 @@ var w = () => {
|
|
|
562
578
|
children: [
|
|
563
579
|
e.appType === "NODE" && _(t.metadata) !== "READY" && /* @__PURE__ */ g("button", {
|
|
564
580
|
type: "button",
|
|
565
|
-
onClick: () => void
|
|
581
|
+
onClick: () => void ct(t.id),
|
|
566
582
|
disabled: W === t.id,
|
|
567
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",
|
|
568
584
|
children: [W === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5" }), "Retry Deployment"]
|
|
569
585
|
}),
|
|
570
586
|
e.appType === "NODE" && /* @__PURE__ */ g("button", {
|
|
571
587
|
type: "button",
|
|
572
|
-
onClick: () =>
|
|
588
|
+
onClick: () => o(`${x}/sandbox-builds?versionId=${t.id}`),
|
|
573
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",
|
|
574
|
-
children: [/* @__PURE__ */ h(
|
|
590
|
+
children: [/* @__PURE__ */ h(me, { className: "size-3.5" }), "View build history"]
|
|
575
591
|
}),
|
|
576
592
|
t.packageUrl && /* @__PURE__ */ g("button", {
|
|
577
593
|
type: "button",
|
|
578
|
-
onClick: () => void
|
|
594
|
+
onClick: () => void lt(t.id),
|
|
579
595
|
disabled: X === t.id,
|
|
580
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",
|
|
581
597
|
children: [
|
|
582
|
-
X === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(
|
|
598
|
+
X === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(u, { className: "size-3.5" }),
|
|
583
599
|
"Download Package",
|
|
584
600
|
t.packageSize != null && /* @__PURE__ */ g("span", {
|
|
585
601
|
className: "text-[var(--color-text-muted)]",
|
|
@@ -593,12 +609,12 @@ var w = () => {
|
|
|
593
609
|
}),
|
|
594
610
|
t.manifest && /* @__PURE__ */ g("button", {
|
|
595
611
|
type: "button",
|
|
596
|
-
onClick: () =>
|
|
612
|
+
onClick: () => qe(R === t.id ? null : t.id),
|
|
597
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",
|
|
598
614
|
children: [
|
|
599
615
|
/* @__PURE__ */ h(d, { className: "size-3.5" }),
|
|
600
616
|
R === t.id ? "Hide manifest" : "View manifest",
|
|
601
|
-
R === t.id ? /* @__PURE__ */ h(
|
|
617
|
+
R === t.id ? /* @__PURE__ */ h(ce, { className: "size-3" }) : /* @__PURE__ */ h(se, { className: "size-3" })
|
|
602
618
|
]
|
|
603
619
|
})
|
|
604
620
|
]
|
|
@@ -607,7 +623,7 @@ var w = () => {
|
|
|
607
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",
|
|
608
624
|
children: JSON.stringify(t.manifest, null, 2)
|
|
609
625
|
}),
|
|
610
|
-
|
|
626
|
+
Qe === t.id && $e === e.id && /* @__PURE__ */ g("div", {
|
|
611
627
|
className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)]/30 p-3 space-y-2",
|
|
612
628
|
children: [
|
|
613
629
|
/* @__PURE__ */ h("p", {
|
|
@@ -632,7 +648,7 @@ var w = () => {
|
|
|
632
648
|
children: "Cancel"
|
|
633
649
|
}), /* @__PURE__ */ h("button", {
|
|
634
650
|
type: "button",
|
|
635
|
-
onClick: () => void
|
|
651
|
+
onClick: () => void st(t.id, e.id, K),
|
|
636
652
|
disabled: !K.trim() || H === t.id,
|
|
637
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",
|
|
638
654
|
children: "Submit rejection"
|
|
@@ -644,11 +660,11 @@ var w = () => {
|
|
|
644
660
|
className: "flex items-center gap-2",
|
|
645
661
|
children: [/* @__PURE__ */ g("button", {
|
|
646
662
|
type: "button",
|
|
647
|
-
onClick: () => void
|
|
663
|
+
onClick: () => void ot(t.id, e.id, ""),
|
|
648
664
|
disabled: H === t.id,
|
|
649
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",
|
|
650
|
-
children: [H === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(
|
|
651
|
-
}),
|
|
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", {
|
|
652
668
|
type: "button",
|
|
653
669
|
onClick: () => {
|
|
654
670
|
G(t.id), q(""), J(e.id);
|
|
@@ -663,10 +679,10 @@ var w = () => {
|
|
|
663
679
|
})]
|
|
664
680
|
}, e.id);
|
|
665
681
|
})
|
|
666
|
-
}) :
|
|
682
|
+
}) : k && w.length === 0 ? /* @__PURE__ */ h("div", {
|
|
667
683
|
className: "flex items-center justify-center py-24",
|
|
668
684
|
children: /* @__PURE__ */ h(f, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
|
|
669
|
-
}) : w.length === 0 ? /* @__PURE__ */ h(
|
|
685
|
+
}) : w.length === 0 ? /* @__PURE__ */ h(ye, {
|
|
670
686
|
illustration: P === "PENDING_REVIEW" ? "empty-notifications" : "empty-data",
|
|
671
687
|
title: P === "PENDING_REVIEW" ? "Queue is clear" : "No products match this filter",
|
|
672
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."
|
|
@@ -695,19 +711,19 @@ var w = () => {
|
|
|
695
711
|
children: e.name
|
|
696
712
|
}),
|
|
697
713
|
/* @__PURE__ */ h("span", {
|
|
698
|
-
className: `rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${
|
|
714
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${Ie(e.type)}`,
|
|
699
715
|
children: e.type
|
|
700
716
|
}),
|
|
701
717
|
/* @__PURE__ */ h("span", {
|
|
702
|
-
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${
|
|
718
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Le(e.status)}`,
|
|
703
719
|
children: e.status.replace("_", " ")
|
|
704
720
|
}),
|
|
705
721
|
e.type === "NODE" && e.productId && (() => {
|
|
706
722
|
let t = _(Y[e.productId]?.metadata);
|
|
707
723
|
return t ? /* @__PURE__ */ h("span", {
|
|
708
|
-
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${
|
|
724
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Se[t]}`,
|
|
709
725
|
title: v(Y[e.productId]?.metadata) ?? void 0,
|
|
710
|
-
children:
|
|
726
|
+
children: xe[t]
|
|
711
727
|
}) : null;
|
|
712
728
|
})()
|
|
713
729
|
]
|
|
@@ -717,7 +733,7 @@ var w = () => {
|
|
|
717
733
|
children: [
|
|
718
734
|
/* @__PURE__ */ g("span", {
|
|
719
735
|
className: "flex items-center gap-1",
|
|
720
|
-
children: [/* @__PURE__ */ h(
|
|
736
|
+
children: [/* @__PURE__ */ h(pe, { className: "size-3" }), /* @__PURE__ */ h("span", {
|
|
721
737
|
className: "font-mono",
|
|
722
738
|
children: e.slug
|
|
723
739
|
})]
|
|
@@ -725,7 +741,7 @@ var w = () => {
|
|
|
725
741
|
e.publisher && /* @__PURE__ */ g("span", {
|
|
726
742
|
className: "flex items-center gap-1",
|
|
727
743
|
children: [
|
|
728
|
-
/* @__PURE__ */ h(
|
|
744
|
+
/* @__PURE__ */ h(ve, { className: "size-3" }),
|
|
729
745
|
e.publisher.name,
|
|
730
746
|
e.publisher.email && /* @__PURE__ */ g("span", {
|
|
731
747
|
className: "text-[var(--color-text-muted)]",
|
|
@@ -739,11 +755,15 @@ var w = () => {
|
|
|
739
755
|
}),
|
|
740
756
|
e.submittedAt && /* @__PURE__ */ g("span", {
|
|
741
757
|
className: "flex items-center gap-1",
|
|
742
|
-
children: [/* @__PURE__ */ h(
|
|
758
|
+
children: [/* @__PURE__ */ h(le, { className: "size-3" }), C(e.submittedAt)]
|
|
759
|
+
}),
|
|
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)]
|
|
743
763
|
}),
|
|
744
764
|
/* @__PURE__ */ g("span", {
|
|
745
765
|
className: "flex items-center gap-1",
|
|
746
|
-
children: [/* @__PURE__ */ h(
|
|
766
|
+
children: [/* @__PURE__ */ h(_e, { className: "size-3" }), t(e.price, e.currency, e.pricingModel)]
|
|
747
767
|
})
|
|
748
768
|
]
|
|
749
769
|
}),
|
|
@@ -768,51 +788,51 @@ var w = () => {
|
|
|
768
788
|
target: "_blank",
|
|
769
789
|
rel: "noreferrer",
|
|
770
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",
|
|
771
|
-
children: [/* @__PURE__ */ h(
|
|
791
|
+
children: [/* @__PURE__ */ h(ue, { className: "size-3.5" }), "Devportal"]
|
|
772
792
|
}),
|
|
773
|
-
|
|
793
|
+
S.has(e.type) && (() => {
|
|
774
794
|
let t = e.productId ? Y[e.productId]?.versionId ?? V.find((t) => t.id === e.productId)?.versions?.edges?.[0]?.node?.id : void 0;
|
|
775
795
|
if (!t && !e.zipFileUrl) return null;
|
|
776
796
|
let n = X === t;
|
|
777
797
|
return t ? /* @__PURE__ */ g("button", {
|
|
778
798
|
type: "button",
|
|
779
|
-
onClick: () => void
|
|
799
|
+
onClick: () => void lt(t),
|
|
780
800
|
disabled: n,
|
|
781
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",
|
|
782
|
-
children: [n ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(
|
|
802
|
+
children: [n ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(u, { className: "size-3.5" }), "Download Package"]
|
|
783
803
|
}) : /* @__PURE__ */ g("a", {
|
|
784
804
|
href: e.zipFileUrl,
|
|
785
805
|
download: !0,
|
|
786
806
|
target: "_blank",
|
|
787
807
|
rel: "noreferrer",
|
|
788
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",
|
|
789
|
-
children: [/* @__PURE__ */ h(
|
|
809
|
+
children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), "Download Package"]
|
|
790
810
|
});
|
|
791
811
|
})(),
|
|
792
812
|
e.type === "NODE" && e.productId && Y[e.productId]?.versionId && _(Y[e.productId]?.metadata) !== "READY" && /* @__PURE__ */ g("button", {
|
|
793
813
|
type: "button",
|
|
794
|
-
onClick: () => void
|
|
814
|
+
onClick: () => void ct(Y[e.productId].versionId),
|
|
795
815
|
disabled: W === Y[e.productId]?.versionId,
|
|
796
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",
|
|
797
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"]
|
|
798
818
|
}),
|
|
799
|
-
|
|
819
|
+
S.has(e.type) && /* @__PURE__ */ g("button", {
|
|
800
820
|
type: "button",
|
|
801
821
|
onClick: () => B(e),
|
|
802
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",
|
|
803
|
-
children: [/* @__PURE__ */ h(
|
|
823
|
+
children: [/* @__PURE__ */ h(de, { className: "size-3.5" }), "Test in workspace"]
|
|
804
824
|
}),
|
|
805
825
|
/* @__PURE__ */ g("button", {
|
|
806
826
|
type: "button",
|
|
807
827
|
onClick: () => {
|
|
808
828
|
let t = R !== e.id;
|
|
809
|
-
|
|
829
|
+
qe(t ? e.id : null), t && e.type === "WORKFLOW" && ut(e.id);
|
|
810
830
|
},
|
|
811
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",
|
|
812
832
|
children: [
|
|
813
833
|
/* @__PURE__ */ h(d, { className: "size-3.5" }),
|
|
814
834
|
R === e.id ? "Hide details" : "Inspect details",
|
|
815
|
-
R === e.id ? /* @__PURE__ */ h(
|
|
835
|
+
R === e.id ? /* @__PURE__ */ h(ce, { className: "size-3" }) : /* @__PURE__ */ h(se, { className: "size-3" })
|
|
816
836
|
]
|
|
817
837
|
})
|
|
818
838
|
]
|
|
@@ -821,10 +841,10 @@ var w = () => {
|
|
|
821
841
|
children: [
|
|
822
842
|
e.status !== "PUBLISHED" && /* @__PURE__ */ g("button", {
|
|
823
843
|
type: "button",
|
|
824
|
-
onClick: () => void
|
|
844
|
+
onClick: () => void dt(e.id),
|
|
825
845
|
disabled: M === e.id,
|
|
826
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",
|
|
827
|
-
children: [/* @__PURE__ */ h(
|
|
847
|
+
children: [/* @__PURE__ */ h(oe, { className: "size-3.5" }), "Approve"]
|
|
828
848
|
}),
|
|
829
849
|
e.status === "PENDING_REVIEW" && /* @__PURE__ */ g("button", {
|
|
830
850
|
type: "button",
|
|
@@ -921,7 +941,7 @@ var w = () => {
|
|
|
921
941
|
}),
|
|
922
942
|
e.requiredPermissions && e.requiredPermissions.length > 0 && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h4", {
|
|
923
943
|
className: "mb-2 flex items-center gap-1.5 text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wide",
|
|
924
|
-
children: [/* @__PURE__ */ h(
|
|
944
|
+
children: [/* @__PURE__ */ h(ge, { className: "size-3.5 text-[var(--color-status-success-text)]" }), "Required Permissions"]
|
|
925
945
|
}), /* @__PURE__ */ h("div", {
|
|
926
946
|
className: "flex flex-wrap gap-1.5",
|
|
927
947
|
children: e.requiredPermissions.map((e) => /* @__PURE__ */ h("span", {
|
|
@@ -930,7 +950,7 @@ var w = () => {
|
|
|
930
950
|
}, e))
|
|
931
951
|
})] }),
|
|
932
952
|
e.type === "WORKFLOW" && (() => {
|
|
933
|
-
let t =
|
|
953
|
+
let t = E[e.id];
|
|
934
954
|
return !t || t.state === "loading" ? /* @__PURE__ */ g("p", {
|
|
935
955
|
className: "flex items-center gap-2 text-xs text-[var(--color-text-muted)]",
|
|
936
956
|
children: [/* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }), "Loading template contents…"]
|
|
@@ -938,7 +958,7 @@ var w = () => {
|
|
|
938
958
|
role: "alert",
|
|
939
959
|
className: "text-xs text-[var(--color-text-danger)]",
|
|
940
960
|
children: ["Could not load the template contents: ", t.message]
|
|
941
|
-
}) : t.preview ? /* @__PURE__ */ h(
|
|
961
|
+
}) : t.preview ? /* @__PURE__ */ h(ee, { preview: t.preview }) : /* @__PURE__ */ h("p", {
|
|
942
962
|
className: "text-xs text-[var(--color-text-muted)]",
|
|
943
963
|
children: "This submission has no workflow definition to preview."
|
|
944
964
|
});
|
|
@@ -952,7 +972,7 @@ var w = () => {
|
|
|
952
972
|
})] })
|
|
953
973
|
]
|
|
954
974
|
}),
|
|
955
|
-
|
|
975
|
+
Ke === e.id && /* @__PURE__ */ g("div", {
|
|
956
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"}`,
|
|
957
977
|
children: [
|
|
958
978
|
e.status === "PUBLISHED" ? /* @__PURE__ */ h("p", {
|
|
@@ -984,13 +1004,13 @@ var w = () => {
|
|
|
984
1004
|
children: "Cancel"
|
|
985
1005
|
}), e.status === "PUBLISHED" ? /* @__PURE__ */ h("button", {
|
|
986
1006
|
type: "button",
|
|
987
|
-
onClick: () => void
|
|
1007
|
+
onClick: () => void pt(e.id),
|
|
988
1008
|
disabled: M === e.id,
|
|
989
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",
|
|
990
1010
|
children: "Confirm delist"
|
|
991
1011
|
}) : /* @__PURE__ */ h("button", {
|
|
992
1012
|
type: "button",
|
|
993
|
-
onClick: () => void
|
|
1013
|
+
onClick: () => void ft(e.id),
|
|
994
1014
|
disabled: !I.trim() || M === e.id,
|
|
995
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",
|
|
996
1016
|
children: "Submit rejection"
|
|
@@ -1001,19 +1021,19 @@ var w = () => {
|
|
|
1001
1021
|
]
|
|
1002
1022
|
}, e.id))
|
|
1003
1023
|
}),
|
|
1004
|
-
P !== "VERSION_UPDATES" && P !== "TEMPLATE_REVISIONS" &&
|
|
1024
|
+
P !== "VERSION_UPDATES" && P !== "TEMPLATE_REVISIONS" && Be && w.length > 0 && /* @__PURE__ */ h("div", {
|
|
1005
1025
|
className: "flex justify-center",
|
|
1006
1026
|
children: /* @__PURE__ */ g("button", {
|
|
1007
1027
|
type: "button",
|
|
1008
1028
|
onClick: () => void $(P, w.length),
|
|
1009
|
-
disabled:
|
|
1029
|
+
disabled: k,
|
|
1010
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",
|
|
1011
|
-
children: [
|
|
1031
|
+
children: [k && /* @__PURE__ */ h(f, { className: "size-4 animate-spin" }), "Load more"]
|
|
1012
1032
|
})
|
|
1013
1033
|
})
|
|
1014
1034
|
]
|
|
1015
1035
|
}),
|
|
1016
|
-
z && /* @__PURE__ */ h(
|
|
1036
|
+
z && /* @__PURE__ */ h(a, {
|
|
1017
1037
|
isOpen: !0,
|
|
1018
1038
|
onClose: () => B(null),
|
|
1019
1039
|
app: {
|