@burdenoff/microfe-devportal 2026.623.2 → 2026.623.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.
@@ -18,11 +18,11 @@ import { useDevportalPermission as ne } from "../hooks/usePermission.js";
18
18
  import { usePackageUpload as j } from "../hooks/usePackageUpload.js";
19
19
  import { useCallback as M, useEffect as re, useMemo as N, useRef as P, useState as F } from "react";
20
20
  import { useI18n as I } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertCircle as ie, AppWindow as ae, BarChart3 as L, CheckCircle as R, Clock as oe, Download as se, Edit as ce, ExternalLink as z, FlaskConical as le, Info as ue, Key as B, Loader2 as V, MoreHorizontal as de, Plus as H, Power as fe, RefreshCw as pe, Shield as U, Store as me, Upload as W, Users as G, Webhook as he, X as K, XCircle as ge } from "lucide-react";
22
- import { useParams as _e } from "react-router-dom";
21
+ import { AlertCircle as ie, AppWindow as ae, BarChart3 as L, CheckCircle as R, Clock as oe, Download as se, Edit as ce, ExternalLink as z, FlaskConical as le, Info as ue, Key as B, Loader2 as V, MoreHorizontal as de, Plus as H, Power as fe, RefreshCw as pe, SendHorizontal as me, Shield as U, Store as he, Upload as W, Users as G, Webhook as ge, X as K, XCircle as _e } from "lucide-react";
22
+ import { useParams as ve } from "react-router-dom";
23
23
  import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
24
24
  //#region src/devportal/pages/ApplicationDetailPage.tsx
