@burdenoff/microfe-devportal 2026.713.5 → 2026.713.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.
|
@@ -2,28 +2,28 @@ 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 { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetApplicationVersionsQuery as c, useGetOrganizationQuery as l, useGetWebhooksQuery as u, useGetWorkspaceInstallationQuery as d, useInstallApplicationMutation as f,
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { APP_TYPE_LABELS as
|
|
8
|
-
import { FeaturedBadge as
|
|
9
|
-
import { SelectionCheckbox as
|
|
10
|
-
import { nativeNotify as
|
|
11
|
-
import { NewSecretAlert as
|
|
12
|
-
import { DataTable as
|
|
13
|
-
import { InputField as
|
|
14
|
-
import { ConfirmDialog as
|
|
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 ce, AppWindow as le, BarChart3 as ue, Check as
|
|
22
|
-
import { useParams as
|
|
5
|
+
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetApplicationVersionsQuery as c, useGetOrganizationQuery as l, useGetWebhooksQuery as u, useGetWorkspaceInstallationQuery as d, useInstallApplicationMutation as f, usePublishApplicationVersionMutation as p, useRevokeDelegationMutation as m, useRotateAppSecretMutation as h, useSubmitApplicationMutation as g, useUninstallApplicationMutation as _, useUpdateApplicationMutation as v } from "../../generated/global-operations.js";
|
|
6
|
+
import { PageLayout as y, PageSection as b } from "../components/PageLayout.js";
|
|
7
|
+
import { APP_TYPE_LABELS as x } from "../utils/constants.js";
|
|
8
|
+
import { FeaturedBadge as S, StatusBadge as C, VerifiedBadge as w } from "../components/StatusBadge.js";
|
|
9
|
+
import { SelectionCheckbox as T } from "../components/SelectionCheckbox.js";
|
|
10
|
+
import { nativeNotify as E } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { NewSecretAlert as D } from "../components/SecretDisplay.js";
|
|
12
|
+
import { DataTable as O, DetailList as k } from "../components/DataTable.js";
|
|
13
|
+
import { InputField as A, SelectField as ee, TextareaField as te } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as ne } from "../components/ConfirmDialog.js";
|
|
15
|
+
import { GrantDelegationModal as re } from "../components/GrantDelegationModal.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as ie } from "../constants/permissions.js";
|
|
17
|
+
import { useDevportalPermission as ae } from "../hooks/usePermission.js";
|
|
18
|
+
import { usePackageUpload as oe } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as j, useEffect as se, 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 ce, AppWindow as le, BarChart3 as ue, Check as I, CheckCircle as de, ChevronRight as fe, CircleDollarSign as L, Clock as pe, Edit as me, ExternalLink as R, FlaskConical as he, Gift as ge, Info as z, Key as _e, Loader2 as B, Lock as ve, MoreHorizontal as ye, Package as be, Plus as V, Power as xe, RefreshCw as Se, SendHorizontal as Ce, Shield as H, Store as we, TrendingUp as Te, Upload as U, Users as Ee, Wallet as De, Webhook as Oe, X as ke, XCircle as Ae } from "lucide-react";
|
|
22
|
+
import { useParams as je } from "react-router-dom";
|
|
23
23
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
24
|
-
import { CTAOverflowMenu as
|
|
24
|
+
import { CTAOverflowMenu as Me, EmphasisPanel as Ne, GlassCard as Pe } from "@burdenoff/fe-libs/ui";
|
|
25
25
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
26
|
-
function
|
|
26
|
+
function Fe(e) {
|
|
27
27
|
return e ? {
|
|
28
28
|
id: e.id,
|
|
29
29
|
name: e.name,
|
|
@@ -76,7 +76,7 @@ function Pe(e) {
|
|
|
76
76
|
updatedAt: e.updatedAt
|
|
77
77
|
} : null;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Ie(e) {
|
|
80
80
|
return {
|
|
81
81
|
id: e.id,
|
|
82
82
|
applicationId: e.applicationId,
|
|
@@ -100,7 +100,7 @@ function q(e) {
|
|
|
100
100
|
updatedAt: e.updatedAt
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function q(e) {
|
|
104
104
|
return {
|
|
105
105
|
id: e.id,
|
|
106
106
|
applicationId: e.applicationId,
|
|
@@ -116,7 +116,7 @@ function Fe(e) {
|
|
|
116
116
|
createdAt: e.createdAt
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Le(e) {
|
|
120
120
|
return {
|
|
121
121
|
id: e.id,
|
|
122
122
|
appId: e.appId,
|
|
@@ -138,7 +138,7 @@ function Ie(e) {
|
|
|
138
138
|
revokedBy: e.revokedBy || void 0
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
var
|
|
141
|
+
var Re = [
|
|
142
142
|
{
|
|
143
143
|
id: "overview",
|
|
144
144
|
label: "Overview",
|
|
@@ -162,12 +162,12 @@ var Le = [
|
|
|
162
162
|
{
|
|
163
163
|
id: "pricing",
|
|
164
164
|
label: "Pricing",
|
|
165
|
-
icon:
|
|
165
|
+
icon: L
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
id: "permissions",
|
|
169
169
|
label: "Permissions",
|
|
170
|
-
icon:
|
|
170
|
+
icon: H
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
id: "webhooks",
|
|
@@ -182,7 +182,7 @@ var Le = [
|
|
|
182
182
|
{
|
|
183
183
|
id: "playground",
|
|
184
184
|
label: "API Playground",
|
|
185
|
-
icon:
|
|
185
|
+
icon: R
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
id: "oauth",
|
|
@@ -192,22 +192,22 @@ var Le = [
|
|
|
192
192
|
{
|
|
193
193
|
id: "api-keys",
|
|
194
194
|
label: "API Keys",
|
|
195
|
-
icon:
|
|
195
|
+
icon: _e
|
|
196
196
|
}
|
|
197
|
-
],
|
|
197
|
+
], ze = {
|
|
198
198
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
199
199
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
200
200
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
201
|
-
},
|
|
201
|
+
}, Be = ({ message: e = "Loading..." }) => /* @__PURE__ */ K("div", {
|
|
202
202
|
className: "flex items-center justify-center gap-3 py-12",
|
|
203
|
-
children: [/* @__PURE__ */ G(
|
|
203
|
+
children: [/* @__PURE__ */ G(B, {
|
|
204
204
|
size: 20,
|
|
205
205
|
className: "animate-spin text-text-secondary"
|
|
206
206
|
}), /* @__PURE__ */ G("p", {
|
|
207
207
|
className: "text-sm text-text-secondary",
|
|
208
208
|
children: e
|
|
209
209
|
})]
|
|
210
|
-
}),
|
|
210
|
+
}), Ve = ({ message: e }) => /* @__PURE__ */ K("div", {
|
|
211
211
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
212
212
|
children: [/* @__PURE__ */ G(ce, {
|
|
213
213
|
size: 32,
|
|
@@ -216,80 +216,84 @@ var Le = [
|
|
|
216
216
|
className: "text-sm text-text-secondary",
|
|
217
217
|
children: e
|
|
218
218
|
})]
|
|
219
|
-
}),
|
|
220
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } =
|
|
219
|
+
}), He = () => {
|
|
220
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = F(), m = (e, t) => {
|
|
221
221
|
let n = u(e);
|
|
222
222
|
return n === e ? t : n;
|
|
223
|
-
}, { allowed:
|
|
224
|
-
variables: { id:
|
|
225
|
-
skip: !
|
|
226
|
-
}), [
|
|
223
|
+
}, { allowed: v } = ae(ie.APP_UPDATE), { allowed: b } = ae(ie.APP_DELETE), { appId: T } = je(), [O, k] = P("overview"), [A, ee] = P(!1), [te, oe] = P(!1), [se, M] = P(null), [N, ue] = P(!1), { data: L, loading: R, error: ge, refetch: z } = s({
|
|
224
|
+
variables: { id: T },
|
|
225
|
+
skip: !T
|
|
226
|
+
}), [_e, { loading: ve }] = h(), [ye, { loading: be }] = a(), [V, { loading: H }] = g(), [Te] = p(), [U, { loading: Ee }] = f(), [De, { loading: Oe }] = _(), { data: ke, refetch: Ne } = d({
|
|
227
227
|
variables: {
|
|
228
|
-
applicationId:
|
|
228
|
+
applicationId: T,
|
|
229
229
|
workspaceId: c ?? void 0
|
|
230
230
|
},
|
|
231
|
-
skip: !c || !
|
|
231
|
+
skip: !c || !T,
|
|
232
232
|
fetchPolicy: "cache-and-network"
|
|
233
|
-
}),
|
|
234
|
-
variables: { id:
|
|
235
|
-
skip: !
|
|
233
|
+
}), Pe = ke?.appInstallations?.edges?.[0]?.node ?? null, { data: Ie } = l({
|
|
234
|
+
variables: { id: L?.application?.developerOrganizationId ?? "" },
|
|
235
|
+
skip: !L?.application?.developerOrganizationId,
|
|
236
236
|
fetchPolicy: "cache-first"
|
|
237
|
-
}), q =
|
|
237
|
+
}), q = j((e) => {
|
|
238
238
|
i?.(`${o}${e}`);
|
|
239
|
-
}, [i, o]),
|
|
240
|
-
let e =
|
|
239
|
+
}, [i, o]), Le = j(async () => {
|
|
240
|
+
let e = L?.application?.appId;
|
|
241
241
|
if (e) try {
|
|
242
|
-
let t = (await
|
|
243
|
-
t &&
|
|
242
|
+
let t = (await _e({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
243
|
+
t && M(t), ee(!1);
|
|
244
244
|
} catch {}
|
|
245
|
-
}, [
|
|
246
|
-
if (
|
|
247
|
-
await ye({ variables: { id:
|
|
245
|
+
}, [L?.application?.appId, _e]), ze = j(async () => {
|
|
246
|
+
if (T) try {
|
|
247
|
+
await ye({ variables: { id: T } }), oe(!1), q("/apps");
|
|
248
248
|
} catch {}
|
|
249
249
|
}, [
|
|
250
|
-
|
|
250
|
+
T,
|
|
251
251
|
ye,
|
|
252
252
|
q
|
|
253
|
-
]),
|
|
254
|
-
if (!(!
|
|
255
|
-
await
|
|
256
|
-
applicationId:
|
|
253
|
+
]), Be = j(async () => {
|
|
254
|
+
if (!(!T || !c)) try {
|
|
255
|
+
await U({ variables: { input: {
|
|
256
|
+
applicationId: T,
|
|
257
257
|
scope: "WORKSPACE",
|
|
258
258
|
workspaceId: c,
|
|
259
259
|
autoUpdate: !1
|
|
260
|
-
} } }),
|
|
260
|
+
} } }), Ne(), E("success");
|
|
261
261
|
} catch (e) {
|
|
262
|
-
console.error("[DevPortal] Test in Workspace failed:", e),
|
|
262
|
+
console.error("[DevPortal] Test in Workspace failed:", e), E("error");
|
|
263
263
|
}
|
|
264
264
|
}, [
|
|
265
|
-
|
|
265
|
+
T,
|
|
266
266
|
c,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
]),
|
|
267
|
+
U,
|
|
268
|
+
Ne
|
|
269
|
+
]), Ve = j(async (e) => {
|
|
270
270
|
try {
|
|
271
|
-
await
|
|
271
|
+
await De({ variables: { id: e } }), Ne(), E("success");
|
|
272
272
|
} catch {
|
|
273
|
-
|
|
273
|
+
E("error");
|
|
274
274
|
}
|
|
275
|
-
}, [
|
|
276
|
-
if (
|
|
277
|
-
|
|
275
|
+
}, [De, Ne]), He = j(async () => {
|
|
276
|
+
if (T) try {
|
|
277
|
+
let e = (L?.application?.versions?.edges ?? []).map((e) => e.node).filter((e) => e.status === "draft");
|
|
278
|
+
for (let t of e) await Te({ variables: { id: t.id } });
|
|
279
|
+
await V({ variables: { id: T } }), E("success");
|
|
278
280
|
} catch (e) {
|
|
279
|
-
console.error("[DevPortal] Submit failed:", e),
|
|
281
|
+
console.error("[DevPortal] Submit failed:", e), E("error");
|
|
280
282
|
} finally {
|
|
281
|
-
|
|
283
|
+
z();
|
|
282
284
|
}
|
|
283
285
|
}, [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
T,
|
|
287
|
+
L?.application?.versions?.edges,
|
|
288
|
+
Te,
|
|
289
|
+
V,
|
|
290
|
+
z
|
|
287
291
|
]);
|
|
288
|
-
if (
|
|
289
|
-
if (ge) return /* @__PURE__ */ G(
|
|
290
|
-
title:
|
|
292
|
+
if (R && !L) return /* @__PURE__ */ G(n, { message: m("devportal.loadingApplication", "Loading application...") });
|
|
293
|
+
if (ge) return /* @__PURE__ */ G(y, {
|
|
294
|
+
title: m("devportal.error", "Error"),
|
|
291
295
|
backLink: `${o}/apps`,
|
|
292
|
-
backLabel:
|
|
296
|
+
backLabel: m("devportal.backToApplications", "Back to Applications"),
|
|
293
297
|
children: /* @__PURE__ */ K("div", {
|
|
294
298
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
295
299
|
children: [
|
|
@@ -299,7 +303,7 @@ var Le = [
|
|
|
299
303
|
}),
|
|
300
304
|
/* @__PURE__ */ G("h3", {
|
|
301
305
|
className: "text-lg font-semibold mb-2",
|
|
302
|
-
children:
|
|
306
|
+
children: m("devportal.failedToLoadApplication", "Failed to load application")
|
|
303
307
|
}),
|
|
304
308
|
/* @__PURE__ */ G("p", {
|
|
305
309
|
className: "text-sm text-text-secondary",
|
|
@@ -308,106 +312,106 @@ var Le = [
|
|
|
308
312
|
]
|
|
309
313
|
})
|
|
310
314
|
});
|
|
311
|
-
let J =
|
|
312
|
-
if (!J) return /* @__PURE__ */ G(
|
|
313
|
-
title:
|
|
315
|
+
let J = Fe(L?.application);
|
|
316
|
+
if (!J) return /* @__PURE__ */ G(y, {
|
|
317
|
+
title: m("devportal.notFound", "Not Found"),
|
|
314
318
|
backLink: `${o}/apps`,
|
|
315
|
-
backLabel:
|
|
319
|
+
backLabel: m("devportal.backToApplications", "Back to Applications"),
|
|
316
320
|
children: /* @__PURE__ */ G(r, {
|
|
317
321
|
illustration: "empty-generic",
|
|
318
322
|
icon: /* @__PURE__ */ G(le, { size: 48 }),
|
|
319
|
-
title:
|
|
320
|
-
description:
|
|
323
|
+
title: m("devportal.applicationNotFound", "Application not found"),
|
|
324
|
+
description: m("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
321
325
|
})
|
|
322
326
|
});
|
|
323
|
-
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", X = J.appType === "API_INTEGRATION",
|
|
327
|
+
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", X = J.appType === "API_INTEGRATION", Ze = L?.application?.versions?.totalCount ?? 0, Qe = J.pricingType === "PAID", $e = Ie?.developerOrganization, et = $e?.platformFeeRate ?? .3, nt = !!$e?.billingAccountId, rt = J.pricingDetails ?? {}, Z = J.pricingType === "FREE" || J.pricingType === "PAID" && typeof rt.price == "number" && rt.price > 0, Q = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED") && (!Y && !X || Ze > 0) && (!Qe || nt) && Z, it = Q && J.status !== "PUBLISHED" && J.status !== "SUBMITTED", at = [
|
|
324
328
|
...Y ? [] : [{
|
|
325
|
-
label:
|
|
329
|
+
label: m("devportal.rotateSecret", "Rotate Secret"),
|
|
326
330
|
icon: /* @__PURE__ */ G(Se, { size: 16 }),
|
|
327
331
|
disabled: !J.appId,
|
|
328
|
-
onSelect: () =>
|
|
332
|
+
onSelect: () => ee(!0)
|
|
329
333
|
}],
|
|
330
|
-
...Y ? [] :
|
|
331
|
-
label:
|
|
332
|
-
icon: /* @__PURE__ */ G(
|
|
333
|
-
disabled:
|
|
334
|
-
onSelect: () => void
|
|
334
|
+
...Y ? [] : Pe ? [{
|
|
335
|
+
label: m("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
336
|
+
icon: /* @__PURE__ */ G(Ae, { size: 16 }),
|
|
337
|
+
disabled: Oe || !c,
|
|
338
|
+
onSelect: () => void Ve(Pe.id)
|
|
335
339
|
}] : [{
|
|
336
|
-
label:
|
|
340
|
+
label: m("devportal.testInWorkspace", "Test in Workspace"),
|
|
337
341
|
icon: /* @__PURE__ */ G(he, { size: 16 }),
|
|
338
|
-
disabled:
|
|
339
|
-
onSelect: () => void
|
|
342
|
+
disabled: Ee || !c,
|
|
343
|
+
onSelect: () => void Be()
|
|
340
344
|
}],
|
|
341
345
|
{
|
|
342
|
-
label:
|
|
346
|
+
label: m("devportal.deactivate", "Deactivate"),
|
|
343
347
|
icon: /* @__PURE__ */ G(xe, { size: 16 }),
|
|
344
348
|
intent: "destructive",
|
|
345
|
-
disabled: !
|
|
346
|
-
onSelect: () =>
|
|
349
|
+
disabled: !b,
|
|
350
|
+
onSelect: () => oe(!0)
|
|
347
351
|
}
|
|
348
352
|
];
|
|
349
|
-
return /* @__PURE__ */ K(
|
|
353
|
+
return /* @__PURE__ */ K(y, {
|
|
350
354
|
title: J.name,
|
|
351
355
|
description: J.shortDescription,
|
|
352
|
-
purpose:
|
|
356
|
+
purpose: m("devportal.appDetailPurpose", "Everything about this application in one place — its credentials, the permissions and webhooks it uses, its analytics, and its store listing. Use the tabs to configure each area, then edit or publish when it is ready."),
|
|
353
357
|
backLink: `${o}/apps`,
|
|
354
|
-
backLabel:
|
|
358
|
+
backLabel: m("devportal.backToApplications", "Back to Applications"),
|
|
355
359
|
actions: /* @__PURE__ */ K("div", {
|
|
356
360
|
className: "flex items-center gap-2",
|
|
357
361
|
children: [J.status === "SUBMITTED" ? /* @__PURE__ */ K("div", {
|
|
358
362
|
className: "flex items-center gap-1.5 rounded-full border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-1.5 text-xs font-medium text-status-warning-text",
|
|
359
|
-
children: [/* @__PURE__ */ G(pe, { size: 13 }),
|
|
363
|
+
children: [/* @__PURE__ */ G(pe, { size: 13 }), m("devportal.underReview", "Under Review")]
|
|
360
364
|
}) : J.status === "PUBLISHED" ? null : /* @__PURE__ */ G("button", {
|
|
361
365
|
type: "button",
|
|
362
|
-
onClick: () => void
|
|
363
|
-
disabled: !
|
|
366
|
+
onClick: () => void He(),
|
|
367
|
+
disabled: !it || H,
|
|
364
368
|
title: Q ? void 0 : [
|
|
365
369
|
!J.description?.trim() && "Add full description",
|
|
366
370
|
!J.category && "Select a category",
|
|
367
371
|
!J.iconUrl && "Upload an app icon",
|
|
368
372
|
J.visibility === "PRIVATE" && "Set visibility to Public/Unlisted",
|
|
369
|
-
Y &&
|
|
373
|
+
Y && Ze === 0 && "Upload at least one version",
|
|
370
374
|
!Z && "Set pricing (choose Free or Paid in the Pricing tab)",
|
|
371
|
-
|
|
375
|
+
Qe && !nt && "Link a billing account to receive payments"
|
|
372
376
|
].filter(Boolean).join(" · "),
|
|
373
|
-
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors",
|
|
374
|
-
children:
|
|
377
|
+
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", it && !H ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 cursor-pointer" : "cursor-not-allowed bg-bg-muted text-text-tertiary ring-1 ring-border-subtle"),
|
|
378
|
+
children: H ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
375
379
|
size: 15,
|
|
376
380
|
className: "animate-spin"
|
|
377
|
-
}),
|
|
378
|
-
}), /* @__PURE__ */ G(
|
|
381
|
+
}), m("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Ce, { size: 15 }), m("devportal.submitForReview", "Submit for Review")] })
|
|
382
|
+
}), /* @__PURE__ */ G(Me, {
|
|
379
383
|
primary: {
|
|
380
|
-
label:
|
|
384
|
+
label: m("devportal.editApp", "Edit App"),
|
|
381
385
|
icon: /* @__PURE__ */ G(me, { size: 16 }),
|
|
382
|
-
disabled: !
|
|
386
|
+
disabled: !v,
|
|
383
387
|
onSelect: () => q(`/apps/${J.id}/edit`)
|
|
384
388
|
},
|
|
385
|
-
actions:
|
|
389
|
+
actions: at
|
|
386
390
|
})]
|
|
387
391
|
}),
|
|
388
392
|
children: [
|
|
389
|
-
se && /* @__PURE__ */ G(
|
|
390
|
-
title:
|
|
393
|
+
se && /* @__PURE__ */ G(D, {
|
|
394
|
+
title: m("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
391
395
|
secret: se,
|
|
392
|
-
description:
|
|
393
|
-
onDismiss: () =>
|
|
396
|
+
description: m("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
397
|
+
onDismiss: () => M(null)
|
|
394
398
|
}),
|
|
395
399
|
/* @__PURE__ */ K("div", {
|
|
396
400
|
className: "flex flex-wrap items-center gap-2",
|
|
397
401
|
children: [
|
|
398
|
-
/* @__PURE__ */ G(
|
|
402
|
+
/* @__PURE__ */ G(C, {
|
|
399
403
|
status: J.status,
|
|
400
404
|
type: "app"
|
|
401
405
|
}),
|
|
402
|
-
/* @__PURE__ */ G(
|
|
406
|
+
/* @__PURE__ */ G(C, {
|
|
403
407
|
status: J.visibility,
|
|
404
408
|
type: "app"
|
|
405
409
|
}),
|
|
406
|
-
J.isVerified && /* @__PURE__ */ G(
|
|
407
|
-
J.isFeatured && /* @__PURE__ */ G(
|
|
410
|
+
J.isVerified && /* @__PURE__ */ G(w, { verified: !0 }),
|
|
411
|
+
J.isFeatured && /* @__PURE__ */ G(S, {}),
|
|
408
412
|
/* @__PURE__ */ G("span", {
|
|
409
413
|
className: "text-sm text-text-secondary",
|
|
410
|
-
children:
|
|
414
|
+
children: x[J.appType] || J.appType
|
|
411
415
|
})
|
|
412
416
|
]
|
|
413
417
|
}),
|
|
@@ -420,10 +424,10 @@ var Le = [
|
|
|
420
424
|
className: "text-sm",
|
|
421
425
|
children: [/* @__PURE__ */ G("p", {
|
|
422
426
|
className: "font-medium text-status-warning-text",
|
|
423
|
-
children:
|
|
427
|
+
children: m("devportal.underReview", "Under Review")
|
|
424
428
|
}), /* @__PURE__ */ K("p", {
|
|
425
429
|
className: "mt-0.5 text-text-secondary",
|
|
426
|
-
children: [
|
|
430
|
+
children: [m("devportal.underReviewDesc", "Your submission is being reviewed by our team. You'll be notified of the outcome."), J.submittedAt && /* @__PURE__ */ K("span", {
|
|
427
431
|
className: "ml-1",
|
|
428
432
|
children: [
|
|
429
433
|
"Submitted ",
|
|
@@ -436,7 +440,7 @@ var Le = [
|
|
|
436
440
|
}),
|
|
437
441
|
J.status === "REJECTED" && /* @__PURE__ */ K("div", {
|
|
438
442
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
439
|
-
children: [/* @__PURE__ */ G(
|
|
443
|
+
children: [/* @__PURE__ */ G(Ae, {
|
|
440
444
|
size: 18,
|
|
441
445
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
442
446
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -444,17 +448,17 @@ var Le = [
|
|
|
444
448
|
children: [
|
|
445
449
|
/* @__PURE__ */ G("p", {
|
|
446
450
|
className: "font-medium text-status-error-text",
|
|
447
|
-
children:
|
|
451
|
+
children: m("devportal.reviewRejected", "Review Rejected")
|
|
448
452
|
}),
|
|
449
453
|
/* @__PURE__ */ G("p", {
|
|
450
454
|
className: "mt-0.5 text-text-secondary",
|
|
451
|
-
children: J.reviewNotes ||
|
|
455
|
+
children: J.reviewNotes || m("devportal.reviewRejectedDesc", "Your submission was not approved. Please review the feedback, update your app, and re-submit.")
|
|
452
456
|
}),
|
|
453
457
|
/* @__PURE__ */ G("button", {
|
|
454
458
|
type: "button",
|
|
455
459
|
onClick: () => q(`/apps/${J.id}/edit`),
|
|
456
460
|
className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-primary underline",
|
|
457
|
-
children:
|
|
461
|
+
children: m("devportal.editAndResubmit", "Edit app and re-submit →")
|
|
458
462
|
})
|
|
459
463
|
]
|
|
460
464
|
})]
|
|
@@ -468,15 +472,15 @@ var Le = [
|
|
|
468
472
|
className: "text-sm",
|
|
469
473
|
children: [/* @__PURE__ */ G("p", {
|
|
470
474
|
className: "font-medium text-status-success-text",
|
|
471
|
-
children:
|
|
475
|
+
children: m("devportal.liveInStore", "Live in the Store")
|
|
472
476
|
}), /* @__PURE__ */ G("p", {
|
|
473
477
|
className: "mt-0.5 text-text-secondary",
|
|
474
|
-
children:
|
|
478
|
+
children: m("devportal.liveInStoreDesc", "Your app is published and visible to users in the marketplace.")
|
|
475
479
|
})]
|
|
476
480
|
})]
|
|
477
481
|
}),
|
|
478
482
|
(J.status === "DRAFT" || J.status === "REJECTED") && !Q && (() => {
|
|
479
|
-
let e = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED"), n = !Y && !X ||
|
|
483
|
+
let e = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED"), n = !Y && !X || Ze > 0, r = [
|
|
480
484
|
!J.description?.trim() && "Add a full description",
|
|
481
485
|
!J.category && "Select a category",
|
|
482
486
|
!J.iconUrl && "Upload an app icon",
|
|
@@ -484,42 +488,42 @@ var Le = [
|
|
|
484
488
|
].filter(Boolean), i = [
|
|
485
489
|
{
|
|
486
490
|
id: "store",
|
|
487
|
-
label:
|
|
488
|
-
hint: e ?
|
|
491
|
+
label: m("devportal.setupStoreListingStep", "Complete Store Listing"),
|
|
492
|
+
hint: e ? m("devportal.done", "Done") : r.join(" · "),
|
|
489
493
|
done: e,
|
|
490
|
-
onClick: () =>
|
|
494
|
+
onClick: () => k("store-listing")
|
|
491
495
|
},
|
|
492
496
|
...Y ? [{
|
|
493
497
|
id: "version",
|
|
494
|
-
label:
|
|
495
|
-
hint: n ?
|
|
498
|
+
label: m("devportal.setupVersionStep", "Upload a Version"),
|
|
499
|
+
hint: n ? m("devportal.done", "Done") : m("devportal.uploadVersionHint", "Upload your ZIP bundle and manifest"),
|
|
496
500
|
done: n,
|
|
497
|
-
onClick: () =>
|
|
501
|
+
onClick: () => k("versions")
|
|
498
502
|
}] : [],
|
|
499
503
|
...X ? [{
|
|
500
504
|
id: "version",
|
|
501
|
-
label:
|
|
502
|
-
hint: n ?
|
|
505
|
+
label: m("devportal.setupIntegrationVersionStep", "Publish a Version"),
|
|
506
|
+
hint: n ? m("devportal.done", "Done") : m("devportal.integrationVersionHint", "Define required scopes and publish your first API version"),
|
|
503
507
|
done: n,
|
|
504
|
-
onClick: () =>
|
|
508
|
+
onClick: () => k("versions")
|
|
505
509
|
}, {
|
|
506
510
|
id: "webhooks",
|
|
507
|
-
label:
|
|
508
|
-
hint:
|
|
511
|
+
label: m("devportal.setupWebhooksStep", "Configure Webhooks"),
|
|
512
|
+
hint: m("devportal.webhooksOptionalHint", "Set up endpoints to receive platform events (optional)"),
|
|
509
513
|
done: !1,
|
|
510
|
-
onClick: () =>
|
|
514
|
+
onClick: () => k("webhooks")
|
|
511
515
|
}] : [],
|
|
512
516
|
{
|
|
513
517
|
id: "pricing",
|
|
514
|
-
label:
|
|
515
|
-
hint: Z ?
|
|
518
|
+
label: m("devportal.setupPricingStep", "Set Pricing"),
|
|
519
|
+
hint: Z ? m("devportal.done", "Done") : m("devportal.pricingHint", "Choose Free or set a credit price in the Pricing tab"),
|
|
516
520
|
done: Z,
|
|
517
|
-
onClick: () =>
|
|
521
|
+
onClick: () => k("pricing")
|
|
518
522
|
},
|
|
519
523
|
{
|
|
520
524
|
id: "submit",
|
|
521
|
-
label:
|
|
522
|
-
hint: Q ?
|
|
525
|
+
label: m("devportal.submitForReview", "Submit for Review"),
|
|
526
|
+
hint: Q ? m("devportal.readyToSubmit", "Ready — click Submit for Review above") : m("devportal.completeStepsFirst", "Complete the steps above first"),
|
|
523
527
|
done: !1,
|
|
524
528
|
onClick: void 0
|
|
525
529
|
}
|
|
@@ -538,7 +542,7 @@ var Le = [
|
|
|
538
542
|
})
|
|
539
543
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
540
544
|
className: "text-sm font-semibold text-text-primary",
|
|
541
|
-
children:
|
|
545
|
+
children: m("devportal.completeSetup", "Complete your app setup")
|
|
542
546
|
}), /* @__PURE__ */ K("p", {
|
|
543
547
|
className: "text-xs text-text-secondary",
|
|
544
548
|
children: [
|
|
@@ -547,7 +551,7 @@ var Le = [
|
|
|
547
551
|
" ",
|
|
548
552
|
i.filter((e) => e.id !== "submit").length,
|
|
549
553
|
" ",
|
|
550
|
-
|
|
554
|
+
m("devportal.stepsDone", "steps complete")
|
|
551
555
|
]
|
|
552
556
|
})] })]
|
|
553
557
|
})
|
|
@@ -561,7 +565,7 @@ var Le = [
|
|
|
561
565
|
children: [
|
|
562
566
|
/* @__PURE__ */ G("div", {
|
|
563
567
|
className: t("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-bold", e.done ? "bg-status-success-bg text-status-success-text" : "border-2 border-border-subtle bg-bg-sunken text-text-secondary"),
|
|
564
|
-
children: e.done ? /* @__PURE__ */ G(
|
|
568
|
+
children: e.done ? /* @__PURE__ */ G(I, { size: 13 }) : n + 1
|
|
565
569
|
}),
|
|
566
570
|
/* @__PURE__ */ K("div", {
|
|
567
571
|
className: "flex-1 min-w-0",
|
|
@@ -587,16 +591,16 @@ var Le = [
|
|
|
587
591
|
children: /* @__PURE__ */ G("nav", {
|
|
588
592
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
589
593
|
role: "tablist",
|
|
590
|
-
"aria-label":
|
|
591
|
-
children:
|
|
594
|
+
"aria-label": m("devportal.applicationSections", "Application sections"),
|
|
595
|
+
children: Re.filter((e) => !(Y && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground" || e.id === "oauth" || e.id === "api-keys") || !Y && !X && e.id === "versions" || !X && (e.id === "oauth" || e.id === "api-keys"))).map((e) => {
|
|
592
596
|
let n = e.icon;
|
|
593
597
|
return /* @__PURE__ */ K("button", {
|
|
594
598
|
id: `application-tab-${e.id}`,
|
|
595
599
|
role: "tab",
|
|
596
|
-
"aria-selected":
|
|
600
|
+
"aria-selected": O === e.id,
|
|
597
601
|
"aria-controls": `application-panel-${e.id}`,
|
|
598
|
-
onClick: () =>
|
|
599
|
-
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
602
|
+
onClick: () => k(e.id),
|
|
603
|
+
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", O === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
600
604
|
children: [/* @__PURE__ */ G(n, { size: 16 }), e.label]
|
|
601
605
|
}, e.id);
|
|
602
606
|
})
|
|
@@ -604,86 +608,86 @@ var Le = [
|
|
|
604
608
|
}),
|
|
605
609
|
/* @__PURE__ */ K("div", {
|
|
606
610
|
className: "mt-6",
|
|
607
|
-
id: `application-panel-${
|
|
611
|
+
id: `application-panel-${O}`,
|
|
608
612
|
role: "tabpanel",
|
|
609
|
-
"aria-labelledby": `application-tab-${
|
|
613
|
+
"aria-labelledby": `application-tab-${O}`,
|
|
610
614
|
tabIndex: 0,
|
|
611
615
|
children: [
|
|
612
|
-
|
|
613
|
-
|
|
616
|
+
O === "overview" && /* @__PURE__ */ G(Xe, { app: J }),
|
|
617
|
+
O === "permissions" && /* @__PURE__ */ G(ht, {
|
|
614
618
|
app: J,
|
|
615
|
-
versionScopes:
|
|
619
|
+
versionScopes: L?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? [],
|
|
616
620
|
locked: J.status === "PUBLISHED" || J.status === "APPROVED" || J.status === "ACTIVE",
|
|
617
|
-
onNavigateToVersions: () =>
|
|
621
|
+
onNavigateToVersions: () => k("versions")
|
|
618
622
|
}),
|
|
619
|
-
|
|
623
|
+
O === "webhooks" && /* @__PURE__ */ G(qe, {
|
|
620
624
|
appId: J.id,
|
|
621
625
|
onNavigate: q
|
|
622
626
|
}),
|
|
623
|
-
|
|
627
|
+
O === "delegations" && /* @__PURE__ */ G(Je, {
|
|
624
628
|
authAppId: J.appId || void 0,
|
|
625
629
|
appName: J.name,
|
|
626
630
|
onGrantDelegation: () => ue(!0),
|
|
627
631
|
onNavigate: q
|
|
628
632
|
}),
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
633
|
+
O === "analytics" && /* @__PURE__ */ G(Ye, { appId: J.id }),
|
|
634
|
+
O === "playground" && /* @__PURE__ */ G(tt, { app: J }),
|
|
635
|
+
O === "oauth" && /* @__PURE__ */ G(Ue, {
|
|
632
636
|
appId: J.id,
|
|
633
637
|
onNavigate: q
|
|
634
638
|
}),
|
|
635
|
-
|
|
639
|
+
O === "api-keys" && /* @__PURE__ */ G(We, {
|
|
636
640
|
appId: J.id,
|
|
637
641
|
onNavigate: q
|
|
638
642
|
}),
|
|
639
|
-
|
|
643
|
+
O === "store-listing" && /* @__PURE__ */ G(st, {
|
|
640
644
|
app: J,
|
|
641
|
-
versionCount:
|
|
645
|
+
versionCount: L?.application?.versions?.totalCount ?? 0,
|
|
642
646
|
isPackageApp: Y,
|
|
643
647
|
pricingDone: Z,
|
|
644
|
-
onNavigateToVersions: Y || X ? () =>
|
|
645
|
-
onNavigateToPricing: () =>
|
|
648
|
+
onNavigateToVersions: Y || X ? () => k("versions") : void 0,
|
|
649
|
+
onNavigateToPricing: () => k("pricing"),
|
|
646
650
|
onNavigateToSubmission: () => q(`/apps/${J.id}/store-submission`)
|
|
647
651
|
}),
|
|
648
|
-
|
|
652
|
+
O === "pricing" && /* @__PURE__ */ G(Ge, {
|
|
649
653
|
app: J,
|
|
650
|
-
platformFeeRate:
|
|
651
|
-
billingAccountLinked:
|
|
654
|
+
platformFeeRate: et,
|
|
655
|
+
billingAccountLinked: nt,
|
|
652
656
|
onNavigateToRevenue: () => q("/revenue"),
|
|
653
657
|
isReadyToSubmit: Q
|
|
654
658
|
}),
|
|
655
|
-
|
|
659
|
+
O === "versions" && /* @__PURE__ */ G(Ke, {
|
|
656
660
|
appId: J.id,
|
|
657
661
|
onNavigate: q,
|
|
658
662
|
pricingDone: Z,
|
|
659
|
-
onNavigateToPricing: () =>
|
|
663
|
+
onNavigateToPricing: () => k("pricing")
|
|
660
664
|
})
|
|
661
665
|
]
|
|
662
666
|
}),
|
|
663
|
-
/* @__PURE__ */ G(
|
|
664
|
-
open:
|
|
665
|
-
onOpenChange:
|
|
666
|
-
onConfirm:
|
|
667
|
-
title:
|
|
668
|
-
description:
|
|
669
|
-
confirmLabel:
|
|
670
|
-
cancelLabel:
|
|
667
|
+
/* @__PURE__ */ G(ne, {
|
|
668
|
+
open: A,
|
|
669
|
+
onOpenChange: ee,
|
|
670
|
+
onConfirm: Le,
|
|
671
|
+
title: m("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
672
|
+
description: m("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."),
|
|
673
|
+
confirmLabel: m("devportal.rotateSecret", "Rotate Secret"),
|
|
674
|
+
cancelLabel: m("devportal.cancel", "Cancel"),
|
|
671
675
|
variant: "warning",
|
|
672
676
|
loading: ve
|
|
673
677
|
}),
|
|
674
|
-
/* @__PURE__ */ G(
|
|
675
|
-
open:
|
|
676
|
-
onOpenChange:
|
|
677
|
-
onConfirm:
|
|
678
|
-
title:
|
|
679
|
-
description:
|
|
680
|
-
confirmLabel:
|
|
681
|
-
cancelLabel:
|
|
678
|
+
/* @__PURE__ */ G(ne, {
|
|
679
|
+
open: te,
|
|
680
|
+
onOpenChange: oe,
|
|
681
|
+
onConfirm: ze,
|
|
682
|
+
title: m("devportal.deactivateApplication", "Deactivate Application"),
|
|
683
|
+
description: m("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."),
|
|
684
|
+
confirmLabel: m("devportal.deactivate", "Deactivate"),
|
|
685
|
+
cancelLabel: m("devportal.cancel", "Cancel"),
|
|
682
686
|
variant: "destructive",
|
|
683
687
|
loading: be
|
|
684
688
|
}),
|
|
685
|
-
/* @__PURE__ */ G(
|
|
686
|
-
open:
|
|
689
|
+
/* @__PURE__ */ G(re, {
|
|
690
|
+
open: N,
|
|
687
691
|
onOpenChange: ue,
|
|
688
692
|
appId: J.appId || "",
|
|
689
693
|
appName: J.name,
|
|
@@ -694,15 +698,15 @@ var Le = [
|
|
|
694
698
|
})
|
|
695
699
|
]
|
|
696
700
|
});
|
|
697
|
-
},
|
|
698
|
-
let { t } =
|
|
701
|
+
}, Ue = ({ onNavigate: e }) => {
|
|
702
|
+
let { t } = F(), n = (e, n) => {
|
|
699
703
|
let r = t(e);
|
|
700
704
|
return r === e ? n : r;
|
|
701
705
|
};
|
|
702
706
|
return /* @__PURE__ */ K("div", {
|
|
703
707
|
className: "space-y-4 py-4 text-center",
|
|
704
708
|
children: [
|
|
705
|
-
/* @__PURE__ */ G(
|
|
709
|
+
/* @__PURE__ */ G(H, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
706
710
|
/* @__PURE__ */ G("h3", {
|
|
707
711
|
className: "font-medium",
|
|
708
712
|
children: n("devportal.oauthApps", "OAuth Apps")
|
|
@@ -714,19 +718,19 @@ var Le = [
|
|
|
714
718
|
/* @__PURE__ */ K("button", {
|
|
715
719
|
onClick: () => e("/oauth"),
|
|
716
720
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
717
|
-
children: [/* @__PURE__ */ G(
|
|
721
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
718
722
|
})
|
|
719
723
|
]
|
|
720
724
|
});
|
|
721
|
-
},
|
|
722
|
-
let { t } =
|
|
725
|
+
}, We = ({ onNavigate: e }) => {
|
|
726
|
+
let { t } = F(), n = (e, n) => {
|
|
723
727
|
let r = t(e);
|
|
724
728
|
return r === e ? n : r;
|
|
725
729
|
};
|
|
726
730
|
return /* @__PURE__ */ K("div", {
|
|
727
731
|
className: "space-y-4 py-4 text-center",
|
|
728
732
|
children: [
|
|
729
|
-
/* @__PURE__ */ G(
|
|
733
|
+
/* @__PURE__ */ G(_e, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
730
734
|
/* @__PURE__ */ G("h3", {
|
|
731
735
|
className: "font-medium",
|
|
732
736
|
children: n("devportal.apiKeys", "API Keys")
|
|
@@ -738,18 +742,18 @@ var Le = [
|
|
|
738
742
|
/* @__PURE__ */ K("button", {
|
|
739
743
|
onClick: () => e("/api-keys"),
|
|
740
744
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
741
|
-
children: [/* @__PURE__ */ G(
|
|
745
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
742
746
|
})
|
|
743
747
|
]
|
|
744
748
|
});
|
|
745
|
-
},
|
|
746
|
-
let { t: o } =
|
|
749
|
+
}, J = .01, Y = (e) => e * J, X = (e) => Math.round(e / J), Ge = ({ app: e, platformFeeRate: n, billingAccountLinked: r, onNavigateToRevenue: i, isReadyToSubmit: a = !1 }) => {
|
|
750
|
+
let { t: o } = F(), s = (e, t) => {
|
|
747
751
|
let n = o(e);
|
|
748
752
|
return n === e ? t : n;
|
|
749
|
-
}, c = e.pricingDetails ?? {}, [l, u] =
|
|
753
|
+
}, c = e.pricingDetails ?? {}, [l, u] = P({
|
|
750
754
|
pricingType: e.pricingType ?? "FREE",
|
|
751
755
|
price: typeof c.price == "number" ? String(c.price) : ""
|
|
752
|
-
}), [d, f] =
|
|
756
|
+
}), [d, f] = P(!1), [p] = v(), m = N(e);
|
|
753
757
|
m.current = e, se(() => {
|
|
754
758
|
let e = m.current.pricingDetails ?? {};
|
|
755
759
|
u({
|
|
@@ -776,22 +780,22 @@ var Le = [
|
|
|
776
780
|
pricingType: l.pricingType || null,
|
|
777
781
|
pricingDetails: Object.keys(t).length > 0 ? t : null
|
|
778
782
|
}
|
|
779
|
-
} }),
|
|
783
|
+
} }), E("success");
|
|
780
784
|
} catch {
|
|
781
|
-
|
|
785
|
+
E("error");
|
|
782
786
|
} finally {
|
|
783
787
|
f(!1);
|
|
784
788
|
}
|
|
785
|
-
},
|
|
789
|
+
}, _ = l.pricingType !== "FREE", y = parseInt(l.price, 10), b = _ && !isNaN(y) && y > 0, x = b ? Y(y) : 0, S = b ? Math.round(y * n) : 0, C = Y(S), w = b ? y - S : 0, T = Y(w), D = (e) => "$" + e.toLocaleString("en-US", {
|
|
786
790
|
minimumFractionDigits: 2,
|
|
787
791
|
maximumFractionDigits: 2
|
|
788
|
-
}),
|
|
792
|
+
}), O = (e) => e.toLocaleString("en-US") + " cr";
|
|
789
793
|
return /* @__PURE__ */ K("div", {
|
|
790
794
|
className: "space-y-8",
|
|
791
795
|
children: [
|
|
792
796
|
/* @__PURE__ */ K("div", {
|
|
793
797
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
794
|
-
children: [/* @__PURE__ */ G(
|
|
798
|
+
children: [/* @__PURE__ */ G(L, {
|
|
795
799
|
size: 16,
|
|
796
800
|
className: "mt-0.5 shrink-0 text-primary"
|
|
797
801
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -808,7 +812,7 @@ var Le = [
|
|
|
808
812
|
className: "font-medium",
|
|
809
813
|
children: [
|
|
810
814
|
"1 credit = ",
|
|
811
|
-
|
|
815
|
+
D(J),
|
|
812
816
|
" USD."
|
|
813
817
|
]
|
|
814
818
|
}),
|
|
@@ -927,14 +931,14 @@ var Le = [
|
|
|
927
931
|
})] }),
|
|
928
932
|
/* @__PURE__ */ G("div", {
|
|
929
933
|
className: "flex flex-wrap gap-2",
|
|
930
|
-
children:
|
|
934
|
+
children: Q.map((e) => /* @__PURE__ */ G("button", {
|
|
931
935
|
type: "button",
|
|
932
936
|
onClick: () => h("pricingType", e.value),
|
|
933
937
|
className: t("rounded-md border px-4 py-2 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken border-border-subtle"),
|
|
934
938
|
children: e.label
|
|
935
939
|
}, e.value))
|
|
936
940
|
}),
|
|
937
|
-
|
|
941
|
+
_ && /* @__PURE__ */ K("div", {
|
|
938
942
|
className: "space-y-4",
|
|
939
943
|
children: [
|
|
940
944
|
/* @__PURE__ */ K("div", {
|
|
@@ -970,10 +974,10 @@ var Le = [
|
|
|
970
974
|
className: "mt-1.5 text-xs text-text-secondary",
|
|
971
975
|
children: [
|
|
972
976
|
"≈ ",
|
|
973
|
-
|
|
977
|
+
D(x),
|
|
974
978
|
" USD at the current credit rate (1 cr =",
|
|
975
979
|
" ",
|
|
976
|
-
|
|
980
|
+
D(J),
|
|
977
981
|
")"
|
|
978
982
|
]
|
|
979
983
|
}),
|
|
@@ -992,13 +996,13 @@ var Le = [
|
|
|
992
996
|
50
|
|
993
997
|
].map((e) => /* @__PURE__ */ K("button", {
|
|
994
998
|
type: "button",
|
|
995
|
-
onClick: () => h("price", String(
|
|
999
|
+
onClick: () => h("price", String(X(e))),
|
|
996
1000
|
className: "rounded border border-border-subtle px-2 py-0.5 hover:bg-bg-sunken transition-colors",
|
|
997
1001
|
children: [
|
|
998
1002
|
"$",
|
|
999
1003
|
e,
|
|
1000
1004
|
" = ",
|
|
1001
|
-
|
|
1005
|
+
X(e).toLocaleString(),
|
|
1002
1006
|
" cr"
|
|
1003
1007
|
]
|
|
1004
1008
|
}, e))]
|
|
@@ -1021,13 +1025,13 @@ var Le = [
|
|
|
1021
1025
|
}), /* @__PURE__ */ K("span", {
|
|
1022
1026
|
className: "font-medium tabular-nums",
|
|
1023
1027
|
children: [
|
|
1024
|
-
|
|
1028
|
+
O(y),
|
|
1025
1029
|
" ",
|
|
1026
1030
|
/* @__PURE__ */ K("span", {
|
|
1027
1031
|
className: "text-text-tertiary text-xs",
|
|
1028
1032
|
children: [
|
|
1029
1033
|
"(",
|
|
1030
|
-
|
|
1034
|
+
D(x),
|
|
1031
1035
|
")"
|
|
1032
1036
|
]
|
|
1033
1037
|
})
|
|
@@ -1051,13 +1055,13 @@ var Le = [
|
|
|
1051
1055
|
className: "tabular-nums",
|
|
1052
1056
|
children: [
|
|
1053
1057
|
"− ",
|
|
1054
|
-
|
|
1058
|
+
O(S),
|
|
1055
1059
|
" ",
|
|
1056
1060
|
/* @__PURE__ */ K("span", {
|
|
1057
1061
|
className: "text-xs opacity-70",
|
|
1058
1062
|
children: [
|
|
1059
1063
|
"(",
|
|
1060
|
-
|
|
1064
|
+
D(C),
|
|
1061
1065
|
")"
|
|
1062
1066
|
]
|
|
1063
1067
|
})
|
|
@@ -1069,11 +1073,11 @@ var Le = [
|
|
|
1069
1073
|
children: [/* @__PURE__ */ G("span", { children: "You earn" }), /* @__PURE__ */ K("span", {
|
|
1070
1074
|
className: "tabular-nums",
|
|
1071
1075
|
children: [
|
|
1072
|
-
|
|
1076
|
+
O(w),
|
|
1073
1077
|
" ",
|
|
1074
1078
|
/* @__PURE__ */ K("span", {
|
|
1075
1079
|
className: "text-sm font-normal",
|
|
1076
|
-
children: ["≈ ",
|
|
1080
|
+
children: ["≈ ", D(T)]
|
|
1077
1081
|
})
|
|
1078
1082
|
]
|
|
1079
1083
|
})]
|
|
@@ -1125,7 +1129,7 @@ var Le = [
|
|
|
1125
1129
|
children: [
|
|
1126
1130
|
/* @__PURE__ */ K("li", {
|
|
1127
1131
|
className: "flex items-start gap-2",
|
|
1128
|
-
children: [/* @__PURE__ */ G(
|
|
1132
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1129
1133
|
size: 14,
|
|
1130
1134
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1131
1135
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1143,21 +1147,21 @@ var Le = [
|
|
|
1143
1147
|
}),
|
|
1144
1148
|
/* @__PURE__ */ K("li", {
|
|
1145
1149
|
className: "flex items-start gap-2",
|
|
1146
|
-
children: [/* @__PURE__ */ G(
|
|
1150
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1147
1151
|
size: 14,
|
|
1148
1152
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1149
1153
|
}), /* @__PURE__ */ G("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1150
1154
|
}),
|
|
1151
1155
|
/* @__PURE__ */ K("li", {
|
|
1152
1156
|
className: "flex items-start gap-2",
|
|
1153
|
-
children: [/* @__PURE__ */ G(
|
|
1157
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1154
1158
|
size: 14,
|
|
1155
1159
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1156
1160
|
}), /* @__PURE__ */ G("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1157
1161
|
}),
|
|
1158
1162
|
/* @__PURE__ */ K("li", {
|
|
1159
1163
|
className: "flex items-start gap-2",
|
|
1160
|
-
children: [/* @__PURE__ */ G(
|
|
1164
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1161
1165
|
size: 14,
|
|
1162
1166
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1163
1167
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1184,13 +1188,13 @@ var Le = [
|
|
|
1184
1188
|
onClick: () => void g(),
|
|
1185
1189
|
disabled: d,
|
|
1186
1190
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
1187
|
-
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1191
|
+
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
1188
1192
|
size: 16,
|
|
1189
1193
|
className: "animate-spin"
|
|
1190
|
-
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1194
|
+
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(L, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
|
|
1191
1195
|
}), a && /* @__PURE__ */ K("div", {
|
|
1192
1196
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1193
|
-
children: [/* @__PURE__ */ G(
|
|
1197
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1194
1198
|
size: 16,
|
|
1195
1199
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1196
1200
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1204,16 +1208,16 @@ var Le = [
|
|
|
1204
1208
|
})
|
|
1205
1209
|
]
|
|
1206
1210
|
});
|
|
1207
|
-
},
|
|
1208
|
-
let { t: o } =
|
|
1211
|
+
}, Ke = ({ appId: e, onNavigate: n, pricingDone: i = !1, onNavigateToPricing: a }) => {
|
|
1212
|
+
let { t: o } = F(), s = (e, t) => {
|
|
1209
1213
|
let n = o(e);
|
|
1210
1214
|
return n === e ? t : n;
|
|
1211
1215
|
}, { data: l, loading: u, error: d } = c({
|
|
1212
1216
|
variables: { applicationId: e },
|
|
1213
1217
|
fetchPolicy: "cache-and-network"
|
|
1214
1218
|
});
|
|
1215
|
-
if (u) return /* @__PURE__ */ G(
|
|
1216
|
-
if (d) return /* @__PURE__ */ G(
|
|
1219
|
+
if (u) return /* @__PURE__ */ G(Be, { message: s("devportal.loadingVersions", "Loading versions…") });
|
|
1220
|
+
if (d) return /* @__PURE__ */ G(Ve, { message: d.message });
|
|
1217
1221
|
let f = (l?.application?.versions?.edges ?? []).map((e) => e.node);
|
|
1218
1222
|
return /* @__PURE__ */ K("div", {
|
|
1219
1223
|
className: "space-y-4",
|
|
@@ -1230,7 +1234,7 @@ var Le = [
|
|
|
1230
1234
|
}), /* @__PURE__ */ K("button", {
|
|
1231
1235
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1232
1236
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1233
|
-
children: [/* @__PURE__ */ G(
|
|
1237
|
+
children: [/* @__PURE__ */ G(U, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1234
1238
|
})]
|
|
1235
1239
|
}),
|
|
1236
1240
|
f.length > 0 ? /* @__PURE__ */ G("div", {
|
|
@@ -1329,13 +1333,13 @@ var Le = [
|
|
|
1329
1333
|
action: /* @__PURE__ */ K("button", {
|
|
1330
1334
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1331
1335
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1332
|
-
children: [/* @__PURE__ */ G(
|
|
1336
|
+
children: [/* @__PURE__ */ G(U, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1333
1337
|
})
|
|
1334
1338
|
}),
|
|
1335
1339
|
f.length > 0 && !i && a && /* @__PURE__ */ K("div", {
|
|
1336
1340
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1337
1341
|
children: [
|
|
1338
|
-
/* @__PURE__ */ G(
|
|
1342
|
+
/* @__PURE__ */ G(L, {
|
|
1339
1343
|
size: 16,
|
|
1340
1344
|
className: "shrink-0 text-primary"
|
|
1341
1345
|
}),
|
|
@@ -1353,35 +1357,35 @@ var Le = [
|
|
|
1353
1357
|
})
|
|
1354
1358
|
]
|
|
1355
1359
|
});
|
|
1356
|
-
},
|
|
1357
|
-
let { t: n } =
|
|
1360
|
+
}, qe = ({ appId: e, onNavigate: t }) => {
|
|
1361
|
+
let { t: n } = F(), r = (e, t) => {
|
|
1358
1362
|
let r = n(e);
|
|
1359
1363
|
return r === e ? t : r;
|
|
1360
1364
|
}, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
|
|
1361
|
-
return a ? /* @__PURE__ */ G(
|
|
1365
|
+
return a ? /* @__PURE__ */ G(Be, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ G(Ve, { message: o.message }) : /* @__PURE__ */ G(Ze, {
|
|
1362
1366
|
appId: e,
|
|
1363
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
1367
|
+
webhooks: (i?.webhooks ?? []).map(Ie),
|
|
1364
1368
|
onNavigate: t
|
|
1365
1369
|
});
|
|
1366
|
-
},
|
|
1367
|
-
let { t: o } =
|
|
1370
|
+
}, Je = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
1371
|
+
let { t: o } = F(), s = (e, t) => {
|
|
1368
1372
|
let n = o(e);
|
|
1369
1373
|
return n === e ? t : n;
|
|
1370
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] =
|
|
1374
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, 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(Le) : [], [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, D = j((e, t) => {
|
|
1371
1375
|
y((n) => {
|
|
1372
1376
|
let r = new Set(n);
|
|
1373
1377
|
return t ? r.add(e) : r.delete(e), r;
|
|
1374
1378
|
});
|
|
1375
|
-
}, []),
|
|
1379
|
+
}, []), O = j((e) => {
|
|
1376
1380
|
y((t) => {
|
|
1377
1381
|
let n = new Set(t);
|
|
1378
1382
|
return C.forEach((t) => {
|
|
1379
1383
|
e ? n.add(t.id) : n.delete(t.id);
|
|
1380
1384
|
}), n;
|
|
1381
1385
|
});
|
|
1382
|
-
}, [C]),
|
|
1386
|
+
}, [C]), k = j(() => {
|
|
1383
1387
|
y(/* @__PURE__ */ new Set());
|
|
1384
|
-
}, []),
|
|
1388
|
+
}, []), A = j(async (e) => {
|
|
1385
1389
|
_(!0);
|
|
1386
1390
|
try {
|
|
1387
1391
|
let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
@@ -1393,7 +1397,7 @@ var Le = [
|
|
|
1393
1397
|
_(!1);
|
|
1394
1398
|
}
|
|
1395
1399
|
}, [f, d]);
|
|
1396
|
-
return e ? l ? /* @__PURE__ */ G(
|
|
1400
|
+
return e ? l ? /* @__PURE__ */ G(Be, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ G(Ve, { message: u.message }) : /* @__PURE__ */ K(W, { children: [
|
|
1397
1401
|
b && /* @__PURE__ */ G("div", {
|
|
1398
1402
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1399
1403
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -1405,29 +1409,29 @@ var Le = [
|
|
|
1405
1409
|
})]
|
|
1406
1410
|
})
|
|
1407
1411
|
}),
|
|
1408
|
-
/* @__PURE__ */ G(
|
|
1412
|
+
/* @__PURE__ */ G(Qe, {
|
|
1409
1413
|
appName: t,
|
|
1410
1414
|
delegations: S,
|
|
1411
1415
|
onGrantDelegation: n,
|
|
1412
1416
|
onRevokeDelegation: (e) => h([e]),
|
|
1413
1417
|
selectedDelegationIds: v,
|
|
1414
|
-
onToggleSelectDelegation:
|
|
1415
|
-
onToggleAllDelegations:
|
|
1416
|
-
onClearSelection:
|
|
1418
|
+
onToggleSelectDelegation: D,
|
|
1419
|
+
onToggleAllDelegations: O,
|
|
1420
|
+
onClearSelection: k,
|
|
1417
1421
|
onRevokeSelected: () => h(w.map((e) => e.id)),
|
|
1418
1422
|
allVisibleSelected: T,
|
|
1419
|
-
partiallySelected:
|
|
1423
|
+
partiallySelected: E
|
|
1420
1424
|
}),
|
|
1421
|
-
/* @__PURE__ */ G(
|
|
1422
|
-
open:
|
|
1425
|
+
/* @__PURE__ */ G(ne, {
|
|
1426
|
+
open: p.length > 0,
|
|
1423
1427
|
onOpenChange: (e) => {
|
|
1424
1428
|
e || h([]);
|
|
1425
1429
|
},
|
|
1426
1430
|
onConfirm: () => {
|
|
1427
|
-
|
|
1431
|
+
p.length > 0 && A(p);
|
|
1428
1432
|
},
|
|
1429
|
-
title:
|
|
1430
|
-
description:
|
|
1433
|
+
title: p.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
1434
|
+
description: p.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${p.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."),
|
|
1431
1435
|
confirmLabel: s("devportal.revoke", "Revoke"),
|
|
1432
1436
|
cancelLabel: s("devportal.cancel", "Cancel"),
|
|
1433
1437
|
variant: "destructive",
|
|
@@ -1435,31 +1439,31 @@ var Le = [
|
|
|
1435
1439
|
})
|
|
1436
1440
|
] }) : /* @__PURE__ */ G(r, {
|
|
1437
1441
|
illustration: "empty-generic",
|
|
1438
|
-
icon: /* @__PURE__ */ G(
|
|
1442
|
+
icon: /* @__PURE__ */ G(H, { size: 32 }),
|
|
1439
1443
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1440
1444
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1441
1445
|
action: /* @__PURE__ */ K("button", {
|
|
1442
1446
|
onClick: () => a("/oauth"),
|
|
1443
1447
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1444
|
-
children: [/* @__PURE__ */ G(
|
|
1448
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1445
1449
|
})
|
|
1446
1450
|
});
|
|
1447
|
-
},
|
|
1448
|
-
let { t } =
|
|
1451
|
+
}, Ye = ({ appId: e }) => {
|
|
1452
|
+
let { t } = F(), n = (e, n) => {
|
|
1449
1453
|
let r = t(e);
|
|
1450
1454
|
return r === e ? n : r;
|
|
1451
|
-
}, r =
|
|
1455
|
+
}, r = M(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
1452
1456
|
applicationId: e,
|
|
1453
1457
|
period: "daily",
|
|
1454
|
-
startDate:
|
|
1458
|
+
startDate: M(() => {
|
|
1455
1459
|
let e = new Date(r);
|
|
1456
1460
|
return e.setDate(e.getDate() - 30), e;
|
|
1457
1461
|
}, [r]).toISOString(),
|
|
1458
1462
|
endDate: r.toISOString()
|
|
1459
1463
|
} });
|
|
1460
|
-
return a ? /* @__PURE__ */ G(
|
|
1461
|
-
},
|
|
1462
|
-
let { t } =
|
|
1464
|
+
return a ? /* @__PURE__ */ G(Be, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ G(Ve, { message: s.message }) : /* @__PURE__ */ G($e, { analytics: (i?.applicationAnalytics ?? []).map(q) });
|
|
1465
|
+
}, Xe = ({ app: e }) => {
|
|
1466
|
+
let { t } = F(), n = (e, n) => {
|
|
1463
1467
|
let r = t(e);
|
|
1464
1468
|
return r === e ? n : r;
|
|
1465
1469
|
};
|
|
@@ -1468,7 +1472,7 @@ var Le = [
|
|
|
1468
1472
|
children: [/* @__PURE__ */ K("div", {
|
|
1469
1473
|
className: "lg:col-span-2 space-y-6",
|
|
1470
1474
|
children: [
|
|
1471
|
-
/* @__PURE__ */ G(
|
|
1475
|
+
/* @__PURE__ */ G(Ne, { children: /* @__PURE__ */ K("div", {
|
|
1472
1476
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1473
1477
|
children: [
|
|
1474
1478
|
/* @__PURE__ */ G($, {
|
|
@@ -1489,7 +1493,7 @@ var Le = [
|
|
|
1489
1493
|
})
|
|
1490
1494
|
]
|
|
1491
1495
|
}) }),
|
|
1492
|
-
/* @__PURE__ */ G(
|
|
1496
|
+
/* @__PURE__ */ G(b, {
|
|
1493
1497
|
title: n("devportal.description", "Description"),
|
|
1494
1498
|
children: /* @__PURE__ */ G("div", {
|
|
1495
1499
|
className: "prose prose-sm max-w-none",
|
|
@@ -1499,7 +1503,7 @@ var Le = [
|
|
|
1499
1503
|
})
|
|
1500
1504
|
})
|
|
1501
1505
|
}),
|
|
1502
|
-
/* @__PURE__ */ G(
|
|
1506
|
+
/* @__PURE__ */ G(b, {
|
|
1503
1507
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
1504
1508
|
children: /* @__PURE__ */ K("div", {
|
|
1505
1509
|
className: "space-y-3",
|
|
@@ -1527,9 +1531,9 @@ var Le = [
|
|
|
1527
1531
|
]
|
|
1528
1532
|
}), /* @__PURE__ */ K("div", {
|
|
1529
1533
|
className: "space-y-6",
|
|
1530
|
-
children: [/* @__PURE__ */ G(
|
|
1534
|
+
children: [/* @__PURE__ */ G(b, {
|
|
1531
1535
|
title: n("devportal.details", "Details"),
|
|
1532
|
-
children: /* @__PURE__ */ G(
|
|
1536
|
+
children: /* @__PURE__ */ G(k, { items: [
|
|
1533
1537
|
{
|
|
1534
1538
|
label: n("devportal.appId", "App ID"),
|
|
1535
1539
|
value: /* @__PURE__ */ G("code", {
|
|
@@ -1568,32 +1572,32 @@ var Le = [
|
|
|
1568
1572
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
1569
1573
|
}
|
|
1570
1574
|
] })
|
|
1571
|
-
}), /* @__PURE__ */ G(
|
|
1575
|
+
}), /* @__PURE__ */ G(b, {
|
|
1572
1576
|
title: n("devportal.links", "Links"),
|
|
1573
1577
|
children: /* @__PURE__ */ K("div", {
|
|
1574
1578
|
className: "space-y-2",
|
|
1575
1579
|
children: [
|
|
1576
|
-
e.websiteUrl && /* @__PURE__ */ G(
|
|
1580
|
+
e.websiteUrl && /* @__PURE__ */ G(ct, {
|
|
1577
1581
|
label: n("devportal.website", "Website"),
|
|
1578
1582
|
url: e.websiteUrl
|
|
1579
1583
|
}),
|
|
1580
|
-
e.documentationUrl && /* @__PURE__ */ G(
|
|
1584
|
+
e.documentationUrl && /* @__PURE__ */ G(ct, {
|
|
1581
1585
|
label: n("devportal.documentation", "Documentation"),
|
|
1582
1586
|
url: e.documentationUrl
|
|
1583
1587
|
}),
|
|
1584
|
-
e.supportUrl && /* @__PURE__ */ G(
|
|
1588
|
+
e.supportUrl && /* @__PURE__ */ G(ct, {
|
|
1585
1589
|
label: n("devportal.support", "Support"),
|
|
1586
1590
|
url: e.supportUrl
|
|
1587
1591
|
}),
|
|
1588
|
-
e.githubUrl && /* @__PURE__ */ G(
|
|
1592
|
+
e.githubUrl && /* @__PURE__ */ G(ct, {
|
|
1589
1593
|
label: n("devportal.github", "GitHub"),
|
|
1590
1594
|
url: e.githubUrl
|
|
1591
1595
|
}),
|
|
1592
|
-
e.privacyPolicyUrl && /* @__PURE__ */ G(
|
|
1596
|
+
e.privacyPolicyUrl && /* @__PURE__ */ G(ct, {
|
|
1593
1597
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
1594
1598
|
url: e.privacyPolicyUrl
|
|
1595
1599
|
}),
|
|
1596
|
-
e.termsOfServiceUrl && /* @__PURE__ */ G(
|
|
1600
|
+
e.termsOfServiceUrl && /* @__PURE__ */ G(ct, {
|
|
1597
1601
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
1598
1602
|
url: e.termsOfServiceUrl
|
|
1599
1603
|
})
|
|
@@ -1602,8 +1606,8 @@ var Le = [
|
|
|
1602
1606
|
})]
|
|
1603
1607
|
})]
|
|
1604
1608
|
});
|
|
1605
|
-
},
|
|
1606
|
-
let { t: i } =
|
|
1609
|
+
}, Ze = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
1610
|
+
let { t: i } = F(), a = (e, t) => {
|
|
1607
1611
|
let n = i(e);
|
|
1608
1612
|
return n === e ? t : n;
|
|
1609
1613
|
};
|
|
@@ -1623,7 +1627,7 @@ var Le = [
|
|
|
1623
1627
|
}), /* @__PURE__ */ K("button", {
|
|
1624
1628
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1625
1629
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1626
|
-
children: [/* @__PURE__ */ G(
|
|
1630
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1627
1631
|
})]
|
|
1628
1632
|
}), t.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1629
1633
|
className: "space-y-4",
|
|
@@ -1637,7 +1641,7 @@ var Le = [
|
|
|
1637
1641
|
children: [/* @__PURE__ */ G("h3", {
|
|
1638
1642
|
className: "font-medium",
|
|
1639
1643
|
children: t.name
|
|
1640
|
-
}), /* @__PURE__ */ G(
|
|
1644
|
+
}), /* @__PURE__ */ G(C, {
|
|
1641
1645
|
status: t.status,
|
|
1642
1646
|
type: "webhook"
|
|
1643
1647
|
})]
|
|
@@ -1710,12 +1714,12 @@ var Le = [
|
|
|
1710
1714
|
action: /* @__PURE__ */ K("button", {
|
|
1711
1715
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1712
1716
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1713
|
-
children: [/* @__PURE__ */ G(
|
|
1717
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1714
1718
|
})
|
|
1715
1719
|
})]
|
|
1716
1720
|
});
|
|
1717
|
-
},
|
|
1718
|
-
let { t: p } =
|
|
1721
|
+
}, Qe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
1722
|
+
let { t: p } = F(), m = (e, t) => {
|
|
1719
1723
|
let n = p(e);
|
|
1720
1724
|
return n === e ? t : n;
|
|
1721
1725
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
@@ -1750,7 +1754,7 @@ var Le = [
|
|
|
1750
1754
|
})] }), /* @__PURE__ */ K("button", {
|
|
1751
1755
|
onClick: i,
|
|
1752
1756
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1753
|
-
children: [/* @__PURE__ */ G(
|
|
1757
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1754
1758
|
})]
|
|
1755
1759
|
}),
|
|
1756
1760
|
h.length > 0 && /* @__PURE__ */ G("div", {
|
|
@@ -1761,7 +1765,7 @@ var Le = [
|
|
|
1761
1765
|
className: "flex flex-wrap items-center gap-3",
|
|
1762
1766
|
children: [/* @__PURE__ */ K("div", {
|
|
1763
1767
|
className: "flex items-center gap-2",
|
|
1764
|
-
children: [/* @__PURE__ */ G(
|
|
1768
|
+
children: [/* @__PURE__ */ G(T, {
|
|
1765
1769
|
checked: d,
|
|
1766
1770
|
indeterminate: f,
|
|
1767
1771
|
onChange: c,
|
|
@@ -1804,7 +1808,7 @@ var Le = [
|
|
|
1804
1808
|
className: "flex items-start gap-3",
|
|
1805
1809
|
children: [e.status === "ACTIVE" && /* @__PURE__ */ G("div", {
|
|
1806
1810
|
onClick: (e) => e.stopPropagation(),
|
|
1807
|
-
children: /* @__PURE__ */ G(
|
|
1811
|
+
children: /* @__PURE__ */ G(T, {
|
|
1808
1812
|
checked: o.has(e.id),
|
|
1809
1813
|
onChange: (t) => s(e.id, t),
|
|
1810
1814
|
ariaLabel: `Select delegation ${e.id}`,
|
|
@@ -1816,7 +1820,7 @@ var Le = [
|
|
|
1816
1820
|
className: "font-medium",
|
|
1817
1821
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
1818
1822
|
}), /* @__PURE__ */ G("span", {
|
|
1819
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1823
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", ze[e.status]),
|
|
1820
1824
|
children: e.status
|
|
1821
1825
|
})]
|
|
1822
1826
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -1834,7 +1838,7 @@ var Le = [
|
|
|
1834
1838
|
}), e.status === "ACTIVE" && /* @__PURE__ */ K("button", {
|
|
1835
1839
|
onClick: () => a(e.id),
|
|
1836
1840
|
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",
|
|
1837
|
-
children: [/* @__PURE__ */ G(
|
|
1841
|
+
children: [/* @__PURE__ */ G(Ae, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
1838
1842
|
})]
|
|
1839
1843
|
}),
|
|
1840
1844
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1879,7 +1883,7 @@ var Le = [
|
|
|
1879
1883
|
e.revokedAt && /* @__PURE__ */ K("span", {
|
|
1880
1884
|
className: "flex items-center gap-1",
|
|
1881
1885
|
children: [
|
|
1882
|
-
/* @__PURE__ */ G(
|
|
1886
|
+
/* @__PURE__ */ G(Ae, {
|
|
1883
1887
|
size: 12,
|
|
1884
1888
|
className: "text-status-error-text"
|
|
1885
1889
|
}),
|
|
@@ -1900,13 +1904,13 @@ var Le = [
|
|
|
1900
1904
|
action: /* @__PURE__ */ K("button", {
|
|
1901
1905
|
onClick: i,
|
|
1902
1906
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1903
|
-
children: [/* @__PURE__ */ G(
|
|
1907
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1904
1908
|
})
|
|
1905
1909
|
})
|
|
1906
1910
|
]
|
|
1907
1911
|
});
|
|
1908
|
-
},
|
|
1909
|
-
let { t } =
|
|
1912
|
+
}, $e = ({ analytics: e }) => {
|
|
1913
|
+
let { t } = F(), n = (e, n) => {
|
|
1910
1914
|
let r = t(e);
|
|
1911
1915
|
return r === e ? n : r;
|
|
1912
1916
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
@@ -1936,9 +1940,9 @@ var Le = [
|
|
|
1936
1940
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1937
1941
|
})
|
|
1938
1942
|
]
|
|
1939
|
-
}), /* @__PURE__ */ G(
|
|
1943
|
+
}), /* @__PURE__ */ G(b, {
|
|
1940
1944
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1941
|
-
children: e.length > 0 ? /* @__PURE__ */ G(
|
|
1945
|
+
children: e.length > 0 ? /* @__PURE__ */ G(O, {
|
|
1942
1946
|
data: e,
|
|
1943
1947
|
keyField: "id",
|
|
1944
1948
|
columns: [
|
|
@@ -1986,11 +1990,11 @@ var Le = [
|
|
|
1986
1990
|
})
|
|
1987
1991
|
})]
|
|
1988
1992
|
});
|
|
1989
|
-
},
|
|
1990
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1993
|
+
}, et = "# Sample query — replace with your own\n# Note: introspection is disabled on this gateway for security.\n# Use a real query from your app's API schema instead.\nquery GetCurrentUser {\n currentUser {\n id\n email\n }\n}", tt = ({ app: t }) => {
|
|
1994
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = F(), o = (e, t) => {
|
|
1991
1995
|
let n = a(e);
|
|
1992
1996
|
return n === e ? t : n;
|
|
1993
|
-
}, [s, c] =
|
|
1997
|
+
}, [s, c] = P(et), [l, u] = P("{}"), [d, f] = P(""), [p, m] = P(!1), [h, g] = P(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = P(i || ""), [y, b] = P(!1), x = j(async () => {
|
|
1994
1998
|
m(!0), f("");
|
|
1995
1999
|
try {
|
|
1996
2000
|
let e = {};
|
|
@@ -2021,7 +2025,7 @@ var Le = [
|
|
|
2021
2025
|
l,
|
|
2022
2026
|
h,
|
|
2023
2027
|
_
|
|
2024
|
-
]), S =
|
|
2028
|
+
]), S = j(() => {
|
|
2025
2029
|
i && v(i), b(!0);
|
|
2026
2030
|
}, [i]);
|
|
2027
2031
|
return /* @__PURE__ */ K("div", {
|
|
@@ -2050,7 +2054,7 @@ var Le = [
|
|
|
2050
2054
|
})] }), /* @__PURE__ */ K("button", {
|
|
2051
2055
|
onClick: S,
|
|
2052
2056
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
2053
|
-
children: [/* @__PURE__ */ G(
|
|
2057
|
+
children: [/* @__PURE__ */ G(_e, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
2054
2058
|
})]
|
|
2055
2059
|
}),
|
|
2056
2060
|
y && /* @__PURE__ */ K("div", {
|
|
@@ -2151,10 +2155,10 @@ var Le = [
|
|
|
2151
2155
|
onClick: x,
|
|
2152
2156
|
disabled: p,
|
|
2153
2157
|
className: "flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
2154
|
-
children: [p ? /* @__PURE__ */ G(
|
|
2158
|
+
children: [p ? /* @__PURE__ */ G(B, {
|
|
2155
2159
|
size: 16,
|
|
2156
2160
|
className: "animate-spin"
|
|
2157
|
-
}) : /* @__PURE__ */ G(
|
|
2161
|
+
}) : /* @__PURE__ */ G(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2158
2162
|
}),
|
|
2159
2163
|
d && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2160
2164
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2165,10 +2169,10 @@ var Le = [
|
|
|
2165
2169
|
})] })
|
|
2166
2170
|
]
|
|
2167
2171
|
});
|
|
2168
|
-
},
|
|
2169
|
-
let d =
|
|
2172
|
+
}, nt = ({ 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 }) => {
|
|
2173
|
+
let d = N(null), [f, p] = P(!1), m = N(n);
|
|
2170
2174
|
m.current !== n && (m.current = n, f && p(!1));
|
|
2171
|
-
let h =
|
|
2175
|
+
let h = j(async (e) => {
|
|
2172
2176
|
try {
|
|
2173
2177
|
r((await s(e)).downloadUrl);
|
|
2174
2178
|
} catch {}
|
|
@@ -2189,12 +2193,12 @@ var Le = [
|
|
|
2189
2193
|
alt: e,
|
|
2190
2194
|
className: "w-full h-full object-cover",
|
|
2191
2195
|
onError: () => p(!0)
|
|
2192
|
-
}) : /* @__PURE__ */ G(
|
|
2196
|
+
}) : /* @__PURE__ */ G(U, {
|
|
2193
2197
|
size: 18,
|
|
2194
2198
|
className: "text-text-secondary opacity-40"
|
|
2195
2199
|
}), c && /* @__PURE__ */ K("div", {
|
|
2196
2200
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
2197
|
-
children: [/* @__PURE__ */ G(
|
|
2201
|
+
children: [/* @__PURE__ */ G(B, {
|
|
2198
2202
|
size: 14,
|
|
2199
2203
|
className: "animate-spin text-white"
|
|
2200
2204
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2227,7 +2231,7 @@ var Le = [
|
|
|
2227
2231
|
disabled: c,
|
|
2228
2232
|
onClick: () => d.current?.click(),
|
|
2229
2233
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
2230
|
-
children: [/* @__PURE__ */ G(
|
|
2234
|
+
children: [/* @__PURE__ */ G(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
2231
2235
|
}),
|
|
2232
2236
|
u && /* @__PURE__ */ G("p", {
|
|
2233
2237
|
className: "text-xs text-status-error-text",
|
|
@@ -2242,8 +2246,8 @@ var Le = [
|
|
|
2242
2246
|
})
|
|
2243
2247
|
]
|
|
2244
2248
|
});
|
|
2245
|
-
},
|
|
2246
|
-
let s =
|
|
2249
|
+
}, rt = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
2250
|
+
let s = N(null), [c, l] = P(""), u = j(async (t) => {
|
|
2247
2251
|
try {
|
|
2248
2252
|
let i = await r(t);
|
|
2249
2253
|
n([...e, i.downloadUrl]);
|
|
@@ -2283,20 +2287,20 @@ var Le = [
|
|
|
2283
2287
|
type: "button",
|
|
2284
2288
|
onClick: () => f(t),
|
|
2285
2289
|
className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2286
|
-
children: /* @__PURE__ */ G(
|
|
2290
|
+
children: /* @__PURE__ */ G(ke, { size: 12 })
|
|
2287
2291
|
})]
|
|
2288
2292
|
}, t)), /* @__PURE__ */ G("button", {
|
|
2289
2293
|
type: "button",
|
|
2290
2294
|
disabled: i,
|
|
2291
2295
|
onClick: () => s.current?.click(),
|
|
2292
2296
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border-subtle flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
2293
|
-
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2297
|
+
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
2294
2298
|
size: 18,
|
|
2295
2299
|
className: "animate-spin text-primary"
|
|
2296
2300
|
}), /* @__PURE__ */ K("span", {
|
|
2297
2301
|
className: "text-xs",
|
|
2298
2302
|
children: [a, "%"]
|
|
2299
|
-
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2303
|
+
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(U, { size: 18 }), /* @__PURE__ */ G("span", {
|
|
2300
2304
|
className: "text-xs",
|
|
2301
2305
|
children: "Add screenshot"
|
|
2302
2306
|
})] })
|
|
@@ -2337,13 +2341,13 @@ var Le = [
|
|
|
2337
2341
|
})
|
|
2338
2342
|
]
|
|
2339
2343
|
});
|
|
2340
|
-
},
|
|
2344
|
+
}, Z = new Set(["workflow", "template"]), Q = [{
|
|
2341
2345
|
value: "FREE",
|
|
2342
2346
|
label: "Free"
|
|
2343
2347
|
}, {
|
|
2344
2348
|
value: "PAID",
|
|
2345
2349
|
label: "Paid"
|
|
2346
|
-
}],
|
|
2350
|
+
}], it = {
|
|
2347
2351
|
NODE: [
|
|
2348
2352
|
{
|
|
2349
2353
|
value: "node",
|
|
@@ -2415,12 +2419,12 @@ var Le = [
|
|
|
2415
2419
|
label: "Plugin"
|
|
2416
2420
|
}
|
|
2417
2421
|
]
|
|
2418
|
-
},
|
|
2422
|
+
}, at = {
|
|
2419
2423
|
NODE: "node",
|
|
2420
2424
|
WORKFLOW: "workflow",
|
|
2421
2425
|
APP: "app"
|
|
2422
2426
|
};
|
|
2423
|
-
function
|
|
2427
|
+
function ot(e) {
|
|
2424
2428
|
let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
|
|
2425
2429
|
return {
|
|
2426
2430
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -2435,7 +2439,7 @@ function at(e) {
|
|
|
2435
2439
|
supportUrl: e.supportUrl ?? "",
|
|
2436
2440
|
privacyPolicyUrl: e.privacyPolicyUrl ?? "",
|
|
2437
2441
|
termsOfServiceUrl: e.termsOfServiceUrl ?? "",
|
|
2438
|
-
manifestItemType: typeof t.itemType == "string" ? t.itemType :
|
|
2442
|
+
manifestItemType: typeof t.itemType == "string" ? t.itemType : at[e.appType] ?? "",
|
|
2439
2443
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
|
|
2440
2444
|
manifestVersion: typeof n.version == "string" ? n.version : "",
|
|
2441
2445
|
manifestInstallType: typeof r.type == "string" ? r.type : "zip",
|
|
@@ -2446,26 +2450,26 @@ function at(e) {
|
|
|
2446
2450
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
2447
2451
|
};
|
|
2448
2452
|
}
|
|
2449
|
-
var
|
|
2450
|
-
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } =
|
|
2453
|
+
var st = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i = !1, onNavigateToVersions: a, onNavigateToPricing: o, onNavigateToSubmission: s }) => {
|
|
2454
|
+
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } = F(), p = (e, t) => {
|
|
2451
2455
|
let n = f(e);
|
|
2452
2456
|
return n === e ? t : n;
|
|
2453
|
-
}, [m, h] =
|
|
2457
|
+
}, [m, h] = P(() => ot(t)), [g, _] = P(!1), [y, x] = P(null), S = N(ot(t)), C = N(t);
|
|
2454
2458
|
C.current = t;
|
|
2455
|
-
let w = JSON.stringify(m) !== JSON.stringify(S.current), [
|
|
2459
|
+
let w = JSON.stringify(m) !== JSON.stringify(S.current), [T] = v();
|
|
2456
2460
|
se(() => {
|
|
2457
|
-
let e =
|
|
2461
|
+
let e = ot(C.current);
|
|
2458
2462
|
h(e), S.current = e, x(null);
|
|
2459
2463
|
}, [t.id]);
|
|
2460
|
-
let
|
|
2464
|
+
let D = (e, t) => {
|
|
2461
2465
|
h((n) => ({
|
|
2462
2466
|
...n,
|
|
2463
2467
|
[e]: t
|
|
2464
2468
|
})), x(null);
|
|
2465
|
-
},
|
|
2466
|
-
|
|
2469
|
+
}, O = m.shortDescription.trim().length > 0 && m.privacyPolicyUrl.trim().length > 0 && m.termsOfServiceUrl.trim().length > 0, k = async () => {
|
|
2470
|
+
_(!0), x(null);
|
|
2467
2471
|
try {
|
|
2468
|
-
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r =
|
|
2472
|
+
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Z.has(m.manifestItemType), i = t.manifest ?? {}, a = {
|
|
2469
2473
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
2470
2474
|
itemType: m.manifestItemType || void 0,
|
|
2471
2475
|
identity: {
|
|
@@ -2479,7 +2483,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2479
2483
|
permissions: n,
|
|
2480
2484
|
compatibility: { minPlatformVersion: m.manifestMinPlatformVersion }
|
|
2481
2485
|
};
|
|
2482
|
-
await
|
|
2486
|
+
await T({ variables: {
|
|
2483
2487
|
id: t.id,
|
|
2484
2488
|
input: {
|
|
2485
2489
|
iconUrl: m.iconUrl || null,
|
|
@@ -2496,13 +2500,13 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2496
2500
|
termsOfServiceUrl: m.termsOfServiceUrl || null,
|
|
2497
2501
|
manifest: a
|
|
2498
2502
|
}
|
|
2499
|
-
} }),
|
|
2503
|
+
} }), E("success"), x("success"), S.current = m;
|
|
2500
2504
|
} catch {
|
|
2501
|
-
|
|
2505
|
+
E("error"), x("error");
|
|
2502
2506
|
} finally {
|
|
2503
|
-
|
|
2507
|
+
_(!1);
|
|
2504
2508
|
}
|
|
2505
|
-
}, { upload:
|
|
2509
|
+
}, { upload: ne, uploading: re, progress: ie, error: ae } = oe(c, l, u, d, "/DevPortal/Assets"), { upload: j, uploading: M, progress: le, error: ue } = oe(c, l, u, d, "/DevPortal/Assets"), { upload: L, uploading: me, progress: he, error: ge } = oe(c, l, u, d, "/DevPortal/Assets"), z = Z.has(m.manifestItemType), _e = t.status === "SUBMITTED";
|
|
2506
2510
|
return /* @__PURE__ */ K("div", {
|
|
2507
2511
|
className: "space-y-8 max-w-3xl",
|
|
2508
2512
|
children: [
|
|
@@ -2525,7 +2529,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2525
2529
|
]
|
|
2526
2530
|
})]
|
|
2527
2531
|
})]
|
|
2528
|
-
}) :
|
|
2532
|
+
}) : _e ? /* @__PURE__ */ K("div", {
|
|
2529
2533
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2530
2534
|
children: [/* @__PURE__ */ K("div", {
|
|
2531
2535
|
className: "flex items-start gap-3",
|
|
@@ -2553,7 +2557,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2553
2557
|
type: "button",
|
|
2554
2558
|
onClick: s,
|
|
2555
2559
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2556
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(
|
|
2560
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(R, { size: 12 })]
|
|
2557
2561
|
})]
|
|
2558
2562
|
}) : /* @__PURE__ */ K("div", {
|
|
2559
2563
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
@@ -2571,38 +2575,38 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2571
2575
|
})]
|
|
2572
2576
|
})]
|
|
2573
2577
|
}),
|
|
2574
|
-
/* @__PURE__ */ G(
|
|
2578
|
+
/* @__PURE__ */ G(b, {
|
|
2575
2579
|
title: p("devportal.package", "Package"),
|
|
2576
2580
|
description: p("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
2577
2581
|
children: /* @__PURE__ */ K("div", {
|
|
2578
2582
|
className: "space-y-6",
|
|
2579
2583
|
children: [
|
|
2580
|
-
/* @__PURE__ */ G(
|
|
2584
|
+
/* @__PURE__ */ G(ee, {
|
|
2581
2585
|
label: p("devportal.storeItemType", "Item Type"),
|
|
2582
2586
|
value: m.manifestItemType,
|
|
2583
2587
|
onChange: (e) => {
|
|
2584
2588
|
let t = e.target.value;
|
|
2585
|
-
|
|
2589
|
+
D("manifestItemType", t), Z.has(t) ? D("manifestInstallType", "json") : m.manifestInstallType === "json" && D("manifestInstallType", "zip");
|
|
2586
2590
|
},
|
|
2587
|
-
options:
|
|
2591
|
+
options: it[t.appType] ?? it.APP,
|
|
2588
2592
|
placeholder: p("devportal.selectItemType", "Select item type…"),
|
|
2589
2593
|
hint: p("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
|
|
2590
2594
|
}),
|
|
2591
|
-
/* @__PURE__ */ G(
|
|
2595
|
+
/* @__PURE__ */ G(A, {
|
|
2592
2596
|
label: p("devportal.manifestDisplayName", "Display Name"),
|
|
2593
2597
|
value: m.manifestDisplayName,
|
|
2594
|
-
onChange: (e) =>
|
|
2598
|
+
onChange: (e) => D("manifestDisplayName", e.target.value),
|
|
2595
2599
|
placeholder: "My Awesome Node"
|
|
2596
2600
|
}),
|
|
2597
|
-
|
|
2601
|
+
z && t.appType !== "WORKFLOW" && /* @__PURE__ */ G(te, {
|
|
2598
2602
|
label: p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2599
2603
|
value: m.manifestJsonContent,
|
|
2600
|
-
onChange: (e) =>
|
|
2604
|
+
onChange: (e) => D("manifestJsonContent", e.target.value),
|
|
2601
2605
|
rows: 12,
|
|
2602
2606
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2603
2607
|
hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2604
2608
|
}),
|
|
2605
|
-
|
|
2609
|
+
z && t.appType === "WORKFLOW" && /* @__PURE__ */ K("p", {
|
|
2606
2610
|
className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
|
|
2607
2611
|
children: [
|
|
2608
2612
|
"The Workflow Definition (JSON) is set per version. Go to the",
|
|
@@ -2614,7 +2618,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2614
2618
|
]
|
|
2615
2619
|
})
|
|
2616
2620
|
}),
|
|
2617
|
-
/* @__PURE__ */ G(
|
|
2621
|
+
/* @__PURE__ */ G(b, {
|
|
2618
2622
|
title: p("devportal.storePresentation", "Store Presence"),
|
|
2619
2623
|
description: p("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
2620
2624
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -2622,102 +2626,102 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2622
2626
|
children: [
|
|
2623
2627
|
/* @__PURE__ */ K("div", {
|
|
2624
2628
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2625
|
-
children: [/* @__PURE__ */ G(
|
|
2629
|
+
children: [/* @__PURE__ */ G(nt, {
|
|
2626
2630
|
label: p("devportal.iconUrl", "Icon"),
|
|
2627
2631
|
value: m.iconUrl,
|
|
2628
|
-
onChange: (e) =>
|
|
2632
|
+
onChange: (e) => D("iconUrl", e),
|
|
2629
2633
|
hint: p("devportal.iconUrlHint", "Shown in marketplace cards and search — square proportions (1:1)"),
|
|
2630
2634
|
aspectClass: "aspect-square",
|
|
2631
|
-
upload:
|
|
2632
|
-
uploading:
|
|
2633
|
-
progress:
|
|
2634
|
-
error:
|
|
2635
|
-
}), /* @__PURE__ */ G(
|
|
2635
|
+
upload: ne,
|
|
2636
|
+
uploading: re,
|
|
2637
|
+
progress: ie,
|
|
2638
|
+
error: ae
|
|
2639
|
+
}), /* @__PURE__ */ G(nt, {
|
|
2636
2640
|
label: p("devportal.bannerUrl", "Banner"),
|
|
2637
2641
|
value: m.bannerUrl,
|
|
2638
|
-
onChange: (e) =>
|
|
2642
|
+
onChange: (e) => D("bannerUrl", e),
|
|
2639
2643
|
hint: p("devportal.bannerUrlHint", "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)"),
|
|
2640
2644
|
aspectClass: "aspect-square",
|
|
2641
2645
|
upload: j,
|
|
2642
|
-
uploading:
|
|
2643
|
-
progress:
|
|
2644
|
-
error:
|
|
2646
|
+
uploading: M,
|
|
2647
|
+
progress: le,
|
|
2648
|
+
error: ue
|
|
2645
2649
|
})]
|
|
2646
2650
|
}),
|
|
2647
|
-
/* @__PURE__ */ G(
|
|
2651
|
+
/* @__PURE__ */ G(A, {
|
|
2648
2652
|
label: p("devportal.videoUrl", "Demo Video URL"),
|
|
2649
2653
|
value: m.videoUrl,
|
|
2650
|
-
onChange: (e) =>
|
|
2654
|
+
onChange: (e) => D("videoUrl", e.target.value),
|
|
2651
2655
|
placeholder: "https://...",
|
|
2652
2656
|
hint: p("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2653
2657
|
}),
|
|
2654
|
-
/* @__PURE__ */ G(
|
|
2658
|
+
/* @__PURE__ */ G(te, {
|
|
2655
2659
|
label: p("devportal.shortDescription", "Short Description"),
|
|
2656
2660
|
value: m.shortDescription,
|
|
2657
|
-
onChange: (e) =>
|
|
2661
|
+
onChange: (e) => D("shortDescription", e.target.value),
|
|
2658
2662
|
maxLength: 200,
|
|
2659
2663
|
rows: 2,
|
|
2660
2664
|
hint: `${m.shortDescription.length}/200 · ${p("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2661
2665
|
}),
|
|
2662
|
-
/* @__PURE__ */ G(
|
|
2666
|
+
/* @__PURE__ */ G(te, {
|
|
2663
2667
|
label: p("devportal.longDescription", "Full Description"),
|
|
2664
2668
|
value: m.description,
|
|
2665
|
-
onChange: (e) =>
|
|
2669
|
+
onChange: (e) => D("description", e.target.value),
|
|
2666
2670
|
rows: 5,
|
|
2667
2671
|
hint: p("devportal.fullDescHint", "Markdown supported")
|
|
2668
2672
|
}),
|
|
2669
|
-
/* @__PURE__ */ G(
|
|
2673
|
+
/* @__PURE__ */ G(rt, {
|
|
2670
2674
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2671
|
-
onChange: (e) =>
|
|
2672
|
-
upload:
|
|
2673
|
-
uploading:
|
|
2674
|
-
progress:
|
|
2675
|
-
error:
|
|
2675
|
+
onChange: (e) => D("screenshotsText", e.join("\n")),
|
|
2676
|
+
upload: L,
|
|
2677
|
+
uploading: me,
|
|
2678
|
+
progress: he,
|
|
2679
|
+
error: ge
|
|
2676
2680
|
})
|
|
2677
2681
|
]
|
|
2678
2682
|
})
|
|
2679
2683
|
}),
|
|
2680
|
-
/* @__PURE__ */ G(
|
|
2684
|
+
/* @__PURE__ */ G(b, {
|
|
2681
2685
|
title: p("devportal.linksPolicies", "Links & Policies"),
|
|
2682
2686
|
description: p("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
2683
2687
|
children: /* @__PURE__ */ K("div", {
|
|
2684
2688
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2685
2689
|
children: [
|
|
2686
|
-
/* @__PURE__ */ G(
|
|
2690
|
+
/* @__PURE__ */ G(A, {
|
|
2687
2691
|
label: p("devportal.websiteUrl", "Website"),
|
|
2688
2692
|
value: m.websiteUrl,
|
|
2689
|
-
onChange: (e) =>
|
|
2693
|
+
onChange: (e) => D("websiteUrl", e.target.value),
|
|
2690
2694
|
placeholder: "https://..."
|
|
2691
2695
|
}),
|
|
2692
|
-
/* @__PURE__ */ G(
|
|
2696
|
+
/* @__PURE__ */ G(A, {
|
|
2693
2697
|
label: p("devportal.documentationUrl", "Documentation"),
|
|
2694
2698
|
value: m.documentationUrl,
|
|
2695
|
-
onChange: (e) =>
|
|
2699
|
+
onChange: (e) => D("documentationUrl", e.target.value),
|
|
2696
2700
|
placeholder: "https://..."
|
|
2697
2701
|
}),
|
|
2698
|
-
/* @__PURE__ */ G(
|
|
2702
|
+
/* @__PURE__ */ G(A, {
|
|
2699
2703
|
label: p("devportal.githubUrl", "GitHub"),
|
|
2700
2704
|
value: m.githubUrl,
|
|
2701
|
-
onChange: (e) =>
|
|
2705
|
+
onChange: (e) => D("githubUrl", e.target.value),
|
|
2702
2706
|
placeholder: "https://github.com/..."
|
|
2703
2707
|
}),
|
|
2704
|
-
/* @__PURE__ */ G(
|
|
2708
|
+
/* @__PURE__ */ G(A, {
|
|
2705
2709
|
label: p("devportal.supportUrl", "Support"),
|
|
2706
2710
|
value: m.supportUrl,
|
|
2707
|
-
onChange: (e) =>
|
|
2711
|
+
onChange: (e) => D("supportUrl", e.target.value),
|
|
2708
2712
|
placeholder: "https://..."
|
|
2709
2713
|
}),
|
|
2710
|
-
/* @__PURE__ */ G(
|
|
2714
|
+
/* @__PURE__ */ G(A, {
|
|
2711
2715
|
label: `${p("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2712
2716
|
value: m.privacyPolicyUrl,
|
|
2713
|
-
onChange: (e) =>
|
|
2717
|
+
onChange: (e) => D("privacyPolicyUrl", e.target.value),
|
|
2714
2718
|
placeholder: "https://...",
|
|
2715
2719
|
hint: p("devportal.requiredForStore", "Required for store submission")
|
|
2716
2720
|
}),
|
|
2717
|
-
/* @__PURE__ */ G(
|
|
2721
|
+
/* @__PURE__ */ G(A, {
|
|
2718
2722
|
label: `${p("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2719
2723
|
value: m.termsOfServiceUrl,
|
|
2720
|
-
onChange: (e) =>
|
|
2724
|
+
onChange: (e) => D("termsOfServiceUrl", e.target.value),
|
|
2721
2725
|
placeholder: "https://...",
|
|
2722
2726
|
hint: p("devportal.requiredForStore", "Required for store submission")
|
|
2723
2727
|
})
|
|
@@ -2727,14 +2731,14 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2727
2731
|
/* @__PURE__ */ K("div", {
|
|
2728
2732
|
className: "border-t pt-6 space-y-3",
|
|
2729
2733
|
children: [
|
|
2730
|
-
|
|
2734
|
+
y === "success" && /* @__PURE__ */ K("div", {
|
|
2731
2735
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2732
2736
|
children: [/* @__PURE__ */ G(de, {
|
|
2733
2737
|
size: 15,
|
|
2734
2738
|
className: "shrink-0"
|
|
2735
2739
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
2736
2740
|
}),
|
|
2737
|
-
|
|
2741
|
+
y === "error" && /* @__PURE__ */ K("div", {
|
|
2738
2742
|
className: "flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2739
2743
|
children: [/* @__PURE__ */ G(ce, {
|
|
2740
2744
|
size: 15,
|
|
@@ -2746,16 +2750,16 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2746
2750
|
children: [
|
|
2747
2751
|
/* @__PURE__ */ G("button", {
|
|
2748
2752
|
type: "button",
|
|
2749
|
-
onClick:
|
|
2750
|
-
disabled: g || !
|
|
2751
|
-
title:
|
|
2753
|
+
onClick: k,
|
|
2754
|
+
disabled: g || !O || !w,
|
|
2755
|
+
title: O ? w ? void 0 : p("devportal.storeListing.noChanges", "All changes saved — edit any field to save again") : p("devportal.storeListing.requiredFieldsHint", "Fill in Short Description, Privacy Policy URL, and Terms of Service URL to save"),
|
|
2752
2756
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2753
|
-
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2757
|
+
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
2754
2758
|
size: 16,
|
|
2755
2759
|
className: "animate-spin"
|
|
2756
|
-
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(we, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2760
|
+
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(we, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(I, { size: 16 }), p("devportal.saved", "Saved")] })
|
|
2757
2761
|
}),
|
|
2758
|
-
!
|
|
2762
|
+
!O && /* @__PURE__ */ G("p", {
|
|
2759
2763
|
className: "text-xs text-text-secondary",
|
|
2760
2764
|
children: p("devportal.storeListing.requiredFieldsLabel", "Short Description, Privacy Policy URL, and Terms of Service URL are required")
|
|
2761
2765
|
}),
|
|
@@ -2778,8 +2782,8 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2778
2782
|
]
|
|
2779
2783
|
});
|
|
2780
2784
|
}, $ = ({ label: e, value: n, trend: r }) => {
|
|
2781
|
-
let { t: i } =
|
|
2782
|
-
return /* @__PURE__ */ K(
|
|
2785
|
+
let { t: i } = F();
|
|
2786
|
+
return /* @__PURE__ */ K(Pe, {
|
|
2783
2787
|
treatment: "metric",
|
|
2784
2788
|
className: "p-4",
|
|
2785
2789
|
children: [
|
|
@@ -2805,13 +2809,13 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2805
2809
|
})
|
|
2806
2810
|
]
|
|
2807
2811
|
});
|
|
2808
|
-
},
|
|
2812
|
+
}, ct = ({ label: e, url: t }) => /* @__PURE__ */ K("a", {
|
|
2809
2813
|
href: t,
|
|
2810
2814
|
target: "_blank",
|
|
2811
2815
|
rel: "noopener noreferrer",
|
|
2812
2816
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2813
|
-
children: [/* @__PURE__ */ G(
|
|
2814
|
-
}),
|
|
2817
|
+
children: [/* @__PURE__ */ G(R, { size: 14 }), e]
|
|
2818
|
+
}), lt = {
|
|
2815
2819
|
auth: {
|
|
2816
2820
|
label: "Authentication",
|
|
2817
2821
|
description: "User identity and session management"
|
|
@@ -2868,8 +2872,8 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2868
2872
|
label: "Roles & Permissions",
|
|
2869
2873
|
description: "Access control configuration"
|
|
2870
2874
|
}
|
|
2871
|
-
},
|
|
2872
|
-
function
|
|
2875
|
+
}, ut = Object.keys(lt);
|
|
2876
|
+
function dt(e) {
|
|
2873
2877
|
if (!e || !Array.isArray(e.permissions)) return [];
|
|
2874
2878
|
let t = [];
|
|
2875
2879
|
for (let n of e.permissions) n && typeof n == "object" && typeof n.resource == "string" && n.resource && t.push({
|
|
@@ -2878,7 +2882,7 @@ function ut(e) {
|
|
|
2878
2882
|
});
|
|
2879
2883
|
return t;
|
|
2880
2884
|
}
|
|
2881
|
-
function
|
|
2885
|
+
function ft(e) {
|
|
2882
2886
|
let t = [];
|
|
2883
2887
|
for (let n of e) {
|
|
2884
2888
|
let e = n.indexOf(":");
|
|
@@ -2891,12 +2895,12 @@ function dt(e) {
|
|
|
2891
2895
|
}
|
|
2892
2896
|
return t;
|
|
2893
2897
|
}
|
|
2894
|
-
function
|
|
2898
|
+
function pt(e, t) {
|
|
2895
2899
|
if (e.length > 0) return e;
|
|
2896
2900
|
let n = /* @__PURE__ */ new Set();
|
|
2897
2901
|
return t.filter((e) => n.has(e.resource) ? !1 : (n.add(e.resource), !0));
|
|
2898
2902
|
}
|
|
2899
|
-
var
|
|
2903
|
+
var mt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
2900
2904
|
className: "flex items-center gap-0.5 rounded-md border border-border-subtle bg-bg-sunken/50 p-0.5",
|
|
2901
2905
|
children: ["read", "write"].map((n) => /* @__PURE__ */ G("button", {
|
|
2902
2906
|
type: "button",
|
|
@@ -2904,8 +2908,8 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
2904
2908
|
className: `rounded px-2.5 py-1 text-xs font-medium transition-colors whitespace-nowrap ${e === n ? "bg-bg-base text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
|
|
2905
2909
|
children: n === "read" ? "Read" : "Read & Write"
|
|
2906
2910
|
}, n))
|
|
2907
|
-
}),
|
|
2908
|
-
let i = e.manifest ?? {}, [a, o] =
|
|
2911
|
+
}), ht = ({ app: e, versionScopes: t, locked: n = !1, onNavigateToVersions: r }) => {
|
|
2912
|
+
let i = e.manifest ?? {}, [a, o] = P(() => pt(dt(i), ft(t ?? []))), [s, c] = P(!1), [l, u] = P(""), [d, f] = P("read"), [p, m] = P(!1), [h, g] = P(!1), [_] = v(), y = (e, t) => {
|
|
2909
2913
|
g(!1), o((n) => n.map((n) => n.resource === e ? {
|
|
2910
2914
|
...n,
|
|
2911
2915
|
level: t
|
|
@@ -2921,7 +2925,7 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
2921
2925
|
}, C = async () => {
|
|
2922
2926
|
m(!0);
|
|
2923
2927
|
try {
|
|
2924
|
-
await
|
|
2928
|
+
await _({ variables: {
|
|
2925
2929
|
id: e.id,
|
|
2926
2930
|
input: { manifest: {
|
|
2927
2931
|
...i,
|
|
@@ -2943,13 +2947,13 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
2943
2947
|
children: [
|
|
2944
2948
|
/* @__PURE__ */ G("p", {
|
|
2945
2949
|
className: "text-sm font-medium text-text-primary",
|
|
2946
|
-
children:
|
|
2950
|
+
children: lt[e.resource]?.label ?? e.resource
|
|
2947
2951
|
}),
|
|
2948
|
-
|
|
2952
|
+
lt[e.resource]?.description && /* @__PURE__ */ G("p", {
|
|
2949
2953
|
className: "text-xs text-text-secondary",
|
|
2950
|
-
children:
|
|
2954
|
+
children: lt[e.resource].description
|
|
2951
2955
|
}),
|
|
2952
|
-
!
|
|
2956
|
+
!lt[e.resource] && /* @__PURE__ */ G("p", {
|
|
2953
2957
|
className: "text-xs text-text-tertiary font-mono",
|
|
2954
2958
|
children: "custom scope"
|
|
2955
2959
|
})
|
|
@@ -2957,26 +2961,26 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
2957
2961
|
}), n ? /* @__PURE__ */ G("span", {
|
|
2958
2962
|
className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${e.level === "write" ? "bg-status-warning-bg text-status-warning-text" : "bg-bg-sunken text-text-secondary"}`,
|
|
2959
2963
|
children: e.level === "write" ? "Read & Write" : "Read"
|
|
2960
|
-
}) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2964
|
+
}) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(mt, {
|
|
2961
2965
|
level: e.level,
|
|
2962
|
-
onChange: (t) =>
|
|
2966
|
+
onChange: (t) => y(e.resource, t)
|
|
2963
2967
|
}), /* @__PURE__ */ G("button", {
|
|
2964
2968
|
type: "button",
|
|
2965
2969
|
onClick: () => x(e.resource),
|
|
2966
2970
|
title: "Remove permission",
|
|
2967
2971
|
className: "p-1.5 rounded text-text-tertiary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
2968
|
-
children: /* @__PURE__ */ G(
|
|
2972
|
+
children: /* @__PURE__ */ G(ke, { size: 14 })
|
|
2969
2973
|
})] })]
|
|
2970
2974
|
}, e.resource))
|
|
2971
2975
|
});
|
|
2972
|
-
return /* @__PURE__ */ G(
|
|
2976
|
+
return /* @__PURE__ */ G(b, {
|
|
2973
2977
|
title: "Permissions",
|
|
2974
2978
|
description: "These are the permissions your app requests from users. Users see exactly this list when authorizing your app.",
|
|
2975
2979
|
children: /* @__PURE__ */ G("div", {
|
|
2976
2980
|
className: "space-y-4",
|
|
2977
2981
|
children: n ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K("div", {
|
|
2978
2982
|
className: "rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-3 flex gap-2 text-sm",
|
|
2979
|
-
children: [/* @__PURE__ */ G(
|
|
2983
|
+
children: [/* @__PURE__ */ G(z, {
|
|
2980
2984
|
size: 15,
|
|
2981
2985
|
className: "flex-shrink-0 mt-0.5 text-status-warning-text"
|
|
2982
2986
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -3000,7 +3004,7 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
3000
3004
|
a.length === 0 ? /* @__PURE__ */ K("div", {
|
|
3001
3005
|
className: "rounded-lg border border-border-subtle border-dashed p-8 flex flex-col items-center gap-2 text-center text-text-secondary",
|
|
3002
3006
|
children: [
|
|
3003
|
-
/* @__PURE__ */ G(
|
|
3007
|
+
/* @__PURE__ */ G(H, {
|
|
3004
3008
|
size: 28,
|
|
3005
3009
|
className: "opacity-25"
|
|
3006
3010
|
}),
|
|
@@ -3031,12 +3035,12 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
3031
3035
|
}),
|
|
3032
3036
|
/* @__PURE__ */ G("datalist", {
|
|
3033
3037
|
id: "perm-resource-suggestions",
|
|
3034
|
-
children:
|
|
3038
|
+
children: ut.filter((e) => !a.some((t) => t.resource === e)).map((e) => /* @__PURE__ */ G("option", {
|
|
3035
3039
|
value: e,
|
|
3036
|
-
children:
|
|
3040
|
+
children: lt[e].label
|
|
3037
3041
|
}, e))
|
|
3038
3042
|
}),
|
|
3039
|
-
/* @__PURE__ */ G(
|
|
3043
|
+
/* @__PURE__ */ G(mt, {
|
|
3040
3044
|
level: d,
|
|
3041
3045
|
onChange: f
|
|
3042
3046
|
}),
|
|
@@ -3053,18 +3057,18 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
3053
3057
|
c(!1), u("");
|
|
3054
3058
|
},
|
|
3055
3059
|
className: "p-1.5 rounded text-text-secondary hover:text-text-primary transition-colors",
|
|
3056
|
-
children: /* @__PURE__ */ G(
|
|
3060
|
+
children: /* @__PURE__ */ G(ke, { size: 14 })
|
|
3057
3061
|
})
|
|
3058
3062
|
]
|
|
3059
3063
|
}) : /* @__PURE__ */ K("button", {
|
|
3060
3064
|
type: "button",
|
|
3061
3065
|
onClick: () => c(!0),
|
|
3062
3066
|
className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
3063
|
-
children: [/* @__PURE__ */ G(
|
|
3067
|
+
children: [/* @__PURE__ */ G(V, { size: 14 }), "Add permission"]
|
|
3064
3068
|
}),
|
|
3065
3069
|
/* @__PURE__ */ K("div", {
|
|
3066
3070
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
3067
|
-
children: [/* @__PURE__ */ G(
|
|
3071
|
+
children: [/* @__PURE__ */ G(z, {
|
|
3068
3072
|
size: 14,
|
|
3069
3073
|
className: "flex-shrink-0 mt-0.5"
|
|
3070
3074
|
}), /* @__PURE__ */ K("span", { children: [/* @__PURE__ */ G("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
@@ -3079,10 +3083,10 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
3079
3083
|
onClick: () => void C(),
|
|
3080
3084
|
disabled: p,
|
|
3081
3085
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
3082
|
-
children: [p ? /* @__PURE__ */ G(
|
|
3086
|
+
children: [p ? /* @__PURE__ */ G(B, {
|
|
3083
3087
|
size: 14,
|
|
3084
3088
|
className: "animate-spin"
|
|
3085
|
-
}) : /* @__PURE__ */ G(
|
|
3089
|
+
}) : /* @__PURE__ */ G(H, { size: 14 }), "Save Permissions"]
|
|
3086
3090
|
})]
|
|
3087
3091
|
})
|
|
3088
3092
|
] })
|
|
@@ -3090,6 +3094,6 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
|
3090
3094
|
});
|
|
3091
3095
|
};
|
|
3092
3096
|
//#endregion
|
|
3093
|
-
export {
|
|
3097
|
+
export { He as ApplicationDetailPage };
|
|
3094
3098
|
|
|
3095
3099
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|