@burdenoff/microfe-devportal 2026.703.1 → 2026.703.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,9 +16,9 @@ import { GrantDelegationModal as re } from "../components/GrantDelegationModal.j
|
|
|
16
16
|
import { DEVPORTAL_PERMISSIONS as ie } from "../constants/permissions.js";
|
|
17
17
|
import { useDevportalPermission as ae } from "../hooks/usePermission.js";
|
|
18
18
|
import { usePackageUpload as A } from "../hooks/usePackageUpload.js";
|
|
19
|
-
import { useCallback as j, useEffect as oe, useMemo as M, useRef as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
19
|
+
import { useCallback as j, useEffect as oe, useMemo as M, useRef as N, useState as P } from "react";
|
|
20
|
+
import { useI18n as F } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
+
import { AlertCircle as se, AppWindow as ce, BarChart3 as I, Check as L, CheckCircle as le, ChevronRight as ue, CircleDollarSign as R, Clock as de, Edit as fe, ExternalLink as z, FlaskConical as pe, Gift as me, Info as he, Key as B, Loader2 as V, MoreHorizontal as ge, Package as _e, Plus as H, Power as ve, RefreshCw as ye, SendHorizontal as be, Shield as xe, Store as Se, TrendingUp as Ce, Upload as U, Users as we, Wallet as Te, Webhook as Ee, X as De, XCircle as Oe } from "lucide-react";
|
|
22
22
|
import { useParams as ke } from "react-router-dom";
|
|
23
23
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
24
24
|
import { CTAOverflowMenu as Ae, EmphasisPanel as je, GlassCard as Me } from "@burdenoff/fe-libs/ui";
|
|
@@ -139,12 +139,12 @@ var Ie = [
|
|
|
139
139
|
{
|
|
140
140
|
id: "overview",
|
|
141
141
|
label: "Overview",
|
|
142
|
-
icon:
|
|
142
|
+
icon: ce
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
id: "analytics",
|
|
146
146
|
label: "Analytics",
|
|
147
|
-
icon:
|
|
147
|
+
icon: I
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
id: "store-listing",
|
|
@@ -154,17 +154,17 @@ var Ie = [
|
|
|
154
154
|
{
|
|
155
155
|
id: "versions",
|
|
156
156
|
label: "Versions",
|
|
157
|
-
icon:
|
|
157
|
+
icon: _e
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
id: "pricing",
|
|
161
161
|
label: "Pricing",
|
|
162
|
-
icon:
|
|
162
|
+
icon: R
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
id: "permissions",
|
|
166
166
|
label: "Permissions",
|
|
167
|
-
icon:
|
|
167
|
+
icon: xe
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
id: "webhooks",
|
|
@@ -179,7 +179,7 @@ var Ie = [
|
|
|
179
179
|
{
|
|
180
180
|
id: "playground",
|
|
181
181
|
label: "API Playground",
|
|
182
|
-
icon:
|
|
182
|
+
icon: z
|
|
183
183
|
}
|
|
184
184
|
], Le = {
|
|
185
185
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
@@ -187,7 +187,7 @@ var Ie = [
|
|
|
187
187
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
188
188
|
}, Re = ({ message: e = "Loading..." }) => /* @__PURE__ */ K("div", {
|
|
189
189
|
className: "flex items-center justify-center gap-3 py-12",
|
|
190
|
-
children: [/* @__PURE__ */ G(
|
|
190
|
+
children: [/* @__PURE__ */ G(V, {
|
|
191
191
|
size: 20,
|
|
192
192
|
className: "animate-spin text-text-secondary"
|
|
193
193
|
}), /* @__PURE__ */ G("p", {
|
|
@@ -196,7 +196,7 @@ var Ie = [
|
|
|
196
196
|
})]
|
|
197
197
|
}), ze = ({ message: e }) => /* @__PURE__ */ K("div", {
|
|
198
198
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
199
|
-
children: [/* @__PURE__ */ G(
|
|
199
|
+
children: [/* @__PURE__ */ G(se, {
|
|
200
200
|
size: 32,
|
|
201
201
|
className: "text-status-error-text"
|
|
202
202
|
}), /* @__PURE__ */ G("p", {
|
|
@@ -204,13 +204,13 @@ var Ie = [
|
|
|
204
204
|
children: e
|
|
205
205
|
})]
|
|
206
206
|
}), Be = () => {
|
|
207
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } =
|
|
207
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = F(), p = (e, t) => {
|
|
208
208
|
let n = u(e);
|
|
209
209
|
return n === e ? t : n;
|
|
210
|
-
}, { allowed: _ } = ae(ie.APP_UPDATE), { allowed: y } = ae(ie.APP_DELETE), { appId: w } = ke(), [E, D] =
|
|
210
|
+
}, { allowed: _ } = ae(ie.APP_UPDATE), { allowed: y } = ae(ie.APP_DELETE), { appId: w } = ke(), [E, D] = P("overview"), [O, k] = P(!1), [te, A] = P(!1), [oe, M] = P(null), [N, I] = P(!1), { data: R, loading: z, error: me, refetch: he } = s({
|
|
211
211
|
variables: { id: w },
|
|
212
212
|
skip: !w
|
|
213
|
-
}), [
|
|
213
|
+
}), [B, { loading: ge }] = m(), [_e, { loading: H }] = a(), [xe, { loading: Ce }] = h(), [U, { loading: we }] = f(), [Te, { loading: Ee }] = g(), { data: De, refetch: je } = d({
|
|
214
214
|
variables: {
|
|
215
215
|
applicationId: w,
|
|
216
216
|
workspaceId: c ?? void 0
|
|
@@ -218,24 +218,24 @@ var Ie = [
|
|
|
218
218
|
skip: !c || !w,
|
|
219
219
|
fetchPolicy: "cache-and-network"
|
|
220
220
|
}), Me = De?.appInstallations?.edges?.[0]?.node ?? null, { data: Pe } = l({
|
|
221
|
-
variables: { id:
|
|
222
|
-
skip: !
|
|
221
|
+
variables: { id: R?.application?.developerOrganizationId ?? "" },
|
|
222
|
+
skip: !R?.application?.developerOrganizationId,
|
|
223
223
|
fetchPolicy: "cache-first"
|
|
224
224
|
}), q = j((e) => {
|
|
225
225
|
i?.(`${o}${e}`);
|
|
226
226
|
}, [i, o]), Fe = j(async () => {
|
|
227
|
-
let e =
|
|
227
|
+
let e = R?.application?.appId;
|
|
228
228
|
if (e) try {
|
|
229
|
-
let t = (await
|
|
229
|
+
let t = (await B({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
230
230
|
t && M(t), k(!1);
|
|
231
231
|
} catch {}
|
|
232
|
-
}, [
|
|
232
|
+
}, [R?.application?.appId, B]), Le = j(async () => {
|
|
233
233
|
if (w) try {
|
|
234
|
-
await
|
|
234
|
+
await _e({ variables: { id: w } }), A(!1), q("/apps");
|
|
235
235
|
} catch {}
|
|
236
236
|
}, [
|
|
237
237
|
w,
|
|
238
|
-
|
|
238
|
+
_e,
|
|
239
239
|
q
|
|
240
240
|
]), Re = j(async () => {
|
|
241
241
|
if (!(!w || !c)) try {
|
|
@@ -261,26 +261,26 @@ var Ie = [
|
|
|
261
261
|
}
|
|
262
262
|
}, [Te, je]), Be = j(async () => {
|
|
263
263
|
if (w) try {
|
|
264
|
-
await
|
|
264
|
+
await xe({ variables: { id: w } }), T("success");
|
|
265
265
|
} catch (e) {
|
|
266
266
|
console.error("[DevPortal] Submit failed:", e), T("error");
|
|
267
267
|
} finally {
|
|
268
|
-
|
|
268
|
+
he();
|
|
269
269
|
}
|
|
270
270
|
}, [
|
|
271
271
|
w,
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
xe,
|
|
273
|
+
he
|
|
274
274
|
]);
|
|
275
|
-
if (
|
|
276
|
-
if (
|
|
275
|
+
if (z && !R) return /* @__PURE__ */ G(n, { message: p("devportal.loadingApplication", "Loading application...") });
|
|
276
|
+
if (me) return /* @__PURE__ */ G(v, {
|
|
277
277
|
title: p("devportal.error", "Error"),
|
|
278
278
|
backLink: `${o}/apps`,
|
|
279
279
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
280
280
|
children: /* @__PURE__ */ K("div", {
|
|
281
281
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */ G(
|
|
283
|
+
/* @__PURE__ */ G(se, {
|
|
284
284
|
size: 48,
|
|
285
285
|
className: "text-status-error-text mb-4"
|
|
286
286
|
}),
|
|
@@ -290,27 +290,27 @@ var Ie = [
|
|
|
290
290
|
}),
|
|
291
291
|
/* @__PURE__ */ G("p", {
|
|
292
292
|
className: "text-sm text-text-secondary",
|
|
293
|
-
children:
|
|
293
|
+
children: me.message
|
|
294
294
|
})
|
|
295
295
|
]
|
|
296
296
|
})
|
|
297
297
|
});
|
|
298
|
-
let J = Ne(
|
|
298
|
+
let J = Ne(R?.application);
|
|
299
299
|
if (!J) return /* @__PURE__ */ G(v, {
|
|
300
300
|
title: p("devportal.notFound", "Not Found"),
|
|
301
301
|
backLink: `${o}/apps`,
|
|
302
302
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
303
303
|
children: /* @__PURE__ */ G(r, {
|
|
304
304
|
illustration: "empty-generic",
|
|
305
|
-
icon: /* @__PURE__ */ G(
|
|
305
|
+
icon: /* @__PURE__ */ G(ce, { size: 48 }),
|
|
306
306
|
title: p("devportal.applicationNotFound", "Application not found"),
|
|
307
307
|
description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
308
308
|
})
|
|
309
309
|
});
|
|
310
|
-
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", Ve =
|
|
310
|
+
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", Ve = R?.application?.versions?.totalCount ?? 0, Je = J.pricingType === "PAID", Ye = Pe?.developerOrganization, Xe = Ye?.platformFeeRate ?? .3, Ze = !!Ye?.billingAccountId, $e = J.pricingDetails ?? {}, X = J.pricingType === "FREE" || J.pricingType === "PAID" && typeof $e.price == "number" && $e.price > 0, Z = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED") && (!Y || Ve > 0) && (!Je || Ze) && X, et = Z && J.status !== "PUBLISHED" && J.status !== "SUBMITTED", tt = [
|
|
311
311
|
...Y ? [] : [{
|
|
312
312
|
label: p("devportal.rotateSecret", "Rotate Secret"),
|
|
313
|
-
icon: /* @__PURE__ */ G(
|
|
313
|
+
icon: /* @__PURE__ */ G(ye, { size: 16 }),
|
|
314
314
|
disabled: !J.appId,
|
|
315
315
|
onSelect: () => k(!0)
|
|
316
316
|
}],
|
|
@@ -321,13 +321,13 @@ var Ie = [
|
|
|
321
321
|
onSelect: () => void ze(Me.id)
|
|
322
322
|
}] : [{
|
|
323
323
|
label: p("devportal.testInWorkspace", "Test in Workspace"),
|
|
324
|
-
icon: /* @__PURE__ */ G(
|
|
324
|
+
icon: /* @__PURE__ */ G(pe, { size: 16 }),
|
|
325
325
|
disabled: we || !c,
|
|
326
326
|
onSelect: () => void Re()
|
|
327
327
|
}],
|
|
328
328
|
{
|
|
329
329
|
label: p("devportal.deactivate", "Deactivate"),
|
|
330
|
-
icon: /* @__PURE__ */ G(
|
|
330
|
+
icon: /* @__PURE__ */ G(ve, { size: 16 }),
|
|
331
331
|
intent: "destructive",
|
|
332
332
|
disabled: !y,
|
|
333
333
|
onSelect: () => A(!0)
|
|
@@ -343,7 +343,7 @@ var Ie = [
|
|
|
343
343
|
className: "flex items-center gap-2",
|
|
344
344
|
children: [J.status === "SUBMITTED" ? /* @__PURE__ */ K("div", {
|
|
345
345
|
className: "flex items-center gap-1.5 rounded-full border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-1.5 text-xs font-medium text-status-warning-text",
|
|
346
|
-
children: [/* @__PURE__ */ G(
|
|
346
|
+
children: [/* @__PURE__ */ G(de, { size: 13 }), p("devportal.underReview", "Under Review")]
|
|
347
347
|
}) : J.status === "PUBLISHED" ? null : /* @__PURE__ */ G("button", {
|
|
348
348
|
type: "button",
|
|
349
349
|
onClick: () => void Be(),
|
|
@@ -358,14 +358,14 @@ var Ie = [
|
|
|
358
358
|
Je && !Ze && "Link a billing account to receive payments"
|
|
359
359
|
].filter(Boolean).join(" · "),
|
|
360
360
|
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", et && !Ce ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 cursor-pointer" : "cursor-not-allowed bg-bg-muted text-text-tertiary ring-1 ring-border-subtle"),
|
|
361
|
-
children: Ce ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
361
|
+
children: Ce ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(V, {
|
|
362
362
|
size: 15,
|
|
363
363
|
className: "animate-spin"
|
|
364
|
-
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
364
|
+
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(be, { size: 15 }), p("devportal.submitForReview", "Submit for Review")] })
|
|
365
365
|
}), /* @__PURE__ */ G(Ae, {
|
|
366
366
|
primary: {
|
|
367
367
|
label: p("devportal.editApp", "Edit App"),
|
|
368
|
-
icon: /* @__PURE__ */ G(
|
|
368
|
+
icon: /* @__PURE__ */ G(fe, { size: 16 }),
|
|
369
369
|
disabled: !_,
|
|
370
370
|
onSelect: () => q(`/apps/${J.id}/edit`)
|
|
371
371
|
},
|
|
@@ -400,7 +400,7 @@ var Ie = [
|
|
|
400
400
|
}),
|
|
401
401
|
J.status === "SUBMITTED" && /* @__PURE__ */ K("div", {
|
|
402
402
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
403
|
-
children: [/* @__PURE__ */ G(
|
|
403
|
+
children: [/* @__PURE__ */ G(de, {
|
|
404
404
|
size: 18,
|
|
405
405
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
406
406
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -448,7 +448,7 @@ var Ie = [
|
|
|
448
448
|
}),
|
|
449
449
|
J.status === "PUBLISHED" && /* @__PURE__ */ K("div", {
|
|
450
450
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
451
|
-
children: [/* @__PURE__ */ G(
|
|
451
|
+
children: [/* @__PURE__ */ G(le, {
|
|
452
452
|
size: 18,
|
|
453
453
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
454
454
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -535,7 +535,7 @@ var Ie = [
|
|
|
535
535
|
children: [
|
|
536
536
|
/* @__PURE__ */ G("div", {
|
|
537
537
|
className: t("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-bold", e.done ? "bg-status-success-bg text-status-success-text" : "border-2 border-border-subtle bg-bg-sunken text-text-secondary"),
|
|
538
|
-
children: e.done ? /* @__PURE__ */ G(
|
|
538
|
+
children: e.done ? /* @__PURE__ */ G(L, { size: 13 }) : n + 1
|
|
539
539
|
}),
|
|
540
540
|
/* @__PURE__ */ K("div", {
|
|
541
541
|
className: "flex-1 min-w-0",
|
|
@@ -547,7 +547,7 @@ var Ie = [
|
|
|
547
547
|
children: e.hint
|
|
548
548
|
})]
|
|
549
549
|
}),
|
|
550
|
-
e.onClick && !e.done && /* @__PURE__ */ G(
|
|
550
|
+
e.onClick && !e.done && /* @__PURE__ */ G(ue, {
|
|
551
551
|
size: 16,
|
|
552
552
|
className: "flex-shrink-0 text-text-secondary"
|
|
553
553
|
})
|
|
@@ -592,14 +592,14 @@ var Ie = [
|
|
|
592
592
|
E === "delegations" && /* @__PURE__ */ G(Ge, {
|
|
593
593
|
authAppId: J.appId || void 0,
|
|
594
594
|
appName: J.name,
|
|
595
|
-
onGrantDelegation: () =>
|
|
595
|
+
onGrantDelegation: () => I(!0),
|
|
596
596
|
onNavigate: q
|
|
597
597
|
}),
|
|
598
598
|
E === "analytics" && /* @__PURE__ */ G(Ke, { appId: J.id }),
|
|
599
599
|
E === "playground" && /* @__PURE__ */ G(Qe, { app: J }),
|
|
600
600
|
E === "store-listing" && /* @__PURE__ */ G(it, {
|
|
601
601
|
app: J,
|
|
602
|
-
versionCount:
|
|
602
|
+
versionCount: R?.application?.versions?.totalCount ?? 0,
|
|
603
603
|
isPackageApp: Y,
|
|
604
604
|
pricingDone: X,
|
|
605
605
|
onNavigateToVersions: Y ? () => D("versions") : void 0,
|
|
@@ -630,7 +630,7 @@ var Ie = [
|
|
|
630
630
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
631
631
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
632
632
|
variant: "warning",
|
|
633
|
-
loading:
|
|
633
|
+
loading: ge
|
|
634
634
|
}),
|
|
635
635
|
/* @__PURE__ */ G(ne, {
|
|
636
636
|
open: te,
|
|
@@ -641,28 +641,28 @@ var Ie = [
|
|
|
641
641
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
642
642
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
643
643
|
variant: "destructive",
|
|
644
|
-
loading:
|
|
644
|
+
loading: H
|
|
645
645
|
}),
|
|
646
646
|
/* @__PURE__ */ G(re, {
|
|
647
|
-
open:
|
|
648
|
-
onOpenChange:
|
|
647
|
+
open: N,
|
|
648
|
+
onOpenChange: I,
|
|
649
649
|
appId: J.appId || "",
|
|
650
650
|
appName: J.name,
|
|
651
651
|
appScopes: J.scopes?.map((e) => e.scope) ?? [],
|
|
652
652
|
onSuccess: () => {
|
|
653
|
-
|
|
653
|
+
I(!1);
|
|
654
654
|
}
|
|
655
655
|
})
|
|
656
656
|
]
|
|
657
657
|
});
|
|
658
658
|
}, J = .01, Y = (e) => e * J, Ve = (e) => Math.round(e / J), He = ({ app: e, platformFeeRate: n, billingAccountLinked: r, onNavigateToRevenue: i, isReadyToSubmit: a = !1 }) => {
|
|
659
|
-
let { t: o } =
|
|
659
|
+
let { t: o } = F(), s = (e, t) => {
|
|
660
660
|
let n = o(e);
|
|
661
661
|
return n === e ? t : n;
|
|
662
|
-
}, c = e.pricingDetails ?? {}, [l, u] =
|
|
662
|
+
}, c = e.pricingDetails ?? {}, [l, u] = P({
|
|
663
663
|
pricingType: e.pricingType ?? "FREE",
|
|
664
664
|
price: typeof c.price == "number" ? String(c.price) : ""
|
|
665
|
-
}), [d, f] =
|
|
665
|
+
}), [d, f] = P(!1), [p] = _(), m = N(e);
|
|
666
666
|
m.current = e, oe(() => {
|
|
667
667
|
let e = m.current.pricingDetails ?? {};
|
|
668
668
|
u({
|
|
@@ -704,7 +704,7 @@ var Ie = [
|
|
|
704
704
|
children: [
|
|
705
705
|
/* @__PURE__ */ K("div", {
|
|
706
706
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
707
|
-
children: [/* @__PURE__ */ G(
|
|
707
|
+
children: [/* @__PURE__ */ G(R, {
|
|
708
708
|
size: 16,
|
|
709
709
|
className: "mt-0.5 shrink-0 text-primary"
|
|
710
710
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -806,7 +806,7 @@ var Ie = [
|
|
|
806
806
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
807
807
|
children: [/* @__PURE__ */ G("div", {
|
|
808
808
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
809
|
-
children: /* @__PURE__ */ G(
|
|
809
|
+
children: /* @__PURE__ */ G(me, {
|
|
810
810
|
size: 18,
|
|
811
811
|
className: "text-status-warning-text"
|
|
812
812
|
})
|
|
@@ -1001,7 +1001,7 @@ var Ie = [
|
|
|
1001
1001
|
}),
|
|
1002
1002
|
!r && /* @__PURE__ */ K("div", {
|
|
1003
1003
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
1004
|
-
children: [/* @__PURE__ */ G(
|
|
1004
|
+
children: [/* @__PURE__ */ G(se, {
|
|
1005
1005
|
size: 16,
|
|
1006
1006
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1007
1007
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -1038,7 +1038,7 @@ var Ie = [
|
|
|
1038
1038
|
children: [
|
|
1039
1039
|
/* @__PURE__ */ K("li", {
|
|
1040
1040
|
className: "flex items-start gap-2",
|
|
1041
|
-
children: [/* @__PURE__ */ G(
|
|
1041
|
+
children: [/* @__PURE__ */ G(L, {
|
|
1042
1042
|
size: 14,
|
|
1043
1043
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1044
1044
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1056,21 +1056,21 @@ var Ie = [
|
|
|
1056
1056
|
}),
|
|
1057
1057
|
/* @__PURE__ */ K("li", {
|
|
1058
1058
|
className: "flex items-start gap-2",
|
|
1059
|
-
children: [/* @__PURE__ */ G(
|
|
1059
|
+
children: [/* @__PURE__ */ G(L, {
|
|
1060
1060
|
size: 14,
|
|
1061
1061
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1062
1062
|
}), /* @__PURE__ */ G("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1063
1063
|
}),
|
|
1064
1064
|
/* @__PURE__ */ K("li", {
|
|
1065
1065
|
className: "flex items-start gap-2",
|
|
1066
|
-
children: [/* @__PURE__ */ G(
|
|
1066
|
+
children: [/* @__PURE__ */ G(L, {
|
|
1067
1067
|
size: 14,
|
|
1068
1068
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1069
1069
|
}), /* @__PURE__ */ G("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1070
1070
|
}),
|
|
1071
1071
|
/* @__PURE__ */ K("li", {
|
|
1072
1072
|
className: "flex items-start gap-2",
|
|
1073
|
-
children: [/* @__PURE__ */ G(
|
|
1073
|
+
children: [/* @__PURE__ */ G(L, {
|
|
1074
1074
|
size: 14,
|
|
1075
1075
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1076
1076
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1097,13 +1097,13 @@ var Ie = [
|
|
|
1097
1097
|
onClick: () => void g(),
|
|
1098
1098
|
disabled: d,
|
|
1099
1099
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
1100
|
-
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1100
|
+
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(V, {
|
|
1101
1101
|
size: 16,
|
|
1102
1102
|
className: "animate-spin"
|
|
1103
|
-
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1103
|
+
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(R, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
|
|
1104
1104
|
}), a && /* @__PURE__ */ K("div", {
|
|
1105
1105
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1106
|
-
children: [/* @__PURE__ */ G(
|
|
1106
|
+
children: [/* @__PURE__ */ G(L, {
|
|
1107
1107
|
size: 16,
|
|
1108
1108
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1109
1109
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1118,7 +1118,7 @@ var Ie = [
|
|
|
1118
1118
|
]
|
|
1119
1119
|
});
|
|
1120
1120
|
}, Ue = ({ appId: e, onNavigate: n, pricingDone: i = !1, onNavigateToPricing: a }) => {
|
|
1121
|
-
let { t: o } =
|
|
1121
|
+
let { t: o } = F(), s = (e, t) => {
|
|
1122
1122
|
let n = o(e);
|
|
1123
1123
|
return n === e ? t : n;
|
|
1124
1124
|
}, { data: l, loading: u, error: d } = c({
|
|
@@ -1236,7 +1236,7 @@ var Ie = [
|
|
|
1236
1236
|
})
|
|
1237
1237
|
}) : /* @__PURE__ */ G(r, {
|
|
1238
1238
|
illustration: "empty-generic",
|
|
1239
|
-
icon: /* @__PURE__ */ G(
|
|
1239
|
+
icon: /* @__PURE__ */ G(_e, { size: 32 }),
|
|
1240
1240
|
title: s("devportal.noVersions", "No versions yet"),
|
|
1241
1241
|
description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1242
1242
|
action: /* @__PURE__ */ K("button", {
|
|
@@ -1248,7 +1248,7 @@ var Ie = [
|
|
|
1248
1248
|
!i && a && /* @__PURE__ */ K("div", {
|
|
1249
1249
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1250
1250
|
children: [
|
|
1251
|
-
/* @__PURE__ */ G(
|
|
1251
|
+
/* @__PURE__ */ G(R, {
|
|
1252
1252
|
size: 16,
|
|
1253
1253
|
className: "shrink-0 text-primary"
|
|
1254
1254
|
}),
|
|
@@ -1260,14 +1260,14 @@ var Ie = [
|
|
|
1260
1260
|
type: "button",
|
|
1261
1261
|
onClick: a,
|
|
1262
1262
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1263
|
-
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(
|
|
1263
|
+
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(ue, { size: 15 })]
|
|
1264
1264
|
})
|
|
1265
1265
|
]
|
|
1266
1266
|
})
|
|
1267
1267
|
]
|
|
1268
1268
|
});
|
|
1269
1269
|
}, We = ({ appId: e, onNavigate: t }) => {
|
|
1270
|
-
let { t: n } =
|
|
1270
|
+
let { t: n } = F(), r = (e, t) => {
|
|
1271
1271
|
let r = n(e);
|
|
1272
1272
|
return r === e ? t : r;
|
|
1273
1273
|
}, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
|
|
@@ -1277,10 +1277,10 @@ var Ie = [
|
|
|
1277
1277
|
onNavigate: t
|
|
1278
1278
|
});
|
|
1279
1279
|
}, Ge = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
1280
|
-
let { t: o } =
|
|
1280
|
+
let { t: o } = F(), s = (e, t) => {
|
|
1281
1281
|
let n = o(e);
|
|
1282
1282
|
return n === e ? t : n;
|
|
1283
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] =
|
|
1283
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] = P([]), [g, _] = P(!1), [v, y] = P(/* @__PURE__ */ new Set()), [b, x] = P(null), S = M(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Fe) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = M(() => C.filter((e) => v.has(e.id)), [C, v]), T = C.length > 0 && C.every((e) => v.has(e.id)), ee = C.some((e) => v.has(e.id)) && !T, E = j((e, t) => {
|
|
1284
1284
|
y((n) => {
|
|
1285
1285
|
let r = new Set(n);
|
|
1286
1286
|
return t ? r.add(e) : r.delete(e), r;
|
|
@@ -1348,17 +1348,17 @@ var Ie = [
|
|
|
1348
1348
|
})
|
|
1349
1349
|
] }) : /* @__PURE__ */ G(r, {
|
|
1350
1350
|
illustration: "empty-generic",
|
|
1351
|
-
icon: /* @__PURE__ */ G(
|
|
1351
|
+
icon: /* @__PURE__ */ G(xe, { size: 32 }),
|
|
1352
1352
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1353
1353
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1354
1354
|
action: /* @__PURE__ */ K("button", {
|
|
1355
1355
|
onClick: () => a("/oauth"),
|
|
1356
1356
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1357
|
-
children: [/* @__PURE__ */ G(
|
|
1357
|
+
children: [/* @__PURE__ */ G(z, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1358
1358
|
})
|
|
1359
1359
|
});
|
|
1360
1360
|
}, Ke = ({ appId: e }) => {
|
|
1361
|
-
let { t } =
|
|
1361
|
+
let { t } = F(), n = (e, n) => {
|
|
1362
1362
|
let r = t(e);
|
|
1363
1363
|
return r === e ? n : r;
|
|
1364
1364
|
}, r = M(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
@@ -1372,7 +1372,7 @@ var Ie = [
|
|
|
1372
1372
|
} });
|
|
1373
1373
|
return a ? /* @__PURE__ */ G(Re, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ G(ze, { message: s.message }) : /* @__PURE__ */ G(Xe, { analytics: (i?.applicationAnalytics ?? []).map(q) });
|
|
1374
1374
|
}, qe = ({ app: e }) => {
|
|
1375
|
-
let { t } =
|
|
1375
|
+
let { t } = F(), n = (e, n) => {
|
|
1376
1376
|
let r = t(e);
|
|
1377
1377
|
return r === e ? n : r;
|
|
1378
1378
|
};
|
|
@@ -1516,7 +1516,7 @@ var Ie = [
|
|
|
1516
1516
|
})]
|
|
1517
1517
|
});
|
|
1518
1518
|
}, Je = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
1519
|
-
let { t: i } =
|
|
1519
|
+
let { t: i } = F(), a = (e, t) => {
|
|
1520
1520
|
let n = i(e);
|
|
1521
1521
|
return n === e ? t : n;
|
|
1522
1522
|
};
|
|
@@ -1536,7 +1536,7 @@ var Ie = [
|
|
|
1536
1536
|
}), /* @__PURE__ */ K("button", {
|
|
1537
1537
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1538
1538
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1539
|
-
children: [/* @__PURE__ */ G(
|
|
1539
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1540
1540
|
})]
|
|
1541
1541
|
}), t.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1542
1542
|
className: "space-y-4",
|
|
@@ -1560,7 +1560,7 @@ var Ie = [
|
|
|
1560
1560
|
})] }), /* @__PURE__ */ G("button", {
|
|
1561
1561
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1562
1562
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1563
|
-
children: /* @__PURE__ */ G(
|
|
1563
|
+
children: /* @__PURE__ */ G(ge, { size: 20 })
|
|
1564
1564
|
})]
|
|
1565
1565
|
}),
|
|
1566
1566
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1623,12 +1623,12 @@ var Ie = [
|
|
|
1623
1623
|
action: /* @__PURE__ */ K("button", {
|
|
1624
1624
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1625
1625
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1626
|
-
children: [/* @__PURE__ */ G(
|
|
1626
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1627
1627
|
})
|
|
1628
1628
|
})]
|
|
1629
1629
|
});
|
|
1630
1630
|
}, Ye = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
1631
|
-
let { t: p } =
|
|
1631
|
+
let { t: p } = F(), m = (e, t) => {
|
|
1632
1632
|
let n = p(e);
|
|
1633
1633
|
return n === e ? t : n;
|
|
1634
1634
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
@@ -1663,7 +1663,7 @@ var Ie = [
|
|
|
1663
1663
|
})] }), /* @__PURE__ */ K("button", {
|
|
1664
1664
|
onClick: i,
|
|
1665
1665
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1666
|
-
children: [/* @__PURE__ */ G(
|
|
1666
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1667
1667
|
})]
|
|
1668
1668
|
}),
|
|
1669
1669
|
h.length > 0 && /* @__PURE__ */ G("div", {
|
|
@@ -1776,7 +1776,7 @@ var Ie = [
|
|
|
1776
1776
|
e.expiresAt && /* @__PURE__ */ K("span", {
|
|
1777
1777
|
className: "flex items-center gap-1",
|
|
1778
1778
|
children: [
|
|
1779
|
-
/* @__PURE__ */ G(
|
|
1779
|
+
/* @__PURE__ */ G(de, { size: 12 }),
|
|
1780
1780
|
m("devportal.expires", "Expires"),
|
|
1781
1781
|
" ",
|
|
1782
1782
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1784,7 +1784,7 @@ var Ie = [
|
|
|
1784
1784
|
}),
|
|
1785
1785
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ K("span", {
|
|
1786
1786
|
className: "flex items-center gap-1",
|
|
1787
|
-
children: [/* @__PURE__ */ G(
|
|
1787
|
+
children: [/* @__PURE__ */ G(le, {
|
|
1788
1788
|
size: 12,
|
|
1789
1789
|
className: "text-status-success-text"
|
|
1790
1790
|
}), m("devportal.noExpiration", "No expiration")]
|
|
@@ -1813,13 +1813,13 @@ var Ie = [
|
|
|
1813
1813
|
action: /* @__PURE__ */ K("button", {
|
|
1814
1814
|
onClick: i,
|
|
1815
1815
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1816
|
-
children: [/* @__PURE__ */ G(
|
|
1816
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1817
1817
|
})
|
|
1818
1818
|
})
|
|
1819
1819
|
]
|
|
1820
1820
|
});
|
|
1821
1821
|
}, Xe = ({ analytics: e }) => {
|
|
1822
|
-
let { t } =
|
|
1822
|
+
let { t } = F(), n = (e, n) => {
|
|
1823
1823
|
let r = t(e);
|
|
1824
1824
|
return r === e ? n : r;
|
|
1825
1825
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
@@ -1893,17 +1893,17 @@ var Ie = [
|
|
|
1893
1893
|
]
|
|
1894
1894
|
}) : /* @__PURE__ */ G(r, {
|
|
1895
1895
|
illustration: "empty-data",
|
|
1896
|
-
icon: /* @__PURE__ */ G(
|
|
1896
|
+
icon: /* @__PURE__ */ G(I, { size: 32 }),
|
|
1897
1897
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1898
1898
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1899
1899
|
})
|
|
1900
1900
|
})]
|
|
1901
1901
|
});
|
|
1902
1902
|
}, Ze = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Qe = ({ app: t }) => {
|
|
1903
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1903
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = F(), o = (e, t) => {
|
|
1904
1904
|
let n = a(e);
|
|
1905
1905
|
return n === e ? t : n;
|
|
1906
|
-
}, [s, c] =
|
|
1906
|
+
}, [s, c] = P(Ze), [l, u] = P("{}"), [d, f] = P(""), [p, m] = P(!1), [h, g] = P(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = P(i || ""), [y, b] = P(!1), x = j(async () => {
|
|
1907
1907
|
m(!0), f("");
|
|
1908
1908
|
try {
|
|
1909
1909
|
let e = {};
|
|
@@ -1963,7 +1963,7 @@ var Ie = [
|
|
|
1963
1963
|
})] }), /* @__PURE__ */ K("button", {
|
|
1964
1964
|
onClick: S,
|
|
1965
1965
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1966
|
-
children: [/* @__PURE__ */ G(
|
|
1966
|
+
children: [/* @__PURE__ */ G(B, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1967
1967
|
})]
|
|
1968
1968
|
}),
|
|
1969
1969
|
y && /* @__PURE__ */ K("div", {
|
|
@@ -2064,10 +2064,10 @@ var Ie = [
|
|
|
2064
2064
|
onClick: x,
|
|
2065
2065
|
disabled: p,
|
|
2066
2066
|
className: "flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
2067
|
-
children: [p ? /* @__PURE__ */ G(
|
|
2067
|
+
children: [p ? /* @__PURE__ */ G(V, {
|
|
2068
2068
|
size: 16,
|
|
2069
2069
|
className: "animate-spin"
|
|
2070
|
-
}) : /* @__PURE__ */ G(
|
|
2070
|
+
}) : /* @__PURE__ */ G(z, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2071
2071
|
}),
|
|
2072
2072
|
d && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2073
2073
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2079,7 +2079,9 @@ var Ie = [
|
|
|
2079
2079
|
]
|
|
2080
2080
|
});
|
|
2081
2081
|
}, $e = ({ 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 }) => {
|
|
2082
|
-
let d =
|
|
2082
|
+
let d = N(null), [f, p] = P(!1), m = N(n);
|
|
2083
|
+
m.current !== n && (m.current = n, f && p(!1));
|
|
2084
|
+
let h = j(async (e) => {
|
|
2083
2085
|
try {
|
|
2084
2086
|
r((await s(e)).downloadUrl);
|
|
2085
2087
|
} catch {}
|
|
@@ -2095,16 +2097,17 @@ var Ie = [
|
|
|
2095
2097
|
className: "flex gap-3 items-start",
|
|
2096
2098
|
children: [/* @__PURE__ */ K("div", {
|
|
2097
2099
|
className: t("relative shrink-0 w-20 rounded-lg border border-border-subtle bg-bg-sunken overflow-hidden flex items-center justify-center", o),
|
|
2098
|
-
children: [n ? /* @__PURE__ */ G("img", {
|
|
2100
|
+
children: [n && !f ? /* @__PURE__ */ G("img", {
|
|
2099
2101
|
src: n,
|
|
2100
2102
|
alt: e,
|
|
2101
|
-
className: "w-full h-full object-cover"
|
|
2103
|
+
className: "w-full h-full object-cover",
|
|
2104
|
+
onError: () => p(!0)
|
|
2102
2105
|
}) : /* @__PURE__ */ G(U, {
|
|
2103
2106
|
size: 18,
|
|
2104
2107
|
className: "text-text-secondary opacity-40"
|
|
2105
2108
|
}), c && /* @__PURE__ */ K("div", {
|
|
2106
2109
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
2107
|
-
children: [/* @__PURE__ */ G(
|
|
2110
|
+
children: [/* @__PURE__ */ G(V, {
|
|
2108
2111
|
size: 14,
|
|
2109
2112
|
className: "animate-spin text-white"
|
|
2110
2113
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2129,7 +2132,7 @@ var Ie = [
|
|
|
2129
2132
|
className: "hidden",
|
|
2130
2133
|
onChange: (e) => {
|
|
2131
2134
|
let t = e.target.files?.[0];
|
|
2132
|
-
t &&
|
|
2135
|
+
t && h(t), e.target.value = "";
|
|
2133
2136
|
}
|
|
2134
2137
|
}),
|
|
2135
2138
|
/* @__PURE__ */ K("button", {
|
|
@@ -2153,7 +2156,7 @@ var Ie = [
|
|
|
2153
2156
|
]
|
|
2154
2157
|
});
|
|
2155
2158
|
}, X = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
2156
|
-
let s =
|
|
2159
|
+
let s = N(null), [c, l] = P(""), u = j(async (t) => {
|
|
2157
2160
|
try {
|
|
2158
2161
|
let i = await r(t);
|
|
2159
2162
|
n([...e, i.downloadUrl]);
|
|
@@ -2162,7 +2165,10 @@ var Ie = [
|
|
|
2162
2165
|
r,
|
|
2163
2166
|
n,
|
|
2164
2167
|
e
|
|
2165
|
-
]),
|
|
2168
|
+
]), d = () => {
|
|
2169
|
+
let t = c.trim();
|
|
2170
|
+
t && !e.includes(t) && (n([...e, t]), l(""));
|
|
2171
|
+
}, f = (t) => {
|
|
2166
2172
|
n(e.filter((e, n) => n !== t));
|
|
2167
2173
|
};
|
|
2168
2174
|
return /* @__PURE__ */ K("div", {
|
|
@@ -2188,7 +2194,7 @@ var Ie = [
|
|
|
2188
2194
|
className: "w-full h-full object-cover"
|
|
2189
2195
|
}), /* @__PURE__ */ G("button", {
|
|
2190
2196
|
type: "button",
|
|
2191
|
-
onClick: () =>
|
|
2197
|
+
onClick: () => f(t),
|
|
2192
2198
|
className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2193
2199
|
children: /* @__PURE__ */ G(De, { size: 12 })
|
|
2194
2200
|
})]
|
|
@@ -2197,7 +2203,7 @@ var Ie = [
|
|
|
2197
2203
|
disabled: i,
|
|
2198
2204
|
onClick: () => s.current?.click(),
|
|
2199
2205
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border-subtle flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
2200
|
-
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2206
|
+
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(V, {
|
|
2201
2207
|
size: 18,
|
|
2202
2208
|
className: "animate-spin text-primary"
|
|
2203
2209
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2209,6 +2215,25 @@ var Ie = [
|
|
|
2209
2215
|
})] })
|
|
2210
2216
|
})]
|
|
2211
2217
|
}),
|
|
2218
|
+
/* @__PURE__ */ K("div", {
|
|
2219
|
+
className: "flex gap-2",
|
|
2220
|
+
children: [/* @__PURE__ */ G("input", {
|
|
2221
|
+
type: "url",
|
|
2222
|
+
value: c,
|
|
2223
|
+
onChange: (e) => l(e.target.value),
|
|
2224
|
+
onKeyDown: (e) => {
|
|
2225
|
+
e.key === "Enter" && (e.preventDefault(), d());
|
|
2226
|
+
},
|
|
2227
|
+
placeholder: "https://... paste a screenshot URL",
|
|
2228
|
+
className: "flex-1 rounded-md border border-border-subtle bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
|
|
2229
|
+
}), /* @__PURE__ */ G("button", {
|
|
2230
|
+
type: "button",
|
|
2231
|
+
onClick: d,
|
|
2232
|
+
disabled: !c.trim(),
|
|
2233
|
+
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
2234
|
+
children: "Add"
|
|
2235
|
+
})]
|
|
2236
|
+
}),
|
|
2212
2237
|
/* @__PURE__ */ G("input", {
|
|
2213
2238
|
ref: s,
|
|
2214
2239
|
type: "file",
|
|
@@ -2216,7 +2241,7 @@ var Ie = [
|
|
|
2216
2241
|
className: "hidden",
|
|
2217
2242
|
onChange: (e) => {
|
|
2218
2243
|
let t = e.target.files?.[0];
|
|
2219
|
-
t &&
|
|
2244
|
+
t && u(t), e.target.value = "";
|
|
2220
2245
|
}
|
|
2221
2246
|
}),
|
|
2222
2247
|
o && /* @__PURE__ */ G("p", {
|
|
@@ -2335,22 +2360,23 @@ function rt(e) {
|
|
|
2335
2360
|
};
|
|
2336
2361
|
}
|
|
2337
2362
|
var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i = !1, onNavigateToVersions: a, onNavigateToPricing: o, onNavigateToSubmission: s }) => {
|
|
2338
|
-
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } =
|
|
2363
|
+
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } = F(), p = (e, t) => {
|
|
2339
2364
|
let n = f(e);
|
|
2340
2365
|
return n === e ? t : n;
|
|
2341
|
-
}, [m, h] =
|
|
2342
|
-
|
|
2343
|
-
let [ee] = _();
|
|
2366
|
+
}, [m, h] = P(() => rt(t)), [g, v] = P(!1), [b, x] = P(null), S = N(rt(t)), C = N(t);
|
|
2367
|
+
C.current = t;
|
|
2368
|
+
let w = JSON.stringify(m) !== JSON.stringify(S.current), [ee] = _();
|
|
2344
2369
|
oe(() => {
|
|
2345
|
-
|
|
2370
|
+
let e = rt(C.current);
|
|
2371
|
+
h(e), S.current = e, x(null);
|
|
2346
2372
|
}, [t.id]);
|
|
2347
2373
|
let E = (e, t) => {
|
|
2348
2374
|
h((n) => ({
|
|
2349
2375
|
...n,
|
|
2350
2376
|
[e]: t
|
|
2351
|
-
})),
|
|
2377
|
+
})), x(null);
|
|
2352
2378
|
}, D = m.shortDescription.trim().length > 0 && m.privacyPolicyUrl.trim().length > 0 && m.termsOfServiceUrl.trim().length > 0, ne = async () => {
|
|
2353
|
-
v(!0),
|
|
2379
|
+
v(!0), x(null);
|
|
2354
2380
|
try {
|
|
2355
2381
|
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Z.has(m.manifestItemType), i = t.manifest ?? {}, a = {
|
|
2356
2382
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
@@ -2383,19 +2409,19 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2383
2409
|
termsOfServiceUrl: m.termsOfServiceUrl || null,
|
|
2384
2410
|
manifest: a
|
|
2385
2411
|
}
|
|
2386
|
-
} }), T("success"),
|
|
2412
|
+
} }), T("success"), x("success"), S.current = m;
|
|
2387
2413
|
} catch {
|
|
2388
|
-
T("error"),
|
|
2414
|
+
T("error"), x("error");
|
|
2389
2415
|
} finally {
|
|
2390
2416
|
v(!1);
|
|
2391
2417
|
}
|
|
2392
|
-
}, { upload: re, uploading: ie, progress: ae, error: j } = A(c, l, u, d, "/DevPortal/Assets"), { upload: M, uploading:
|
|
2418
|
+
}, { upload: re, uploading: ie, progress: ae, error: j } = A(c, l, u, d, "/DevPortal/Assets"), { upload: M, uploading: ce, progress: I, error: R } = A(c, l, u, d, "/DevPortal/Assets"), { upload: fe, uploading: pe, progress: me, error: he } = A(c, l, u, d, "/DevPortal/Assets"), B = Z.has(m.manifestItemType), ge = t.status === "SUBMITTED";
|
|
2393
2419
|
return /* @__PURE__ */ K("div", {
|
|
2394
2420
|
className: "space-y-8 max-w-3xl",
|
|
2395
2421
|
children: [
|
|
2396
2422
|
t.status === "PUBLISHED" ? /* @__PURE__ */ K("div", {
|
|
2397
2423
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2398
|
-
children: [/* @__PURE__ */ G(
|
|
2424
|
+
children: [/* @__PURE__ */ G(le, {
|
|
2399
2425
|
size: 16,
|
|
2400
2426
|
className: "text-success mt-0.5 shrink-0"
|
|
2401
2427
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2412,11 +2438,11 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2412
2438
|
]
|
|
2413
2439
|
})]
|
|
2414
2440
|
})]
|
|
2415
|
-
}) :
|
|
2441
|
+
}) : ge ? /* @__PURE__ */ K("div", {
|
|
2416
2442
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2417
2443
|
children: [/* @__PURE__ */ K("div", {
|
|
2418
2444
|
className: "flex items-start gap-3",
|
|
2419
|
-
children: [/* @__PURE__ */ G(
|
|
2445
|
+
children: [/* @__PURE__ */ G(de, {
|
|
2420
2446
|
size: 16,
|
|
2421
2447
|
className: "text-primary mt-0.5 shrink-0"
|
|
2422
2448
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2440,11 +2466,11 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2440
2466
|
type: "button",
|
|
2441
2467
|
onClick: s,
|
|
2442
2468
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2443
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(
|
|
2469
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(z, { size: 12 })]
|
|
2444
2470
|
})]
|
|
2445
2471
|
}) : /* @__PURE__ */ K("div", {
|
|
2446
2472
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
2447
|
-
children: [/* @__PURE__ */ G(
|
|
2473
|
+
children: [/* @__PURE__ */ G(se, {
|
|
2448
2474
|
size: 16,
|
|
2449
2475
|
className: "text-warning mt-0.5 shrink-0"
|
|
2450
2476
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2481,7 +2507,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2481
2507
|
onChange: (e) => E("manifestDisplayName", e.target.value),
|
|
2482
2508
|
placeholder: "My Awesome Node"
|
|
2483
2509
|
}),
|
|
2484
|
-
|
|
2510
|
+
B && t.appType !== "WORKFLOW" && /* @__PURE__ */ G(te, {
|
|
2485
2511
|
label: p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2486
2512
|
value: m.manifestJsonContent,
|
|
2487
2513
|
onChange: (e) => E("manifestJsonContent", e.target.value),
|
|
@@ -2489,7 +2515,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2489
2515
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2490
2516
|
hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2491
2517
|
}),
|
|
2492
|
-
|
|
2518
|
+
B && t.appType === "WORKFLOW" && /* @__PURE__ */ K("p", {
|
|
2493
2519
|
className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
|
|
2494
2520
|
children: [
|
|
2495
2521
|
"The Workflow Definition (JSON) is set per version. Go to the",
|
|
@@ -2526,9 +2552,9 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2526
2552
|
hint: p("devportal.bannerUrlHint", "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)"),
|
|
2527
2553
|
aspectClass: "aspect-square",
|
|
2528
2554
|
upload: M,
|
|
2529
|
-
uploading:
|
|
2530
|
-
progress:
|
|
2531
|
-
error:
|
|
2555
|
+
uploading: ce,
|
|
2556
|
+
progress: I,
|
|
2557
|
+
error: R
|
|
2532
2558
|
})]
|
|
2533
2559
|
}),
|
|
2534
2560
|
/* @__PURE__ */ G(O, {
|
|
@@ -2556,10 +2582,10 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2556
2582
|
/* @__PURE__ */ G(X, {
|
|
2557
2583
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2558
2584
|
onChange: (e) => E("screenshotsText", e.join("\n")),
|
|
2559
|
-
upload:
|
|
2560
|
-
uploading:
|
|
2561
|
-
progress:
|
|
2562
|
-
error:
|
|
2585
|
+
upload: fe,
|
|
2586
|
+
uploading: pe,
|
|
2587
|
+
progress: me,
|
|
2588
|
+
error: he
|
|
2563
2589
|
})
|
|
2564
2590
|
]
|
|
2565
2591
|
})
|
|
@@ -2614,16 +2640,16 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2614
2640
|
/* @__PURE__ */ K("div", {
|
|
2615
2641
|
className: "border-t pt-6 space-y-3",
|
|
2616
2642
|
children: [
|
|
2617
|
-
|
|
2643
|
+
b === "success" && /* @__PURE__ */ K("div", {
|
|
2618
2644
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2619
|
-
children: [/* @__PURE__ */ G(
|
|
2645
|
+
children: [/* @__PURE__ */ G(le, {
|
|
2620
2646
|
size: 15,
|
|
2621
2647
|
className: "shrink-0"
|
|
2622
2648
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
2623
2649
|
}),
|
|
2624
|
-
|
|
2650
|
+
b === "error" && /* @__PURE__ */ K("div", {
|
|
2625
2651
|
className: "flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2626
|
-
children: [/* @__PURE__ */ G(
|
|
2652
|
+
children: [/* @__PURE__ */ G(se, {
|
|
2627
2653
|
size: 15,
|
|
2628
2654
|
className: "shrink-0"
|
|
2629
2655
|
}), p("devportal.storeListing.savedError", "Failed to save. Please try again.")]
|
|
@@ -2634,15 +2660,18 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2634
2660
|
/* @__PURE__ */ G("button", {
|
|
2635
2661
|
type: "button",
|
|
2636
2662
|
onClick: ne,
|
|
2637
|
-
disabled: g || !D ||
|
|
2638
|
-
title: D ?
|
|
2663
|
+
disabled: g || !D || !w,
|
|
2664
|
+
title: D ? w ? void 0 : p("devportal.storeListing.noChanges", "No unsaved changes") : p("devportal.storeListing.requiredFieldsHint", "Fill in Short Description, Privacy Policy URL, and Terms of Service URL to save"),
|
|
2639
2665
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2640
|
-
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2666
|
+
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(V, {
|
|
2641
2667
|
size: 16,
|
|
2642
2668
|
className: "animate-spin"
|
|
2643
|
-
}), p("devportal.saving", "Saving…")] }) :
|
|
2669
|
+
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Se, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(L, { size: 16 }), p("devportal.saved", "Saved")] })
|
|
2644
2670
|
}),
|
|
2645
|
-
|
|
2671
|
+
D ? w ? null : /* @__PURE__ */ G("p", {
|
|
2672
|
+
className: "text-xs text-text-secondary",
|
|
2673
|
+
children: p("devportal.storeListing.noChangesHint", "All changes saved — edit any field to save again")
|
|
2674
|
+
}) : /* @__PURE__ */ G("p", {
|
|
2646
2675
|
className: "text-xs text-text-secondary",
|
|
2647
2676
|
children: p("devportal.storeListing.requiredFieldsLabel", "Short Description, Privacy Policy URL, and Terms of Service URL are required")
|
|
2648
2677
|
}),
|
|
@@ -2650,13 +2679,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2650
2679
|
type: "button",
|
|
2651
2680
|
onClick: a,
|
|
2652
2681
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2653
|
-
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(
|
|
2682
|
+
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(ue, { size: 15 })]
|
|
2654
2683
|
}),
|
|
2655
2684
|
(!r || n > 0) && !i && o && /* @__PURE__ */ K("button", {
|
|
2656
2685
|
type: "button",
|
|
2657
2686
|
onClick: o,
|
|
2658
2687
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2659
|
-
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(
|
|
2688
|
+
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(ue, { size: 15 })]
|
|
2660
2689
|
})
|
|
2661
2690
|
]
|
|
2662
2691
|
})
|
|
@@ -2665,7 +2694,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2665
2694
|
]
|
|
2666
2695
|
});
|
|
2667
2696
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2668
|
-
let { t: i } =
|
|
2697
|
+
let { t: i } = F();
|
|
2669
2698
|
return /* @__PURE__ */ K(Me, {
|
|
2670
2699
|
treatment: "metric",
|
|
2671
2700
|
className: "p-4",
|
|
@@ -2697,7 +2726,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2697
2726
|
target: "_blank",
|
|
2698
2727
|
rel: "noopener noreferrer",
|
|
2699
2728
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2700
|
-
children: [/* @__PURE__ */ G(
|
|
2729
|
+
children: [/* @__PURE__ */ G(z, { size: 14 }), e]
|
|
2701
2730
|
}), at = [
|
|
2702
2731
|
{
|
|
2703
2732
|
id: "auth",
|
|
@@ -2777,7 +2806,7 @@ function ot(e) {
|
|
|
2777
2806
|
return t;
|
|
2778
2807
|
}
|
|
2779
2808
|
var st = ({ app: e }) => {
|
|
2780
|
-
let t = e.manifest ?? {}, [n, r] =
|
|
2809
|
+
let t = e.manifest ?? {}, [n, r] = P(() => ot(t)), [i, a] = P(!1), [o, s] = P(!1), [c] = _(), l = (e, t) => {
|
|
2781
2810
|
s(!1), r((n) => ({
|
|
2782
2811
|
...n,
|
|
2783
2812
|
[e]: t
|
|
@@ -2857,7 +2886,7 @@ var st = ({ app: e }) => {
|
|
|
2857
2886
|
}),
|
|
2858
2887
|
/* @__PURE__ */ K("div", {
|
|
2859
2888
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2860
|
-
children: [/* @__PURE__ */ G(
|
|
2889
|
+
children: [/* @__PURE__ */ G(he, {
|
|
2861
2890
|
size: 14,
|
|
2862
2891
|
className: "flex-shrink-0 mt-0.5"
|
|
2863
2892
|
}), /* @__PURE__ */ K("span", { children: [/* @__PURE__ */ G("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
@@ -2866,16 +2895,16 @@ var st = ({ app: e }) => {
|
|
|
2866
2895
|
className: "flex items-center justify-end gap-3",
|
|
2867
2896
|
children: [o && /* @__PURE__ */ K("span", {
|
|
2868
2897
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2869
|
-
children: [/* @__PURE__ */ G(
|
|
2898
|
+
children: [/* @__PURE__ */ G(le, { size: 14 }), "Saved"]
|
|
2870
2899
|
}), /* @__PURE__ */ K("button", {
|
|
2871
2900
|
type: "button",
|
|
2872
2901
|
onClick: () => void u(),
|
|
2873
2902
|
disabled: i,
|
|
2874
2903
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
2875
|
-
children: [i ? /* @__PURE__ */ G(
|
|
2904
|
+
children: [i ? /* @__PURE__ */ G(V, {
|
|
2876
2905
|
size: 14,
|
|
2877
2906
|
className: "animate-spin"
|
|
2878
|
-
}) : /* @__PURE__ */ G(
|
|
2907
|
+
}) : /* @__PURE__ */ G(xe, { size: 14 }), "Save Permissions"]
|
|
2879
2908
|
})]
|
|
2880
2909
|
})
|
|
2881
2910
|
]
|