@burdenoff/microfe-devportal 2026.713.8 → 2026.713.9

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