25
- function ve(e) {
25
+ function ye(e) {
26
26
  return e ? {
27
27
  id: e.id,
28
28
  name: e.name,
@@ -58,6 +58,14 @@ function ve(e) {
58
58
  isVerified: e.isVerified,
59
59
  requiresApproval: e.requiresApproval,
60
60
  appId: e.appId || void 0,
61
+ scopes: e.scopes?.map((e) => ({
62
+ id: e.id,
63
+ applicationId: e.applicationId,
64
+ scope: e.scope,
65
+ description: e.description || void 0,
66
+ isRequired: e.isRequired,
67
+ createdAt: e.createdAt
68
+ })),
61
69
  createdAt: e.createdAt,
62
70
  updatedAt: e.updatedAt
63
71
  } : null;
@@ -86,7 +94,7 @@ function X(e) {
86
94
  updatedAt: e.updatedAt
87
95
  };
88
96
  }
89
- function ye(e) {
97
+ function be(e) {
90
98
  return {
91
99
  id: e.id,
92
100
  applicationId: e.applicationId,
@@ -102,7 +110,7 @@ function ye(e) {
102
110
  createdAt: e.createdAt
103
111
  };
104
112
  }
105
- function be(e) {
113
+ function xe(e) {
106
114
  return {
107
115
  id: e.id,
108
116
  appId: e.appId,
@@ -124,7 +132,7 @@ function be(e) {
124
132
  revokedBy: e.revokedBy || void 0
125
133
  };
126
134
  }
127
- var xe = [
135
+ var Se = [
128
136
  {
129
137
  id: "overview",
130
138
  label: "Overview",
@@ -143,7 +151,7 @@ var xe = [
143
151
  {
144
152
  id: "webhooks",
145
153
  label: "Webhooks",
146
- icon: he
154
+ icon: ge
147
155
  },
148
156
  {
149
157
  id: "delegations",
@@ -163,13 +171,13 @@ var xe = [
163
171
  {
164
172
  id: "store-listing",
165
173
  label: "Store Listing",
166
- icon: me
174
+ icon: he
167
175
  }
168
- ], Se = {
176
+ ], Ce = {
169
177
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
170
178
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
171
179
  EXPIRED: "bg-bg-sunken text-text-secondary"
172
- }, Ce = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
180
+ }, we = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
173
181
  className: "flex items-center justify-center gap-3 py-12",
174
182
  children: [/* @__PURE__ */ J(V, {
175
183
  size: 20,
@@ -187,29 +195,29 @@ var xe = [
187
195
  className: "text-sm text-muted-foreground",
188
196
  children: e
189
197
  })]
190
- }), we = () => {
198
+ }), Te = () => {
191
199
  let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = I(), p = (e, t) => {
192
200
  let n = d(e);
193
201
  return n === e ? t : n;
194
- }, { allowed: h } = ne(A.APP_UPDATE), { allowed: _ } = ne(A.APP_DELETE), { appId: S } = _e(), [w, T] = F("overview"), [E, D] = F(!1), [O, j] = F(!1), [re, N] = F(null), [P, L] = F(!1), { data: R, loading: se, error: z } = s({
202
+ }, { allowed: h } = ne(A.APP_UPDATE), { allowed: _ } = ne(A.APP_DELETE), { appId: S } = ve(), [w, T] = F("overview"), [E, D] = F(!1), [O, j] = F(!1), [re, N] = F(null), [P, L] = F(!1), { data: R, loading: se, error: z } = s({
195
203
  variables: { id: S },
196
204
  skip: !S
197
- }), [ue, { loading: B }] = f(), [de, { loading: H }] = a(), [U, { loading: me }] = u(), [W, { loading: G }] = m(), { data: he, refetch: K } = l({
205
+ }), [ue, { loading: B }] = f(), [de, { loading: H }] = a(), [U, { loading: he }] = u(), [W, { loading: G }] = m(), { data: ge, refetch: K } = l({
198
206
  variables: {
199
207
  applicationId: S,
200
208
  workspaceId: c ?? void 0
201
209
  },
202
210
  skip: !c || !S,
203
211
  fetchPolicy: "cache-and-network"
204
- }), q = he?.appInstallations?.edges?.[0]?.node ?? null, X = M((e) => {
212
+ }), q = ge?.appInstallations?.edges?.[0]?.node ?? null, X = M((e) => {
205
213
  i?.(`${o}${e}`);
206
- }, [i, o]), ye = M(async () => {
214
+ }, [i, o]), be = M(async () => {
207
215
  let e = R?.application?.appId;
208
216
  if (e) try {
209
217
  let t = (await ue({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
210
218
  t && N(t), D(!1);
211
219
  } catch {}
212
- }, [R?.application?.appId, ue]), be = M(async () => {
220
+ }, [R?.application?.appId, ue]), xe = M(async () => {
213
221
  if (S) try {
214
222
  await de({ variables: { id: S } }), j(!1), X("/apps");
215
223
  } catch {}
@@ -217,7 +225,7 @@ var xe = [
217
225
  S,
218
226
  de,
219
227
  X
220
- ]), Se = M(async () => {
228
+ ]), Ce = M(async () => {
221
229
  if (!(!S || !c)) try {
222
230
  await U({ variables: { input: {
223
231
  applicationId: S,
@@ -225,15 +233,15 @@ var xe = [
225
233
  workspaceId: c,
226
234
  autoUpdate: !1
227
235
  } } }), K(), C("success");
228
- } catch {
229
- C("error");
236
+ } catch (e) {
237
+ console.error("[DevPortal] Test in Workspace failed:", e), C("error");
230
238
  }
231
239
  }, [
232
240
  S,
233
241
  c,
234
242
  U,
235
243
  K
236
- ]), Ce = M(async (e) => {
244
+ ]), we = M(async (e) => {
237
245
  try {
238
246
  await W({ variables: { id: e } }), K(), C("success");
239
247
  } catch {
@@ -263,7 +271,7 @@ var xe = [
263
271
  ]
264
272
  })
265
273
  });
266
- let Z = ve(R?.application);
274
+ let Z = ye(R?.application);
267
275
  return Z ? /* @__PURE__ */ Y(g, {
268
276
  title: Z.name,
269
277
  description: Z.shortDescription,
@@ -284,22 +292,27 @@ var xe = [
284
292
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
285
293
  children: [/* @__PURE__ */ J(oe, { size: 16 }), p("devportal.versions", "Versions")]
286
294
  }),
295
+ Z.status !== "PUBLISHED" && /* @__PURE__ */ Y("button", {
296
+ onClick: () => T("store-listing"),
297
+ className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
298
+ children: [/* @__PURE__ */ J(me, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
299
+ }),
287
300
  q ? /* @__PURE__ */ Y("button", {
288
- onClick: () => void Ce(q.id),
301
+ onClick: () => void we(q.id),
289
302
  disabled: G || !c,
290
303
  title: p("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
291
304
  className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
292
305
  children: [G ? /* @__PURE__ */ J(V, {
293
306
  size: 16,
294
307
  className: "animate-spin"
295
- }) : /* @__PURE__ */ J(ge, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
308
+ }) : /* @__PURE__ */ J(_e, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
296
309
  }) : /* @__PURE__ */ Y("button", {
297
- onClick: () => void Se(),
298
- disabled: me || !c,
310
+ onClick: () => void Ce(),
311
+ disabled: he || !c,
299
312
  "aria-disabled": !c,
300
313
  title: c ? p("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : p("devportal.noWorkspaceContext", "No workspace context available"),
301
314
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
302
- children: [me ? /* @__PURE__ */ J(V, {
315
+ children: [he ? /* @__PURE__ */ J(V, {
303
316
  size: 16,
304
317
  className: "animate-spin"
305
318
  }) : /* @__PURE__ */ J(le, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
@@ -352,7 +365,7 @@ var xe = [
352
365
  className: "-mb-px flex gap-4 overflow-x-auto",
353
366
  role: "tablist",
354
367
  "aria-label": p("devportal.applicationSections", "Application sections"),
355
- children: xe.map((e) => {
368
+ children: Se.map((e) => {
356
369
  let n = e.icon;
357
370
  return /* @__PURE__ */ Y("button", {
358
371
  id: `application-tab-${e.id}`,
@@ -373,34 +386,34 @@ var xe = [
373
386
  "aria-labelledby": `application-tab-${w}`,
374
387
  tabIndex: 0,
375
388
  children: [
376
- w === "overview" && /* @__PURE__ */ J(Ae, { app: Z }),
377
- w === "oauth" && /* @__PURE__ */ J(Te, {
389
+ w === "overview" && /* @__PURE__ */ J(je, { app: Z }),
390
+ w === "oauth" && /* @__PURE__ */ J(Ee, {
378
391
  appId: Z.appId || Z.id,
379
392
  onNavigate: X
380
393
  }),
381
- w === "api-keys" && /* @__PURE__ */ J(Ee, {
394
+ w === "api-keys" && /* @__PURE__ */ J(De, {
382
395
  appId: Z.appId || Z.id,
383
396
  onNavigate: X
384
397
  }),
385
- w === "webhooks" && /* @__PURE__ */ J(De, {
398
+ w === "webhooks" && /* @__PURE__ */ J(Oe, {
386
399
  appId: Z.id,
387
400
  onNavigate: X
388
401
  }),
389
- w === "delegations" && /* @__PURE__ */ J(Oe, {
402
+ w === "delegations" && /* @__PURE__ */ J(ke, {
390
403
  authAppId: Z.appId || void 0,
391
404
  appName: Z.name,
392
405
  onGrantDelegation: () => L(!0),
393
406
  onNavigate: X
394
407
  }),
395
- w === "analytics" && /* @__PURE__ */ J(ke, { appId: Z.id }),
396
- w === "playground" && /* @__PURE__ */ J(Fe, { app: Z }),
397
- w === "store-listing" && /* @__PURE__ */ J(He, { app: Z })
408
+ w === "analytics" && /* @__PURE__ */ J(Ae, { appId: Z.id }),
409
+ w === "playground" && /* @__PURE__ */ J(Ie, { app: Z }),
410
+ w === "store-listing" && /* @__PURE__ */ J(Ue, { app: Z })
398
411
  ]
399
412
  }),
400
413
  /* @__PURE__ */ J(te, {
401
414
  open: E,
402
415
  onOpenChange: D,
403
- onConfirm: ye,
416
+ onConfirm: be,
404
417
  title: p("devportal.rotateAppSecret", "Rotate App Secret"),
405
418
  description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
406
419
  confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
@@ -411,7 +424,7 @@ var xe = [
411
424
  /* @__PURE__ */ J(te, {
412
425
  open: O,
413
426
  onOpenChange: j,
414
- onConfirm: be,
427
+ onConfirm: xe,
415
428
  title: p("devportal.deactivateApplication", "Deactivate Application"),
416
429
  description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
417
430
  confirmLabel: p("devportal.deactivate", "Deactivate"),
@@ -440,7 +453,7 @@ var xe = [
440
453
  description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
441
454
  })
442
455
  });
443
- }, Te = ({ onNavigate: e }) => {
456
+ }, Ee = ({ onNavigate: e }) => {
444
457
  let { t } = I(), n = (e, n) => {
445
458
  let r = t(e);
446
459
  return r === e ? n : r;
@@ -464,7 +477,7 @@ var xe = [
464
477
  })
465
478
  ]
466
479
  });
467
- }, Ee = ({ onNavigate: e }) => {
480
+ }, De = ({ onNavigate: e }) => {
468
481
  let { t } = I(), n = (e, n) => {
469
482
  let r = t(e);
470
483
  return r === e ? n : r;
@@ -488,21 +501,21 @@ var xe = [
488
501
  })
489
502
  ]
490
503
  });
491
- }, De = ({ appId: e, onNavigate: t }) => {
504
+ }, Oe = ({ appId: e, onNavigate: t }) => {
492
505
  let { t: n } = I(), r = (e, t) => {
493
506
  let r = n(e);
494
507
  return r === e ? t : r;
495
508
  }, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
496
- return a ? /* @__PURE__ */ J(Ce, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(Z, { message: o.message }) : /* @__PURE__ */ J(je, {
509
+ return a ? /* @__PURE__ */ J(we, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(Z, { message: o.message }) : /* @__PURE__ */ J(Me, {
497
510
  appId: e,
498
511
  webhooks: (i?.webhooks ?? []).map(X),
499
512
  onNavigate: t
500
513
  });
501
- }, Oe = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
514
+ }, ke = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
502
515
  let { t: o } = I(), s = (e, t) => {
503
516
  let n = o(e);
504
517
  return n === e ? t : n;
505
- }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = F([]), [g, _] = F(!1), [v, y] = F(/* @__PURE__ */ new Set()), [b, x] = F(null), S = N(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(be) : [], [e, c]), C = N(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = N(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = M((e, t) => {
518
+ }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = F([]), [g, _] = F(!1), [v, y] = F(/* @__PURE__ */ new Set()), [b, x] = F(null), S = N(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(xe) : [], [e, c]), C = N(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = N(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = M((e, t) => {
506
519
  y((n) => {
507
520
  let r = new Set(n);
508
521
  return t ? r.add(e) : r.delete(e), r;
@@ -528,7 +541,7 @@ var xe = [
528
541
  _(!1);
529
542
  }
530
543
  }, [p, f]);
531
- return e ? l ? /* @__PURE__ */ J(Ce, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(Z, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
544
+ return e ? l ? /* @__PURE__ */ J(we, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(Z, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
532
545
  b && /* @__PURE__ */ J("div", {
533
546
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
534
547
  children: /* @__PURE__ */ Y("div", {
@@ -540,7 +553,7 @@ var xe = [
540
553
  })]
541
554
  })
542
555
  }),
543
- /* @__PURE__ */ J(Me, {
556
+ /* @__PURE__ */ J(Ne, {
544
557
  appName: t,
545
558
  delegations: S,
546
559
  onGrantDelegation: n,
@@ -578,7 +591,7 @@ var xe = [
578
591
  children: [/* @__PURE__ */ J(z, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
579
592
  })
580
593
  });
581
- }, ke = ({ appId: e }) => {
594
+ }, Ae = ({ appId: e }) => {
582
595
  let { t } = I(), n = (e, n) => {
583
596
  let r = t(e);
584
597
  return r === e ? n : r;
@@ -591,8 +604,8 @@ var xe = [
591
604
  }, [r]).toISOString(),
592
605
  endDate: r.toISOString()
593
606
  } });
594
- return a ? /* @__PURE__ */ J(Ce, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(Z, { message: s.message }) : /* @__PURE__ */ J(Ne, { analytics: (i?.applicationAnalytics ?? []).map(ye) });
595
- }, Ae = ({ app: e }) => {
607
+ return a ? /* @__PURE__ */ J(we, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(Z, { message: s.message }) : /* @__PURE__ */ J(Pe, { analytics: (i?.applicationAnalytics ?? []).map(be) });
608
+ }, je = ({ app: e }) => {
596
609
  let { t } = I(), n = (e, n) => {
597
610
  let r = t(e);
598
611
  return r === e ? n : r;
@@ -730,7 +743,7 @@ var xe = [
730
743
  })]
731
744
  })]
732
745
  });
733
- }, je = ({ appId: e, webhooks: t, onNavigate: n }) => {
746
+ }, Me = ({ appId: e, webhooks: t, onNavigate: n }) => {
734
747
  let { t: i } = I(), a = (e, t) => {
735
748
  let n = i(e);
736
749
  return n === e ? t : n;
@@ -831,7 +844,7 @@ var xe = [
831
844
  ]
832
845
  }, t.id))
833
846
  }) : /* @__PURE__ */ J(r, {
834
- icon: /* @__PURE__ */ J(he, { size: 32 }),
847
+ icon: /* @__PURE__ */ J(ge, { size: 32 }),
835
848
  title: a("devportal.noWebhooks", "No webhooks"),
836
849
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
837
850
  action: /* @__PURE__ */ Y("button", {
@@ -841,7 +854,7 @@ var xe = [
841
854
  })
842
855
  })]
843
856
  });
844
- }, Me = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
857
+ }, Ne = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
845
858
  let { t: p } = I(), m = (e, t) => {
846
859
  let n = p(e);
847
860
  return n === e ? t : n;
@@ -943,7 +956,7 @@ var xe = [
943
956
  className: "font-medium",
944
957
  children: ["Delegation #", e.id.slice(0, 8)]
945
958
  }), /* @__PURE__ */ J("span", {
946
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", Se[e.status]),
959
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", Ce[e.status]),
947
960
  children: e.status
948
961
  })]
949
962
  }), /* @__PURE__ */ Y("p", {
@@ -961,7 +974,7 @@ var xe = [
961
974
  }), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
962
975
  onClick: () => a(e.id),
963
976
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
964
- children: [/* @__PURE__ */ J(ge, { size: 14 }), m("devportal.revoke", "Revoke")]
977
+ children: [/* @__PURE__ */ J(_e, { size: 14 }), m("devportal.revoke", "Revoke")]
965
978
  })]
966
979
  }),
967
980
  /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
@@ -1006,7 +1019,7 @@ var xe = [
1006
1019
  e.revokedAt && /* @__PURE__ */ Y("span", {
1007
1020
  className: "flex items-center gap-1",
1008
1021
  children: [
1009
- /* @__PURE__ */ J(ge, {
1022
+ /* @__PURE__ */ J(_e, {
1010
1023
  size: 12,
1011
1024
  className: "text-status-error-text"
1012
1025
  }),
@@ -1031,7 +1044,7 @@ var xe = [
1031
1044
  })
1032
1045
  ]
1033
1046
  });
1034
- }, Ne = ({ analytics: e }) => {
1047
+ }, Pe = ({ analytics: e }) => {
1035
1048
  let { t } = I(), n = (e, n) => {
1036
1049
  let r = t(e);
1037
1050
  return r === e ? n : r;
@@ -1111,11 +1124,11 @@ var xe = [
1111
1124
  })
1112
1125
  })]
1113
1126
  });
1114
- }, Pe = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Fe = ({ app: t }) => {
1127
+ }, Fe = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Ie = ({ app: t }) => {
1115
1128
  let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = I(), o = (e, t) => {
1116
1129
  let n = a(e);
1117
1130
  return n === e ? t : n;
1118
- }, [s, c] = F(Pe), [l, u] = F("{}"), [d, f] = F(""), [p, m] = F(!1), [h, g] = F(`${n || "http://localhost:4000"}/global/graphql`), [_, v] = F(i || ""), [y, b] = F(!1), x = M(async () => {
1131
+ }, [s, c] = F(Fe), [l, u] = F("{}"), [d, f] = F(""), [p, m] = F(!1), [h, g] = F(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = F(i || ""), [y, b] = F(!1), x = M(async () => {
1119
1132
  m(!0), f("");
1120
1133
  try {
1121
1134
  let e = {};
@@ -1234,10 +1247,10 @@ var xe = [
1234
1247
  className: "rounded-md border px-3 py-2 text-sm bg-background",
1235
1248
  value: h,
1236
1249
  children: [/* @__PURE__ */ J("option", {
1237
- value: `${n || "http://localhost:4000"}/global/graphql`,
1250
+ value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
1238
1251
  children: o("devportal.globalGateway", "Global Gateway")
1239
1252
  }), /* @__PURE__ */ J("option", {
1240
- value: `${r || "http://localhost:4003"}/workspaces/graphql`,
1253
+ value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
1241
1254
  children: o("devportal.workspaceGateway", "Workspace Gateway")
1242
1255
  })]
1243
1256
  })]
@@ -1290,7 +1303,7 @@ var xe = [
1290
1303
  })] })
1291
1304
  ]
1292
1305
  });
1293
- }, Ie = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
1306
+ }, Le = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
1294
1307
  let d = P(null), f = M(async (e) => {
1295
1308
  try {
1296
1309
  r((await s(e)).downloadUrl);
@@ -1364,7 +1377,7 @@ var xe = [
1364
1377
  })
1365
1378
  ]
1366
1379
  });
1367
- }, Le = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1380
+ }, Re = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1368
1381
  let s = P(null), c = M(async (t) => {
1369
1382
  try {
1370
1383
  let i = await r(t);
@@ -1431,13 +1444,13 @@ var xe = [
1431
1444
  })
1432
1445
  ]
1433
1446
  });
1434
- }, Re = new Set(["workflow", "template"]), ze = [{
1447
+ }, ze = new Set(["workflow", "template"]), Be = [{
1435
1448
  value: "FREE",
1436
1449
  label: "Free"
1437
1450
  }, {
1438
1451
  value: "PAID",
1439
1452
  label: "Paid"
1440
- }], Be = [
1453
+ }], Ve = [
1441
1454
  {
1442
1455
  value: "agent",
1443
1456
  label: "Agent"
@@ -1507,7 +1520,7 @@ var xe = [
1507
1520
  label: "Component"
1508
1521
  }
1509
1522
  ];
1510
- function Ve(e) {
1523
+ function He(e) {
1511
1524
  let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = e.pricingDetails ?? {}, s = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
1512
1525
  return {
1513
1526
  iconUrl: e.iconUrl ?? "",
@@ -1536,15 +1549,15 @@ function Ve(e) {
1536
1549
  manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
1537
1550
  };
1538
1551
  }
1539
- var He = ({ app: n }) => {
1552
+ var Ue = ({ app: n }) => {
1540
1553
  let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o } = e(), { t: s } = I(), c = (e, t) => {
1541
1554
  let n = s(e);
1542
1555
  return n === e ? t : n;
1543
- }, [l, u] = F(() => Ve(n)), [d, f] = F(!1), [m, g] = F(!1), v = P(n);
1556
+ }, [l, u] = F(() => He(n)), [d, f] = F(!1), [m, g] = F(!1), v = P(n);
1544
1557
  v.current = n;
1545
1558
  let [y] = h(), [b, { loading: x }] = p();
1546
1559
  re(() => {
1547
- u(Ve(v.current));
1560
+ u(He(v.current));
1548
1561
  }, [n.id]);
1549
1562
  let S = (e, t) => {
1550
1563
  u((n) => ({
@@ -1554,7 +1567,7 @@ var He = ({ app: n }) => {
1554
1567
  }, ee = async () => {
1555
1568
  f(!0);
1556
1569
  try {
1557
- let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Re.has(l.manifestItemType), i = n.manifest ?? {}, a = {
1570
+ let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = ze.has(l.manifestItemType), i = n.manifest ?? {}, a = {
1558
1571
  manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1559
1572
  itemType: l.manifestItemType || void 0,
1560
1573
  identity: {
@@ -1603,7 +1616,7 @@ var He = ({ app: n }) => {
1603
1616
  } catch {
1604
1617
  C("error");
1605
1618
  }
1606
- }, T = P(null), te = P(null), { upload: k, uploading: A, progress: ne, error: N } = j(r, i, a, o), { upload: ae, uploading: L, progress: ce, error: z } = j(r, i, a, o, "/DevPortal/Assets"), { upload: le, uploading: B, progress: de, error: H } = j(r, i, a, o, "/DevPortal/Assets"), { upload: fe, uploading: pe, progress: U, error: G } = j(r, i, a, o, "/DevPortal/Assets"), he = M(async (e) => {
1619
+ }, T = P(null), te = P(null), { upload: k, uploading: A, progress: ne, error: N } = j(r, i, a, o), { upload: ae, uploading: L, progress: ce, error: z } = j(r, i, a, o, "/DevPortal/Assets"), { upload: le, uploading: B, progress: de, error: H } = j(r, i, a, o, "/DevPortal/Assets"), { upload: fe, uploading: pe, progress: me, error: U } = j(r, i, a, o, "/DevPortal/Assets"), G = M(async (e) => {
1607
1620
  let t = e.target.files?.[0];
1608
1621
  if (t) {
1609
1622
  e.target.value = "";
@@ -1615,7 +1628,7 @@ var He = ({ app: n }) => {
1615
1628
  }));
1616
1629
  } catch {}
1617
1630
  }
1618
- }, [k]), K = M(async (e) => {
1631
+ }, [k]), ge = M(async (e) => {
1619
1632
  e.preventDefault(), g(!1);
1620
1633
  let t = e.dataTransfer.files?.[0];
1621
1634
  if (t) try {
@@ -1625,7 +1638,7 @@ var He = ({ app: n }) => {
1625
1638
  manifestRegistryUrl: e.downloadUrl
1626
1639
  }));
1627
1640
  } catch {}
1628
- }, [k]), ge = M((e) => {
1641
+ }, [k]), K = M((e) => {
1629
1642
  let t = e.target.files?.[0];
1630
1643
  if (!t) return;
1631
1644
  let n = new FileReader();
@@ -1645,7 +1658,7 @@ var He = ({ app: n }) => {
1645
1658
  } catch {}
1646
1659
  }, n.readAsText(t), e.target.value = "";
1647
1660
  }, []), _e = M(() => {
1648
- let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Re.has(l.manifestItemType), r = {
1661
+ let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = ze.has(l.manifestItemType), r = {
1649
1662
  manifestVersion: "1.0",
1650
1663
  itemType: l.manifestItemType || void 0,
1651
1664
  identity: {
@@ -1660,7 +1673,7 @@ var He = ({ app: n }) => {
1660
1673
  compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1661
1674
  }, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1662
1675
  o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1663
- }, [n.slug, l]), ve = Re.has(l.manifestItemType), X = l.manifestInstallType === "builtin", ye = l.pricingType !== "FREE", be = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1676
+ }, [n.slug, l]), ve = ze.has(l.manifestItemType), ye = l.manifestInstallType === "builtin", X = l.pricingType !== "FREE", be = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1664
1677
  n.status;
1665
1678
  let xe = n.status === "SUBMITTED", Se = n.status === "PUBLISHED";
1666
1679
  return /* @__PURE__ */ Y("div", {
@@ -1734,9 +1747,9 @@ var He = ({ app: n }) => {
1734
1747
  value: l.manifestItemType,
1735
1748
  onChange: (e) => {
1736
1749
  let t = e.target.value;
1737
- S("manifestItemType", t), Re.has(t) ? S("manifestInstallType", "json") : l.manifestInstallType === "json" && S("manifestInstallType", "zip");
1750
+ S("manifestItemType", t), ze.has(t) ? S("manifestInstallType", "json") : l.manifestInstallType === "json" && S("manifestInstallType", "zip");
1738
1751
  },
1739
- options: Be,
1752
+ options: Ve,
1740
1753
  placeholder: c("devportal.selectItemType", "Select item type…"),
1741
1754
  hint: c("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
1742
1755
  }),
@@ -1775,7 +1788,7 @@ var He = ({ app: n }) => {
1775
1788
  className: "flex items-center gap-2 text-sm cursor-pointer select-none",
1776
1789
  children: [/* @__PURE__ */ J("input", {
1777
1790
  type: "checkbox",
1778
- checked: X,
1791
+ checked: ye,
1779
1792
  onChange: (e) => S("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1780
1793
  className: "h-4 w-4 rounded border-border accent-primary"
1781
1794
  }), /* @__PURE__ */ J("span", {
@@ -1784,7 +1797,7 @@ var He = ({ app: n }) => {
1784
1797
  })]
1785
1798
  })]
1786
1799
  }),
1787
- !X && /* @__PURE__ */ Y(q, { children: [
1800
+ !ye && /* @__PURE__ */ Y(q, { children: [
1788
1801
  /* @__PURE__ */ Y("div", {
1789
1802
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1790
1803
  children: [/* @__PURE__ */ J(ue, {
@@ -1804,7 +1817,7 @@ var He = ({ app: n }) => {
1804
1817
  e.preventDefault(), g(!0);
1805
1818
  },
1806
1819
  onDragLeave: () => g(!1),
1807
- onDrop: (e) => void K(e),
1820
+ onDrop: (e) => void ge(e),
1808
1821
  onClick: () => !A && te.current?.click(),
1809
1822
  className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", m ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", A && "pointer-events-none opacity-75"),
1810
1823
  children: [/* @__PURE__ */ J("input", {
@@ -1812,7 +1825,7 @@ var He = ({ app: n }) => {
1812
1825
  type: "file",
1813
1826
  accept: ".zip,application/zip,application/x-zip-compressed",
1814
1827
  className: "hidden",
1815
- onChange: (e) => void he(e)
1828
+ onChange: (e) => void G(e)
1816
1829
  }), A ? /* @__PURE__ */ Y(q, { children: [
1817
1830
  /* @__PURE__ */ J(V, {
1818
1831
  size: 28,
@@ -1862,7 +1875,7 @@ var He = ({ app: n }) => {
1862
1875
  children: N
1863
1876
  })
1864
1877
  ] }),
1865
- X && /* @__PURE__ */ Y("div", {
1878
+ ye && /* @__PURE__ */ Y("div", {
1866
1879
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1867
1880
  children: [/* @__PURE__ */ J(ue, {
1868
1881
  size: 15,
@@ -1879,7 +1892,7 @@ var He = ({ app: n }) => {
1879
1892
  type: "file",
1880
1893
  accept: ".json,application/json",
1881
1894
  className: "hidden",
1882
- onChange: ge
1895
+ onChange: K
1883
1896
  }),
1884
1897
  /* @__PURE__ */ J("span", {
1885
1898
  className: "text-xs text-text-secondary mr-1",
@@ -1914,7 +1927,7 @@ var He = ({ app: n }) => {
1914
1927
  children: [
1915
1928
  /* @__PURE__ */ Y("div", {
1916
1929
  className: "grid gap-5 sm:grid-cols-2",
1917
- children: [/* @__PURE__ */ J(Ie, {
1930
+ children: [/* @__PURE__ */ J(Le, {
1918
1931
  label: c("devportal.iconUrl", "Icon"),
1919
1932
  value: l.iconUrl,
1920
1933
  onChange: (e) => S("iconUrl", e),
@@ -1924,7 +1937,7 @@ var He = ({ app: n }) => {
1924
1937
  uploading: L,
1925
1938
  progress: ce,
1926
1939
  error: z
1927
- }), /* @__PURE__ */ J(Ie, {
1940
+ }), /* @__PURE__ */ J(Le, {
1928
1941
  label: c("devportal.bannerUrl", "Banner"),
1929
1942
  value: l.bannerUrl,
1930
1943
  onChange: (e) => S("bannerUrl", e),
@@ -1958,13 +1971,13 @@ var He = ({ app: n }) => {
1958
1971
  rows: 5,
1959
1972
  hint: c("devportal.fullDescHint", "Markdown supported")
1960
1973
  }),
1961
- /* @__PURE__ */ J(Le, {
1974
+ /* @__PURE__ */ J(Re, {
1962
1975
  urls: l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
1963
1976
  onChange: (e) => S("screenshotsText", e.join("\n")),
1964
1977
  upload: fe,
1965
1978
  uploading: pe,
1966
- progress: U,
1967
- error: G
1979
+ progress: me,
1980
+ error: U
1968
1981
  })
1969
1982
  ]
1970
1983
  })
@@ -2026,13 +2039,13 @@ var He = ({ app: n }) => {
2026
2039
  children: c("devportal.pricingType", "Pricing Type")
2027
2040
  }), /* @__PURE__ */ J("div", {
2028
2041
  className: "flex flex-wrap gap-2",
2029
- children: ze.map((e) => /* @__PURE__ */ J("button", {
2042
+ children: Be.map((e) => /* @__PURE__ */ J("button", {
2030
2043
  type: "button",
2031
2044
  onClick: () => S("pricingType", e.value),
2032
2045
  className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
2033
2046
  children: e.label
2034
2047
  }, e.value))
2035
- })] }), ye && /* @__PURE__ */ Y("div", {
2048
+ })] }), X && /* @__PURE__ */ Y("div", {
2036
2049
  className: "grid gap-4 sm:grid-cols-2",
2037
2050
  children: [/* @__PURE__ */ J(E, {
2038
2051
  label: c("devportal.price", "Price"),
@@ -2059,7 +2072,7 @@ var He = ({ app: n }) => {
2059
2072
  children: d ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
2060
2073
  size: 16,
2061
2074
  className: "animate-spin"
2062
- }), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(me, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
2075
+ }), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(he, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
2063
2076
  }), !Se && /* @__PURE__ */ J("button", {
2064
2077
  type: "button",
2065
2078
  onClick: () => void w(),
@@ -2108,6 +2121,6 @@ var He = ({ app: n }) => {
2108
2121
  children: [/* @__PURE__ */ J(z, { size: 14 }), e]
2109
2122
  });
2110
2123
  //#endregion
2111
- export { we as ApplicationDetailPage };
2124
+ export { Te as ApplicationDetailPage };
2112
2125
 
2113
2126
  //# sourceMappingURL=ApplicationDetailPage.js.map