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