@burdenoff/microfe-devportal 2026.703.3 → 2026.703.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/AdminReviewPage.js +411 -170
- package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +7 -7
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +317 -320
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/generated/global-operations.js +184 -141
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,15 +16,15 @@ import ue from "../../node_modules/date-fns/format.js";
|
|
|
16
16
|
import { usePackageUpload as de } from "../hooks/usePackageUpload.js";
|
|
17
17
|
import { useCallback as l, useEffect as fe, useMemo as u, useRef as d, useState as f } from "react";
|
|
18
18
|
import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
-
import { AlertCircle as p, Archive as me, CheckCircle as he, Clock as ge, Loader2 as _e, Package as ve, Plus as ye, Send as be,
|
|
20
|
-
import { useParams as
|
|
21
|
-
import { Fragment as
|
|
19
|
+
import { AlertCircle as p, Archive as me, CheckCircle as he, Clock as ge, Loader2 as _e, Package as ve, Plus as ye, Send as be, Upload as xe, XCircle as Se } from "lucide-react";
|
|
20
|
+
import { useParams as Ce } from "react-router-dom";
|
|
21
|
+
import { Fragment as we, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
22
22
|
//#region src/devportal/pages/ApplicationVersionsPage.tsx
|
|
23
23
|
var Te = () => {
|
|
24
|
-
let { t: Te } = pe(),
|
|
24
|
+
let { t: Te } = pe(), g = (e, t) => {
|
|
25
25
|
let n = Te(e);
|
|
26
26
|
return n === e ? t : n;
|
|
27
|
-
}, { allowed:
|
|
27
|
+
}, { allowed: Ee } = c(s.APP_VERSION_CREATE), { allowed: _ } = c(s.APP_VERSION_PUBLISH), { allowed: v } = c(s.APP_VERSION_DEPRECATE), { appId: y } = Ce(), { workspacesGatewayUrl: De, authToken: Oe, workspaceId: ke, getWorkspaceToken: Ae } = e(), { upload: b, uploading: x, progress: je, error: S } = de(De, Oe, ke, Ae), C = d(null), w = d(null), [T, E] = f(null), [D, O] = f(!1), [k, A] = f({
|
|
28
28
|
version: "",
|
|
29
29
|
releaseNotes: "",
|
|
30
30
|
changelog: "",
|
|
@@ -32,67 +32,67 @@ var Te = () => {
|
|
|
32
32
|
packageSize: "",
|
|
33
33
|
manifestJson: "",
|
|
34
34
|
requiredScopes: ""
|
|
35
|
-
}), [
|
|
35
|
+
}), [j, M] = f(null), [Me, N] = f(null), [P, F] = f(/* @__PURE__ */ new Set()), [I, Ne] = f(null), [L, R] = f(""), Pe = l((e) => {
|
|
36
36
|
let t = e.target.files?.[0];
|
|
37
37
|
if (!t) return;
|
|
38
38
|
let n = new FileReader();
|
|
39
39
|
n.onload = (e) => {
|
|
40
40
|
let n = e.target?.result;
|
|
41
|
-
typeof n == "string" && (
|
|
41
|
+
typeof n == "string" && (A((e) => ({
|
|
42
42
|
...e,
|
|
43
43
|
manifestJson: n
|
|
44
|
-
})),
|
|
44
|
+
})), E(t.name));
|
|
45
45
|
}, n.readAsText(t), e.target.value = "";
|
|
46
|
-
}, []), [
|
|
47
|
-
variables: { id:
|
|
48
|
-
skip: !
|
|
46
|
+
}, []), [Fe, z] = f(null), { data: B } = te({
|
|
47
|
+
variables: { id: y ?? "" },
|
|
48
|
+
skip: !y,
|
|
49
49
|
fetchPolicy: "cache-first"
|
|
50
|
-
}),
|
|
50
|
+
}), V = B?.application?.appType === "WORKFLOW", H = B?.application?.appType === "NODE", Ie = !V && !H, U = B?.application, Le = U?.pricingDetails ?? {}, Re = U?.pricingType === "FREE" || U?.pricingType === "PAID" && typeof Le.price == "number" && Le.price > 0, ze = !!U?.shortDescription?.trim() && !!U?.privacyPolicyUrl?.trim() && !!U?.termsOfServiceUrl?.trim(), W = Re && ze, G = [...ze ? [] : ["Complete your store listing (short description, privacy policy, terms of service)"], ...Re ? [] : ["Set pricing in the Pricing tab"]];
|
|
51
51
|
fe(() => {
|
|
52
|
-
let e =
|
|
53
|
-
if (!
|
|
52
|
+
let e = B?.application?.name;
|
|
53
|
+
if (!y || !e) return;
|
|
54
54
|
let t = window.__breadcrumbRegistry;
|
|
55
|
-
return t?.register(
|
|
56
|
-
}, [
|
|
57
|
-
let { data:
|
|
58
|
-
variables: { applicationId:
|
|
59
|
-
skip: !
|
|
55
|
+
return t?.register(y, e), () => t?.unregister(y);
|
|
56
|
+
}, [y, B?.application?.name]);
|
|
57
|
+
let { data: K, loading: Be, error: Ve } = ne({
|
|
58
|
+
variables: { applicationId: y },
|
|
59
|
+
skip: !y,
|
|
60
60
|
fetchPolicy: "cache-and-network"
|
|
61
|
-
}), [
|
|
62
|
-
if (!
|
|
63
|
-
|
|
61
|
+
}), [He, { loading: Ue }] = r({ refetchQueries: ["GetApplicationVersions"] }), [We] = re({ refetchQueries: ["GetApplicationVersions"] }), [Ge] = ee({ refetchQueries: ["GetApplicationVersions"] }), [Ke] = n({ refetchQueries: ["GetApplicationVersions"] }), [qe] = ie({ refetchQueries: ["GetApplicationVersions"] }), q = u(() => K?.application?.versions?.edges?.map((e) => e.node) ?? [], [K?.application?.versions]), J = u(() => q.filter((e) => P.has(e.id)), [q, P]), Y = u(() => J.filter((e) => e.status === "draft" || e.status === "rejected"), [J]), X = u(() => J.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [J]), Z = q.length > 0 && q.every((e) => P.has(e.id)), Je = q.some((e) => P.has(e.id)) && !Z, Ye = async () => {
|
|
62
|
+
if (!y || !k.version.trim()) return;
|
|
63
|
+
M(null);
|
|
64
64
|
let e;
|
|
65
|
-
if (
|
|
66
|
-
if (!
|
|
67
|
-
|
|
65
|
+
if (V) {
|
|
66
|
+
if (!k.manifestJson.trim()) {
|
|
67
|
+
M("Workflow Definition (JSON) is required — paste the {nodes, edges} object.");
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
try {
|
|
71
|
-
e = JSON.parse(
|
|
71
|
+
e = JSON.parse(k.manifestJson);
|
|
72
72
|
} catch {
|
|
73
|
-
|
|
73
|
+
M("Invalid JSON in Workflow Definition — please check your input.");
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
} else if (
|
|
77
|
-
e = JSON.parse(
|
|
76
|
+
} else if (k.manifestJson.trim()) try {
|
|
77
|
+
e = JSON.parse(k.manifestJson);
|
|
78
78
|
} catch {
|
|
79
|
-
|
|
79
|
+
M("Invalid JSON in manifest — please check your input.");
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
let t =
|
|
82
|
+
let t = Ie && k.requiredScopes.trim() ? k.requiredScopes.split(",").map((e) => e.trim()).filter(Boolean) : void 0;
|
|
83
83
|
try {
|
|
84
|
-
await
|
|
85
|
-
applicationId:
|
|
84
|
+
await He({ variables: {
|
|
85
|
+
applicationId: y,
|
|
86
86
|
input: {
|
|
87
|
-
version:
|
|
88
|
-
releaseNotes:
|
|
89
|
-
changelog:
|
|
90
|
-
packageUrl:
|
|
91
|
-
packageSize:
|
|
87
|
+
version: k.version,
|
|
88
|
+
releaseNotes: k.releaseNotes || void 0,
|
|
89
|
+
changelog: k.changelog || void 0,
|
|
90
|
+
packageUrl: k.packageUrl || void 0,
|
|
91
|
+
packageSize: k.packageSize || void 0,
|
|
92
92
|
manifest: e,
|
|
93
93
|
requiredScopes: t
|
|
94
94
|
}
|
|
95
|
-
} }),
|
|
95
|
+
} }), O(!1), E(null), A({
|
|
96
96
|
version: "",
|
|
97
97
|
releaseNotes: "",
|
|
98
98
|
changelog: "",
|
|
@@ -100,266 +100,273 @@ var Te = () => {
|
|
|
100
100
|
packageSize: "",
|
|
101
101
|
manifestJson: "",
|
|
102
102
|
requiredScopes: ""
|
|
103
|
-
}),
|
|
103
|
+
}), N(g("devportal.versionCreatedSuccess", "Version created successfully"));
|
|
104
104
|
} catch (e) {
|
|
105
|
-
|
|
105
|
+
M(e instanceof Error ? e.message : g("devportal.versionCreateFailed", "Failed to create version"));
|
|
106
106
|
}
|
|
107
|
-
},
|
|
107
|
+
}, Xe = l(async (e) => {
|
|
108
108
|
let t = e.target.files?.[0];
|
|
109
109
|
if (t) {
|
|
110
110
|
e.target.value = "";
|
|
111
111
|
try {
|
|
112
|
-
let e = await
|
|
113
|
-
|
|
112
|
+
let e = await b(t);
|
|
113
|
+
A((n) => ({
|
|
114
114
|
...n,
|
|
115
115
|
packageUrl: e.downloadUrl,
|
|
116
116
|
packageSize: String(t.size)
|
|
117
117
|
}));
|
|
118
118
|
} catch {}
|
|
119
119
|
}
|
|
120
|
-
}, [
|
|
121
|
-
|
|
120
|
+
}, [b]), Ze = async (e) => {
|
|
121
|
+
M(null), N(null);
|
|
122
122
|
try {
|
|
123
|
-
await
|
|
123
|
+
await We({ variables: { id: e } }), N(g("devportal.versionSubmittedSuccess", "Version submitted for review — you'll be notified when approved"));
|
|
124
124
|
} catch (e) {
|
|
125
|
-
|
|
125
|
+
M(e instanceof Error ? e.message : g("devportal.versionPublishFailed", "Failed to submit version for review"));
|
|
126
126
|
}
|
|
127
|
-
},
|
|
128
|
-
|
|
127
|
+
}, Qe = async (e) => {
|
|
128
|
+
M(null), N(null);
|
|
129
129
|
try {
|
|
130
|
-
await
|
|
130
|
+
await Ge({ variables: { id: e } }), N(g("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
|
|
131
131
|
} catch (e) {
|
|
132
|
-
|
|
132
|
+
M(e instanceof Error ? e.message : g("devportal.versionDeprecateFailed", "Failed to deprecate version"));
|
|
133
133
|
}
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
await Be({ variables: { id: e } }), I(_("devportal.versionApprovedSuccess", "Version approved and published to store"));
|
|
138
|
-
} catch (e) {
|
|
139
|
-
P(e instanceof Error ? e.message : _("devportal.versionApproveFailed", "Failed to approve version"));
|
|
140
|
-
}
|
|
141
|
-
}, Je = async () => {
|
|
142
|
-
if (!(!z || !V.trim())) {
|
|
143
|
-
P(null), I(null);
|
|
134
|
+
}, $e = async () => {
|
|
135
|
+
if (!(!I || !L.trim())) {
|
|
136
|
+
M(null), N(null);
|
|
144
137
|
try {
|
|
145
|
-
await
|
|
146
|
-
id:
|
|
147
|
-
reason:
|
|
148
|
-
} }),
|
|
138
|
+
await qe({ variables: {
|
|
139
|
+
id: I.versionId,
|
|
140
|
+
reason: L
|
|
141
|
+
} }), N(g("devportal.versionRejectedSuccess", "Version rejected — developer has been notified")), Ne(null), R("");
|
|
149
142
|
} catch (e) {
|
|
150
|
-
|
|
143
|
+
M(e instanceof Error ? e.message : g("devportal.versionRejectFailed", "Failed to reject version"));
|
|
151
144
|
}
|
|
152
145
|
}
|
|
153
|
-
},
|
|
146
|
+
}, et = (e) => e.status === "published" && e.isLatest ? /* @__PURE__ */ m(he, {
|
|
154
147
|
size: 16,
|
|
155
148
|
className: "text-status-success-text"
|
|
156
|
-
}) : e.status === "pending_review" ? /* @__PURE__ */
|
|
149
|
+
}) : e.status === "pending_review" ? /* @__PURE__ */ m(be, {
|
|
157
150
|
size: 16,
|
|
158
151
|
className: "text-status-info-text"
|
|
159
|
-
}) : e.status === "rejected" ? /* @__PURE__ */
|
|
152
|
+
}) : e.status === "rejected" ? /* @__PURE__ */ m(Se, {
|
|
160
153
|
size: 16,
|
|
161
154
|
className: "text-status-error-text"
|
|
162
|
-
}) : e.status === "draft" ? /* @__PURE__ */
|
|
155
|
+
}) : e.status === "draft" ? /* @__PURE__ */ m(ge, {
|
|
163
156
|
size: 16,
|
|
164
157
|
className: "text-status-warning-text"
|
|
165
|
-
}) : e.status === "deprecated" ? /* @__PURE__ */
|
|
158
|
+
}) : e.status === "deprecated" ? /* @__PURE__ */ m(me, {
|
|
166
159
|
size: 16,
|
|
167
160
|
className: "text-text-secondary"
|
|
168
|
-
}) : /* @__PURE__ */
|
|
161
|
+
}) : /* @__PURE__ */ m(ve, {
|
|
169
162
|
size: 16,
|
|
170
163
|
className: "text-accent-blue"
|
|
171
|
-
}),
|
|
172
|
-
|
|
164
|
+
}), tt = (e, t) => {
|
|
165
|
+
F((n) => {
|
|
173
166
|
let r = new Set(n);
|
|
174
167
|
return t ? r.add(e) : r.delete(e), r;
|
|
175
168
|
});
|
|
176
|
-
},
|
|
177
|
-
|
|
169
|
+
}, Q = (e) => {
|
|
170
|
+
F((t) => {
|
|
178
171
|
let n = new Set(t);
|
|
179
|
-
return
|
|
172
|
+
return q.forEach((t) => {
|
|
180
173
|
e ? n.add(t.id) : n.delete(t.id);
|
|
181
174
|
}), n;
|
|
182
175
|
});
|
|
183
|
-
}, $ = () =>
|
|
184
|
-
return
|
|
185
|
-
title:
|
|
186
|
-
description:
|
|
187
|
-
backLink: `/apps/${
|
|
188
|
-
backLabel:
|
|
189
|
-
children: /* @__PURE__ */
|
|
176
|
+
}, $ = () => F(/* @__PURE__ */ new Set());
|
|
177
|
+
return Be && !K ? /* @__PURE__ */ m(i, {
|
|
178
|
+
title: g("devportal.versionManagement", "Version Management"),
|
|
179
|
+
description: g("devportal.versionManagementDescription", "Manage your application versions"),
|
|
180
|
+
backLink: `/apps/${y}`,
|
|
181
|
+
backLabel: g("devportal.backToApplication", "Back to Application"),
|
|
182
|
+
children: /* @__PURE__ */ m("div", {
|
|
190
183
|
className: "flex items-center justify-center py-16",
|
|
191
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ m(_e, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
192
185
|
})
|
|
193
|
-
}) :
|
|
194
|
-
title:
|
|
195
|
-
description:
|
|
196
|
-
backLink: `/apps/${
|
|
197
|
-
backLabel:
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
-
icon: /* @__PURE__ */
|
|
186
|
+
}) : Ve && !K ? /* @__PURE__ */ m(i, {
|
|
187
|
+
title: g("devportal.versionManagement", "Version Management"),
|
|
188
|
+
description: g("devportal.versionManagementDescription", "Manage your application versions"),
|
|
189
|
+
backLink: `/apps/${y}`,
|
|
190
|
+
backLabel: g("devportal.backToApplication", "Back to Application"),
|
|
191
|
+
children: /* @__PURE__ */ m(t, {
|
|
192
|
+
icon: /* @__PURE__ */ m(p, {
|
|
200
193
|
size: 32,
|
|
201
194
|
className: "text-status-error-text"
|
|
202
195
|
}),
|
|
203
|
-
title:
|
|
204
|
-
description:
|
|
196
|
+
title: g("devportal.failedToLoadVersions", "Failed to load versions"),
|
|
197
|
+
description: Ve.message || g("devportal.versionsLoadError", "An error occurred while loading versions")
|
|
205
198
|
})
|
|
206
|
-
}) : /* @__PURE__ */
|
|
199
|
+
}) : /* @__PURE__ */ m(le, {
|
|
207
200
|
permission: s.APP_READ,
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
211
|
-
purpose:
|
|
212
|
-
backLink: `/apps/${
|
|
213
|
-
backLabel:
|
|
214
|
-
actions: /* @__PURE__ */
|
|
215
|
-
onClick: () =>
|
|
216
|
-
disabled: !
|
|
217
|
-
"aria-disabled": !
|
|
201
|
+
children: /* @__PURE__ */ h(i, {
|
|
202
|
+
title: g("devportal.versionManagement", "Version Management"),
|
|
203
|
+
description: g("devportal.versionManagementDescription", "Manage your application versions"),
|
|
204
|
+
purpose: V ? g("devportal.versionManagementPurposeWorkflow", "Versions track releases of your workflow. Create a version for each significant change and paste the workflow definition JSON. No zip is needed — the manifest is the workflow.") : H ? g("devportal.versionManagementPurposeNode", "Versions are the releases of your node that users install. Upload a new zip whenever the node implementation changes, and update the manifest if the node's inputs, outputs, or operations change. Bump the version for any change users will see.") : g("devportal.versionManagementPurposeIntegration", "Versions track permission and webhook changes for your integration. No zip or manifest is needed — create a new version whenever you add or change required scopes so users can review and accept the updated permissions."),
|
|
205
|
+
backLink: `/apps/${y}`,
|
|
206
|
+
backLabel: g("devportal.backToApplication", "Back to Application"),
|
|
207
|
+
actions: /* @__PURE__ */ h("button", {
|
|
208
|
+
onClick: () => O(!0),
|
|
209
|
+
disabled: !Ee,
|
|
210
|
+
"aria-disabled": !Ee,
|
|
218
211
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ m(ye, { size: 16 }), g("devportal.newVersion", "New Version")]
|
|
220
213
|
}),
|
|
221
214
|
children: [
|
|
222
|
-
|
|
215
|
+
j && /* @__PURE__ */ h("div", {
|
|
223
216
|
className: "rounded-lg border border-border-subtle bg-status-error-bg-subtle p-3 flex items-center gap-2 text-sm text-status-error-text",
|
|
224
217
|
children: [
|
|
225
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ m(p, {
|
|
226
219
|
size: 16,
|
|
227
220
|
className: "flex-shrink-0"
|
|
228
221
|
}),
|
|
229
|
-
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
onClick: () =>
|
|
222
|
+
j,
|
|
223
|
+
/* @__PURE__ */ m("button", {
|
|
224
|
+
onClick: () => M(null),
|
|
232
225
|
className: "ml-auto text-status-error-text hover:text-status-error-text",
|
|
233
|
-
children:
|
|
226
|
+
children: g("devportal.dismiss", "Dismiss")
|
|
234
227
|
})
|
|
235
228
|
]
|
|
236
229
|
}),
|
|
237
|
-
|
|
230
|
+
Me && /* @__PURE__ */ h("div", {
|
|
238
231
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 flex items-center gap-2 text-sm text-status-success-text",
|
|
239
232
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ m(he, {
|
|
241
234
|
size: 16,
|
|
242
235
|
className: "flex-shrink-0"
|
|
243
236
|
}),
|
|
244
|
-
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
onClick: () =>
|
|
237
|
+
Me,
|
|
238
|
+
/* @__PURE__ */ m("button", {
|
|
239
|
+
onClick: () => N(null),
|
|
247
240
|
className: "ml-auto text-status-success-text hover:text-status-success-text",
|
|
248
|
-
children:
|
|
241
|
+
children: g("devportal.dismiss", "Dismiss")
|
|
249
242
|
})
|
|
250
243
|
]
|
|
251
244
|
}),
|
|
252
|
-
|
|
245
|
+
U && !W && /* @__PURE__ */ h("div", {
|
|
246
|
+
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle px-4 py-3 text-sm text-status-warning-text",
|
|
247
|
+
children: [/* @__PURE__ */ m(p, {
|
|
248
|
+
size: 16,
|
|
249
|
+
className: "mt-0.5 shrink-0"
|
|
250
|
+
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
|
|
251
|
+
className: "font-medium",
|
|
252
|
+
children: "Complete your app setup before submitting for review"
|
|
253
|
+
}), /* @__PURE__ */ m("ul", {
|
|
254
|
+
className: "mt-1 list-disc pl-4 text-xs opacity-80",
|
|
255
|
+
children: G.map((e) => /* @__PURE__ */ m("li", { children: e }, e))
|
|
256
|
+
})] })]
|
|
257
|
+
}),
|
|
258
|
+
q.length > 0 && /* @__PURE__ */ m("div", {
|
|
253
259
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
254
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ h("div", {
|
|
255
261
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ h("div", {
|
|
257
263
|
className: "flex flex-wrap items-center gap-3",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ h("div", {
|
|
259
265
|
className: "flex items-center gap-2",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
261
|
-
checked:
|
|
262
|
-
indeterminate:
|
|
263
|
-
onChange:
|
|
266
|
+
children: [/* @__PURE__ */ m(a, {
|
|
267
|
+
checked: Z,
|
|
268
|
+
indeterminate: Je,
|
|
269
|
+
onChange: Q,
|
|
264
270
|
ariaLabel: "Select all visible versions"
|
|
265
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ m("span", {
|
|
266
272
|
className: "text-sm font-medium",
|
|
267
|
-
children:
|
|
273
|
+
children: g("devportal.selectAllVisible", "Select all visible")
|
|
268
274
|
})]
|
|
269
|
-
}),
|
|
275
|
+
}), P.size > 0 && /* @__PURE__ */ m("button", {
|
|
270
276
|
onClick: $,
|
|
271
277
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
272
|
-
children:
|
|
278
|
+
children: g("devportal.clearSelection", "Clear selection")
|
|
273
279
|
})]
|
|
274
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ h("div", {
|
|
275
281
|
className: "flex flex-wrap items-center gap-2",
|
|
276
282
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ h("span", {
|
|
278
284
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
279
|
-
children: [
|
|
285
|
+
children: [P.size, " selected"]
|
|
280
286
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
onClick: () =>
|
|
283
|
-
disabled:
|
|
284
|
-
"aria-disabled": !
|
|
287
|
+
/* @__PURE__ */ h("button", {
|
|
288
|
+
onClick: () => z("publish"),
|
|
289
|
+
disabled: Y.length === 0 || !_ || !W,
|
|
290
|
+
"aria-disabled": !_ || !W,
|
|
291
|
+
title: W ? void 0 : G.join(" · "),
|
|
285
292
|
className: "rounded-md border border-status-success-bg px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
286
|
-
children: [
|
|
293
|
+
children: [g("devportal.submitForReview", "Submit for Review"), Y.length > 0 ? ` (${Y.length})` : ""]
|
|
287
294
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
onClick: () =>
|
|
290
|
-
disabled:
|
|
291
|
-
"aria-disabled": !
|
|
295
|
+
/* @__PURE__ */ h("button", {
|
|
296
|
+
onClick: () => z("deprecate"),
|
|
297
|
+
disabled: X.length === 0 || !v,
|
|
298
|
+
"aria-disabled": !v,
|
|
292
299
|
className: "rounded-md border border-status-warning-bg px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
293
|
-
children: [
|
|
300
|
+
children: [g("devportal.deprecateSelected", "Deprecate Selected"), X.length > 0 ? ` (${X.length})` : ""]
|
|
294
301
|
})
|
|
295
302
|
]
|
|
296
303
|
})]
|
|
297
304
|
})
|
|
298
305
|
}),
|
|
299
|
-
|
|
300
|
-
data:
|
|
306
|
+
q.length > 0 ? /* @__PURE__ */ m(oe, {
|
|
307
|
+
data: q,
|
|
301
308
|
keyField: "id",
|
|
302
309
|
columns: [
|
|
303
310
|
{
|
|
304
311
|
key: "select",
|
|
305
|
-
header: /* @__PURE__ */
|
|
306
|
-
checked:
|
|
307
|
-
indeterminate:
|
|
308
|
-
onChange:
|
|
312
|
+
header: /* @__PURE__ */ m(a, {
|
|
313
|
+
checked: Z,
|
|
314
|
+
indeterminate: Je,
|
|
315
|
+
onChange: Q,
|
|
309
316
|
ariaLabel: "Select all visible versions"
|
|
310
317
|
}),
|
|
311
318
|
className: "w-12",
|
|
312
|
-
render: (e) => /* @__PURE__ */
|
|
319
|
+
render: (e) => /* @__PURE__ */ m("div", {
|
|
313
320
|
onClick: (e) => e.stopPropagation(),
|
|
314
|
-
children: /* @__PURE__ */
|
|
315
|
-
checked:
|
|
316
|
-
onChange: (t) =>
|
|
321
|
+
children: /* @__PURE__ */ m(a, {
|
|
322
|
+
checked: P.has(e.id),
|
|
323
|
+
onChange: (t) => tt(e.id, t),
|
|
317
324
|
ariaLabel: `Select version ${e.version}`
|
|
318
325
|
})
|
|
319
326
|
})
|
|
320
327
|
},
|
|
321
328
|
{
|
|
322
329
|
key: "version",
|
|
323
|
-
header:
|
|
324
|
-
render: (e) => /* @__PURE__ */
|
|
330
|
+
header: g("devportal.version", "Version"),
|
|
331
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
325
332
|
className: "flex items-center gap-2",
|
|
326
333
|
children: [
|
|
327
|
-
|
|
328
|
-
/* @__PURE__ */
|
|
334
|
+
et(e),
|
|
335
|
+
/* @__PURE__ */ m("span", {
|
|
329
336
|
className: "font-mono font-medium",
|
|
330
337
|
children: e.version
|
|
331
338
|
}),
|
|
332
|
-
e.isLatest && /* @__PURE__ */
|
|
339
|
+
e.isLatest && /* @__PURE__ */ m("span", {
|
|
333
340
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
334
|
-
children:
|
|
341
|
+
children: g("devportal.latest", "Latest")
|
|
335
342
|
}),
|
|
336
|
-
!e.isStable && /* @__PURE__ */
|
|
343
|
+
!e.isStable && /* @__PURE__ */ m("span", {
|
|
337
344
|
className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs text-status-warning-text",
|
|
338
|
-
children:
|
|
345
|
+
children: g("devportal.beta", "Beta")
|
|
339
346
|
})
|
|
340
347
|
]
|
|
341
348
|
})
|
|
342
349
|
},
|
|
343
350
|
{
|
|
344
351
|
key: "releaseNotes",
|
|
345
|
-
header:
|
|
346
|
-
render: (e) => /* @__PURE__ */
|
|
352
|
+
header: g("devportal.releaseNotes", "Release Notes"),
|
|
353
|
+
render: (e) => /* @__PURE__ */ m("p", {
|
|
347
354
|
className: "max-w-md truncate text-sm text-text-secondary",
|
|
348
|
-
children: e.releaseNotes ||
|
|
355
|
+
children: e.releaseNotes || g("devportal.noReleaseNotes", "No release notes")
|
|
349
356
|
})
|
|
350
357
|
},
|
|
351
358
|
{
|
|
352
359
|
key: "status",
|
|
353
|
-
header:
|
|
354
|
-
render: (e) => /* @__PURE__ */
|
|
360
|
+
header: g("devportal.status", "Status"),
|
|
361
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
355
362
|
className: "space-y-1",
|
|
356
363
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
e.status === "pending_review" && /* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ m(ae, { status: e.status === "pending_review" ? "In Review" : e.status }),
|
|
365
|
+
e.status === "pending_review" && /* @__PURE__ */ m("p", {
|
|
359
366
|
className: "text-xs text-status-info-text",
|
|
360
367
|
children: "Awaiting platform review"
|
|
361
368
|
}),
|
|
362
|
-
e.status === "rejected" && e.reviewNotes && /* @__PURE__ */
|
|
369
|
+
e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ m("p", {
|
|
363
370
|
className: "text-xs text-status-error-text max-w-xs",
|
|
364
371
|
children: e.reviewNotes
|
|
365
372
|
})
|
|
@@ -368,339 +375,329 @@ var Te = () => {
|
|
|
368
375
|
},
|
|
369
376
|
{
|
|
370
377
|
key: "publishedAt",
|
|
371
|
-
header:
|
|
378
|
+
header: g("devportal.published", "Published"),
|
|
372
379
|
render: (e) => e.publishedAt ? ue(new Date(e.publishedAt), "MMM d, yyyy") : "-"
|
|
373
380
|
},
|
|
374
381
|
{
|
|
375
382
|
key: "actions",
|
|
376
383
|
header: "",
|
|
377
384
|
className: "w-48",
|
|
378
|
-
render: (e) => /* @__PURE__ */
|
|
385
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
379
386
|
className: "flex flex-wrap gap-2",
|
|
380
|
-
children: [
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
onClick: () => B({
|
|
395
|
-
versionId: e.id,
|
|
396
|
-
version: e.version
|
|
397
|
-
}),
|
|
398
|
-
children: [/* @__PURE__ */ h(Ce, { size: 11 }), _("devportal.reject", "Reject")]
|
|
399
|
-
})] }),
|
|
400
|
-
e.status === "published" && !e.isLatest && /* @__PURE__ */ h("button", {
|
|
401
|
-
className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
|
|
402
|
-
disabled: !b,
|
|
403
|
-
"aria-disabled": !b,
|
|
404
|
-
onClick: () => Ke(e.id),
|
|
405
|
-
children: _("devportal.deprecate", "Deprecate")
|
|
406
|
-
})
|
|
407
|
-
]
|
|
387
|
+
children: [(e.status === "draft" || e.status === "rejected") && U?.status === "PUBLISHED" && /* @__PURE__ */ h("button", {
|
|
388
|
+
className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50 disabled:cursor-not-allowed",
|
|
389
|
+
disabled: !_ || !W,
|
|
390
|
+
"aria-disabled": !_ || !W,
|
|
391
|
+
title: W ? void 0 : G.join(" · "),
|
|
392
|
+
onClick: () => Ze(e.id),
|
|
393
|
+
children: [/* @__PURE__ */ m(be, { size: 11 }), g("devportal.submitForReview", "Submit for Review")]
|
|
394
|
+
}), e.status === "published" && !e.isLatest && /* @__PURE__ */ m("button", {
|
|
395
|
+
className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
|
|
396
|
+
disabled: !v,
|
|
397
|
+
"aria-disabled": !v,
|
|
398
|
+
onClick: () => Qe(e.id),
|
|
399
|
+
children: g("devportal.deprecate", "Deprecate")
|
|
400
|
+
})]
|
|
408
401
|
})
|
|
409
402
|
}
|
|
410
403
|
]
|
|
411
|
-
}) : /* @__PURE__ */
|
|
404
|
+
}) : /* @__PURE__ */ m(t, {
|
|
412
405
|
illustration: "empty-data",
|
|
413
|
-
title:
|
|
414
|
-
description:
|
|
415
|
-
action: /* @__PURE__ */
|
|
416
|
-
onClick: () =>
|
|
406
|
+
title: g("devportal.noVersionsYet", "No versions yet"),
|
|
407
|
+
description: g("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
|
|
408
|
+
action: /* @__PURE__ */ h("button", {
|
|
409
|
+
onClick: () => O(!0),
|
|
417
410
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ m(ye, { size: 16 }), g("devportal.createVersion", "Create Version")]
|
|
419
412
|
})
|
|
420
413
|
}),
|
|
421
|
-
|
|
422
|
-
open:
|
|
423
|
-
onOpenChange:
|
|
424
|
-
onConfirm:
|
|
425
|
-
title:
|
|
426
|
-
confirmLabel:
|
|
427
|
-
children: /* @__PURE__ */
|
|
414
|
+
D && /* @__PURE__ */ m(o, {
|
|
415
|
+
open: D,
|
|
416
|
+
onOpenChange: O,
|
|
417
|
+
onConfirm: Ye,
|
|
418
|
+
title: g("devportal.createNewVersion", "Create New Version"),
|
|
419
|
+
confirmLabel: Ue ? g("devportal.creating", "Creating...") : g("devportal.createVersion", "Create Version"),
|
|
420
|
+
children: /* @__PURE__ */ h("div", {
|
|
428
421
|
className: "space-y-4",
|
|
429
422
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
431
|
-
label:
|
|
432
|
-
value:
|
|
433
|
-
onChange: (e) =>
|
|
434
|
-
...
|
|
423
|
+
/* @__PURE__ */ m(se, {
|
|
424
|
+
label: g("devportal.versionNumber", "Version Number"),
|
|
425
|
+
value: k.version,
|
|
426
|
+
onChange: (e) => A({
|
|
427
|
+
...k,
|
|
435
428
|
version: e.target.value
|
|
436
429
|
}),
|
|
437
430
|
placeholder: "e.g., 2.2.0",
|
|
438
|
-
hint:
|
|
431
|
+
hint: g("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
|
|
439
432
|
required: !0
|
|
440
433
|
}),
|
|
441
|
-
|
|
434
|
+
V && /* @__PURE__ */ h("div", {
|
|
442
435
|
className: "space-y-1",
|
|
443
436
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ h("label", {
|
|
445
438
|
className: "text-sm font-medium",
|
|
446
439
|
children: [
|
|
447
440
|
"Workflow Definition (JSON)",
|
|
448
441
|
" ",
|
|
449
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ m("span", {
|
|
450
443
|
className: "text-status-error-text",
|
|
451
444
|
children: "*"
|
|
452
445
|
})
|
|
453
446
|
]
|
|
454
447
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ m("textarea", {
|
|
456
449
|
rows: 10,
|
|
457
450
|
required: !0,
|
|
458
451
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
459
|
-
value:
|
|
460
|
-
onChange: (e) =>
|
|
461
|
-
...
|
|
452
|
+
value: k.manifestJson,
|
|
453
|
+
onChange: (e) => A({
|
|
454
|
+
...k,
|
|
462
455
|
manifestJson: e.target.value
|
|
463
456
|
}),
|
|
464
457
|
className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
|
|
465
458
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ h("p", {
|
|
467
460
|
className: "text-xs text-text-secondary",
|
|
468
461
|
children: [
|
|
469
462
|
"Paste the full ",
|
|
470
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ m("code", { children: "{nodes, edges}" }),
|
|
471
464
|
" JSON. Saved as this version's manifest — no zip needed."
|
|
472
465
|
]
|
|
473
466
|
})
|
|
474
467
|
]
|
|
475
468
|
}),
|
|
476
|
-
|
|
469
|
+
H && /* @__PURE__ */ h("div", {
|
|
477
470
|
className: "space-y-1",
|
|
478
471
|
children: [
|
|
479
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ h("label", {
|
|
480
473
|
className: "text-sm font-medium",
|
|
481
474
|
children: [
|
|
482
475
|
"Package (.zip)",
|
|
483
476
|
" ",
|
|
484
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ m("span", {
|
|
485
478
|
className: "text-status-error-text",
|
|
486
479
|
children: "*"
|
|
487
480
|
})
|
|
488
481
|
]
|
|
489
482
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ h("div", {
|
|
491
484
|
className: "flex gap-2 items-center",
|
|
492
485
|
children: [
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
ref:
|
|
486
|
+
/* @__PURE__ */ m("input", {
|
|
487
|
+
ref: C,
|
|
495
488
|
type: "file",
|
|
496
489
|
accept: ".zip",
|
|
497
490
|
className: "hidden",
|
|
498
|
-
onChange:
|
|
491
|
+
onChange: Xe
|
|
499
492
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ m("button", {
|
|
501
494
|
type: "button",
|
|
502
|
-
disabled:
|
|
503
|
-
onClick: () =>
|
|
495
|
+
disabled: x,
|
|
496
|
+
onClick: () => C.current?.click(),
|
|
504
497
|
className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
505
|
-
children:
|
|
506
|
-
/* @__PURE__ */
|
|
498
|
+
children: x ? /* @__PURE__ */ h(we, { children: [
|
|
499
|
+
/* @__PURE__ */ m(_e, {
|
|
507
500
|
size: 14,
|
|
508
501
|
className: "animate-spin"
|
|
509
502
|
}),
|
|
510
503
|
" ",
|
|
511
504
|
"Uploading… ",
|
|
512
|
-
|
|
505
|
+
je,
|
|
513
506
|
"%"
|
|
514
|
-
] }) : /* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */
|
|
507
|
+
] }) : /* @__PURE__ */ h(we, { children: [
|
|
508
|
+
/* @__PURE__ */ m(xe, { size: 14 }),
|
|
516
509
|
" ",
|
|
517
|
-
|
|
510
|
+
k.packageUrl ? "Replace zip" : "Upload zip"
|
|
518
511
|
] })
|
|
519
512
|
}),
|
|
520
|
-
|
|
513
|
+
k.packageUrl && !x && /* @__PURE__ */ m("span", {
|
|
521
514
|
className: "text-xs text-status-success-text",
|
|
522
515
|
children: "✓ Uploaded"
|
|
523
516
|
})
|
|
524
517
|
]
|
|
525
518
|
}),
|
|
526
|
-
|
|
519
|
+
S && /* @__PURE__ */ m("p", {
|
|
527
520
|
className: "text-xs text-status-error-text",
|
|
528
|
-
children:
|
|
521
|
+
children: S
|
|
529
522
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ m("p", {
|
|
531
524
|
className: "text-xs text-text-tertiary",
|
|
532
525
|
children: "The zip is the node executable. Upload it before publishing — users install exactly this artifact."
|
|
533
526
|
})
|
|
534
527
|
]
|
|
535
528
|
}),
|
|
536
|
-
|
|
529
|
+
H && /* @__PURE__ */ h("div", {
|
|
537
530
|
className: "space-y-2",
|
|
538
531
|
children: [
|
|
539
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ h("div", {
|
|
540
533
|
className: "flex items-center justify-between gap-2 flex-wrap",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
534
|
+
children: [/* @__PURE__ */ h("label", {
|
|
542
535
|
className: "text-sm font-medium",
|
|
543
536
|
children: [
|
|
544
537
|
"manifest.json",
|
|
545
538
|
" ",
|
|
546
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ m("span", {
|
|
547
540
|
className: "text-xs font-normal text-text-secondary",
|
|
548
541
|
children: "(optional)"
|
|
549
542
|
})
|
|
550
543
|
]
|
|
551
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ h("div", {
|
|
552
545
|
className: "flex items-center gap-2",
|
|
553
546
|
children: [
|
|
554
|
-
|
|
547
|
+
T && /* @__PURE__ */ h("span", {
|
|
555
548
|
className: "text-xs text-status-success-text",
|
|
556
|
-
children: ["✓ ",
|
|
549
|
+
children: ["✓ ", T]
|
|
557
550
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
559
|
-
ref:
|
|
551
|
+
/* @__PURE__ */ m("input", {
|
|
552
|
+
ref: w,
|
|
560
553
|
type: "file",
|
|
561
554
|
accept: ".json,application/json",
|
|
562
555
|
className: "hidden",
|
|
563
|
-
onChange:
|
|
556
|
+
onChange: Pe
|
|
564
557
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ h("button", {
|
|
566
559
|
type: "button",
|
|
567
|
-
onClick: () =>
|
|
560
|
+
onClick: () => w.current?.click(),
|
|
568
561
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-2.5 py-1 text-xs font-medium hover:bg-bg-sunken transition-colors",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ m(xe, { size: 12 }), "Upload manifest.json"]
|
|
570
563
|
})
|
|
571
564
|
]
|
|
572
565
|
})]
|
|
573
566
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ m("textarea", {
|
|
575
568
|
rows: 5,
|
|
576
569
|
placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
|
|
577
|
-
value:
|
|
570
|
+
value: k.manifestJson,
|
|
578
571
|
onChange: (e) => {
|
|
579
|
-
|
|
580
|
-
...
|
|
572
|
+
E(null), A({
|
|
573
|
+
...k,
|
|
581
574
|
manifestJson: e.target.value
|
|
582
575
|
});
|
|
583
576
|
},
|
|
584
577
|
className: "w-full rounded-md border bg-transparent px-3 py-2 text-xs font-mono resize-y placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
|
|
585
578
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ h("p", {
|
|
587
580
|
className: "text-xs text-text-tertiary",
|
|
588
581
|
children: [
|
|
589
582
|
"Upload or paste your ",
|
|
590
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ m("code", { children: "manifest.json" }),
|
|
591
584
|
" — update it whenever inputs, outputs, or operations change. The platform does not extract it from the zip automatically."
|
|
592
585
|
]
|
|
593
586
|
})
|
|
594
587
|
]
|
|
595
588
|
}),
|
|
596
|
-
|
|
589
|
+
Ie && /* @__PURE__ */ h("div", {
|
|
597
590
|
className: "space-y-1",
|
|
598
591
|
children: [
|
|
599
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ h("label", {
|
|
600
593
|
className: "text-sm font-medium",
|
|
601
594
|
children: [
|
|
602
595
|
"Required scopes",
|
|
603
596
|
" ",
|
|
604
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ m("span", {
|
|
605
598
|
className: "text-xs font-normal text-text-secondary",
|
|
606
599
|
children: "(optional)"
|
|
607
600
|
})
|
|
608
601
|
]
|
|
609
602
|
}),
|
|
610
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ m("input", {
|
|
611
604
|
type: "text",
|
|
612
|
-
value:
|
|
613
|
-
onChange: (e) =>
|
|
614
|
-
...
|
|
605
|
+
value: k.requiredScopes,
|
|
606
|
+
onChange: (e) => A({
|
|
607
|
+
...k,
|
|
615
608
|
requiredScopes: e.target.value
|
|
616
609
|
}),
|
|
617
610
|
placeholder: "e.g. read:contacts, write:messages",
|
|
618
611
|
className: "w-full rounded-md border bg-transparent px-3 py-2 text-sm placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
|
|
619
612
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ m("p", {
|
|
621
614
|
className: "text-xs text-text-tertiary",
|
|
622
615
|
children: "Comma-separated. List every permission this version needs — users will be prompted to accept any new or changed scopes on update."
|
|
623
616
|
})
|
|
624
617
|
]
|
|
625
618
|
}),
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
label:
|
|
628
|
-
value:
|
|
629
|
-
onChange: (e) =>
|
|
630
|
-
...
|
|
619
|
+
/* @__PURE__ */ m(ce, {
|
|
620
|
+
label: g("devportal.releaseNotes", "Release Notes"),
|
|
621
|
+
value: k.releaseNotes,
|
|
622
|
+
onChange: (e) => A({
|
|
623
|
+
...k,
|
|
631
624
|
releaseNotes: e.target.value
|
|
632
625
|
}),
|
|
633
|
-
placeholder:
|
|
626
|
+
placeholder: g("devportal.releaseNotesPlaceholder", "What changed in this release?"),
|
|
634
627
|
rows: 2
|
|
635
628
|
})
|
|
636
629
|
]
|
|
637
630
|
})
|
|
638
631
|
}),
|
|
639
|
-
|
|
640
|
-
open: !!
|
|
632
|
+
I && /* @__PURE__ */ m(o, {
|
|
633
|
+
open: !!I,
|
|
641
634
|
onOpenChange: (e) => {
|
|
642
|
-
e || (
|
|
635
|
+
e || (Ne(null), R(""));
|
|
643
636
|
},
|
|
644
|
-
onConfirm:
|
|
645
|
-
title: `Reject version ${
|
|
637
|
+
onConfirm: $e,
|
|
638
|
+
title: `Reject version ${I.version}`,
|
|
646
639
|
confirmLabel: "Reject Version",
|
|
647
|
-
cancelLabel:
|
|
640
|
+
cancelLabel: g("devportal.cancel", "Cancel"),
|
|
648
641
|
variant: "danger",
|
|
649
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ h("div", {
|
|
650
643
|
className: "space-y-3",
|
|
651
|
-
children: [/* @__PURE__ */
|
|
644
|
+
children: [/* @__PURE__ */ m("p", {
|
|
652
645
|
className: "text-sm text-text-secondary",
|
|
653
646
|
children: "The developer will be notified and can fix and resubmit. Please provide a clear reason."
|
|
654
|
-
}), /* @__PURE__ */
|
|
647
|
+
}), /* @__PURE__ */ h("div", {
|
|
655
648
|
className: "space-y-1",
|
|
656
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ h("label", {
|
|
657
650
|
className: "text-sm font-medium",
|
|
658
|
-
children: [
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
651
|
+
children: [
|
|
652
|
+
"Rejection reason",
|
|
653
|
+
" ",
|
|
654
|
+
/* @__PURE__ */ m("span", {
|
|
655
|
+
className: "text-status-error-text",
|
|
656
|
+
children: "*"
|
|
657
|
+
})
|
|
658
|
+
]
|
|
659
|
+
}), /* @__PURE__ */ m("textarea", {
|
|
663
660
|
rows: 3,
|
|
664
|
-
value:
|
|
665
|
-
onChange: (e) =>
|
|
661
|
+
value: L,
|
|
662
|
+
onChange: (e) => R(e.target.value),
|
|
666
663
|
placeholder: "e.g. Manifest contains disallowed network calls to external domains...",
|
|
667
664
|
className: "w-full rounded-md border bg-transparent px-3 py-2 text-sm placeholder:text-text-secondary focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)]"
|
|
668
665
|
})]
|
|
669
666
|
})]
|
|
670
667
|
})
|
|
671
668
|
}),
|
|
672
|
-
/* @__PURE__ */
|
|
673
|
-
open:
|
|
669
|
+
/* @__PURE__ */ m(o, {
|
|
670
|
+
open: Fe === "publish",
|
|
674
671
|
onOpenChange: (e) => {
|
|
675
|
-
e ||
|
|
672
|
+
e || z(null);
|
|
676
673
|
},
|
|
677
674
|
onConfirm: async () => {
|
|
678
|
-
if (
|
|
679
|
-
|
|
680
|
-
let e = await Promise.allSettled(
|
|
681
|
-
|
|
675
|
+
if (Y.length === 0) return;
|
|
676
|
+
M(null);
|
|
677
|
+
let e = await Promise.allSettled(Y.map((e) => We({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
678
|
+
N(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), z(null);
|
|
682
679
|
},
|
|
683
|
-
title:
|
|
684
|
-
description: `Submit ${
|
|
685
|
-
confirmLabel:
|
|
686
|
-
cancelLabel:
|
|
680
|
+
title: g("devportal.submitSelectedVersions", "Submit selected versions for review"),
|
|
681
|
+
description: `Submit ${Y.length} selected version${Y.length === 1 ? "" : "s"} for platform review?`,
|
|
682
|
+
confirmLabel: g("devportal.submitForReview", "Submit for Review"),
|
|
683
|
+
cancelLabel: g("devportal.cancel", "Cancel"),
|
|
687
684
|
variant: "success"
|
|
688
685
|
}),
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
open:
|
|
686
|
+
/* @__PURE__ */ m(o, {
|
|
687
|
+
open: Fe === "deprecate",
|
|
691
688
|
onOpenChange: (e) => {
|
|
692
|
-
e ||
|
|
689
|
+
e || z(null);
|
|
693
690
|
},
|
|
694
691
|
onConfirm: async () => {
|
|
695
|
-
if (
|
|
696
|
-
|
|
697
|
-
let e = await Promise.allSettled(
|
|
698
|
-
|
|
692
|
+
if (X.length === 0) return;
|
|
693
|
+
M(null);
|
|
694
|
+
let e = await Promise.allSettled(X.map((e) => Ge({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
695
|
+
N(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), z(null);
|
|
699
696
|
},
|
|
700
|
-
title:
|
|
701
|
-
description: `${
|
|
702
|
-
confirmLabel:
|
|
703
|
-
cancelLabel:
|
|
697
|
+
title: g("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
|
|
698
|
+
description: `${g("devportal.deprecate", "Deprecate")} ${X.length} selected version${X.length === 1 ? "" : "s"}? ${g("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,
|
|
699
|
+
confirmLabel: g("devportal.deprecate", "Deprecate"),
|
|
700
|
+
cancelLabel: g("devportal.cancel", "Cancel"),
|
|
704
701
|
variant: "warning"
|
|
705
702
|
})
|
|
706
703
|
]
|