@burdenoff/microfe-devportal 2026.711.1 → 2026.713.2
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/hooks/usePackageUpload.js +1 -0
- package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +551 -320
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/CreatePhysicalItemPage.js +1 -0
- package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
- package/dist/devportal/pages/EditPhysicalItemPage.js +1 -0
- package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
- package/dist/generated/global-operations.js +192 -185
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { EmptyState as t } from "../components/EmptyState.js";
|
|
3
|
-
import { useApproveApplicationVersionMutation as n, useCreateApplicationVersionMutation as r, useDeprecateApplicationVersionMutation as ee, useGetApplicationQuery as te, useGetApplicationVersionsQuery as ne, usePublishApplicationVersionMutation as re, useRejectApplicationVersionMutation as ie } from "../../generated/global-operations.js";
|
|
3
|
+
import { useApproveApplicationVersionMutation as n, useCreateApplicationVersionMutation as r, useDeprecateApplicationVersionMutation as ee, useGetApplicationQuery as te, useGetApplicationVersionsQuery as ne, usePublishApplicationVersionMutation as re, useRejectApplicationVersionMutation as ie, useUpdateApplicationVersionMutation as ae } from "../../generated/global-operations.js";
|
|
4
4
|
import { PageLayout as i } from "../components/PageLayout.js";
|
|
5
|
-
import { StatusBadge as
|
|
5
|
+
import { StatusBadge as oe } from "../components/StatusBadge.js";
|
|
6
6
|
import { SelectionCheckbox as a } from "../components/SelectionCheckbox.js";
|
|
7
|
-
import { DataTable as
|
|
8
|
-
import { InputField as
|
|
7
|
+
import { DataTable as se } from "../components/DataTable.js";
|
|
8
|
+
import { InputField as ce, TextareaField as le } from "../components/FormField.js";
|
|
9
9
|
import { ConfirmDialog as o } from "../components/ConfirmDialog.js";
|
|
10
|
-
import { PermissionGuard as
|
|
10
|
+
import { PermissionGuard as ue } from "../components/PermissionGuard.js";
|
|
11
11
|
import "../components/index.js";
|
|
12
12
|
import { DEVPORTAL_PERMISSIONS as s } from "../constants/permissions.js";
|
|
13
13
|
import { useDevportalPermission as c } from "../hooks/usePermission.js";
|
|
14
14
|
import "../hooks/index.js";
|
|
15
|
-
import
|
|
16
|
-
import { usePackageUpload as
|
|
17
|
-
import { useCallback as l, useEffect as
|
|
18
|
-
import { useI18n as
|
|
19
|
-
import { AlertCircle as p, Archive as
|
|
20
|
-
import { useParams as
|
|
21
|
-
import { Fragment as
|
|
15
|
+
import de from "../../node_modules/date-fns/format.js";
|
|
16
|
+
import { usePackageUpload as fe } from "../hooks/usePackageUpload.js";
|
|
17
|
+
import { useCallback as l, useEffect as pe, useMemo as u, useRef as d, useState as f } from "react";
|
|
18
|
+
import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
+
import { AlertCircle as p, Archive as he, CheckCircle as ge, Clock as _e, Loader2 as m, Package as ve, Plus as ye, Send as be, Upload as h, XCircle as xe } from "lucide-react";
|
|
20
|
+
import { useParams as Se } from "react-router-dom";
|
|
21
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
22
22
|
//#region src/devportal/pages/ApplicationVersionsPage.tsx
|
|
23
|
-
var
|
|
24
|
-
let { t:
|
|
25
|
-
let n =
|
|
23
|
+
var Ce = () => {
|
|
24
|
+
let { t: Ce } = me(), y = (e, t) => {
|
|
25
|
+
let n = Ce(e);
|
|
26
26
|
return n === e ? t : n;
|
|
27
|
-
}, { allowed:
|
|
27
|
+
}, { allowed: b } = c(s.APP_VERSION_CREATE), { allowed: x } = c(s.APP_VERSION_PUBLISH), { allowed: S } = c(s.APP_VERSION_DEPRECATE), { appId: C } = Se(), { workspacesGatewayUrl: we, authToken: Te, workspaceId: Ee, getWorkspaceToken: De } = e(), { upload: w, uploading: T, progress: Oe, error: E } = fe(we, Te, Ee, De), ke = d(null), Ae = d(null), je = d(null), Me = d(null), [Ne, D] = f(null), [Pe, O] = f(null), [Fe, k] = f(!1), [A, j] = f(null), [M, N] = f({
|
|
28
28
|
version: "",
|
|
29
29
|
releaseNotes: "",
|
|
30
30
|
changelog: "",
|
|
@@ -32,67 +32,82 @@ var Te = () => {
|
|
|
32
32
|
packageSize: "",
|
|
33
33
|
manifestJson: "",
|
|
34
34
|
requiredScopes: ""
|
|
35
|
-
}), [
|
|
35
|
+
}), [Ie, P] = f(null), [Le, F] = f(null), [I, L] = f(/* @__PURE__ */ new Set()), [R, Re] = f(null), [z, B] = f(""), ze = 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" && (N((e) => ({
|
|
42
42
|
...e,
|
|
43
43
|
manifestJson: n
|
|
44
|
-
})),
|
|
44
|
+
})), D(t.name));
|
|
45
45
|
}, n.readAsText(t), e.target.value = "";
|
|
46
|
-
}, []), [
|
|
47
|
-
variables: { id:
|
|
48
|
-
skip: !
|
|
46
|
+
}, []), [Be, V] = f(null), { data: H } = te({
|
|
47
|
+
variables: { id: C ?? "" },
|
|
48
|
+
skip: !C,
|
|
49
49
|
fetchPolicy: "cache-first"
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
let e =
|
|
53
|
-
if (!
|
|
50
|
+
}), U = H?.application?.appType === "WORKFLOW", W = H?.application?.appType === "NODE", Ve = !U && !W, G = H?.application, He = G?.pricingDetails ?? {}, Ue = G?.pricingType === "FREE" || G?.pricingType === "PAID" && typeof He.price == "number" && He.price > 0, We = !!G?.shortDescription?.trim() && !!G?.privacyPolicyUrl?.trim() && !!G?.termsOfServiceUrl?.trim(), K = Ue && We, q = [...We ? [] : ["Complete your store listing (short description, privacy policy, terms of service)"], ...Ue ? [] : ["Set pricing in the Pricing tab"]];
|
|
51
|
+
pe(() => {
|
|
52
|
+
let e = H?.application?.name;
|
|
53
|
+
if (!C || !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(C, e), () => t?.unregister(C);
|
|
56
|
+
}, [C, H?.application?.name]);
|
|
57
|
+
let { data: J, loading: Ge, error: Ke } = ne({
|
|
58
|
+
variables: { applicationId: C },
|
|
59
|
+
skip: !C,
|
|
60
60
|
fetchPolicy: "cache-and-network"
|
|
61
|
-
}), [
|
|
62
|
-
if (!
|
|
63
|
-
|
|
61
|
+
}), [qe, { loading: Je }] = r({ refetchQueries: ["GetApplicationVersions"] }), [Ye, { loading: Xe }] = ae({ refetchQueries: ["GetApplicationVersions"] }), [Ze] = re({ refetchQueries: ["GetApplicationVersions"] }), [Qe] = ee({ refetchQueries: ["GetApplicationVersions"] }), [$e] = n({ refetchQueries: ["GetApplicationVersions"] }), [et] = ie({ refetchQueries: ["GetApplicationVersions"] }), Y = u(() => J?.application?.versions?.edges?.map((e) => e.node) ?? [], [J?.application?.versions]), X = u(() => Y.filter((e) => I.has(e.id)), [Y, I]), Z = u(() => X.filter((e) => e.status === "draft" || e.status === "rejected"), [X]), Q = u(() => X.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [X]), $ = Y.length > 0 && Y.every((e) => I.has(e.id)), tt = Y.some((e) => I.has(e.id)) && !$, nt = async () => {
|
|
62
|
+
if (!C || !M.version.trim()) return;
|
|
63
|
+
P(null);
|
|
64
64
|
let e;
|
|
65
|
-
if (
|
|
66
|
-
if (!
|
|
67
|
-
|
|
65
|
+
if (U) {
|
|
66
|
+
if (!M.manifestJson.trim()) {
|
|
67
|
+
P("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(M.manifestJson);
|
|
72
72
|
} catch {
|
|
73
|
-
|
|
73
|
+
P("Invalid JSON in Workflow Definition — please check your input.");
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
} else if (
|
|
77
|
-
|
|
76
|
+
} else if (W) {
|
|
77
|
+
if (!M.packageUrl) {
|
|
78
|
+
P("Package zip is required for Node versions — upload a .zip file before creating.");
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (!M.manifestJson.trim()) {
|
|
82
|
+
P("manifest.json is required for Node versions — upload or paste your manifest before creating.");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
e = JSON.parse(M.manifestJson);
|
|
87
|
+
} catch {
|
|
88
|
+
P("Invalid JSON in manifest — please check your input.");
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
} else if (M.manifestJson.trim()) try {
|
|
92
|
+
e = JSON.parse(M.manifestJson);
|
|
78
93
|
} catch {
|
|
79
|
-
|
|
94
|
+
P("Invalid JSON in manifest — please check your input.");
|
|
80
95
|
return;
|
|
81
96
|
}
|
|
82
|
-
let t =
|
|
97
|
+
let t = Ve && M.requiredScopes.trim() ? M.requiredScopes.split(",").map((e) => e.trim()).filter(Boolean) : void 0;
|
|
83
98
|
try {
|
|
84
|
-
await
|
|
85
|
-
applicationId:
|
|
99
|
+
await qe({ variables: {
|
|
100
|
+
applicationId: C,
|
|
86
101
|
input: {
|
|
87
|
-
version:
|
|
88
|
-
releaseNotes:
|
|
89
|
-
changelog:
|
|
90
|
-
packageUrl:
|
|
91
|
-
packageSize:
|
|
102
|
+
version: M.version,
|
|
103
|
+
releaseNotes: M.releaseNotes || void 0,
|
|
104
|
+
changelog: M.changelog || void 0,
|
|
105
|
+
packageUrl: M.packageUrl || void 0,
|
|
106
|
+
packageSize: M.packageSize || void 0,
|
|
92
107
|
manifest: e,
|
|
93
108
|
requiredScopes: t
|
|
94
109
|
}
|
|
95
|
-
} }),
|
|
110
|
+
} }), k(!1), D(null), N({
|
|
96
111
|
version: "",
|
|
97
112
|
releaseNotes: "",
|
|
98
113
|
changelog: "",
|
|
@@ -100,273 +115,317 @@ var Te = () => {
|
|
|
100
115
|
packageSize: "",
|
|
101
116
|
manifestJson: "",
|
|
102
117
|
requiredScopes: ""
|
|
103
|
-
}),
|
|
118
|
+
}), F(y("devportal.versionCreatedSuccess", "Version created successfully"));
|
|
104
119
|
} catch (e) {
|
|
105
|
-
|
|
120
|
+
P(e instanceof Error ? e.message : y("devportal.versionCreateFailed", "Failed to create version"));
|
|
106
121
|
}
|
|
107
|
-
},
|
|
122
|
+
}, rt = l(async (e) => {
|
|
108
123
|
let t = e.target.files?.[0];
|
|
109
124
|
if (t) {
|
|
110
125
|
e.target.value = "";
|
|
111
126
|
try {
|
|
112
|
-
let e = await
|
|
113
|
-
|
|
127
|
+
let e = await w(t);
|
|
128
|
+
N((n) => ({
|
|
114
129
|
...n,
|
|
115
130
|
packageUrl: e.downloadUrl,
|
|
116
131
|
packageSize: String(t.size)
|
|
117
132
|
}));
|
|
118
133
|
} catch {}
|
|
119
134
|
}
|
|
120
|
-
}, [
|
|
121
|
-
|
|
135
|
+
}, [w]), it = l(async (e) => {
|
|
136
|
+
let t = e.target.files?.[0];
|
|
137
|
+
if (t) {
|
|
138
|
+
e.target.value = "";
|
|
139
|
+
try {
|
|
140
|
+
let e = await w(t);
|
|
141
|
+
j((n) => n && {
|
|
142
|
+
...n,
|
|
143
|
+
newPackageUrl: e.downloadUrl,
|
|
144
|
+
newPackageSize: String(t.size)
|
|
145
|
+
});
|
|
146
|
+
} catch {}
|
|
147
|
+
}
|
|
148
|
+
}, [w]), at = l((e) => {
|
|
149
|
+
let t = e.target.files?.[0];
|
|
150
|
+
if (!t) return;
|
|
151
|
+
let n = new FileReader();
|
|
152
|
+
n.onload = (e) => {
|
|
153
|
+
let n = e.target?.result;
|
|
154
|
+
typeof n == "string" && (j((e) => e && {
|
|
155
|
+
...e,
|
|
156
|
+
manifestJson: n
|
|
157
|
+
}), O(t.name));
|
|
158
|
+
}, n.readAsText(t), e.target.value = "";
|
|
159
|
+
}, []), ot = async () => {
|
|
160
|
+
if (!A) return;
|
|
161
|
+
P(null);
|
|
162
|
+
let e;
|
|
163
|
+
if (A.manifestJson.trim()) try {
|
|
164
|
+
e = JSON.parse(A.manifestJson);
|
|
165
|
+
} catch {
|
|
166
|
+
P("Invalid JSON in manifest — please check your input.");
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
let t = {};
|
|
170
|
+
A.releaseNotes.trim() && (t.releaseNotes = A.releaseNotes), A.newPackageUrl && (t.packageUrl = A.newPackageUrl, t.packageSize = A.newPackageSize), e && (t.manifest = e);
|
|
122
171
|
try {
|
|
123
|
-
await
|
|
172
|
+
await Ye({ variables: {
|
|
173
|
+
id: A.versionId,
|
|
174
|
+
input: t
|
|
175
|
+
} }), j(null), O(null), F(y("devportal.versionUpdatedSuccess", "Version updated successfully"));
|
|
124
176
|
} catch (e) {
|
|
125
|
-
|
|
177
|
+
P(e instanceof Error ? e.message : y("devportal.versionUpdateFailed", "Failed to update version"));
|
|
126
178
|
}
|
|
127
|
-
},
|
|
128
|
-
|
|
179
|
+
}, st = async (e) => {
|
|
180
|
+
P(null), F(null);
|
|
129
181
|
try {
|
|
130
|
-
await
|
|
182
|
+
await Ze({ variables: { id: e } }), F(y("devportal.versionSubmittedSuccess", "Version submitted for review — you'll be notified when approved"));
|
|
131
183
|
} catch (e) {
|
|
132
|
-
|
|
184
|
+
P(e instanceof Error ? e.message : y("devportal.versionPublishFailed", "Failed to submit version for review"));
|
|
133
185
|
}
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
|
|
186
|
+
}, ct = async (e) => {
|
|
187
|
+
P(null), F(null);
|
|
188
|
+
try {
|
|
189
|
+
await Qe({ variables: { id: e } }), F(y("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
|
|
190
|
+
} catch (e) {
|
|
191
|
+
P(e instanceof Error ? e.message : y("devportal.versionDeprecateFailed", "Failed to deprecate version"));
|
|
192
|
+
}
|
|
193
|
+
}, lt = async () => {
|
|
194
|
+
if (!(!R || !z.trim())) {
|
|
195
|
+
P(null), F(null);
|
|
137
196
|
try {
|
|
138
|
-
await
|
|
139
|
-
id:
|
|
140
|
-
reason:
|
|
141
|
-
} }),
|
|
197
|
+
await et({ variables: {
|
|
198
|
+
id: R.versionId,
|
|
199
|
+
reason: z
|
|
200
|
+
} }), F(y("devportal.versionRejectedSuccess", "Version rejected — developer has been notified")), Re(null), B("");
|
|
142
201
|
} catch (e) {
|
|
143
|
-
|
|
202
|
+
P(e instanceof Error ? e.message : y("devportal.versionRejectFailed", "Failed to reject version"));
|
|
144
203
|
}
|
|
145
204
|
}
|
|
146
|
-
},
|
|
205
|
+
}, ut = (e) => e.status === "published" && e.isLatest ? /* @__PURE__ */ _(ge, {
|
|
147
206
|
size: 16,
|
|
148
207
|
className: "text-status-success-text"
|
|
149
|
-
}) : e.status === "pending_review" ? /* @__PURE__ */
|
|
208
|
+
}) : e.status === "pending_review" ? /* @__PURE__ */ _(be, {
|
|
150
209
|
size: 16,
|
|
151
210
|
className: "text-status-info-text"
|
|
152
|
-
}) : e.status === "rejected" ? /* @__PURE__ */
|
|
211
|
+
}) : e.status === "rejected" ? /* @__PURE__ */ _(xe, {
|
|
153
212
|
size: 16,
|
|
154
213
|
className: "text-status-error-text"
|
|
155
|
-
}) : e.status === "draft" ? /* @__PURE__ */
|
|
214
|
+
}) : e.status === "draft" ? /* @__PURE__ */ _(_e, {
|
|
156
215
|
size: 16,
|
|
157
216
|
className: "text-status-warning-text"
|
|
158
|
-
}) : e.status === "deprecated" ? /* @__PURE__ */
|
|
217
|
+
}) : e.status === "deprecated" ? /* @__PURE__ */ _(he, {
|
|
159
218
|
size: 16,
|
|
160
219
|
className: "text-text-secondary"
|
|
161
|
-
}) : /* @__PURE__ */
|
|
220
|
+
}) : /* @__PURE__ */ _(ve, {
|
|
162
221
|
size: 16,
|
|
163
222
|
className: "text-accent-blue"
|
|
164
|
-
}),
|
|
165
|
-
|
|
223
|
+
}), dt = (e, t) => {
|
|
224
|
+
L((n) => {
|
|
166
225
|
let r = new Set(n);
|
|
167
226
|
return t ? r.add(e) : r.delete(e), r;
|
|
168
227
|
});
|
|
169
|
-
},
|
|
170
|
-
|
|
228
|
+
}, ft = (e) => {
|
|
229
|
+
L((t) => {
|
|
171
230
|
let n = new Set(t);
|
|
172
|
-
return
|
|
231
|
+
return Y.forEach((t) => {
|
|
173
232
|
e ? n.add(t.id) : n.delete(t.id);
|
|
174
233
|
}), n;
|
|
175
234
|
});
|
|
176
|
-
},
|
|
177
|
-
return
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
180
|
-
backLink: `/apps/${
|
|
181
|
-
backLabel:
|
|
182
|
-
children: /* @__PURE__ */
|
|
235
|
+
}, pt = () => L(/* @__PURE__ */ new Set());
|
|
236
|
+
return Ge && !J ? /* @__PURE__ */ _(i, {
|
|
237
|
+
title: y("devportal.versionManagement", "Version Management"),
|
|
238
|
+
description: y("devportal.versionManagementDescription", "Manage your application versions"),
|
|
239
|
+
backLink: `/apps/${C}`,
|
|
240
|
+
backLabel: y("devportal.backToApplication", "Back to Application"),
|
|
241
|
+
children: /* @__PURE__ */ _("div", {
|
|
183
242
|
className: "flex items-center justify-center py-16",
|
|
184
|
-
children: /* @__PURE__ */ m
|
|
243
|
+
children: /* @__PURE__ */ _(m, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
185
244
|
})
|
|
186
|
-
}) :
|
|
187
|
-
title:
|
|
188
|
-
description:
|
|
189
|
-
backLink: `/apps/${
|
|
190
|
-
backLabel:
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
icon: /* @__PURE__ */
|
|
245
|
+
}) : Ke && !J ? /* @__PURE__ */ _(i, {
|
|
246
|
+
title: y("devportal.versionManagement", "Version Management"),
|
|
247
|
+
description: y("devportal.versionManagementDescription", "Manage your application versions"),
|
|
248
|
+
backLink: `/apps/${C}`,
|
|
249
|
+
backLabel: y("devportal.backToApplication", "Back to Application"),
|
|
250
|
+
children: /* @__PURE__ */ _(t, {
|
|
251
|
+
icon: /* @__PURE__ */ _(p, {
|
|
193
252
|
size: 32,
|
|
194
253
|
className: "text-status-error-text"
|
|
195
254
|
}),
|
|
196
|
-
title:
|
|
197
|
-
description:
|
|
255
|
+
title: y("devportal.failedToLoadVersions", "Failed to load versions"),
|
|
256
|
+
description: Ke.message || y("devportal.versionsLoadError", "An error occurred while loading versions")
|
|
198
257
|
})
|
|
199
|
-
}) : /* @__PURE__ */
|
|
258
|
+
}) : /* @__PURE__ */ _(ue, {
|
|
200
259
|
permission: s.APP_READ,
|
|
201
|
-
children: /* @__PURE__ */
|
|
202
|
-
title:
|
|
203
|
-
description:
|
|
204
|
-
purpose:
|
|
205
|
-
backLink: `/apps/${
|
|
206
|
-
backLabel:
|
|
207
|
-
actions: /* @__PURE__ */
|
|
208
|
-
onClick: () =>
|
|
209
|
-
disabled: !
|
|
210
|
-
"aria-disabled": !
|
|
260
|
+
children: /* @__PURE__ */ v(i, {
|
|
261
|
+
title: y("devportal.versionManagement", "Version Management"),
|
|
262
|
+
description: y("devportal.versionManagementDescription", "Manage your application versions"),
|
|
263
|
+
purpose: U ? y("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.") : W ? y("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.") : y("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."),
|
|
264
|
+
backLink: `/apps/${C}`,
|
|
265
|
+
backLabel: y("devportal.backToApplication", "Back to Application"),
|
|
266
|
+
actions: /* @__PURE__ */ v("button", {
|
|
267
|
+
onClick: () => k(!0),
|
|
268
|
+
disabled: !b,
|
|
269
|
+
"aria-disabled": !b,
|
|
211
270
|
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",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ _(ye, { size: 16 }), y("devportal.newVersion", "New Version")]
|
|
213
272
|
}),
|
|
214
273
|
children: [
|
|
215
|
-
|
|
274
|
+
Ie && /* @__PURE__ */ v("div", {
|
|
216
275
|
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",
|
|
217
276
|
children: [
|
|
218
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ _(p, {
|
|
219
278
|
size: 16,
|
|
220
279
|
className: "flex-shrink-0"
|
|
221
280
|
}),
|
|
222
|
-
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
onClick: () =>
|
|
281
|
+
Ie,
|
|
282
|
+
/* @__PURE__ */ _("button", {
|
|
283
|
+
onClick: () => P(null),
|
|
225
284
|
className: "ml-auto text-status-error-text hover:text-status-error-text",
|
|
226
|
-
children:
|
|
285
|
+
children: y("devportal.dismiss", "Dismiss")
|
|
227
286
|
})
|
|
228
287
|
]
|
|
229
288
|
}),
|
|
230
|
-
|
|
289
|
+
Le && /* @__PURE__ */ v("div", {
|
|
231
290
|
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",
|
|
232
291
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ _(ge, {
|
|
234
293
|
size: 16,
|
|
235
294
|
className: "flex-shrink-0"
|
|
236
295
|
}),
|
|
237
|
-
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
onClick: () =>
|
|
296
|
+
Le,
|
|
297
|
+
/* @__PURE__ */ _("button", {
|
|
298
|
+
onClick: () => F(null),
|
|
240
299
|
className: "ml-auto text-status-success-text hover:text-status-success-text",
|
|
241
|
-
children:
|
|
300
|
+
children: y("devportal.dismiss", "Dismiss")
|
|
242
301
|
})
|
|
243
302
|
]
|
|
244
303
|
}),
|
|
245
|
-
|
|
304
|
+
G && !K && /* @__PURE__ */ v("div", {
|
|
246
305
|
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__ */
|
|
306
|
+
children: [/* @__PURE__ */ _(p, {
|
|
248
307
|
size: 16,
|
|
249
308
|
className: "mt-0.5 shrink-0"
|
|
250
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
251
310
|
className: "font-medium",
|
|
252
311
|
children: "Complete your app setup before submitting for review"
|
|
253
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ _("ul", {
|
|
254
313
|
className: "mt-1 list-disc pl-4 text-xs opacity-80",
|
|
255
|
-
children:
|
|
314
|
+
children: q.map((e) => /* @__PURE__ */ _("li", { children: e }, e))
|
|
256
315
|
})] })]
|
|
257
316
|
}),
|
|
258
|
-
|
|
317
|
+
Y.length > 0 && /* @__PURE__ */ _("div", {
|
|
259
318
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
260
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ v("div", {
|
|
261
320
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ v("div", {
|
|
263
322
|
className: "flex flex-wrap items-center gap-3",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ v("div", {
|
|
265
324
|
className: "flex items-center gap-2",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
267
|
-
checked:
|
|
268
|
-
indeterminate:
|
|
269
|
-
onChange:
|
|
325
|
+
children: [/* @__PURE__ */ _(a, {
|
|
326
|
+
checked: $,
|
|
327
|
+
indeterminate: tt,
|
|
328
|
+
onChange: ft,
|
|
270
329
|
ariaLabel: "Select all visible versions"
|
|
271
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ _("span", {
|
|
272
331
|
className: "text-sm font-medium",
|
|
273
|
-
children:
|
|
332
|
+
children: y("devportal.selectAllVisible", "Select all visible")
|
|
274
333
|
})]
|
|
275
|
-
}),
|
|
276
|
-
onClick:
|
|
334
|
+
}), I.size > 0 && /* @__PURE__ */ _("button", {
|
|
335
|
+
onClick: pt,
|
|
277
336
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
278
|
-
children:
|
|
337
|
+
children: y("devportal.clearSelection", "Clear selection")
|
|
279
338
|
})]
|
|
280
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ v("div", {
|
|
281
340
|
className: "flex flex-wrap items-center gap-2",
|
|
282
341
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ v("span", {
|
|
284
343
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
285
|
-
children: [
|
|
344
|
+
children: [I.size, " selected"]
|
|
286
345
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
onClick: () =>
|
|
289
|
-
disabled:
|
|
290
|
-
"aria-disabled": !
|
|
291
|
-
title:
|
|
346
|
+
/* @__PURE__ */ v("button", {
|
|
347
|
+
onClick: () => V("publish"),
|
|
348
|
+
disabled: Z.length === 0 || !x || !K,
|
|
349
|
+
"aria-disabled": !x || !K,
|
|
350
|
+
title: K ? void 0 : q.join(" · "),
|
|
292
351
|
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",
|
|
293
|
-
children: [
|
|
352
|
+
children: [y("devportal.submitForReview", "Submit for Review"), Z.length > 0 ? ` (${Z.length})` : ""]
|
|
294
353
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
onClick: () =>
|
|
297
|
-
disabled:
|
|
298
|
-
"aria-disabled": !
|
|
354
|
+
/* @__PURE__ */ v("button", {
|
|
355
|
+
onClick: () => V("deprecate"),
|
|
356
|
+
disabled: Q.length === 0 || !S,
|
|
357
|
+
"aria-disabled": !S,
|
|
299
358
|
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",
|
|
300
|
-
children: [
|
|
359
|
+
children: [y("devportal.deprecateSelected", "Deprecate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
|
|
301
360
|
})
|
|
302
361
|
]
|
|
303
362
|
})]
|
|
304
363
|
})
|
|
305
364
|
}),
|
|
306
|
-
|
|
307
|
-
data:
|
|
365
|
+
Y.length > 0 ? /* @__PURE__ */ _(se, {
|
|
366
|
+
data: Y,
|
|
308
367
|
keyField: "id",
|
|
309
368
|
columns: [
|
|
310
369
|
{
|
|
311
370
|
key: "select",
|
|
312
|
-
header: /* @__PURE__ */
|
|
313
|
-
checked:
|
|
314
|
-
indeterminate:
|
|
315
|
-
onChange:
|
|
371
|
+
header: /* @__PURE__ */ _(a, {
|
|
372
|
+
checked: $,
|
|
373
|
+
indeterminate: tt,
|
|
374
|
+
onChange: ft,
|
|
316
375
|
ariaLabel: "Select all visible versions"
|
|
317
376
|
}),
|
|
318
377
|
className: "w-12",
|
|
319
|
-
render: (e) => /* @__PURE__ */
|
|
378
|
+
render: (e) => /* @__PURE__ */ _("div", {
|
|
320
379
|
onClick: (e) => e.stopPropagation(),
|
|
321
|
-
children: /* @__PURE__ */
|
|
322
|
-
checked:
|
|
323
|
-
onChange: (t) =>
|
|
380
|
+
children: /* @__PURE__ */ _(a, {
|
|
381
|
+
checked: I.has(e.id),
|
|
382
|
+
onChange: (t) => dt(e.id, t),
|
|
324
383
|
ariaLabel: `Select version ${e.version}`
|
|
325
384
|
})
|
|
326
385
|
})
|
|
327
386
|
},
|
|
328
387
|
{
|
|
329
388
|
key: "version",
|
|
330
|
-
header:
|
|
331
|
-
render: (e) => /* @__PURE__ */
|
|
389
|
+
header: y("devportal.version", "Version"),
|
|
390
|
+
render: (e) => /* @__PURE__ */ v("div", {
|
|
332
391
|
className: "flex items-center gap-2",
|
|
333
392
|
children: [
|
|
334
|
-
|
|
335
|
-
/* @__PURE__ */
|
|
393
|
+
ut(e),
|
|
394
|
+
/* @__PURE__ */ _("span", {
|
|
336
395
|
className: "font-mono font-medium",
|
|
337
396
|
children: e.version
|
|
338
397
|
}),
|
|
339
|
-
e.isLatest && /* @__PURE__ */
|
|
398
|
+
e.isLatest && /* @__PURE__ */ _("span", {
|
|
340
399
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
341
|
-
children:
|
|
400
|
+
children: y("devportal.latest", "Latest")
|
|
342
401
|
}),
|
|
343
|
-
!e.isStable && /* @__PURE__ */
|
|
402
|
+
!e.isStable && /* @__PURE__ */ _("span", {
|
|
344
403
|
className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs text-status-warning-text",
|
|
345
|
-
children:
|
|
404
|
+
children: y("devportal.beta", "Beta")
|
|
346
405
|
})
|
|
347
406
|
]
|
|
348
407
|
})
|
|
349
408
|
},
|
|
350
409
|
{
|
|
351
410
|
key: "releaseNotes",
|
|
352
|
-
header:
|
|
353
|
-
render: (e) => /* @__PURE__ */
|
|
411
|
+
header: y("devportal.releaseNotes", "Release Notes"),
|
|
412
|
+
render: (e) => /* @__PURE__ */ _("p", {
|
|
354
413
|
className: "max-w-md truncate text-sm text-text-secondary",
|
|
355
|
-
children: e.releaseNotes ||
|
|
414
|
+
children: e.releaseNotes || y("devportal.noReleaseNotes", "No release notes")
|
|
356
415
|
})
|
|
357
416
|
},
|
|
358
417
|
{
|
|
359
418
|
key: "status",
|
|
360
|
-
header:
|
|
361
|
-
render: (e) => /* @__PURE__ */
|
|
419
|
+
header: y("devportal.status", "Status"),
|
|
420
|
+
render: (e) => /* @__PURE__ */ v("div", {
|
|
362
421
|
className: "space-y-1",
|
|
363
422
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
e.status === "pending_review" && /* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ _(oe, { status: e.status === "pending_review" ? "In Review" : e.status }),
|
|
424
|
+
e.status === "pending_review" && /* @__PURE__ */ _("p", {
|
|
366
425
|
className: "text-xs text-status-info-text",
|
|
367
426
|
children: "Awaiting platform review"
|
|
368
427
|
}),
|
|
369
|
-
e.status === "rejected" && e.reviewNotes && /* @__PURE__ */
|
|
428
|
+
e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ _("p", {
|
|
370
429
|
className: "text-xs text-status-error-text max-w-xs",
|
|
371
430
|
children: e.reviewNotes
|
|
372
431
|
})
|
|
@@ -375,329 +434,501 @@ var Te = () => {
|
|
|
375
434
|
},
|
|
376
435
|
{
|
|
377
436
|
key: "publishedAt",
|
|
378
|
-
header:
|
|
379
|
-
render: (e) => e.publishedAt ?
|
|
437
|
+
header: y("devportal.published", "Published"),
|
|
438
|
+
render: (e) => e.publishedAt ? de(new Date(e.publishedAt), "MMM d, yyyy") : "-"
|
|
380
439
|
},
|
|
381
440
|
{
|
|
382
441
|
key: "actions",
|
|
383
442
|
header: "",
|
|
384
443
|
className: "w-48",
|
|
385
|
-
render: (e) => /* @__PURE__ */
|
|
444
|
+
render: (e) => /* @__PURE__ */ v("div", {
|
|
386
445
|
className: "flex flex-wrap gap-2",
|
|
387
|
-
children: [
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
446
|
+
children: [
|
|
447
|
+
(e.status === "draft" || e.status === "rejected") && b && /* @__PURE__ */ _("button", {
|
|
448
|
+
className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary hover:underline",
|
|
449
|
+
onClick: () => {
|
|
450
|
+
j({
|
|
451
|
+
versionId: e.id,
|
|
452
|
+
version: e.version,
|
|
453
|
+
hasExistingZip: !!e.packageUrl,
|
|
454
|
+
newPackageUrl: "",
|
|
455
|
+
newPackageSize: "",
|
|
456
|
+
manifestJson: "",
|
|
457
|
+
releaseNotes: e.releaseNotes ?? ""
|
|
458
|
+
}), O(null);
|
|
459
|
+
},
|
|
460
|
+
children: "Edit"
|
|
461
|
+
}),
|
|
462
|
+
(e.status === "draft" || e.status === "rejected") && G?.status === "PUBLISHED" && /* @__PURE__ */ v("button", {
|
|
463
|
+
className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50 disabled:cursor-not-allowed",
|
|
464
|
+
disabled: !x || !K,
|
|
465
|
+
"aria-disabled": !x || !K,
|
|
466
|
+
title: K ? void 0 : q.join(" · "),
|
|
467
|
+
onClick: () => st(e.id),
|
|
468
|
+
children: [/* @__PURE__ */ _(be, { size: 11 }), y("devportal.submitForReview", "Submit for Review")]
|
|
469
|
+
}),
|
|
470
|
+
e.status === "published" && !e.isLatest && /* @__PURE__ */ _("button", {
|
|
471
|
+
className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
|
|
472
|
+
disabled: !S,
|
|
473
|
+
"aria-disabled": !S,
|
|
474
|
+
onClick: () => ct(e.id),
|
|
475
|
+
children: y("devportal.deprecate", "Deprecate")
|
|
476
|
+
})
|
|
477
|
+
]
|
|
401
478
|
})
|
|
402
479
|
}
|
|
403
480
|
]
|
|
404
|
-
}) : /* @__PURE__ */
|
|
481
|
+
}) : /* @__PURE__ */ _(t, {
|
|
405
482
|
illustration: "empty-data",
|
|
406
|
-
title:
|
|
407
|
-
description:
|
|
408
|
-
action: /* @__PURE__ */
|
|
409
|
-
onClick: () =>
|
|
483
|
+
title: y("devportal.noVersionsYet", "No versions yet"),
|
|
484
|
+
description: y("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
|
|
485
|
+
action: /* @__PURE__ */ v("button", {
|
|
486
|
+
onClick: () => k(!0),
|
|
410
487
|
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",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ _(ye, { size: 16 }), y("devportal.createVersion", "Create Version")]
|
|
412
489
|
})
|
|
413
490
|
}),
|
|
414
|
-
|
|
415
|
-
open:
|
|
416
|
-
onOpenChange:
|
|
417
|
-
onConfirm:
|
|
418
|
-
title:
|
|
419
|
-
confirmLabel:
|
|
420
|
-
children: /* @__PURE__ */
|
|
491
|
+
Fe && /* @__PURE__ */ _(o, {
|
|
492
|
+
open: Fe,
|
|
493
|
+
onOpenChange: k,
|
|
494
|
+
onConfirm: nt,
|
|
495
|
+
title: y("devportal.createNewVersion", "Create New Version"),
|
|
496
|
+
confirmLabel: Je ? y("devportal.creating", "Creating...") : y("devportal.createVersion", "Create Version"),
|
|
497
|
+
children: /* @__PURE__ */ v("div", {
|
|
421
498
|
className: "space-y-4",
|
|
422
499
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
label:
|
|
425
|
-
value:
|
|
426
|
-
onChange: (e) =>
|
|
427
|
-
...
|
|
500
|
+
/* @__PURE__ */ _(ce, {
|
|
501
|
+
label: y("devportal.versionNumber", "Version Number"),
|
|
502
|
+
value: M.version,
|
|
503
|
+
onChange: (e) => N({
|
|
504
|
+
...M,
|
|
428
505
|
version: e.target.value
|
|
429
506
|
}),
|
|
430
507
|
placeholder: "e.g., 2.2.0",
|
|
431
|
-
hint:
|
|
508
|
+
hint: y("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
|
|
432
509
|
required: !0
|
|
433
510
|
}),
|
|
434
|
-
|
|
511
|
+
U && /* @__PURE__ */ v("div", {
|
|
435
512
|
className: "space-y-1",
|
|
436
513
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ v("label", {
|
|
438
515
|
className: "text-sm font-medium",
|
|
439
516
|
children: [
|
|
440
517
|
"Workflow Definition (JSON)",
|
|
441
518
|
" ",
|
|
442
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ _("span", {
|
|
443
520
|
className: "text-status-error-text",
|
|
444
521
|
children: "*"
|
|
445
522
|
})
|
|
446
523
|
]
|
|
447
524
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ _("textarea", {
|
|
449
526
|
rows: 10,
|
|
450
527
|
required: !0,
|
|
451
528
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
452
|
-
value:
|
|
453
|
-
onChange: (e) =>
|
|
454
|
-
...
|
|
529
|
+
value: M.manifestJson,
|
|
530
|
+
onChange: (e) => N({
|
|
531
|
+
...M,
|
|
455
532
|
manifestJson: e.target.value
|
|
456
533
|
}),
|
|
457
534
|
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)]"
|
|
458
535
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ v("p", {
|
|
460
537
|
className: "text-xs text-text-secondary",
|
|
461
538
|
children: [
|
|
462
539
|
"Paste the full ",
|
|
463
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ _("code", { children: "{nodes, edges}" }),
|
|
464
541
|
" JSON. Saved as this version's manifest — no zip needed."
|
|
465
542
|
]
|
|
466
543
|
})
|
|
467
544
|
]
|
|
468
545
|
}),
|
|
469
|
-
|
|
546
|
+
W && /* @__PURE__ */ v("div", {
|
|
470
547
|
className: "space-y-1",
|
|
471
548
|
children: [
|
|
472
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ v("label", {
|
|
473
550
|
className: "text-sm font-medium",
|
|
474
551
|
children: [
|
|
475
552
|
"Package (.zip)",
|
|
476
553
|
" ",
|
|
477
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ _("span", {
|
|
478
555
|
className: "text-status-error-text",
|
|
479
556
|
children: "*"
|
|
480
557
|
})
|
|
481
558
|
]
|
|
482
559
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ v("div", {
|
|
484
561
|
className: "flex gap-2 items-center",
|
|
485
562
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
ref:
|
|
563
|
+
/* @__PURE__ */ _("input", {
|
|
564
|
+
ref: ke,
|
|
488
565
|
type: "file",
|
|
489
566
|
accept: ".zip",
|
|
490
567
|
className: "hidden",
|
|
491
|
-
onChange:
|
|
568
|
+
onChange: rt
|
|
492
569
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ _("button", {
|
|
494
571
|
type: "button",
|
|
495
|
-
disabled:
|
|
496
|
-
onClick: () =>
|
|
572
|
+
disabled: T,
|
|
573
|
+
onClick: () => ke.current?.click(),
|
|
497
574
|
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",
|
|
498
|
-
children:
|
|
499
|
-
/* @__PURE__ */ m
|
|
575
|
+
children: T ? /* @__PURE__ */ v(g, { children: [
|
|
576
|
+
/* @__PURE__ */ _(m, {
|
|
500
577
|
size: 14,
|
|
501
578
|
className: "animate-spin"
|
|
502
579
|
}),
|
|
503
580
|
" ",
|
|
504
581
|
"Uploading… ",
|
|
505
|
-
|
|
582
|
+
Oe,
|
|
506
583
|
"%"
|
|
507
|
-
] }) : /* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
584
|
+
] }) : /* @__PURE__ */ v(g, { children: [
|
|
585
|
+
/* @__PURE__ */ _(h, { size: 14 }),
|
|
509
586
|
" ",
|
|
510
|
-
|
|
587
|
+
M.packageUrl ? "Replace zip" : "Upload zip"
|
|
511
588
|
] })
|
|
512
589
|
}),
|
|
513
|
-
|
|
590
|
+
M.packageUrl && !T && /* @__PURE__ */ _("span", {
|
|
514
591
|
className: "text-xs text-status-success-text",
|
|
515
592
|
children: "✓ Uploaded"
|
|
516
593
|
})
|
|
517
594
|
]
|
|
518
595
|
}),
|
|
519
|
-
|
|
596
|
+
E && /* @__PURE__ */ _("p", {
|
|
520
597
|
className: "text-xs text-status-error-text",
|
|
521
|
-
children:
|
|
598
|
+
children: E
|
|
522
599
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ _("p", {
|
|
524
601
|
className: "text-xs text-text-tertiary",
|
|
525
602
|
children: "The zip is the node executable. Upload it before publishing — users install exactly this artifact."
|
|
526
603
|
})
|
|
527
604
|
]
|
|
528
605
|
}),
|
|
529
|
-
|
|
606
|
+
W && /* @__PURE__ */ v("div", {
|
|
530
607
|
className: "space-y-2",
|
|
531
608
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ v("div", {
|
|
533
610
|
className: "flex items-center justify-between gap-2 flex-wrap",
|
|
534
|
-
children: [/* @__PURE__ */
|
|
611
|
+
children: [/* @__PURE__ */ v("label", {
|
|
535
612
|
className: "text-sm font-medium",
|
|
536
613
|
children: [
|
|
537
614
|
"manifest.json",
|
|
538
615
|
" ",
|
|
539
|
-
/* @__PURE__ */
|
|
540
|
-
className: "text-
|
|
541
|
-
children: "
|
|
616
|
+
/* @__PURE__ */ _("span", {
|
|
617
|
+
className: "text-status-error-text",
|
|
618
|
+
children: "*"
|
|
542
619
|
})
|
|
543
620
|
]
|
|
544
|
-
}), /* @__PURE__ */
|
|
621
|
+
}), /* @__PURE__ */ v("div", {
|
|
545
622
|
className: "flex items-center gap-2",
|
|
546
623
|
children: [
|
|
547
|
-
|
|
624
|
+
Ne && /* @__PURE__ */ v("span", {
|
|
548
625
|
className: "text-xs text-status-success-text",
|
|
549
|
-
children: ["✓ ",
|
|
626
|
+
children: ["✓ ", Ne]
|
|
550
627
|
}),
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
ref:
|
|
628
|
+
/* @__PURE__ */ _("input", {
|
|
629
|
+
ref: Ae,
|
|
553
630
|
type: "file",
|
|
554
631
|
accept: ".json,application/json",
|
|
555
632
|
className: "hidden",
|
|
556
|
-
onChange:
|
|
633
|
+
onChange: ze
|
|
557
634
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ v("button", {
|
|
559
636
|
type: "button",
|
|
560
|
-
onClick: () =>
|
|
637
|
+
onClick: () => Ae.current?.click(),
|
|
561
638
|
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",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
639
|
+
children: [/* @__PURE__ */ _(h, { size: 12 }), "Upload manifest.json"]
|
|
563
640
|
})
|
|
564
641
|
]
|
|
565
642
|
})]
|
|
566
643
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ _("textarea", {
|
|
568
645
|
rows: 5,
|
|
569
646
|
placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
|
|
570
|
-
value:
|
|
647
|
+
value: M.manifestJson,
|
|
571
648
|
onChange: (e) => {
|
|
572
|
-
|
|
573
|
-
...
|
|
649
|
+
D(null), N({
|
|
650
|
+
...M,
|
|
574
651
|
manifestJson: e.target.value
|
|
575
652
|
});
|
|
576
653
|
},
|
|
577
654
|
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)]"
|
|
578
655
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ v("p", {
|
|
580
657
|
className: "text-xs text-text-tertiary",
|
|
581
658
|
children: [
|
|
582
659
|
"Upload or paste your ",
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
" —
|
|
660
|
+
/* @__PURE__ */ _("code", { children: "manifest.json" }),
|
|
661
|
+
" — required so the platform knows your node's inputs, outputs, and operations. Not extracted from the zip automatically."
|
|
585
662
|
]
|
|
586
663
|
})
|
|
587
664
|
]
|
|
588
665
|
}),
|
|
589
|
-
|
|
666
|
+
Ve && /* @__PURE__ */ v("div", {
|
|
590
667
|
className: "space-y-1",
|
|
591
668
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ v("label", {
|
|
593
670
|
className: "text-sm font-medium",
|
|
594
671
|
children: [
|
|
595
672
|
"Required scopes",
|
|
596
673
|
" ",
|
|
597
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ _("span", {
|
|
598
675
|
className: "text-xs font-normal text-text-secondary",
|
|
599
676
|
children: "(optional)"
|
|
600
677
|
})
|
|
601
678
|
]
|
|
602
679
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ _("input", {
|
|
604
681
|
type: "text",
|
|
605
|
-
value:
|
|
606
|
-
onChange: (e) =>
|
|
607
|
-
...
|
|
682
|
+
value: M.requiredScopes,
|
|
683
|
+
onChange: (e) => N({
|
|
684
|
+
...M,
|
|
608
685
|
requiredScopes: e.target.value
|
|
609
686
|
}),
|
|
610
687
|
placeholder: "e.g. read:contacts, write:messages",
|
|
611
688
|
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)]"
|
|
612
689
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ _("p", {
|
|
614
691
|
className: "text-xs text-text-tertiary",
|
|
615
692
|
children: "Comma-separated. List every permission this version needs — users will be prompted to accept any new or changed scopes on update."
|
|
616
693
|
})
|
|
617
694
|
]
|
|
618
695
|
}),
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
label:
|
|
621
|
-
value:
|
|
622
|
-
onChange: (e) =>
|
|
623
|
-
...
|
|
696
|
+
/* @__PURE__ */ _(le, {
|
|
697
|
+
label: y("devportal.releaseNotes", "Release Notes"),
|
|
698
|
+
value: M.releaseNotes,
|
|
699
|
+
onChange: (e) => N({
|
|
700
|
+
...M,
|
|
624
701
|
releaseNotes: e.target.value
|
|
625
702
|
}),
|
|
626
|
-
placeholder:
|
|
703
|
+
placeholder: y("devportal.releaseNotesPlaceholder", "What changed in this release?"),
|
|
627
704
|
rows: 2
|
|
628
705
|
})
|
|
629
706
|
]
|
|
630
707
|
})
|
|
631
708
|
}),
|
|
632
|
-
|
|
633
|
-
open: !!
|
|
709
|
+
R && /* @__PURE__ */ _(o, {
|
|
710
|
+
open: !!R,
|
|
634
711
|
onOpenChange: (e) => {
|
|
635
|
-
e || (
|
|
712
|
+
e || (Re(null), B(""));
|
|
636
713
|
},
|
|
637
|
-
onConfirm:
|
|
638
|
-
title: `Reject version ${
|
|
714
|
+
onConfirm: lt,
|
|
715
|
+
title: `Reject version ${R.version}`,
|
|
639
716
|
confirmLabel: "Reject Version",
|
|
640
|
-
cancelLabel:
|
|
717
|
+
cancelLabel: y("devportal.cancel", "Cancel"),
|
|
641
718
|
variant: "danger",
|
|
642
|
-
children: /* @__PURE__ */
|
|
719
|
+
children: /* @__PURE__ */ v("div", {
|
|
643
720
|
className: "space-y-3",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
721
|
+
children: [/* @__PURE__ */ _("p", {
|
|
645
722
|
className: "text-sm text-text-secondary",
|
|
646
723
|
children: "The developer will be notified and can fix and resubmit. Please provide a clear reason."
|
|
647
|
-
}), /* @__PURE__ */
|
|
724
|
+
}), /* @__PURE__ */ v("div", {
|
|
648
725
|
className: "space-y-1",
|
|
649
|
-
children: [/* @__PURE__ */
|
|
726
|
+
children: [/* @__PURE__ */ v("label", {
|
|
650
727
|
className: "text-sm font-medium",
|
|
651
728
|
children: [
|
|
652
729
|
"Rejection reason",
|
|
653
730
|
" ",
|
|
654
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ _("span", {
|
|
655
732
|
className: "text-status-error-text",
|
|
656
733
|
children: "*"
|
|
657
734
|
})
|
|
658
735
|
]
|
|
659
|
-
}), /* @__PURE__ */
|
|
736
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
660
737
|
rows: 3,
|
|
661
|
-
value:
|
|
662
|
-
onChange: (e) =>
|
|
738
|
+
value: z,
|
|
739
|
+
onChange: (e) => B(e.target.value),
|
|
663
740
|
placeholder: "e.g. Manifest contains disallowed network calls to external domains...",
|
|
664
741
|
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)]"
|
|
665
742
|
})]
|
|
666
743
|
})]
|
|
667
744
|
})
|
|
668
745
|
}),
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
open:
|
|
746
|
+
A && /* @__PURE__ */ _(o, {
|
|
747
|
+
open: !!A,
|
|
748
|
+
onOpenChange: (e) => {
|
|
749
|
+
e || (j(null), O(null));
|
|
750
|
+
},
|
|
751
|
+
onConfirm: ot,
|
|
752
|
+
title: `Edit Version ${A.version}`,
|
|
753
|
+
confirmLabel: Xe ? "Saving…" : "Save Changes",
|
|
754
|
+
children: /* @__PURE__ */ v("div", {
|
|
755
|
+
className: "space-y-4",
|
|
756
|
+
children: [
|
|
757
|
+
/* @__PURE__ */ _("div", {
|
|
758
|
+
className: "rounded-lg border border-status-info-bg bg-status-info-bg-subtle px-3 py-2 text-xs text-status-info-text",
|
|
759
|
+
children: "You can fix the zip, manifest, or release notes before submitting for review. Once submitted for review these fields are locked."
|
|
760
|
+
}),
|
|
761
|
+
W && /* @__PURE__ */ v("div", {
|
|
762
|
+
className: "space-y-1",
|
|
763
|
+
children: [
|
|
764
|
+
/* @__PURE__ */ _("label", {
|
|
765
|
+
className: "text-sm font-medium",
|
|
766
|
+
children: "Package (.zip)"
|
|
767
|
+
}),
|
|
768
|
+
/* @__PURE__ */ v("div", {
|
|
769
|
+
className: "flex gap-2 items-center",
|
|
770
|
+
children: [
|
|
771
|
+
/* @__PURE__ */ _("input", {
|
|
772
|
+
ref: je,
|
|
773
|
+
type: "file",
|
|
774
|
+
accept: ".zip",
|
|
775
|
+
className: "hidden",
|
|
776
|
+
onChange: it
|
|
777
|
+
}),
|
|
778
|
+
/* @__PURE__ */ _("button", {
|
|
779
|
+
type: "button",
|
|
780
|
+
disabled: T,
|
|
781
|
+
onClick: () => je.current?.click(),
|
|
782
|
+
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",
|
|
783
|
+
children: T ? /* @__PURE__ */ v(g, { children: [
|
|
784
|
+
/* @__PURE__ */ _(m, {
|
|
785
|
+
size: 14,
|
|
786
|
+
className: "animate-spin"
|
|
787
|
+
}),
|
|
788
|
+
" Uploading… ",
|
|
789
|
+
Oe,
|
|
790
|
+
"%"
|
|
791
|
+
] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(h, { size: 14 }), A.newPackageUrl ? "Replace zip again" : A.hasExistingZip ? "Replace zip" : "Upload zip"] })
|
|
792
|
+
}),
|
|
793
|
+
A.newPackageUrl && !T && /* @__PURE__ */ _("span", {
|
|
794
|
+
className: "text-xs text-status-success-text",
|
|
795
|
+
children: "✓ New zip ready"
|
|
796
|
+
}),
|
|
797
|
+
!A.newPackageUrl && A.hasExistingZip && /* @__PURE__ */ _("span", {
|
|
798
|
+
className: "text-xs text-text-secondary",
|
|
799
|
+
children: "Current zip kept"
|
|
800
|
+
})
|
|
801
|
+
]
|
|
802
|
+
}),
|
|
803
|
+
E && /* @__PURE__ */ _("p", {
|
|
804
|
+
className: "text-xs text-status-error-text",
|
|
805
|
+
children: E
|
|
806
|
+
})
|
|
807
|
+
]
|
|
808
|
+
}),
|
|
809
|
+
W && /* @__PURE__ */ v("div", {
|
|
810
|
+
className: "space-y-2",
|
|
811
|
+
children: [/* @__PURE__ */ v("div", {
|
|
812
|
+
className: "flex items-center justify-between gap-2 flex-wrap",
|
|
813
|
+
children: [/* @__PURE__ */ v("label", {
|
|
814
|
+
className: "text-sm font-medium",
|
|
815
|
+
children: [
|
|
816
|
+
"manifest.json",
|
|
817
|
+
" ",
|
|
818
|
+
/* @__PURE__ */ _("span", {
|
|
819
|
+
className: "text-xs font-normal text-text-secondary",
|
|
820
|
+
children: "(leave empty to keep existing)"
|
|
821
|
+
})
|
|
822
|
+
]
|
|
823
|
+
}), /* @__PURE__ */ v("div", {
|
|
824
|
+
className: "flex items-center gap-2",
|
|
825
|
+
children: [
|
|
826
|
+
Pe && /* @__PURE__ */ v("span", {
|
|
827
|
+
className: "text-xs text-status-success-text",
|
|
828
|
+
children: ["✓ ", Pe]
|
|
829
|
+
}),
|
|
830
|
+
/* @__PURE__ */ _("input", {
|
|
831
|
+
ref: Me,
|
|
832
|
+
type: "file",
|
|
833
|
+
accept: ".json,application/json",
|
|
834
|
+
className: "hidden",
|
|
835
|
+
onChange: at
|
|
836
|
+
}),
|
|
837
|
+
/* @__PURE__ */ v("button", {
|
|
838
|
+
type: "button",
|
|
839
|
+
onClick: () => Me.current?.click(),
|
|
840
|
+
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",
|
|
841
|
+
children: [/* @__PURE__ */ _(h, { size: 12 }), " Upload manifest.json"]
|
|
842
|
+
})
|
|
843
|
+
]
|
|
844
|
+
})]
|
|
845
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
846
|
+
rows: 5,
|
|
847
|
+
placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
|
|
848
|
+
value: A.manifestJson,
|
|
849
|
+
onChange: (e) => {
|
|
850
|
+
O(null), j((t) => t && {
|
|
851
|
+
...t,
|
|
852
|
+
manifestJson: e.target.value
|
|
853
|
+
});
|
|
854
|
+
},
|
|
855
|
+
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)]"
|
|
856
|
+
})]
|
|
857
|
+
}),
|
|
858
|
+
U && /* @__PURE__ */ v("div", {
|
|
859
|
+
className: "space-y-1",
|
|
860
|
+
children: [/* @__PURE__ */ v("label", {
|
|
861
|
+
className: "text-sm font-medium",
|
|
862
|
+
children: [
|
|
863
|
+
"Workflow Definition (JSON)",
|
|
864
|
+
" ",
|
|
865
|
+
/* @__PURE__ */ _("span", {
|
|
866
|
+
className: "text-xs font-normal text-text-secondary",
|
|
867
|
+
children: "(leave empty to keep existing)"
|
|
868
|
+
})
|
|
869
|
+
]
|
|
870
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
871
|
+
rows: 10,
|
|
872
|
+
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
873
|
+
value: A.manifestJson,
|
|
874
|
+
onChange: (e) => j((t) => t && {
|
|
875
|
+
...t,
|
|
876
|
+
manifestJson: e.target.value
|
|
877
|
+
}),
|
|
878
|
+
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)]"
|
|
879
|
+
})]
|
|
880
|
+
}),
|
|
881
|
+
/* @__PURE__ */ v("div", {
|
|
882
|
+
className: "space-y-1",
|
|
883
|
+
children: [/* @__PURE__ */ _("label", {
|
|
884
|
+
className: "text-sm font-medium",
|
|
885
|
+
children: "Release Notes"
|
|
886
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
887
|
+
rows: 2,
|
|
888
|
+
value: A.releaseNotes,
|
|
889
|
+
onChange: (e) => j((t) => t && {
|
|
890
|
+
...t,
|
|
891
|
+
releaseNotes: e.target.value
|
|
892
|
+
}),
|
|
893
|
+
placeholder: "What changed in this release?",
|
|
894
|
+
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)]"
|
|
895
|
+
})]
|
|
896
|
+
})
|
|
897
|
+
]
|
|
898
|
+
})
|
|
899
|
+
}),
|
|
900
|
+
/* @__PURE__ */ _(o, {
|
|
901
|
+
open: Be === "publish",
|
|
671
902
|
onOpenChange: (e) => {
|
|
672
|
-
e ||
|
|
903
|
+
e || V(null);
|
|
673
904
|
},
|
|
674
905
|
onConfirm: async () => {
|
|
675
|
-
if (
|
|
676
|
-
|
|
677
|
-
let e = await Promise.allSettled(
|
|
678
|
-
|
|
906
|
+
if (Z.length === 0) return;
|
|
907
|
+
P(null);
|
|
908
|
+
let e = await Promise.allSettled(Z.map((e) => Ze({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
909
|
+
F(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), pt(), V(null);
|
|
679
910
|
},
|
|
680
|
-
title:
|
|
681
|
-
description: `Submit ${
|
|
682
|
-
confirmLabel:
|
|
683
|
-
cancelLabel:
|
|
911
|
+
title: y("devportal.submitSelectedVersions", "Submit selected versions for review"),
|
|
912
|
+
description: `Submit ${Z.length} selected version${Z.length === 1 ? "" : "s"} for platform review?`,
|
|
913
|
+
confirmLabel: y("devportal.submitForReview", "Submit for Review"),
|
|
914
|
+
cancelLabel: y("devportal.cancel", "Cancel"),
|
|
684
915
|
variant: "success"
|
|
685
916
|
}),
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
open:
|
|
917
|
+
/* @__PURE__ */ _(o, {
|
|
918
|
+
open: Be === "deprecate",
|
|
688
919
|
onOpenChange: (e) => {
|
|
689
|
-
e ||
|
|
920
|
+
e || V(null);
|
|
690
921
|
},
|
|
691
922
|
onConfirm: async () => {
|
|
692
|
-
if (
|
|
693
|
-
|
|
694
|
-
let e = await Promise.allSettled(
|
|
695
|
-
|
|
923
|
+
if (Q.length === 0) return;
|
|
924
|
+
P(null);
|
|
925
|
+
let e = await Promise.allSettled(Q.map((e) => Qe({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
926
|
+
F(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), pt(), V(null);
|
|
696
927
|
},
|
|
697
|
-
title:
|
|
698
|
-
description: `${
|
|
699
|
-
confirmLabel:
|
|
700
|
-
cancelLabel:
|
|
928
|
+
title: y("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
|
|
929
|
+
description: `${y("devportal.deprecate", "Deprecate")} ${Q.length} selected version${Q.length === 1 ? "" : "s"}? ${y("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,
|
|
930
|
+
confirmLabel: y("devportal.deprecate", "Deprecate"),
|
|
931
|
+
cancelLabel: y("devportal.cancel", "Cancel"),
|
|
701
932
|
variant: "warning"
|
|
702
933
|
})
|
|
703
934
|
]
|
|
@@ -705,6 +936,6 @@ var Te = () => {
|
|
|
705
936
|
});
|
|
706
937
|
};
|
|
707
938
|
//#endregion
|
|
708
|
-
export {
|
|
939
|
+
export { Ce as ApplicationVersionsPage };
|
|
709
940
|
|
|
710
941
|
//# sourceMappingURL=ApplicationVersionsPage.js.map
|