@burdenoff/microfe-devportal 2026.611.2 → 2026.614.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/components/SectionNav.js +105 -41
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/hooks/useGraphQL.js +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +36 -36
- package/dist/devportal/pages/AnalyticsDashboardPage.js +150 -150
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +184 -172
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +9 -9
- package/dist/devportal/pages/ApplicationDetailPage.js +414 -414
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +44 -44
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +118 -118
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +20 -20
- package/dist/devportal/pages/CreateApplicationPage.js +32 -32
- package/dist/devportal/pages/CreateOAuthClientPage.js +20 -20
- package/dist/devportal/pages/CreateOrganizationPage.js +125 -442
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +25 -25
- package/dist/devportal/pages/DashboardPage.js +160 -145
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +22 -22
- package/dist/devportal/pages/EditApplicationPage.js +283 -283
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +9 -9
- package/dist/devportal/pages/OAuthClientDetailPage.js +17 -17
- package/dist/devportal/pages/OAuthClientsPage.js +16 -16
- package/dist/devportal/pages/OrganizationDetailPage.js +78 -78
- package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +18 -18
- package/dist/devportal/pages/PublishPage.js +16 -16
- package/dist/devportal/pages/PublisherProfilePage.js +156 -146
- package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +512 -362
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SettingsPage.js +17 -17
- package/dist/devportal/pages/SetupPage.js +99 -99
- package/dist/devportal/pages/SetupPage.js.map +1 -1
- package/dist/devportal/pages/WebhookDetailPage.js +143 -143
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +140 -140
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/providers/DevportalProvider.js +46 -33
- package/dist/devportal/providers/DevportalProvider.js.map +1 -1
- package/dist/generated/global-operations.js +69 -55
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,23 +2,23 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { LoadingState as n } from "../components/LoadingState.js";
|
|
4
4
|
import { EmptyState as r } from "../components/EmptyState.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
5
|
+
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useInstallApplicationMutation as l, useRevokeDelegationMutation as u, useRotateAppSecretMutation as d, useUpdateApplicationMutation as f } from "../../generated/global-operations.js";
|
|
6
|
+
import { PageLayout as p, PageSection as m } from "../components/PageLayout.js";
|
|
7
|
+
import { APP_TYPE_LABELS as h } from "../utils/constants.js";
|
|
8
|
+
import { FeaturedBadge as g, StatusBadge as _, VerifiedBadge as v } from "../components/StatusBadge.js";
|
|
9
|
+
import { SelectionCheckbox as y } from "../components/SelectionCheckbox.js";
|
|
10
|
+
import { nativeNotify as b } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { NewSecretAlert as x } from "../components/SecretDisplay.js";
|
|
12
|
+
import { DataTable as S, DetailList as C } from "../components/DataTable.js";
|
|
13
|
+
import { InputField as w, SelectField as T, TextareaField as E } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as D } from "../components/ConfirmDialog.js";
|
|
15
15
|
import { GrantDelegationModal as ee } from "../components/GrantDelegationModal.js";
|
|
16
16
|
import { DEVPORTAL_PERMISSIONS as O } from "../constants/permissions.js";
|
|
17
17
|
import { useDevportalPermission as k } from "../hooks/usePermission.js";
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
18
|
+
import { usePackageUpload as te } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as A, useEffect as j, 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 I, AppWindow as ne, BarChart3 as L, CheckCircle as R, Clock as z, Download as re, Edit as ie, ExternalLink as B, FlaskConical as ae, Info as oe, Key as V, Loader2 as H, MoreHorizontal as se, Plus as U, Power as ce, RefreshCw as le, Shield as W, Store as G, Upload as K, Users as q, Webhook as ue, XCircle as de } from "lucide-react";
|
|
22
22
|
import { useParams as fe } from "react-router-dom";
|
|
23
23
|
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
24
24
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
@@ -128,7 +128,7 @@ var ge = [
|
|
|
128
128
|
{
|
|
129
129
|
id: "overview",
|
|
130
130
|
label: "Overview",
|
|
131
|
-
icon:
|
|
131
|
+
icon: ne
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
id: "oauth",
|
|
@@ -153,7 +153,7 @@ var ge = [
|
|
|
153
153
|
{
|
|
154
154
|
id: "analytics",
|
|
155
155
|
label: "Analytics",
|
|
156
|
-
icon:
|
|
156
|
+
icon: L
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
id: "playground",
|
|
@@ -180,7 +180,7 @@ var ge = [
|
|
|
180
180
|
})]
|
|
181
181
|
}), ye = ({ message: e }) => /* @__PURE__ */ X("div", {
|
|
182
182
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
183
|
-
children: [/* @__PURE__ */ Y(
|
|
183
|
+
children: [/* @__PURE__ */ Y(I, {
|
|
184
184
|
size: 32,
|
|
185
185
|
className: "text-destructive"
|
|
186
186
|
}), /* @__PURE__ */ Y("p", {
|
|
@@ -188,58 +188,58 @@ var ge = [
|
|
|
188
188
|
children: e
|
|
189
189
|
})]
|
|
190
190
|
}), be = () => {
|
|
191
|
-
let { navigate:
|
|
192
|
-
let n =
|
|
191
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = F(), f = (e, t) => {
|
|
192
|
+
let n = u(e);
|
|
193
193
|
return n === e ? t : n;
|
|
194
|
-
}, { allowed:
|
|
195
|
-
variables: { id:
|
|
196
|
-
skip: !
|
|
197
|
-
}), [V, { loading: se }] =
|
|
198
|
-
|
|
199
|
-
}, [
|
|
200
|
-
if (
|
|
201
|
-
let e = (await V({ variables: { id:
|
|
202
|
-
e &&
|
|
194
|
+
}, { allowed: m } = k(O.APP_UPDATE), { allowed: y } = k(O.APP_DELETE), { appId: S } = fe(), [C, w] = P("overview"), [T, E] = P(!1), [te, j] = P(!1), [M, N] = P(null), [L, R] = P(!1), { data: re, loading: B, error: oe } = s({
|
|
195
|
+
variables: { id: S },
|
|
196
|
+
skip: !S
|
|
197
|
+
}), [V, { loading: se }] = d(), [U, { loading: W }] = a(), [G, { loading: K }] = l(), q = A((e) => {
|
|
198
|
+
i?.(`${o}${e}`);
|
|
199
|
+
}, [i, o]), ue = A(async () => {
|
|
200
|
+
if (S) try {
|
|
201
|
+
let e = (await V({ variables: { id: S } })).data?.rotateAppSecret.clientSecret;
|
|
202
|
+
e && N(e), E(!1);
|
|
203
203
|
} catch {}
|
|
204
|
-
}, [
|
|
205
|
-
if (
|
|
206
|
-
await U({ variables: { id:
|
|
204
|
+
}, [S, V]), de = A(async () => {
|
|
205
|
+
if (S) try {
|
|
206
|
+
await U({ variables: { id: S } }), j(!1), q("/apps");
|
|
207
207
|
} catch {}
|
|
208
208
|
}, [
|
|
209
|
-
|
|
209
|
+
S,
|
|
210
210
|
U,
|
|
211
211
|
q
|
|
212
|
-
]), J =
|
|
213
|
-
if (!(!
|
|
212
|
+
]), J = A(async () => {
|
|
213
|
+
if (!(!S || !c)) try {
|
|
214
214
|
await G({ variables: { input: {
|
|
215
|
-
applicationId:
|
|
215
|
+
applicationId: S,
|
|
216
216
|
scope: "WORKSPACE",
|
|
217
|
-
workspaceId:
|
|
217
|
+
workspaceId: c,
|
|
218
218
|
autoUpdate: !1
|
|
219
|
-
} } }),
|
|
219
|
+
} } }), b("success");
|
|
220
220
|
} catch {
|
|
221
|
-
|
|
221
|
+
b("error");
|
|
222
222
|
}
|
|
223
223
|
}, [
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
S,
|
|
225
|
+
c,
|
|
226
226
|
G
|
|
227
227
|
]);
|
|
228
|
-
if (B && !re) return /* @__PURE__ */ Y(n, { message:
|
|
229
|
-
if (oe) return /* @__PURE__ */ Y(
|
|
230
|
-
title:
|
|
231
|
-
backLink: `${
|
|
232
|
-
backLabel:
|
|
228
|
+
if (B && !re) return /* @__PURE__ */ Y(n, { message: f("devportal.loadingApplication", "Loading application...") });
|
|
229
|
+
if (oe) return /* @__PURE__ */ Y(p, {
|
|
230
|
+
title: f("devportal.error", "Error"),
|
|
231
|
+
backLink: `${o}/apps`,
|
|
232
|
+
backLabel: f("devportal.backToApplications", "Back to Applications"),
|
|
233
233
|
children: /* @__PURE__ */ X("div", {
|
|
234
234
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
235
235
|
children: [
|
|
236
|
-
/* @__PURE__ */ Y(
|
|
236
|
+
/* @__PURE__ */ Y(I, {
|
|
237
237
|
size: 48,
|
|
238
238
|
className: "text-destructive mb-4"
|
|
239
239
|
}),
|
|
240
240
|
/* @__PURE__ */ Y("h3", {
|
|
241
241
|
className: "text-lg font-semibold mb-2",
|
|
242
|
-
children:
|
|
242
|
+
children: f("devportal.failedToLoadApplication", "Failed to load application")
|
|
243
243
|
}),
|
|
244
244
|
/* @__PURE__ */ Y("p", {
|
|
245
245
|
className: "text-sm text-muted-foreground",
|
|
@@ -249,74 +249,74 @@ var ge = [
|
|
|
249
249
|
})
|
|
250
250
|
});
|
|
251
251
|
let Z = pe(re?.application);
|
|
252
|
-
return Z ? /* @__PURE__ */ X(
|
|
252
|
+
return Z ? /* @__PURE__ */ X(p, {
|
|
253
253
|
title: Z.name,
|
|
254
254
|
description: Z.shortDescription,
|
|
255
|
-
backLink: `${
|
|
256
|
-
backLabel:
|
|
255
|
+
backLink: `${o}/apps`,
|
|
256
|
+
backLabel: f("devportal.backToApplications", "Back to Applications"),
|
|
257
257
|
actions: /* @__PURE__ */ X("div", {
|
|
258
258
|
className: "flex items-center gap-2",
|
|
259
259
|
children: [
|
|
260
260
|
/* @__PURE__ */ X("button", {
|
|
261
|
-
onClick: () =>
|
|
261
|
+
onClick: () => E(!0),
|
|
262
262
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
263
|
-
children: [/* @__PURE__ */ Y(le, { size: 16 }),
|
|
263
|
+
children: [/* @__PURE__ */ Y(le, { size: 16 }), f("devportal.rotateSecret", "Rotate Secret")]
|
|
264
264
|
}),
|
|
265
265
|
/* @__PURE__ */ X("button", {
|
|
266
266
|
onClick: () => q(`/apps/${Z.id}/versions`),
|
|
267
267
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
268
|
-
children: [/* @__PURE__ */ Y(
|
|
268
|
+
children: [/* @__PURE__ */ Y(z, { size: 16 }), f("devportal.versions", "Versions")]
|
|
269
269
|
}),
|
|
270
270
|
/* @__PURE__ */ X("button", {
|
|
271
271
|
onClick: () => void J(),
|
|
272
|
-
disabled: K || !
|
|
273
|
-
"aria-disabled": !
|
|
274
|
-
title:
|
|
272
|
+
disabled: K || !c,
|
|
273
|
+
"aria-disabled": !c,
|
|
274
|
+
title: c ? f("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : f("devportal.noWorkspaceContext", "No workspace context available"),
|
|
275
275
|
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",
|
|
276
276
|
children: [K ? /* @__PURE__ */ Y(H, {
|
|
277
277
|
size: 16,
|
|
278
278
|
className: "animate-spin"
|
|
279
|
-
}) : /* @__PURE__ */ Y(ae, { size: 16 }),
|
|
279
|
+
}) : /* @__PURE__ */ Y(ae, { size: 16 }), f("devportal.testInWorkspace", "Test in Workspace")]
|
|
280
280
|
}),
|
|
281
281
|
/* @__PURE__ */ X("button", {
|
|
282
282
|
onClick: () => q(`/apps/${Z.id}/edit`),
|
|
283
|
-
disabled: !
|
|
284
|
-
"aria-disabled": !
|
|
283
|
+
disabled: !m,
|
|
284
|
+
"aria-disabled": !m,
|
|
285
285
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
286
|
-
children: [/* @__PURE__ */ Y(ie, { size: 16 }),
|
|
286
|
+
children: [/* @__PURE__ */ Y(ie, { size: 16 }), f("devportal.editApp", "Edit App")]
|
|
287
287
|
}),
|
|
288
288
|
/* @__PURE__ */ X("button", {
|
|
289
|
-
onClick: () =>
|
|
290
|
-
disabled: !
|
|
291
|
-
"aria-disabled": !
|
|
289
|
+
onClick: () => j(!0),
|
|
290
|
+
disabled: !y,
|
|
291
|
+
"aria-disabled": !y,
|
|
292
292
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
293
|
-
children: [/* @__PURE__ */ Y(ce, { size: 16 }),
|
|
293
|
+
children: [/* @__PURE__ */ Y(ce, { size: 16 }), f("devportal.deactivate", "Deactivate")]
|
|
294
294
|
})
|
|
295
295
|
]
|
|
296
296
|
}),
|
|
297
297
|
children: [
|
|
298
|
-
|
|
299
|
-
title:
|
|
300
|
-
secret:
|
|
301
|
-
description:
|
|
302
|
-
onDismiss: () =>
|
|
298
|
+
M && /* @__PURE__ */ Y(x, {
|
|
299
|
+
title: f("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
300
|
+
secret: M,
|
|
301
|
+
description: f("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
302
|
+
onDismiss: () => N(null)
|
|
303
303
|
}),
|
|
304
304
|
/* @__PURE__ */ X("div", {
|
|
305
305
|
className: "flex flex-wrap items-center gap-2",
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */ Y(
|
|
307
|
+
/* @__PURE__ */ Y(_, {
|
|
308
308
|
status: Z.status,
|
|
309
309
|
type: "app"
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */ Y(
|
|
311
|
+
/* @__PURE__ */ Y(_, {
|
|
312
312
|
status: Z.visibility,
|
|
313
313
|
type: "app"
|
|
314
314
|
}),
|
|
315
|
-
Z.isVerified && /* @__PURE__ */ Y(
|
|
316
|
-
Z.isFeatured && /* @__PURE__ */ Y(
|
|
315
|
+
Z.isVerified && /* @__PURE__ */ Y(v, { verified: !0 }),
|
|
316
|
+
Z.isFeatured && /* @__PURE__ */ Y(g, {}),
|
|
317
317
|
/* @__PURE__ */ Y("span", {
|
|
318
318
|
className: "text-sm text-muted-foreground",
|
|
319
|
-
children:
|
|
319
|
+
children: h[Z.appType] || Z.appType
|
|
320
320
|
})
|
|
321
321
|
]
|
|
322
322
|
}),
|
|
@@ -325,16 +325,16 @@ var ge = [
|
|
|
325
325
|
children: /* @__PURE__ */ Y("nav", {
|
|
326
326
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
327
327
|
role: "tablist",
|
|
328
|
-
"aria-label":
|
|
328
|
+
"aria-label": f("devportal.applicationSections", "Application sections"),
|
|
329
329
|
children: ge.map((e) => {
|
|
330
330
|
let n = e.icon;
|
|
331
331
|
return /* @__PURE__ */ X("button", {
|
|
332
332
|
id: `application-tab-${e.id}`,
|
|
333
333
|
role: "tab",
|
|
334
|
-
"aria-selected":
|
|
334
|
+
"aria-selected": C === e.id,
|
|
335
335
|
"aria-controls": `application-panel-${e.id}`,
|
|
336
|
-
onClick: () =>
|
|
337
|
-
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
336
|
+
onClick: () => w(e.id),
|
|
337
|
+
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", C === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
|
|
338
338
|
children: [/* @__PURE__ */ Y(n, { size: 16 }), e.label]
|
|
339
339
|
}, e.id);
|
|
340
340
|
})
|
|
@@ -342,80 +342,80 @@ var ge = [
|
|
|
342
342
|
}),
|
|
343
343
|
/* @__PURE__ */ X("div", {
|
|
344
344
|
className: "mt-6",
|
|
345
|
-
id: `application-panel-${
|
|
345
|
+
id: `application-panel-${C}`,
|
|
346
346
|
role: "tabpanel",
|
|
347
|
-
"aria-labelledby": `application-tab-${
|
|
347
|
+
"aria-labelledby": `application-tab-${C}`,
|
|
348
348
|
tabIndex: 0,
|
|
349
349
|
children: [
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
C === "overview" && /* @__PURE__ */ Y(Ee, { app: Z }),
|
|
351
|
+
C === "oauth" && /* @__PURE__ */ Y(xe, {
|
|
352
352
|
appId: Z.appId || Z.id,
|
|
353
353
|
onNavigate: q
|
|
354
354
|
}),
|
|
355
|
-
|
|
355
|
+
C === "api-keys" && /* @__PURE__ */ Y(Se, {
|
|
356
356
|
appId: Z.appId || Z.id,
|
|
357
357
|
onNavigate: q
|
|
358
358
|
}),
|
|
359
|
-
|
|
359
|
+
C === "webhooks" && /* @__PURE__ */ Y(Ce, {
|
|
360
360
|
appId: Z.id,
|
|
361
361
|
onNavigate: q
|
|
362
362
|
}),
|
|
363
|
-
|
|
363
|
+
C === "delegations" && /* @__PURE__ */ Y(we, {
|
|
364
364
|
authAppId: Z.appId || void 0,
|
|
365
365
|
appName: Z.name,
|
|
366
|
-
onGrantDelegation: () =>
|
|
366
|
+
onGrantDelegation: () => R(!0),
|
|
367
367
|
onNavigate: q
|
|
368
368
|
}),
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
C === "analytics" && /* @__PURE__ */ Y(Te, { appId: Z.id }),
|
|
370
|
+
C === "playground" && /* @__PURE__ */ Y(je, { app: Z }),
|
|
371
|
+
C === "store-listing" && /* @__PURE__ */ Y(Le, { app: Z })
|
|
372
372
|
]
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */ Y(
|
|
374
|
+
/* @__PURE__ */ Y(D, {
|
|
375
375
|
open: T,
|
|
376
|
-
onOpenChange:
|
|
376
|
+
onOpenChange: E,
|
|
377
377
|
onConfirm: ue,
|
|
378
|
-
title:
|
|
379
|
-
description:
|
|
380
|
-
confirmLabel:
|
|
381
|
-
cancelLabel:
|
|
378
|
+
title: f("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
379
|
+
description: f("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."),
|
|
380
|
+
confirmLabel: f("devportal.rotateSecret", "Rotate Secret"),
|
|
381
|
+
cancelLabel: f("devportal.cancel", "Cancel"),
|
|
382
382
|
variant: "warning",
|
|
383
383
|
loading: se
|
|
384
384
|
}),
|
|
385
|
-
/* @__PURE__ */ Y(
|
|
386
|
-
open:
|
|
387
|
-
onOpenChange:
|
|
385
|
+
/* @__PURE__ */ Y(D, {
|
|
386
|
+
open: te,
|
|
387
|
+
onOpenChange: j,
|
|
388
388
|
onConfirm: de,
|
|
389
|
-
title:
|
|
390
|
-
description:
|
|
391
|
-
confirmLabel:
|
|
392
|
-
cancelLabel:
|
|
389
|
+
title: f("devportal.deactivateApplication", "Deactivate Application"),
|
|
390
|
+
description: f("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."),
|
|
391
|
+
confirmLabel: f("devportal.deactivate", "Deactivate"),
|
|
392
|
+
cancelLabel: f("devportal.cancel", "Cancel"),
|
|
393
393
|
variant: "destructive",
|
|
394
394
|
loading: W
|
|
395
395
|
}),
|
|
396
396
|
/* @__PURE__ */ Y(ee, {
|
|
397
|
-
open:
|
|
398
|
-
onOpenChange:
|
|
397
|
+
open: L,
|
|
398
|
+
onOpenChange: R,
|
|
399
399
|
appId: Z.appId || "",
|
|
400
400
|
appName: Z.name,
|
|
401
401
|
appScopes: Z.scopes?.map((e) => e.scope) ?? [],
|
|
402
402
|
onSuccess: () => {
|
|
403
|
-
|
|
403
|
+
R(!1);
|
|
404
404
|
}
|
|
405
405
|
})
|
|
406
406
|
]
|
|
407
|
-
}) : /* @__PURE__ */ Y(
|
|
408
|
-
title:
|
|
409
|
-
backLink: `${
|
|
410
|
-
backLabel:
|
|
407
|
+
}) : /* @__PURE__ */ Y(p, {
|
|
408
|
+
title: f("devportal.notFound", "Not Found"),
|
|
409
|
+
backLink: `${o}/apps`,
|
|
410
|
+
backLabel: f("devportal.backToApplications", "Back to Applications"),
|
|
411
411
|
children: /* @__PURE__ */ Y(r, {
|
|
412
|
-
icon: /* @__PURE__ */ Y(
|
|
413
|
-
title:
|
|
414
|
-
description:
|
|
412
|
+
icon: /* @__PURE__ */ Y(ne, { size: 48 }),
|
|
413
|
+
title: f("devportal.applicationNotFound", "Application not found"),
|
|
414
|
+
description: f("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
415
415
|
})
|
|
416
416
|
});
|
|
417
417
|
}, xe = ({ onNavigate: e }) => {
|
|
418
|
-
let { t } =
|
|
418
|
+
let { t } = F(), n = (e, n) => {
|
|
419
419
|
let r = t(e);
|
|
420
420
|
return r === e ? n : r;
|
|
421
421
|
};
|
|
@@ -439,7 +439,7 @@ var ge = [
|
|
|
439
439
|
]
|
|
440
440
|
});
|
|
441
441
|
}, Se = ({ onNavigate: e }) => {
|
|
442
|
-
let { t } =
|
|
442
|
+
let { t } = F(), n = (e, n) => {
|
|
443
443
|
let r = t(e);
|
|
444
444
|
return r === e ? n : r;
|
|
445
445
|
};
|
|
@@ -463,46 +463,46 @@ var ge = [
|
|
|
463
463
|
]
|
|
464
464
|
});
|
|
465
465
|
}, Ce = ({ appId: e, onNavigate: t }) => {
|
|
466
|
-
let { t: n } =
|
|
466
|
+
let { t: n } = F(), r = (e, t) => {
|
|
467
467
|
let r = n(e);
|
|
468
468
|
return r === e ? t : r;
|
|
469
|
-
}, { data: i, loading: a, error: o } =
|
|
469
|
+
}, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
|
|
470
470
|
return a ? /* @__PURE__ */ Y(ve, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ Y(ye, { message: o.message }) : /* @__PURE__ */ Y(De, {
|
|
471
471
|
appId: e,
|
|
472
472
|
webhooks: (i?.webhooks ?? []).map(Z),
|
|
473
473
|
onNavigate: t
|
|
474
474
|
});
|
|
475
|
-
}, we = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate:
|
|
476
|
-
let { t:
|
|
477
|
-
let n =
|
|
475
|
+
}, we = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
476
|
+
let { t: o } = F(), s = (e, t) => {
|
|
477
|
+
let n = o(e);
|
|
478
478
|
return n === e ? t : n;
|
|
479
|
-
}, { data:
|
|
480
|
-
|
|
479
|
+
}, { data: c, loading: l, error: d, refetch: f } = i(), [p] = u(), [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(he) : [], [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)), E = C.some((e) => v.has(e.id)) && !T, ee = A((e, t) => {
|
|
480
|
+
y((n) => {
|
|
481
481
|
let r = new Set(n);
|
|
482
482
|
return t ? r.add(e) : r.delete(e), r;
|
|
483
483
|
});
|
|
484
|
-
}, []), O =
|
|
485
|
-
|
|
484
|
+
}, []), O = A((e) => {
|
|
485
|
+
y((t) => {
|
|
486
486
|
let n = new Set(t);
|
|
487
487
|
return C.forEach((t) => {
|
|
488
488
|
e ? n.add(t.id) : n.delete(t.id);
|
|
489
489
|
}), n;
|
|
490
490
|
});
|
|
491
|
-
}, [C]), k =
|
|
492
|
-
|
|
493
|
-
}, []),
|
|
494
|
-
|
|
491
|
+
}, [C]), k = A(() => {
|
|
492
|
+
y(/* @__PURE__ */ new Set());
|
|
493
|
+
}, []), te = A(async (e) => {
|
|
494
|
+
_(!0);
|
|
495
495
|
try {
|
|
496
|
-
let t = await Promise.allSettled(e.map((e) =>
|
|
497
|
-
x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`),
|
|
496
|
+
let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
497
|
+
x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
|
|
498
498
|
let n = new Set(t);
|
|
499
499
|
return e.forEach((e) => n.delete(e)), n;
|
|
500
|
-
}),
|
|
500
|
+
}), h([]), f();
|
|
501
501
|
} catch {} finally {
|
|
502
|
-
|
|
502
|
+
_(!1);
|
|
503
503
|
}
|
|
504
|
-
}, [
|
|
505
|
-
return e ?
|
|
504
|
+
}, [p, f]);
|
|
505
|
+
return e ? l ? /* @__PURE__ */ Y(ve, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : d ? /* @__PURE__ */ Y(ye, { message: d.message }) : /* @__PURE__ */ X(J, { children: [
|
|
506
506
|
b && /* @__PURE__ */ Y("div", {
|
|
507
507
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
508
508
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -510,7 +510,7 @@ var ge = [
|
|
|
510
510
|
children: [/* @__PURE__ */ Y("span", { children: b }), /* @__PURE__ */ Y("button", {
|
|
511
511
|
onClick: () => x(null),
|
|
512
512
|
className: "text-status-success-text hover:text-status-success-text",
|
|
513
|
-
children:
|
|
513
|
+
children: s("devportal.dismiss", "Dismiss")
|
|
514
514
|
})]
|
|
515
515
|
})
|
|
516
516
|
}),
|
|
@@ -518,56 +518,56 @@ var ge = [
|
|
|
518
518
|
appName: t,
|
|
519
519
|
delegations: S,
|
|
520
520
|
onGrantDelegation: n,
|
|
521
|
-
onRevokeDelegation: (e) =>
|
|
522
|
-
selectedDelegationIds:
|
|
521
|
+
onRevokeDelegation: (e) => h([e]),
|
|
522
|
+
selectedDelegationIds: v,
|
|
523
523
|
onToggleSelectDelegation: ee,
|
|
524
524
|
onToggleAllDelegations: O,
|
|
525
525
|
onClearSelection: k,
|
|
526
|
-
onRevokeSelected: () =>
|
|
527
|
-
allVisibleSelected:
|
|
528
|
-
partiallySelected:
|
|
526
|
+
onRevokeSelected: () => h(w.map((e) => e.id)),
|
|
527
|
+
allVisibleSelected: T,
|
|
528
|
+
partiallySelected: E
|
|
529
529
|
}),
|
|
530
|
-
/* @__PURE__ */ Y(
|
|
531
|
-
open:
|
|
530
|
+
/* @__PURE__ */ Y(D, {
|
|
531
|
+
open: m.length > 0,
|
|
532
532
|
onOpenChange: (e) => {
|
|
533
|
-
e ||
|
|
533
|
+
e || h([]);
|
|
534
534
|
},
|
|
535
535
|
onConfirm: () => {
|
|
536
|
-
|
|
536
|
+
m.length > 0 && te(m);
|
|
537
537
|
},
|
|
538
|
-
title:
|
|
539
|
-
description:
|
|
540
|
-
confirmLabel:
|
|
541
|
-
cancelLabel:
|
|
538
|
+
title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
539
|
+
description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
|
|
540
|
+
confirmLabel: s("devportal.revoke", "Revoke"),
|
|
541
|
+
cancelLabel: s("devportal.cancel", "Cancel"),
|
|
542
542
|
variant: "destructive",
|
|
543
|
-
loading:
|
|
543
|
+
loading: g
|
|
544
544
|
})
|
|
545
545
|
] }) : /* @__PURE__ */ Y(r, {
|
|
546
546
|
icon: /* @__PURE__ */ Y(W, { size: 32 }),
|
|
547
|
-
title:
|
|
548
|
-
description:
|
|
547
|
+
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
548
|
+
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
549
549
|
action: /* @__PURE__ */ X("button", {
|
|
550
|
-
onClick: () =>
|
|
550
|
+
onClick: () => a("/oauth"),
|
|
551
551
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
552
|
-
children: [/* @__PURE__ */ Y(B, { size: 16 }),
|
|
552
|
+
children: [/* @__PURE__ */ Y(B, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
553
553
|
})
|
|
554
554
|
});
|
|
555
555
|
}, Te = ({ appId: e }) => {
|
|
556
|
-
let { t } =
|
|
556
|
+
let { t } = F(), n = (e, n) => {
|
|
557
557
|
let r = t(e);
|
|
558
558
|
return r === e ? n : r;
|
|
559
|
-
}, r =
|
|
559
|
+
}, r = M(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
560
560
|
applicationId: e,
|
|
561
561
|
period: "daily",
|
|
562
|
-
startDate:
|
|
562
|
+
startDate: M(() => {
|
|
563
563
|
let e = new Date(r);
|
|
564
564
|
return e.setDate(e.getDate() - 30), e;
|
|
565
565
|
}, [r]).toISOString(),
|
|
566
566
|
endDate: r.toISOString()
|
|
567
567
|
} });
|
|
568
|
-
return a ? /* @__PURE__ */ Y(ve, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) :
|
|
568
|
+
return a ? /* @__PURE__ */ Y(ve, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ Y(ye, { message: s.message }) : /* @__PURE__ */ Y(ke, { analytics: (i?.applicationAnalytics ?? []).map(me) });
|
|
569
569
|
}, Ee = ({ app: e }) => {
|
|
570
|
-
let { t } =
|
|
570
|
+
let { t } = F(), n = (e, n) => {
|
|
571
571
|
let r = t(e);
|
|
572
572
|
return r === e ? n : r;
|
|
573
573
|
};
|
|
@@ -597,7 +597,7 @@ var ge = [
|
|
|
597
597
|
})
|
|
598
598
|
]
|
|
599
599
|
}),
|
|
600
|
-
/* @__PURE__ */ Y(
|
|
600
|
+
/* @__PURE__ */ Y(m, {
|
|
601
601
|
title: n("devportal.description", "Description"),
|
|
602
602
|
children: /* @__PURE__ */ Y("div", {
|
|
603
603
|
className: "prose prose-sm max-w-none",
|
|
@@ -607,7 +607,7 @@ var ge = [
|
|
|
607
607
|
})
|
|
608
608
|
})
|
|
609
609
|
}),
|
|
610
|
-
/* @__PURE__ */ Y(
|
|
610
|
+
/* @__PURE__ */ Y(m, {
|
|
611
611
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
612
612
|
children: /* @__PURE__ */ X("div", {
|
|
613
613
|
className: "space-y-3",
|
|
@@ -635,9 +635,9 @@ var ge = [
|
|
|
635
635
|
]
|
|
636
636
|
}), /* @__PURE__ */ X("div", {
|
|
637
637
|
className: "space-y-6",
|
|
638
|
-
children: [/* @__PURE__ */ Y(
|
|
638
|
+
children: [/* @__PURE__ */ Y(m, {
|
|
639
639
|
title: n("devportal.details", "Details"),
|
|
640
|
-
children: /* @__PURE__ */ Y(
|
|
640
|
+
children: /* @__PURE__ */ Y(C, { items: [
|
|
641
641
|
{
|
|
642
642
|
label: n("devportal.appId", "App ID"),
|
|
643
643
|
value: /* @__PURE__ */ Y("code", {
|
|
@@ -670,7 +670,7 @@ var ge = [
|
|
|
670
670
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
671
671
|
}
|
|
672
672
|
] })
|
|
673
|
-
}), /* @__PURE__ */ Y(
|
|
673
|
+
}), /* @__PURE__ */ Y(m, {
|
|
674
674
|
title: n("devportal.links", "Links"),
|
|
675
675
|
children: /* @__PURE__ */ X("div", {
|
|
676
676
|
className: "space-y-2",
|
|
@@ -705,7 +705,7 @@ var ge = [
|
|
|
705
705
|
})]
|
|
706
706
|
});
|
|
707
707
|
}, De = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
708
|
-
let { t: i } =
|
|
708
|
+
let { t: i } = F(), a = (e, t) => {
|
|
709
709
|
let n = i(e);
|
|
710
710
|
return n === e ? t : n;
|
|
711
711
|
};
|
|
@@ -739,7 +739,7 @@ var ge = [
|
|
|
739
739
|
children: [/* @__PURE__ */ Y("h3", {
|
|
740
740
|
className: "font-medium",
|
|
741
741
|
children: t.name
|
|
742
|
-
}), /* @__PURE__ */ Y(
|
|
742
|
+
}), /* @__PURE__ */ Y(_, {
|
|
743
743
|
status: t.status,
|
|
744
744
|
type: "webhook"
|
|
745
745
|
})]
|
|
@@ -815,11 +815,11 @@ var ge = [
|
|
|
815
815
|
})
|
|
816
816
|
})]
|
|
817
817
|
});
|
|
818
|
-
}, Oe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected:
|
|
819
|
-
let { t:
|
|
820
|
-
let n =
|
|
818
|
+
}, Oe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
819
|
+
let { t: p } = F(), m = (e, t) => {
|
|
820
|
+
let n = p(e);
|
|
821
821
|
return n === e ? t : n;
|
|
822
|
-
},
|
|
822
|
+
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
823
823
|
return /* @__PURE__ */ X("div", {
|
|
824
824
|
className: "space-y-6",
|
|
825
825
|
children: [
|
|
@@ -830,31 +830,31 @@ var ge = [
|
|
|
830
830
|
children: [
|
|
831
831
|
n.length,
|
|
832
832
|
" ",
|
|
833
|
-
n.length === 1 ?
|
|
833
|
+
n.length === 1 ? m("devportal.delegation", "delegation") : m("devportal.delegations", "delegations"),
|
|
834
834
|
" ",
|
|
835
|
-
|
|
835
|
+
m("devportal.for", "for"),
|
|
836
836
|
" ",
|
|
837
837
|
e
|
|
838
838
|
]
|
|
839
|
-
}),
|
|
839
|
+
}), h.length > 0 && /* @__PURE__ */ X("p", {
|
|
840
840
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
841
841
|
children: [
|
|
842
|
-
|
|
842
|
+
h.length,
|
|
843
843
|
" ",
|
|
844
|
-
|
|
844
|
+
m("devportal.active", "active"),
|
|
845
845
|
",",
|
|
846
846
|
" ",
|
|
847
|
-
|
|
847
|
+
g.length,
|
|
848
848
|
" ",
|
|
849
|
-
|
|
849
|
+
m("devportal.revokedExpired", "revoked/expired")
|
|
850
850
|
]
|
|
851
851
|
})] }), /* @__PURE__ */ X("button", {
|
|
852
852
|
onClick: i,
|
|
853
853
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
854
|
-
children: [/* @__PURE__ */ Y(U, { size: 16 }),
|
|
854
|
+
children: [/* @__PURE__ */ Y(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
855
855
|
})]
|
|
856
856
|
}),
|
|
857
|
-
|
|
857
|
+
h.length > 0 && /* @__PURE__ */ Y("div", {
|
|
858
858
|
className: "rounded-lg border bg-card p-4",
|
|
859
859
|
children: /* @__PURE__ */ X("div", {
|
|
860
860
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
@@ -862,19 +862,19 @@ var ge = [
|
|
|
862
862
|
className: "flex flex-wrap items-center gap-3",
|
|
863
863
|
children: [/* @__PURE__ */ X("div", {
|
|
864
864
|
className: "flex items-center gap-2",
|
|
865
|
-
children: [/* @__PURE__ */ Y(
|
|
866
|
-
checked:
|
|
867
|
-
indeterminate:
|
|
865
|
+
children: [/* @__PURE__ */ Y(y, {
|
|
866
|
+
checked: d,
|
|
867
|
+
indeterminate: f,
|
|
868
868
|
onChange: c,
|
|
869
|
-
ariaLabel:
|
|
869
|
+
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
870
870
|
}), /* @__PURE__ */ Y("span", {
|
|
871
871
|
className: "text-sm font-medium",
|
|
872
|
-
children:
|
|
872
|
+
children: m("devportal.selectAllActive", "Select all active")
|
|
873
873
|
})]
|
|
874
874
|
}), o.size > 0 && /* @__PURE__ */ Y("button", {
|
|
875
875
|
onClick: l,
|
|
876
876
|
className: "text-sm text-muted-foreground hover:text-foreground",
|
|
877
|
-
children:
|
|
877
|
+
children: m("devportal.clearSelection", "Clear selection")
|
|
878
878
|
})]
|
|
879
879
|
}), /* @__PURE__ */ X("div", {
|
|
880
880
|
className: "flex flex-wrap items-center gap-2",
|
|
@@ -883,13 +883,13 @@ var ge = [
|
|
|
883
883
|
children: [
|
|
884
884
|
o.size,
|
|
885
885
|
" ",
|
|
886
|
-
|
|
886
|
+
m("devportal.selected", "selected")
|
|
887
887
|
]
|
|
888
888
|
}), /* @__PURE__ */ X("button", {
|
|
889
|
-
onClick:
|
|
889
|
+
onClick: u,
|
|
890
890
|
disabled: o.size === 0,
|
|
891
891
|
className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
892
|
-
children: [
|
|
892
|
+
children: [m("devportal.revokeSelected", "Revoke Selected"), o.size > 0 ? ` (${o.size})` : ""]
|
|
893
893
|
})]
|
|
894
894
|
})]
|
|
895
895
|
})
|
|
@@ -905,7 +905,7 @@ var ge = [
|
|
|
905
905
|
className: "flex items-start gap-3",
|
|
906
906
|
children: [e.status === "ACTIVE" && /* @__PURE__ */ Y("div", {
|
|
907
907
|
onClick: (e) => e.stopPropagation(),
|
|
908
|
-
children: /* @__PURE__ */ Y(
|
|
908
|
+
children: /* @__PURE__ */ Y(y, {
|
|
909
909
|
checked: o.has(e.id),
|
|
910
910
|
onChange: (t) => s(e.id, t),
|
|
911
911
|
ariaLabel: `Select delegation ${e.id}`,
|
|
@@ -923,24 +923,24 @@ var ge = [
|
|
|
923
923
|
}), /* @__PURE__ */ X("p", {
|
|
924
924
|
className: "text-sm text-muted-foreground mt-1",
|
|
925
925
|
children: [
|
|
926
|
-
|
|
926
|
+
m("devportal.granted", "Granted"),
|
|
927
927
|
" ",
|
|
928
928
|
new Date(e.grantedAt).toLocaleDateString(),
|
|
929
929
|
" ",
|
|
930
|
-
|
|
930
|
+
m("devportal.by", "by"),
|
|
931
931
|
" ",
|
|
932
|
-
e.grantedBy === e.userId ?
|
|
932
|
+
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
933
933
|
]
|
|
934
934
|
})] })]
|
|
935
935
|
}), e.status === "ACTIVE" && /* @__PURE__ */ X("button", {
|
|
936
936
|
onClick: () => a(e.id),
|
|
937
937
|
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",
|
|
938
|
-
children: [/* @__PURE__ */ Y(de, { size: 14 }),
|
|
938
|
+
children: [/* @__PURE__ */ Y(de, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
939
939
|
})]
|
|
940
940
|
}),
|
|
941
941
|
/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
|
|
942
942
|
className: "text-xs text-muted-foreground mb-2",
|
|
943
|
-
children:
|
|
943
|
+
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
944
944
|
}), /* @__PURE__ */ Y("div", {
|
|
945
945
|
className: "flex flex-wrap gap-2",
|
|
946
946
|
children: e.scopes.map((e) => /* @__PURE__ */ Y("span", {
|
|
@@ -950,7 +950,7 @@ var ge = [
|
|
|
950
950
|
})] }),
|
|
951
951
|
e.workspaceIds.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
|
|
952
952
|
className: "text-xs text-muted-foreground mb-2",
|
|
953
|
-
children:
|
|
953
|
+
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
954
954
|
}), /* @__PURE__ */ Y("div", {
|
|
955
955
|
className: "flex flex-wrap gap-2",
|
|
956
956
|
children: e.workspaceIds.map((e) => /* @__PURE__ */ Y("code", {
|
|
@@ -964,18 +964,18 @@ var ge = [
|
|
|
964
964
|
e.expiresAt && /* @__PURE__ */ X("span", {
|
|
965
965
|
className: "flex items-center gap-1",
|
|
966
966
|
children: [
|
|
967
|
-
/* @__PURE__ */ Y(
|
|
968
|
-
|
|
967
|
+
/* @__PURE__ */ Y(z, { size: 12 }),
|
|
968
|
+
m("devportal.expires", "Expires"),
|
|
969
969
|
" ",
|
|
970
970
|
new Date(e.expiresAt).toLocaleDateString()
|
|
971
971
|
]
|
|
972
972
|
}),
|
|
973
973
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ X("span", {
|
|
974
974
|
className: "flex items-center gap-1",
|
|
975
|
-
children: [/* @__PURE__ */ Y(
|
|
975
|
+
children: [/* @__PURE__ */ Y(R, {
|
|
976
976
|
size: 12,
|
|
977
977
|
className: "text-status-success-text"
|
|
978
|
-
}),
|
|
978
|
+
}), m("devportal.noExpiration", "No expiration")]
|
|
979
979
|
}),
|
|
980
980
|
e.revokedAt && /* @__PURE__ */ X("span", {
|
|
981
981
|
className: "flex items-center gap-1",
|
|
@@ -984,7 +984,7 @@ var ge = [
|
|
|
984
984
|
size: 12,
|
|
985
985
|
className: "text-status-error-text"
|
|
986
986
|
}),
|
|
987
|
-
|
|
987
|
+
m("devportal.revoked", "Revoked"),
|
|
988
988
|
" ",
|
|
989
989
|
new Date(e.revokedAt).toLocaleDateString()
|
|
990
990
|
]
|
|
@@ -995,21 +995,21 @@ var ge = [
|
|
|
995
995
|
}, e.id))
|
|
996
996
|
}) : /* @__PURE__ */ Y(r, {
|
|
997
997
|
icon: /* @__PURE__ */ Y(q, { size: 32 }),
|
|
998
|
-
title:
|
|
999
|
-
description:
|
|
998
|
+
title: m("devportal.noDelegations", "No delegations"),
|
|
999
|
+
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1000
1000
|
action: /* @__PURE__ */ X("button", {
|
|
1001
1001
|
onClick: i,
|
|
1002
1002
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
1003
|
-
children: [/* @__PURE__ */ Y(U, { size: 16 }),
|
|
1003
|
+
children: [/* @__PURE__ */ Y(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1004
1004
|
})
|
|
1005
1005
|
})
|
|
1006
1006
|
]
|
|
1007
1007
|
});
|
|
1008
1008
|
}, ke = ({ analytics: e }) => {
|
|
1009
|
-
let { t } =
|
|
1009
|
+
let { t } = F(), n = (e, n) => {
|
|
1010
1010
|
let r = t(e);
|
|
1011
1011
|
return r === e ? n : r;
|
|
1012
|
-
}, i = e[0],
|
|
1012
|
+
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
1013
1013
|
return /* @__PURE__ */ X("div", {
|
|
1014
1014
|
className: "space-y-6",
|
|
1015
1015
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -1018,27 +1018,27 @@ var ge = [
|
|
|
1018
1018
|
/* @__PURE__ */ Y(Q, {
|
|
1019
1019
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1020
1020
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1021
|
-
trend:
|
|
1021
|
+
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1022
1022
|
}),
|
|
1023
1023
|
/* @__PURE__ */ Y(Q, {
|
|
1024
1024
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1025
1025
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1026
|
-
trend:
|
|
1026
|
+
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1027
1027
|
}),
|
|
1028
1028
|
/* @__PURE__ */ Y(Q, {
|
|
1029
1029
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1030
1030
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1031
|
-
trend:
|
|
1031
|
+
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1032
1032
|
}),
|
|
1033
1033
|
/* @__PURE__ */ Y(Q, {
|
|
1034
1034
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1035
1035
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1036
|
-
trend:
|
|
1036
|
+
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1037
1037
|
})
|
|
1038
1038
|
]
|
|
1039
|
-
}), /* @__PURE__ */ Y(
|
|
1039
|
+
}), /* @__PURE__ */ Y(m, {
|
|
1040
1040
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1041
|
-
children: e.length > 0 ? /* @__PURE__ */ Y(
|
|
1041
|
+
children: e.length > 0 ? /* @__PURE__ */ Y(S, {
|
|
1042
1042
|
data: e,
|
|
1043
1043
|
keyField: "id",
|
|
1044
1044
|
columns: [
|
|
@@ -1079,17 +1079,17 @@ var ge = [
|
|
|
1079
1079
|
}
|
|
1080
1080
|
]
|
|
1081
1081
|
}) : /* @__PURE__ */ Y(r, {
|
|
1082
|
-
icon: /* @__PURE__ */ Y(
|
|
1082
|
+
icon: /* @__PURE__ */ Y(L, { size: 32 }),
|
|
1083
1083
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1084
1084
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1085
1085
|
})
|
|
1086
1086
|
})]
|
|
1087
1087
|
});
|
|
1088
1088
|
}, Ae = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", je = ({ app: t }) => {
|
|
1089
|
-
let { apiGatewayUrl: n, authToken: r } = e(), { t: i } =
|
|
1089
|
+
let { apiGatewayUrl: n, authToken: r } = e(), { t: i } = F(), a = (e, t) => {
|
|
1090
1090
|
let n = i(e);
|
|
1091
1091
|
return n === e ? t : n;
|
|
1092
|
-
}, [o, s] =
|
|
1092
|
+
}, [o, s] = P(Ae), [c, l] = P("{}"), [u, d] = P(""), [f, p] = P(!1), [m, h] = P(`${n || "http://localhost:4000"}/global/graphql`), [g, _] = P(r || ""), [v, y] = P(!1), b = A(async () => {
|
|
1093
1093
|
p(!0), d("");
|
|
1094
1094
|
try {
|
|
1095
1095
|
let e = {};
|
|
@@ -1120,7 +1120,7 @@ var ge = [
|
|
|
1120
1120
|
c,
|
|
1121
1121
|
m,
|
|
1122
1122
|
g
|
|
1123
|
-
]), x =
|
|
1123
|
+
]), x = A(() => {
|
|
1124
1124
|
r && _(r), y(!0);
|
|
1125
1125
|
}, [r]);
|
|
1126
1126
|
return /* @__PURE__ */ X("div", {
|
|
@@ -1402,87 +1402,87 @@ function Ie(e) {
|
|
|
1402
1402
|
};
|
|
1403
1403
|
}
|
|
1404
1404
|
var Le = ({ app: t }) => {
|
|
1405
|
-
let { workspacesGatewayUrl: n, authToken: r, workspaceId: i, getWorkspaceToken:
|
|
1406
|
-
let n =
|
|
1405
|
+
let { workspacesGatewayUrl: n, authToken: r, workspaceId: i, getWorkspaceToken: a } = e(), { t: o } = F(), s = (e, t) => {
|
|
1406
|
+
let n = o(e);
|
|
1407
1407
|
return n === e ? t : n;
|
|
1408
|
-
}, [
|
|
1409
|
-
|
|
1410
|
-
let [
|
|
1411
|
-
|
|
1412
|
-
|
|
1408
|
+
}, [c, l] = P(() => Ie(t)), [u, d] = P(!1), p = N(t);
|
|
1409
|
+
p.current = t;
|
|
1410
|
+
let [h] = f();
|
|
1411
|
+
j(() => {
|
|
1412
|
+
l(Ie(p.current));
|
|
1413
1413
|
}, [t.id]);
|
|
1414
|
-
let
|
|
1415
|
-
|
|
1414
|
+
let g = (e, t) => {
|
|
1415
|
+
l((n) => ({
|
|
1416
1416
|
...n,
|
|
1417
1417
|
[e]: t
|
|
1418
1418
|
}));
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1419
|
+
}, _ = async () => {
|
|
1420
|
+
d(!0);
|
|
1421
1421
|
try {
|
|
1422
|
-
let e =
|
|
1422
|
+
let e = c.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = c.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Me.has(c.manifestItemType), i = t.manifest ?? {}, a = {
|
|
1423
1423
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1424
|
-
itemType:
|
|
1424
|
+
itemType: c.manifestItemType || void 0,
|
|
1425
1425
|
identity: {
|
|
1426
|
-
version:
|
|
1427
|
-
displayName:
|
|
1426
|
+
version: c.manifestVersion || "1.0.0",
|
|
1427
|
+
displayName: c.manifestDisplayName
|
|
1428
1428
|
},
|
|
1429
|
-
...r ? { jsonContent:
|
|
1430
|
-
type:
|
|
1431
|
-
packageName:
|
|
1432
|
-
registryUrl:
|
|
1429
|
+
...r ? { jsonContent: c.manifestJsonContent || void 0 } : { digital: { install: {
|
|
1430
|
+
type: c.manifestInstallType,
|
|
1431
|
+
packageName: c.manifestPackageName,
|
|
1432
|
+
registryUrl: c.manifestRegistryUrl
|
|
1433
1433
|
} } },
|
|
1434
1434
|
permissions: n,
|
|
1435
|
-
compatibility: { minPlatformVersion:
|
|
1435
|
+
compatibility: { minPlatformVersion: c.manifestMinPlatformVersion }
|
|
1436
1436
|
}, o = { ...t.pricingDetails ?? {} };
|
|
1437
|
-
if (
|
|
1438
|
-
let e = parseFloat(
|
|
1439
|
-
isNaN(e) || (o.price = e),
|
|
1437
|
+
if (c.pricingType !== "FREE") {
|
|
1438
|
+
let e = parseFloat(c.price);
|
|
1439
|
+
isNaN(e) || (o.price = e), c.currency && (o.currency = c.currency);
|
|
1440
1440
|
}
|
|
1441
|
-
await
|
|
1441
|
+
await h({ variables: {
|
|
1442
1442
|
id: t.id,
|
|
1443
1443
|
input: {
|
|
1444
|
-
iconUrl:
|
|
1445
|
-
bannerUrl:
|
|
1446
|
-
videoUrl:
|
|
1447
|
-
shortDescription:
|
|
1448
|
-
description:
|
|
1444
|
+
iconUrl: c.iconUrl || null,
|
|
1445
|
+
bannerUrl: c.bannerUrl || null,
|
|
1446
|
+
videoUrl: c.videoUrl || null,
|
|
1447
|
+
shortDescription: c.shortDescription || null,
|
|
1448
|
+
description: c.description || null,
|
|
1449
1449
|
screenshots: e.length > 0 ? e : null,
|
|
1450
|
-
websiteUrl:
|
|
1451
|
-
documentationUrl:
|
|
1452
|
-
githubUrl:
|
|
1453
|
-
supportUrl:
|
|
1454
|
-
privacyPolicyUrl:
|
|
1455
|
-
termsOfServiceUrl:
|
|
1456
|
-
pricingType:
|
|
1450
|
+
websiteUrl: c.websiteUrl || null,
|
|
1451
|
+
documentationUrl: c.documentationUrl || null,
|
|
1452
|
+
githubUrl: c.githubUrl || null,
|
|
1453
|
+
supportUrl: c.supportUrl || null,
|
|
1454
|
+
privacyPolicyUrl: c.privacyPolicyUrl || null,
|
|
1455
|
+
termsOfServiceUrl: c.termsOfServiceUrl || null,
|
|
1456
|
+
pricingType: c.pricingType || null,
|
|
1457
1457
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1458
1458
|
manifest: a
|
|
1459
1459
|
}
|
|
1460
|
-
} }),
|
|
1460
|
+
} }), b("success");
|
|
1461
1461
|
} catch {
|
|
1462
|
-
|
|
1462
|
+
b("error");
|
|
1463
1463
|
} finally {
|
|
1464
|
-
|
|
1464
|
+
d(!1);
|
|
1465
1465
|
}
|
|
1466
|
-
},
|
|
1466
|
+
}, v = N(null), y = N(null), { upload: x, uploading: S, progress: C, error: D } = te(n, r, i, a), ee = A(async (e) => {
|
|
1467
1467
|
let t = e.target.files?.[0];
|
|
1468
1468
|
if (t) {
|
|
1469
1469
|
e.target.value = "";
|
|
1470
1470
|
try {
|
|
1471
|
-
let e = await
|
|
1472
|
-
|
|
1471
|
+
let e = await x(t);
|
|
1472
|
+
l((t) => ({
|
|
1473
1473
|
...t,
|
|
1474
1474
|
manifestRegistryUrl: e.downloadUrl
|
|
1475
1475
|
}));
|
|
1476
1476
|
} catch {}
|
|
1477
1477
|
}
|
|
1478
|
-
}, [
|
|
1478
|
+
}, [x]), O = A((e) => {
|
|
1479
1479
|
let t = e.target.files?.[0];
|
|
1480
1480
|
if (!t) return;
|
|
1481
1481
|
let n = new FileReader();
|
|
1482
1482
|
n.onload = (e) => {
|
|
1483
1483
|
try {
|
|
1484
1484
|
let t = JSON.parse(e.target?.result), n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [];
|
|
1485
|
-
|
|
1485
|
+
l((e) => ({
|
|
1486
1486
|
...e,
|
|
1487
1487
|
manifestItemType: typeof t.itemType == "string" ? t.itemType : e.manifestItemType,
|
|
1488
1488
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.manifestDisplayName,
|
|
@@ -1495,153 +1495,153 @@ var Le = ({ app: t }) => {
|
|
|
1495
1495
|
}));
|
|
1496
1496
|
} catch {}
|
|
1497
1497
|
}, n.readAsText(t), e.target.value = "";
|
|
1498
|
-
}, []), k =
|
|
1499
|
-
let e =
|
|
1498
|
+
}, []), k = A(() => {
|
|
1499
|
+
let e = c.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), n = Me.has(c.manifestItemType), r = {
|
|
1500
1500
|
manifestVersion: "1.0",
|
|
1501
|
-
itemType:
|
|
1501
|
+
itemType: c.manifestItemType || void 0,
|
|
1502
1502
|
identity: {
|
|
1503
|
-
version:
|
|
1504
|
-
displayName:
|
|
1503
|
+
version: c.manifestVersion || "1.0.0",
|
|
1504
|
+
displayName: c.manifestDisplayName
|
|
1505
1505
|
},
|
|
1506
|
-
...n ? { jsonContent:
|
|
1507
|
-
type:
|
|
1508
|
-
packageName:
|
|
1509
|
-
registryUrl:
|
|
1506
|
+
...n ? { jsonContent: c.manifestJsonContent || void 0 } : { digital: { install: {
|
|
1507
|
+
type: c.manifestInstallType,
|
|
1508
|
+
packageName: c.manifestPackageName,
|
|
1509
|
+
registryUrl: c.manifestRegistryUrl
|
|
1510
1510
|
} } },
|
|
1511
1511
|
permissions: e,
|
|
1512
|
-
compatibility: { minPlatformVersion:
|
|
1512
|
+
compatibility: { minPlatformVersion: c.manifestMinPlatformVersion }
|
|
1513
1513
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1514
1514
|
o.href = a, o.download = `${t.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1515
|
-
}, [t.slug,
|
|
1515
|
+
}, [t.slug, c]), M = c.pricingType !== "FREE", I = Me.has(c.manifestItemType), ne = !I && (c.manifestInstallType === "npm" || c.manifestInstallType === "git"), L = !I && (c.manifestInstallType === "git" || c.manifestInstallType === "zip"), R = c.manifestInstallType === "zip" ? s("devportal.zipDownloadUrl", "Zip Download URL") : s("devportal.repositoryUrl", "Repository URL"), z = c.manifestInstallType === "zip" ? "https://cdn.example.com/my-app-1.0.0.zip" : "https://github.com/org/repo";
|
|
1516
1516
|
return /* @__PURE__ */ X("div", {
|
|
1517
1517
|
className: "space-y-8 max-w-3xl",
|
|
1518
1518
|
children: [
|
|
1519
|
-
/* @__PURE__ */ Y(
|
|
1520
|
-
title:
|
|
1521
|
-
description:
|
|
1519
|
+
/* @__PURE__ */ Y(m, {
|
|
1520
|
+
title: s("devportal.storePresentation", "Store Presentation"),
|
|
1521
|
+
description: s("devportal.storePresentationDescription", "Visual assets and descriptions shown in the store listing"),
|
|
1522
1522
|
children: /* @__PURE__ */ X("div", {
|
|
1523
1523
|
className: "space-y-4",
|
|
1524
1524
|
children: [
|
|
1525
|
-
/* @__PURE__ */ Y(
|
|
1526
|
-
label:
|
|
1527
|
-
value:
|
|
1528
|
-
onChange: (e) =>
|
|
1525
|
+
/* @__PURE__ */ Y(w, {
|
|
1526
|
+
label: s("devportal.iconUrl", "Icon URL"),
|
|
1527
|
+
value: c.iconUrl,
|
|
1528
|
+
onChange: (e) => g("iconUrl", e.target.value),
|
|
1529
1529
|
placeholder: "https://..."
|
|
1530
1530
|
}),
|
|
1531
|
-
/* @__PURE__ */ Y(
|
|
1532
|
-
label:
|
|
1533
|
-
value:
|
|
1534
|
-
onChange: (e) =>
|
|
1531
|
+
/* @__PURE__ */ Y(w, {
|
|
1532
|
+
label: s("devportal.bannerUrl", "Banner URL"),
|
|
1533
|
+
value: c.bannerUrl,
|
|
1534
|
+
onChange: (e) => g("bannerUrl", e.target.value),
|
|
1535
1535
|
placeholder: "https://..."
|
|
1536
1536
|
}),
|
|
1537
|
-
/* @__PURE__ */ Y(
|
|
1538
|
-
label:
|
|
1539
|
-
value:
|
|
1540
|
-
onChange: (e) =>
|
|
1537
|
+
/* @__PURE__ */ Y(w, {
|
|
1538
|
+
label: s("devportal.videoUrl", "Video URL"),
|
|
1539
|
+
value: c.videoUrl,
|
|
1540
|
+
onChange: (e) => g("videoUrl", e.target.value),
|
|
1541
1541
|
placeholder: "https://...",
|
|
1542
|
-
hint:
|
|
1542
|
+
hint: s("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
1543
1543
|
}),
|
|
1544
|
-
/* @__PURE__ */ Y(
|
|
1545
|
-
label:
|
|
1546
|
-
value:
|
|
1547
|
-
onChange: (e) =>
|
|
1544
|
+
/* @__PURE__ */ Y(E, {
|
|
1545
|
+
label: s("devportal.shortDescription", "Short Description"),
|
|
1546
|
+
value: c.shortDescription,
|
|
1547
|
+
onChange: (e) => g("shortDescription", e.target.value),
|
|
1548
1548
|
maxLength: 200,
|
|
1549
1549
|
rows: 2,
|
|
1550
|
-
hint: `${
|
|
1550
|
+
hint: `${c.shortDescription.length}/200 ${s("devportal.characters", "characters")}`
|
|
1551
1551
|
}),
|
|
1552
|
-
/* @__PURE__ */ Y(
|
|
1553
|
-
label:
|
|
1554
|
-
value:
|
|
1555
|
-
onChange: (e) =>
|
|
1552
|
+
/* @__PURE__ */ Y(E, {
|
|
1553
|
+
label: s("devportal.longDescription", "Long Description"),
|
|
1554
|
+
value: c.description,
|
|
1555
|
+
onChange: (e) => g("description", e.target.value),
|
|
1556
1556
|
rows: 4
|
|
1557
1557
|
}),
|
|
1558
|
-
/* @__PURE__ */ Y(
|
|
1559
|
-
label:
|
|
1560
|
-
value:
|
|
1561
|
-
onChange: (e) =>
|
|
1558
|
+
/* @__PURE__ */ Y(E, {
|
|
1559
|
+
label: s("devportal.screenshotUrls", "Screenshot URLs (one per line)"),
|
|
1560
|
+
value: c.screenshotsText,
|
|
1561
|
+
onChange: (e) => g("screenshotsText", e.target.value),
|
|
1562
1562
|
rows: 4,
|
|
1563
1563
|
placeholder: "https://...\nhttps://..."
|
|
1564
1564
|
})
|
|
1565
1565
|
]
|
|
1566
1566
|
})
|
|
1567
1567
|
}),
|
|
1568
|
-
/* @__PURE__ */ Y(
|
|
1569
|
-
title:
|
|
1570
|
-
description:
|
|
1568
|
+
/* @__PURE__ */ Y(m, {
|
|
1569
|
+
title: s("devportal.linksPolicies", "Links & Policies"),
|
|
1570
|
+
description: s("devportal.linksPoliciesDescription", "External resources and legal documents for your application"),
|
|
1571
1571
|
children: /* @__PURE__ */ X("div", {
|
|
1572
1572
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1573
1573
|
children: [
|
|
1574
|
-
/* @__PURE__ */ Y(
|
|
1575
|
-
label:
|
|
1576
|
-
value:
|
|
1577
|
-
onChange: (e) =>
|
|
1574
|
+
/* @__PURE__ */ Y(w, {
|
|
1575
|
+
label: s("devportal.websiteUrl", "Website URL"),
|
|
1576
|
+
value: c.websiteUrl,
|
|
1577
|
+
onChange: (e) => g("websiteUrl", e.target.value),
|
|
1578
1578
|
placeholder: "https://..."
|
|
1579
1579
|
}),
|
|
1580
|
-
/* @__PURE__ */ Y(
|
|
1581
|
-
label:
|
|
1582
|
-
value:
|
|
1583
|
-
onChange: (e) =>
|
|
1580
|
+
/* @__PURE__ */ Y(w, {
|
|
1581
|
+
label: s("devportal.documentationUrl", "Documentation URL"),
|
|
1582
|
+
value: c.documentationUrl,
|
|
1583
|
+
onChange: (e) => g("documentationUrl", e.target.value),
|
|
1584
1584
|
placeholder: "https://..."
|
|
1585
1585
|
}),
|
|
1586
|
-
/* @__PURE__ */ Y(
|
|
1587
|
-
label:
|
|
1588
|
-
value:
|
|
1589
|
-
onChange: (e) =>
|
|
1586
|
+
/* @__PURE__ */ Y(w, {
|
|
1587
|
+
label: s("devportal.githubUrl", "GitHub URL"),
|
|
1588
|
+
value: c.githubUrl,
|
|
1589
|
+
onChange: (e) => g("githubUrl", e.target.value),
|
|
1590
1590
|
placeholder: "https://..."
|
|
1591
1591
|
}),
|
|
1592
|
-
/* @__PURE__ */ Y(
|
|
1593
|
-
label:
|
|
1594
|
-
value:
|
|
1595
|
-
onChange: (e) =>
|
|
1592
|
+
/* @__PURE__ */ Y(w, {
|
|
1593
|
+
label: s("devportal.supportUrl", "Support URL"),
|
|
1594
|
+
value: c.supportUrl,
|
|
1595
|
+
onChange: (e) => g("supportUrl", e.target.value),
|
|
1596
1596
|
placeholder: "https://..."
|
|
1597
1597
|
}),
|
|
1598
|
-
/* @__PURE__ */ Y(
|
|
1599
|
-
label: `${
|
|
1600
|
-
value:
|
|
1601
|
-
onChange: (e) =>
|
|
1598
|
+
/* @__PURE__ */ Y(w, {
|
|
1599
|
+
label: `${s("devportal.privacyPolicyUrl", "Privacy Policy URL")} *`,
|
|
1600
|
+
value: c.privacyPolicyUrl,
|
|
1601
|
+
onChange: (e) => g("privacyPolicyUrl", e.target.value),
|
|
1602
1602
|
placeholder: "https://...",
|
|
1603
|
-
hint:
|
|
1603
|
+
hint: s("devportal.requiredForStore", "Required for store submission")
|
|
1604
1604
|
}),
|
|
1605
|
-
/* @__PURE__ */ Y(
|
|
1606
|
-
label: `${
|
|
1607
|
-
value:
|
|
1608
|
-
onChange: (e) =>
|
|
1605
|
+
/* @__PURE__ */ Y(w, {
|
|
1606
|
+
label: `${s("devportal.termsOfServiceUrl", "Terms of Service URL")} *`,
|
|
1607
|
+
value: c.termsOfServiceUrl,
|
|
1608
|
+
onChange: (e) => g("termsOfServiceUrl", e.target.value),
|
|
1609
1609
|
placeholder: "https://...",
|
|
1610
|
-
hint:
|
|
1610
|
+
hint: s("devportal.requiredForStore", "Required for store submission")
|
|
1611
1611
|
})
|
|
1612
1612
|
]
|
|
1613
1613
|
})
|
|
1614
1614
|
}),
|
|
1615
|
-
/* @__PURE__ */ Y(
|
|
1616
|
-
title:
|
|
1617
|
-
description:
|
|
1615
|
+
/* @__PURE__ */ Y(m, {
|
|
1616
|
+
title: s("devportal.pricing", "Pricing"),
|
|
1617
|
+
description: s("devportal.pricingDescription", "Configure how your app is priced in the store"),
|
|
1618
1618
|
children: /* @__PURE__ */ X("div", {
|
|
1619
1619
|
className: "space-y-4",
|
|
1620
|
-
children: [/* @__PURE__ */ Y(
|
|
1621
|
-
label:
|
|
1622
|
-
value:
|
|
1623
|
-
onChange: (e) =>
|
|
1620
|
+
children: [/* @__PURE__ */ Y(T, {
|
|
1621
|
+
label: s("devportal.pricingType", "Pricing Type"),
|
|
1622
|
+
value: c.pricingType,
|
|
1623
|
+
onChange: (e) => g("pricingType", e.target.value),
|
|
1624
1624
|
options: Ne
|
|
1625
|
-
}),
|
|
1625
|
+
}), M && /* @__PURE__ */ X("div", {
|
|
1626
1626
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1627
|
-
children: [/* @__PURE__ */ Y(
|
|
1628
|
-
label:
|
|
1627
|
+
children: [/* @__PURE__ */ Y(w, {
|
|
1628
|
+
label: s("devportal.price", "Price"),
|
|
1629
1629
|
type: "number",
|
|
1630
|
-
value:
|
|
1631
|
-
onChange: (e) =>
|
|
1630
|
+
value: c.price,
|
|
1631
|
+
onChange: (e) => g("price", e.target.value),
|
|
1632
1632
|
placeholder: "0.00"
|
|
1633
|
-
}), /* @__PURE__ */ Y(
|
|
1634
|
-
label:
|
|
1635
|
-
value:
|
|
1636
|
-
onChange: (e) =>
|
|
1633
|
+
}), /* @__PURE__ */ Y(w, {
|
|
1634
|
+
label: s("devportal.currency", "Currency"),
|
|
1635
|
+
value: c.currency,
|
|
1636
|
+
onChange: (e) => g("currency", e.target.value),
|
|
1637
1637
|
placeholder: "USD"
|
|
1638
1638
|
})]
|
|
1639
1639
|
})]
|
|
1640
1640
|
})
|
|
1641
1641
|
}),
|
|
1642
|
-
/* @__PURE__ */ Y(
|
|
1643
|
-
title:
|
|
1644
|
-
description:
|
|
1642
|
+
/* @__PURE__ */ Y(m, {
|
|
1643
|
+
title: s("devportal.manifestInstallConfig", "Manifest / Install Config"),
|
|
1644
|
+
description: s("devportal.manifestInstallConfigDescription", "Technical metadata the platform uses to install and run this item"),
|
|
1645
1645
|
children: /* @__PURE__ */ X("div", {
|
|
1646
1646
|
className: "space-y-4",
|
|
1647
1647
|
children: [
|
|
@@ -1654,15 +1654,15 @@ var Le = ({ app: t }) => {
|
|
|
1654
1654
|
className: "space-y-1 text-text-secondary",
|
|
1655
1655
|
children: [/* @__PURE__ */ Y("p", {
|
|
1656
1656
|
className: "font-medium text-foreground",
|
|
1657
|
-
children:
|
|
1658
|
-
}),
|
|
1657
|
+
children: I ? s("devportal.howDeliveryWorksJsonOnly", "JSON-only delivery") : s("devportal.howDeliveryWorks", "How delivery works")
|
|
1658
|
+
}), I ? /* @__PURE__ */ Y("p", { children: s("devportal.howDeliveryWorksJsonOnlyDescription", "Workflows and templates are pure JSON — no binary code needed. Paste or import your JSON content below. When a user installs this item, the platform applies this JSON directly (no zip download required).") }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("p", { children: s("devportal.howDeliveryWorksDescription", "Package your code + manifest.json into a zip file (like a Chrome extension). Host it on S3, GitHub Releases, or any CDN, then paste the URL below. When a user installs this item, the platform downloads and extracts the zip.") }), /* @__PURE__ */ Y("p", { children: s("devportal.versioningNote", "Each published version captures a snapshot of this manifest. Use the Versions tab to manage per-version zip URLs, see changelogs, or roll back to a prior release.") })] })]
|
|
1659
1659
|
})]
|
|
1660
1660
|
}),
|
|
1661
1661
|
/* @__PURE__ */ X("div", {
|
|
1662
1662
|
className: "flex items-center gap-2",
|
|
1663
1663
|
children: [
|
|
1664
1664
|
/* @__PURE__ */ Y("input", {
|
|
1665
|
-
ref:
|
|
1665
|
+
ref: v,
|
|
1666
1666
|
type: "file",
|
|
1667
1667
|
accept: ".json,application/json",
|
|
1668
1668
|
className: "hidden",
|
|
@@ -1670,66 +1670,66 @@ var Le = ({ app: t }) => {
|
|
|
1670
1670
|
}),
|
|
1671
1671
|
/* @__PURE__ */ X("button", {
|
|
1672
1672
|
type: "button",
|
|
1673
|
-
onClick: () =>
|
|
1673
|
+
onClick: () => v.current?.click(),
|
|
1674
1674
|
className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
|
|
1675
|
-
children: [/* @__PURE__ */ Y(K, { size: 14 }),
|
|
1675
|
+
children: [/* @__PURE__ */ Y(K, { size: 14 }), s("devportal.importManifest", "Import manifest.json")]
|
|
1676
1676
|
}),
|
|
1677
1677
|
/* @__PURE__ */ X("button", {
|
|
1678
1678
|
type: "button",
|
|
1679
1679
|
onClick: k,
|
|
1680
1680
|
className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
|
|
1681
|
-
children: [/* @__PURE__ */ Y(re, { size: 14 }),
|
|
1681
|
+
children: [/* @__PURE__ */ Y(re, { size: 14 }), s("devportal.exportManifest", "Export manifest.json")]
|
|
1682
1682
|
})
|
|
1683
1683
|
]
|
|
1684
1684
|
}),
|
|
1685
|
-
/* @__PURE__ */ Y(
|
|
1686
|
-
label:
|
|
1687
|
-
value:
|
|
1688
|
-
onChange: (e) =>
|
|
1685
|
+
/* @__PURE__ */ Y(T, {
|
|
1686
|
+
label: s("devportal.storeItemType", "Store Item Type"),
|
|
1687
|
+
value: c.manifestItemType,
|
|
1688
|
+
onChange: (e) => g("manifestItemType", e.target.value),
|
|
1689
1689
|
options: Pe,
|
|
1690
|
-
placeholder:
|
|
1691
|
-
hint:
|
|
1690
|
+
placeholder: s("devportal.selectItemType", "Select item type…"),
|
|
1691
|
+
hint: s("devportal.storeItemTypeHint", "How this app is categorized in the Burdenoff marketplace (e.g. agent, node, widget)")
|
|
1692
1692
|
}),
|
|
1693
1693
|
/* @__PURE__ */ X("div", {
|
|
1694
1694
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1695
|
-
children: [/* @__PURE__ */ Y(
|
|
1696
|
-
label:
|
|
1697
|
-
value:
|
|
1698
|
-
onChange: (e) =>
|
|
1699
|
-
}), /* @__PURE__ */ Y(
|
|
1700
|
-
label:
|
|
1701
|
-
value:
|
|
1702
|
-
onChange: (e) =>
|
|
1695
|
+
children: [/* @__PURE__ */ Y(w, {
|
|
1696
|
+
label: s("devportal.manifestDisplayName", "Display Name"),
|
|
1697
|
+
value: c.manifestDisplayName,
|
|
1698
|
+
onChange: (e) => g("manifestDisplayName", e.target.value)
|
|
1699
|
+
}), /* @__PURE__ */ Y(w, {
|
|
1700
|
+
label: s("devportal.manifestVersion", "Version"),
|
|
1701
|
+
value: c.manifestVersion,
|
|
1702
|
+
onChange: (e) => g("manifestVersion", e.target.value),
|
|
1703
1703
|
placeholder: "1.0.0",
|
|
1704
|
-
hint:
|
|
1704
|
+
hint: s("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1705
1705
|
})]
|
|
1706
1706
|
}),
|
|
1707
|
-
|
|
1708
|
-
label:
|
|
1709
|
-
value:
|
|
1710
|
-
onChange: (e) =>
|
|
1707
|
+
I && /* @__PURE__ */ Y(E, {
|
|
1708
|
+
label: s("devportal.jsonContent", c.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1709
|
+
value: c.manifestJsonContent,
|
|
1710
|
+
onChange: (e) => g("manifestJsonContent", e.target.value),
|
|
1711
1711
|
rows: 12,
|
|
1712
1712
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1713
|
-
hint:
|
|
1713
|
+
hint: s("devportal.jsonContentHint", "Paste the full JSON definition. This is stored directly — no zip needed.")
|
|
1714
1714
|
}),
|
|
1715
|
-
!
|
|
1716
|
-
label:
|
|
1717
|
-
value:
|
|
1718
|
-
onChange: (e) =>
|
|
1715
|
+
!I && /* @__PURE__ */ Y(T, {
|
|
1716
|
+
label: s("devportal.installType", "Install Type"),
|
|
1717
|
+
value: c.manifestInstallType,
|
|
1718
|
+
onChange: (e) => g("manifestInstallType", e.target.value),
|
|
1719
1719
|
options: Fe,
|
|
1720
|
-
hint:
|
|
1720
|
+
hint: c.manifestInstallType === "npm" ? s("devportal.installTypeNpmHint", "Published to an npm-compatible registry. Provide the package name below.") : c.manifestInstallType === "git" ? s("devportal.installTypeGitHint", "Cloned from a git repository URL.") : c.manifestInstallType === "zip" ? s("devportal.installTypeZipHint", "Package your code + manifest.json into a zip. Host it publicly (S3, CDN, GitHub Releases) and paste the URL below. Use the Versions tab to manage per-release zip URLs.") : c.manifestInstallType === "builtin" ? s("devportal.installTypeBuiltinHint", "Pre-installed in the platform. No download needed.") : void 0
|
|
1721
1721
|
}),
|
|
1722
|
-
|
|
1723
|
-
label:
|
|
1724
|
-
value:
|
|
1725
|
-
onChange: (e) =>
|
|
1722
|
+
ne && /* @__PURE__ */ Y(w, {
|
|
1723
|
+
label: s("devportal.packageName", "Package Name"),
|
|
1724
|
+
value: c.manifestPackageName,
|
|
1725
|
+
onChange: (e) => g("manifestPackageName", e.target.value),
|
|
1726
1726
|
placeholder: "@yourscope/your-package"
|
|
1727
1727
|
}),
|
|
1728
|
-
!
|
|
1728
|
+
!I && c.manifestInstallType === "zip" && /* @__PURE__ */ X("div", {
|
|
1729
1729
|
className: "space-y-2",
|
|
1730
1730
|
children: [
|
|
1731
1731
|
/* @__PURE__ */ Y("input", {
|
|
1732
|
-
ref:
|
|
1732
|
+
ref: y,
|
|
1733
1733
|
type: "file",
|
|
1734
1734
|
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1735
1735
|
className: "hidden",
|
|
@@ -1739,57 +1739,57 @@ var Le = ({ app: t }) => {
|
|
|
1739
1739
|
className: "flex items-center gap-2 flex-wrap",
|
|
1740
1740
|
children: [/* @__PURE__ */ Y("button", {
|
|
1741
1741
|
type: "button",
|
|
1742
|
-
disabled:
|
|
1743
|
-
onClick: () =>
|
|
1744
|
-
title: n ? void 0 :
|
|
1742
|
+
disabled: S || !n,
|
|
1743
|
+
onClick: () => y.current?.click(),
|
|
1744
|
+
title: n ? void 0 : s("devportal.workspacesGatewayNotConfigured", "workspacesGatewayUrl not configured — contact your shell integration"),
|
|
1745
1745
|
className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
1746
|
-
children:
|
|
1746
|
+
children: S ? /* @__PURE__ */ X(J, { children: [
|
|
1747
1747
|
/* @__PURE__ */ Y(H, {
|
|
1748
1748
|
size: 14,
|
|
1749
1749
|
className: "animate-spin"
|
|
1750
1750
|
}),
|
|
1751
|
-
|
|
1751
|
+
s("devportal.uploading", "Uploading..."),
|
|
1752
1752
|
" ",
|
|
1753
|
-
|
|
1753
|
+
C,
|
|
1754
1754
|
"%"
|
|
1755
|
-
] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(K, { size: 14 }),
|
|
1756
|
-
}),
|
|
1755
|
+
] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(K, { size: 14 }), s("devportal.uploadZipPackage", "Upload zip package")] })
|
|
1756
|
+
}), S && /* @__PURE__ */ Y("div", {
|
|
1757
1757
|
className: "flex-1 h-1.5 min-w-[120px] rounded-full bg-muted overflow-hidden",
|
|
1758
1758
|
children: /* @__PURE__ */ Y("div", {
|
|
1759
1759
|
className: "h-full bg-primary transition-all",
|
|
1760
|
-
style: { width: `${
|
|
1760
|
+
style: { width: `${C}%` }
|
|
1761
1761
|
})
|
|
1762
1762
|
})]
|
|
1763
1763
|
}),
|
|
1764
|
-
|
|
1764
|
+
D && /* @__PURE__ */ Y("p", {
|
|
1765
1765
|
className: "text-xs text-status-error-text",
|
|
1766
|
-
children:
|
|
1766
|
+
children: D
|
|
1767
1767
|
}),
|
|
1768
1768
|
/* @__PURE__ */ Y("p", {
|
|
1769
1769
|
className: "text-xs text-text-secondary",
|
|
1770
|
-
children:
|
|
1770
|
+
children: s("devportal.zipUploadHint", "Upload stores the zip in your workspace Files (/DevPortal/Packages) and fills the URL below automatically.")
|
|
1771
1771
|
})
|
|
1772
1772
|
]
|
|
1773
1773
|
}),
|
|
1774
|
-
|
|
1775
|
-
label:
|
|
1776
|
-
value:
|
|
1777
|
-
onChange: (e) =>
|
|
1778
|
-
placeholder:
|
|
1779
|
-
hint:
|
|
1774
|
+
L && /* @__PURE__ */ Y(w, {
|
|
1775
|
+
label: R,
|
|
1776
|
+
value: c.manifestRegistryUrl,
|
|
1777
|
+
onChange: (e) => g("manifestRegistryUrl", e.target.value),
|
|
1778
|
+
placeholder: z,
|
|
1779
|
+
hint: c.manifestInstallType === "zip" ? s("devportal.zipUrlHint", "Filled automatically after upload, or paste a URL to an externally-hosted zip.") : void 0
|
|
1780
1780
|
}),
|
|
1781
|
-
/* @__PURE__ */ Y(
|
|
1782
|
-
label:
|
|
1783
|
-
value:
|
|
1784
|
-
onChange: (e) =>
|
|
1781
|
+
/* @__PURE__ */ Y(E, {
|
|
1782
|
+
label: s("devportal.requiredPermissions", "Required Permissions (one per line)"),
|
|
1783
|
+
value: c.manifestPermissionsText,
|
|
1784
|
+
onChange: (e) => g("manifestPermissionsText", e.target.value),
|
|
1785
1785
|
rows: 3,
|
|
1786
1786
|
placeholder: "read:users\nwrite:data",
|
|
1787
|
-
hint:
|
|
1787
|
+
hint: s("devportal.permissionsHint", "Platform capabilities this item requires the user to grant on install")
|
|
1788
1788
|
}),
|
|
1789
|
-
/* @__PURE__ */ Y(
|
|
1790
|
-
label:
|
|
1791
|
-
value:
|
|
1792
|
-
onChange: (e) =>
|
|
1789
|
+
/* @__PURE__ */ Y(w, {
|
|
1790
|
+
label: s("devportal.minPlatformVersion", "Min Platform Version"),
|
|
1791
|
+
value: c.manifestMinPlatformVersion,
|
|
1792
|
+
onChange: (e) => g("manifestMinPlatformVersion", e.target.value),
|
|
1793
1793
|
placeholder: "2024.1.0"
|
|
1794
1794
|
})
|
|
1795
1795
|
]
|
|
@@ -1799,19 +1799,19 @@ var Le = ({ app: t }) => {
|
|
|
1799
1799
|
className: "border-t pt-6",
|
|
1800
1800
|
children: /* @__PURE__ */ Y("button", {
|
|
1801
1801
|
type: "button",
|
|
1802
|
-
onClick:
|
|
1803
|
-
disabled:
|
|
1802
|
+
onClick: _,
|
|
1803
|
+
disabled: u,
|
|
1804
1804
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
1805
|
-
children:
|
|
1805
|
+
children: u ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(H, {
|
|
1806
1806
|
size: 16,
|
|
1807
1807
|
className: "animate-spin"
|
|
1808
|
-
}),
|
|
1808
|
+
}), s("devportal.saving", "Saving...")] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(G, { size: 16 }), s("devportal.saveStoreListing", "Save Store Listing")] })
|
|
1809
1809
|
})
|
|
1810
1810
|
})
|
|
1811
1811
|
]
|
|
1812
1812
|
});
|
|
1813
1813
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
1814
|
-
let { t: i } =
|
|
1814
|
+
let { t: i } = F();
|
|
1815
1815
|
return /* @__PURE__ */ X("div", {
|
|
1816
1816
|
className: "rounded-lg border bg-card p-4",
|
|
1817
1817
|
children: [
|