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