@burdenoff/microfe-devportal 2026.623.5 → 2026.623.7
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/DevportalRoutes.js +123 -108
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/components/SectionNav.js +71 -5
- package/dist/devportal/components/SectionNav.js.map +1 -0
- package/dist/devportal/components/index.js +1 -1
- package/dist/devportal/hooks/useGraphQL.js +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +39 -39
- package/dist/devportal/pages/AnalyticsDashboardPage.js +54 -54
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +53 -53
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +9 -9
- package/dist/devportal/pages/ApplicationDetailPage.js +462 -462
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +120 -120
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +73 -73
- 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 +18 -18
- package/dist/devportal/pages/CreateOrganizationPage.js +12 -12
- package/dist/devportal/pages/CreateWebhookPage.js +23 -23
- package/dist/devportal/pages/DashboardPage.js +23 -23
- 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 +15 -15
- package/dist/devportal/pages/OAuthClientsPage.js +14 -14
- package/dist/devportal/pages/OrganizationDetailPage.js +84 -84
- package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +16 -16
- package/dist/devportal/pages/PublishPage.js +16 -16
- package/dist/devportal/pages/PublisherProfilePage.js +18 -18
- package/dist/devportal/pages/RevenueDashboardPage.js +29 -29
- 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 +133 -133
- package/dist/devportal/pages/WebhooksPage.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 {
|
|
15
|
-
import { GrantDelegationModal as
|
|
16
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
17
|
-
import { useDevportalPermission as
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
5
|
+
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useGetWorkspaceInstallationQuery as l, useInstallApplicationMutation as u, useRevokeDelegationMutation as d, useRotateAppSecretMutation as f, useSubmitApplicationMutation as p, useUninstallApplicationMutation as m, useUpdateApplicationMutation as h } from "../../generated/global-operations.js";
|
|
6
|
+
import { PageLayout as g, PageSection as _ } from "../components/PageLayout.js";
|
|
7
|
+
import { APP_TYPE_LABELS as v } from "../utils/constants.js";
|
|
8
|
+
import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as x } from "../components/StatusBadge.js";
|
|
9
|
+
import { SelectionCheckbox as S } from "../components/SelectionCheckbox.js";
|
|
10
|
+
import { nativeNotify as C } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
|
|
12
|
+
import { DataTable as w, DetailList as T } from "../components/DataTable.js";
|
|
13
|
+
import { InputField as E, SelectField as D, TextareaField as O } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as k } from "../components/ConfirmDialog.js";
|
|
15
|
+
import { GrantDelegationModal as A } from "../components/GrantDelegationModal.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as j } from "../constants/permissions.js";
|
|
17
|
+
import { useDevportalPermission as te } from "../hooks/usePermission.js";
|
|
18
|
+
import { usePackageUpload as M } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as N, useEffect as ne, useMemo as P, useRef as F, useState as I } from "react";
|
|
20
|
+
import { useI18n as L } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
+
import { AlertCircle as re, AppWindow as ie, BarChart3 as R, CheckCircle as z, Clock as ae, Download as oe, Edit as se, ExternalLink as B, FlaskConical as ce, Info as V, Key as le, Loader2 as H, MoreHorizontal as ue, Plus as U, Power as de, RefreshCw as fe, SendHorizontal as pe, Shield as me, Store as he, Upload as W, Users as G, Webhook as ge, X as K, XCircle as _e } from "lucide-react";
|
|
22
22
|
import { useParams as ve } from "react-router-dom";
|
|
23
23
|
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
24
24
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
@@ -136,7 +136,7 @@ var Se = [
|
|
|
136
136
|
{
|
|
137
137
|
id: "overview",
|
|
138
138
|
label: "Overview",
|
|
139
|
-
icon:
|
|
139
|
+
icon: ie
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
id: "webhooks",
|
|
@@ -151,12 +151,12 @@ var Se = [
|
|
|
151
151
|
{
|
|
152
152
|
id: "analytics",
|
|
153
153
|
label: "Analytics",
|
|
154
|
-
icon:
|
|
154
|
+
icon: R
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
id: "playground",
|
|
158
158
|
label: "API Playground",
|
|
159
|
-
icon:
|
|
159
|
+
icon: B
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
id: "store-listing",
|
|
@@ -169,7 +169,7 @@ var Se = [
|
|
|
169
169
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
170
170
|
}, we = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
|
|
171
171
|
className: "flex items-center justify-center gap-3 py-12",
|
|
172
|
-
children: [/* @__PURE__ */ J(
|
|
172
|
+
children: [/* @__PURE__ */ J(H, {
|
|
173
173
|
size: 20,
|
|
174
174
|
className: "animate-spin text-muted-foreground"
|
|
175
175
|
}), /* @__PURE__ */ J("p", {
|
|
@@ -178,7 +178,7 @@ var Se = [
|
|
|
178
178
|
})]
|
|
179
179
|
}), Z = ({ message: e }) => /* @__PURE__ */ Y("div", {
|
|
180
180
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
181
|
-
children: [/* @__PURE__ */ J(
|
|
181
|
+
children: [/* @__PURE__ */ J(re, {
|
|
182
182
|
size: 32,
|
|
183
183
|
className: "text-destructive"
|
|
184
184
|
}), /* @__PURE__ */ J("p", {
|
|
@@ -186,166 +186,166 @@ var Se = [
|
|
|
186
186
|
children: e
|
|
187
187
|
})]
|
|
188
188
|
}), Te = () => {
|
|
189
|
-
let { navigate:
|
|
190
|
-
let n =
|
|
189
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = L(), p = (e, t) => {
|
|
190
|
+
let n = d(e);
|
|
191
191
|
return n === e ? t : n;
|
|
192
|
-
}, { allowed:
|
|
193
|
-
variables: { id:
|
|
194
|
-
skip: !
|
|
195
|
-
}), [
|
|
192
|
+
}, { allowed: h } = te(j.APP_UPDATE), { allowed: _ } = te(j.APP_DELETE), { appId: S } = ve(), [w, T] = I("overview"), [E, D] = I(!1), [O, M] = I(!1), [ne, P] = I(null), [F, R] = I(!1), { data: z, loading: oe, error: B } = s({
|
|
193
|
+
variables: { id: S },
|
|
194
|
+
skip: !S
|
|
195
|
+
}), [V, { loading: le }] = f(), [ue, { loading: U }] = a(), [me, { loading: he }] = u(), [W, { loading: G }] = m(), { data: ge, refetch: K } = l({
|
|
196
196
|
variables: {
|
|
197
|
-
applicationId:
|
|
198
|
-
workspaceId:
|
|
197
|
+
applicationId: S,
|
|
198
|
+
workspaceId: c ?? void 0
|
|
199
199
|
},
|
|
200
|
-
skip: !
|
|
200
|
+
skip: !c || !S,
|
|
201
201
|
fetchPolicy: "cache-and-network"
|
|
202
|
-
}), q = ge?.appInstallations?.edges?.[0]?.node ?? null, X =
|
|
203
|
-
|
|
204
|
-
}, [
|
|
205
|
-
let e =
|
|
202
|
+
}), q = ge?.appInstallations?.edges?.[0]?.node ?? null, X = N((e) => {
|
|
203
|
+
i?.(`${o}${e}`);
|
|
204
|
+
}, [i, o]), be = N(async () => {
|
|
205
|
+
let e = z?.application?.appId;
|
|
206
206
|
if (e) try {
|
|
207
|
-
let t = (await
|
|
208
|
-
t &&
|
|
207
|
+
let t = (await V({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
208
|
+
t && P(t), D(!1);
|
|
209
209
|
} catch {}
|
|
210
|
-
}, [
|
|
211
|
-
if (
|
|
212
|
-
await
|
|
210
|
+
}, [z?.application?.appId, V]), xe = N(async () => {
|
|
211
|
+
if (S) try {
|
|
212
|
+
await ue({ variables: { id: S } }), M(!1), X("/apps");
|
|
213
213
|
} catch {}
|
|
214
214
|
}, [
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
S,
|
|
216
|
+
ue,
|
|
217
217
|
X
|
|
218
|
-
]), Ce =
|
|
219
|
-
if (!(!
|
|
220
|
-
await
|
|
221
|
-
applicationId:
|
|
218
|
+
]), Ce = N(async () => {
|
|
219
|
+
if (!(!S || !c)) try {
|
|
220
|
+
await me({ variables: { input: {
|
|
221
|
+
applicationId: S,
|
|
222
222
|
scope: "WORKSPACE",
|
|
223
|
-
workspaceId:
|
|
223
|
+
workspaceId: c,
|
|
224
224
|
autoUpdate: !1
|
|
225
|
-
} } }), K(),
|
|
225
|
+
} } }), K(), C("success");
|
|
226
226
|
} catch (e) {
|
|
227
|
-
console.error("[DevPortal] Test in Workspace failed:", e),
|
|
227
|
+
console.error("[DevPortal] Test in Workspace failed:", e), C("error");
|
|
228
228
|
}
|
|
229
229
|
}, [
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
S,
|
|
231
|
+
c,
|
|
232
|
+
me,
|
|
233
233
|
K
|
|
234
|
-
]), we =
|
|
234
|
+
]), we = N(async (e) => {
|
|
235
235
|
try {
|
|
236
|
-
await W({ variables: { id: e } }), K(),
|
|
236
|
+
await W({ variables: { id: e } }), K(), C("success");
|
|
237
237
|
} catch {
|
|
238
|
-
|
|
238
|
+
C("error");
|
|
239
239
|
}
|
|
240
240
|
}, [W, K]);
|
|
241
|
-
if (
|
|
242
|
-
if (
|
|
243
|
-
title:
|
|
244
|
-
backLink: `${
|
|
245
|
-
backLabel:
|
|
241
|
+
if (oe && !z) return /* @__PURE__ */ J(n, { message: p("devportal.loadingApplication", "Loading application...") });
|
|
242
|
+
if (B) return /* @__PURE__ */ J(g, {
|
|
243
|
+
title: p("devportal.error", "Error"),
|
|
244
|
+
backLink: `${o}/apps`,
|
|
245
|
+
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
246
246
|
children: /* @__PURE__ */ Y("div", {
|
|
247
247
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
248
248
|
children: [
|
|
249
|
-
/* @__PURE__ */ J(
|
|
249
|
+
/* @__PURE__ */ J(re, {
|
|
250
250
|
size: 48,
|
|
251
251
|
className: "text-destructive mb-4"
|
|
252
252
|
}),
|
|
253
253
|
/* @__PURE__ */ J("h3", {
|
|
254
254
|
className: "text-lg font-semibold mb-2",
|
|
255
|
-
children:
|
|
255
|
+
children: p("devportal.failedToLoadApplication", "Failed to load application")
|
|
256
256
|
}),
|
|
257
257
|
/* @__PURE__ */ J("p", {
|
|
258
258
|
className: "text-sm text-muted-foreground",
|
|
259
|
-
children:
|
|
259
|
+
children: B.message
|
|
260
260
|
})
|
|
261
261
|
]
|
|
262
262
|
})
|
|
263
263
|
});
|
|
264
|
-
let Z = ye(
|
|
265
|
-
return Z ? /* @__PURE__ */ Y(
|
|
264
|
+
let Z = ye(z?.application);
|
|
265
|
+
return Z ? /* @__PURE__ */ Y(g, {
|
|
266
266
|
title: Z.name,
|
|
267
267
|
description: Z.shortDescription,
|
|
268
|
-
backLink: `${
|
|
269
|
-
backLabel:
|
|
268
|
+
backLink: `${o}/apps`,
|
|
269
|
+
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
270
270
|
actions: /* @__PURE__ */ Y("div", {
|
|
271
271
|
className: "flex items-center gap-2",
|
|
272
272
|
children: [
|
|
273
273
|
/* @__PURE__ */ Y("button", {
|
|
274
274
|
onClick: () => D(!0),
|
|
275
275
|
disabled: !Z.appId,
|
|
276
|
-
title: Z.appId ?
|
|
276
|
+
title: Z.appId ? p("devportal.rotateSecretHint", "Generate a new client secret") : p("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
|
|
277
277
|
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 disabled:cursor-not-allowed",
|
|
278
|
-
children: [/* @__PURE__ */ J(
|
|
278
|
+
children: [/* @__PURE__ */ J(fe, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
|
|
279
279
|
}),
|
|
280
280
|
/* @__PURE__ */ Y("button", {
|
|
281
281
|
onClick: () => X(`/apps/${Z.id}/versions`),
|
|
282
282
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
283
|
-
children: [/* @__PURE__ */ J(
|
|
283
|
+
children: [/* @__PURE__ */ J(ae, { size: 16 }), p("devportal.versions", "Versions")]
|
|
284
284
|
}),
|
|
285
285
|
Z.status !== "PUBLISHED" && /* @__PURE__ */ Y("button", {
|
|
286
|
-
onClick: () =>
|
|
286
|
+
onClick: () => T("store-listing"),
|
|
287
287
|
className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
|
|
288
|
-
children: [/* @__PURE__ */ J(
|
|
288
|
+
children: [/* @__PURE__ */ J(pe, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
|
|
289
289
|
}),
|
|
290
290
|
q ? /* @__PURE__ */ Y("button", {
|
|
291
291
|
onClick: () => void we(q.id),
|
|
292
|
-
disabled: G || !
|
|
293
|
-
title:
|
|
292
|
+
disabled: G || !c,
|
|
293
|
+
title: p("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
|
|
294
294
|
className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
|
|
295
|
-
children: [G ? /* @__PURE__ */ J(
|
|
295
|
+
children: [G ? /* @__PURE__ */ J(H, {
|
|
296
296
|
size: 16,
|
|
297
297
|
className: "animate-spin"
|
|
298
|
-
}) : /* @__PURE__ */ J(_e, { size: 16 }),
|
|
298
|
+
}) : /* @__PURE__ */ J(_e, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
|
|
299
299
|
}) : /* @__PURE__ */ Y("button", {
|
|
300
300
|
onClick: () => void Ce(),
|
|
301
|
-
disabled: he || !
|
|
302
|
-
"aria-disabled": !
|
|
303
|
-
title:
|
|
301
|
+
disabled: he || !c,
|
|
302
|
+
"aria-disabled": !c,
|
|
303
|
+
title: c ? p("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : p("devportal.noWorkspaceContext", "No workspace context available"),
|
|
304
304
|
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",
|
|
305
|
-
children: [he ? /* @__PURE__ */ J(
|
|
305
|
+
children: [he ? /* @__PURE__ */ J(H, {
|
|
306
306
|
size: 16,
|
|
307
307
|
className: "animate-spin"
|
|
308
|
-
}) : /* @__PURE__ */ J(
|
|
308
|
+
}) : /* @__PURE__ */ J(ce, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
|
|
309
309
|
}),
|
|
310
310
|
/* @__PURE__ */ Y("button", {
|
|
311
311
|
onClick: () => X(`/apps/${Z.id}/edit`),
|
|
312
|
-
disabled: !
|
|
313
|
-
"aria-disabled": !
|
|
312
|
+
disabled: !h,
|
|
313
|
+
"aria-disabled": !h,
|
|
314
314
|
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",
|
|
315
|
-
children: [/* @__PURE__ */ J(
|
|
315
|
+
children: [/* @__PURE__ */ J(se, { size: 16 }), p("devportal.editApp", "Edit App")]
|
|
316
316
|
}),
|
|
317
317
|
/* @__PURE__ */ Y("button", {
|
|
318
|
-
onClick: () =>
|
|
318
|
+
onClick: () => M(!0),
|
|
319
319
|
disabled: !_,
|
|
320
320
|
"aria-disabled": !_,
|
|
321
321
|
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",
|
|
322
|
-
children: [/* @__PURE__ */ J(
|
|
322
|
+
children: [/* @__PURE__ */ J(de, { size: 16 }), p("devportal.deactivate", "Deactivate")]
|
|
323
323
|
})
|
|
324
324
|
]
|
|
325
325
|
}),
|
|
326
326
|
children: [
|
|
327
|
-
|
|
328
|
-
title:
|
|
329
|
-
secret:
|
|
330
|
-
description:
|
|
331
|
-
onDismiss: () =>
|
|
327
|
+
ne && /* @__PURE__ */ J(ee, {
|
|
328
|
+
title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
329
|
+
secret: ne,
|
|
330
|
+
description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
331
|
+
onDismiss: () => P(null)
|
|
332
332
|
}),
|
|
333
333
|
/* @__PURE__ */ Y("div", {
|
|
334
334
|
className: "flex flex-wrap items-center gap-2",
|
|
335
335
|
children: [
|
|
336
|
-
/* @__PURE__ */ J(
|
|
336
|
+
/* @__PURE__ */ J(b, {
|
|
337
337
|
status: Z.status,
|
|
338
338
|
type: "app"
|
|
339
339
|
}),
|
|
340
|
-
/* @__PURE__ */ J(
|
|
340
|
+
/* @__PURE__ */ J(b, {
|
|
341
341
|
status: Z.visibility,
|
|
342
342
|
type: "app"
|
|
343
343
|
}),
|
|
344
|
-
Z.isVerified && /* @__PURE__ */ J(
|
|
345
|
-
Z.isFeatured && /* @__PURE__ */ J(
|
|
344
|
+
Z.isVerified && /* @__PURE__ */ J(x, { verified: !0 }),
|
|
345
|
+
Z.isFeatured && /* @__PURE__ */ J(y, {}),
|
|
346
346
|
/* @__PURE__ */ J("span", {
|
|
347
347
|
className: "text-sm text-muted-foreground",
|
|
348
|
-
children:
|
|
348
|
+
children: v[Z.appType] || Z.appType
|
|
349
349
|
})
|
|
350
350
|
]
|
|
351
351
|
}),
|
|
@@ -354,16 +354,16 @@ var Se = [
|
|
|
354
354
|
children: /* @__PURE__ */ J("nav", {
|
|
355
355
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
356
356
|
role: "tablist",
|
|
357
|
-
"aria-label":
|
|
357
|
+
"aria-label": p("devportal.applicationSections", "Application sections"),
|
|
358
358
|
children: Se.map((e) => {
|
|
359
359
|
let n = e.icon;
|
|
360
360
|
return /* @__PURE__ */ Y("button", {
|
|
361
361
|
id: `application-tab-${e.id}`,
|
|
362
362
|
role: "tab",
|
|
363
|
-
"aria-selected":
|
|
363
|
+
"aria-selected": w === e.id,
|
|
364
364
|
"aria-controls": `application-panel-${e.id}`,
|
|
365
|
-
onClick: () =>
|
|
366
|
-
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
365
|
+
onClick: () => T(e.id),
|
|
366
|
+
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", w === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
|
|
367
367
|
children: [/* @__PURE__ */ J(n, { size: 16 }), e.label]
|
|
368
368
|
}, e.id);
|
|
369
369
|
})
|
|
@@ -371,111 +371,111 @@ var Se = [
|
|
|
371
371
|
}),
|
|
372
372
|
/* @__PURE__ */ Y("div", {
|
|
373
373
|
className: "mt-6",
|
|
374
|
-
id: `application-panel-${
|
|
374
|
+
id: `application-panel-${w}`,
|
|
375
375
|
role: "tabpanel",
|
|
376
|
-
"aria-labelledby": `application-tab-${
|
|
376
|
+
"aria-labelledby": `application-tab-${w}`,
|
|
377
377
|
tabIndex: 0,
|
|
378
378
|
children: [
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
w === "overview" && /* @__PURE__ */ J(ke, { app: Z }),
|
|
380
|
+
w === "webhooks" && /* @__PURE__ */ J(Ee, {
|
|
381
381
|
appId: Z.id,
|
|
382
382
|
onNavigate: X
|
|
383
383
|
}),
|
|
384
|
-
|
|
384
|
+
w === "delegations" && /* @__PURE__ */ J(De, {
|
|
385
385
|
authAppId: Z.appId || void 0,
|
|
386
386
|
appName: Z.name,
|
|
387
|
-
onGrantDelegation: () =>
|
|
387
|
+
onGrantDelegation: () => R(!0),
|
|
388
388
|
onNavigate: X
|
|
389
389
|
}),
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
w === "analytics" && /* @__PURE__ */ J(Oe, { appId: Z.id }),
|
|
391
|
+
w === "playground" && /* @__PURE__ */ J(Pe, { app: Z }),
|
|
392
|
+
w === "store-listing" && /* @__PURE__ */ J(Ve, { app: Z })
|
|
393
393
|
]
|
|
394
394
|
}),
|
|
395
|
-
/* @__PURE__ */ J(
|
|
396
|
-
open:
|
|
395
|
+
/* @__PURE__ */ J(k, {
|
|
396
|
+
open: E,
|
|
397
397
|
onOpenChange: D,
|
|
398
398
|
onConfirm: be,
|
|
399
|
-
title:
|
|
400
|
-
description:
|
|
401
|
-
confirmLabel:
|
|
402
|
-
cancelLabel:
|
|
399
|
+
title: p("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
400
|
+
description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
401
|
+
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
402
|
+
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
403
403
|
variant: "warning",
|
|
404
|
-
loading:
|
|
404
|
+
loading: le
|
|
405
405
|
}),
|
|
406
|
-
/* @__PURE__ */ J(
|
|
407
|
-
open:
|
|
408
|
-
onOpenChange:
|
|
406
|
+
/* @__PURE__ */ J(k, {
|
|
407
|
+
open: O,
|
|
408
|
+
onOpenChange: M,
|
|
409
409
|
onConfirm: xe,
|
|
410
|
-
title:
|
|
411
|
-
description:
|
|
412
|
-
confirmLabel:
|
|
413
|
-
cancelLabel:
|
|
410
|
+
title: p("devportal.deactivateApplication", "Deactivate Application"),
|
|
411
|
+
description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
412
|
+
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
413
|
+
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
414
414
|
variant: "destructive",
|
|
415
|
-
loading:
|
|
415
|
+
loading: U
|
|
416
416
|
}),
|
|
417
|
-
/* @__PURE__ */ J(
|
|
418
|
-
open:
|
|
419
|
-
onOpenChange:
|
|
417
|
+
/* @__PURE__ */ J(A, {
|
|
418
|
+
open: F,
|
|
419
|
+
onOpenChange: R,
|
|
420
420
|
appId: Z.appId || "",
|
|
421
421
|
appName: Z.name,
|
|
422
422
|
appScopes: Z.scopes?.map((e) => e.scope) ?? [],
|
|
423
423
|
onSuccess: () => {
|
|
424
|
-
|
|
424
|
+
R(!1);
|
|
425
425
|
}
|
|
426
426
|
})
|
|
427
427
|
]
|
|
428
|
-
}) : /* @__PURE__ */ J(
|
|
429
|
-
title:
|
|
430
|
-
backLink: `${
|
|
431
|
-
backLabel:
|
|
428
|
+
}) : /* @__PURE__ */ J(g, {
|
|
429
|
+
title: p("devportal.notFound", "Not Found"),
|
|
430
|
+
backLink: `${o}/apps`,
|
|
431
|
+
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
432
432
|
children: /* @__PURE__ */ J(r, {
|
|
433
|
-
icon: /* @__PURE__ */ J(
|
|
434
|
-
title:
|
|
435
|
-
description:
|
|
433
|
+
icon: /* @__PURE__ */ J(ie, { size: 48 }),
|
|
434
|
+
title: p("devportal.applicationNotFound", "Application not found"),
|
|
435
|
+
description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
436
436
|
})
|
|
437
437
|
});
|
|
438
438
|
}, Ee = ({ appId: e, onNavigate: t }) => {
|
|
439
|
-
let { t: n } =
|
|
439
|
+
let { t: n } = L(), r = (e, t) => {
|
|
440
440
|
let r = n(e);
|
|
441
441
|
return r === e ? t : r;
|
|
442
|
-
}, { data: i, loading: a, error: o } =
|
|
442
|
+
}, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
|
|
443
443
|
return a ? /* @__PURE__ */ J(we, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(Z, { message: o.message }) : /* @__PURE__ */ J(Ae, {
|
|
444
444
|
appId: e,
|
|
445
445
|
webhooks: (i?.webhooks ?? []).map(X),
|
|
446
446
|
onNavigate: t
|
|
447
447
|
});
|
|
448
|
-
}, De = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate:
|
|
449
|
-
let { t:
|
|
450
|
-
let n =
|
|
448
|
+
}, De = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
449
|
+
let { t: o } = L(), s = (e, t) => {
|
|
450
|
+
let n = o(e);
|
|
451
451
|
return n === e ? t : n;
|
|
452
|
-
}, { data:
|
|
453
|
-
|
|
452
|
+
}, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = I([]), [g, _] = I(!1), [v, y] = I(/* @__PURE__ */ new Set()), [b, x] = I(null), S = P(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(xe) : [], [e, c]), C = P(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = P(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = N((e, t) => {
|
|
453
|
+
y((n) => {
|
|
454
454
|
let r = new Set(n);
|
|
455
455
|
return t ? r.add(e) : r.delete(e), r;
|
|
456
456
|
});
|
|
457
|
-
}, []),
|
|
458
|
-
|
|
457
|
+
}, []), D = N((e) => {
|
|
458
|
+
y((t) => {
|
|
459
459
|
let n = new Set(t);
|
|
460
460
|
return C.forEach((t) => {
|
|
461
461
|
e ? n.add(t.id) : n.delete(t.id);
|
|
462
462
|
}), n;
|
|
463
463
|
});
|
|
464
|
-
}, [C]),
|
|
465
|
-
|
|
466
|
-
}, []),
|
|
467
|
-
|
|
464
|
+
}, [C]), O = N(() => {
|
|
465
|
+
y(/* @__PURE__ */ new Set());
|
|
466
|
+
}, []), A = N(async (e) => {
|
|
467
|
+
_(!0);
|
|
468
468
|
try {
|
|
469
|
-
let t = await Promise.allSettled(e.map((e) =>
|
|
470
|
-
x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`),
|
|
469
|
+
let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
470
|
+
x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
|
|
471
471
|
let n = new Set(t);
|
|
472
472
|
return e.forEach((e) => n.delete(e)), n;
|
|
473
|
-
}),
|
|
473
|
+
}), h([]), f();
|
|
474
474
|
} catch {} finally {
|
|
475
|
-
|
|
475
|
+
_(!1);
|
|
476
476
|
}
|
|
477
|
-
}, [
|
|
478
|
-
return e ?
|
|
477
|
+
}, [p, f]);
|
|
478
|
+
return e ? l ? /* @__PURE__ */ J(we, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(Z, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
|
|
479
479
|
b && /* @__PURE__ */ J("div", {
|
|
480
480
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
481
481
|
children: /* @__PURE__ */ Y("div", {
|
|
@@ -483,7 +483,7 @@ var Se = [
|
|
|
483
483
|
children: [/* @__PURE__ */ J("span", { children: b }), /* @__PURE__ */ J("button", {
|
|
484
484
|
onClick: () => x(null),
|
|
485
485
|
className: "text-status-success-text hover:text-status-success-text",
|
|
486
|
-
children:
|
|
486
|
+
children: s("devportal.dismiss", "Dismiss")
|
|
487
487
|
})]
|
|
488
488
|
})
|
|
489
489
|
}),
|
|
@@ -491,56 +491,56 @@ var Se = [
|
|
|
491
491
|
appName: t,
|
|
492
492
|
delegations: S,
|
|
493
493
|
onGrantDelegation: n,
|
|
494
|
-
onRevokeDelegation: (e) =>
|
|
495
|
-
selectedDelegationIds:
|
|
496
|
-
onToggleSelectDelegation:
|
|
497
|
-
onToggleAllDelegations:
|
|
498
|
-
onClearSelection:
|
|
499
|
-
onRevokeSelected: () =>
|
|
500
|
-
allVisibleSelected:
|
|
501
|
-
partiallySelected:
|
|
494
|
+
onRevokeDelegation: (e) => h([e]),
|
|
495
|
+
selectedDelegationIds: v,
|
|
496
|
+
onToggleSelectDelegation: E,
|
|
497
|
+
onToggleAllDelegations: D,
|
|
498
|
+
onClearSelection: O,
|
|
499
|
+
onRevokeSelected: () => h(ee.map((e) => e.id)),
|
|
500
|
+
allVisibleSelected: w,
|
|
501
|
+
partiallySelected: T
|
|
502
502
|
}),
|
|
503
|
-
/* @__PURE__ */ J(
|
|
504
|
-
open:
|
|
503
|
+
/* @__PURE__ */ J(k, {
|
|
504
|
+
open: m.length > 0,
|
|
505
505
|
onOpenChange: (e) => {
|
|
506
|
-
e ||
|
|
506
|
+
e || h([]);
|
|
507
507
|
},
|
|
508
508
|
onConfirm: () => {
|
|
509
|
-
|
|
509
|
+
m.length > 0 && A(m);
|
|
510
510
|
},
|
|
511
|
-
title:
|
|
512
|
-
description:
|
|
513
|
-
confirmLabel:
|
|
514
|
-
cancelLabel:
|
|
511
|
+
title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
512
|
+
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."),
|
|
513
|
+
confirmLabel: s("devportal.revoke", "Revoke"),
|
|
514
|
+
cancelLabel: s("devportal.cancel", "Cancel"),
|
|
515
515
|
variant: "destructive",
|
|
516
|
-
loading:
|
|
516
|
+
loading: g
|
|
517
517
|
})
|
|
518
518
|
] }) : /* @__PURE__ */ J(r, {
|
|
519
|
-
icon: /* @__PURE__ */ J(
|
|
520
|
-
title:
|
|
521
|
-
description:
|
|
519
|
+
icon: /* @__PURE__ */ J(me, { size: 32 }),
|
|
520
|
+
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
521
|
+
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
522
522
|
action: /* @__PURE__ */ Y("button", {
|
|
523
|
-
onClick: () =>
|
|
523
|
+
onClick: () => a("/oauth"),
|
|
524
524
|
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",
|
|
525
|
-
children: [/* @__PURE__ */ J(
|
|
525
|
+
children: [/* @__PURE__ */ J(B, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
526
526
|
})
|
|
527
527
|
});
|
|
528
528
|
}, Oe = ({ appId: e }) => {
|
|
529
|
-
let { t } =
|
|
529
|
+
let { t } = L(), n = (e, n) => {
|
|
530
530
|
let r = t(e);
|
|
531
531
|
return r === e ? n : r;
|
|
532
|
-
}, r =
|
|
532
|
+
}, r = P(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
533
533
|
applicationId: e,
|
|
534
534
|
period: "daily",
|
|
535
|
-
startDate:
|
|
535
|
+
startDate: P(() => {
|
|
536
536
|
let e = new Date(r);
|
|
537
537
|
return e.setDate(e.getDate() - 30), e;
|
|
538
538
|
}, [r]).toISOString(),
|
|
539
539
|
endDate: r.toISOString()
|
|
540
540
|
} });
|
|
541
|
-
return a ? /* @__PURE__ */ J(we, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) :
|
|
541
|
+
return a ? /* @__PURE__ */ J(we, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(Z, { message: s.message }) : /* @__PURE__ */ J(Me, { analytics: (i?.applicationAnalytics ?? []).map(be) });
|
|
542
542
|
}, ke = ({ app: e }) => {
|
|
543
|
-
let { t } =
|
|
543
|
+
let { t } = L(), n = (e, n) => {
|
|
544
544
|
let r = t(e);
|
|
545
545
|
return r === e ? n : r;
|
|
546
546
|
};
|
|
@@ -570,7 +570,7 @@ var Se = [
|
|
|
570
570
|
})
|
|
571
571
|
]
|
|
572
572
|
}),
|
|
573
|
-
/* @__PURE__ */ J(
|
|
573
|
+
/* @__PURE__ */ J(_, {
|
|
574
574
|
title: n("devportal.description", "Description"),
|
|
575
575
|
children: /* @__PURE__ */ J("div", {
|
|
576
576
|
className: "prose prose-sm max-w-none",
|
|
@@ -580,7 +580,7 @@ var Se = [
|
|
|
580
580
|
})
|
|
581
581
|
})
|
|
582
582
|
}),
|
|
583
|
-
/* @__PURE__ */ J(
|
|
583
|
+
/* @__PURE__ */ J(_, {
|
|
584
584
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
585
585
|
children: /* @__PURE__ */ Y("div", {
|
|
586
586
|
className: "space-y-3",
|
|
@@ -608,9 +608,9 @@ var Se = [
|
|
|
608
608
|
]
|
|
609
609
|
}), /* @__PURE__ */ Y("div", {
|
|
610
610
|
className: "space-y-6",
|
|
611
|
-
children: [/* @__PURE__ */ J(
|
|
611
|
+
children: [/* @__PURE__ */ J(_, {
|
|
612
612
|
title: n("devportal.details", "Details"),
|
|
613
|
-
children: /* @__PURE__ */ J(
|
|
613
|
+
children: /* @__PURE__ */ J(T, { items: [
|
|
614
614
|
{
|
|
615
615
|
label: n("devportal.appId", "App ID"),
|
|
616
616
|
value: /* @__PURE__ */ J("code", {
|
|
@@ -643,7 +643,7 @@ var Se = [
|
|
|
643
643
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
644
644
|
}
|
|
645
645
|
] })
|
|
646
|
-
}), /* @__PURE__ */ J(
|
|
646
|
+
}), /* @__PURE__ */ J(_, {
|
|
647
647
|
title: n("devportal.links", "Links"),
|
|
648
648
|
children: /* @__PURE__ */ Y("div", {
|
|
649
649
|
className: "space-y-2",
|
|
@@ -678,7 +678,7 @@ var Se = [
|
|
|
678
678
|
})]
|
|
679
679
|
});
|
|
680
680
|
}, Ae = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
681
|
-
let { t: i } =
|
|
681
|
+
let { t: i } = L(), a = (e, t) => {
|
|
682
682
|
let n = i(e);
|
|
683
683
|
return n === e ? t : n;
|
|
684
684
|
};
|
|
@@ -698,7 +698,7 @@ var Se = [
|
|
|
698
698
|
}), /* @__PURE__ */ Y("button", {
|
|
699
699
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
700
700
|
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",
|
|
701
|
-
children: [/* @__PURE__ */ J(
|
|
701
|
+
children: [/* @__PURE__ */ J(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
702
702
|
})]
|
|
703
703
|
}), t.length > 0 ? /* @__PURE__ */ J("div", {
|
|
704
704
|
className: "space-y-4",
|
|
@@ -712,7 +712,7 @@ var Se = [
|
|
|
712
712
|
children: [/* @__PURE__ */ J("h3", {
|
|
713
713
|
className: "font-medium",
|
|
714
714
|
children: t.name
|
|
715
|
-
}), /* @__PURE__ */ J(
|
|
715
|
+
}), /* @__PURE__ */ J(b, {
|
|
716
716
|
status: t.status,
|
|
717
717
|
type: "webhook"
|
|
718
718
|
})]
|
|
@@ -722,7 +722,7 @@ var Se = [
|
|
|
722
722
|
})] }), /* @__PURE__ */ J("button", {
|
|
723
723
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
724
724
|
className: "rounded-md p-1 hover:bg-muted",
|
|
725
|
-
children: /* @__PURE__ */ J(
|
|
725
|
+
children: /* @__PURE__ */ J(ue, { size: 20 })
|
|
726
726
|
})]
|
|
727
727
|
}),
|
|
728
728
|
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
@@ -784,15 +784,15 @@ var Se = [
|
|
|
784
784
|
action: /* @__PURE__ */ Y("button", {
|
|
785
785
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
786
786
|
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",
|
|
787
|
-
children: [/* @__PURE__ */ J(
|
|
787
|
+
children: [/* @__PURE__ */ J(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
788
788
|
})
|
|
789
789
|
})]
|
|
790
790
|
});
|
|
791
|
-
}, je = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected:
|
|
792
|
-
let { t:
|
|
793
|
-
let n =
|
|
791
|
+
}, je = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
792
|
+
let { t: p } = L(), m = (e, t) => {
|
|
793
|
+
let n = p(e);
|
|
794
794
|
return n === e ? t : n;
|
|
795
|
-
},
|
|
795
|
+
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
796
796
|
return /* @__PURE__ */ Y("div", {
|
|
797
797
|
className: "space-y-6",
|
|
798
798
|
children: [
|
|
@@ -803,31 +803,31 @@ var Se = [
|
|
|
803
803
|
children: [
|
|
804
804
|
n.length,
|
|
805
805
|
" ",
|
|
806
|
-
n.length === 1 ?
|
|
806
|
+
n.length === 1 ? m("devportal.delegation", "delegation") : m("devportal.delegations", "delegations"),
|
|
807
807
|
" ",
|
|
808
|
-
|
|
808
|
+
m("devportal.for", "for"),
|
|
809
809
|
" ",
|
|
810
810
|
e
|
|
811
811
|
]
|
|
812
|
-
}),
|
|
812
|
+
}), h.length > 0 && /* @__PURE__ */ Y("p", {
|
|
813
813
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
814
814
|
children: [
|
|
815
|
-
|
|
815
|
+
h.length,
|
|
816
816
|
" ",
|
|
817
|
-
|
|
817
|
+
m("devportal.active", "active"),
|
|
818
818
|
",",
|
|
819
819
|
" ",
|
|
820
|
-
|
|
820
|
+
g.length,
|
|
821
821
|
" ",
|
|
822
|
-
|
|
822
|
+
m("devportal.revokedExpired", "revoked/expired")
|
|
823
823
|
]
|
|
824
824
|
})] }), /* @__PURE__ */ Y("button", {
|
|
825
825
|
onClick: i,
|
|
826
826
|
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",
|
|
827
|
-
children: [/* @__PURE__ */ J(
|
|
827
|
+
children: [/* @__PURE__ */ J(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
828
828
|
})]
|
|
829
829
|
}),
|
|
830
|
-
|
|
830
|
+
h.length > 0 && /* @__PURE__ */ J("div", {
|
|
831
831
|
className: "rounded-lg border bg-card p-4",
|
|
832
832
|
children: /* @__PURE__ */ Y("div", {
|
|
833
833
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
@@ -835,19 +835,19 @@ var Se = [
|
|
|
835
835
|
className: "flex flex-wrap items-center gap-3",
|
|
836
836
|
children: [/* @__PURE__ */ Y("div", {
|
|
837
837
|
className: "flex items-center gap-2",
|
|
838
|
-
children: [/* @__PURE__ */ J(
|
|
839
|
-
checked:
|
|
840
|
-
indeterminate:
|
|
838
|
+
children: [/* @__PURE__ */ J(S, {
|
|
839
|
+
checked: d,
|
|
840
|
+
indeterminate: f,
|
|
841
841
|
onChange: c,
|
|
842
|
-
ariaLabel:
|
|
842
|
+
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
843
843
|
}), /* @__PURE__ */ J("span", {
|
|
844
844
|
className: "text-sm font-medium",
|
|
845
|
-
children:
|
|
845
|
+
children: m("devportal.selectAllActive", "Select all active")
|
|
846
846
|
})]
|
|
847
847
|
}), o.size > 0 && /* @__PURE__ */ J("button", {
|
|
848
848
|
onClick: l,
|
|
849
849
|
className: "text-sm text-muted-foreground hover:text-foreground",
|
|
850
|
-
children:
|
|
850
|
+
children: m("devportal.clearSelection", "Clear selection")
|
|
851
851
|
})]
|
|
852
852
|
}), /* @__PURE__ */ Y("div", {
|
|
853
853
|
className: "flex flex-wrap items-center gap-2",
|
|
@@ -856,13 +856,13 @@ var Se = [
|
|
|
856
856
|
children: [
|
|
857
857
|
o.size,
|
|
858
858
|
" ",
|
|
859
|
-
|
|
859
|
+
m("devportal.selected", "selected")
|
|
860
860
|
]
|
|
861
861
|
}), /* @__PURE__ */ Y("button", {
|
|
862
|
-
onClick:
|
|
862
|
+
onClick: u,
|
|
863
863
|
disabled: o.size === 0,
|
|
864
864
|
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",
|
|
865
|
-
children: [
|
|
865
|
+
children: [m("devportal.revokeSelected", "Revoke Selected"), o.size > 0 ? ` (${o.size})` : ""]
|
|
866
866
|
})]
|
|
867
867
|
})]
|
|
868
868
|
})
|
|
@@ -878,7 +878,7 @@ var Se = [
|
|
|
878
878
|
className: "flex items-start gap-3",
|
|
879
879
|
children: [e.status === "ACTIVE" && /* @__PURE__ */ J("div", {
|
|
880
880
|
onClick: (e) => e.stopPropagation(),
|
|
881
|
-
children: /* @__PURE__ */ J(
|
|
881
|
+
children: /* @__PURE__ */ J(S, {
|
|
882
882
|
checked: o.has(e.id),
|
|
883
883
|
onChange: (t) => s(e.id, t),
|
|
884
884
|
ariaLabel: `Select delegation ${e.id}`,
|
|
@@ -896,24 +896,24 @@ var Se = [
|
|
|
896
896
|
}), /* @__PURE__ */ Y("p", {
|
|
897
897
|
className: "text-sm text-muted-foreground mt-1",
|
|
898
898
|
children: [
|
|
899
|
-
|
|
899
|
+
m("devportal.granted", "Granted"),
|
|
900
900
|
" ",
|
|
901
901
|
new Date(e.grantedAt).toLocaleDateString(),
|
|
902
902
|
" ",
|
|
903
|
-
|
|
903
|
+
m("devportal.by", "by"),
|
|
904
904
|
" ",
|
|
905
|
-
e.grantedBy === e.userId ?
|
|
905
|
+
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
906
906
|
]
|
|
907
907
|
})] })]
|
|
908
908
|
}), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
|
|
909
909
|
onClick: () => a(e.id),
|
|
910
910
|
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",
|
|
911
|
-
children: [/* @__PURE__ */ J(_e, { size: 14 }),
|
|
911
|
+
children: [/* @__PURE__ */ J(_e, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
912
912
|
})]
|
|
913
913
|
}),
|
|
914
914
|
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
915
915
|
className: "text-xs text-muted-foreground mb-2",
|
|
916
|
-
children:
|
|
916
|
+
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
917
917
|
}), /* @__PURE__ */ J("div", {
|
|
918
918
|
className: "flex flex-wrap gap-2",
|
|
919
919
|
children: e.scopes.map((e) => /* @__PURE__ */ J("span", {
|
|
@@ -923,7 +923,7 @@ var Se = [
|
|
|
923
923
|
})] }),
|
|
924
924
|
e.workspaceIds.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
925
925
|
className: "text-xs text-muted-foreground mb-2",
|
|
926
|
-
children:
|
|
926
|
+
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
927
927
|
}), /* @__PURE__ */ J("div", {
|
|
928
928
|
className: "flex flex-wrap gap-2",
|
|
929
929
|
children: e.workspaceIds.map((e) => /* @__PURE__ */ J("code", {
|
|
@@ -937,18 +937,18 @@ var Se = [
|
|
|
937
937
|
e.expiresAt && /* @__PURE__ */ Y("span", {
|
|
938
938
|
className: "flex items-center gap-1",
|
|
939
939
|
children: [
|
|
940
|
-
/* @__PURE__ */ J(
|
|
941
|
-
|
|
940
|
+
/* @__PURE__ */ J(ae, { size: 12 }),
|
|
941
|
+
m("devportal.expires", "Expires"),
|
|
942
942
|
" ",
|
|
943
943
|
new Date(e.expiresAt).toLocaleDateString()
|
|
944
944
|
]
|
|
945
945
|
}),
|
|
946
946
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ Y("span", {
|
|
947
947
|
className: "flex items-center gap-1",
|
|
948
|
-
children: [/* @__PURE__ */ J(
|
|
948
|
+
children: [/* @__PURE__ */ J(z, {
|
|
949
949
|
size: 12,
|
|
950
950
|
className: "text-status-success-text"
|
|
951
|
-
}),
|
|
951
|
+
}), m("devportal.noExpiration", "No expiration")]
|
|
952
952
|
}),
|
|
953
953
|
e.revokedAt && /* @__PURE__ */ Y("span", {
|
|
954
954
|
className: "flex items-center gap-1",
|
|
@@ -957,7 +957,7 @@ var Se = [
|
|
|
957
957
|
size: 12,
|
|
958
958
|
className: "text-status-error-text"
|
|
959
959
|
}),
|
|
960
|
-
|
|
960
|
+
m("devportal.revoked", "Revoked"),
|
|
961
961
|
" ",
|
|
962
962
|
new Date(e.revokedAt).toLocaleDateString()
|
|
963
963
|
]
|
|
@@ -968,21 +968,21 @@ var Se = [
|
|
|
968
968
|
}, e.id))
|
|
969
969
|
}) : /* @__PURE__ */ J(r, {
|
|
970
970
|
icon: /* @__PURE__ */ J(G, { size: 32 }),
|
|
971
|
-
title:
|
|
972
|
-
description:
|
|
971
|
+
title: m("devportal.noDelegations", "No delegations"),
|
|
972
|
+
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
973
973
|
action: /* @__PURE__ */ Y("button", {
|
|
974
974
|
onClick: i,
|
|
975
975
|
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",
|
|
976
|
-
children: [/* @__PURE__ */ J(
|
|
976
|
+
children: [/* @__PURE__ */ J(U, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
977
977
|
})
|
|
978
978
|
})
|
|
979
979
|
]
|
|
980
980
|
});
|
|
981
981
|
}, Me = ({ analytics: e }) => {
|
|
982
|
-
let { t } =
|
|
982
|
+
let { t } = L(), n = (e, n) => {
|
|
983
983
|
let r = t(e);
|
|
984
984
|
return r === e ? n : r;
|
|
985
|
-
}, i = e[0],
|
|
985
|
+
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
986
986
|
return /* @__PURE__ */ Y("div", {
|
|
987
987
|
className: "space-y-6",
|
|
988
988
|
children: [/* @__PURE__ */ Y("div", {
|
|
@@ -991,27 +991,27 @@ var Se = [
|
|
|
991
991
|
/* @__PURE__ */ J(Q, {
|
|
992
992
|
label: n("devportal.activeUsers", "Active Users"),
|
|
993
993
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
994
|
-
trend:
|
|
994
|
+
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
995
995
|
}),
|
|
996
996
|
/* @__PURE__ */ J(Q, {
|
|
997
997
|
label: n("devportal.apiCalls", "API Calls"),
|
|
998
998
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
999
|
-
trend:
|
|
999
|
+
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1000
1000
|
}),
|
|
1001
1001
|
/* @__PURE__ */ J(Q, {
|
|
1002
1002
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1003
1003
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1004
|
-
trend:
|
|
1004
|
+
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1005
1005
|
}),
|
|
1006
1006
|
/* @__PURE__ */ J(Q, {
|
|
1007
1007
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1008
1008
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1009
|
-
trend:
|
|
1009
|
+
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1010
1010
|
})
|
|
1011
1011
|
]
|
|
1012
|
-
}), /* @__PURE__ */ J(
|
|
1012
|
+
}), /* @__PURE__ */ J(_, {
|
|
1013
1013
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1014
|
-
children: e.length > 0 ? /* @__PURE__ */ J(
|
|
1014
|
+
children: e.length > 0 ? /* @__PURE__ */ J(w, {
|
|
1015
1015
|
data: e,
|
|
1016
1016
|
keyField: "id",
|
|
1017
1017
|
columns: [
|
|
@@ -1052,17 +1052,17 @@ var Se = [
|
|
|
1052
1052
|
}
|
|
1053
1053
|
]
|
|
1054
1054
|
}) : /* @__PURE__ */ J(r, {
|
|
1055
|
-
icon: /* @__PURE__ */ J(
|
|
1055
|
+
icon: /* @__PURE__ */ J(R, { size: 32 }),
|
|
1056
1056
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1057
1057
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1058
1058
|
})
|
|
1059
1059
|
})]
|
|
1060
1060
|
});
|
|
1061
1061
|
}, Ne = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Pe = ({ app: t }) => {
|
|
1062
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1062
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = L(), o = (e, t) => {
|
|
1063
1063
|
let n = a(e);
|
|
1064
1064
|
return n === e ? t : n;
|
|
1065
|
-
}, [s, c] =
|
|
1065
|
+
}, [s, c] = I(Ne), [l, u] = I("{}"), [d, f] = I(""), [p, m] = I(!1), [h, g] = I(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = I(i || ""), [y, b] = I(!1), x = N(async () => {
|
|
1066
1066
|
m(!0), f("");
|
|
1067
1067
|
try {
|
|
1068
1068
|
let e = {};
|
|
@@ -1093,7 +1093,7 @@ var Se = [
|
|
|
1093
1093
|
l,
|
|
1094
1094
|
h,
|
|
1095
1095
|
_
|
|
1096
|
-
]), S =
|
|
1096
|
+
]), S = N(() => {
|
|
1097
1097
|
i && v(i), b(!0);
|
|
1098
1098
|
}, [i]);
|
|
1099
1099
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -1122,7 +1122,7 @@ var Se = [
|
|
|
1122
1122
|
})] }), /* @__PURE__ */ Y("button", {
|
|
1123
1123
|
onClick: S,
|
|
1124
1124
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1125
|
-
children: [/* @__PURE__ */ J(
|
|
1125
|
+
children: [/* @__PURE__ */ J(le, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1126
1126
|
})]
|
|
1127
1127
|
}),
|
|
1128
1128
|
y && /* @__PURE__ */ Y("div", {
|
|
@@ -1223,10 +1223,10 @@ var Se = [
|
|
|
1223
1223
|
onClick: x,
|
|
1224
1224
|
disabled: p,
|
|
1225
1225
|
className: "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",
|
|
1226
|
-
children: [p ? /* @__PURE__ */ J(
|
|
1226
|
+
children: [p ? /* @__PURE__ */ J(H, {
|
|
1227
1227
|
size: 16,
|
|
1228
1228
|
className: "animate-spin"
|
|
1229
|
-
}) : /* @__PURE__ */ J(
|
|
1229
|
+
}) : /* @__PURE__ */ J(B, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1230
1230
|
}),
|
|
1231
1231
|
d && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1232
1232
|
className: "block text-sm font-medium mb-1",
|
|
@@ -1238,7 +1238,7 @@ var Se = [
|
|
|
1238
1238
|
]
|
|
1239
1239
|
});
|
|
1240
1240
|
}, Fe = ({ 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 }) => {
|
|
1241
|
-
let d =
|
|
1241
|
+
let d = F(null), f = N(async (e) => {
|
|
1242
1242
|
try {
|
|
1243
1243
|
r((await s(e)).downloadUrl);
|
|
1244
1244
|
} catch {}
|
|
@@ -1263,7 +1263,7 @@ var Se = [
|
|
|
1263
1263
|
className: "text-text-secondary opacity-40"
|
|
1264
1264
|
}), c && /* @__PURE__ */ Y("div", {
|
|
1265
1265
|
className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
|
|
1266
|
-
children: [/* @__PURE__ */ J(
|
|
1266
|
+
children: [/* @__PURE__ */ J(H, {
|
|
1267
1267
|
size: 14,
|
|
1268
1268
|
className: "animate-spin text-white"
|
|
1269
1269
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -1312,7 +1312,7 @@ var Se = [
|
|
|
1312
1312
|
]
|
|
1313
1313
|
});
|
|
1314
1314
|
}, Ie = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
1315
|
-
let s =
|
|
1315
|
+
let s = F(null), c = N(async (t) => {
|
|
1316
1316
|
try {
|
|
1317
1317
|
let i = await r(t);
|
|
1318
1318
|
n([...e, i.downloadUrl]);
|
|
@@ -1350,7 +1350,7 @@ var Se = [
|
|
|
1350
1350
|
disabled: i,
|
|
1351
1351
|
onClick: () => s.current?.click(),
|
|
1352
1352
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border 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"),
|
|
1353
|
-
children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
1353
|
+
children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(H, {
|
|
1354
1354
|
size: 18,
|
|
1355
1355
|
className: "animate-spin text-primary"
|
|
1356
1356
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -1484,102 +1484,102 @@ function Be(e) {
|
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
1486
1486
|
var Ve = ({ app: n }) => {
|
|
1487
|
-
let { workspacesGatewayUrl: r, authToken: i, workspaceId:
|
|
1488
|
-
let n =
|
|
1487
|
+
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o } = e(), { t: s } = L(), c = (e, t) => {
|
|
1488
|
+
let n = s(e);
|
|
1489
1489
|
return n === e ? t : n;
|
|
1490
|
-
}, [
|
|
1491
|
-
|
|
1492
|
-
let [
|
|
1493
|
-
|
|
1494
|
-
|
|
1490
|
+
}, [l, u] = I(() => Be(n)), [d, f] = I(!1), [m, g] = I(!1), v = F(n);
|
|
1491
|
+
v.current = n;
|
|
1492
|
+
let [y] = h(), [b, { loading: x }] = p();
|
|
1493
|
+
ne(() => {
|
|
1494
|
+
u(Be(v.current));
|
|
1495
1495
|
}, [n.id]);
|
|
1496
|
-
let
|
|
1497
|
-
|
|
1496
|
+
let S = (e, t) => {
|
|
1497
|
+
u((n) => ({
|
|
1498
1498
|
...n,
|
|
1499
1499
|
[e]: t
|
|
1500
1500
|
}));
|
|
1501
|
-
},
|
|
1502
|
-
|
|
1501
|
+
}, ee = async () => {
|
|
1502
|
+
f(!0);
|
|
1503
1503
|
try {
|
|
1504
|
-
let e =
|
|
1504
|
+
let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Le.has(l.manifestItemType), i = n.manifest ?? {}, a = {
|
|
1505
1505
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1506
|
-
itemType:
|
|
1506
|
+
itemType: l.manifestItemType || void 0,
|
|
1507
1507
|
identity: {
|
|
1508
|
-
version:
|
|
1509
|
-
displayName:
|
|
1508
|
+
version: l.manifestVersion || "1.0.0",
|
|
1509
|
+
displayName: l.manifestDisplayName
|
|
1510
1510
|
},
|
|
1511
|
-
...r ? { jsonContent:
|
|
1512
|
-
type:
|
|
1513
|
-
...
|
|
1511
|
+
...r ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
|
|
1512
|
+
type: l.manifestInstallType,
|
|
1513
|
+
...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
|
|
1514
1514
|
} } },
|
|
1515
1515
|
permissions: t,
|
|
1516
|
-
compatibility: { minPlatformVersion:
|
|
1516
|
+
compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
|
|
1517
1517
|
}, o = { ...n.pricingDetails ?? {} };
|
|
1518
|
-
if (
|
|
1519
|
-
let e = parseFloat(
|
|
1520
|
-
isNaN(e) || (o.price = e),
|
|
1518
|
+
if (l.pricingType !== "FREE") {
|
|
1519
|
+
let e = parseFloat(l.price);
|
|
1520
|
+
isNaN(e) || (o.price = e), l.currency && (o.currency = l.currency);
|
|
1521
1521
|
}
|
|
1522
|
-
await
|
|
1522
|
+
await y({ variables: {
|
|
1523
1523
|
id: n.id,
|
|
1524
1524
|
input: {
|
|
1525
|
-
iconUrl:
|
|
1526
|
-
bannerUrl:
|
|
1527
|
-
videoUrl:
|
|
1528
|
-
shortDescription:
|
|
1529
|
-
description:
|
|
1525
|
+
iconUrl: l.iconUrl || null,
|
|
1526
|
+
bannerUrl: l.bannerUrl || null,
|
|
1527
|
+
videoUrl: l.videoUrl || null,
|
|
1528
|
+
shortDescription: l.shortDescription || null,
|
|
1529
|
+
description: l.description || null,
|
|
1530
1530
|
screenshots: e.length > 0 ? e : null,
|
|
1531
|
-
websiteUrl:
|
|
1532
|
-
documentationUrl:
|
|
1533
|
-
githubUrl:
|
|
1534
|
-
supportUrl:
|
|
1535
|
-
privacyPolicyUrl:
|
|
1536
|
-
termsOfServiceUrl:
|
|
1537
|
-
pricingType:
|
|
1531
|
+
websiteUrl: l.websiteUrl || null,
|
|
1532
|
+
documentationUrl: l.documentationUrl || null,
|
|
1533
|
+
githubUrl: l.githubUrl || null,
|
|
1534
|
+
supportUrl: l.supportUrl || null,
|
|
1535
|
+
privacyPolicyUrl: l.privacyPolicyUrl || null,
|
|
1536
|
+
termsOfServiceUrl: l.termsOfServiceUrl || null,
|
|
1537
|
+
pricingType: l.pricingType || null,
|
|
1538
1538
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1539
1539
|
manifest: a
|
|
1540
1540
|
}
|
|
1541
|
-
} }),
|
|
1541
|
+
} }), C("success");
|
|
1542
1542
|
} catch {
|
|
1543
|
-
|
|
1543
|
+
C("error");
|
|
1544
1544
|
} finally {
|
|
1545
|
-
|
|
1545
|
+
f(!1);
|
|
1546
1546
|
}
|
|
1547
|
-
},
|
|
1547
|
+
}, w = async () => {
|
|
1548
1548
|
try {
|
|
1549
|
-
await
|
|
1549
|
+
await b({ variables: { id: n.id } }), C("success");
|
|
1550
1550
|
} catch {
|
|
1551
|
-
|
|
1551
|
+
C("error");
|
|
1552
1552
|
}
|
|
1553
|
-
},
|
|
1553
|
+
}, T = F(null), k = F(null), { upload: A, uploading: j, progress: te, error: P } = M(r, i, a, o), { upload: ie, uploading: R, progress: se, error: B } = M(r, i, a, o, "/DevPortal/Assets"), { upload: ce, uploading: le, progress: ue, error: U } = M(r, i, a, o, "/DevPortal/Assets"), { upload: de, uploading: fe, progress: pe, error: me } = M(r, i, a, o, "/DevPortal/Assets"), G = N(async (e) => {
|
|
1554
1554
|
let t = e.target.files?.[0];
|
|
1555
1555
|
if (t) {
|
|
1556
1556
|
e.target.value = "";
|
|
1557
1557
|
try {
|
|
1558
|
-
let e = await
|
|
1559
|
-
|
|
1558
|
+
let e = await A(t);
|
|
1559
|
+
u((t) => ({
|
|
1560
1560
|
...t,
|
|
1561
1561
|
manifestRegistryUrl: e.downloadUrl
|
|
1562
1562
|
}));
|
|
1563
1563
|
} catch {}
|
|
1564
1564
|
}
|
|
1565
|
-
}, [
|
|
1566
|
-
e.preventDefault(),
|
|
1565
|
+
}, [A]), ge = N(async (e) => {
|
|
1566
|
+
e.preventDefault(), g(!1);
|
|
1567
1567
|
let t = e.dataTransfer.files?.[0];
|
|
1568
1568
|
if (t) try {
|
|
1569
|
-
let e = await
|
|
1570
|
-
|
|
1569
|
+
let e = await A(t);
|
|
1570
|
+
u((t) => ({
|
|
1571
1571
|
...t,
|
|
1572
1572
|
manifestRegistryUrl: e.downloadUrl
|
|
1573
1573
|
}));
|
|
1574
1574
|
} catch {}
|
|
1575
|
-
}, [
|
|
1575
|
+
}, [A]), K = N((e) => {
|
|
1576
1576
|
let t = e.target.files?.[0];
|
|
1577
1577
|
if (!t) return;
|
|
1578
1578
|
let n = new FileReader();
|
|
1579
1579
|
n.onload = (e) => {
|
|
1580
1580
|
try {
|
|
1581
1581
|
let t = JSON.parse(e.target?.result), n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [];
|
|
1582
|
-
|
|
1582
|
+
u((e) => ({
|
|
1583
1583
|
...e,
|
|
1584
1584
|
manifestItemType: typeof t.itemType == "string" ? t.itemType : e.manifestItemType,
|
|
1585
1585
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.manifestDisplayName,
|
|
@@ -1591,23 +1591,23 @@ var Ve = ({ app: n }) => {
|
|
|
1591
1591
|
}));
|
|
1592
1592
|
} catch {}
|
|
1593
1593
|
}, n.readAsText(t), e.target.value = "";
|
|
1594
|
-
}, []), _e =
|
|
1595
|
-
let e =
|
|
1594
|
+
}, []), _e = N(() => {
|
|
1595
|
+
let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Le.has(l.manifestItemType), r = {
|
|
1596
1596
|
manifestVersion: "1.0",
|
|
1597
|
-
itemType:
|
|
1597
|
+
itemType: l.manifestItemType || void 0,
|
|
1598
1598
|
identity: {
|
|
1599
|
-
version:
|
|
1600
|
-
displayName:
|
|
1599
|
+
version: l.manifestVersion || "1.0.0",
|
|
1600
|
+
displayName: l.manifestDisplayName
|
|
1601
1601
|
},
|
|
1602
|
-
...t ? { jsonContent:
|
|
1603
|
-
type:
|
|
1604
|
-
...
|
|
1602
|
+
...t ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
|
|
1603
|
+
type: l.manifestInstallType,
|
|
1604
|
+
...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
|
|
1605
1605
|
} } },
|
|
1606
1606
|
permissions: e,
|
|
1607
|
-
compatibility: { minPlatformVersion:
|
|
1607
|
+
compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
|
|
1608
1608
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1609
1609
|
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1610
|
-
}, [n.slug,
|
|
1610
|
+
}, [n.slug, l]), ve = Le.has(l.manifestItemType), ye = l.manifestInstallType === "builtin", X = l.pricingType !== "FREE", be = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1611
1611
|
n.status;
|
|
1612
1612
|
let xe = n.status === "SUBMITTED", Se = n.status === "PUBLISHED";
|
|
1613
1613
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -1615,18 +1615,18 @@ var Ve = ({ app: n }) => {
|
|
|
1615
1615
|
children: [
|
|
1616
1616
|
Se ? /* @__PURE__ */ Y("div", {
|
|
1617
1617
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1618
|
-
children: [/* @__PURE__ */ J(
|
|
1618
|
+
children: [/* @__PURE__ */ J(z, {
|
|
1619
1619
|
size: 16,
|
|
1620
1620
|
className: "text-success mt-0.5 shrink-0"
|
|
1621
1621
|
}), /* @__PURE__ */ Y("div", {
|
|
1622
1622
|
className: "text-sm",
|
|
1623
1623
|
children: [/* @__PURE__ */ J("span", {
|
|
1624
1624
|
className: "font-medium text-success",
|
|
1625
|
-
children:
|
|
1625
|
+
children: c("devportal.storeListing.published", "Published")
|
|
1626
1626
|
}), n.publishedAt && /* @__PURE__ */ Y("span", {
|
|
1627
1627
|
className: "text-muted-foreground ml-2",
|
|
1628
1628
|
children: [
|
|
1629
|
-
|
|
1629
|
+
c("devportal.storeListing.since", "since"),
|
|
1630
1630
|
" ",
|
|
1631
1631
|
new Date(n.publishedAt).toLocaleDateString()
|
|
1632
1632
|
]
|
|
@@ -1634,7 +1634,7 @@ var Ve = ({ app: n }) => {
|
|
|
1634
1634
|
})]
|
|
1635
1635
|
}) : xe ? /* @__PURE__ */ Y("div", {
|
|
1636
1636
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
|
|
1637
|
-
children: [/* @__PURE__ */ J(
|
|
1637
|
+
children: [/* @__PURE__ */ J(ae, {
|
|
1638
1638
|
size: 16,
|
|
1639
1639
|
className: "text-primary mt-0.5 shrink-0"
|
|
1640
1640
|
}), /* @__PURE__ */ Y("div", {
|
|
@@ -1642,7 +1642,7 @@ var Ve = ({ app: n }) => {
|
|
|
1642
1642
|
children: [
|
|
1643
1643
|
/* @__PURE__ */ J("span", {
|
|
1644
1644
|
className: "font-medium text-primary",
|
|
1645
|
-
children:
|
|
1645
|
+
children: c("devportal.storeListing.underReview", "Submitted for review")
|
|
1646
1646
|
}),
|
|
1647
1647
|
n.submittedAt && /* @__PURE__ */ J("span", {
|
|
1648
1648
|
className: "text-muted-foreground ml-2",
|
|
@@ -1656,59 +1656,59 @@ var Ve = ({ app: n }) => {
|
|
|
1656
1656
|
})]
|
|
1657
1657
|
}) : /* @__PURE__ */ Y("div", {
|
|
1658
1658
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
1659
|
-
children: [/* @__PURE__ */ J(
|
|
1659
|
+
children: [/* @__PURE__ */ J(re, {
|
|
1660
1660
|
size: 16,
|
|
1661
1661
|
className: "text-warning mt-0.5 shrink-0"
|
|
1662
1662
|
}), /* @__PURE__ */ Y("div", {
|
|
1663
1663
|
className: "text-sm",
|
|
1664
1664
|
children: [/* @__PURE__ */ J("span", {
|
|
1665
1665
|
className: "font-medium text-warning",
|
|
1666
|
-
children:
|
|
1666
|
+
children: c("devportal.storeListing.draft", "Draft")
|
|
1667
1667
|
}), /* @__PURE__ */ J("span", {
|
|
1668
1668
|
className: "text-muted-foreground ml-2",
|
|
1669
|
-
children:
|
|
1669
|
+
children: c("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
1670
1670
|
})]
|
|
1671
1671
|
})]
|
|
1672
1672
|
}),
|
|
1673
|
-
/* @__PURE__ */ J(
|
|
1674
|
-
title:
|
|
1675
|
-
description:
|
|
1673
|
+
/* @__PURE__ */ J(_, {
|
|
1674
|
+
title: c("devportal.package", "Package"),
|
|
1675
|
+
description: c("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
1676
1676
|
children: /* @__PURE__ */ Y("div", {
|
|
1677
1677
|
className: "space-y-6",
|
|
1678
1678
|
children: [
|
|
1679
|
-
/* @__PURE__ */ J(
|
|
1680
|
-
label:
|
|
1681
|
-
value:
|
|
1679
|
+
/* @__PURE__ */ J(D, {
|
|
1680
|
+
label: c("devportal.storeItemType", "Item Type"),
|
|
1681
|
+
value: l.manifestItemType,
|
|
1682
1682
|
onChange: (e) => {
|
|
1683
1683
|
let t = e.target.value;
|
|
1684
|
-
|
|
1684
|
+
S("manifestItemType", t), Le.has(t) ? S("manifestInstallType", "json") : l.manifestInstallType === "json" && S("manifestInstallType", "zip");
|
|
1685
1685
|
},
|
|
1686
1686
|
options: ze,
|
|
1687
|
-
placeholder:
|
|
1688
|
-
hint:
|
|
1687
|
+
placeholder: c("devportal.selectItemType", "Select item type…"),
|
|
1688
|
+
hint: c("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
|
|
1689
1689
|
}),
|
|
1690
1690
|
/* @__PURE__ */ Y("div", {
|
|
1691
1691
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1692
|
-
children: [/* @__PURE__ */ J(
|
|
1693
|
-
label:
|
|
1694
|
-
value:
|
|
1695
|
-
onChange: (e) =>
|
|
1692
|
+
children: [/* @__PURE__ */ J(E, {
|
|
1693
|
+
label: c("devportal.manifestDisplayName", "Display Name"),
|
|
1694
|
+
value: l.manifestDisplayName,
|
|
1695
|
+
onChange: (e) => S("manifestDisplayName", e.target.value),
|
|
1696
1696
|
placeholder: "My Awesome Node"
|
|
1697
|
-
}), /* @__PURE__ */ J(
|
|
1698
|
-
label:
|
|
1699
|
-
value:
|
|
1700
|
-
onChange: (e) =>
|
|
1697
|
+
}), /* @__PURE__ */ J(E, {
|
|
1698
|
+
label: c("devportal.manifestVersion", "Version"),
|
|
1699
|
+
value: l.manifestVersion,
|
|
1700
|
+
onChange: (e) => S("manifestVersion", e.target.value),
|
|
1701
1701
|
placeholder: "1.0.0",
|
|
1702
|
-
hint:
|
|
1702
|
+
hint: c("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1703
1703
|
})]
|
|
1704
1704
|
}),
|
|
1705
|
-
ve && /* @__PURE__ */ J(
|
|
1706
|
-
label:
|
|
1707
|
-
value:
|
|
1708
|
-
onChange: (e) =>
|
|
1705
|
+
ve && /* @__PURE__ */ J(O, {
|
|
1706
|
+
label: c("devportal.jsonContent", l.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1707
|
+
value: l.manifestJsonContent,
|
|
1708
|
+
onChange: (e) => S("manifestJsonContent", e.target.value),
|
|
1709
1709
|
rows: 12,
|
|
1710
1710
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1711
|
-
hint:
|
|
1711
|
+
hint: c("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
1712
1712
|
}),
|
|
1713
1713
|
!ve && /* @__PURE__ */ Y("div", {
|
|
1714
1714
|
className: "space-y-3",
|
|
@@ -1717,74 +1717,74 @@ var Ve = ({ app: n }) => {
|
|
|
1717
1717
|
className: "flex items-center justify-between flex-wrap gap-2",
|
|
1718
1718
|
children: [/* @__PURE__ */ J("label", {
|
|
1719
1719
|
className: "text-sm font-medium",
|
|
1720
|
-
children:
|
|
1720
|
+
children: c("devportal.packageFile", "Package File")
|
|
1721
1721
|
}), /* @__PURE__ */ Y("label", {
|
|
1722
1722
|
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
1723
1723
|
children: [/* @__PURE__ */ J("input", {
|
|
1724
1724
|
type: "checkbox",
|
|
1725
1725
|
checked: ye,
|
|
1726
|
-
onChange: (e) =>
|
|
1726
|
+
onChange: (e) => S("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1727
1727
|
className: "h-4 w-4 rounded border-border accent-primary"
|
|
1728
1728
|
}), /* @__PURE__ */ J("span", {
|
|
1729
1729
|
className: "text-text-secondary",
|
|
1730
|
-
children:
|
|
1730
|
+
children: c("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
|
|
1731
1731
|
})]
|
|
1732
1732
|
})]
|
|
1733
1733
|
}),
|
|
1734
1734
|
!ye && /* @__PURE__ */ Y(q, { children: [
|
|
1735
1735
|
/* @__PURE__ */ Y("div", {
|
|
1736
1736
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1737
|
-
children: [/* @__PURE__ */ J(
|
|
1737
|
+
children: [/* @__PURE__ */ J(V, {
|
|
1738
1738
|
size: 15,
|
|
1739
1739
|
className: "mt-0.5 shrink-0"
|
|
1740
1740
|
}), /* @__PURE__ */ Y("span", { children: [
|
|
1741
|
-
|
|
1741
|
+
c("devportal.zipModelHint", "Package your code and a "),
|
|
1742
1742
|
/* @__PURE__ */ J("code", {
|
|
1743
1743
|
className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
|
|
1744
1744
|
children: "manifest.json"
|
|
1745
1745
|
}),
|
|
1746
|
-
|
|
1746
|
+
c("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
|
|
1747
1747
|
] })]
|
|
1748
1748
|
}),
|
|
1749
1749
|
/* @__PURE__ */ Y("div", {
|
|
1750
1750
|
onDragOver: (e) => {
|
|
1751
|
-
e.preventDefault(),
|
|
1751
|
+
e.preventDefault(), g(!0);
|
|
1752
1752
|
},
|
|
1753
|
-
onDragLeave: () =>
|
|
1753
|
+
onDragLeave: () => g(!1),
|
|
1754
1754
|
onDrop: (e) => void ge(e),
|
|
1755
|
-
onClick: () => !
|
|
1756
|
-
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer",
|
|
1755
|
+
onClick: () => !j && k.current?.click(),
|
|
1756
|
+
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", m ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", j && "pointer-events-none opacity-75"),
|
|
1757
1757
|
children: [/* @__PURE__ */ J("input", {
|
|
1758
|
-
ref:
|
|
1758
|
+
ref: k,
|
|
1759
1759
|
type: "file",
|
|
1760
1760
|
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1761
1761
|
className: "hidden",
|
|
1762
1762
|
onChange: (e) => void G(e)
|
|
1763
|
-
}),
|
|
1764
|
-
/* @__PURE__ */ J(
|
|
1763
|
+
}), j ? /* @__PURE__ */ Y(q, { children: [
|
|
1764
|
+
/* @__PURE__ */ J(H, {
|
|
1765
1765
|
size: 28,
|
|
1766
1766
|
className: "animate-spin text-primary"
|
|
1767
1767
|
}),
|
|
1768
1768
|
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
|
|
1769
1769
|
className: "text-sm font-medium",
|
|
1770
1770
|
children: [
|
|
1771
|
-
|
|
1771
|
+
c("devportal.uploading", "Uploading…"),
|
|
1772
1772
|
" ",
|
|
1773
|
-
|
|
1773
|
+
te,
|
|
1774
1774
|
"%"
|
|
1775
1775
|
]
|
|
1776
1776
|
}), /* @__PURE__ */ J("p", {
|
|
1777
1777
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1778
|
-
children:
|
|
1778
|
+
children: c("devportal.uploadingHint", "Stored securely in your workspace")
|
|
1779
1779
|
})] }),
|
|
1780
1780
|
/* @__PURE__ */ J("div", {
|
|
1781
1781
|
className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
|
|
1782
1782
|
children: /* @__PURE__ */ J("div", {
|
|
1783
1783
|
className: "h-full bg-primary transition-all",
|
|
1784
|
-
style: { width: `${
|
|
1784
|
+
style: { width: `${te}%` }
|
|
1785
1785
|
})
|
|
1786
1786
|
})
|
|
1787
|
-
] }) : be ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
1787
|
+
] }) : be ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(z, {
|
|
1788
1788
|
size: 28,
|
|
1789
1789
|
className: "text-status-success-text"
|
|
1790
1790
|
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
@@ -1792,29 +1792,29 @@ var Ve = ({ app: n }) => {
|
|
|
1792
1792
|
children: be
|
|
1793
1793
|
}), /* @__PURE__ */ J("p", {
|
|
1794
1794
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1795
|
-
children:
|
|
1795
|
+
children: c("devportal.clickToReplace", "Click or drag to replace")
|
|
1796
1796
|
})] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, {
|
|
1797
1797
|
size: 28,
|
|
1798
1798
|
className: "text-text-secondary"
|
|
1799
1799
|
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
1800
1800
|
className: "text-sm font-medium",
|
|
1801
|
-
children:
|
|
1801
|
+
children: c("devportal.dropZipHere", "Drop your .zip here")
|
|
1802
1802
|
}), /* @__PURE__ */ J("p", {
|
|
1803
1803
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1804
|
-
children:
|
|
1804
|
+
children: c("devportal.orClickToBrowse", "or click to browse")
|
|
1805
1805
|
})] })] })]
|
|
1806
1806
|
}),
|
|
1807
|
-
|
|
1807
|
+
P && /* @__PURE__ */ J("p", {
|
|
1808
1808
|
className: "text-xs text-status-error-text",
|
|
1809
|
-
children:
|
|
1809
|
+
children: P
|
|
1810
1810
|
})
|
|
1811
1811
|
] }),
|
|
1812
1812
|
ye && /* @__PURE__ */ Y("div", {
|
|
1813
1813
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1814
|
-
children: [/* @__PURE__ */ J(
|
|
1814
|
+
children: [/* @__PURE__ */ J(V, {
|
|
1815
1815
|
size: 15,
|
|
1816
1816
|
className: "mt-0.5 shrink-0"
|
|
1817
|
-
}), /* @__PURE__ */ J("span", { children:
|
|
1817
|
+
}), /* @__PURE__ */ J("span", { children: c("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
1818
1818
|
})
|
|
1819
1819
|
]
|
|
1820
1820
|
}),
|
|
@@ -1822,7 +1822,7 @@ var Ve = ({ app: n }) => {
|
|
|
1822
1822
|
className: "flex flex-wrap items-center gap-2 border-t pt-4",
|
|
1823
1823
|
children: [
|
|
1824
1824
|
/* @__PURE__ */ J("input", {
|
|
1825
|
-
ref:
|
|
1825
|
+
ref: T,
|
|
1826
1826
|
type: "file",
|
|
1827
1827
|
accept: ".json,application/json",
|
|
1828
1828
|
className: "hidden",
|
|
@@ -1834,163 +1834,163 @@ var Ve = ({ app: n }) => {
|
|
|
1834
1834
|
}),
|
|
1835
1835
|
/* @__PURE__ */ Y("button", {
|
|
1836
1836
|
type: "button",
|
|
1837
|
-
onClick: () =>
|
|
1837
|
+
onClick: () => T.current?.click(),
|
|
1838
1838
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
1839
|
-
children: [/* @__PURE__ */ J(W, { size: 12 }),
|
|
1839
|
+
children: [/* @__PURE__ */ J(W, { size: 12 }), c("devportal.importManifest", "Import")]
|
|
1840
1840
|
}),
|
|
1841
1841
|
/* @__PURE__ */ Y("button", {
|
|
1842
1842
|
type: "button",
|
|
1843
1843
|
onClick: _e,
|
|
1844
1844
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
1845
|
-
children: [/* @__PURE__ */ J(
|
|
1845
|
+
children: [/* @__PURE__ */ J(oe, { size: 12 }), c("devportal.exportManifest", "Export")]
|
|
1846
1846
|
}),
|
|
1847
1847
|
/* @__PURE__ */ J("span", {
|
|
1848
1848
|
className: "text-xs text-text-secondary",
|
|
1849
|
-
children:
|
|
1849
|
+
children: c("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
|
|
1850
1850
|
})
|
|
1851
1851
|
]
|
|
1852
1852
|
})
|
|
1853
1853
|
]
|
|
1854
1854
|
})
|
|
1855
1855
|
}),
|
|
1856
|
-
/* @__PURE__ */ J(
|
|
1857
|
-
title:
|
|
1858
|
-
description:
|
|
1856
|
+
/* @__PURE__ */ J(_, {
|
|
1857
|
+
title: c("devportal.storePresentation", "Store Presence"),
|
|
1858
|
+
description: c("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
1859
1859
|
children: /* @__PURE__ */ Y("div", {
|
|
1860
1860
|
className: "space-y-5",
|
|
1861
1861
|
children: [
|
|
1862
1862
|
/* @__PURE__ */ Y("div", {
|
|
1863
1863
|
className: "grid gap-5 sm:grid-cols-2",
|
|
1864
1864
|
children: [/* @__PURE__ */ J(Fe, {
|
|
1865
|
-
label:
|
|
1866
|
-
value:
|
|
1867
|
-
onChange: (e) =>
|
|
1868
|
-
hint:
|
|
1865
|
+
label: c("devportal.iconUrl", "Icon"),
|
|
1866
|
+
value: l.iconUrl,
|
|
1867
|
+
onChange: (e) => S("iconUrl", e),
|
|
1868
|
+
hint: c("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
1869
1869
|
aspectClass: "aspect-square",
|
|
1870
|
-
upload:
|
|
1871
|
-
uploading:
|
|
1872
|
-
progress:
|
|
1873
|
-
error:
|
|
1870
|
+
upload: ie,
|
|
1871
|
+
uploading: R,
|
|
1872
|
+
progress: se,
|
|
1873
|
+
error: B
|
|
1874
1874
|
}), /* @__PURE__ */ J(Fe, {
|
|
1875
|
-
label:
|
|
1876
|
-
value:
|
|
1877
|
-
onChange: (e) =>
|
|
1878
|
-
hint:
|
|
1875
|
+
label: c("devportal.bannerUrl", "Banner"),
|
|
1876
|
+
value: l.bannerUrl,
|
|
1877
|
+
onChange: (e) => S("bannerUrl", e),
|
|
1878
|
+
hint: c("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
1879
1879
|
aspectClass: "aspect-video",
|
|
1880
|
-
upload:
|
|
1881
|
-
uploading:
|
|
1882
|
-
progress:
|
|
1883
|
-
error:
|
|
1880
|
+
upload: ce,
|
|
1881
|
+
uploading: le,
|
|
1882
|
+
progress: ue,
|
|
1883
|
+
error: U
|
|
1884
1884
|
})]
|
|
1885
1885
|
}),
|
|
1886
|
-
/* @__PURE__ */ J(
|
|
1887
|
-
label:
|
|
1888
|
-
value:
|
|
1889
|
-
onChange: (e) =>
|
|
1886
|
+
/* @__PURE__ */ J(E, {
|
|
1887
|
+
label: c("devportal.videoUrl", "Demo Video URL"),
|
|
1888
|
+
value: l.videoUrl,
|
|
1889
|
+
onChange: (e) => S("videoUrl", e.target.value),
|
|
1890
1890
|
placeholder: "https://...",
|
|
1891
|
-
hint:
|
|
1891
|
+
hint: c("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
1892
1892
|
}),
|
|
1893
|
-
/* @__PURE__ */ J(
|
|
1894
|
-
label:
|
|
1895
|
-
value:
|
|
1896
|
-
onChange: (e) =>
|
|
1893
|
+
/* @__PURE__ */ J(O, {
|
|
1894
|
+
label: c("devportal.shortDescription", "Short Description"),
|
|
1895
|
+
value: l.shortDescription,
|
|
1896
|
+
onChange: (e) => S("shortDescription", e.target.value),
|
|
1897
1897
|
maxLength: 200,
|
|
1898
1898
|
rows: 2,
|
|
1899
|
-
hint: `${
|
|
1899
|
+
hint: `${l.shortDescription.length}/200 · ${c("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
1900
1900
|
}),
|
|
1901
|
-
/* @__PURE__ */ J(
|
|
1902
|
-
label:
|
|
1903
|
-
value:
|
|
1904
|
-
onChange: (e) =>
|
|
1901
|
+
/* @__PURE__ */ J(O, {
|
|
1902
|
+
label: c("devportal.longDescription", "Full Description"),
|
|
1903
|
+
value: l.description,
|
|
1904
|
+
onChange: (e) => S("description", e.target.value),
|
|
1905
1905
|
rows: 5,
|
|
1906
|
-
hint:
|
|
1906
|
+
hint: c("devportal.fullDescHint", "Markdown supported")
|
|
1907
1907
|
}),
|
|
1908
1908
|
/* @__PURE__ */ J(Ie, {
|
|
1909
|
-
urls:
|
|
1910
|
-
onChange: (e) =>
|
|
1911
|
-
upload:
|
|
1912
|
-
uploading:
|
|
1913
|
-
progress:
|
|
1914
|
-
error:
|
|
1909
|
+
urls: l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
1910
|
+
onChange: (e) => S("screenshotsText", e.join("\n")),
|
|
1911
|
+
upload: de,
|
|
1912
|
+
uploading: fe,
|
|
1913
|
+
progress: pe,
|
|
1914
|
+
error: me
|
|
1915
1915
|
})
|
|
1916
1916
|
]
|
|
1917
1917
|
})
|
|
1918
1918
|
}),
|
|
1919
|
-
/* @__PURE__ */ J(
|
|
1920
|
-
title:
|
|
1921
|
-
description:
|
|
1919
|
+
/* @__PURE__ */ J(_, {
|
|
1920
|
+
title: c("devportal.linksPolicies", "Links & Policies"),
|
|
1921
|
+
description: c("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
1922
1922
|
children: /* @__PURE__ */ Y("div", {
|
|
1923
1923
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1924
1924
|
children: [
|
|
1925
|
-
/* @__PURE__ */ J(
|
|
1926
|
-
label:
|
|
1927
|
-
value:
|
|
1928
|
-
onChange: (e) =>
|
|
1925
|
+
/* @__PURE__ */ J(E, {
|
|
1926
|
+
label: c("devportal.websiteUrl", "Website"),
|
|
1927
|
+
value: l.websiteUrl,
|
|
1928
|
+
onChange: (e) => S("websiteUrl", e.target.value),
|
|
1929
1929
|
placeholder: "https://..."
|
|
1930
1930
|
}),
|
|
1931
|
-
/* @__PURE__ */ J(
|
|
1932
|
-
label:
|
|
1933
|
-
value:
|
|
1934
|
-
onChange: (e) =>
|
|
1931
|
+
/* @__PURE__ */ J(E, {
|
|
1932
|
+
label: c("devportal.documentationUrl", "Documentation"),
|
|
1933
|
+
value: l.documentationUrl,
|
|
1934
|
+
onChange: (e) => S("documentationUrl", e.target.value),
|
|
1935
1935
|
placeholder: "https://..."
|
|
1936
1936
|
}),
|
|
1937
|
-
/* @__PURE__ */ J(
|
|
1938
|
-
label:
|
|
1939
|
-
value:
|
|
1940
|
-
onChange: (e) =>
|
|
1937
|
+
/* @__PURE__ */ J(E, {
|
|
1938
|
+
label: c("devportal.githubUrl", "GitHub"),
|
|
1939
|
+
value: l.githubUrl,
|
|
1940
|
+
onChange: (e) => S("githubUrl", e.target.value),
|
|
1941
1941
|
placeholder: "https://github.com/..."
|
|
1942
1942
|
}),
|
|
1943
|
-
/* @__PURE__ */ J(
|
|
1944
|
-
label:
|
|
1945
|
-
value:
|
|
1946
|
-
onChange: (e) =>
|
|
1943
|
+
/* @__PURE__ */ J(E, {
|
|
1944
|
+
label: c("devportal.supportUrl", "Support"),
|
|
1945
|
+
value: l.supportUrl,
|
|
1946
|
+
onChange: (e) => S("supportUrl", e.target.value),
|
|
1947
1947
|
placeholder: "https://..."
|
|
1948
1948
|
}),
|
|
1949
|
-
/* @__PURE__ */ J(
|
|
1950
|
-
label: `${
|
|
1951
|
-
value:
|
|
1952
|
-
onChange: (e) =>
|
|
1949
|
+
/* @__PURE__ */ J(E, {
|
|
1950
|
+
label: `${c("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
1951
|
+
value: l.privacyPolicyUrl,
|
|
1952
|
+
onChange: (e) => S("privacyPolicyUrl", e.target.value),
|
|
1953
1953
|
placeholder: "https://...",
|
|
1954
|
-
hint:
|
|
1954
|
+
hint: c("devportal.requiredForStore", "Required for store submission")
|
|
1955
1955
|
}),
|
|
1956
|
-
/* @__PURE__ */ J(
|
|
1957
|
-
label: `${
|
|
1958
|
-
value:
|
|
1959
|
-
onChange: (e) =>
|
|
1956
|
+
/* @__PURE__ */ J(E, {
|
|
1957
|
+
label: `${c("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
1958
|
+
value: l.termsOfServiceUrl,
|
|
1959
|
+
onChange: (e) => S("termsOfServiceUrl", e.target.value),
|
|
1960
1960
|
placeholder: "https://...",
|
|
1961
|
-
hint:
|
|
1961
|
+
hint: c("devportal.requiredForStore", "Required for store submission")
|
|
1962
1962
|
})
|
|
1963
1963
|
]
|
|
1964
1964
|
})
|
|
1965
1965
|
}),
|
|
1966
|
-
/* @__PURE__ */ J(
|
|
1967
|
-
title:
|
|
1968
|
-
description:
|
|
1966
|
+
/* @__PURE__ */ J(_, {
|
|
1967
|
+
title: c("devportal.pricing", "Pricing"),
|
|
1968
|
+
description: c("devportal.pricingDescription", "How this item is priced in the marketplace"),
|
|
1969
1969
|
children: /* @__PURE__ */ Y("div", {
|
|
1970
1970
|
className: "space-y-4",
|
|
1971
1971
|
children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1972
1972
|
className: "mb-2 block text-sm font-medium",
|
|
1973
|
-
children:
|
|
1973
|
+
children: c("devportal.pricingType", "Pricing Type")
|
|
1974
1974
|
}), /* @__PURE__ */ J("div", {
|
|
1975
1975
|
className: "flex flex-wrap gap-2",
|
|
1976
1976
|
children: Re.map((e) => /* @__PURE__ */ J("button", {
|
|
1977
1977
|
type: "button",
|
|
1978
|
-
onClick: () =>
|
|
1979
|
-
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors",
|
|
1978
|
+
onClick: () => S("pricingType", e.value),
|
|
1979
|
+
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
|
|
1980
1980
|
children: e.label
|
|
1981
1981
|
}, e.value))
|
|
1982
1982
|
})] }), X && /* @__PURE__ */ Y("div", {
|
|
1983
1983
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1984
|
-
children: [/* @__PURE__ */ J(
|
|
1985
|
-
label:
|
|
1984
|
+
children: [/* @__PURE__ */ J(E, {
|
|
1985
|
+
label: c("devportal.price", "Price"),
|
|
1986
1986
|
type: "number",
|
|
1987
|
-
value:
|
|
1988
|
-
onChange: (e) =>
|
|
1987
|
+
value: l.price,
|
|
1988
|
+
onChange: (e) => S("price", e.target.value),
|
|
1989
1989
|
placeholder: "0.00"
|
|
1990
|
-
}), /* @__PURE__ */ J(
|
|
1991
|
-
label:
|
|
1992
|
-
value:
|
|
1993
|
-
onChange: (e) =>
|
|
1990
|
+
}), /* @__PURE__ */ J(E, {
|
|
1991
|
+
label: c("devportal.currency", "Currency"),
|
|
1992
|
+
value: l.currency,
|
|
1993
|
+
onChange: (e) => S("currency", e.target.value),
|
|
1994
1994
|
placeholder: "USD"
|
|
1995
1995
|
})]
|
|
1996
1996
|
})]
|
|
@@ -2000,28 +2000,28 @@ var Ve = ({ app: n }) => {
|
|
|
2000
2000
|
className: "border-t pt-6 flex items-center gap-3 flex-wrap",
|
|
2001
2001
|
children: [/* @__PURE__ */ J("button", {
|
|
2002
2002
|
type: "button",
|
|
2003
|
-
onClick:
|
|
2004
|
-
disabled:
|
|
2003
|
+
onClick: ee,
|
|
2004
|
+
disabled: d,
|
|
2005
2005
|
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",
|
|
2006
|
-
children:
|
|
2006
|
+
children: d ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(H, {
|
|
2007
2007
|
size: 16,
|
|
2008
2008
|
className: "animate-spin"
|
|
2009
|
-
}),
|
|
2009
|
+
}), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(he, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
|
|
2010
2010
|
}), !Se && /* @__PURE__ */ J("button", {
|
|
2011
2011
|
type: "button",
|
|
2012
|
-
onClick: () => void
|
|
2013
|
-
disabled:
|
|
2012
|
+
onClick: () => void w(),
|
|
2013
|
+
disabled: x || d,
|
|
2014
2014
|
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
|
|
2015
|
-
children:
|
|
2015
|
+
children: x ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(H, {
|
|
2016
2016
|
size: 16,
|
|
2017
2017
|
className: "animate-spin"
|
|
2018
|
-
}),
|
|
2018
|
+
}), c("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(z, { size: 16 }), xe ? c("devportal.resubmitForReview", "Resubmit for Review") : c("devportal.submitForReview", "Submit for Review")] })
|
|
2019
2019
|
})]
|
|
2020
2020
|
})
|
|
2021
2021
|
]
|
|
2022
2022
|
});
|
|
2023
2023
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2024
|
-
let { t: i } =
|
|
2024
|
+
let { t: i } = L();
|
|
2025
2025
|
return /* @__PURE__ */ Y("div", {
|
|
2026
2026
|
className: "rounded-lg border bg-card p-4",
|
|
2027
2027
|
children: [
|
|
@@ -2052,7 +2052,7 @@ var Ve = ({ app: n }) => {
|
|
|
2052
2052
|
target: "_blank",
|
|
2053
2053
|
rel: "noopener noreferrer",
|
|
2054
2054
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2055
|
-
children: [/* @__PURE__ */ J(
|
|
2055
|
+
children: [/* @__PURE__ */ J(B, { size: 14 }), e]
|
|
2056
2056
|
});
|
|
2057
2057
|
//#endregion
|
|
2058
2058
|
export { Te as ApplicationDetailPage };
|