@burdenoff/microfe-devportal 2026.624.18 → 2026.624.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/ApplicationDetailPage.js +360 -294
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +189 -191
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.js +306 -196
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/generated/global-operations.js +181 -167
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,27 +4,27 @@ import { LoadingState as n } from "../components/LoadingState.js";
|
|
|
4
4
|
import { EmptyState as r } from "../components/EmptyState.js";
|
|
5
5
|
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetMyPublisherQuery as c, useGetPublisherProductsQuery as l, useGetStoreInstallationsQuery as u, useGetWebhooksQuery as d, useGetWorkspaceInstallationQuery as f, useInstallApplicationMutation as p, useRevokeDelegationMutation as m, useRotateAppSecretMutation as h, useSubmitApplicationMutation as g, useUninstallApplicationMutation as _, useUpdateApplicationMutation as v } from "../../generated/global-operations.js";
|
|
6
6
|
import { PageLayout as y, PageSection as b } from "../components/PageLayout.js";
|
|
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 D, SelectField as re, TextareaField as
|
|
14
|
-
import { ConfirmDialog as
|
|
15
|
-
import { GrantDelegationModal as
|
|
16
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
17
|
-
import { useDevportalPermission as
|
|
18
|
-
import { usePackageUpload as
|
|
7
|
+
import { APP_TYPE_LABELS as x } from "../utils/constants.js";
|
|
8
|
+
import { FeaturedBadge as S, StatusBadge as C, VerifiedBadge as ee } from "../components/StatusBadge.js";
|
|
9
|
+
import { SelectionCheckbox as w } from "../components/SelectionCheckbox.js";
|
|
10
|
+
import { nativeNotify as T } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { NewSecretAlert as te } from "../components/SecretDisplay.js";
|
|
12
|
+
import { DataTable as E, DetailList as ne } from "../components/DataTable.js";
|
|
13
|
+
import { InputField as D, SelectField as re, TextareaField as O } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as k } from "../components/ConfirmDialog.js";
|
|
15
|
+
import { GrantDelegationModal as ie } from "../components/GrantDelegationModal.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
|
|
17
|
+
import { useDevportalPermission as oe } from "../hooks/usePermission.js";
|
|
18
|
+
import { usePackageUpload as se } from "../hooks/usePackageUpload.js";
|
|
19
19
|
import { useCallback as A, useEffect as ce, useMemo as j, useRef as M, useState as N } from "react";
|
|
20
20
|
import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
-
import { AlertCircle as le, AppWindow as F, BarChart3 as I, CheckCircle as L,
|
|
22
|
-
import { useParams as
|
|
21
|
+
import { AlertCircle as le, AppWindow as F, BarChart3 as I, CheckCircle as L, CheckCircle2 as ue, Clock as R, Download as de, Edit as fe, ExternalLink as z, FlaskConical as pe, Info as B, Key as me, Loader2 as V, MoreHorizontal as he, Plus as H, Power as ge, RefreshCw as _e, SendHorizontal as ve, Shield as ye, Store as U, Upload as W, Users as G, Webhook as be, X as xe, XCircle as Se } from "lucide-react";
|
|
22
|
+
import { useParams as Ce } from "react-router-dom";
|
|
23
23
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
24
|
-
import { gql as
|
|
25
|
-
import { useMutation as
|
|
24
|
+
import { gql as we } from "@apollo/client";
|
|
25
|
+
import { useMutation as Y, useQuery as Te } from "@apollo/client/react";
|
|
26
26
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
27
|
-
function
|
|
27
|
+
function Ee(e) {
|
|
28
28
|
return e ? {
|
|
29
29
|
id: e.id,
|
|
30
30
|
name: e.name,
|
|
@@ -79,7 +79,7 @@ function Te(e) {
|
|
|
79
79
|
updatedAt: e.updatedAt
|
|
80
80
|
} : null;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function De(e) {
|
|
83
83
|
return {
|
|
84
84
|
id: e.id,
|
|
85
85
|
applicationId: e.applicationId,
|
|
@@ -103,7 +103,7 @@ function Ee(e) {
|
|
|
103
103
|
updatedAt: e.updatedAt
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Oe(e) {
|
|
107
107
|
return {
|
|
108
108
|
id: e.id,
|
|
109
109
|
applicationId: e.applicationId,
|
|
@@ -119,7 +119,7 @@ function De(e) {
|
|
|
119
119
|
createdAt: e.createdAt
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function ke(e) {
|
|
123
123
|
return {
|
|
124
124
|
id: e.id,
|
|
125
125
|
appId: e.appId,
|
|
@@ -141,7 +141,7 @@ function Oe(e) {
|
|
|
141
141
|
revokedBy: e.revokedBy || void 0
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var Ae = [
|
|
145
145
|
{
|
|
146
146
|
id: "overview",
|
|
147
147
|
label: "Overview",
|
|
@@ -150,17 +150,17 @@ var ke = [
|
|
|
150
150
|
{
|
|
151
151
|
id: "permissions",
|
|
152
152
|
label: "Permissions",
|
|
153
|
-
icon:
|
|
153
|
+
icon: ye
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
id: "webhooks",
|
|
157
157
|
label: "Webhooks",
|
|
158
|
-
icon:
|
|
158
|
+
icon: be
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
id: "delegations",
|
|
162
162
|
label: "Delegations",
|
|
163
|
-
icon:
|
|
163
|
+
icon: G
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
id: "analytics",
|
|
@@ -170,20 +170,20 @@ var ke = [
|
|
|
170
170
|
{
|
|
171
171
|
id: "playground",
|
|
172
172
|
label: "API Playground",
|
|
173
|
-
icon:
|
|
173
|
+
icon: z
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
id: "store-listing",
|
|
177
177
|
label: "Marketplace Listing",
|
|
178
|
-
icon:
|
|
178
|
+
icon: U
|
|
179
179
|
}
|
|
180
|
-
],
|
|
180
|
+
], je = {
|
|
181
181
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
182
182
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
183
183
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
184
184
|
}, X = ({ message: e = "Loading..." }) => /* @__PURE__ */ J("div", {
|
|
185
185
|
className: "flex items-center justify-center gap-3 py-12",
|
|
186
|
-
children: [/* @__PURE__ */ q(
|
|
186
|
+
children: [/* @__PURE__ */ q(V, {
|
|
187
187
|
size: 20,
|
|
188
188
|
className: "animate-spin text-muted-foreground"
|
|
189
189
|
}), /* @__PURE__ */ q("p", {
|
|
@@ -199,14 +199,14 @@ var ke = [
|
|
|
199
199
|
className: "text-sm text-muted-foreground",
|
|
200
200
|
children: e
|
|
201
201
|
})]
|
|
202
|
-
}),
|
|
202
|
+
}), Me = () => {
|
|
203
203
|
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: l } = P(), u = (e, t) => {
|
|
204
204
|
let n = l(e);
|
|
205
205
|
return n === e ? t : n;
|
|
206
|
-
}, { allowed: d } =
|
|
206
|
+
}, { allowed: d } = oe(ae.APP_UPDATE), { allowed: m } = oe(ae.APP_DELETE), { appId: g } = Ce(), [v, b] = N("overview"), [w, E] = N(!1), [ne, D] = N(!1), [re, O] = N(null), [se, ce] = N(!1), { data: j, loading: M, error: I } = s({
|
|
207
207
|
variables: { id: g },
|
|
208
208
|
skip: !g
|
|
209
|
-
}), [L, { loading:
|
|
209
|
+
}), [L, { loading: ue }] = h(), [de, { loading: z }] = a(), [B, { loading: me }] = p(), [he, { loading: H }] = _(), { data: ye, refetch: U } = f({
|
|
210
210
|
variables: {
|
|
211
211
|
applicationId: g,
|
|
212
212
|
workspaceId: c ?? void 0
|
|
@@ -219,39 +219,39 @@ var ke = [
|
|
|
219
219
|
let e = j?.application?.appId;
|
|
220
220
|
if (e) try {
|
|
221
221
|
let t = (await L({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
222
|
-
t &&
|
|
222
|
+
t && O(t), E(!1);
|
|
223
223
|
} catch {}
|
|
224
|
-
}, [j?.application?.appId, L]),
|
|
224
|
+
}, [j?.application?.appId, L]), xe = A(async () => {
|
|
225
225
|
if (g) try {
|
|
226
|
-
await
|
|
226
|
+
await de({ variables: { id: g } }), D(!1), G("/apps");
|
|
227
227
|
} catch {}
|
|
228
228
|
}, [
|
|
229
229
|
g,
|
|
230
|
-
|
|
230
|
+
de,
|
|
231
231
|
G
|
|
232
|
-
]),
|
|
232
|
+
]), K = A(async () => {
|
|
233
233
|
if (!(!g || !c)) try {
|
|
234
|
-
await
|
|
234
|
+
await B({ variables: { input: {
|
|
235
235
|
applicationId: g,
|
|
236
236
|
scope: "WORKSPACE",
|
|
237
237
|
workspaceId: c,
|
|
238
238
|
autoUpdate: !1
|
|
239
|
-
} } }), U(),
|
|
239
|
+
} } }), U(), T("success");
|
|
240
240
|
} catch (e) {
|
|
241
|
-
console.error("[DevPortal] Test in Workspace failed:", e),
|
|
241
|
+
console.error("[DevPortal] Test in Workspace failed:", e), T("error");
|
|
242
242
|
}
|
|
243
243
|
}, [
|
|
244
244
|
g,
|
|
245
245
|
c,
|
|
246
|
-
|
|
246
|
+
B,
|
|
247
247
|
U
|
|
248
248
|
]), we = A(async (e) => {
|
|
249
249
|
try {
|
|
250
|
-
await
|
|
250
|
+
await he({ variables: { id: e } }), U(), T("success");
|
|
251
251
|
} catch {
|
|
252
|
-
|
|
252
|
+
T("error");
|
|
253
253
|
}
|
|
254
|
-
}, [
|
|
254
|
+
}, [he, U]);
|
|
255
255
|
if (M && !j) return /* @__PURE__ */ q(n, { message: u("devportal.loadingApplication", "Loading application...") });
|
|
256
256
|
if (I) return /* @__PURE__ */ q(y, {
|
|
257
257
|
title: u("devportal.error", "Error"),
|
|
@@ -275,7 +275,7 @@ var ke = [
|
|
|
275
275
|
]
|
|
276
276
|
})
|
|
277
277
|
});
|
|
278
|
-
let Y =
|
|
278
|
+
let Y = Ee(j?.application);
|
|
279
279
|
return Y ? /* @__PURE__ */ J(y, {
|
|
280
280
|
title: Y.name,
|
|
281
281
|
description: Y.shortDescription,
|
|
@@ -285,7 +285,7 @@ var ke = [
|
|
|
285
285
|
className: "flex items-center gap-2",
|
|
286
286
|
children: [
|
|
287
287
|
Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && /* @__PURE__ */ J("button", {
|
|
288
|
-
onClick: () =>
|
|
288
|
+
onClick: () => E(!0),
|
|
289
289
|
disabled: !Y.appId,
|
|
290
290
|
title: Y.appId ? u("devportal.rotateSecretHint", "Generate a new client secret") : u("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
|
|
291
291
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -294,7 +294,7 @@ var ke = [
|
|
|
294
294
|
/* @__PURE__ */ J("button", {
|
|
295
295
|
onClick: () => G(`/apps/${Y.id}/versions`),
|
|
296
296
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
297
|
-
children: [/* @__PURE__ */ q(
|
|
297
|
+
children: [/* @__PURE__ */ q(R, { size: 16 }), u("devportal.versions", "Versions")]
|
|
298
298
|
}),
|
|
299
299
|
Y.status !== "PUBLISHED" && /* @__PURE__ */ J("button", {
|
|
300
300
|
onClick: () => G(`/apps/${Y.id}/publish`),
|
|
@@ -306,17 +306,17 @@ var ke = [
|
|
|
306
306
|
disabled: H || !c,
|
|
307
307
|
title: u("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
|
|
308
308
|
className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
|
|
309
|
-
children: [H ? /* @__PURE__ */ q(
|
|
309
|
+
children: [H ? /* @__PURE__ */ q(V, {
|
|
310
310
|
size: 16,
|
|
311
311
|
className: "animate-spin"
|
|
312
|
-
}) : /* @__PURE__ */ q(
|
|
312
|
+
}) : /* @__PURE__ */ q(Se, { size: 16 }), u("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
|
|
313
313
|
}) : /* @__PURE__ */ J("button", {
|
|
314
|
-
onClick: () => void
|
|
315
|
-
disabled:
|
|
314
|
+
onClick: () => void K(),
|
|
315
|
+
disabled: me || !c,
|
|
316
316
|
"aria-disabled": !c,
|
|
317
317
|
title: c ? u("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : u("devportal.noWorkspaceContext", "No workspace context available"),
|
|
318
318
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
319
|
-
children: [
|
|
319
|
+
children: [me ? /* @__PURE__ */ q(V, {
|
|
320
320
|
size: 16,
|
|
321
321
|
className: "animate-spin"
|
|
322
322
|
}) : /* @__PURE__ */ q(pe, { size: 16 }), u("devportal.testInWorkspace", "Test in Workspace")]
|
|
@@ -346,28 +346,28 @@ var ke = [
|
|
|
346
346
|
]
|
|
347
347
|
}),
|
|
348
348
|
children: [
|
|
349
|
-
re && /* @__PURE__ */ q(
|
|
349
|
+
re && /* @__PURE__ */ q(te, {
|
|
350
350
|
title: u("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
351
351
|
secret: re,
|
|
352
352
|
description: u("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
353
|
-
onDismiss: () =>
|
|
353
|
+
onDismiss: () => O(null)
|
|
354
354
|
}),
|
|
355
355
|
/* @__PURE__ */ J("div", {
|
|
356
356
|
className: "flex flex-wrap items-center gap-2",
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */ q(
|
|
358
|
+
/* @__PURE__ */ q(C, {
|
|
359
359
|
status: Y.status,
|
|
360
360
|
type: "app"
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */ q(
|
|
362
|
+
/* @__PURE__ */ q(C, {
|
|
363
363
|
status: Y.visibility,
|
|
364
364
|
type: "app"
|
|
365
365
|
}),
|
|
366
|
-
Y.isVerified && /* @__PURE__ */ q(
|
|
367
|
-
Y.isFeatured && /* @__PURE__ */ q(
|
|
366
|
+
Y.isVerified && /* @__PURE__ */ q(ee, { verified: !0 }),
|
|
367
|
+
Y.isFeatured && /* @__PURE__ */ q(S, {}),
|
|
368
368
|
/* @__PURE__ */ q("span", {
|
|
369
369
|
className: "text-sm text-muted-foreground",
|
|
370
|
-
children:
|
|
370
|
+
children: x[Y.appType] || Y.appType
|
|
371
371
|
})
|
|
372
372
|
]
|
|
373
373
|
}),
|
|
@@ -377,7 +377,7 @@ var ke = [
|
|
|
377
377
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
378
378
|
role: "tablist",
|
|
379
379
|
"aria-label": u("devportal.applicationSections", "Application sections"),
|
|
380
|
-
children:
|
|
380
|
+
children: Ae.filter((e) => !((Y.appType === "NODE" || Y.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
|
|
381
381
|
let n = e.icon;
|
|
382
382
|
return /* @__PURE__ */ J("button", {
|
|
383
383
|
id: `application-tab-${e.id}`,
|
|
@@ -398,38 +398,38 @@ var ke = [
|
|
|
398
398
|
"aria-labelledby": `application-tab-${v}`,
|
|
399
399
|
tabIndex: 0,
|
|
400
400
|
children: [
|
|
401
|
-
v === "overview" && /* @__PURE__ */ q(
|
|
402
|
-
v === "permissions" && /* @__PURE__ */ q(
|
|
403
|
-
v === "webhooks" && /* @__PURE__ */ q(
|
|
401
|
+
v === "overview" && /* @__PURE__ */ q(Ie, { app: Y }),
|
|
402
|
+
v === "permissions" && /* @__PURE__ */ q(et, { app: Y }),
|
|
403
|
+
v === "webhooks" && /* @__PURE__ */ q(Ne, {
|
|
404
404
|
appId: Y.id,
|
|
405
405
|
onNavigate: G
|
|
406
406
|
}),
|
|
407
|
-
v === "delegations" && /* @__PURE__ */ q(
|
|
407
|
+
v === "delegations" && /* @__PURE__ */ q(Pe, {
|
|
408
408
|
authAppId: Y.appId || void 0,
|
|
409
409
|
appName: Y.name,
|
|
410
410
|
onGrantDelegation: () => ce(!0),
|
|
411
411
|
onNavigate: G
|
|
412
412
|
}),
|
|
413
|
-
v === "analytics" && /* @__PURE__ */ q(
|
|
414
|
-
v === "playground" && /* @__PURE__ */ q(
|
|
415
|
-
v === "store-listing" && /* @__PURE__ */ q(
|
|
413
|
+
v === "analytics" && /* @__PURE__ */ q(Fe, { app: Y }),
|
|
414
|
+
v === "playground" && /* @__PURE__ */ q(Ve, { app: Y }),
|
|
415
|
+
v === "store-listing" && /* @__PURE__ */ q(Ze, { app: Y })
|
|
416
416
|
]
|
|
417
417
|
}),
|
|
418
|
-
/* @__PURE__ */ q(
|
|
419
|
-
open:
|
|
420
|
-
onOpenChange:
|
|
418
|
+
/* @__PURE__ */ q(k, {
|
|
419
|
+
open: w,
|
|
420
|
+
onOpenChange: E,
|
|
421
421
|
onConfirm: be,
|
|
422
422
|
title: u("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
423
423
|
description: u("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."),
|
|
424
424
|
confirmLabel: u("devportal.rotateSecret", "Rotate Secret"),
|
|
425
425
|
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
426
426
|
variant: "warning",
|
|
427
|
-
loading:
|
|
427
|
+
loading: ue
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */ q(
|
|
430
|
-
open:
|
|
429
|
+
/* @__PURE__ */ q(k, {
|
|
430
|
+
open: ne,
|
|
431
431
|
onOpenChange: D,
|
|
432
|
-
onConfirm:
|
|
432
|
+
onConfirm: xe,
|
|
433
433
|
title: u("devportal.deactivateApplication", "Deactivate Application"),
|
|
434
434
|
description: u("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."),
|
|
435
435
|
confirmLabel: u("devportal.deactivate", "Deactivate"),
|
|
@@ -437,8 +437,8 @@ var ke = [
|
|
|
437
437
|
variant: "destructive",
|
|
438
438
|
loading: z
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */ q(
|
|
441
|
-
open:
|
|
440
|
+
/* @__PURE__ */ q(ie, {
|
|
441
|
+
open: se,
|
|
442
442
|
onOpenChange: ce,
|
|
443
443
|
appId: Y.appId || "",
|
|
444
444
|
appName: Y.name,
|
|
@@ -458,39 +458,39 @@ var ke = [
|
|
|
458
458
|
description: u("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
459
459
|
})
|
|
460
460
|
});
|
|
461
|
-
},
|
|
461
|
+
}, Ne = ({ appId: e, onNavigate: t }) => {
|
|
462
462
|
let { t: n } = P(), r = (e, t) => {
|
|
463
463
|
let r = n(e);
|
|
464
464
|
return r === e ? t : r;
|
|
465
465
|
}, { data: i, loading: a, error: o } = d({ variables: { applicationId: e } });
|
|
466
|
-
return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(
|
|
466
|
+
return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(Le, {
|
|
467
467
|
appId: e,
|
|
468
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
468
|
+
webhooks: (i?.webhooks ?? []).map(De),
|
|
469
469
|
onNavigate: t
|
|
470
470
|
});
|
|
471
|
-
},
|
|
471
|
+
}, Pe = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
472
472
|
let { t: o } = P(), s = (e, t) => {
|
|
473
473
|
let n = o(e);
|
|
474
474
|
return n === e ? t : n;
|
|
475
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b,
|
|
475
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, x] = N(null), S = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(ke) : [], [e, c]), C = j(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = j(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, te = A((e, t) => {
|
|
476
476
|
y((n) => {
|
|
477
477
|
let r = new Set(n);
|
|
478
478
|
return t ? r.add(e) : r.delete(e), r;
|
|
479
479
|
});
|
|
480
|
-
}, []),
|
|
480
|
+
}, []), E = A((e) => {
|
|
481
481
|
y((t) => {
|
|
482
482
|
let n = new Set(t);
|
|
483
|
-
return
|
|
483
|
+
return C.forEach((t) => {
|
|
484
484
|
e ? n.add(t.id) : n.delete(t.id);
|
|
485
485
|
}), n;
|
|
486
486
|
});
|
|
487
|
-
}, [
|
|
487
|
+
}, [C]), ne = A(() => {
|
|
488
488
|
y(/* @__PURE__ */ new Set());
|
|
489
489
|
}, []), D = A(async (e) => {
|
|
490
490
|
_(!0);
|
|
491
491
|
try {
|
|
492
492
|
let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
493
|
-
|
|
493
|
+
x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
|
|
494
494
|
let n = new Set(t);
|
|
495
495
|
return e.forEach((e) => n.delete(e)), n;
|
|
496
496
|
}), h([]), d();
|
|
@@ -504,26 +504,26 @@ var ke = [
|
|
|
504
504
|
children: /* @__PURE__ */ J("div", {
|
|
505
505
|
className: "flex items-center justify-between gap-3",
|
|
506
506
|
children: [/* @__PURE__ */ q("span", { children: b }), /* @__PURE__ */ q("button", {
|
|
507
|
-
onClick: () =>
|
|
507
|
+
onClick: () => x(null),
|
|
508
508
|
className: "text-status-success-text hover:text-status-success-text",
|
|
509
509
|
children: s("devportal.dismiss", "Dismiss")
|
|
510
510
|
})]
|
|
511
511
|
})
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */ q(
|
|
513
|
+
/* @__PURE__ */ q(Re, {
|
|
514
514
|
appName: t,
|
|
515
|
-
delegations:
|
|
515
|
+
delegations: S,
|
|
516
516
|
onGrantDelegation: n,
|
|
517
517
|
onRevokeDelegation: (e) => h([e]),
|
|
518
518
|
selectedDelegationIds: v,
|
|
519
|
-
onToggleSelectDelegation:
|
|
520
|
-
onToggleAllDelegations:
|
|
521
|
-
onClearSelection:
|
|
522
|
-
onRevokeSelected: () => h(
|
|
523
|
-
allVisibleSelected:
|
|
524
|
-
partiallySelected:
|
|
519
|
+
onToggleSelectDelegation: te,
|
|
520
|
+
onToggleAllDelegations: E,
|
|
521
|
+
onClearSelection: ne,
|
|
522
|
+
onRevokeSelected: () => h(ee.map((e) => e.id)),
|
|
523
|
+
allVisibleSelected: w,
|
|
524
|
+
partiallySelected: T
|
|
525
525
|
}),
|
|
526
|
-
/* @__PURE__ */ q(
|
|
526
|
+
/* @__PURE__ */ q(k, {
|
|
527
527
|
open: p.length > 0,
|
|
528
528
|
onOpenChange: (e) => {
|
|
529
529
|
e || h([]);
|
|
@@ -539,16 +539,16 @@ var ke = [
|
|
|
539
539
|
loading: g
|
|
540
540
|
})
|
|
541
541
|
] }) : /* @__PURE__ */ q(r, {
|
|
542
|
-
icon: /* @__PURE__ */ q(
|
|
542
|
+
icon: /* @__PURE__ */ q(ye, { size: 32 }),
|
|
543
543
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
544
544
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
545
545
|
action: /* @__PURE__ */ J("button", {
|
|
546
546
|
onClick: () => a("/oauth"),
|
|
547
547
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
548
|
-
children: [/* @__PURE__ */ q(
|
|
548
|
+
children: [/* @__PURE__ */ q(z, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
549
549
|
})
|
|
550
550
|
});
|
|
551
|
-
},
|
|
551
|
+
}, Fe = ({ app: e }) => {
|
|
552
552
|
let { t } = P(), n = (e, n) => {
|
|
553
553
|
let r = t(e);
|
|
554
554
|
return r === e ? n : r;
|
|
@@ -601,7 +601,7 @@ var ke = [
|
|
|
601
601
|
]
|
|
602
602
|
}), t.length > 0 && /* @__PURE__ */ q(b, {
|
|
603
603
|
title: n("devportal.installBreakdown", "Install Breakdown"),
|
|
604
|
-
children: /* @__PURE__ */ q(
|
|
604
|
+
children: /* @__PURE__ */ q(E, {
|
|
605
605
|
data: t,
|
|
606
606
|
keyField: "id",
|
|
607
607
|
columns: [
|
|
@@ -634,67 +634,133 @@ var ke = [
|
|
|
634
634
|
})]
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
-
return _ ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : v ? /* @__PURE__ */ q(Z, { message: v.message }) : /* @__PURE__ */ q(
|
|
638
|
-
},
|
|
639
|
-
let { t } = P(),
|
|
640
|
-
let r =
|
|
641
|
-
return r === e ?
|
|
642
|
-
}
|
|
637
|
+
return _ ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : v ? /* @__PURE__ */ q(Z, { message: v.message }) : /* @__PURE__ */ q(ze, { analytics: (g?.applicationAnalytics ?? []).map(Oe) });
|
|
638
|
+
}, Ie = ({ app: t }) => {
|
|
639
|
+
let { t: n } = P(), r = (e, t) => {
|
|
640
|
+
let r = n(e);
|
|
641
|
+
return r === e ? t : r;
|
|
642
|
+
}, { navigate: i, basePath: a } = e(), o = t.appType === "NODE" || t.appType === "WORKFLOW", s = t.status === "DRAFT", c = s ? [
|
|
643
|
+
{
|
|
644
|
+
label: "Store listing info (name, description, category)",
|
|
645
|
+
done: !!(t.shortDescription && t.category),
|
|
646
|
+
path: `${a}/apps/${t.id}?tab=store-listing`,
|
|
647
|
+
cta: "Fill store listing →"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
label: "Privacy policy & terms of service URLs",
|
|
651
|
+
done: !!(t.privacyPolicyUrl && t.termsOfServiceUrl),
|
|
652
|
+
path: `${a}/apps/${t.id}?tab=store-listing`,
|
|
653
|
+
cta: "Add legal links →"
|
|
654
|
+
},
|
|
655
|
+
...o ? [{
|
|
656
|
+
label: t.appType === "WORKFLOW" ? "Create a version (manifest JSON)" : "Create a version (ZIP + manifest JSON)",
|
|
657
|
+
done: (t.versions?.length ?? 0) > 0,
|
|
658
|
+
path: `${a}/apps/${t.id}/versions`,
|
|
659
|
+
cta: "Create version →"
|
|
660
|
+
}] : [],
|
|
661
|
+
{
|
|
662
|
+
label: "Submit for marketplace review",
|
|
663
|
+
done: !1,
|
|
664
|
+
path: `${a}/apps/${t.id}/publish`,
|
|
665
|
+
cta: "Submit for review →"
|
|
666
|
+
}
|
|
667
|
+
] : [], l = c.filter((e) => !e.done)[0];
|
|
643
668
|
return /* @__PURE__ */ J("div", {
|
|
644
669
|
className: "grid gap-6 lg:grid-cols-3",
|
|
645
670
|
children: [/* @__PURE__ */ J("div", {
|
|
646
671
|
className: "lg:col-span-2 space-y-6",
|
|
647
672
|
children: [
|
|
673
|
+
s && l && /* @__PURE__ */ J("div", {
|
|
674
|
+
className: "rounded-lg border border-primary/30 bg-primary/5 p-4 space-y-3",
|
|
675
|
+
children: [/* @__PURE__ */ J("div", {
|
|
676
|
+
className: "flex items-center justify-between",
|
|
677
|
+
children: [/* @__PURE__ */ J("p", {
|
|
678
|
+
className: "font-semibold text-sm text-primary",
|
|
679
|
+
children: [
|
|
680
|
+
r("devportal.setupProgress", "Setup Progress"),
|
|
681
|
+
" — ",
|
|
682
|
+
c.filter((e) => e.done).length,
|
|
683
|
+
"/",
|
|
684
|
+
c.length,
|
|
685
|
+
" complete"
|
|
686
|
+
]
|
|
687
|
+
}), /* @__PURE__ */ q("button", {
|
|
688
|
+
onClick: () => i?.(`${a}/apps/${t.id}/publish`),
|
|
689
|
+
className: "text-xs text-primary hover:underline font-medium",
|
|
690
|
+
children: r("devportal.viewChecklist", "View full checklist →")
|
|
691
|
+
})]
|
|
692
|
+
}), /* @__PURE__ */ q("div", {
|
|
693
|
+
className: "space-y-1.5",
|
|
694
|
+
children: c.map((e, t) => /* @__PURE__ */ J("div", {
|
|
695
|
+
className: "flex items-center gap-2 text-sm",
|
|
696
|
+
children: [
|
|
697
|
+
e.done ? /* @__PURE__ */ q(ue, {
|
|
698
|
+
size: 14,
|
|
699
|
+
className: "text-status-success-text shrink-0"
|
|
700
|
+
}) : /* @__PURE__ */ q("div", { className: "h-3.5 w-3.5 rounded-full border-2 border-muted-foreground/40 shrink-0" }),
|
|
701
|
+
/* @__PURE__ */ q("span", {
|
|
702
|
+
className: e.done ? "line-through text-muted-foreground" : "text-foreground",
|
|
703
|
+
children: e.label
|
|
704
|
+
}),
|
|
705
|
+
!e.done && t === c.indexOf(l) && /* @__PURE__ */ q("button", {
|
|
706
|
+
onClick: () => i?.(e.path),
|
|
707
|
+
className: "ml-auto text-xs text-primary hover:underline font-medium shrink-0",
|
|
708
|
+
children: e.cta
|
|
709
|
+
})
|
|
710
|
+
]
|
|
711
|
+
}, t))
|
|
712
|
+
})]
|
|
713
|
+
}),
|
|
648
714
|
/* @__PURE__ */ J("div", {
|
|
649
715
|
className: "grid gap-4 sm:grid-cols-4",
|
|
650
716
|
children: [
|
|
651
717
|
/* @__PURE__ */ q(Q, {
|
|
652
|
-
label:
|
|
653
|
-
value:
|
|
718
|
+
label: r("devportal.totalInstalls", "Total Installs"),
|
|
719
|
+
value: t.installCount.toLocaleString()
|
|
654
720
|
}),
|
|
655
721
|
/* @__PURE__ */ q(Q, {
|
|
656
|
-
label:
|
|
657
|
-
value:
|
|
722
|
+
label: r("devportal.activeInstalls", "Active Installs"),
|
|
723
|
+
value: t.activeInstallCount.toLocaleString()
|
|
658
724
|
}),
|
|
659
725
|
/* @__PURE__ */ q(Q, {
|
|
660
|
-
label:
|
|
661
|
-
value:
|
|
726
|
+
label: r("devportal.averageRating", "Average Rating"),
|
|
727
|
+
value: t.averageRating ? `${t.averageRating.toFixed(1)} ★` : r("devportal.notAvailable", "N/A")
|
|
662
728
|
}),
|
|
663
729
|
/* @__PURE__ */ q(Q, {
|
|
664
|
-
label:
|
|
665
|
-
value:
|
|
730
|
+
label: r("devportal.reviews", "Reviews"),
|
|
731
|
+
value: t.reviewCount.toString()
|
|
666
732
|
})
|
|
667
733
|
]
|
|
668
734
|
}),
|
|
669
735
|
/* @__PURE__ */ q(b, {
|
|
670
|
-
title:
|
|
736
|
+
title: r("devportal.description", "Description"),
|
|
671
737
|
children: /* @__PURE__ */ q("div", {
|
|
672
738
|
className: "prose prose-sm max-w-none",
|
|
673
739
|
children: /* @__PURE__ */ q("pre", {
|
|
674
740
|
className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
|
|
675
|
-
children:
|
|
741
|
+
children: t.description || r("devportal.noDescriptionProvided", "No description provided.")
|
|
676
742
|
})
|
|
677
743
|
})
|
|
678
744
|
}),
|
|
679
745
|
/* @__PURE__ */ q(b, {
|
|
680
|
-
title:
|
|
746
|
+
title: r("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
681
747
|
children: /* @__PURE__ */ J("div", {
|
|
682
748
|
className: "space-y-3",
|
|
683
|
-
children: [
|
|
749
|
+
children: [t.tags.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
684
750
|
className: "text-xs text-muted-foreground mb-2",
|
|
685
|
-
children:
|
|
751
|
+
children: r("devportal.tags", "Tags")
|
|
686
752
|
}), /* @__PURE__ */ q("div", {
|
|
687
753
|
className: "flex flex-wrap gap-2",
|
|
688
|
-
children:
|
|
754
|
+
children: t.tags.map((e) => /* @__PURE__ */ q("span", {
|
|
689
755
|
className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
|
|
690
756
|
children: e
|
|
691
757
|
}, e))
|
|
692
|
-
})] }),
|
|
758
|
+
})] }), t.keywords.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
693
759
|
className: "text-xs text-muted-foreground mb-2",
|
|
694
|
-
children:
|
|
760
|
+
children: r("devportal.keywords", "Keywords")
|
|
695
761
|
}), /* @__PURE__ */ q("div", {
|
|
696
762
|
className: "flex flex-wrap gap-2",
|
|
697
|
-
children:
|
|
763
|
+
children: t.keywords.map((e) => /* @__PURE__ */ q("span", {
|
|
698
764
|
className: "rounded-full bg-muted px-3 py-1 text-xs",
|
|
699
765
|
children: e
|
|
700
766
|
}, e))
|
|
@@ -705,75 +771,75 @@ var ke = [
|
|
|
705
771
|
}), /* @__PURE__ */ J("div", {
|
|
706
772
|
className: "space-y-6",
|
|
707
773
|
children: [/* @__PURE__ */ q(b, {
|
|
708
|
-
title:
|
|
709
|
-
children: /* @__PURE__ */ q(
|
|
774
|
+
title: r("devportal.details", "Details"),
|
|
775
|
+
children: /* @__PURE__ */ q(ne, { items: [
|
|
710
776
|
{
|
|
711
|
-
label:
|
|
777
|
+
label: r("devportal.appId", "App ID"),
|
|
712
778
|
value: /* @__PURE__ */ q("code", {
|
|
713
779
|
className: "text-xs",
|
|
714
|
-
children:
|
|
780
|
+
children: t.id
|
|
715
781
|
})
|
|
716
782
|
},
|
|
717
783
|
{
|
|
718
|
-
label:
|
|
719
|
-
value:
|
|
784
|
+
label: r("devportal.slug", "Slug"),
|
|
785
|
+
value: t.slug
|
|
720
786
|
},
|
|
721
787
|
{
|
|
722
|
-
label:
|
|
723
|
-
value:
|
|
788
|
+
label: r("devportal.category", "Category"),
|
|
789
|
+
value: t.category || r("devportal.uncategorized", "Uncategorized")
|
|
724
790
|
},
|
|
725
791
|
{
|
|
726
|
-
label:
|
|
727
|
-
value:
|
|
792
|
+
label: r("devportal.pricing", "Pricing"),
|
|
793
|
+
value: t.pricingType || r("devportal.free", "Free")
|
|
728
794
|
},
|
|
729
795
|
{
|
|
730
|
-
label:
|
|
731
|
-
value: new Date(
|
|
796
|
+
label: r("devportal.created", "Created"),
|
|
797
|
+
value: new Date(t.createdAt).toLocaleDateString()
|
|
732
798
|
},
|
|
733
799
|
{
|
|
734
|
-
label:
|
|
735
|
-
value: new Date(
|
|
800
|
+
label: r("devportal.updated", "Updated"),
|
|
801
|
+
value: new Date(t.updatedAt).toLocaleDateString()
|
|
736
802
|
},
|
|
737
803
|
{
|
|
738
|
-
label:
|
|
739
|
-
value:
|
|
804
|
+
label: r("devportal.published", "Published"),
|
|
805
|
+
value: t.publishedAt ? new Date(t.publishedAt).toLocaleDateString() : r("devportal.notPublished", "Not published")
|
|
740
806
|
}
|
|
741
807
|
] })
|
|
742
808
|
}), /* @__PURE__ */ q(b, {
|
|
743
|
-
title:
|
|
809
|
+
title: r("devportal.links", "Links"),
|
|
744
810
|
children: /* @__PURE__ */ J("div", {
|
|
745
811
|
className: "space-y-2",
|
|
746
812
|
children: [
|
|
747
|
-
|
|
748
|
-
label:
|
|
749
|
-
url:
|
|
813
|
+
t.websiteUrl && /* @__PURE__ */ q($, {
|
|
814
|
+
label: r("devportal.website", "Website"),
|
|
815
|
+
url: t.websiteUrl
|
|
750
816
|
}),
|
|
751
|
-
|
|
752
|
-
label:
|
|
753
|
-
url:
|
|
817
|
+
t.documentationUrl && /* @__PURE__ */ q($, {
|
|
818
|
+
label: r("devportal.documentation", "Documentation"),
|
|
819
|
+
url: t.documentationUrl
|
|
754
820
|
}),
|
|
755
|
-
|
|
756
|
-
label:
|
|
757
|
-
url:
|
|
821
|
+
t.supportUrl && /* @__PURE__ */ q($, {
|
|
822
|
+
label: r("devportal.support", "Support"),
|
|
823
|
+
url: t.supportUrl
|
|
758
824
|
}),
|
|
759
|
-
|
|
760
|
-
label:
|
|
761
|
-
url:
|
|
825
|
+
t.githubUrl && /* @__PURE__ */ q($, {
|
|
826
|
+
label: r("devportal.github", "GitHub"),
|
|
827
|
+
url: t.githubUrl
|
|
762
828
|
}),
|
|
763
|
-
|
|
764
|
-
label:
|
|
765
|
-
url:
|
|
829
|
+
t.privacyPolicyUrl && /* @__PURE__ */ q($, {
|
|
830
|
+
label: r("devportal.privacyPolicy", "Privacy Policy"),
|
|
831
|
+
url: t.privacyPolicyUrl
|
|
766
832
|
}),
|
|
767
|
-
|
|
768
|
-
label:
|
|
769
|
-
url:
|
|
833
|
+
t.termsOfServiceUrl && /* @__PURE__ */ q($, {
|
|
834
|
+
label: r("devportal.termsOfService", "Terms of Service"),
|
|
835
|
+
url: t.termsOfServiceUrl
|
|
770
836
|
})
|
|
771
837
|
]
|
|
772
838
|
})
|
|
773
839
|
})]
|
|
774
840
|
})]
|
|
775
841
|
});
|
|
776
|
-
},
|
|
842
|
+
}, Le = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
777
843
|
let { t: i } = P(), a = (e, t) => {
|
|
778
844
|
let n = i(e);
|
|
779
845
|
return n === e ? t : n;
|
|
@@ -794,7 +860,7 @@ var ke = [
|
|
|
794
860
|
}), /* @__PURE__ */ J("button", {
|
|
795
861
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
796
862
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
797
|
-
children: [/* @__PURE__ */ q(
|
|
863
|
+
children: [/* @__PURE__ */ q(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
798
864
|
})]
|
|
799
865
|
}), t.length > 0 ? /* @__PURE__ */ q("div", {
|
|
800
866
|
className: "space-y-4",
|
|
@@ -808,7 +874,7 @@ var ke = [
|
|
|
808
874
|
children: [/* @__PURE__ */ q("h3", {
|
|
809
875
|
className: "font-medium",
|
|
810
876
|
children: t.name
|
|
811
|
-
}), /* @__PURE__ */ q(
|
|
877
|
+
}), /* @__PURE__ */ q(C, {
|
|
812
878
|
status: t.status,
|
|
813
879
|
type: "webhook"
|
|
814
880
|
})]
|
|
@@ -874,17 +940,17 @@ var ke = [
|
|
|
874
940
|
]
|
|
875
941
|
}, t.id))
|
|
876
942
|
}) : /* @__PURE__ */ q(r, {
|
|
877
|
-
icon: /* @__PURE__ */ q(
|
|
943
|
+
icon: /* @__PURE__ */ q(be, { size: 32 }),
|
|
878
944
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
879
945
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
880
946
|
action: /* @__PURE__ */ J("button", {
|
|
881
947
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
882
948
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
883
|
-
children: [/* @__PURE__ */ q(
|
|
949
|
+
children: [/* @__PURE__ */ q(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
884
950
|
})
|
|
885
951
|
})]
|
|
886
952
|
});
|
|
887
|
-
},
|
|
953
|
+
}, Re = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
888
954
|
let { t: p } = P(), m = (e, t) => {
|
|
889
955
|
let n = p(e);
|
|
890
956
|
return n === e ? t : n;
|
|
@@ -920,7 +986,7 @@ var ke = [
|
|
|
920
986
|
})] }), /* @__PURE__ */ J("button", {
|
|
921
987
|
onClick: i,
|
|
922
988
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
923
|
-
children: [/* @__PURE__ */ q(
|
|
989
|
+
children: [/* @__PURE__ */ q(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
924
990
|
})]
|
|
925
991
|
}),
|
|
926
992
|
h.length > 0 && /* @__PURE__ */ q("div", {
|
|
@@ -931,7 +997,7 @@ var ke = [
|
|
|
931
997
|
className: "flex flex-wrap items-center gap-3",
|
|
932
998
|
children: [/* @__PURE__ */ J("div", {
|
|
933
999
|
className: "flex items-center gap-2",
|
|
934
|
-
children: [/* @__PURE__ */ q(
|
|
1000
|
+
children: [/* @__PURE__ */ q(w, {
|
|
935
1001
|
checked: d,
|
|
936
1002
|
indeterminate: f,
|
|
937
1003
|
onChange: c,
|
|
@@ -974,7 +1040,7 @@ var ke = [
|
|
|
974
1040
|
className: "flex items-start gap-3",
|
|
975
1041
|
children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
|
|
976
1042
|
onClick: (e) => e.stopPropagation(),
|
|
977
|
-
children: /* @__PURE__ */ q(
|
|
1043
|
+
children: /* @__PURE__ */ q(w, {
|
|
978
1044
|
checked: o.has(e.id),
|
|
979
1045
|
onChange: (t) => s(e.id, t),
|
|
980
1046
|
ariaLabel: `Select delegation ${e.id}`,
|
|
@@ -986,7 +1052,7 @@ var ke = [
|
|
|
986
1052
|
className: "font-medium",
|
|
987
1053
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
988
1054
|
}), /* @__PURE__ */ q("span", {
|
|
989
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1055
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", je[e.status]),
|
|
990
1056
|
children: e.status
|
|
991
1057
|
})]
|
|
992
1058
|
}), /* @__PURE__ */ J("p", {
|
|
@@ -1004,7 +1070,7 @@ var ke = [
|
|
|
1004
1070
|
}), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
|
|
1005
1071
|
onClick: () => a(e.id),
|
|
1006
1072
|
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",
|
|
1007
|
-
children: [/* @__PURE__ */ q(
|
|
1073
|
+
children: [/* @__PURE__ */ q(Se, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
1008
1074
|
})]
|
|
1009
1075
|
}),
|
|
1010
1076
|
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
@@ -1033,7 +1099,7 @@ var ke = [
|
|
|
1033
1099
|
e.expiresAt && /* @__PURE__ */ J("span", {
|
|
1034
1100
|
className: "flex items-center gap-1",
|
|
1035
1101
|
children: [
|
|
1036
|
-
/* @__PURE__ */ q(
|
|
1102
|
+
/* @__PURE__ */ q(R, { size: 12 }),
|
|
1037
1103
|
m("devportal.expires", "Expires"),
|
|
1038
1104
|
" ",
|
|
1039
1105
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1049,7 +1115,7 @@ var ke = [
|
|
|
1049
1115
|
e.revokedAt && /* @__PURE__ */ J("span", {
|
|
1050
1116
|
className: "flex items-center gap-1",
|
|
1051
1117
|
children: [
|
|
1052
|
-
/* @__PURE__ */ q(
|
|
1118
|
+
/* @__PURE__ */ q(Se, {
|
|
1053
1119
|
size: 12,
|
|
1054
1120
|
className: "text-status-error-text"
|
|
1055
1121
|
}),
|
|
@@ -1063,18 +1129,18 @@ var ke = [
|
|
|
1063
1129
|
]
|
|
1064
1130
|
}, e.id))
|
|
1065
1131
|
}) : /* @__PURE__ */ q(r, {
|
|
1066
|
-
icon: /* @__PURE__ */ q(
|
|
1132
|
+
icon: /* @__PURE__ */ q(G, { size: 32 }),
|
|
1067
1133
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1068
1134
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1069
1135
|
action: /* @__PURE__ */ J("button", {
|
|
1070
1136
|
onClick: i,
|
|
1071
1137
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
1072
|
-
children: [/* @__PURE__ */ q(
|
|
1138
|
+
children: [/* @__PURE__ */ q(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1073
1139
|
})
|
|
1074
1140
|
})
|
|
1075
1141
|
]
|
|
1076
1142
|
});
|
|
1077
|
-
},
|
|
1143
|
+
}, ze = ({ analytics: e }) => {
|
|
1078
1144
|
let { t } = P(), n = (e, n) => {
|
|
1079
1145
|
let r = t(e);
|
|
1080
1146
|
return r === e ? n : r;
|
|
@@ -1107,7 +1173,7 @@ var ke = [
|
|
|
1107
1173
|
]
|
|
1108
1174
|
}), /* @__PURE__ */ q(b, {
|
|
1109
1175
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1110
|
-
children: e.length > 0 ? /* @__PURE__ */ q(
|
|
1176
|
+
children: e.length > 0 ? /* @__PURE__ */ q(E, {
|
|
1111
1177
|
data: e,
|
|
1112
1178
|
keyField: "id",
|
|
1113
1179
|
columns: [
|
|
@@ -1154,11 +1220,11 @@ var ke = [
|
|
|
1154
1220
|
})
|
|
1155
1221
|
})]
|
|
1156
1222
|
});
|
|
1157
|
-
},
|
|
1223
|
+
}, Be = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Ve = ({ app: t }) => {
|
|
1158
1224
|
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
|
|
1159
1225
|
let n = a(e);
|
|
1160
1226
|
return n === e ? t : n;
|
|
1161
|
-
}, [s, c] = N(
|
|
1227
|
+
}, [s, c] = N(Be), [l, u] = N("{}"), [d, f] = N(""), [p, m] = N(!1), [h, g] = N(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = N(i || ""), [y, b] = N(!1), x = A(async () => {
|
|
1162
1228
|
m(!0), f("");
|
|
1163
1229
|
try {
|
|
1164
1230
|
let e = {};
|
|
@@ -1189,7 +1255,7 @@ var ke = [
|
|
|
1189
1255
|
l,
|
|
1190
1256
|
h,
|
|
1191
1257
|
_
|
|
1192
|
-
]),
|
|
1258
|
+
]), S = A(() => {
|
|
1193
1259
|
i && v(i), b(!0);
|
|
1194
1260
|
}, [i]);
|
|
1195
1261
|
return /* @__PURE__ */ J("div", {
|
|
@@ -1216,7 +1282,7 @@ var ke = [
|
|
|
1216
1282
|
})
|
|
1217
1283
|
]
|
|
1218
1284
|
})] }), /* @__PURE__ */ J("button", {
|
|
1219
|
-
onClick:
|
|
1285
|
+
onClick: S,
|
|
1220
1286
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1221
1287
|
children: [/* @__PURE__ */ q(me, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1222
1288
|
})]
|
|
@@ -1316,13 +1382,13 @@ var ke = [
|
|
|
1316
1382
|
})] })]
|
|
1317
1383
|
}),
|
|
1318
1384
|
/* @__PURE__ */ J("button", {
|
|
1319
|
-
onClick:
|
|
1385
|
+
onClick: x,
|
|
1320
1386
|
disabled: p,
|
|
1321
1387
|
className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
1322
|
-
children: [p ? /* @__PURE__ */ q(
|
|
1388
|
+
children: [p ? /* @__PURE__ */ q(V, {
|
|
1323
1389
|
size: 16,
|
|
1324
1390
|
className: "animate-spin"
|
|
1325
|
-
}) : /* @__PURE__ */ q(
|
|
1391
|
+
}) : /* @__PURE__ */ q(z, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1326
1392
|
}),
|
|
1327
1393
|
d && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1328
1394
|
className: "block text-sm font-medium mb-1",
|
|
@@ -1333,7 +1399,7 @@ var ke = [
|
|
|
1333
1399
|
})] })
|
|
1334
1400
|
]
|
|
1335
1401
|
});
|
|
1336
|
-
},
|
|
1402
|
+
}, He = ({ 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 }) => {
|
|
1337
1403
|
let d = M(null), f = A(async (e) => {
|
|
1338
1404
|
try {
|
|
1339
1405
|
r((await s(e)).downloadUrl);
|
|
@@ -1354,12 +1420,12 @@ var ke = [
|
|
|
1354
1420
|
src: n,
|
|
1355
1421
|
alt: e,
|
|
1356
1422
|
className: "w-full h-full object-cover"
|
|
1357
|
-
}) : /* @__PURE__ */ q(
|
|
1423
|
+
}) : /* @__PURE__ */ q(W, {
|
|
1358
1424
|
size: 18,
|
|
1359
1425
|
className: "text-text-secondary opacity-40"
|
|
1360
1426
|
}), c && /* @__PURE__ */ J("div", {
|
|
1361
1427
|
className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
|
|
1362
|
-
children: [/* @__PURE__ */ q(
|
|
1428
|
+
children: [/* @__PURE__ */ q(V, {
|
|
1363
1429
|
size: 14,
|
|
1364
1430
|
className: "animate-spin text-white"
|
|
1365
1431
|
}), /* @__PURE__ */ J("span", {
|
|
@@ -1392,7 +1458,7 @@ var ke = [
|
|
|
1392
1458
|
disabled: c,
|
|
1393
1459
|
onClick: () => d.current?.click(),
|
|
1394
1460
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
1395
|
-
children: [/* @__PURE__ */ q(
|
|
1461
|
+
children: [/* @__PURE__ */ q(W, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
1396
1462
|
}),
|
|
1397
1463
|
u && /* @__PURE__ */ q("p", {
|
|
1398
1464
|
className: "text-xs text-status-error-text",
|
|
@@ -1407,7 +1473,7 @@ var ke = [
|
|
|
1407
1473
|
})
|
|
1408
1474
|
]
|
|
1409
1475
|
});
|
|
1410
|
-
},
|
|
1476
|
+
}, Ue = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
1411
1477
|
let s = M(null), c = A(async (t) => {
|
|
1412
1478
|
try {
|
|
1413
1479
|
let i = await r(t);
|
|
@@ -1439,20 +1505,20 @@ var ke = [
|
|
|
1439
1505
|
type: "button",
|
|
1440
1506
|
onClick: () => l(t),
|
|
1441
1507
|
className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1442
|
-
children: /* @__PURE__ */ q(
|
|
1508
|
+
children: /* @__PURE__ */ q(xe, { size: 12 })
|
|
1443
1509
|
})]
|
|
1444
1510
|
}, t)), /* @__PURE__ */ q("button", {
|
|
1445
1511
|
type: "button",
|
|
1446
1512
|
disabled: i,
|
|
1447
1513
|
onClick: () => s.current?.click(),
|
|
1448
1514
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
1449
|
-
children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
1515
|
+
children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(V, {
|
|
1450
1516
|
size: 18,
|
|
1451
1517
|
className: "animate-spin text-primary"
|
|
1452
1518
|
}), /* @__PURE__ */ J("span", {
|
|
1453
1519
|
className: "text-xs",
|
|
1454
1520
|
children: [a, "%"]
|
|
1455
|
-
})] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
1521
|
+
})] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(W, { size: 18 }), /* @__PURE__ */ q("span", {
|
|
1456
1522
|
className: "text-xs",
|
|
1457
1523
|
children: "Add screenshot"
|
|
1458
1524
|
})] })
|
|
@@ -1474,13 +1540,13 @@ var ke = [
|
|
|
1474
1540
|
})
|
|
1475
1541
|
]
|
|
1476
1542
|
});
|
|
1477
|
-
},
|
|
1543
|
+
}, We = new Set(["workflow", "template"]), Ge = [{
|
|
1478
1544
|
value: "FREE",
|
|
1479
1545
|
label: "Free"
|
|
1480
1546
|
}, {
|
|
1481
1547
|
value: "PAID",
|
|
1482
1548
|
label: "Paid"
|
|
1483
|
-
}],
|
|
1549
|
+
}], Ke = [
|
|
1484
1550
|
{
|
|
1485
1551
|
value: "agent",
|
|
1486
1552
|
label: "Agent"
|
|
@@ -1550,7 +1616,7 @@ var ke = [
|
|
|
1550
1616
|
label: "Component"
|
|
1551
1617
|
}
|
|
1552
1618
|
];
|
|
1553
|
-
function
|
|
1619
|
+
function qe(e) {
|
|
1554
1620
|
let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = e.pricingDetails ?? {}, s = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
|
|
1555
1621
|
return {
|
|
1556
1622
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -1579,41 +1645,41 @@ function Ke(e) {
|
|
|
1579
1645
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
1580
1646
|
};
|
|
1581
1647
|
}
|
|
1582
|
-
var
|
|
1648
|
+
var Je = we`
|
|
1583
1649
|
query MyPublisherForListing {
|
|
1584
1650
|
myPublisher { id }
|
|
1585
1651
|
}
|
|
1586
|
-
`,
|
|
1652
|
+
`, Ye = we`
|
|
1587
1653
|
query PublisherProductsForListing($publisherId: String!) {
|
|
1588
1654
|
products(filter: { publisherId: $publisherId }) { id productId }
|
|
1589
1655
|
}
|
|
1590
|
-
`,
|
|
1656
|
+
`, Xe = we`
|
|
1591
1657
|
mutation UpdateStoreProduct($input: UpdateProductInput!) {
|
|
1592
1658
|
updateProduct(input: $input) { id name description }
|
|
1593
1659
|
}
|
|
1594
|
-
`,
|
|
1660
|
+
`, Ze = ({ app: n }) => {
|
|
1595
1661
|
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = P(), u = (e, t) => {
|
|
1596
1662
|
let n = l(e);
|
|
1597
1663
|
return n === e ? t : n;
|
|
1598
|
-
}, [d, f] = N(() =>
|
|
1664
|
+
}, [d, f] = N(() => qe(n)), [p, m] = N(!1), [h, _] = N(!1), y = M(n);
|
|
1599
1665
|
y.current = n;
|
|
1600
|
-
let { data:
|
|
1601
|
-
variables: { publisherId:
|
|
1666
|
+
let { data: x } = Te(Je, { fetchPolicy: "cache-first" }), S = x?.myPublisher?.id ?? null, { data: C } = Te(Ye, {
|
|
1667
|
+
variables: { publisherId: S ?? "" },
|
|
1602
1668
|
fetchPolicy: "cache-first",
|
|
1603
|
-
skip: !
|
|
1604
|
-
}),
|
|
1669
|
+
skip: !S
|
|
1670
|
+
}), ee = C?.products?.find((e) => e.productId === n.id)?.id ?? null, [w] = Y(Xe), [te] = v(), [E, { loading: ne }] = g();
|
|
1605
1671
|
ce(() => {
|
|
1606
|
-
f(
|
|
1672
|
+
f(qe(y.current));
|
|
1607
1673
|
}, [n.id]);
|
|
1608
|
-
let
|
|
1674
|
+
let k = (e, t) => {
|
|
1609
1675
|
f((n) => ({
|
|
1610
1676
|
...n,
|
|
1611
1677
|
[e]: t
|
|
1612
1678
|
}));
|
|
1613
|
-
},
|
|
1679
|
+
}, ie = async () => {
|
|
1614
1680
|
m(!0);
|
|
1615
1681
|
try {
|
|
1616
|
-
let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r =
|
|
1682
|
+
let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = We.has(d.manifestItemType), i = n.manifest ?? {}, a = {
|
|
1617
1683
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1618
1684
|
itemType: d.manifestItemType || void 0,
|
|
1619
1685
|
identity: {
|
|
@@ -1631,7 +1697,7 @@ var qe = Ce`
|
|
|
1631
1697
|
let e = parseFloat(d.price);
|
|
1632
1698
|
isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
|
|
1633
1699
|
}
|
|
1634
|
-
await
|
|
1700
|
+
await te({ variables: {
|
|
1635
1701
|
id: n.id,
|
|
1636
1702
|
input: {
|
|
1637
1703
|
iconUrl: d.iconUrl || null,
|
|
@@ -1650,8 +1716,8 @@ var qe = Ce`
|
|
|
1650
1716
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1651
1717
|
manifest: a
|
|
1652
1718
|
}
|
|
1653
|
-
} }),
|
|
1654
|
-
id:
|
|
1719
|
+
} }), ee && await w({ variables: { input: {
|
|
1720
|
+
id: ee,
|
|
1655
1721
|
name: n.name,
|
|
1656
1722
|
description: d.shortDescription || void 0,
|
|
1657
1723
|
longDescription: d.description || void 0,
|
|
@@ -1659,19 +1725,19 @@ var qe = Ce`
|
|
|
1659
1725
|
screenshots: e.length > 0 ? e : void 0,
|
|
1660
1726
|
documentationUrl: d.documentationUrl || void 0,
|
|
1661
1727
|
category: n.category || void 0
|
|
1662
|
-
} } }),
|
|
1728
|
+
} } }), T("success");
|
|
1663
1729
|
} catch {
|
|
1664
|
-
|
|
1730
|
+
T("error");
|
|
1665
1731
|
} finally {
|
|
1666
1732
|
m(!1);
|
|
1667
1733
|
}
|
|
1668
|
-
},
|
|
1734
|
+
}, ae = async () => {
|
|
1669
1735
|
try {
|
|
1670
|
-
await
|
|
1736
|
+
await E({ variables: { id: n.id } }), T("success");
|
|
1671
1737
|
} catch {
|
|
1672
|
-
|
|
1738
|
+
T("error");
|
|
1673
1739
|
}
|
|
1674
|
-
},
|
|
1740
|
+
}, oe = M(null), j = M(null), { upload: F, uploading: I, progress: ue, error: fe } = se(r, i, a, o), { upload: z, uploading: pe, progress: me, error: he } = se(r, i, a, o, "/DevPortal/Assets"), { upload: H, uploading: ge, progress: _e, error: ye } = se(r, i, a, o, "/DevPortal/Assets"), { upload: G, uploading: be, progress: xe, error: Se } = se(r, i, a, o, "/DevPortal/Assets"), Ce = A(async (e) => {
|
|
1675
1741
|
let t = e.target.files?.[0];
|
|
1676
1742
|
if (t) {
|
|
1677
1743
|
e.target.value = "";
|
|
@@ -1683,7 +1749,7 @@ var qe = Ce`
|
|
|
1683
1749
|
}));
|
|
1684
1750
|
} catch {}
|
|
1685
1751
|
}
|
|
1686
|
-
}, [F]),
|
|
1752
|
+
}, [F]), we = A(async (e) => {
|
|
1687
1753
|
e.preventDefault(), _(!1);
|
|
1688
1754
|
let t = e.dataTransfer.files?.[0];
|
|
1689
1755
|
if (t) try {
|
|
@@ -1713,7 +1779,7 @@ var qe = Ce`
|
|
|
1713
1779
|
} catch {}
|
|
1714
1780
|
}, n.readAsText(t), e.target.value = "";
|
|
1715
1781
|
}, []), De = A(() => {
|
|
1716
|
-
let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t =
|
|
1782
|
+
let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = We.has(d.manifestItemType), r = {
|
|
1717
1783
|
manifestVersion: "1.0",
|
|
1718
1784
|
itemType: d.manifestItemType || void 0,
|
|
1719
1785
|
identity: {
|
|
@@ -1728,9 +1794,9 @@ var qe = Ce`
|
|
|
1728
1794
|
compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
|
|
1729
1795
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1730
1796
|
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1731
|
-
}, [n.slug, d]), Oe =
|
|
1797
|
+
}, [n.slug, d]), Oe = We.has(d.manifestItemType), ke = d.manifestInstallType === "builtin", Ae = d.pricingType !== "FREE", je = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1732
1798
|
n.status;
|
|
1733
|
-
let
|
|
1799
|
+
let X = n.status === "SUBMITTED", Z = n.status === "PUBLISHED", Me = n.appType === "NODE" || n.appType === "WORKFLOW", Ne = [
|
|
1734
1800
|
{
|
|
1735
1801
|
label: "Short description",
|
|
1736
1802
|
done: !!d.shortDescription.trim()
|
|
@@ -1765,7 +1831,7 @@ var qe = Ce`
|
|
|
1765
1831
|
children: [
|
|
1766
1832
|
/* @__PURE__ */ J("li", {
|
|
1767
1833
|
className: "flex items-start gap-2",
|
|
1768
|
-
children: [/* @__PURE__ */ q(
|
|
1834
|
+
children: [/* @__PURE__ */ q(U, {
|
|
1769
1835
|
size: 14,
|
|
1770
1836
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1771
1837
|
}), /* @__PURE__ */ J("span", { children: [
|
|
@@ -1776,7 +1842,7 @@ var qe = Ce`
|
|
|
1776
1842
|
}),
|
|
1777
1843
|
Me && /* @__PURE__ */ J("li", {
|
|
1778
1844
|
className: "flex items-start gap-2",
|
|
1779
|
-
children: [/* @__PURE__ */ q(
|
|
1845
|
+
children: [/* @__PURE__ */ q(R, {
|
|
1780
1846
|
size: 14,
|
|
1781
1847
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1782
1848
|
}), /* @__PURE__ */ J("span", { children: [
|
|
@@ -1801,7 +1867,7 @@ var qe = Ce`
|
|
|
1801
1867
|
]
|
|
1802
1868
|
})]
|
|
1803
1869
|
}),
|
|
1804
|
-
!
|
|
1870
|
+
!Z && /* @__PURE__ */ J("div", {
|
|
1805
1871
|
className: "rounded-lg border bg-card p-4 space-y-3",
|
|
1806
1872
|
children: [/* @__PURE__ */ J("div", {
|
|
1807
1873
|
className: "flex items-center justify-between",
|
|
@@ -1840,7 +1906,7 @@ var qe = Ce`
|
|
|
1840
1906
|
}, e.label))
|
|
1841
1907
|
})]
|
|
1842
1908
|
}),
|
|
1843
|
-
|
|
1909
|
+
Z ? /* @__PURE__ */ J("div", {
|
|
1844
1910
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1845
1911
|
children: [/* @__PURE__ */ q(L, {
|
|
1846
1912
|
size: 16,
|
|
@@ -1859,9 +1925,9 @@ var qe = Ce`
|
|
|
1859
1925
|
]
|
|
1860
1926
|
})]
|
|
1861
1927
|
})]
|
|
1862
|
-
}) :
|
|
1928
|
+
}) : X ? /* @__PURE__ */ J("div", {
|
|
1863
1929
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
|
|
1864
|
-
children: [/* @__PURE__ */ q(
|
|
1930
|
+
children: [/* @__PURE__ */ q(R, {
|
|
1865
1931
|
size: 16,
|
|
1866
1932
|
className: "text-primary mt-0.5 shrink-0"
|
|
1867
1933
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -1899,7 +1965,7 @@ var qe = Ce`
|
|
|
1899
1965
|
}),
|
|
1900
1966
|
Me ? /* @__PURE__ */ J("div", {
|
|
1901
1967
|
className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
|
|
1902
|
-
children: [/* @__PURE__ */ q(
|
|
1968
|
+
children: [/* @__PURE__ */ q(B, {
|
|
1903
1969
|
size: 16,
|
|
1904
1970
|
className: "shrink-0 mt-0.5 text-muted-foreground"
|
|
1905
1971
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -1923,9 +1989,9 @@ var qe = Ce`
|
|
|
1923
1989
|
value: d.manifestItemType,
|
|
1924
1990
|
onChange: (e) => {
|
|
1925
1991
|
let t = e.target.value;
|
|
1926
|
-
|
|
1992
|
+
k("manifestItemType", t), We.has(t) ? k("manifestInstallType", "json") : d.manifestInstallType === "json" && k("manifestInstallType", "zip");
|
|
1927
1993
|
},
|
|
1928
|
-
options:
|
|
1994
|
+
options: Ke,
|
|
1929
1995
|
placeholder: u("devportal.selectItemType", "Select item type…"),
|
|
1930
1996
|
hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
|
|
1931
1997
|
}),
|
|
@@ -1934,20 +2000,20 @@ var qe = Ce`
|
|
|
1934
2000
|
children: [/* @__PURE__ */ q(D, {
|
|
1935
2001
|
label: u("devportal.manifestDisplayName", "Display Name"),
|
|
1936
2002
|
value: d.manifestDisplayName,
|
|
1937
|
-
onChange: (e) =>
|
|
2003
|
+
onChange: (e) => k("manifestDisplayName", e.target.value),
|
|
1938
2004
|
placeholder: "My Awesome Node"
|
|
1939
2005
|
}), /* @__PURE__ */ q(D, {
|
|
1940
2006
|
label: u("devportal.manifestVersion", "Version"),
|
|
1941
2007
|
value: d.manifestVersion,
|
|
1942
|
-
onChange: (e) =>
|
|
2008
|
+
onChange: (e) => k("manifestVersion", e.target.value),
|
|
1943
2009
|
placeholder: "1.0.0",
|
|
1944
2010
|
hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1945
2011
|
})]
|
|
1946
2012
|
}),
|
|
1947
|
-
Oe && /* @__PURE__ */ q(
|
|
2013
|
+
Oe && /* @__PURE__ */ q(O, {
|
|
1948
2014
|
label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1949
2015
|
value: d.manifestJsonContent,
|
|
1950
|
-
onChange: (e) =>
|
|
2016
|
+
onChange: (e) => k("manifestJsonContent", e.target.value),
|
|
1951
2017
|
rows: 12,
|
|
1952
2018
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1953
2019
|
hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
@@ -1965,7 +2031,7 @@ var qe = Ce`
|
|
|
1965
2031
|
children: [/* @__PURE__ */ q("input", {
|
|
1966
2032
|
type: "checkbox",
|
|
1967
2033
|
checked: ke,
|
|
1968
|
-
onChange: (e) =>
|
|
2034
|
+
onChange: (e) => k("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1969
2035
|
className: "h-4 w-4 rounded border-border accent-primary"
|
|
1970
2036
|
}), /* @__PURE__ */ q("span", {
|
|
1971
2037
|
className: "text-text-secondary",
|
|
@@ -1976,7 +2042,7 @@ var qe = Ce`
|
|
|
1976
2042
|
!ke && /* @__PURE__ */ J(K, { children: [
|
|
1977
2043
|
/* @__PURE__ */ J("div", {
|
|
1978
2044
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1979
|
-
children: [/* @__PURE__ */ q(
|
|
2045
|
+
children: [/* @__PURE__ */ q(B, {
|
|
1980
2046
|
size: 15,
|
|
1981
2047
|
className: "mt-0.5 shrink-0"
|
|
1982
2048
|
}), /* @__PURE__ */ J("span", { children: [
|
|
@@ -1993,7 +2059,7 @@ var qe = Ce`
|
|
|
1993
2059
|
e.preventDefault(), _(!0);
|
|
1994
2060
|
},
|
|
1995
2061
|
onDragLeave: () => _(!1),
|
|
1996
|
-
onDrop: (e) => void
|
|
2062
|
+
onDrop: (e) => void we(e),
|
|
1997
2063
|
onClick: () => !I && j.current?.click(),
|
|
1998
2064
|
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", h ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", I && "pointer-events-none opacity-75"),
|
|
1999
2065
|
children: [/* @__PURE__ */ q("input", {
|
|
@@ -2003,7 +2069,7 @@ var qe = Ce`
|
|
|
2003
2069
|
className: "hidden",
|
|
2004
2070
|
onChange: (e) => void Ce(e)
|
|
2005
2071
|
}), I ? /* @__PURE__ */ J(K, { children: [
|
|
2006
|
-
/* @__PURE__ */ q(
|
|
2072
|
+
/* @__PURE__ */ q(V, {
|
|
2007
2073
|
size: 28,
|
|
2008
2074
|
className: "animate-spin text-primary"
|
|
2009
2075
|
}),
|
|
@@ -2012,7 +2078,7 @@ var qe = Ce`
|
|
|
2012
2078
|
children: [
|
|
2013
2079
|
u("devportal.uploading", "Uploading…"),
|
|
2014
2080
|
" ",
|
|
2015
|
-
|
|
2081
|
+
ue,
|
|
2016
2082
|
"%"
|
|
2017
2083
|
]
|
|
2018
2084
|
}), /* @__PURE__ */ q("p", {
|
|
@@ -2023,19 +2089,19 @@ var qe = Ce`
|
|
|
2023
2089
|
className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
|
|
2024
2090
|
children: /* @__PURE__ */ q("div", {
|
|
2025
2091
|
className: "h-full bg-primary transition-all",
|
|
2026
|
-
style: { width: `${
|
|
2092
|
+
style: { width: `${ue}%` }
|
|
2027
2093
|
})
|
|
2028
2094
|
})
|
|
2029
|
-
] }) :
|
|
2095
|
+
] }) : je ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(L, {
|
|
2030
2096
|
size: 28,
|
|
2031
2097
|
className: "text-status-success-text"
|
|
2032
2098
|
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
2033
2099
|
className: "text-sm font-medium",
|
|
2034
|
-
children:
|
|
2100
|
+
children: je
|
|
2035
2101
|
}), /* @__PURE__ */ q("p", {
|
|
2036
2102
|
className: "text-xs text-text-secondary mt-0.5",
|
|
2037
2103
|
children: u("devportal.clickToReplace", "Click or drag to replace")
|
|
2038
|
-
})] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2104
|
+
})] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(W, {
|
|
2039
2105
|
size: 28,
|
|
2040
2106
|
className: "text-text-secondary"
|
|
2041
2107
|
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
@@ -2046,14 +2112,14 @@ var qe = Ce`
|
|
|
2046
2112
|
children: u("devportal.orClickToBrowse", "or click to browse")
|
|
2047
2113
|
})] })] })]
|
|
2048
2114
|
}),
|
|
2049
|
-
|
|
2115
|
+
fe && /* @__PURE__ */ q("p", {
|
|
2050
2116
|
className: "text-xs text-status-error-text",
|
|
2051
|
-
children:
|
|
2117
|
+
children: fe
|
|
2052
2118
|
})
|
|
2053
2119
|
] }),
|
|
2054
2120
|
ke && /* @__PURE__ */ J("div", {
|
|
2055
2121
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
2056
|
-
children: [/* @__PURE__ */ q(
|
|
2122
|
+
children: [/* @__PURE__ */ q(B, {
|
|
2057
2123
|
size: 15,
|
|
2058
2124
|
className: "mt-0.5 shrink-0"
|
|
2059
2125
|
}), /* @__PURE__ */ q("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
@@ -2064,7 +2130,7 @@ var qe = Ce`
|
|
|
2064
2130
|
className: "flex flex-wrap items-center gap-2 border-t pt-4",
|
|
2065
2131
|
children: [
|
|
2066
2132
|
/* @__PURE__ */ q("input", {
|
|
2067
|
-
ref:
|
|
2133
|
+
ref: oe,
|
|
2068
2134
|
type: "file",
|
|
2069
2135
|
accept: ".json,application/json",
|
|
2070
2136
|
className: "hidden",
|
|
@@ -2076,9 +2142,9 @@ var qe = Ce`
|
|
|
2076
2142
|
}),
|
|
2077
2143
|
/* @__PURE__ */ J("button", {
|
|
2078
2144
|
type: "button",
|
|
2079
|
-
onClick: () =>
|
|
2145
|
+
onClick: () => oe.current?.click(),
|
|
2080
2146
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2081
|
-
children: [/* @__PURE__ */ q(
|
|
2147
|
+
children: [/* @__PURE__ */ q(W, { size: 12 }), u("devportal.importManifest", "Import")]
|
|
2082
2148
|
}),
|
|
2083
2149
|
/* @__PURE__ */ J("button", {
|
|
2084
2150
|
type: "button",
|
|
@@ -2103,53 +2169,53 @@ var qe = Ce`
|
|
|
2103
2169
|
children: [
|
|
2104
2170
|
/* @__PURE__ */ J("div", {
|
|
2105
2171
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2106
|
-
children: [/* @__PURE__ */ q(
|
|
2172
|
+
children: [/* @__PURE__ */ q(He, {
|
|
2107
2173
|
label: u("devportal.iconUrl", "Icon"),
|
|
2108
2174
|
value: d.iconUrl,
|
|
2109
|
-
onChange: (e) =>
|
|
2175
|
+
onChange: (e) => k("iconUrl", e),
|
|
2110
2176
|
hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
2111
2177
|
aspectClass: "aspect-square",
|
|
2112
|
-
upload:
|
|
2113
|
-
uploading:
|
|
2114
|
-
progress:
|
|
2115
|
-
error:
|
|
2116
|
-
}), /* @__PURE__ */ q(
|
|
2178
|
+
upload: z,
|
|
2179
|
+
uploading: pe,
|
|
2180
|
+
progress: me,
|
|
2181
|
+
error: he
|
|
2182
|
+
}), /* @__PURE__ */ q(He, {
|
|
2117
2183
|
label: u("devportal.bannerUrl", "Banner"),
|
|
2118
2184
|
value: d.bannerUrl,
|
|
2119
|
-
onChange: (e) =>
|
|
2185
|
+
onChange: (e) => k("bannerUrl", e),
|
|
2120
2186
|
hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
2121
2187
|
aspectClass: "aspect-video",
|
|
2122
|
-
upload:
|
|
2123
|
-
uploading:
|
|
2124
|
-
progress:
|
|
2125
|
-
error:
|
|
2188
|
+
upload: H,
|
|
2189
|
+
uploading: ge,
|
|
2190
|
+
progress: _e,
|
|
2191
|
+
error: ye
|
|
2126
2192
|
})]
|
|
2127
2193
|
}),
|
|
2128
2194
|
/* @__PURE__ */ q(D, {
|
|
2129
2195
|
label: u("devportal.videoUrl", "Demo Video URL"),
|
|
2130
2196
|
value: d.videoUrl,
|
|
2131
|
-
onChange: (e) =>
|
|
2197
|
+
onChange: (e) => k("videoUrl", e.target.value),
|
|
2132
2198
|
placeholder: "https://...",
|
|
2133
2199
|
hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2134
2200
|
}),
|
|
2135
|
-
/* @__PURE__ */ q(
|
|
2201
|
+
/* @__PURE__ */ q(O, {
|
|
2136
2202
|
label: u("devportal.shortDescription", "Short Description"),
|
|
2137
2203
|
value: d.shortDescription,
|
|
2138
|
-
onChange: (e) =>
|
|
2204
|
+
onChange: (e) => k("shortDescription", e.target.value),
|
|
2139
2205
|
maxLength: 200,
|
|
2140
2206
|
rows: 2,
|
|
2141
2207
|
hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2142
2208
|
}),
|
|
2143
|
-
/* @__PURE__ */ q(
|
|
2209
|
+
/* @__PURE__ */ q(O, {
|
|
2144
2210
|
label: u("devportal.longDescription", "Full Description"),
|
|
2145
2211
|
value: d.description,
|
|
2146
|
-
onChange: (e) =>
|
|
2212
|
+
onChange: (e) => k("description", e.target.value),
|
|
2147
2213
|
rows: 5,
|
|
2148
2214
|
hint: u("devportal.fullDescHint", "Markdown supported")
|
|
2149
2215
|
}),
|
|
2150
|
-
/* @__PURE__ */ q(
|
|
2216
|
+
/* @__PURE__ */ q(Ue, {
|
|
2151
2217
|
urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2152
|
-
onChange: (e) =>
|
|
2218
|
+
onChange: (e) => k("screenshotsText", e.join("\n")),
|
|
2153
2219
|
upload: G,
|
|
2154
2220
|
uploading: be,
|
|
2155
2221
|
progress: xe,
|
|
@@ -2167,38 +2233,38 @@ var qe = Ce`
|
|
|
2167
2233
|
/* @__PURE__ */ q(D, {
|
|
2168
2234
|
label: u("devportal.websiteUrl", "Website"),
|
|
2169
2235
|
value: d.websiteUrl,
|
|
2170
|
-
onChange: (e) =>
|
|
2236
|
+
onChange: (e) => k("websiteUrl", e.target.value),
|
|
2171
2237
|
placeholder: "https://..."
|
|
2172
2238
|
}),
|
|
2173
2239
|
/* @__PURE__ */ q(D, {
|
|
2174
2240
|
label: u("devportal.documentationUrl", "Documentation"),
|
|
2175
2241
|
value: d.documentationUrl,
|
|
2176
|
-
onChange: (e) =>
|
|
2242
|
+
onChange: (e) => k("documentationUrl", e.target.value),
|
|
2177
2243
|
placeholder: "https://..."
|
|
2178
2244
|
}),
|
|
2179
2245
|
/* @__PURE__ */ q(D, {
|
|
2180
2246
|
label: u("devportal.githubUrl", "GitHub"),
|
|
2181
2247
|
value: d.githubUrl,
|
|
2182
|
-
onChange: (e) =>
|
|
2248
|
+
onChange: (e) => k("githubUrl", e.target.value),
|
|
2183
2249
|
placeholder: "https://github.com/..."
|
|
2184
2250
|
}),
|
|
2185
2251
|
/* @__PURE__ */ q(D, {
|
|
2186
2252
|
label: u("devportal.supportUrl", "Support"),
|
|
2187
2253
|
value: d.supportUrl,
|
|
2188
|
-
onChange: (e) =>
|
|
2254
|
+
onChange: (e) => k("supportUrl", e.target.value),
|
|
2189
2255
|
placeholder: "https://..."
|
|
2190
2256
|
}),
|
|
2191
2257
|
/* @__PURE__ */ q(D, {
|
|
2192
2258
|
label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2193
2259
|
value: d.privacyPolicyUrl,
|
|
2194
|
-
onChange: (e) =>
|
|
2260
|
+
onChange: (e) => k("privacyPolicyUrl", e.target.value),
|
|
2195
2261
|
placeholder: "https://...",
|
|
2196
2262
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2197
2263
|
}),
|
|
2198
2264
|
/* @__PURE__ */ q(D, {
|
|
2199
2265
|
label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2200
2266
|
value: d.termsOfServiceUrl,
|
|
2201
|
-
onChange: (e) =>
|
|
2267
|
+
onChange: (e) => k("termsOfServiceUrl", e.target.value),
|
|
2202
2268
|
placeholder: "https://...",
|
|
2203
2269
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2204
2270
|
})
|
|
@@ -2215,9 +2281,9 @@ var qe = Ce`
|
|
|
2215
2281
|
children: u("devportal.pricingType", "Pricing Type")
|
|
2216
2282
|
}), /* @__PURE__ */ q("div", {
|
|
2217
2283
|
className: "flex flex-wrap gap-2",
|
|
2218
|
-
children:
|
|
2284
|
+
children: Ge.map((e) => /* @__PURE__ */ q("button", {
|
|
2219
2285
|
type: "button",
|
|
2220
|
-
onClick: () =>
|
|
2286
|
+
onClick: () => k("pricingType", e.value),
|
|
2221
2287
|
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
|
|
2222
2288
|
children: e.label
|
|
2223
2289
|
}, e.value))
|
|
@@ -2227,12 +2293,12 @@ var qe = Ce`
|
|
|
2227
2293
|
label: u("devportal.price", "Price"),
|
|
2228
2294
|
type: "number",
|
|
2229
2295
|
value: d.price,
|
|
2230
|
-
onChange: (e) =>
|
|
2296
|
+
onChange: (e) => k("price", e.target.value),
|
|
2231
2297
|
placeholder: "0.00"
|
|
2232
2298
|
}), /* @__PURE__ */ q(D, {
|
|
2233
2299
|
label: u("devportal.currency", "Currency"),
|
|
2234
2300
|
value: d.currency,
|
|
2235
|
-
onChange: (e) =>
|
|
2301
|
+
onChange: (e) => k("currency", e.target.value),
|
|
2236
2302
|
placeholder: "USD"
|
|
2237
2303
|
})]
|
|
2238
2304
|
})]
|
|
@@ -2243,27 +2309,27 @@ var qe = Ce`
|
|
|
2243
2309
|
children: [
|
|
2244
2310
|
/* @__PURE__ */ q("button", {
|
|
2245
2311
|
type: "button",
|
|
2246
|
-
onClick:
|
|
2312
|
+
onClick: ie,
|
|
2247
2313
|
disabled: p,
|
|
2248
2314
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2249
|
-
children: p ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2315
|
+
children: p ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(V, {
|
|
2250
2316
|
size: 16,
|
|
2251
2317
|
className: "animate-spin"
|
|
2252
|
-
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2318
|
+
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
|
|
2253
2319
|
}),
|
|
2254
|
-
!
|
|
2320
|
+
!Z && !X && /* @__PURE__ */ q("button", {
|
|
2255
2321
|
type: "button",
|
|
2256
|
-
onClick: () => void
|
|
2257
|
-
disabled:
|
|
2322
|
+
onClick: () => void ae(),
|
|
2323
|
+
disabled: ne || p,
|
|
2258
2324
|
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
|
|
2259
|
-
children:
|
|
2325
|
+
children: ne ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(V, {
|
|
2260
2326
|
size: 16,
|
|
2261
2327
|
className: "animate-spin"
|
|
2262
2328
|
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ve, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
|
|
2263
2329
|
}),
|
|
2264
|
-
!
|
|
2330
|
+
!Z && X && /* @__PURE__ */ J("p", {
|
|
2265
2331
|
className: "text-xs text-muted-foreground flex items-center gap-1.5",
|
|
2266
|
-
children: [/* @__PURE__ */ q(
|
|
2332
|
+
children: [/* @__PURE__ */ q(R, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
|
|
2267
2333
|
})
|
|
2268
2334
|
]
|
|
2269
2335
|
})
|
|
@@ -2301,8 +2367,8 @@ var qe = Ce`
|
|
|
2301
2367
|
target: "_blank",
|
|
2302
2368
|
rel: "noopener noreferrer",
|
|
2303
2369
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2304
|
-
children: [/* @__PURE__ */ q(
|
|
2305
|
-
}),
|
|
2370
|
+
children: [/* @__PURE__ */ q(z, { size: 14 }), e]
|
|
2371
|
+
}), Qe = [
|
|
2306
2372
|
{
|
|
2307
2373
|
id: "auth",
|
|
2308
2374
|
label: "Authentication",
|
|
@@ -2374,14 +2440,14 @@ var qe = Ce`
|
|
|
2374
2440
|
description: "Access control configuration"
|
|
2375
2441
|
}
|
|
2376
2442
|
];
|
|
2377
|
-
function
|
|
2378
|
-
let t = Object.fromEntries(
|
|
2443
|
+
function $e(e) {
|
|
2444
|
+
let t = Object.fromEntries(Qe.map((e) => [e.id, "none"]));
|
|
2379
2445
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2380
2446
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2381
2447
|
return t;
|
|
2382
2448
|
}
|
|
2383
|
-
var
|
|
2384
|
-
let t = e.manifest ?? {}, [n, r] = N(() =>
|
|
2449
|
+
var et = ({ app: e }) => {
|
|
2450
|
+
let t = e.manifest ?? {}, [n, r] = N(() => $e(t)), [i, a] = N(!1), [o, s] = N(!1), [c] = v(), l = (e, t) => {
|
|
2385
2451
|
s(!1), r((n) => ({
|
|
2386
2452
|
...n,
|
|
2387
2453
|
[e]: t
|
|
@@ -2433,7 +2499,7 @@ var $e = ({ app: e }) => {
|
|
|
2433
2499
|
}, e))]
|
|
2434
2500
|
}) }), /* @__PURE__ */ q("tbody", {
|
|
2435
2501
|
className: "divide-y divide-border",
|
|
2436
|
-
children:
|
|
2502
|
+
children: Qe.map((e) => /* @__PURE__ */ J("tr", {
|
|
2437
2503
|
className: "hover:bg-muted/30 transition-colors",
|
|
2438
2504
|
children: [/* @__PURE__ */ J("td", {
|
|
2439
2505
|
className: "px-4 py-3",
|
|
@@ -2461,7 +2527,7 @@ var $e = ({ app: e }) => {
|
|
|
2461
2527
|
}),
|
|
2462
2528
|
/* @__PURE__ */ J("div", {
|
|
2463
2529
|
className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
|
|
2464
|
-
children: [/* @__PURE__ */ q(
|
|
2530
|
+
children: [/* @__PURE__ */ q(B, {
|
|
2465
2531
|
size: 14,
|
|
2466
2532
|
className: "flex-shrink-0 mt-0.5"
|
|
2467
2533
|
}), /* @__PURE__ */ J("span", { children: [/* @__PURE__ */ q("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
@@ -2476,10 +2542,10 @@ var $e = ({ app: e }) => {
|
|
|
2476
2542
|
onClick: () => void u(),
|
|
2477
2543
|
disabled: i,
|
|
2478
2544
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2479
|
-
children: [i ? /* @__PURE__ */ q(
|
|
2545
|
+
children: [i ? /* @__PURE__ */ q(V, {
|
|
2480
2546
|
size: 14,
|
|
2481
2547
|
className: "animate-spin"
|
|
2482
|
-
}) : /* @__PURE__ */ q(
|
|
2548
|
+
}) : /* @__PURE__ */ q(ye, { size: 14 }), "Save Permissions"]
|
|
2483
2549
|
})]
|
|
2484
2550
|
})
|
|
2485
2551
|
]
|
|
@@ -2487,6 +2553,6 @@ var $e = ({ app: e }) => {
|
|
|
2487
2553
|
});
|
|
2488
2554
|
};
|
|
2489
2555
|
//#endregion
|
|
2490
|
-
export {
|
|
2556
|
+
export { Me as ApplicationDetailPage };
|
|
2491
2557
|
|
|
2492
2558
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|