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