@burdenoff/microfe-devportal 2026.1014.1 → 2026.1024.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.
@@ -5,40 +5,41 @@ import { getErrorMessage as l } from "../hooks/useGraphQL.js";
5
5
  import { PageLayout as u, PageSection as d } from "../components/PageLayout.js";
6
6
  import { PermissionGuard as f } from "../components/PermissionGuard.js";
7
7
  import { ManifestViewer as p } from "../components/ManifestViewer.js";
8
+ import { PackageValidationPanel as m } from "../components/PackageValidationPanel.js";
8
9
  import "../components/index.js";
9
- import { useDevportalPermission as m } from "../hooks/usePermission.js";
10
+ import { useDevportalPermission as h } from "../hooks/usePermission.js";
10
11
  import "../hooks/index.js";
11
- import { DEVPORTAL_PERMISSIONS as h } from "../constants/permissions.js";
12
- import { useState as g } from "react";
13
- import { AlertCircle as _, CheckCircle as v, ChevronDown as y, ChevronUp as b, Clock as x, Download as S, Eye as C, GitBranch as w, Loader2 as T, Package as E, Search as D, XCircle as O } from "lucide-react";
14
- import { jsx as k, jsxs as A } from "react/jsx-runtime";
15
- import { useI18n as j } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { DEVPORTAL_PERMISSIONS as g } from "../constants/permissions.js";
13
+ import { useState as _ } from "react";
14
+ import { AlertCircle as v, CheckCircle as y, ChevronDown as b, ChevronUp as x, Clock as S, Download as C, Eye as w, GitBranch as T, Loader2 as E, Package as D, Search as O, XCircle as k } from "lucide-react";
15
+ import { jsx as A, jsxs as j } from "react/jsx-runtime";
16
+ import { useI18n as M } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
17
  //#region src/devportal/pages/AdminReviewPage.tsx
