@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,
|
|
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
|
|
21
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
22
22
|
//#region src/devportal/pages/ApplicationVersionsPage.tsx
|
|
23
|
-
var
|
|
24
|
-
let { t:
|
|
25
|
-
let n =
|
|
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:
|
|
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
|
-
}), [
|
|
35
|
-
variables: { id:
|
|
36
|
-
skip: !
|
|
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 =
|
|
41
|
-
if (!
|
|
40
|
+
let e = B?.application?.name;
|
|
41
|
+
if (!C || !e) return;
|
|
42
42
|
let t = window.__breadcrumbRegistry;
|
|
43
|
-
return t?.register(
|
|
44
|
-
}, [
|
|
45
|
-
let { data:
|
|
46
|
-
variables: { applicationId:
|
|
47
|
-
skip: !
|
|
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:
|
|
50
|
-
if (!
|
|
51
|
-
|
|
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 (
|
|
54
|
-
e = JSON.parse(
|
|
53
|
+
if (A.manifestJson.trim()) try {
|
|
54
|
+
e = JSON.parse(A.manifestJson);
|
|
55
55
|
} catch {
|
|
56
|
-
|
|
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:
|
|
61
|
+
applicationId: C,
|
|
62
62
|
input: {
|
|
63
|
-
version:
|
|
64
|
-
releaseNotes:
|
|
65
|
-
changelog:
|
|
66
|
-
packageUrl:
|
|
67
|
-
packageSize:
|
|
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
|
-
} }),
|
|
70
|
+
} }), k(!1), j({
|
|
71
71
|
version: "",
|
|
72
72
|
releaseNotes: "",
|
|
73
73
|
changelog: "",
|
|
74
74
|
packageUrl: "",
|
|
75
75
|
packageSize: "",
|
|
76
76
|
manifestJson: ""
|
|
77
|
-
}),
|
|
77
|
+
}), F(y("devportal.versionCreatedSuccess", "Version created successfully"));
|
|
78
78
|
} catch (e) {
|
|
79
|
-
|
|
79
|
+
N(e instanceof Error ? e.message : y("devportal.versionCreateFailed", "Failed to create version"));
|
|
80
80
|
}
|
|
81
|
-
},
|
|
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
|
|
87
|
-
|
|
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
|
-
}, [
|
|
95
|
-
|
|
94
|
+
}, [w]), Oe = async (e) => {
|
|
95
|
+
N(null), F(null);
|
|
96
96
|
try {
|
|
97
|
-
await
|
|
97
|
+
await W({ variables: { id: e } }), F(y("devportal.versionPublishedSuccess", "Version published successfully"));
|
|
98
98
|
} catch (e) {
|
|
99
|
-
|
|
99
|
+
N(e instanceof Error ? e.message : y("devportal.versionPublishFailed", "Failed to publish version"));
|
|
100
100
|
}
|
|
101
|
-
},
|
|
102
|
-
|
|
101
|
+
}, ke = async (e) => {
|
|
102
|
+
N(null), F(null);
|
|
103
103
|
try {
|
|
104
|
-
await
|
|
104
|
+
await G({ variables: { id: e } }), F(y("devportal.versionDeprecatedSuccess", "Version deprecated successfully"));
|
|
105
105
|
} catch (e) {
|
|
106
|
-
|
|
106
|
+
N(e instanceof Error ? e.message : y("devportal.versionDeprecateFailed", "Failed to deprecate version"));
|
|
107
107
|
}
|
|
108
|
-
},
|
|
108
|
+
}, Ae = (e) => {
|
|
109
109
|
let t = e.status?.toUpperCase();
|
|
110
|
-
return t === "PUBLISHED" && e.isLatest ? /* @__PURE__ */
|
|
110
|
+
return t === "PUBLISHED" && e.isLatest ? /* @__PURE__ */ g(f, {
|
|
111
111
|
size: 16,
|
|
112
112
|
className: "text-status-success-text"
|
|
113
|
-
}) : t === "DRAFT" ? /* @__PURE__ */
|
|
113
|
+
}) : t === "DRAFT" ? /* @__PURE__ */ g(he, {
|
|
114
114
|
size: 16,
|
|
115
115
|
className: "text-status-warning-text"
|
|
116
|
-
}) : t === "DEPRECATED" ? /* @__PURE__ */
|
|
116
|
+
}) : t === "DEPRECATED" ? /* @__PURE__ */ g(me, {
|
|
117
117
|
size: 16,
|
|
118
118
|
className: "text-text-secondary"
|
|
119
|
-
}) : /* @__PURE__ */
|
|
119
|
+
}) : /* @__PURE__ */ g(ge, {
|
|
120
120
|
size: 16,
|
|
121
121
|
className: "text-accent-blue"
|
|
122
122
|
});
|
|
123
|
-
},
|
|
124
|
-
|
|
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
|
-
},
|
|
129
|
-
|
|
128
|
+
}, Q = (e) => {
|
|
129
|
+
L((t) => {
|
|
130
130
|
let n = new Set(t);
|
|
131
|
-
return
|
|
131
|
+
return K.forEach((t) => {
|
|
132
132
|
e ? n.add(t.id) : n.delete(t.id);
|
|
133
133
|
}), n;
|
|
134
134
|
});
|
|
135
|
-
}, $ = () =>
|
|
136
|
-
return we && !
|
|
137
|
-
title:
|
|
138
|
-
description:
|
|
139
|
-
backLink: `/apps/${
|
|
140
|
-
backLabel:
|
|
141
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
143
|
+
children: /* @__PURE__ */ g(p, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
144
144
|
})
|
|
145
|
-
}) :
|
|
146
|
-
title:
|
|
147
|
-
description:
|
|
148
|
-
backLink: `/apps/${
|
|
149
|
-
backLabel:
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
156
|
-
description:
|
|
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__ */
|
|
158
|
+
}) : /* @__PURE__ */ g(se, {
|
|
159
159
|
permission: s.APP_READ,
|
|
160
|
-
children: /* @__PURE__ */
|
|
161
|
-
title:
|
|
162
|
-
description:
|
|
163
|
-
purpose:
|
|
164
|
-
backLink: `/apps/${
|
|
165
|
-
backLabel:
|
|
166
|
-
actions: /* @__PURE__ */
|
|
167
|
-
onClick: () =>
|
|
168
|
-
disabled: !
|
|
169
|
-
"aria-disabled": !
|
|
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__ */
|
|
171
|
+
children: [/* @__PURE__ */ g(m, { size: 16 }), y("devportal.newVersion", "New Version")]
|
|
172
172
|
}),
|
|
173
173
|
children: [
|
|
174
|
-
|
|
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__ */
|
|
177
|
+
/* @__PURE__ */ g(d, {
|
|
178
178
|
size: 16,
|
|
179
179
|
className: "flex-shrink-0"
|
|
180
180
|
}),
|
|
181
|
-
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
onClick: () =>
|
|
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:
|
|
185
|
+
children: y("devportal.dismiss", "Dismiss")
|
|
186
186
|
})
|
|
187
187
|
]
|
|
188
188
|
}),
|
|
189
|
-
|
|
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__ */
|
|
192
|
+
/* @__PURE__ */ g(f, {
|
|
193
193
|
size: 16,
|
|
194
194
|
className: "flex-shrink-0"
|
|
195
195
|
}),
|
|
196
|
-
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
onClick: () =>
|
|
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:
|
|
200
|
+
children: y("devportal.dismiss", "Dismiss")
|
|
201
201
|
})
|
|
202
202
|
]
|
|
203
203
|
}),
|
|
204
|
-
|
|
204
|
+
K.length > 0 && /* @__PURE__ */ g("div", {
|
|
205
205
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
206
|
-
children: /* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ _("div", {
|
|
207
207
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ _("div", {
|
|
209
209
|
className: "flex flex-wrap items-center gap-3",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ _("div", {
|
|
211
211
|
className: "flex items-center gap-2",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
checked:
|
|
214
|
-
indeterminate:
|
|
215
|
-
onChange:
|
|
212
|
+
children: [/* @__PURE__ */ g(a, {
|
|
213
|
+
checked: X,
|
|
214
|
+
indeterminate: Z,
|
|
215
|
+
onChange: Q,
|
|
216
216
|
ariaLabel: "Select all visible versions"
|
|
217
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ g("span", {
|
|
218
218
|
className: "text-sm font-medium",
|
|
219
|
-
children:
|
|
219
|
+
children: y("devportal.selectAllVisible", "Select all visible")
|
|
220
220
|
})]
|
|
221
|
-
}),
|
|
221
|
+
}), I.size > 0 && /* @__PURE__ */ g("button", {
|
|
222
222
|
onClick: $,
|
|
223
223
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
224
|
-
children:
|
|
224
|
+
children: y("devportal.clearSelection", "Clear selection")
|
|
225
225
|
})]
|
|
226
|
-
}), /* @__PURE__ */
|
|
226
|
+
}), /* @__PURE__ */ _("div", {
|
|
227
227
|
className: "flex flex-wrap items-center gap-2",
|
|
228
228
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ _("span", {
|
|
230
230
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
231
|
-
children: [
|
|
231
|
+
children: [I.size, " selected"]
|
|
232
232
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
onClick: () =>
|
|
235
|
-
disabled:
|
|
236
|
-
"aria-disabled": !
|
|
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: [
|
|
238
|
+
children: [y("devportal.publishSelected", "Publish Selected"), J.length > 0 ? ` (${J.length})` : ""]
|
|
239
239
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
onClick: () =>
|
|
242
|
-
disabled:
|
|
243
|
-
"aria-disabled": !
|
|
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: [
|
|
245
|
+
children: [y("devportal.deprecateSelected", "Deprecate Selected"), Y.length > 0 ? ` (${Y.length})` : ""]
|
|
246
246
|
})
|
|
247
247
|
]
|
|
248
248
|
})]
|
|
249
249
|
})
|
|
250
250
|
}),
|
|
251
|
-
|
|
252
|
-
data:
|
|
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__ */
|
|
258
|
-
checked:
|
|
259
|
-
indeterminate:
|
|
260
|
-
onChange:
|
|
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__ */
|
|
264
|
+
render: (e) => /* @__PURE__ */ g("div", {
|
|
265
265
|
onClick: (e) => e.stopPropagation(),
|
|
266
|
-
children: /* @__PURE__ */
|
|
267
|
-
checked:
|
|
268
|
-
onChange: (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:
|
|
276
|
-
render: (e) => /* @__PURE__ */
|
|
275
|
+
header: y("devportal.version", "Version"),
|
|
276
|
+
render: (e) => /* @__PURE__ */ _("div", {
|
|
277
277
|
className: "flex items-center gap-2",
|
|
278
278
|
children: [
|
|
279
|
-
|
|
280
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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:
|
|
286
|
+
children: y("devportal.latest", "Latest")
|
|
287
287
|
}),
|
|
288
|
-
!e.isStable && /* @__PURE__ */
|
|
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:
|
|
290
|
+
children: y("devportal.beta", "Beta")
|
|
291
291
|
})
|
|
292
292
|
]
|
|
293
293
|
})
|
|
294
294
|
},
|
|
295
295
|
{
|
|
296
296
|
key: "releaseNotes",
|
|
297
|
-
header:
|
|
298
|
-
render: (e) => /* @__PURE__ */
|
|
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 ||
|
|
300
|
+
children: e.releaseNotes || y("devportal.noReleaseNotes", "No release notes")
|
|
301
301
|
})
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
key: "status",
|
|
305
|
-
header:
|
|
306
|
-
render: (e) => /* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
317
|
+
render: (e) => /* @__PURE__ */ _("div", {
|
|
318
318
|
className: "flex gap-2",
|
|
319
|
-
children: [e.status?.toUpperCase() === "DRAFT" && /* @__PURE__ */
|
|
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: () =>
|
|
324
|
-
children:
|
|
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__ */
|
|
335
|
+
}) : /* @__PURE__ */ g(t, {
|
|
336
336
|
illustration: "empty-data",
|
|
337
|
-
title:
|
|
338
|
-
description:
|
|
339
|
-
action: /* @__PURE__ */
|
|
340
|
-
onClick: () =>
|
|
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__ */
|
|
342
|
+
children: [/* @__PURE__ */ g(m, { size: 16 }), y("devportal.createVersion", "Create Version")]
|
|
343
343
|
})
|
|
344
344
|
}),
|
|
345
|
-
|
|
346
|
-
open:
|
|
347
|
-
onOpenChange:
|
|
348
|
-
onConfirm:
|
|
349
|
-
title:
|
|
350
|
-
confirmLabel:
|
|
351
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
355
|
-
label:
|
|
356
|
-
value:
|
|
357
|
-
onChange: (e) =>
|
|
358
|
-
...
|
|
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:
|
|
362
|
+
hint: y("devportal.versionHint", "Use semantic versioning (major.minor.patch)"),
|
|
363
363
|
required: !0
|
|
364
364
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
className: "space-y-
|
|
365
|
+
/* @__PURE__ */ _("div", {
|
|
366
|
+
className: "space-y-1",
|
|
367
367
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
387
|
-
className: "
|
|
388
|
-
children: [
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
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
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
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__ */ _(
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
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:
|
|
444
|
+
placeholder: y("devportal.releaseNotesPlaceholder", "What changed in this release?"),
|
|
454
445
|
rows: 2
|
|
455
446
|
})
|
|
456
447
|
]
|
|
457
448
|
})
|
|
458
449
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
open:
|
|
450
|
+
/* @__PURE__ */ g(o, {
|
|
451
|
+
open: R === "publish",
|
|
461
452
|
onOpenChange: (e) => {
|
|
462
|
-
e ||
|
|
453
|
+
e || z(null);
|
|
463
454
|
},
|
|
464
455
|
onConfirm: async () => {
|
|
465
|
-
if (
|
|
466
|
-
|
|
467
|
-
let e = await Promise.allSettled(
|
|
468
|
-
|
|
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:
|
|
471
|
-
description: `${
|
|
472
|
-
confirmLabel:
|
|
473
|
-
cancelLabel:
|
|
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__ */
|
|
477
|
-
open:
|
|
467
|
+
/* @__PURE__ */ g(o, {
|
|
468
|
+
open: R === "deprecate",
|
|
478
469
|
onOpenChange: (e) => {
|
|
479
|
-
e ||
|
|
470
|
+
e || z(null);
|
|
480
471
|
},
|
|
481
472
|
onConfirm: async () => {
|
|
482
|
-
if (
|
|
483
|
-
|
|
484
|
-
let e = await Promise.allSettled(
|
|
485
|
-
|
|
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:
|
|
488
|
-
description: `${
|
|
489
|
-
confirmLabel:
|
|
490
|
-
cancelLabel:
|
|
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 {
|
|
489
|
+
export { v as ApplicationVersionsPage };
|
|
499
490
|
|
|
500
491
|
//# sourceMappingURL=ApplicationVersionsPage.js.map
|