@burdenoff/microfe-devportal 2026.626.3 → 2026.626.4

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.
@@ -16,478 +16,469 @@ import ce from "../../node_modules/date-fns/format.js";
16
16
  import { usePackageUpload as le } from "../hooks/usePackageUpload.js";
17
17
  import { useCallback as ue, useEffect as de, useMemo as l, useRef as fe, useState as u } from "react";
18
18
  import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { AlertCircle as d, Archive as me, CheckCircle as f, Clock as he, FileJson as ge, Loader2 as p, Package as _e, Plus as m, Upload as h } from "lucide-react";
19
+ import { AlertCircle as d, Archive as me, CheckCircle as f, Clock as he, Loader2 as p, Package as ge, Plus as m, Upload as _e } from "lucide-react";
20
20
  import { useParams as ve } from "react-router-dom";
21
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
21
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
22
22
  //#region src/devportal/pages/ApplicationVersionsPage.tsx
23
- var y = () => {
24
- let { t: y } = pe(), b = (e, t) => {
25
- let n = y(e);
23
+ var v = () => {
24
+ let { t: v } = pe(), y = (e, t) => {
25
+ let n = v(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 } = ve(), { workspacesGatewayUrl: ye, authToken: be, workspaceId: xe, getWorkspaceToken: Se } = e(), { upload: T, uploading: E, progress: Ce, error: D } = le(ye, be, xe, Se), O = fe(null), [k, A] = u(!1), [j, M] = u({
27
+ }, { allowed: b } = c(s.APP_VERSION_CREATE), { allowed: x } = c(s.APP_VERSION_PUBLISH), { allowed: S } = c(s.APP_VERSION_DEPRECATE), { appId: C } = ve(), { workspacesGatewayUrl: ye, authToken: be, workspaceId: xe, getWorkspaceToken: Se } = e(), { upload: w, uploading: T, progress: Ce, error: E } = le(ye, be, xe, Se), D = fe(null), [O, k] = u(!1), [A, j] = u({
28
28
  version: "",
29
29
  releaseNotes: "",
30
30
  changelog: "",
31
31
  packageUrl: "",
32
32
  packageSize: "",
33
33
  manifestJson: ""
34
- }), [N, P] = u("file"), [F, I] = u(null), [L, R] = u(null), [z, B] = u(/* @__PURE__ */ new Set()), [V, H] = u(null), { data: U } = ee({
35
- variables: { id: w ?? "" },
36
- skip: !w,
34
+ }), [M, N] = u(null), [P, F] = u(null), [I, L] = u(/* @__PURE__ */ new Set()), [R, z] = u(null), { data: B } = ee({
35
+ variables: { id: C ?? "" },
36
+ skip: !C,
37
37
  fetchPolicy: "cache-first"
38
38
  });
39
39
  de(() => {
40
- let e = U?.application?.name;
41
- if (!w || !e) return;
40
+ let e = B?.application?.name;
41
+ if (!C || !e) return;
42
42
  let t = window.__breadcrumbRegistry;
43
- return t?.register(w, e), () => t?.unregister(w);
44
- }, [w, U?.application?.name]);
45
- let { data: W, loading: we, error: G } = te({
46
- variables: { applicationId: w },
47
- skip: !w,
43
+ return t?.register(C, e), () => t?.unregister(C);
44
+ }, [C, B?.application?.name]);
45
+ let { data: V, loading: we, error: H } = te({
46
+ variables: { applicationId: C },
47
+ skip: !C,
48
48
  fetchPolicy: "cache-and-network"
49
- }), [Te, { loading: Ee }] = n({ refetchQueries: ["GetApplicationVersions"] }), [K] = ne({ refetchQueries: ["GetApplicationVersions"] }), [q] = r({ refetchQueries: ["GetApplicationVersions"] }), J = l(() => W?.application?.versions?.edges?.map((e) => e.node) ?? [], [W?.application?.versions]), Y = l(() => J.filter((e) => z.has(e.id)), [J, z]), X = l(() => Y.filter((e) => e.status?.toUpperCase() === "DRAFT"), [Y]), Z = l(() => Y.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [Y]), Q = J.length > 0 && J.every((e) => z.has(e.id)), De = J.some((e) => z.has(e.id)) && !Q, Oe = async () => {
50
- if (!w || !j.version.trim()) return;
51
- I(null);
49
+ }), [Te, { loading: U }] = n({ refetchQueries: ["GetApplicationVersions"] }), [W] = ne({ refetchQueries: ["GetApplicationVersions"] }), [G] = r({ refetchQueries: ["GetApplicationVersions"] }), K = l(() => V?.application?.versions?.edges?.map((e) => e.node) ?? [], [V?.application?.versions]), q = l(() => K.filter((e) => I.has(e.id)), [K, I]), J = l(() => q.filter((e) => e.status?.toUpperCase() === "DRAFT"), [q]), Y = l(() => q.filter((e) => e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest), [q]), X = K.length > 0 && K.every((e) => I.has(e.id)), Z = K.some((e) => I.has(e.id)) && !X, Ee = async () => {
50
+ if (!C || !A.version.trim()) return;
51
+ N(null);
52
52
  let e;
53
- if (N === "manifest" && j.manifestJson.trim()) try {
54
- e = JSON.parse(j.manifestJson);
53
+ if (A.manifestJson.trim()) try {
54
+ e = JSON.parse(A.manifestJson);
55
55
  } catch {
56
- I("Invalid JSON in manifest — please check your input.");
56
+ N("Invalid JSON in manifest — please check your input.");
57
57
  return;
58
58
  }
59
59
  try {
60
60
  await Te({ variables: {
61
- applicationId: w,
61
+ applicationId: C,
62
62
  input: {
63
- version: j.version,
64
- releaseNotes: j.releaseNotes || void 0,
65
- changelog: j.changelog || void 0,
66
- packageUrl: N === "file" && j.packageUrl || void 0,
67
- packageSize: N === "file" && j.packageSize || void 0,
63
+ version: A.version,
64
+ releaseNotes: A.releaseNotes || void 0,
65
+ changelog: A.changelog || void 0,
66
+ packageUrl: A.packageUrl || void 0,
67
+ packageSize: A.packageSize || void 0,
68
68
  manifest: e
69
69
  }
70
- } }), A(!1), M({
70
+ } }), k(!1), j({
71
71
  version: "",
72
72
  releaseNotes: "",
73
73
  changelog: "",
74
74
  packageUrl: "",
75
75
  packageSize: "",
76
76
  manifestJson: ""
77
- }), P("file"), R(b("devportal.versionCreatedSuccess", "Version created successfully"));
77
+ }), F(y("devportal.versionCreatedSuccess", "Version created successfully"));
78
78
  } catch (e) {
79
- I(e instanceof Error ? e.message : b("devportal.versionCreateFailed", "Failed to create version"));
79
+ N(e instanceof Error ? e.message : y("devportal.versionCreateFailed", "Failed to create version"));
80
80
  }
81
- }, ke = ue(async (e) => {
81
+ }, De = ue(async (e) => {
82
82
  let t = e.target.files?.[0];
83
83
  if (t) {
84
84
  e.target.value = "";
85
85
  try {
86
- let e = await T(t);
87
- M((n) => ({
86
+ let e = await w(t);
87
+ j((n) => ({
88
88
  ...n,
89
89
  packageUrl: e.downloadUrl,
90
90
  packageSize: String(t.size)
91
91
  }));
92
92
  } catch {}
93
93
  }
94
- }, [T]), Ae = async (e) => {
95
- I(null), R(null);
94
+ }, [w]), Oe = async (e) => {
95
+ N(null), F(null);
96
96
  try {
97
- await K({ variables: { id: e } }), R(b("devportal.versionPublishedSuccess", "Version published successfully"));
97
+ await W({ variables: { id: e } }), F(y("devportal.versionPublishedSuccess", "Version published successfully"));
98
98
  } catch (e) {
99
- I(e instanceof Error ? e.message : b("devportal.versionPublishFailed", "Failed to publish version"));
99
+ N(e instanceof Error ? e.message : y("devportal.versionPublishFailed", "Failed to publish version"));
100
100
  }
101
- }, je = async (e) => {
102
- I(null), R(null);
101
+ }, ke = async (e) => {
102
+ N(null), F(null);
103
103
  try {
104
- await q({ variables: { id: e } }), R(b("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
104
+ await G({ variables: { id: e } }), F(y("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
105
105
  } catch (e) {
106
- I(e instanceof Error ? e.message : b("devportal.versionDeprecateFailed", "Failed to deprecate version"));
106
+ N(e instanceof Error ? e.message : y("devportal.versionDeprecateFailed", "Failed to deprecate version"));
107
107
  }
108
- }, Me = (e) => {
108
+ }, Ae = (e) => {
109
109
  let t = e.status?.toUpperCase();
110
- return t === "PUBLISHED" && e.isLatest ? /* @__PURE__ */ _(f, {
110
+ return t === "PUBLISHED" && e.isLatest ? /* @__PURE__ */ g(f, {
111
111
  size: 16,
112
112
  className: "text-status-success-text"
113
- }) : t === "DRAFT" ? /* @__PURE__ */ _(he, {
113
+ }) : t === "DRAFT" ? /* @__PURE__ */ g(he, {
114
114
  size: 16,
115
115
  className: "text-status-warning-text"
116
- }) : t === "DEPRECATED" ? /* @__PURE__ */ _(me, {
116
+ }) : t === "DEPRECATED" ? /* @__PURE__ */ g(me, {
117
117
  size: 16,
118
118
  className: "text-text-secondary"
119
- }) : /* @__PURE__ */ _(_e, {
119
+ }) : /* @__PURE__ */ g(ge, {
120
120
  size: 16,
121
121
  className: "text-accent-blue"
122
122
  });
123
- }, Ne = (e, t) => {
124
- B((n) => {
123
+ }, je = (e, t) => {
124
+ L((n) => {
125
125
  let r = new Set(n);
126
126
  return t ? r.add(e) : r.delete(e), r;
127
127
  });
128
- }, Pe = (e) => {
129
- B((t) => {
128
+ }, Q = (e) => {
129
+ L((t) => {
130
130
  let n = new Set(t);
131
- return J.forEach((t) => {
131
+ return K.forEach((t) => {
132
132
  e ? n.add(t.id) : n.delete(t.id);
133
133
  }), n;
134
134
  });
135
- }, $ = () => B(/* @__PURE__ */ new Set());
136
- return we && !W ? /* @__PURE__ */ _(i, {
137
- title: b("devportal.versionManagement", "Version Management"),
138
- description: b("devportal.versionManagementDescription", "Manage your application versions"),
139
- backLink: `/apps/${w}`,
140
- backLabel: b("devportal.backToApplication", "Back to Application"),
141
- children: /* @__PURE__ */ _("div", {
135
+ }, $ = () => L(/* @__PURE__ */ new Set());
136
+ return we && !V ? /* @__PURE__ */ g(i, {
137
+ title: y("devportal.versionManagement", "Version Management"),
138
+ description: y("devportal.versionManagementDescription", "Manage your application versions"),
139
+ backLink: `/apps/${C}`,
140
+ backLabel: y("devportal.backToApplication", "Back to Application"),
141
+ children: /* @__PURE__ */ g("div", {
142
142
  className: "flex items-center justify-center py-16",
143
- children: /* @__PURE__ */ _(p, { className: "h-8 w-8 animate-spin text-text-secondary" })
143
+ children: /* @__PURE__ */ g(p, { className: "h-8 w-8 animate-spin text-text-secondary" })
144
144
  })
145
- }) : G && !W ? /* @__PURE__ */ _(i, {
146
- title: b("devportal.versionManagement", "Version Management"),
147
- description: b("devportal.versionManagementDescription", "Manage your application versions"),
148
- backLink: `/apps/${w}`,
149
- backLabel: b("devportal.backToApplication", "Back to Application"),
150
- children: /* @__PURE__ */ _(t, {
151
- icon: /* @__PURE__ */ _(d, {
145
+ }) : H && !V ? /* @__PURE__ */ g(i, {
146
+ title: y("devportal.versionManagement", "Version Management"),
147
+ description: y("devportal.versionManagementDescription", "Manage your application versions"),
148
+ backLink: `/apps/${C}`,
149
+ backLabel: y("devportal.backToApplication", "Back to Application"),
150
+ children: /* @__PURE__ */ g(t, {
151
+ icon: /* @__PURE__ */ g(d, {
152
152
  size: 32,
153
153
  className: "text-status-error-text"
154
154
  }),
155
- title: b("devportal.failedToLoadVersions", "Failed to load versions"),
156
- description: G.message || b("devportal.versionsLoadError", "An error occurred while loading versions")
155
+ title: y("devportal.failedToLoadVersions", "Failed to load versions"),
156
+ description: H.message || y("devportal.versionsLoadError", "An error occurred while loading versions")
157
157
  })
158
- }) : /* @__PURE__ */ _(se, {
158
+ }) : /* @__PURE__ */ g(se, {
159
159
  permission: s.APP_READ,
160
- children: /* @__PURE__ */ v(i, {
161
- title: b("devportal.versionManagement", "Version Management"),
162
- description: b("devportal.versionManagementDescription", "Manage your application versions"),
163
- purpose: b("devportal.versionManagementPurpose", "Versions are the releases of your app that users install. Cut a new version when you ship changes, upload its package, and publish it — the one marked Latest is what new installs receive, so promote carefully."),
164
- backLink: `/apps/${w}`,
165
- backLabel: b("devportal.backToApplication", "Back to Application"),
166
- actions: /* @__PURE__ */ v("button", {
167
- onClick: () => A(!0),
168
- disabled: !x,
169
- "aria-disabled": !x,
160
+ children: /* @__PURE__ */ _(i, {
161
+ title: y("devportal.versionManagement", "Version Management"),
162
+ description: y("devportal.versionManagementDescription", "Manage your application versions"),
163
+ purpose: y("devportal.versionManagementPurpose", "Versions are the releases of your app that users install. Cut a new version when you ship changes, upload its package, and publish it — the one marked Latest is what new installs receive, so promote carefully."),
164
+ backLink: `/apps/${C}`,
165
+ backLabel: y("devportal.backToApplication", "Back to Application"),
166
+ actions: /* @__PURE__ */ _("button", {
167
+ onClick: () => k(!0),
168
+ disabled: !b,
169
+ "aria-disabled": !b,
170
170
  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",
171
- children: [/* @__PURE__ */ _(m, { size: 16 }), b("devportal.newVersion", "New Version")]
171
+ children: [/* @__PURE__ */ g(m, { size: 16 }), y("devportal.newVersion", "New Version")]
172
172
  }),
173
173
  children: [
174
- F && /* @__PURE__ */ v("div", {
174
+ M && /* @__PURE__ */ _("div", {
175
175
  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",
176
176
  children: [
177
- /* @__PURE__ */ _(d, {
177
+ /* @__PURE__ */ g(d, {
178
178
  size: 16,
179
179
  className: "flex-shrink-0"
180
180
  }),
181
- F,
182
- /* @__PURE__ */ _("button", {
183
- onClick: () => I(null),
181
+ M,
182
+ /* @__PURE__ */ g("button", {
183
+ onClick: () => N(null),
184
184
  className: "ml-auto text-status-error-text hover:text-status-error-text",
185
- children: b("devportal.dismiss", "Dismiss")
185
+ children: y("devportal.dismiss", "Dismiss")
186
186
  })
187
187
  ]
188
188
  }),
189
- L && /* @__PURE__ */ v("div", {
189
+ P && /* @__PURE__ */ _("div", {
190
190
  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",
191
191
  children: [
192
- /* @__PURE__ */ _(f, {
192
+ /* @__PURE__ */ g(f, {
193
193
  size: 16,
194
194
  className: "flex-shrink-0"
195
195
  }),
196
- L,
197
- /* @__PURE__ */ _("button", {
198
- onClick: () => R(null),
196
+ P,
197
+ /* @__PURE__ */ g("button", {
198
+ onClick: () => F(null),
199
199
  className: "ml-auto text-status-success-text hover:text-status-success-text",
200
- children: b("devportal.dismiss", "Dismiss")
200
+ children: y("devportal.dismiss", "Dismiss")
201
201
  })
202
202
  ]
203
203
  }),
204
- J.length > 0 && /* @__PURE__ */ _("div", {
204
+ K.length > 0 && /* @__PURE__ */ g("div", {
205
205
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
206
- children: /* @__PURE__ */ v("div", {
206
+ children: /* @__PURE__ */ _("div", {
207
207
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
208
- children: [/* @__PURE__ */ v("div", {
208
+ children: [/* @__PURE__ */ _("div", {
209
209
  className: "flex flex-wrap items-center gap-3",
210
- children: [/* @__PURE__ */ v("div", {
210
+ children: [/* @__PURE__ */ _("div", {
211
211
  className: "flex items-center gap-2",
212
- children: [/* @__PURE__ */ _(a, {
213
- checked: Q,
214
- indeterminate: De,
215
- onChange: Pe,
212
+ children: [/* @__PURE__ */ g(a, {
213
+ checked: X,
214
+ indeterminate: Z,
215
+ onChange: Q,
216
216
  ariaLabel: "Select all visible versions"
217
- }), /* @__PURE__ */ _("span", {
217
+ }), /* @__PURE__ */ g("span", {
218
218
  className: "text-sm font-medium",
219
- children: b("devportal.selectAllVisible", "Select all visible")
219
+ children: y("devportal.selectAllVisible", "Select all visible")
220
220
  })]
221
- }), z.size > 0 && /* @__PURE__ */ _("button", {
221
+ }), I.size > 0 && /* @__PURE__ */ g("button", {
222
222
  onClick: $,
223
223
  className: "text-sm text-text-secondary hover:text-text-primary",
224
- children: b("devportal.clearSelection", "Clear selection")
224
+ children: y("devportal.clearSelection", "Clear selection")
225
225
  })]
226
- }), /* @__PURE__ */ v("div", {
226
+ }), /* @__PURE__ */ _("div", {
227
227
  className: "flex flex-wrap items-center gap-2",
228
228
  children: [
229
- /* @__PURE__ */ v("span", {
229
+ /* @__PURE__ */ _("span", {
230
230
  className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
231
- children: [z.size, " selected"]
231
+ children: [I.size, " selected"]
232
232
  }),
233
- /* @__PURE__ */ v("button", {
234
- onClick: () => H("publish"),
235
- disabled: X.length === 0 || !S,
236
- "aria-disabled": !S,
233
+ /* @__PURE__ */ _("button", {
234
+ onClick: () => z("publish"),
235
+ disabled: J.length === 0 || !x,
236
+ "aria-disabled": !x,
237
237
  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",
238
- children: [b("devportal.publishSelected", "Publish Selected"), X.length > 0 ? ` (${X.length})` : ""]
238
+ children: [y("devportal.publishSelected", "Publish Selected"), J.length > 0 ? ` (${J.length})` : ""]
239
239
  }),
240
- /* @__PURE__ */ v("button", {
241
- onClick: () => H("deprecate"),
242
- disabled: Z.length === 0 || !C,
243
- "aria-disabled": !C,
240
+ /* @__PURE__ */ _("button", {
241
+ onClick: () => z("deprecate"),
242
+ disabled: Y.length === 0 || !S,
243
+ "aria-disabled": !S,
244
244
  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",
245
- children: [b("devportal.deprecateSelected", "Deprecate Selected"), Z.length > 0 ? ` (${Z.length})` : ""]
245
+ children: [y("devportal.deprecateSelected", "Deprecate Selected"), Y.length > 0 ? ` (${Y.length})` : ""]
246
246
  })
247
247
  ]
248
248
  })]
249
249
  })
250
250
  }),
251
- J.length > 0 ? /* @__PURE__ */ _(ie, {
252
- data: J,
251
+ K.length > 0 ? /* @__PURE__ */ g(ie, {
252
+ data: K,
253
253
  keyField: "id",
254
254
  columns: [
255
255
  {
256
256
  key: "select",
257
- header: /* @__PURE__ */ _(a, {
258
- checked: Q,
259
- indeterminate: De,
260
- onChange: Pe,
257
+ header: /* @__PURE__ */ g(a, {
258
+ checked: X,
259
+ indeterminate: Z,
260
+ onChange: Q,
261
261
  ariaLabel: "Select all visible versions"
262
262
  }),
263
263
  className: "w-12",
264
- render: (e) => /* @__PURE__ */ _("div", {
264
+ render: (e) => /* @__PURE__ */ g("div", {
265
265
  onClick: (e) => e.stopPropagation(),
266
- children: /* @__PURE__ */ _(a, {
267
- checked: z.has(e.id),
268
- onChange: (t) => Ne(e.id, t),
266
+ children: /* @__PURE__ */ g(a, {
267
+ checked: I.has(e.id),
268
+ onChange: (t) => je(e.id, t),
269
269
  ariaLabel: `Select version ${e.version}`
270
270
  })
271
271
  })
272
272
  },
273
273
  {
274
274
  key: "version",
275
- header: b("devportal.version", "Version"),
276
- render: (e) => /* @__PURE__ */ v("div", {
275
+ header: y("devportal.version", "Version"),
276
+ render: (e) => /* @__PURE__ */ _("div", {
277
277
  className: "flex items-center gap-2",
278
278
  children: [
279
- Me(e),
280
- /* @__PURE__ */ _("span", {
279
+ Ae(e),
280
+ /* @__PURE__ */ g("span", {
281
281
  className: "font-mono font-medium",
282
282
  children: e.version
283
283
  }),
284
- e.isLatest && /* @__PURE__ */ _("span", {
284
+ e.isLatest && /* @__PURE__ */ g("span", {
285
285
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
286
- children: b("devportal.latest", "Latest")
286
+ children: y("devportal.latest", "Latest")
287
287
  }),
288
- !e.isStable && /* @__PURE__ */ _("span", {
288
+ !e.isStable && /* @__PURE__ */ g("span", {
289
289
  className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs text-status-warning-text",
290
- children: b("devportal.beta", "Beta")
290
+ children: y("devportal.beta", "Beta")
291
291
  })
292
292
  ]
293
293
  })
294
294
  },
295
295
  {
296
296
  key: "releaseNotes",
297
- header: b("devportal.releaseNotes", "Release Notes"),
298
- render: (e) => /* @__PURE__ */ _("p", {
297
+ header: y("devportal.releaseNotes", "Release Notes"),
298
+ render: (e) => /* @__PURE__ */ g("p", {
299
299
  className: "max-w-md truncate text-sm text-text-secondary",
300
- children: e.releaseNotes || b("devportal.noReleaseNotes", "No release notes")
300
+ children: e.releaseNotes || y("devportal.noReleaseNotes", "No release notes")
301
301
  })
302
302
  },
303
303
  {
304
304
  key: "status",
305
- header: b("devportal.status", "Status"),
306
- render: (e) => /* @__PURE__ */ _(re, { status: e.status })
305
+ header: y("devportal.status", "Status"),
306
+ render: (e) => /* @__PURE__ */ g(re, { status: e.status })
307
307
  },
308
308
  {
309
309
  key: "publishedAt",
310
- header: b("devportal.published", "Published"),
310
+ header: y("devportal.published", "Published"),
311
311
  render: (e) => e.publishedAt ? ce(new Date(e.publishedAt), "MMM d, yyyy") : "-"
312
312
  },
313
313
  {
314
314
  key: "actions",
315
315
  header: "",
316
316
  className: "w-32",
317
- render: (e) => /* @__PURE__ */ v("div", {
317
+ render: (e) => /* @__PURE__ */ _("div", {
318
318
  className: "flex gap-2",
319
- children: [e.status?.toUpperCase() === "DRAFT" && /* @__PURE__ */ _("button", {
319
+ children: [e.status?.toUpperCase() === "DRAFT" && /* @__PURE__ */ g("button", {
320
320
  className: "text-xs text-primary hover:underline disabled:opacity-50",
321
+ disabled: !x,
322
+ "aria-disabled": !x,
323
+ onClick: () => Oe(e.id),
324
+ children: y("devportal.publish", "Publish")
325
+ }), e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest && /* @__PURE__ */ g("button", {
326
+ className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
321
327
  disabled: !S,
322
328
  "aria-disabled": !S,
323
- onClick: () => Ae(e.id),
324
- children: b("devportal.publish", "Publish")
325
- }), e.status?.toUpperCase() === "PUBLISHED" && !e.isLatest && /* @__PURE__ */ _("button", {
326
- className: "text-xs text-status-warning-text hover:underline disabled:opacity-50",
327
- disabled: !C,
328
- "aria-disabled": !C,
329
- onClick: () => je(e.id),
330
- children: b("devportal.deprecate", "Deprecate")
329
+ onClick: () => ke(e.id),
330
+ children: y("devportal.deprecate", "Deprecate")
331
331
  })]
332
332
  })
333
333
  }
334
334
  ]
335
- }) : /* @__PURE__ */ _(t, {
335
+ }) : /* @__PURE__ */ g(t, {
336
336
  illustration: "empty-data",
337
- title: b("devportal.noVersionsYet", "No versions yet"),
338
- description: b("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
339
- action: /* @__PURE__ */ v("button", {
340
- onClick: () => A(!0),
337
+ title: y("devportal.noVersionsYet", "No versions yet"),
338
+ description: y("devportal.noVersionsYetDescription", "Create your first version to start distributing your app"),
339
+ action: /* @__PURE__ */ _("button", {
340
+ onClick: () => k(!0),
341
341
  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",
342
- children: [/* @__PURE__ */ _(m, { size: 16 }), b("devportal.createVersion", "Create Version")]
342
+ children: [/* @__PURE__ */ g(m, { size: 16 }), y("devportal.createVersion", "Create Version")]
343
343
  })
344
344
  }),
345
- k && /* @__PURE__ */ _(o, {
346
- open: k,
347
- onOpenChange: A,
348
- onConfirm: Oe,
349
- title: b("devportal.createNewVersion", "Create New Version"),
350
- confirmLabel: Ee ? b("devportal.creating", "Creating...") : b("devportal.createVersion", "Create Version"),
351
- children: /* @__PURE__ */ v("div", {
345
+ O && /* @__PURE__ */ g(o, {
346
+ open: O,
347
+ onOpenChange: k,
348
+ onConfirm: Ee,
349
+ title: y("devportal.createNewVersion", "Create New Version"),
350
+ confirmLabel: U ? y("devportal.creating", "Creating...") : y("devportal.createVersion", "Create Version"),
351
+ children: /* @__PURE__ */ _("div", {
352
352
  className: "space-y-4",
353
353
  children: [
354
- /* @__PURE__ */ _(ae, {
355
- label: b("devportal.versionNumber", "Version Number"),
356
- value: j.version,
357
- onChange: (e) => M({
358
- ...j,
354
+ /* @__PURE__ */ g(ae, {
355
+ label: y("devportal.versionNumber", "Version Number"),
356
+ value: A.version,
357
+ onChange: (e) => j({
358
+ ...A,
359
359
  version: e.target.value
360
360
  }),
361
361
  placeholder: "e.g., 2.2.0",
362
- hint: b("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
362
+ hint: y("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
363
363
  required: !0
364
364
  }),
365
- /* @__PURE__ */ v("div", {
366
- className: "space-y-2",
365
+ /* @__PURE__ */ _("div", {
366
+ className: "space-y-1",
367
367
  children: [
368
- /* @__PURE__ */ _("label", {
368
+ /* @__PURE__ */ g("label", {
369
369
  className: "text-sm font-medium",
370
- children: "Package"
371
- }),
372
- /* @__PURE__ */ v("div", {
373
- className: "flex gap-1 rounded-md border p-0.5 w-fit",
374
- children: [/* @__PURE__ */ v("button", {
375
- type: "button",
376
- onClick: () => P("file"),
377
- className: `inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs font-medium transition-colors ${N === "file" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-bg-sunken"}`,
378
- children: [/* @__PURE__ */ _(h, { size: 12 }), " Upload zip"]
379
- }), /* @__PURE__ */ v("button", {
380
- type: "button",
381
- onClick: () => P("manifest"),
382
- className: `inline-flex items-center gap-1.5 rounded px-3 py-1 text-xs font-medium transition-colors ${N === "manifest" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-bg-sunken"}`,
383
- children: [/* @__PURE__ */ _(ge, { size: 12 }), " Paste manifest JSON"]
384
- })]
370
+ children: "Package (.zip)"
385
371
  }),
386
- N === "file" && /* @__PURE__ */ v("div", {
387
- className: "space-y-1",
388
- children: [/* @__PURE__ */ v("div", {
389
- className: "flex gap-2 items-center",
390
- children: [
391
- /* @__PURE__ */ _("input", {
392
- ref: O,
393
- type: "file",
394
- accept: ".zip",
395
- className: "hidden",
396
- onChange: ke
397
- }),
398
- /* @__PURE__ */ _("button", {
399
- type: "button",
400
- disabled: E,
401
- onClick: () => O.current?.click(),
402
- 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",
403
- children: E ? /* @__PURE__ */ v(g, { children: [
404
- /* @__PURE__ */ _(p, {
405
- size: 14,
406
- className: "animate-spin"
407
- }),
408
- " ",
409
- "Uploading… ",
410
- Ce,
411
- "%"
412
- ] }) : /* @__PURE__ */ v(g, { children: [
413
- /* @__PURE__ */ _(h, { size: 14 }),
414
- " ",
415
- j.packageUrl ? "Replace zip" : "Upload zip"
416
- ] })
417
- }),
418
- j.packageUrl && !E && /* @__PURE__ */ _("span", {
419
- className: "text-xs text-status-success-text",
420
- children: "✓ Uploaded"
421
- })
422
- ]
423
- }), D && /* @__PURE__ */ _("p", {
424
- className: "text-xs text-status-error-text",
425
- children: D
426
- })]
427
- }),
428
- N === "manifest" && /* @__PURE__ */ v("div", {
429
- className: "space-y-1",
430
- children: [/* @__PURE__ */ _("textarea", {
431
- rows: 6,
432
- placeholder: "{\n \"name\": \"my-workflow\",\n \"version\": \"1.0.0\",\n \"steps\": []\n}",
433
- value: j.manifestJson,
434
- onChange: (e) => M({
435
- ...j,
436
- manifestJson: e.target.value
372
+ /* @__PURE__ */ _("div", {
373
+ className: "flex gap-2 items-center",
374
+ children: [
375
+ /* @__PURE__ */ g("input", {
376
+ ref: D,
377
+ type: "file",
378
+ accept: ".zip",
379
+ className: "hidden",
380
+ onChange: De
381
+ }),
382
+ /* @__PURE__ */ g("button", {
383
+ type: "button",
384
+ disabled: T,
385
+ onClick: () => D.current?.click(),
386
+ 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",
387
+ children: T ? /* @__PURE__ */ _(h, { children: [
388
+ /* @__PURE__ */ g(p, {
389
+ size: 14,
390
+ className: "animate-spin"
391
+ }),
392
+ " ",
393
+ "Uploading… ",
394
+ Ce,
395
+ "%"
396
+ ] }) : /* @__PURE__ */ _(h, { children: [
397
+ /* @__PURE__ */ g(_e, { size: 14 }),
398
+ " ",
399
+ A.packageUrl ? "Replace zip" : "Upload zip"
400
+ ] })
437
401
  }),
438
- 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)]"
439
- }), /* @__PURE__ */ _("p", {
440
- className: "text-xs text-text-secondary",
441
- children: "Paste your workflow or configuration JSON here. No zip required."
442
- })]
402
+ A.packageUrl && !T && /* @__PURE__ */ g("span", {
403
+ className: "text-xs text-status-success-text",
404
+ children: "✓ Uploaded"
405
+ })
406
+ ]
407
+ }),
408
+ E && /* @__PURE__ */ g("p", {
409
+ className: "text-xs text-status-error-text",
410
+ children: E
443
411
  })
444
412
  ]
445
413
  }),
446
- /* @__PURE__ */ _(oe, {
447
- label: b("devportal.releaseNotes", "Release Notes"),
448
- value: j.releaseNotes,
449
- onChange: (e) => M({
450
- ...j,
414
+ /* @__PURE__ */ _("div", {
415
+ className: "space-y-1",
416
+ children: [/* @__PURE__ */ _("label", {
417
+ className: "text-sm font-medium",
418
+ children: [
419
+ "manifest.json",
420
+ " ",
421
+ /* @__PURE__ */ g("span", {
422
+ className: "text-xs font-normal text-text-secondary",
423
+ children: "(optional — paste if not bundled inside the zip)"
424
+ })
425
+ ]
426
+ }), /* @__PURE__ */ g("textarea", {
427
+ rows: 5,
428
+ placeholder: "{\n \"manifestVersion\": \"1.0\",\n \"itemType\": \"node\",\n \"identity\": { \"version\": \"1.0.0\", \"displayName\": \"My Node\" }\n}",
429
+ value: A.manifestJson,
430
+ onChange: (e) => j({
431
+ ...A,
432
+ manifestJson: e.target.value
433
+ }),
434
+ 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)]"
435
+ })]
436
+ }),
437
+ /* @__PURE__ */ g(oe, {
438
+ label: y("devportal.releaseNotes", "Release Notes"),
439
+ value: A.releaseNotes,
440
+ onChange: (e) => j({
441
+ ...A,
451
442
  releaseNotes: e.target.value
452
443
  }),
453
- placeholder: b("devportal.releaseNotesPlaceholder", "What changed in this release?"),
444
+ placeholder: y("devportal.releaseNotesPlaceholder", "What changed in this release?"),
454
445
  rows: 2
455
446
  })
456
447
  ]
457
448
  })
458
449
  }),
459
- /* @__PURE__ */ _(o, {
460
- open: V === "publish",
450
+ /* @__PURE__ */ g(o, {
451
+ open: R === "publish",
461
452
  onOpenChange: (e) => {
462
- e || H(null);
453
+ e || z(null);
463
454
  },
464
455
  onConfirm: async () => {
465
- if (X.length === 0) return;
466
- I(null);
467
- let e = await Promise.allSettled(X.map((e) => K({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
468
- R(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), H(null);
456
+ if (J.length === 0) return;
457
+ N(null);
458
+ let e = await Promise.allSettled(J.map((e) => W({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
459
+ F(`Published ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), z(null);
469
460
  },
470
- title: b("devportal.publishSelectedVersions", "Publish selected versions"),
471
- description: `${b("devportal.publish", "Publish")} ${X.length} selected version${X.length === 1 ? "" : "s"}?`,
472
- confirmLabel: b("devportal.publish", "Publish"),
473
- cancelLabel: b("devportal.cancel", "Cancel"),
461
+ title: y("devportal.publishSelectedVersions", "Publish selected versions"),
462
+ description: `${y("devportal.publish", "Publish")} ${J.length} selected version${J.length === 1 ? "" : "s"}?`,
463
+ confirmLabel: y("devportal.publish", "Publish"),
464
+ cancelLabel: y("devportal.cancel", "Cancel"),
474
465
  variant: "success"
475
466
  }),
476
- /* @__PURE__ */ _(o, {
477
- open: V === "deprecate",
467
+ /* @__PURE__ */ g(o, {
468
+ open: R === "deprecate",
478
469
  onOpenChange: (e) => {
479
- e || H(null);
470
+ e || z(null);
480
471
  },
481
472
  onConfirm: async () => {
482
- if (Z.length === 0) return;
483
- I(null);
484
- let e = await Promise.allSettled(Z.map((e) => q({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
485
- R(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), H(null);
473
+ if (Y.length === 0) return;
474
+ N(null);
475
+ let e = await Promise.allSettled(Y.map((e) => G({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
476
+ F(`Deprecated ${t} version${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`), $(), z(null);
486
477
  },
487
- title: b("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
488
- description: `${b("devportal.deprecate", "Deprecate")} ${Z.length} selected version${Z.length === 1 ? "" : "s"}? ${b("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,
489
- confirmLabel: b("devportal.deprecate", "Deprecate"),
490
- cancelLabel: b("devportal.cancel", "Cancel"),
478
+ title: y("devportal.deprecateSelectedVersions", "Deprecate selected versions"),
479
+ description: `${y("devportal.deprecate", "Deprecate")} ${Y.length} selected version${Y.length === 1 ? "" : "s"}? ${y("devportal.deprecateVersionsWarning", "Deprecated versions remain visible but should no longer be promoted.")}`,
480
+ confirmLabel: y("devportal.deprecate", "Deprecate"),
481
+ cancelLabel: y("devportal.cancel", "Cancel"),
491
482
  variant: "warning"
492
483
  })
493
484
  ]
@@ -495,6 +486,6 @@ var y = () => {
495
486
  });
496
487
  };
497
488
  //#endregion
498
- export { y as ApplicationVersionsPage };
489
+ export { v as ApplicationVersionsPage };
499
490
 
500
491
  //# sourceMappingURL=ApplicationVersionsPage.js.map