17
- var M = {
18
+ var N = {
18
19
  NODE: "Node package",
19
20
  WORKFLOW: "Workflow bundle"
20
- }, N = ({ appType: e, packageUrl: t, packageSize: n, tr: r }) => {
21
- let i = M[e];
22
- return i ? /* @__PURE__ */ A("div", {
21
+ }, P = ({ appType: e, packageUrl: t, packageSize: n, tr: r }) => {
22
+ let i = N[e];
23
+ return i ? /* @__PURE__ */ j("div", {
23
24
  className: "rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-3 space-y-2",
24
- children: [/* @__PURE__ */ A("div", {
25
+ children: [/* @__PURE__ */ j("div", {
25
26
  className: "flex items-center gap-2 text-xs font-medium text-status-warning-text",
26
- children: [/* @__PURE__ */ k(E, {
27
+ children: [/* @__PURE__ */ A(D, {
27
28
  size: 13,
28
29
  className: "flex-shrink-0"
29
30
  }), r("devportal.zipVerificationRequired", "ZIP verification required — download and test before approving")]
30
- }), t ? /* @__PURE__ */ A("a", {
31
+ }), t ? /* @__PURE__ */ j("a", {
31
32
  href: t,
32
33
  download: !0,
33
34
  target: "_blank",
34
35
  rel: "noopener noreferrer",
35
36
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
36
37
  children: [
37
- /* @__PURE__ */ k(S, { size: 14 }),
38
+ /* @__PURE__ */ A(C, { size: 14 }),
38
39
  r("devportal.download", "Download"),
39
40
  " ",
40
41
  i,
41
- n && /* @__PURE__ */ A("span", {
42
+ n && /* @__PURE__ */ j("span", {
42
43
  className: "opacity-70 text-xs",
43
44
  children: [
44
45
  "(",
@@ -47,61 +48,61 @@ var M = {
47
48
  ]
48
49
  })
49
50
  ]
50
- }) : /* @__PURE__ */ A("p", {
51
+ }) : /* @__PURE__ */ j("p", {
51
52
  className: "text-xs text-status-error-text flex items-center gap-1.5",
52
- children: [/* @__PURE__ */ k(_, { size: 12 }), r("devportal.noZipUploaded", "No ZIP uploaded — developer must upload before this can be approved")]
53
+ children: [/* @__PURE__ */ A(v, { size: 12 }), r("devportal.noZipUploaded", "No ZIP uploaded — developer must upload before this can be approved")]
53
54
  })]
54
55
  }) : null;
55
- }, P = ({ app: t, onApprove: n, onReject: r, processing: a, hasPendingVersions: o }) => {
56
- let { navigate: s, basePath: c } = e(), { t: l } = j(), u = (e, t) => {
56
+ }, F = ({ app: t, onApprove: n, onReject: r, processing: a, hasPendingVersions: o }) => {
57
+ let { navigate: s, basePath: c } = e(), { t: l } = M(), u = (e, t) => {
57
58
  let n = l(e);
58
59
  return n === e ? t : n;
59
- }, [d, f] = g(!1), [_, x] = g(""), E = m(h.APP_APPROVE), D = m(h.APP_REJECT), { data: P } = i({
60
+ }, [d, f] = _(!1), [m, v] = _(""), S = h(g.APP_APPROVE), D = h(g.APP_REJECT), { data: O } = i({
60
61
  variables: { id: t.id },
61
62
  skip: !d,
62
63
  fetchPolicy: "cache-first"
63
- }), F = P?.application?.versions?.edges?.[0]?.node;
64
- return /* @__PURE__ */ A("div", {
64
+ }), F = O?.application?.versions?.edges?.[0]?.node;
65
+ return /* @__PURE__ */ j("div", {
65
66
  className: "rounded-card border border-border-seam bg-bg-surface overflow-hidden",
66
- children: [/* @__PURE__ */ A("div", {
67
+ children: [/* @__PURE__ */ j("div", {
67
68
  className: "flex items-center gap-4 p-4",
68
69
  children: [
69
- t.iconUrl ? /* @__PURE__ */ k("img", {
70
+ t.iconUrl ? /* @__PURE__ */ A("img", {
70
71
  src: t.iconUrl,
71
72
  alt: t.name,
72
73
  className: "h-12 w-12 rounded-lg object-cover flex-shrink-0"
73
- }) : /* @__PURE__ */ k("div", {
74
+ }) : /* @__PURE__ */ A("div", {
74
75
  className: "h-12 w-12 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0",
75
- children: /* @__PURE__ */ k("span", {
76
+ children: /* @__PURE__ */ A("span", {
76
77
  className: "text-lg font-bold text-text-secondary",
77
78
  children: t.name.charAt(0).toUpperCase()
78
79
  })
79
80
  }),
80
- /* @__PURE__ */ A("div", {
81
+ /* @__PURE__ */ j("div", {
81
82
  className: "flex-1 min-w-0",
82
83
  children: [
83
- /* @__PURE__ */ A("div", {
84
+ /* @__PURE__ */ j("div", {
84
85
  className: "flex items-center gap-2",
85
86
  children: [
86
- /* @__PURE__ */ k("h3", {
87
+ /* @__PURE__ */ A("h3", {
87
88
  className: "font-semibold truncate",
88
89
  children: t.name
89
90
  }),
90
- /* @__PURE__ */ k("span", {
91
+ /* @__PURE__ */ A("span", {
91
92
  className: "inline-flex items-center rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
92
93
  children: t.status
93
94
  }),
94
- /* @__PURE__ */ k("span", {
95
+ /* @__PURE__ */ A("span", {
95
96
  className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
96
97
  children: t.appType.replace(/_/g, " ")
97
98
  })
98
99
  ]
99
100
  }),
100
- /* @__PURE__ */ k("p", {
101
+ /* @__PURE__ */ A("p", {
101
102
  className: "text-sm text-text-secondary truncate",
102
103
  children: t.shortDescription ?? t.description ?? u("devportal.noDescription", "No description")
103
104
  }),
104
- /* @__PURE__ */ A("p", {
105
+ /* @__PURE__ */ j("p", {
105
106
  className: "text-xs text-text-secondary mt-0.5",
106
107
  children: [
107
108
  u("devportal.submitted", "Submitted"),
@@ -116,130 +117,130 @@ var M = {
116
117
  })
117
118
  ]
118
119
  }),
119
- /* @__PURE__ */ A("div", {
120
+ /* @__PURE__ */ j("div", {
120
121
  className: "flex items-center gap-2 flex-shrink-0",
121
- children: [/* @__PURE__ */ A("button", {
122
+ children: [/* @__PURE__ */ j("button", {
122
123
  onClick: () => s?.(`${c}/apps/${t.id}`),
123
124
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
124
125
  title: u("devportal.viewAppDetails", "View app details"),
125
- children: [/* @__PURE__ */ k(C, { size: 14 }), u("devportal.view", "View")]
126
- }), /* @__PURE__ */ A("button", {
126
+ children: [/* @__PURE__ */ A(w, { size: 14 }), u("devportal.view", "View")]
127
+ }), /* @__PURE__ */ j("button", {
127
128
  onClick: () => f((e) => !e),
128
129
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
129
- children: [k(d ? b : y, { size: 14 }), u("devportal.review", "Review")]
130
+ children: [A(d ? x : b, { size: 14 }), u("devportal.review", "Review")]
130
131
  })]
131
132
  })
132
133
  ]
133
- }), d && /* @__PURE__ */ A("div", {
134
+ }), d && /* @__PURE__ */ j("div", {
134
135
  className: "border-t bg-bg-sunken/30 p-4 space-y-4",
135
136
  children: [
136
- o && /* @__PURE__ */ A("div", {
137
+ o && /* @__PURE__ */ j("div", {
137
138
  className: "flex items-start gap-2 rounded-md border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-2.5 text-xs text-status-warning-text",
138
- children: [/* @__PURE__ */ k(w, {
139
+ children: [/* @__PURE__ */ A(T, {
139
140
  size: 14,
140
141
  className: "mt-0.5 shrink-0",
141
142
  "aria-hidden": "true"
142
- }), /* @__PURE__ */ A("span", { children: [
143
+ }), /* @__PURE__ */ j("span", { children: [
143
144
  "This app has a pending version. Approve the version in the",
144
145
  " ",
145
- /* @__PURE__ */ k("strong", { children: "Version Updates" }),
146
+ /* @__PURE__ */ A("strong", { children: "Version Updates" }),
146
147
  " section below before approving the app — the version must be live before the app can go public."
147
148
  ] })]
148
149
  }),
149
- t.reviewNotes && /* @__PURE__ */ A("div", {
150
+ t.reviewNotes && /* @__PURE__ */ j("div", {
150
151
  className: "rounded-md border bg-bg-surface p-3",
151
- children: [/* @__PURE__ */ k("p", {
152
+ children: [/* @__PURE__ */ A("p", {
152
153
  className: "text-xs font-medium text-text-secondary mb-1",
153
154
  children: u("devportal.developerNotes", "Developer Notes")
154
- }), /* @__PURE__ */ k("p", {
155
+ }), /* @__PURE__ */ A("p", {
155
156
  className: "text-sm",
156
157
  children: t.reviewNotes
157
158
  })]
158
159
  }),
159
- /* @__PURE__ */ A("div", {
160
+ /* @__PURE__ */ j("div", {
160
161
  className: "grid grid-cols-2 gap-3 text-sm",
161
162
  children: [
162
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("span", {
163
+ /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("span", {
163
164
  className: "text-text-secondary",
164
165
  children: [
165
166
  u("devportal.category", "Category"),
166
167
  ":",
167
168
  " "
168
169
  ]
169
- }), /* @__PURE__ */ k("span", { children: t.category ?? "—" })] }),
170
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("span", {
170
+ }), /* @__PURE__ */ A("span", { children: t.category ?? "—" })] }),
171
+ /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("span", {
171
172
  className: "text-text-secondary",
172
173
  children: [
173
174
  u("devportal.pricing", "Pricing"),
174
175
  ":",
175
176
  " "
176
177
  ]
177
- }), /* @__PURE__ */ k("span", { children: t.pricingType ?? "FREE" })] }),
178
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("span", {
178
+ }), /* @__PURE__ */ A("span", { children: t.pricingType ?? "FREE" })] }),
179
+ /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("span", {
179
180
  className: "text-text-secondary",
180
181
  children: [
181
182
  u("devportal.website", "Website"),
182
183
  ":",
183
184
  " "
184
185
  ]
185
- }), t.websiteUrl ? /* @__PURE__ */ k("a", {
186
+ }), t.websiteUrl ? /* @__PURE__ */ A("a", {
186
187
  href: t.websiteUrl,
187
188
  target: "_blank",
188
189
  rel: "noopener noreferrer",
189
190
  className: "text-primary underline hover:no-underline",
190
191
  children: u("devportal.link", "Link")
191
- }) : /* @__PURE__ */ k("span", { children: "—" })] }),
192
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ A("span", {
192
+ }) : /* @__PURE__ */ A("span", { children: "—" })] }),
193
+ /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("span", {
193
194
  className: "text-text-secondary",
194
195
  children: [
195
196
  u("devportal.privacyPolicy", "Privacy Policy"),
196
197
  ":",
197
198
  " "
198
199
  ]
199
- }), t.privacyPolicyUrl ? /* @__PURE__ */ k("a", {
200
+ }), t.privacyPolicyUrl ? /* @__PURE__ */ A("a", {
200
201
  href: t.privacyPolicyUrl,
201
202
  target: "_blank",
202
203
  rel: "noopener noreferrer",
203
204
  className: "text-primary underline hover:no-underline",
204
205
  children: u("devportal.link", "Link")
205
- }) : /* @__PURE__ */ k("span", {
206
+ }) : /* @__PURE__ */ A("span", {
206
207
  className: "text-status-error-text",
207
208
  children: u("devportal.missing", "Missing")
208
209
  })] })
209
210
  ]
210
211
  }),
211
- F && /* @__PURE__ */ A("div", {
212
+ F && /* @__PURE__ */ j("div", {
212
213
  className: "rounded-md border bg-bg-surface p-3 space-y-3",
213
214
  children: [
214
- /* @__PURE__ */ A("p", {
215
+ /* @__PURE__ */ j("p", {
215
216
  className: "text-xs font-medium text-text-secondary",
216
217
  children: [
217
218
  u("devportal.latestVersion", "Latest Version"),
218
219
  ":",
219
220
  " ",
220
- /* @__PURE__ */ k("span", {
221
+ /* @__PURE__ */ A("span", {
221
222
  className: "font-mono text-text-primary",
222
223
  children: F.version
223
224
  })
224
225
  ]
225
226
  }),
226
- M[t.appType] ? /* @__PURE__ */ k(N, {
227
+ N[t.appType] ? /* @__PURE__ */ A(P, {
227
228
  appType: t.appType,
228
229
  packageUrl: F.packageUrl,
229
230
  packageSize: F.packageSize,
230
231
  tr: u
231
- }) : F.packageUrl && /* @__PURE__ */ k("div", {
232
+ }) : F.packageUrl && /* @__PURE__ */ A("div", {
232
233
  className: "flex flex-wrap gap-2",
233
- children: /* @__PURE__ */ A("a", {
234
+ children: /* @__PURE__ */ j("a", {
234
235
  href: F.packageUrl,
235
236
  download: !0,
236
237
  target: "_blank",
237
238
  rel: "noopener noreferrer",
238
239
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
239
240
  children: [
240
- /* @__PURE__ */ k(S, { size: 14 }),
241
+ /* @__PURE__ */ A(C, { size: 14 }),
241
242
  u("devportal.downloadPackage", "Download Package"),
242
- F.packageSize && /* @__PURE__ */ A("span", {
243
+ F.packageSize && /* @__PURE__ */ j("span", {
243
244
  className: "text-text-secondary text-xs ml-1",
244
245
  children: [
245
246
  "(",
@@ -250,49 +251,49 @@ var M = {
250
251
  ]
251
252
  })
252
253
  }),
253
- F.manifest && /* @__PURE__ */ k(p, {
254
+ F.manifest && /* @__PURE__ */ A(p, {
254
255
  manifest: F.manifest,
255
256
  tr: u
256
257
  })
257
258
  ]
258
259
  }),
259
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
260
+ /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("label", {
260
261
  className: "text-sm font-medium",
261
262
  children: u("devportal.reviewNotes", "Review Notes")
262
- }), /* @__PURE__ */ k("textarea", {
263
- value: _,
264
- onChange: (e) => x(e.target.value),
263
+ }), /* @__PURE__ */ A("textarea", {
264
+ value: m,
265
+ onChange: (e) => v(e.target.value),
265
266
  placeholder: u("devportal.reviewNotesPlaceholder", "Add feedback for the developer (required for rejection)..."),
266
267
  rows: 3,
267
268
  className: "mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm ring-offset-background placeholder:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none"
268
269
  })] }),
269
- /* @__PURE__ */ A("div", {
270
+ /* @__PURE__ */ j("div", {
270
271
  className: "flex gap-3",
271
- children: [/* @__PURE__ */ A("button", {
272
- onClick: () => n(t.id, _),
273
- disabled: a || !E.allowed,
274
- "aria-disabled": a || !E.allowed,
275
- title: E.allowed ? void 0 : u("devportal.common.noPermission", "You do not have permission to perform this action"),
272
+ children: [/* @__PURE__ */ j("button", {
273
+ onClick: () => n(t.id, m),
274
+ disabled: a || !S.allowed,
275
+ "aria-disabled": a || !S.allowed,
276
+ title: S.allowed ? void 0 : u("devportal.common.noPermission", "You do not have permission to perform this action"),
276
277
  className: "inline-flex items-center gap-2 rounded-md bg-status-success-bg px-4 py-2 text-sm font-medium text-white hover:bg-status-success-bg/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
277
- children: [a ? /* @__PURE__ */ k(T, {
278
+ children: [a ? /* @__PURE__ */ A(E, {
278
279
  size: 14,
279
280
  className: "animate-spin",
280
281
  "aria-hidden": "true"
281
- }) : /* @__PURE__ */ k(v, {
282
+ }) : /* @__PURE__ */ A(y, {
282
283
  size: 14,
283
284
  "aria-hidden": "true"
284
285
  }), u("devportal.approve", "Approve")]
285
- }), /* @__PURE__ */ A("button", {
286
- onClick: () => r(t.id, _),
287
- disabled: a || !_.trim() || !D.allowed,
288
- "aria-disabled": a || !_.trim() || !D.allowed,
286
+ }), /* @__PURE__ */ j("button", {
287
+ onClick: () => r(t.id, m),
288
+ disabled: a || !m.trim() || !D.allowed,
289
+ "aria-disabled": a || !m.trim() || !D.allowed,
289
290
  className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
290
- title: D.allowed ? _.trim() ? void 0 : u("devportal.notesRequiredForRejection", "Notes required for rejection") : u("devportal.common.noPermission", "You do not have permission to perform this action"),
291
- children: [a ? /* @__PURE__ */ k(T, {
291
+ title: D.allowed ? m.trim() ? void 0 : u("devportal.notesRequiredForRejection", "Notes required for rejection") : u("devportal.common.noPermission", "You do not have permission to perform this action"),
292
+ children: [a ? /* @__PURE__ */ A(E, {
292
293
  size: 14,
293
294
  className: "animate-spin",
294
295
  "aria-hidden": "true"
295
- }) : /* @__PURE__ */ k(O, {
296
+ }) : /* @__PURE__ */ A(k, {
296
297
  size: 14,
297
298
  "aria-hidden": "true"
298
299
  }), u("devportal.reject", "Reject")]
@@ -301,35 +302,35 @@ var M = {
301
302
  ]
302
303
  })]
303
304
  });
304
- }, F = ({ app: t, onApproveVersion: n, onRejectVersion: r, processingVersionIds: i }) => {
305
- let { navigate: a, basePath: o } = e(), { t: s } = j(), c = (e, t) => {
305
+ }, I = ({ app: t, onApproveVersion: n, onRejectVersion: r, processingVersionIds: i }) => {
306
+ let { navigate: a, basePath: o } = e(), { t: s } = M(), c = (e, t) => {
306
307
  let n = s(e);
307
308
  return n === e ? t : n;
308
- }, [l, u] = g(!1), d = t.versions.edges.map((e) => e.node).filter((e) => e.status === "pending_review");
309
- return d.length === 0 ? null : /* @__PURE__ */ A("div", {
309
+ }, [l, u] = _(!1), d = t.versions.edges.map((e) => e.node).filter((e) => e.status === "pending_review");
310
+ return d.length === 0 ? null : /* @__PURE__ */ j("div", {
310
311
  className: "rounded-card border border-border-seam bg-bg-surface overflow-hidden",
311
- children: [/* @__PURE__ */ A("div", {
312
+ children: [/* @__PURE__ */ j("div", {
312
313
  className: "flex items-center gap-4 p-4",
313
314
  children: [
314
- t.iconUrl ? /* @__PURE__ */ k("img", {
315
+ t.iconUrl ? /* @__PURE__ */ A("img", {
315
316
  src: t.iconUrl,
316
317
  alt: t.name,
317
318
  className: "h-12 w-12 rounded-lg object-cover flex-shrink-0"
318
- }) : /* @__PURE__ */ k("div", {
319
+ }) : /* @__PURE__ */ A("div", {
319
320
  className: "h-12 w-12 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0",
320
- children: /* @__PURE__ */ k("span", {
321
+ children: /* @__PURE__ */ A("span", {
321
322
  className: "text-lg font-bold text-text-secondary",
322
323
  children: t.name.charAt(0).toUpperCase()
323
324
  })
324
325
  }),
325
- /* @__PURE__ */ A("div", {
326
+ /* @__PURE__ */ j("div", {
326
327
  className: "flex-1 min-w-0",
327
- children: [/* @__PURE__ */ A("div", {
328
+ children: [/* @__PURE__ */ j("div", {
328
329
  className: "flex items-center gap-2",
329
- children: [/* @__PURE__ */ k("h3", {
330
+ children: [/* @__PURE__ */ A("h3", {
330
331
  className: "font-semibold truncate",
331
332
  children: t.name
332
- }), /* @__PURE__ */ A("span", {
333
+ }), /* @__PURE__ */ j("span", {
333
334
  className: "inline-flex items-center rounded-full bg-status-info-bg-subtle px-2 py-0.5 text-xs font-medium text-status-info-text",
334
335
  children: [
335
336
  d.length,
@@ -338,27 +339,27 @@ var M = {
338
339
  " pending"
339
340
  ]
340
341
  })]
341
- }), /* @__PURE__ */ k("p", {
342
+ }), /* @__PURE__ */ A("p", {
342
343
  className: "text-sm text-text-secondary truncate",
343
344
  children: t.shortDescription ?? t.description ?? c("devportal.noDescription", "No description")
344
345
  })]
345
346
  }),
346
- /* @__PURE__ */ A("div", {
347
+ /* @__PURE__ */ j("div", {
347
348
  className: "flex items-center gap-2 flex-shrink-0",
348
- children: [/* @__PURE__ */ A("button", {
349
+ children: [/* @__PURE__ */ j("button", {
349
350
  onClick: () => a?.(`${o}/apps/${t.id}`),
350
351
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
351
- children: [/* @__PURE__ */ k(C, { size: 14 }), c("devportal.view", "View")]
352
- }), /* @__PURE__ */ A("button", {
352
+ children: [/* @__PURE__ */ A(w, { size: 14 }), c("devportal.view", "View")]
353
+ }), /* @__PURE__ */ j("button", {
353
354
  onClick: () => u((e) => !e),
354
355
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
355
- children: [k(l ? b : y, { size: 14 }), c("devportal.review", "Review")]
356
+ children: [A(l ? x : b, { size: 14 }), c("devportal.review", "Review")]
356
357
  })]
357
358
  })
358
359
  ]
359
- }), l && /* @__PURE__ */ k("div", {
360
+ }), l && /* @__PURE__ */ A("div", {
360
361
  className: "border-t bg-bg-sunken/30 p-4 space-y-4",
361
- children: d.map((e) => /* @__PURE__ */ k(I, {
362
+ children: d.map((e) => /* @__PURE__ */ A(L, {
362
363
  version: e,
363
364
  appId: t.id,
364
365
  appType: t.appType,
@@ -369,27 +370,27 @@ var M = {
369
370
  }, e.id))
370
371
  })]
371
372
  });
372
- }, I = ({ version: e, appId: t, appType: n, onApprove: r, onReject: i, processing: a, tr: o }) => {
373
- let [s, c] = g(""), l = m(h.APP_APPROVE), u = m(h.APP_REJECT);
374
- return /* @__PURE__ */ A("div", {
373
+ }, L = ({ version: e, appId: t, appType: n, onApprove: r, onReject: i, processing: a, tr: o }) => {
374
+ let [s, c] = _(""), l = h(g.APP_APPROVE), u = h(g.APP_REJECT);
375
+ return /* @__PURE__ */ j("div", {
375
376
  className: "rounded-md border bg-bg-surface p-4 space-y-3",
376
377
  children: [
377
- /* @__PURE__ */ A("div", {
378
+ /* @__PURE__ */ j("div", {
378
379
  className: "flex items-center gap-3",
379
380
  children: [
380
- /* @__PURE__ */ k(w, {
381
+ /* @__PURE__ */ A(T, {
381
382
  size: 14,
382
383
  className: "text-text-secondary flex-shrink-0"
383
384
  }),
384
- /* @__PURE__ */ k("span", {
385
+ /* @__PURE__ */ A("span", {
385
386
  className: "font-mono font-semibold text-sm",
386
387
  children: e.version
387
388
  }),
388
- e.isLatest && /* @__PURE__ */ k("span", {
389
+ e.isLatest && /* @__PURE__ */ A("span", {
389
390
  className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
390
391
  children: "Latest"
391
392
  }),
392
- /* @__PURE__ */ A("span", {
393
+ /* @__PURE__ */ j("span", {
393
394
  className: "text-xs text-text-secondary ml-auto",
394
395
  children: [
395
396
  o("devportal.submitted", "Submitted"),
@@ -404,27 +405,27 @@ var M = {
404
405
  })
405
406
  ]
406
407
  }),
407
- e.releaseNotes && /* @__PURE__ */ k("p", {
408
+ e.releaseNotes && /* @__PURE__ */ A("p", {
408
409
  className: "text-sm text-text-secondary",
409
410
  children: e.releaseNotes
410
411
  }),
411
- M[n] ? /* @__PURE__ */ k(N, {
412
+ N[n] ? /* @__PURE__ */ A(P, {
412
413
  appType: n,
413
414
  packageUrl: e.packageUrl,
414
415
  packageSize: e.packageSize,
415
416
  tr: o
416
- }) : e.packageUrl && /* @__PURE__ */ k("div", {
417
+ }) : e.packageUrl && /* @__PURE__ */ A("div", {
417
418
  className: "flex flex-wrap gap-2",
418
- children: /* @__PURE__ */ A("a", {
419
+ children: /* @__PURE__ */ j("a", {
419
420
  href: e.packageUrl,
420
421
  download: !0,
421
422
  target: "_blank",
422
423
  rel: "noopener noreferrer",
423
424
  className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-bg-sunken",
424
425
  children: [
425
- /* @__PURE__ */ k(S, { size: 14 }),
426
+ /* @__PURE__ */ A(C, { size: 14 }),
426
427
  o("devportal.downloadPackage", "Download Package"),
427
- e.packageSize && /* @__PURE__ */ A("span", {
428
+ e.packageSize && /* @__PURE__ */ j("span", {
428
429
  className: "text-text-secondary text-xs ml-1",
429
430
  children: [
430
431
  "(",
@@ -435,49 +436,59 @@ var M = {
435
436
  ]
436
437
  })
437
438
  }),
438
- e.manifest && /* @__PURE__ */ k(p, {
439
+ n === "NODE" && /* @__PURE__ */ j("div", {
440
+ className: "space-y-1",
441
+ children: [/* @__PURE__ */ A("p", {
442
+ className: "text-sm font-medium",
443
+ children: o("devportal.packageValidation.title", "Package validation")
444
+ }), /* @__PURE__ */ A(m, {
445
+ metadata: e.metadata,
446
+ defaultExpanded: !0
447
+ })]
448
+ }),
449
+ e.manifest && /* @__PURE__ */ A(p, {
439
450
  manifest: e.manifest,
440
451
  tr: o
441
452
  }),
442
- /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
453
+ /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("label", {
443
454
  className: "text-sm font-medium",
444
455
  children: o("devportal.reviewNotes", "Review Notes")
445
- }), /* @__PURE__ */ k("textarea", {
456
+ }), /* @__PURE__ */ A("textarea", {
446
457
  value: s,
447
458
  onChange: (e) => c(e.target.value),
448
459
  placeholder: o("devportal.reviewNotesPlaceholder", "Add feedback for the developer (required for rejection)..."),
449
460
  rows: 2,
450
461
  className: "mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm ring-offset-background placeholder:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none"
451
462
  })] }),
452
- /* @__PURE__ */ A("div", {
463
+ /* @__PURE__ */ j("div", {
453
464
  className: "flex gap-3",
454
- children: [/* @__PURE__ */ A("button", {
465
+ children: [/* @__PURE__ */ j("button", {
455
466
  onClick: () => r(e.id, t, s),
456
467
  disabled: a || !l.allowed,
457
468
  "aria-disabled": a || !l.allowed,
458
469
  className: "inline-flex items-center gap-2 rounded-md bg-status-success-bg px-4 py-2 text-sm font-medium text-white hover:bg-status-success-bg/90 disabled:opacity-50 disabled:cursor-not-allowed",
459
- children: [a ? /* @__PURE__ */ k(T, {
470
+ children: [a ? /* @__PURE__ */ A(E, {
460
471
  size: 14,
461
472
  className: "animate-spin"
462
- }) : /* @__PURE__ */ k(v, { size: 14 }), o("devportal.approveVersion", "Approve Version")]
463
- }), /* @__PURE__ */ A("button", {
473
+ }) : /* @__PURE__ */ A(y, { size: 14 }), o("devportal.approveVersion", "Approve Version")]
474
+ }), /* @__PURE__ */ j("button", {
464
475
  onClick: () => i(e.id, t, s),
465
476
  disabled: a || !s.trim() || !u.allowed,
466
477
  "aria-disabled": a || !s.trim() || !u.allowed,
467
478
  className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50 disabled:cursor-not-allowed",
468
- children: [a ? /* @__PURE__ */ k(T, {
479
+ children: [a ? /* @__PURE__ */ A(E, {
469
480
  size: 14,
470
481
  className: "animate-spin"
471
- }) : /* @__PURE__ */ k(O, { size: 14 }), o("devportal.rejectVersion", "Reject Version")]
482
+ }) : /* @__PURE__ */ A(k, { size: 14 }), o("devportal.rejectVersion", "Reject Version")]
472
483
  })]
473
484
  })
474
485
  ]
475
486
  });
476
- }, L = () => {
477
- let { t: e } = j(), i = (t, n) => {
487
+ }, R = () => {
488
+ let { t: e } = M(), i = (t, n) => {
478
489
  let r = e(t);
479
490
  return r === t ? n : r;
480
- }, [p, m] = g(""), [y, b] = g(/* @__PURE__ */ new Set()), [S, C] = g(/* @__PURE__ */ new Set()), [E, O] = g(null), [M, N] = g(null), I = (e) => b((t) => new Set(t).add(e)), L = (e) => b((t) => {
491
+ }, [p, m] = _(""), [h, b] = _(/* @__PURE__ */ new Set()), [x, C] = _(/* @__PURE__ */ new Set()), [w, D] = _(null), [k, N] = _(null), P = (e) => b((t) => new Set(t).add(e)), L = (e) => b((t) => {
481
492
  let n = new Set(t);
482
493
  return n.delete(e), n;
483
494
  }), R = (e) => C((t) => new Set(t).add(e)), z = (e) => C((t) => {
@@ -493,7 +504,7 @@ var M = {
493
504
  variables: { limit: 100 },
494
505
  fetchPolicy: "cache-and-network"
495
506
  }), [K] = n(), [q] = s(), [J] = r(), [Y] = c(), X = B?.applications?.edges?.map((e) => e.node) ?? [], Z = W?.applicationsWithPendingVersions?.edges?.map((e) => e.node) ?? [], Q = new Set(Z.map((e) => e.id)), $ = p ? X.filter((e) => e.name.toLowerCase().includes(p.toLowerCase()) || (e.shortDescription ?? "").toLowerCase().includes(p.toLowerCase())) : X, ee = async (e, t) => {
496
- I(e), O(null), N(null);
507
+ P(e), D(null), N(null);
497
508
  try {
498
509
  let n = await K({ variables: {
499
510
  id: e,
@@ -502,13 +513,13 @@ var M = {
502
513
  if (n.error) throw n.error;
503
514
  N(i("devportal.applicationApprovedSuccess", "Application approved successfully.")), await U();
504
515
  } catch (e) {
505
- O(e instanceof Error ? e.message : i("devportal.failedToApproveApplication", "Failed to approve application"));
516
+ D(e instanceof Error ? e.message : i("devportal.failedToApproveApplication", "Failed to approve application"));
506
517
  } finally {
507
518
  L(e);
508
519
  }
509
520
  }, te = async (e, t) => {
510
521
  if (t.trim()) {
511
- I(e), O(null), N(null);
522
+ P(e), D(null), N(null);
512
523
  try {
513
524
  let n = await q({ variables: {
514
525
  id: e,
@@ -517,13 +528,13 @@ var M = {
517
528
  if (n.error) throw n.error;
518
529
  N(i("devportal.applicationRejected", "Application rejected.")), await U();
519
530
  } catch (e) {
520
- O(e instanceof Error ? e.message : i("devportal.failedToRejectApplication", "Failed to reject application"));
531
+ D(e instanceof Error ? e.message : i("devportal.failedToRejectApplication", "Failed to reject application"));
521
532
  } finally {
522
533
  L(e);
523
534
  }
524
535
  }
525
536
  }, ne = async (e, t, n) => {
526
- R(e), O(null), N(null);
537
+ R(e), D(null), N(null);
527
538
  try {
528
539
  let t = await J({ variables: {
529
540
  id: e,
@@ -532,13 +543,13 @@ var M = {
532
543
  if (t.error) throw t.error;
533
544
  N(i("devportal.versionApprovedSuccess", "Version approved and published.")), await G();
534
545
  } catch (e) {
535
- O(e instanceof Error ? e.message : i("devportal.failedToApproveVersion", "Failed to approve version"));
546
+ D(e instanceof Error ? e.message : i("devportal.failedToApproveVersion", "Failed to approve version"));
536
547
  } finally {
537
548
  z(e);
538
549
  }
539
550
  }, re = async (e, t, n) => {
540
551
  if (n.trim()) {
541
- R(e), O(null), N(null);
552
+ R(e), D(null), N(null);
542
553
  try {
543
554
  let t = await Y({ variables: {
544
555
  id: e,
@@ -547,44 +558,44 @@ var M = {
547
558
  if (t.error) throw t.error;
548
559
  N(i("devportal.versionRejectedSuccess", "Version rejected and returned to draft.")), await G();
549
560
  } catch (e) {
550
- O(e instanceof Error ? e.message : i("devportal.failedToRejectVersion", "Failed to reject version"));
561
+ D(e instanceof Error ? e.message : i("devportal.failedToRejectVersion", "Failed to reject version"));
551
562
  } finally {
552
563
  z(e);
553
564
  }
554
565
  }
555
566
  };
556
- return V && !B ? /* @__PURE__ */ k(u, {
567
+ return V && !B ? /* @__PURE__ */ A(u, {
557
568
  title: i("devportal.appReviewQueue", "App Review Queue"),
558
569
  description: i("devportal.appReviewQueueDescription", "Review submitted applications for approval"),
559
- children: /* @__PURE__ */ k("div", {
570
+ children: /* @__PURE__ */ A("div", {
560
571
  className: "flex items-center justify-center py-12",
561
- children: /* @__PURE__ */ k(T, { className: "h-8 w-8 animate-spin text-text-secondary" })
572
+ children: /* @__PURE__ */ A(E, { className: "h-8 w-8 animate-spin text-text-secondary" })
562
573
  })
563
- }) : H ? /* @__PURE__ */ k(u, {
574
+ }) : H ? /* @__PURE__ */ A(u, {
564
575
  title: i("devportal.appReviewQueue", "App Review Queue"),
565
576
  description: i("devportal.appReviewQueueDescription", "Review submitted applications for approval"),
566
- children: /* @__PURE__ */ A("div", {
577
+ children: /* @__PURE__ */ j("div", {
567
578
  className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
568
579
  children: [
569
- /* @__PURE__ */ k(_, { className: "mx-auto h-8 w-8 text-status-error-text" }),
570
- /* @__PURE__ */ k("p", {
580
+ /* @__PURE__ */ A(v, { className: "mx-auto h-8 w-8 text-status-error-text" }),
581
+ /* @__PURE__ */ A("p", {
571
582
  className: "mt-2 text-sm text-text-secondary",
572
583
  children: l(H)
573
584
  }),
574
- /* @__PURE__ */ k("button", {
585
+ /* @__PURE__ */ A("button", {
575
586
  onClick: () => U(),
576
587
  className: "mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
577
588
  children: i("devportal.retry", "Retry")
578
589
  })
579
590
  ]
580
591
  })
581
- }) : /* @__PURE__ */ k(f, {
582
- permission: h.REVIEW_MANAGE,
583
- children: /* @__PURE__ */ A(u, {
592
+ }) : /* @__PURE__ */ A(f, {
593
+ permission: g.REVIEW_MANAGE,
594
+ children: /* @__PURE__ */ j(u, {
584
595
  title: i("devportal.appReviewQueue", "App Review Queue"),
585
596
  description: i("devportal.appReviewQueueFullDescription", "Review submitted applications for approval or rejection"),
586
597
  purpose: i("devportal.appReviewQueuePurpose", "The moderation queue for apps developers have submitted to the marketplace. Open each submission to check its listing, permissions, and behaviour against the guidelines, then approve it to go live or reject it with feedback."),
587
- actions: /* @__PURE__ */ k("button", {
598
+ actions: /* @__PURE__ */ A("button", {
588
599
  onClick: () => {
589
600
  U(), G();
590
601
  },
@@ -592,15 +603,15 @@ var M = {
592
603
  children: i("devportal.refresh", "Refresh")
593
604
  }),
594
605
  children: [
595
- /* @__PURE__ */ A("div", {
606
+ /* @__PURE__ */ j("div", {
596
607
  className: "flex items-center gap-6 rounded-card border border-border-seam bg-bg-surface p-4",
597
608
  children: [
598
- /* @__PURE__ */ A("div", {
609
+ /* @__PURE__ */ j("div", {
599
610
  className: "flex items-center gap-2",
600
- children: [/* @__PURE__ */ k(x, {
611
+ children: [/* @__PURE__ */ A(S, {
601
612
  size: 18,
602
613
  className: "text-status-warning-text"
603
- }), /* @__PURE__ */ A("span", {
614
+ }), /* @__PURE__ */ j("span", {
604
615
  className: "text-sm font-medium",
605
616
  children: [
606
617
  X.length,
@@ -609,12 +620,12 @@ var M = {
609
620
  ]
610
621
  })]
611
622
  }),
612
- Z.length > 0 && /* @__PURE__ */ A("div", {
623
+ Z.length > 0 && /* @__PURE__ */ j("div", {
613
624
  className: "flex items-center gap-2",
614
- children: [/* @__PURE__ */ k(w, {
625
+ children: [/* @__PURE__ */ A(T, {
615
626
  size: 18,
616
627
  className: "text-status-info-text"
617
- }), /* @__PURE__ */ A("span", {
628
+ }), /* @__PURE__ */ j("span", {
618
629
  className: "text-sm font-medium",
619
630
  children: [
620
631
  Z.length,
@@ -623,29 +634,29 @@ var M = {
623
634
  ]
624
635
  })]
625
636
  }),
626
- (y.size > 0 || S.size > 0) && /* @__PURE__ */ A("div", {
637
+ (h.size > 0 || x.size > 0) && /* @__PURE__ */ j("div", {
627
638
  className: "flex items-center gap-2 text-sm text-text-secondary",
628
- children: [/* @__PURE__ */ k(T, {
639
+ children: [/* @__PURE__ */ A(E, {
629
640
  size: 14,
630
641
  className: "animate-spin"
631
642
  }), i("devportal.processing", "Processing...")]
632
643
  })
633
644
  ]
634
645
  }),
635
- M && /* @__PURE__ */ A("div", {
646
+ k && /* @__PURE__ */ j("div", {
636
647
  className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
637
- children: [/* @__PURE__ */ k(v, { size: 16 }), M]
648
+ children: [/* @__PURE__ */ A(y, { size: 16 }), k]
638
649
  }),
639
- E && /* @__PURE__ */ A("div", {
650
+ w && /* @__PURE__ */ j("div", {
640
651
  className: "flex items-center gap-2 rounded-lg border border-status-error-border/50 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
641
- children: [/* @__PURE__ */ k(_, { size: 16 }), E]
652
+ children: [/* @__PURE__ */ A(v, { size: 16 }), w]
642
653
  }),
643
- X.length > 0 && /* @__PURE__ */ A("div", {
654
+ X.length > 0 && /* @__PURE__ */ j("div", {
644
655
  className: "relative max-w-sm",
645
- children: [/* @__PURE__ */ k(D, {
656
+ children: [/* @__PURE__ */ A(O, {
646
657
  size: 14,
647
658
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
648
- }), /* @__PURE__ */ k("input", {
659
+ }), /* @__PURE__ */ A("input", {
649
660
  type: "text",
650
661
  placeholder: i("devportal.searchSubmittedApps", "Search submitted apps..."),
651
662
  value: p,
@@ -653,38 +664,38 @@ var M = {
653
664
  className: "w-full rounded-md border bg-bg-surface pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
654
665
  })]
655
666
  }),
656
- /* @__PURE__ */ k(d, {
667
+ /* @__PURE__ */ A(d, {
657
668
  title: i("devportal.newAppSubmissions", "New App Submissions"),
658
- children: $.length === 0 ? /* @__PURE__ */ k(t, {
669
+ children: $.length === 0 ? /* @__PURE__ */ A(t, {
659
670
  illustration: "empty-data",
660
- icon: /* @__PURE__ */ k(v, { size: 32 }),
671
+ icon: /* @__PURE__ */ A(y, { size: 32 }),
661
672
  title: i("devportal.noAppsPendingReview", "No apps pending review"),
662
673
  description: p ? i("devportal.noAppsMatchSearch", "No apps match your search") : i("devportal.allApplicationsReviewed", "All submitted applications have been reviewed")
663
- }) : /* @__PURE__ */ k("div", {
674
+ }) : /* @__PURE__ */ A("div", {
664
675
  className: "space-y-3",
665
- children: $.map((e) => /* @__PURE__ */ k(P, {
676
+ children: $.map((e) => /* @__PURE__ */ A(F, {
666
677
  app: e,
667
678
  onApprove: ee,
668
679
  onReject: te,
669
- processing: y.has(e.id),
680
+ processing: h.has(e.id),
670
681
  hasPendingVersions: Q.has(e.id)
671
682
  }, e.id))
672
683
  })
673
684
  }),
674
- /* @__PURE__ */ k(d, {
685
+ /* @__PURE__ */ A(d, {
675
686
  title: i("devportal.versionUpdates", "Version Updates (Published Apps)"),
676
- children: Z.length === 0 ? /* @__PURE__ */ k(t, {
687
+ children: Z.length === 0 ? /* @__PURE__ */ A(t, {
677
688
  illustration: "empty-data",
678
- icon: /* @__PURE__ */ k(w, { size: 32 }),
689
+ icon: /* @__PURE__ */ A(T, { size: 32 }),
679
690
  title: i("devportal.noPendingVersions", "No pending version updates"),
680
691
  description: i("devportal.allVersionsReviewed", "All version updates from published apps have been reviewed")
681
- }) : /* @__PURE__ */ k("div", {
692
+ }) : /* @__PURE__ */ A("div", {
682
693
  className: "space-y-3",
683
- children: Z.map((e) => /* @__PURE__ */ k(F, {
694
+ children: Z.map((e) => /* @__PURE__ */ A(I, {
684
695
  app: e,
685
696
  onApproveVersion: ne,
686
697
  onRejectVersion: re,
687
- processingVersionIds: S
698
+ processingVersionIds: x
688
699
  }, e.id))
689
700
  })
690
701
  })
@@ -693,6 +704,6 @@ var M = {
693
704
  });
694
705
  };
695
706
  //#endregion
696
- export { L as AdminReviewPage };
707
+ export { R as AdminReviewPage };
697
708
 
698
709
  //# sourceMappingURL=AdminReviewPage.js.map