@burdenoff/microfe-devportal 2026.626.2 → 2026.626.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/components/PageLayout.js +1 -1
- package/dist/devportal/components/PageLayout.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +461 -521
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +265 -274
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,12 +18,12 @@ import { useDevportalPermission as ne } from "../hooks/usePermission.js";
|
|
|
18
18
|
import { usePackageUpload as j } from "../hooks/usePackageUpload.js";
|
|
19
19
|
import { useCallback as M, useEffect as re, useMemo as N, useRef as P, useState as F } from "react";
|
|
20
20
|
import { useI18n as I } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
-
import { AlertCircle as ie, AppWindow as ae, BarChart3 as L, CheckCircle as R, Clock as oe,
|
|
22
|
-
import { useParams as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import { CTAOverflowMenu as
|
|
21
|
+
import { AlertCircle as ie, AppWindow as ae, BarChart3 as L, CheckCircle as R, Clock as oe, Edit as se, ExternalLink as z, FlaskConical as ce, Info as B, Key as le, Loader2 as V, MoreHorizontal as ue, Plus as H, Power as de, RefreshCw as fe, SendHorizontal as pe, Shield as U, Store as me, Upload as W, Users as he, Webhook as G, X as K, XCircle as ge } from "lucide-react";
|
|
22
|
+
import { useParams as _e } from "react-router-dom";
|
|
23
|
+
import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
24
|
+
import { CTAOverflowMenu as ve, EmphasisPanel as ye, GlassCard as be, NextSteps as xe } from "@burdenoff/fe-libs/ui";
|
|
25
25
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
26
|
-
function
|
|
26
|
+
function Se(e) {
|
|
27
27
|
return e ? {
|
|
28
28
|
id: e.id,
|
|
29
29
|
name: e.name,
|
|
@@ -47,6 +47,7 @@ function Ce(e) {
|
|
|
47
47
|
termsOfServiceUrl: e.termsOfServiceUrl || void 0,
|
|
48
48
|
githubUrl: e.githubUrl || void 0,
|
|
49
49
|
pricingType: e.pricingType || void 0,
|
|
50
|
+
pricingDetails: e.pricingDetails ?? void 0,
|
|
50
51
|
installCount: e.installCount,
|
|
51
52
|
activeInstallCount: e.activeInstallCount,
|
|
52
53
|
averageRating: e.averageRating ?? void 0,
|
|
@@ -71,7 +72,7 @@ function Ce(e) {
|
|
|
71
72
|
updatedAt: e.updatedAt
|
|
72
73
|
} : null;
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function Ce(e) {
|
|
75
76
|
return {
|
|
76
77
|
id: e.id,
|
|
77
78
|
applicationId: e.applicationId,
|
|
@@ -95,7 +96,7 @@ function X(e) {
|
|
|
95
96
|
updatedAt: e.updatedAt
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
+
function X(e) {
|
|
99
100
|
return {
|
|
100
101
|
id: e.id,
|
|
101
102
|
applicationId: e.applicationId,
|
|
@@ -111,7 +112,7 @@ function we(e) {
|
|
|
111
112
|
createdAt: e.createdAt
|
|
112
113
|
};
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function we(e) {
|
|
115
116
|
return {
|
|
116
117
|
id: e.id,
|
|
117
118
|
appId: e.appId,
|
|
@@ -133,7 +134,7 @@ function Te(e) {
|
|
|
133
134
|
revokedBy: e.revokedBy || void 0
|
|
134
135
|
};
|
|
135
136
|
}
|
|
136
|
-
var
|
|
137
|
+
var Te = [
|
|
137
138
|
{
|
|
138
139
|
id: "overview",
|
|
139
140
|
label: "Overview",
|
|
@@ -147,12 +148,12 @@ var Ee = [
|
|
|
147
148
|
{
|
|
148
149
|
id: "webhooks",
|
|
149
150
|
label: "Webhooks",
|
|
150
|
-
icon:
|
|
151
|
+
icon: G
|
|
151
152
|
},
|
|
152
153
|
{
|
|
153
154
|
id: "delegations",
|
|
154
155
|
label: "Delegations",
|
|
155
|
-
icon:
|
|
156
|
+
icon: he
|
|
156
157
|
},
|
|
157
158
|
{
|
|
158
159
|
id: "analytics",
|
|
@@ -167,273 +168,273 @@ var Ee = [
|
|
|
167
168
|
{
|
|
168
169
|
id: "store-listing",
|
|
169
170
|
label: "Store Listing",
|
|
170
|
-
icon:
|
|
171
|
+
icon: me
|
|
171
172
|
}
|
|
172
|
-
],
|
|
173
|
+
], Ee = {
|
|
173
174
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
174
175
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
175
176
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
176
|
-
},
|
|
177
|
+
}, De = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
|
|
177
178
|
className: "flex items-center justify-center gap-3 py-12",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ J(V, {
|
|
179
180
|
size: 20,
|
|
180
181
|
className: "animate-spin text-text-secondary"
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ J("p", {
|
|
182
183
|
className: "text-sm text-text-secondary",
|
|
183
184
|
children: e
|
|
184
185
|
})]
|
|
185
|
-
}),
|
|
186
|
+
}), Oe = ({ message: e }) => /* @__PURE__ */ Y("div", {
|
|
186
187
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ J(ie, {
|
|
188
189
|
size: 32,
|
|
189
190
|
className: "text-status-error-text"
|
|
190
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ J("p", {
|
|
191
192
|
className: "text-sm text-text-secondary",
|
|
192
193
|
children: e
|
|
193
194
|
})]
|
|
194
|
-
}),
|
|
195
|
+
}), Z = () => {
|
|
195
196
|
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = I(), p = (e, t) => {
|
|
196
197
|
let n = d(e);
|
|
197
198
|
return n === e ? t : n;
|
|
198
|
-
}, { allowed: h } = ne(te.APP_UPDATE), { allowed: _ } = ne(te.APP_DELETE), { appId: S } =
|
|
199
|
+
}, { allowed: h } = ne(te.APP_UPDATE), { allowed: _ } = ne(te.APP_DELETE), { appId: S } = _e(), [w, T] = F("overview"), [E, D] = F(!1), [O, j] = F(!1), [re, N] = F(null), [P, L] = F(!1), { data: R, loading: z, error: B } = s({
|
|
199
200
|
variables: { id: S },
|
|
200
201
|
skip: !S
|
|
201
|
-
}), [
|
|
202
|
+
}), [le, { loading: V }] = f(), [ue, { loading: H }] = a(), [W, { loading: he }] = u(), [K, { loading: q }] = m(), { data: ye, refetch: be } = l({
|
|
202
203
|
variables: {
|
|
203
204
|
applicationId: S,
|
|
204
205
|
workspaceId: c ?? void 0
|
|
205
206
|
},
|
|
206
207
|
skip: !c || !S,
|
|
207
208
|
fetchPolicy: "cache-and-network"
|
|
208
|
-
}),
|
|
209
|
+
}), Ce = ye?.appInstallations?.edges?.[0]?.node ?? null, X = M((e) => {
|
|
209
210
|
i?.(`${o}${e}`);
|
|
210
211
|
}, [i, o]), we = M(async () => {
|
|
211
212
|
let e = R?.application?.appId;
|
|
212
213
|
if (e) try {
|
|
213
|
-
let t = (await
|
|
214
|
+
let t = (await le({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
214
215
|
t && N(t), D(!1);
|
|
215
216
|
} catch {}
|
|
216
|
-
}, [R?.application?.appId,
|
|
217
|
+
}, [R?.application?.appId, le]), Ee = M(async () => {
|
|
217
218
|
if (S) try {
|
|
218
|
-
await
|
|
219
|
+
await ue({ variables: { id: S } }), j(!1), X("/apps");
|
|
219
220
|
} catch {}
|
|
220
221
|
}, [
|
|
221
222
|
S,
|
|
222
|
-
|
|
223
|
+
ue,
|
|
223
224
|
X
|
|
224
225
|
]), De = M(async () => {
|
|
225
226
|
if (!(!S || !c)) try {
|
|
226
|
-
await
|
|
227
|
+
await W({ variables: { input: {
|
|
227
228
|
applicationId: S,
|
|
228
229
|
scope: "WORKSPACE",
|
|
229
230
|
workspaceId: c,
|
|
230
231
|
autoUpdate: !1
|
|
231
|
-
} } }),
|
|
232
|
+
} } }), be(), C("success");
|
|
232
233
|
} catch (e) {
|
|
233
234
|
console.error("[DevPortal] Test in Workspace failed:", e), C("error");
|
|
234
235
|
}
|
|
235
236
|
}, [
|
|
236
237
|
S,
|
|
237
238
|
c,
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
W,
|
|
240
|
+
be
|
|
240
241
|
]), Oe = M(async (e) => {
|
|
241
242
|
try {
|
|
242
|
-
await
|
|
243
|
+
await K({ variables: { id: e } }), be(), C("success");
|
|
243
244
|
} catch {
|
|
244
245
|
C("error");
|
|
245
246
|
}
|
|
246
|
-
}, [
|
|
247
|
-
if (
|
|
248
|
-
if (
|
|
247
|
+
}, [K, be]);
|
|
248
|
+
if (z && !R) return /* @__PURE__ */ J(n, { message: p("devportal.loadingApplication", "Loading application...") });
|
|
249
|
+
if (B) return /* @__PURE__ */ J(g, {
|
|
249
250
|
title: p("devportal.error", "Error"),
|
|
250
251
|
backLink: `${o}/apps`,
|
|
251
252
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
252
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ Y("div", {
|
|
253
254
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
254
255
|
children: [
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ J(ie, {
|
|
256
257
|
size: 48,
|
|
257
258
|
className: "text-status-error-text mb-4"
|
|
258
259
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ J("h3", {
|
|
260
261
|
className: "text-lg font-semibold mb-2",
|
|
261
262
|
children: p("devportal.failedToLoadApplication", "Failed to load application")
|
|
262
263
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ J("p", {
|
|
264
265
|
className: "text-sm text-text-secondary",
|
|
265
|
-
children:
|
|
266
|
+
children: B.message
|
|
266
267
|
})
|
|
267
268
|
]
|
|
268
269
|
})
|
|
269
270
|
});
|
|
270
|
-
let Z =
|
|
271
|
-
if (!Z) return /* @__PURE__ */
|
|
271
|
+
let Z = Se(R?.application);
|
|
272
|
+
if (!Z) return /* @__PURE__ */ J(g, {
|
|
272
273
|
title: p("devportal.notFound", "Not Found"),
|
|
273
274
|
backLink: `${o}/apps`,
|
|
274
275
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
275
|
-
children: /* @__PURE__ */
|
|
276
|
+
children: /* @__PURE__ */ J(r, {
|
|
276
277
|
illustration: "empty-generic",
|
|
277
|
-
icon: /* @__PURE__ */
|
|
278
|
+
icon: /* @__PURE__ */ J(ae, { size: 48 }),
|
|
278
279
|
title: p("devportal.applicationNotFound", "Application not found"),
|
|
279
280
|
description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
280
281
|
})
|
|
281
282
|
});
|
|
282
|
-
let
|
|
283
|
-
...
|
|
283
|
+
let Ne = Z.appType === "NODE" || Z.appType === "WORKFLOW", Pe = Z.status !== "PUBLISHED" && (!Ne || (R?.application?.versions?.totalCount ?? 0) > 0), Fe = [
|
|
284
|
+
...Ne ? [] : [{
|
|
284
285
|
label: p("devportal.rotateSecret", "Rotate Secret"),
|
|
285
|
-
icon: /* @__PURE__ */
|
|
286
|
+
icon: /* @__PURE__ */ J(fe, { size: 16 }),
|
|
286
287
|
disabled: !Z.appId,
|
|
287
288
|
onSelect: () => D(!0)
|
|
288
289
|
}],
|
|
289
290
|
{
|
|
290
291
|
label: p("devportal.versions", "Versions"),
|
|
291
|
-
icon: /* @__PURE__ */
|
|
292
|
+
icon: /* @__PURE__ */ J(oe, { size: 16 }),
|
|
292
293
|
onSelect: () => X(`/apps/${Z.id}/versions`)
|
|
293
294
|
},
|
|
294
295
|
...Pe ? [{
|
|
295
296
|
label: p("devportal.submitForReview", "Submit for Review"),
|
|
296
|
-
icon: /* @__PURE__ */
|
|
297
|
+
icon: /* @__PURE__ */ J(pe, { size: 16 }),
|
|
297
298
|
onSelect: () => T("store-listing")
|
|
298
299
|
}] : [],
|
|
299
|
-
...
|
|
300
|
+
...Ne ? [] : Ce ? [{
|
|
300
301
|
label: p("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
301
|
-
icon: /* @__PURE__ */
|
|
302
|
-
disabled:
|
|
303
|
-
onSelect: () => void Oe(
|
|
302
|
+
icon: /* @__PURE__ */ J(ge, { size: 16 }),
|
|
303
|
+
disabled: q || !c,
|
|
304
|
+
onSelect: () => void Oe(Ce.id)
|
|
304
305
|
}] : [{
|
|
305
306
|
label: p("devportal.testInWorkspace", "Test in Workspace"),
|
|
306
|
-
icon: /* @__PURE__ */
|
|
307
|
-
disabled:
|
|
307
|
+
icon: /* @__PURE__ */ J(ce, { size: 16 }),
|
|
308
|
+
disabled: he || !c,
|
|
308
309
|
onSelect: () => void De()
|
|
309
310
|
}],
|
|
310
311
|
{
|
|
311
312
|
label: p("devportal.deactivate", "Deactivate"),
|
|
312
|
-
icon: /* @__PURE__ */
|
|
313
|
+
icon: /* @__PURE__ */ J(de, { size: 16 }),
|
|
313
314
|
intent: "destructive",
|
|
314
315
|
disabled: !_,
|
|
315
316
|
onSelect: () => j(!0)
|
|
316
317
|
}
|
|
317
318
|
];
|
|
318
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ Y(g, {
|
|
319
320
|
title: Z.name,
|
|
320
321
|
description: Z.shortDescription,
|
|
321
322
|
purpose: p("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."),
|
|
322
323
|
backLink: `${o}/apps`,
|
|
323
324
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
324
|
-
actions: /* @__PURE__ */
|
|
325
|
+
actions: /* @__PURE__ */ J(ve, {
|
|
325
326
|
primary: {
|
|
326
327
|
label: p("devportal.editApp", "Edit App"),
|
|
327
|
-
icon: /* @__PURE__ */
|
|
328
|
+
icon: /* @__PURE__ */ J(se, { size: 16 }),
|
|
328
329
|
disabled: !h,
|
|
329
330
|
onSelect: () => X(`/apps/${Z.id}/edit`)
|
|
330
331
|
},
|
|
331
332
|
actions: Fe
|
|
332
333
|
}),
|
|
333
334
|
children: [
|
|
334
|
-
re && /* @__PURE__ */
|
|
335
|
+
re && /* @__PURE__ */ J(ee, {
|
|
335
336
|
title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
336
337
|
secret: re,
|
|
337
338
|
description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
338
339
|
onDismiss: () => N(null)
|
|
339
340
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ Y("div", {
|
|
341
342
|
className: "flex flex-wrap items-center gap-2",
|
|
342
343
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ J(b, {
|
|
344
345
|
status: Z.status,
|
|
345
346
|
type: "app"
|
|
346
347
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ J(b, {
|
|
348
349
|
status: Z.visibility,
|
|
349
350
|
type: "app"
|
|
350
351
|
}),
|
|
351
|
-
Z.isVerified && /* @__PURE__ */
|
|
352
|
-
Z.isFeatured && /* @__PURE__ */
|
|
353
|
-
/* @__PURE__ */
|
|
352
|
+
Z.isVerified && /* @__PURE__ */ J(x, { verified: !0 }),
|
|
353
|
+
Z.isFeatured && /* @__PURE__ */ J(y, {}),
|
|
354
|
+
/* @__PURE__ */ J("span", {
|
|
354
355
|
className: "text-sm text-text-secondary",
|
|
355
356
|
children: v[Z.appType] || Z.appType
|
|
356
357
|
})
|
|
357
358
|
]
|
|
358
359
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ J(xe, {
|
|
360
361
|
storageKey: `devportal-app-${Z.id}`,
|
|
361
362
|
steps: [
|
|
362
363
|
{
|
|
363
364
|
id: "edit",
|
|
364
365
|
label: p("devportal.editApp", "Edit App"),
|
|
365
366
|
description: p("devportal.appDetailStepEdit", "Update the name, description, and settings"),
|
|
366
|
-
icon: /* @__PURE__ */
|
|
367
|
+
icon: /* @__PURE__ */ J(se, { size: 16 }),
|
|
367
368
|
onClick: () => X(`/apps/${Z.id}/edit`)
|
|
368
369
|
},
|
|
369
370
|
{
|
|
370
371
|
id: "permissions",
|
|
371
372
|
label: p("devportal.permissions", "Permissions"),
|
|
372
373
|
description: p("devportal.appDetailStepPermissions", "Request the scopes your app needs"),
|
|
373
|
-
icon: /* @__PURE__ */
|
|
374
|
+
icon: /* @__PURE__ */ J(U, { size: 16 }),
|
|
374
375
|
onClick: () => T("permissions")
|
|
375
376
|
},
|
|
376
377
|
{
|
|
377
378
|
id: "webhooks",
|
|
378
379
|
label: p("devportal.webhooks", "Webhooks"),
|
|
379
380
|
description: p("devportal.appDetailStepWebhooks", "Subscribe to events for real-time updates"),
|
|
380
|
-
icon: /* @__PURE__ */
|
|
381
|
+
icon: /* @__PURE__ */ J(G, { size: 16 }),
|
|
381
382
|
onClick: () => T("webhooks")
|
|
382
383
|
},
|
|
383
384
|
{
|
|
384
385
|
id: "store-listing",
|
|
385
386
|
label: p("devportal.storeListing", "Store Listing"),
|
|
386
387
|
description: p("devportal.appDetailStepStore", "Prepare and publish to the marketplace"),
|
|
387
|
-
icon: /* @__PURE__ */
|
|
388
|
+
icon: /* @__PURE__ */ J(me, { size: 16 }),
|
|
388
389
|
onClick: () => T("store-listing")
|
|
389
390
|
}
|
|
390
391
|
]
|
|
391
392
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ J("div", {
|
|
393
394
|
className: "border-b",
|
|
394
|
-
children: /* @__PURE__ */
|
|
395
|
+
children: /* @__PURE__ */ J("nav", {
|
|
395
396
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
396
397
|
role: "tablist",
|
|
397
398
|
"aria-label": p("devportal.applicationSections", "Application sections"),
|
|
398
|
-
children:
|
|
399
|
+
children: Te.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
|
|
399
400
|
let n = e.icon;
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ Y("button", {
|
|
401
402
|
id: `application-tab-${e.id}`,
|
|
402
403
|
role: "tab",
|
|
403
404
|
"aria-selected": w === e.id,
|
|
404
405
|
"aria-controls": `application-panel-${e.id}`,
|
|
405
406
|
onClick: () => T(e.id),
|
|
406
407
|
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", w === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
407
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ J(n, { size: 16 }), e.label]
|
|
408
409
|
}, e.id);
|
|
409
410
|
})
|
|
410
411
|
})
|
|
411
412
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ Y("div", {
|
|
413
414
|
className: "mt-6",
|
|
414
415
|
id: `application-panel-${w}`,
|
|
415
416
|
role: "tabpanel",
|
|
416
417
|
"aria-labelledby": `application-tab-${w}`,
|
|
417
418
|
tabIndex: 0,
|
|
418
419
|
children: [
|
|
419
|
-
w === "overview" && /* @__PURE__ */
|
|
420
|
-
w === "permissions" && /* @__PURE__ */
|
|
421
|
-
w === "webhooks" && /* @__PURE__ */
|
|
420
|
+
w === "overview" && /* @__PURE__ */ J(Me, { app: Z }),
|
|
421
|
+
w === "permissions" && /* @__PURE__ */ J(qe, { app: Z }),
|
|
422
|
+
w === "webhooks" && /* @__PURE__ */ J(ke, {
|
|
422
423
|
appId: Z.id,
|
|
423
424
|
onNavigate: X
|
|
424
425
|
}),
|
|
425
|
-
w === "delegations" && /* @__PURE__ */
|
|
426
|
+
w === "delegations" && /* @__PURE__ */ J(Ae, {
|
|
426
427
|
authAppId: Z.appId || void 0,
|
|
427
428
|
appName: Z.name,
|
|
428
429
|
onGrantDelegation: () => L(!0),
|
|
429
430
|
onNavigate: X
|
|
430
431
|
}),
|
|
431
|
-
w === "analytics" && /* @__PURE__ */
|
|
432
|
-
w === "playground" && /* @__PURE__ */
|
|
433
|
-
w === "store-listing" && /* @__PURE__ */
|
|
432
|
+
w === "analytics" && /* @__PURE__ */ J(je, { appId: Z.id }),
|
|
433
|
+
w === "playground" && /* @__PURE__ */ J(Le, { app: Z }),
|
|
434
|
+
w === "store-listing" && /* @__PURE__ */ J(We, { app: Z })
|
|
434
435
|
]
|
|
435
436
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ J(k, {
|
|
437
438
|
open: E,
|
|
438
439
|
onOpenChange: D,
|
|
439
440
|
onConfirm: we,
|
|
@@ -442,20 +443,20 @@ var Ee = [
|
|
|
442
443
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
443
444
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
444
445
|
variant: "warning",
|
|
445
|
-
loading:
|
|
446
|
+
loading: V
|
|
446
447
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ J(k, {
|
|
448
449
|
open: O,
|
|
449
450
|
onOpenChange: j,
|
|
450
|
-
onConfirm:
|
|
451
|
+
onConfirm: Ee,
|
|
451
452
|
title: p("devportal.deactivateApplication", "Deactivate Application"),
|
|
452
453
|
description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
453
454
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
454
455
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
455
456
|
variant: "destructive",
|
|
456
|
-
loading:
|
|
457
|
+
loading: H
|
|
457
458
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ J(A, {
|
|
459
460
|
open: P,
|
|
460
461
|
onOpenChange: L,
|
|
461
462
|
appId: Z.appId || "",
|
|
@@ -467,21 +468,21 @@ var Ee = [
|
|
|
467
468
|
})
|
|
468
469
|
]
|
|
469
470
|
});
|
|
470
|
-
},
|
|
471
|
+
}, ke = ({ appId: e, onNavigate: t }) => {
|
|
471
472
|
let { t: n } = I(), r = (e, t) => {
|
|
472
473
|
let r = n(e);
|
|
473
474
|
return r === e ? t : r;
|
|
474
475
|
}, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
|
|
475
|
-
return a ? /* @__PURE__ */
|
|
476
|
+
return a ? /* @__PURE__ */ J(De, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(Oe, { message: o.message }) : /* @__PURE__ */ J(Ne, {
|
|
476
477
|
appId: e,
|
|
477
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
478
|
+
webhooks: (i?.webhooks ?? []).map(Ce),
|
|
478
479
|
onNavigate: t
|
|
479
480
|
});
|
|
480
|
-
},
|
|
481
|
+
}, Ae = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
481
482
|
let { t: o } = I(), s = (e, t) => {
|
|
482
483
|
let n = o(e);
|
|
483
484
|
return n === e ? t : n;
|
|
484
|
-
}, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = F([]), [g, _] = F(!1), [v, y] = F(/* @__PURE__ */ new Set()), [b, x] = F(null), S = N(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(
|
|
485
|
+
}, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = F([]), [g, _] = F(!1), [v, y] = F(/* @__PURE__ */ new Set()), [b, x] = F(null), S = N(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(we) : [], [e, c]), C = N(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = N(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), T = C.some((e) => v.has(e.id)) && !w, E = M((e, t) => {
|
|
485
486
|
y((n) => {
|
|
486
487
|
let r = new Set(n);
|
|
487
488
|
return t ? r.add(e) : r.delete(e), r;
|
|
@@ -507,19 +508,19 @@ var Ee = [
|
|
|
507
508
|
_(!1);
|
|
508
509
|
}
|
|
509
510
|
}, [p, f]);
|
|
510
|
-
return e ? l ? /* @__PURE__ */
|
|
511
|
-
b && /* @__PURE__ */
|
|
511
|
+
return e ? l ? /* @__PURE__ */ J(De, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(Oe, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
|
|
512
|
+
b && /* @__PURE__ */ J("div", {
|
|
512
513
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
513
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ Y("div", {
|
|
514
515
|
className: "flex items-center justify-between gap-3",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ J("span", { children: b }), /* @__PURE__ */ J("button", {
|
|
516
517
|
onClick: () => x(null),
|
|
517
518
|
className: "text-status-success-text hover:text-status-success-text",
|
|
518
519
|
children: s("devportal.dismiss", "Dismiss")
|
|
519
520
|
})]
|
|
520
521
|
})
|
|
521
522
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ J(Pe, {
|
|
523
524
|
appName: t,
|
|
524
525
|
delegations: S,
|
|
525
526
|
onGrantDelegation: n,
|
|
@@ -532,7 +533,7 @@ var Ee = [
|
|
|
532
533
|
allVisibleSelected: w,
|
|
533
534
|
partiallySelected: T
|
|
534
535
|
}),
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ J(k, {
|
|
536
537
|
open: m.length > 0,
|
|
537
538
|
onOpenChange: (e) => {
|
|
538
539
|
e || h([]);
|
|
@@ -547,18 +548,18 @@ var Ee = [
|
|
|
547
548
|
variant: "destructive",
|
|
548
549
|
loading: g
|
|
549
550
|
})
|
|
550
|
-
] }) : /* @__PURE__ */
|
|
551
|
+
] }) : /* @__PURE__ */ J(r, {
|
|
551
552
|
illustration: "empty-generic",
|
|
552
|
-
icon: /* @__PURE__ */
|
|
553
|
+
icon: /* @__PURE__ */ J(U, { size: 32 }),
|
|
553
554
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
554
555
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
555
|
-
action: /* @__PURE__ */
|
|
556
|
+
action: /* @__PURE__ */ Y("button", {
|
|
556
557
|
onClick: () => a("/oauth"),
|
|
557
558
|
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",
|
|
558
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ J(z, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
559
560
|
})
|
|
560
561
|
});
|
|
561
|
-
},
|
|
562
|
+
}, je = ({ appId: e }) => {
|
|
562
563
|
let { t } = I(), n = (e, n) => {
|
|
563
564
|
let r = t(e);
|
|
564
565
|
return r === e ? n : r;
|
|
@@ -571,67 +572,67 @@ var Ee = [
|
|
|
571
572
|
}, [r]).toISOString(),
|
|
572
573
|
endDate: r.toISOString()
|
|
573
574
|
} });
|
|
574
|
-
return a ? /* @__PURE__ */
|
|
575
|
-
},
|
|
575
|
+
return a ? /* @__PURE__ */ J(De, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(Oe, { message: s.message }) : /* @__PURE__ */ J(Fe, { analytics: (i?.applicationAnalytics ?? []).map(X) });
|
|
576
|
+
}, Me = ({ app: e }) => {
|
|
576
577
|
let { t } = I(), n = (e, n) => {
|
|
577
578
|
let r = t(e);
|
|
578
579
|
return r === e ? n : r;
|
|
579
580
|
};
|
|
580
|
-
return /* @__PURE__ */
|
|
581
|
+
return /* @__PURE__ */ Y("div", {
|
|
581
582
|
className: "grid gap-6 lg:grid-cols-3",
|
|
582
|
-
children: [/* @__PURE__ */
|
|
583
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
583
584
|
className: "lg:col-span-2 space-y-6",
|
|
584
585
|
children: [
|
|
585
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ J(ye, { children: /* @__PURE__ */ Y("div", {
|
|
586
587
|
className: "grid gap-4 sm:grid-cols-4",
|
|
587
588
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ J(Q, {
|
|
589
590
|
label: n("devportal.totalInstalls", "Total Installs"),
|
|
590
591
|
value: e.installCount.toLocaleString()
|
|
591
592
|
}),
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ J(Q, {
|
|
593
594
|
label: n("devportal.activeInstalls", "Active Installs"),
|
|
594
595
|
value: e.activeInstallCount.toLocaleString()
|
|
595
596
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ J(Q, {
|
|
597
598
|
label: n("devportal.averageRating", "Average Rating"),
|
|
598
599
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
599
600
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ J(Q, {
|
|
601
602
|
label: n("devportal.reviews", "Reviews"),
|
|
602
603
|
value: e.reviewCount.toString()
|
|
603
604
|
})
|
|
604
605
|
]
|
|
605
606
|
}) }),
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ J(_, {
|
|
607
608
|
title: n("devportal.description", "Description"),
|
|
608
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ J("div", {
|
|
609
610
|
className: "prose prose-sm max-w-none",
|
|
610
|
-
children: /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ J("pre", {
|
|
611
612
|
className: "whitespace-pre-wrap font-sans text-sm text-text-primary bg-transparent p-0 m-0",
|
|
612
613
|
children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
|
|
613
614
|
})
|
|
614
615
|
})
|
|
615
616
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ J(_, {
|
|
617
618
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
618
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ Y("div", {
|
|
619
620
|
className: "space-y-3",
|
|
620
|
-
children: [e.tags.length > 0 && /* @__PURE__ */
|
|
621
|
+
children: [e.tags.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
621
622
|
className: "text-xs text-text-secondary mb-2",
|
|
622
623
|
children: n("devportal.tags", "Tags")
|
|
623
|
-
}), /* @__PURE__ */
|
|
624
|
+
}), /* @__PURE__ */ J("div", {
|
|
624
625
|
className: "flex flex-wrap gap-2",
|
|
625
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
626
|
+
children: e.tags.map((e) => /* @__PURE__ */ J("span", {
|
|
626
627
|
className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-primary",
|
|
627
628
|
children: e
|
|
628
629
|
}, e))
|
|
629
|
-
})] }), e.keywords.length > 0 && /* @__PURE__ */
|
|
630
|
+
})] }), e.keywords.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
630
631
|
className: "text-xs text-text-secondary mb-2",
|
|
631
632
|
children: n("devportal.keywords", "Keywords")
|
|
632
|
-
}), /* @__PURE__ */
|
|
633
|
+
}), /* @__PURE__ */ J("div", {
|
|
633
634
|
className: "flex flex-wrap gap-2",
|
|
634
|
-
children: e.keywords.map((e) => /* @__PURE__ */
|
|
635
|
+
children: e.keywords.map((e) => /* @__PURE__ */ J("span", {
|
|
635
636
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-xs",
|
|
636
637
|
children: e
|
|
637
638
|
}, e))
|
|
@@ -639,14 +640,14 @@ var Ee = [
|
|
|
639
640
|
})
|
|
640
641
|
})
|
|
641
642
|
]
|
|
642
|
-
}), /* @__PURE__ */
|
|
643
|
+
}), /* @__PURE__ */ Y("div", {
|
|
643
644
|
className: "space-y-6",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
645
|
+
children: [/* @__PURE__ */ J(_, {
|
|
645
646
|
title: n("devportal.details", "Details"),
|
|
646
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ J(T, { items: [
|
|
647
648
|
{
|
|
648
649
|
label: n("devportal.appId", "App ID"),
|
|
649
|
-
value: /* @__PURE__ */
|
|
650
|
+
value: /* @__PURE__ */ J("code", {
|
|
650
651
|
className: "text-xs",
|
|
651
652
|
children: e.id
|
|
652
653
|
})
|
|
@@ -661,7 +662,13 @@ var Ee = [
|
|
|
661
662
|
},
|
|
662
663
|
{
|
|
663
664
|
label: n("devportal.pricing", "Pricing"),
|
|
664
|
-
value:
|
|
665
|
+
value: (() => {
|
|
666
|
+
if (e.pricingType === "PAID") {
|
|
667
|
+
let t = e.pricingDetails ?? {}, n = typeof t.price == "number" ? t.price : null, r = typeof t.currency == "string" ? t.currency : "USD";
|
|
668
|
+
return n == null ? "PAID" : `PAID — ${n} ${r}`;
|
|
669
|
+
}
|
|
670
|
+
return e.pricingType || n("devportal.free", "Free");
|
|
671
|
+
})()
|
|
665
672
|
},
|
|
666
673
|
{
|
|
667
674
|
label: n("devportal.created", "Created"),
|
|
@@ -676,32 +683,32 @@ var Ee = [
|
|
|
676
683
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
677
684
|
}
|
|
678
685
|
] })
|
|
679
|
-
}), /* @__PURE__ */
|
|
686
|
+
}), /* @__PURE__ */ J(_, {
|
|
680
687
|
title: n("devportal.links", "Links"),
|
|
681
|
-
children: /* @__PURE__ */
|
|
688
|
+
children: /* @__PURE__ */ Y("div", {
|
|
682
689
|
className: "space-y-2",
|
|
683
690
|
children: [
|
|
684
|
-
e.websiteUrl && /* @__PURE__ */
|
|
691
|
+
e.websiteUrl && /* @__PURE__ */ J($, {
|
|
685
692
|
label: n("devportal.website", "Website"),
|
|
686
693
|
url: e.websiteUrl
|
|
687
694
|
}),
|
|
688
|
-
e.documentationUrl && /* @__PURE__ */
|
|
695
|
+
e.documentationUrl && /* @__PURE__ */ J($, {
|
|
689
696
|
label: n("devportal.documentation", "Documentation"),
|
|
690
697
|
url: e.documentationUrl
|
|
691
698
|
}),
|
|
692
|
-
e.supportUrl && /* @__PURE__ */
|
|
699
|
+
e.supportUrl && /* @__PURE__ */ J($, {
|
|
693
700
|
label: n("devportal.support", "Support"),
|
|
694
701
|
url: e.supportUrl
|
|
695
702
|
}),
|
|
696
|
-
e.githubUrl && /* @__PURE__ */
|
|
703
|
+
e.githubUrl && /* @__PURE__ */ J($, {
|
|
697
704
|
label: n("devportal.github", "GitHub"),
|
|
698
705
|
url: e.githubUrl
|
|
699
706
|
}),
|
|
700
|
-
e.privacyPolicyUrl && /* @__PURE__ */
|
|
707
|
+
e.privacyPolicyUrl && /* @__PURE__ */ J($, {
|
|
701
708
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
702
709
|
url: e.privacyPolicyUrl
|
|
703
710
|
}),
|
|
704
|
-
e.termsOfServiceUrl && /* @__PURE__ */
|
|
711
|
+
e.termsOfServiceUrl && /* @__PURE__ */ J($, {
|
|
705
712
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
706
713
|
url: e.termsOfServiceUrl
|
|
707
714
|
})
|
|
@@ -710,16 +717,16 @@ var Ee = [
|
|
|
710
717
|
})]
|
|
711
718
|
})]
|
|
712
719
|
});
|
|
713
|
-
},
|
|
720
|
+
}, Ne = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
714
721
|
let { t: i } = I(), a = (e, t) => {
|
|
715
722
|
let n = i(e);
|
|
716
723
|
return n === e ? t : n;
|
|
717
724
|
};
|
|
718
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ Y("div", {
|
|
719
726
|
className: "space-y-6",
|
|
720
|
-
children: [/* @__PURE__ */
|
|
727
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
721
728
|
className: "flex items-center justify-between",
|
|
722
|
-
children: [/* @__PURE__ */
|
|
729
|
+
children: [/* @__PURE__ */ Y("p", {
|
|
723
730
|
className: "text-sm text-text-secondary",
|
|
724
731
|
children: [
|
|
725
732
|
t.length,
|
|
@@ -728,81 +735,81 @@ var Ee = [
|
|
|
728
735
|
" ",
|
|
729
736
|
a("devportal.configured", "configured")
|
|
730
737
|
]
|
|
731
|
-
}), /* @__PURE__ */
|
|
738
|
+
}), /* @__PURE__ */ Y("button", {
|
|
732
739
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
733
740
|
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",
|
|
734
|
-
children: [/* @__PURE__ */
|
|
741
|
+
children: [/* @__PURE__ */ J(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
735
742
|
})]
|
|
736
|
-
}), t.length > 0 ? /* @__PURE__ */
|
|
743
|
+
}), t.length > 0 ? /* @__PURE__ */ J("div", {
|
|
737
744
|
className: "space-y-4",
|
|
738
|
-
children: t.map((t) => /* @__PURE__ */
|
|
745
|
+
children: t.map((t) => /* @__PURE__ */ Y("div", {
|
|
739
746
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
|
|
740
747
|
children: [
|
|
741
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ Y("div", {
|
|
742
749
|
className: "flex items-start justify-between",
|
|
743
|
-
children: [/* @__PURE__ */
|
|
750
|
+
children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
|
|
744
751
|
className: "flex items-center gap-2",
|
|
745
|
-
children: [/* @__PURE__ */
|
|
752
|
+
children: [/* @__PURE__ */ J("h3", {
|
|
746
753
|
className: "font-medium",
|
|
747
754
|
children: t.name
|
|
748
|
-
}), /* @__PURE__ */
|
|
755
|
+
}), /* @__PURE__ */ J(b, {
|
|
749
756
|
status: t.status,
|
|
750
757
|
type: "webhook"
|
|
751
758
|
})]
|
|
752
|
-
}), t.description && /* @__PURE__ */
|
|
759
|
+
}), t.description && /* @__PURE__ */ J("p", {
|
|
753
760
|
className: "text-sm text-text-secondary mt-1",
|
|
754
761
|
children: t.description
|
|
755
|
-
})] }), /* @__PURE__ */
|
|
762
|
+
})] }), /* @__PURE__ */ J("button", {
|
|
756
763
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
757
764
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
758
|
-
children: /* @__PURE__ */
|
|
765
|
+
children: /* @__PURE__ */ J(ue, { size: 20 })
|
|
759
766
|
})]
|
|
760
767
|
}),
|
|
761
|
-
/* @__PURE__ */
|
|
768
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
762
769
|
className: "text-xs text-text-secondary mb-1",
|
|
763
770
|
children: a("devportal.endpointUrl", "Endpoint URL")
|
|
764
|
-
}), /* @__PURE__ */
|
|
771
|
+
}), /* @__PURE__ */ J("code", {
|
|
765
772
|
className: "text-sm bg-bg-sunken px-2 py-1 rounded block truncate",
|
|
766
773
|
children: t.url
|
|
767
774
|
})] }),
|
|
768
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
769
776
|
className: "text-xs text-text-secondary mb-2",
|
|
770
777
|
children: a("devportal.events", "Events")
|
|
771
|
-
}), /* @__PURE__ */
|
|
778
|
+
}), /* @__PURE__ */ J("div", {
|
|
772
779
|
className: "flex flex-wrap gap-2",
|
|
773
|
-
children: t.events.map((e) => /* @__PURE__ */
|
|
780
|
+
children: t.events.map((e) => /* @__PURE__ */ J("span", {
|
|
774
781
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs",
|
|
775
782
|
children: e
|
|
776
783
|
}, e))
|
|
777
784
|
})] }),
|
|
778
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ Y("div", {
|
|
779
786
|
className: "grid gap-4 sm:grid-cols-4 text-sm",
|
|
780
787
|
children: [
|
|
781
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
782
789
|
className: "text-xs text-text-secondary",
|
|
783
790
|
children: a("devportal.success", "Success")
|
|
784
|
-
}), /* @__PURE__ */
|
|
791
|
+
}), /* @__PURE__ */ J("p", {
|
|
785
792
|
className: "font-medium text-status-success-text",
|
|
786
793
|
children: t.successCount.toLocaleString()
|
|
787
794
|
})] }),
|
|
788
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
789
796
|
className: "text-xs text-text-secondary",
|
|
790
797
|
children: a("devportal.failed", "Failed")
|
|
791
|
-
}), /* @__PURE__ */
|
|
798
|
+
}), /* @__PURE__ */ J("p", {
|
|
792
799
|
className: "font-medium text-status-error-text",
|
|
793
800
|
children: t.failureCount.toLocaleString()
|
|
794
801
|
})] }),
|
|
795
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
796
803
|
className: "text-xs text-text-secondary",
|
|
797
804
|
children: a("devportal.successRate", "Success Rate")
|
|
798
|
-
}), /* @__PURE__ */
|
|
805
|
+
}), /* @__PURE__ */ Y("p", {
|
|
799
806
|
className: "font-medium",
|
|
800
807
|
children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
|
|
801
808
|
})] }),
|
|
802
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
803
810
|
className: "text-xs text-text-secondary",
|
|
804
811
|
children: a("devportal.lastTriggered", "Last Triggered")
|
|
805
|
-
}), /* @__PURE__ */
|
|
812
|
+
}), /* @__PURE__ */ J("p", {
|
|
806
813
|
className: "font-medium",
|
|
807
814
|
children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
|
|
808
815
|
})] })
|
|
@@ -810,29 +817,29 @@ var Ee = [
|
|
|
810
817
|
})
|
|
811
818
|
]
|
|
812
819
|
}, t.id))
|
|
813
|
-
}) : /* @__PURE__ */
|
|
820
|
+
}) : /* @__PURE__ */ J(r, {
|
|
814
821
|
illustration: "empty-notifications",
|
|
815
|
-
icon: /* @__PURE__ */
|
|
822
|
+
icon: /* @__PURE__ */ J(G, { size: 32 }),
|
|
816
823
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
817
824
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
818
|
-
action: /* @__PURE__ */
|
|
825
|
+
action: /* @__PURE__ */ Y("button", {
|
|
819
826
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
820
827
|
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",
|
|
821
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ J(H, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
822
829
|
})
|
|
823
830
|
})]
|
|
824
831
|
});
|
|
825
|
-
},
|
|
832
|
+
}, Pe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
826
833
|
let { t: p } = I(), m = (e, t) => {
|
|
827
834
|
let n = p(e);
|
|
828
835
|
return n === e ? t : n;
|
|
829
836
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
830
|
-
return /* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ Y("div", {
|
|
831
838
|
className: "space-y-6",
|
|
832
839
|
children: [
|
|
833
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ Y("div", {
|
|
834
841
|
className: "flex items-center justify-between",
|
|
835
|
-
children: [/* @__PURE__ */
|
|
842
|
+
children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
|
|
836
843
|
className: "text-sm text-text-secondary",
|
|
837
844
|
children: [
|
|
838
845
|
n.length,
|
|
@@ -843,7 +850,7 @@ var Ee = [
|
|
|
843
850
|
" ",
|
|
844
851
|
e
|
|
845
852
|
]
|
|
846
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
853
|
+
}), h.length > 0 && /* @__PURE__ */ Y("p", {
|
|
847
854
|
className: "text-xs text-text-secondary mt-0.5",
|
|
848
855
|
children: [
|
|
849
856
|
h.length,
|
|
@@ -855,44 +862,44 @@ var Ee = [
|
|
|
855
862
|
" ",
|
|
856
863
|
m("devportal.revokedExpired", "revoked/expired")
|
|
857
864
|
]
|
|
858
|
-
})] }), /* @__PURE__ */
|
|
865
|
+
})] }), /* @__PURE__ */ Y("button", {
|
|
859
866
|
onClick: i,
|
|
860
867
|
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",
|
|
861
|
-
children: [/* @__PURE__ */
|
|
868
|
+
children: [/* @__PURE__ */ J(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
862
869
|
})]
|
|
863
870
|
}),
|
|
864
|
-
h.length > 0 && /* @__PURE__ */
|
|
871
|
+
h.length > 0 && /* @__PURE__ */ J("div", {
|
|
865
872
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
866
|
-
children: /* @__PURE__ */
|
|
873
|
+
children: /* @__PURE__ */ Y("div", {
|
|
867
874
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
868
|
-
children: [/* @__PURE__ */
|
|
875
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
869
876
|
className: "flex flex-wrap items-center gap-3",
|
|
870
|
-
children: [/* @__PURE__ */
|
|
877
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
871
878
|
className: "flex items-center gap-2",
|
|
872
|
-
children: [/* @__PURE__ */
|
|
879
|
+
children: [/* @__PURE__ */ J(S, {
|
|
873
880
|
checked: d,
|
|
874
881
|
indeterminate: f,
|
|
875
882
|
onChange: c,
|
|
876
883
|
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
877
|
-
}), /* @__PURE__ */
|
|
884
|
+
}), /* @__PURE__ */ J("span", {
|
|
878
885
|
className: "text-sm font-medium",
|
|
879
886
|
children: m("devportal.selectAllActive", "Select all active")
|
|
880
887
|
})]
|
|
881
|
-
}), o.size > 0 && /* @__PURE__ */
|
|
888
|
+
}), o.size > 0 && /* @__PURE__ */ J("button", {
|
|
882
889
|
onClick: l,
|
|
883
890
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
884
891
|
children: m("devportal.clearSelection", "Clear selection")
|
|
885
892
|
})]
|
|
886
|
-
}), /* @__PURE__ */
|
|
893
|
+
}), /* @__PURE__ */ Y("div", {
|
|
887
894
|
className: "flex flex-wrap items-center gap-2",
|
|
888
|
-
children: [/* @__PURE__ */
|
|
895
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
889
896
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
890
897
|
children: [
|
|
891
898
|
o.size,
|
|
892
899
|
" ",
|
|
893
900
|
m("devportal.selected", "selected")
|
|
894
901
|
]
|
|
895
|
-
}), /* @__PURE__ */
|
|
902
|
+
}), /* @__PURE__ */ Y("button", {
|
|
896
903
|
onClick: u,
|
|
897
904
|
disabled: o.size === 0,
|
|
898
905
|
className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -901,33 +908,33 @@ var Ee = [
|
|
|
901
908
|
})]
|
|
902
909
|
})
|
|
903
910
|
}),
|
|
904
|
-
n.length > 0 ? /* @__PURE__ */
|
|
911
|
+
n.length > 0 ? /* @__PURE__ */ J("div", {
|
|
905
912
|
className: "space-y-4",
|
|
906
|
-
children: n.map((e) => /* @__PURE__ */
|
|
913
|
+
children: n.map((e) => /* @__PURE__ */ Y("div", {
|
|
907
914
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
|
|
908
915
|
children: [
|
|
909
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ Y("div", {
|
|
910
917
|
className: "flex items-start justify-between",
|
|
911
|
-
children: [/* @__PURE__ */
|
|
918
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
912
919
|
className: "flex items-start gap-3",
|
|
913
|
-
children: [e.status === "ACTIVE" && /* @__PURE__ */
|
|
920
|
+
children: [e.status === "ACTIVE" && /* @__PURE__ */ J("div", {
|
|
914
921
|
onClick: (e) => e.stopPropagation(),
|
|
915
|
-
children: /* @__PURE__ */
|
|
922
|
+
children: /* @__PURE__ */ J(S, {
|
|
916
923
|
checked: o.has(e.id),
|
|
917
924
|
onChange: (t) => s(e.id, t),
|
|
918
925
|
ariaLabel: `Select delegation ${e.id}`,
|
|
919
926
|
className: "mt-1"
|
|
920
927
|
})
|
|
921
|
-
}), /* @__PURE__ */
|
|
928
|
+
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
|
|
922
929
|
className: "flex items-center gap-2",
|
|
923
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ Y("h3", {
|
|
924
931
|
className: "font-medium",
|
|
925
932
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
926
|
-
}), /* @__PURE__ */
|
|
927
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
933
|
+
}), /* @__PURE__ */ J("span", {
|
|
934
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Ee[e.status]),
|
|
928
935
|
children: e.status
|
|
929
936
|
})]
|
|
930
|
-
}), /* @__PURE__ */
|
|
937
|
+
}), /* @__PURE__ */ Y("p", {
|
|
931
938
|
className: "text-sm text-text-secondary mt-1",
|
|
932
939
|
children: [
|
|
933
940
|
m("devportal.granted", "Granted"),
|
|
@@ -939,55 +946,55 @@ var Ee = [
|
|
|
939
946
|
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
940
947
|
]
|
|
941
948
|
})] })]
|
|
942
|
-
}), e.status === "ACTIVE" && /* @__PURE__ */
|
|
949
|
+
}), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
|
|
943
950
|
onClick: () => a(e.id),
|
|
944
951
|
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",
|
|
945
|
-
children: [/* @__PURE__ */
|
|
952
|
+
children: [/* @__PURE__ */ J(ge, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
946
953
|
})]
|
|
947
954
|
}),
|
|
948
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
949
956
|
className: "text-xs text-text-secondary mb-2",
|
|
950
957
|
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
951
|
-
}), /* @__PURE__ */
|
|
958
|
+
}), /* @__PURE__ */ J("div", {
|
|
952
959
|
className: "flex flex-wrap gap-2",
|
|
953
|
-
children: e.scopes.map((e) => /* @__PURE__ */
|
|
960
|
+
children: e.scopes.map((e) => /* @__PURE__ */ J("span", {
|
|
954
961
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
955
962
|
children: e
|
|
956
963
|
}, e))
|
|
957
964
|
})] }),
|
|
958
|
-
e.workspaceIds.length > 0 && /* @__PURE__ */
|
|
965
|
+
e.workspaceIds.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
959
966
|
className: "text-xs text-text-secondary mb-2",
|
|
960
967
|
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
961
|
-
}), /* @__PURE__ */
|
|
968
|
+
}), /* @__PURE__ */ J("div", {
|
|
962
969
|
className: "flex flex-wrap gap-2",
|
|
963
|
-
children: e.workspaceIds.map((e) => /* @__PURE__ */
|
|
970
|
+
children: e.workspaceIds.map((e) => /* @__PURE__ */ J("code", {
|
|
964
971
|
className: "rounded bg-bg-sunken px-2 py-0.5 text-xs",
|
|
965
972
|
children: e
|
|
966
973
|
}, e))
|
|
967
974
|
})] }),
|
|
968
|
-
/* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ Y("div", {
|
|
969
976
|
className: "flex items-center gap-4 text-xs text-text-secondary",
|
|
970
977
|
children: [
|
|
971
|
-
e.expiresAt && /* @__PURE__ */
|
|
978
|
+
e.expiresAt && /* @__PURE__ */ Y("span", {
|
|
972
979
|
className: "flex items-center gap-1",
|
|
973
980
|
children: [
|
|
974
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ J(oe, { size: 12 }),
|
|
975
982
|
m("devportal.expires", "Expires"),
|
|
976
983
|
" ",
|
|
977
984
|
new Date(e.expiresAt).toLocaleDateString()
|
|
978
985
|
]
|
|
979
986
|
}),
|
|
980
|
-
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */
|
|
987
|
+
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ Y("span", {
|
|
981
988
|
className: "flex items-center gap-1",
|
|
982
|
-
children: [/* @__PURE__ */
|
|
989
|
+
children: [/* @__PURE__ */ J(R, {
|
|
983
990
|
size: 12,
|
|
984
991
|
className: "text-status-success-text"
|
|
985
992
|
}), m("devportal.noExpiration", "No expiration")]
|
|
986
993
|
}),
|
|
987
|
-
e.revokedAt && /* @__PURE__ */
|
|
994
|
+
e.revokedAt && /* @__PURE__ */ Y("span", {
|
|
988
995
|
className: "flex items-center gap-1",
|
|
989
996
|
children: [
|
|
990
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ J(ge, {
|
|
991
998
|
size: 12,
|
|
992
999
|
className: "text-status-error-text"
|
|
993
1000
|
}),
|
|
@@ -1000,53 +1007,53 @@ var Ee = [
|
|
|
1000
1007
|
})
|
|
1001
1008
|
]
|
|
1002
1009
|
}, e.id))
|
|
1003
|
-
}) : /* @__PURE__ */
|
|
1010
|
+
}) : /* @__PURE__ */ J(r, {
|
|
1004
1011
|
illustration: "empty-people",
|
|
1005
|
-
icon: /* @__PURE__ */
|
|
1012
|
+
icon: /* @__PURE__ */ J(he, { size: 32 }),
|
|
1006
1013
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1007
1014
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1008
|
-
action: /* @__PURE__ */
|
|
1015
|
+
action: /* @__PURE__ */ Y("button", {
|
|
1009
1016
|
onClick: i,
|
|
1010
1017
|
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",
|
|
1011
|
-
children: [/* @__PURE__ */
|
|
1018
|
+
children: [/* @__PURE__ */ J(H, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1012
1019
|
})
|
|
1013
1020
|
})
|
|
1014
1021
|
]
|
|
1015
1022
|
});
|
|
1016
|
-
},
|
|
1023
|
+
}, Fe = ({ analytics: e }) => {
|
|
1017
1024
|
let { t } = I(), n = (e, n) => {
|
|
1018
1025
|
let r = t(e);
|
|
1019
1026
|
return r === e ? n : r;
|
|
1020
1027
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
1021
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ Y("div", {
|
|
1022
1029
|
className: "space-y-6",
|
|
1023
|
-
children: [/* @__PURE__ */
|
|
1030
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1024
1031
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1025
1032
|
children: [
|
|
1026
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ J(Q, {
|
|
1027
1034
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1028
1035
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1029
1036
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1030
1037
|
}),
|
|
1031
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ J(Q, {
|
|
1032
1039
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1033
1040
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1034
1041
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1035
1042
|
}),
|
|
1036
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ J(Q, {
|
|
1037
1044
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1038
1045
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1039
1046
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1040
1047
|
}),
|
|
1041
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ J(Q, {
|
|
1042
1049
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1043
1050
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1044
1051
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1045
1052
|
})
|
|
1046
1053
|
]
|
|
1047
|
-
}), /* @__PURE__ */
|
|
1054
|
+
}), /* @__PURE__ */ J(_, {
|
|
1048
1055
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1049
|
-
children: e.length > 0 ? /* @__PURE__ */
|
|
1056
|
+
children: e.length > 0 ? /* @__PURE__ */ J(w, {
|
|
1050
1057
|
data: e,
|
|
1051
1058
|
keyField: "id",
|
|
1052
1059
|
columns: [
|
|
@@ -1086,19 +1093,19 @@ var Ee = [
|
|
|
1086
1093
|
render: (e) => e.sessions.toLocaleString()
|
|
1087
1094
|
}
|
|
1088
1095
|
]
|
|
1089
|
-
}) : /* @__PURE__ */
|
|
1096
|
+
}) : /* @__PURE__ */ J(r, {
|
|
1090
1097
|
illustration: "empty-data",
|
|
1091
|
-
icon: /* @__PURE__ */
|
|
1098
|
+
icon: /* @__PURE__ */ J(L, { size: 32 }),
|
|
1092
1099
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1093
1100
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1094
1101
|
})
|
|
1095
1102
|
})]
|
|
1096
1103
|
});
|
|
1097
|
-
},
|
|
1104
|
+
}, Ie = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Le = ({ app: t }) => {
|
|
1098
1105
|
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = I(), o = (e, t) => {
|
|
1099
1106
|
let n = a(e);
|
|
1100
1107
|
return n === e ? t : n;
|
|
1101
|
-
}, [s, c] = F(
|
|
1108
|
+
}, [s, c] = F(Ie), [l, u] = F("{}"), [d, f] = F(""), [p, m] = F(!1), [h, g] = F(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = F(i || ""), [y, b] = F(!1), x = M(async () => {
|
|
1102
1109
|
m(!0), f("");
|
|
1103
1110
|
try {
|
|
1104
1111
|
let e = {};
|
|
@@ -1132,21 +1139,21 @@ var Ee = [
|
|
|
1132
1139
|
]), S = M(() => {
|
|
1133
1140
|
i && v(i), b(!0);
|
|
1134
1141
|
}, [i]);
|
|
1135
|
-
return /* @__PURE__ */
|
|
1142
|
+
return /* @__PURE__ */ Y("div", {
|
|
1136
1143
|
className: "space-y-4",
|
|
1137
1144
|
children: [
|
|
1138
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ Y("div", {
|
|
1139
1146
|
className: "flex items-center justify-between",
|
|
1140
|
-
children: [/* @__PURE__ */
|
|
1147
|
+
children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("h3", {
|
|
1141
1148
|
className: "text-lg font-semibold",
|
|
1142
1149
|
children: o("devportal.apiPlayground", "API Playground")
|
|
1143
|
-
}), /* @__PURE__ */
|
|
1150
|
+
}), /* @__PURE__ */ Y("p", {
|
|
1144
1151
|
className: "text-sm text-text-secondary",
|
|
1145
1152
|
children: [
|
|
1146
1153
|
o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
|
|
1147
1154
|
" ",
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
t.appId && /* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ J("strong", { children: t.name }),
|
|
1156
|
+
t.appId && /* @__PURE__ */ Y("span", {
|
|
1150
1157
|
className: "ml-1 text-xs text-text-secondary",
|
|
1151
1158
|
children: [
|
|
1152
1159
|
"(OAuth App: ",
|
|
@@ -1155,39 +1162,39 @@ var Ee = [
|
|
|
1155
1162
|
]
|
|
1156
1163
|
})
|
|
1157
1164
|
]
|
|
1158
|
-
})] }), /* @__PURE__ */
|
|
1165
|
+
})] }), /* @__PURE__ */ Y("button", {
|
|
1159
1166
|
onClick: S,
|
|
1160
1167
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1161
|
-
children: [/* @__PURE__ */
|
|
1168
|
+
children: [/* @__PURE__ */ J(le, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1162
1169
|
})]
|
|
1163
1170
|
}),
|
|
1164
|
-
y && /* @__PURE__ */
|
|
1171
|
+
y && /* @__PURE__ */ Y("div", {
|
|
1165
1172
|
className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
|
|
1166
1173
|
children: [
|
|
1167
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ J("p", {
|
|
1168
1175
|
className: "font-medium text-status-info-text",
|
|
1169
1176
|
children: o("devportal.authenticationGuide", "Authentication Guide")
|
|
1170
1177
|
}),
|
|
1171
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ Y("p", {
|
|
1172
1179
|
className: "text-status-info-text",
|
|
1173
1180
|
children: [
|
|
1174
1181
|
o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
|
|
1175
1182
|
" ",
|
|
1176
|
-
/* @__PURE__ */
|
|
1183
|
+
/* @__PURE__ */ J("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
|
|
1177
1184
|
" ",
|
|
1178
1185
|
o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
|
|
1179
1186
|
]
|
|
1180
1187
|
}),
|
|
1181
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ J("pre", {
|
|
1182
1189
|
className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
|
|
1183
1190
|
children: "mutation {\n authenticateApp(input: {\n clientId: \"<your-client-id>\"\n clientSecret: \"<your-client-secret>\"\n scopes: []\n }) {\n accessToken\n tokenType\n expiresIn\n }\n}"
|
|
1184
1191
|
}),
|
|
1185
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ Y("p", {
|
|
1186
1193
|
className: "text-status-info-text",
|
|
1187
1194
|
children: [
|
|
1188
1195
|
o("devportal.useReturnedAccessToken", "Use the returned"),
|
|
1189
1196
|
" ",
|
|
1190
|
-
/* @__PURE__ */
|
|
1197
|
+
/* @__PURE__ */ J("code", {
|
|
1191
1198
|
className: "bg-status-info-bg-subtle px-1 rounded",
|
|
1192
1199
|
children: "accessToken"
|
|
1193
1200
|
}),
|
|
@@ -1195,129 +1202,129 @@ var Ee = [
|
|
|
1195
1202
|
o("devportal.asBearerToken", "as the Bearer token below.")
|
|
1196
1203
|
]
|
|
1197
1204
|
}),
|
|
1198
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ J("button", {
|
|
1199
1206
|
onClick: () => b(!1),
|
|
1200
1207
|
className: "text-xs text-accent-blue hover:underline",
|
|
1201
1208
|
children: o("devportal.dismiss", "Dismiss")
|
|
1202
1209
|
})
|
|
1203
1210
|
]
|
|
1204
1211
|
}),
|
|
1205
|
-
/* @__PURE__ */
|
|
1212
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1206
1213
|
className: "block text-sm font-medium mb-1",
|
|
1207
1214
|
children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
|
|
1208
|
-
}), /* @__PURE__ */
|
|
1215
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1209
1216
|
className: "flex gap-2",
|
|
1210
|
-
children: [/* @__PURE__ */
|
|
1217
|
+
children: [/* @__PURE__ */ J("input", {
|
|
1211
1218
|
type: "text",
|
|
1212
1219
|
value: h,
|
|
1213
1220
|
onChange: (e) => g(e.target.value),
|
|
1214
1221
|
className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
|
|
1215
|
-
}), /* @__PURE__ */
|
|
1222
|
+
}), /* @__PURE__ */ Y("select", {
|
|
1216
1223
|
onChange: (e) => g(e.target.value),
|
|
1217
1224
|
className: "rounded-md border px-3 py-2 text-sm bg-bg-surface",
|
|
1218
1225
|
value: h,
|
|
1219
|
-
children: [/* @__PURE__ */
|
|
1226
|
+
children: [/* @__PURE__ */ J("option", {
|
|
1220
1227
|
value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
|
|
1221
1228
|
children: o("devportal.globalGateway", "Global Gateway")
|
|
1222
|
-
}), /* @__PURE__ */
|
|
1229
|
+
}), /* @__PURE__ */ J("option", {
|
|
1223
1230
|
value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
|
|
1224
1231
|
children: o("devportal.workspaceGateway", "Workspace Gateway")
|
|
1225
1232
|
})]
|
|
1226
1233
|
})]
|
|
1227
1234
|
})] }),
|
|
1228
|
-
/* @__PURE__ */
|
|
1235
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1229
1236
|
className: "block text-sm font-medium mb-1",
|
|
1230
1237
|
children: o("devportal.bearerToken", "Bearer Token")
|
|
1231
|
-
}), /* @__PURE__ */
|
|
1238
|
+
}), /* @__PURE__ */ J("input", {
|
|
1232
1239
|
type: "password",
|
|
1233
1240
|
value: _,
|
|
1234
1241
|
onChange: (e) => v(e.target.value),
|
|
1235
1242
|
placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
|
|
1236
1243
|
className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
|
|
1237
1244
|
})] }),
|
|
1238
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ Y("div", {
|
|
1239
1246
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
1240
|
-
children: [/* @__PURE__ */
|
|
1247
|
+
children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1241
1248
|
className: "block text-sm font-medium mb-1",
|
|
1242
1249
|
children: o("devportal.query", "Query")
|
|
1243
|
-
}), /* @__PURE__ */
|
|
1250
|
+
}), /* @__PURE__ */ J("textarea", {
|
|
1244
1251
|
value: s,
|
|
1245
1252
|
onChange: (e) => c(e.target.value),
|
|
1246
1253
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
|
|
1247
1254
|
spellCheck: !1
|
|
1248
|
-
})] }), /* @__PURE__ */
|
|
1255
|
+
})] }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1249
1256
|
className: "block text-sm font-medium mb-1",
|
|
1250
1257
|
children: o("devportal.variablesJson", "Variables (JSON)")
|
|
1251
|
-
}), /* @__PURE__ */
|
|
1258
|
+
}), /* @__PURE__ */ J("textarea", {
|
|
1252
1259
|
value: l,
|
|
1253
1260
|
onChange: (e) => u(e.target.value),
|
|
1254
1261
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
|
|
1255
1262
|
spellCheck: !1
|
|
1256
1263
|
})] })]
|
|
1257
1264
|
}),
|
|
1258
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ Y("button", {
|
|
1259
1266
|
onClick: x,
|
|
1260
1267
|
disabled: p,
|
|
1261
1268
|
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",
|
|
1262
|
-
children: [p ? /* @__PURE__ */
|
|
1269
|
+
children: [p ? /* @__PURE__ */ J(V, {
|
|
1263
1270
|
size: 16,
|
|
1264
1271
|
className: "animate-spin"
|
|
1265
|
-
}) : /* @__PURE__ */
|
|
1272
|
+
}) : /* @__PURE__ */ J(z, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1266
1273
|
}),
|
|
1267
|
-
d && /* @__PURE__ */
|
|
1274
|
+
d && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
1268
1275
|
className: "block text-sm font-medium mb-1",
|
|
1269
1276
|
children: o("devportal.response", "Response")
|
|
1270
|
-
}), /* @__PURE__ */
|
|
1277
|
+
}), /* @__PURE__ */ J("pre", {
|
|
1271
1278
|
className: "w-full max-h-96 overflow-auto rounded-md border bg-bg-sunken p-4 text-xs font-mono",
|
|
1272
1279
|
children: d
|
|
1273
1280
|
})] })
|
|
1274
1281
|
]
|
|
1275
1282
|
});
|
|
1276
|
-
},
|
|
1283
|
+
}, Re = ({ 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 }) => {
|
|
1277
1284
|
let d = P(null), f = M(async (e) => {
|
|
1278
1285
|
try {
|
|
1279
1286
|
r((await s(e)).downloadUrl);
|
|
1280
1287
|
} catch {}
|
|
1281
1288
|
}, [s, r]);
|
|
1282
|
-
return /* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ Y("div", {
|
|
1283
1290
|
className: "space-y-1.5",
|
|
1284
1291
|
children: [
|
|
1285
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ J("label", {
|
|
1286
1293
|
className: "text-sm font-medium",
|
|
1287
1294
|
children: e
|
|
1288
1295
|
}),
|
|
1289
|
-
/* @__PURE__ */
|
|
1296
|
+
/* @__PURE__ */ Y("div", {
|
|
1290
1297
|
className: "flex gap-3 items-start",
|
|
1291
|
-
children: [/* @__PURE__ */
|
|
1298
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1292
1299
|
className: t("relative shrink-0 w-20 rounded-lg border border-border-subtle bg-bg-sunken overflow-hidden flex items-center justify-center", o),
|
|
1293
|
-
children: [n ? /* @__PURE__ */
|
|
1300
|
+
children: [n ? /* @__PURE__ */ J("img", {
|
|
1294
1301
|
src: n,
|
|
1295
1302
|
alt: e,
|
|
1296
1303
|
className: "w-full h-full object-cover"
|
|
1297
|
-
}) : /* @__PURE__ */
|
|
1304
|
+
}) : /* @__PURE__ */ J(W, {
|
|
1298
1305
|
size: 18,
|
|
1299
1306
|
className: "text-text-secondary opacity-40"
|
|
1300
|
-
}), c && /* @__PURE__ */
|
|
1307
|
+
}), c && /* @__PURE__ */ Y("div", {
|
|
1301
1308
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
1302
|
-
children: [/* @__PURE__ */
|
|
1309
|
+
children: [/* @__PURE__ */ J(V, {
|
|
1303
1310
|
size: 14,
|
|
1304
1311
|
className: "animate-spin text-white"
|
|
1305
|
-
}), /* @__PURE__ */
|
|
1312
|
+
}), /* @__PURE__ */ Y("span", {
|
|
1306
1313
|
className: "text-white text-xs",
|
|
1307
1314
|
children: [l, "%"]
|
|
1308
1315
|
})]
|
|
1309
1316
|
})]
|
|
1310
|
-
}), /* @__PURE__ */
|
|
1317
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1311
1318
|
className: "flex-1 space-y-1.5",
|
|
1312
1319
|
children: [
|
|
1313
|
-
/* @__PURE__ */
|
|
1320
|
+
/* @__PURE__ */ J("input", {
|
|
1314
1321
|
type: "url",
|
|
1315
1322
|
value: n,
|
|
1316
1323
|
onChange: (e) => r(e.target.value),
|
|
1317
1324
|
placeholder: "https://...",
|
|
1318
1325
|
className: "w-full rounded-md border border-border-subtle bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
|
|
1319
1326
|
}),
|
|
1320
|
-
/* @__PURE__ */
|
|
1327
|
+
/* @__PURE__ */ J("input", {
|
|
1321
1328
|
ref: d,
|
|
1322
1329
|
type: "file",
|
|
1323
1330
|
accept: a,
|
|
@@ -1327,27 +1334,27 @@ var Ee = [
|
|
|
1327
1334
|
t && f(t), e.target.value = "";
|
|
1328
1335
|
}
|
|
1329
1336
|
}),
|
|
1330
|
-
/* @__PURE__ */
|
|
1337
|
+
/* @__PURE__ */ Y("button", {
|
|
1331
1338
|
type: "button",
|
|
1332
1339
|
disabled: c,
|
|
1333
1340
|
onClick: () => d.current?.click(),
|
|
1334
1341
|
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",
|
|
1335
|
-
children: [/* @__PURE__ */
|
|
1342
|
+
children: [/* @__PURE__ */ J(W, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
1336
1343
|
}),
|
|
1337
|
-
u && /* @__PURE__ */
|
|
1344
|
+
u && /* @__PURE__ */ J("p", {
|
|
1338
1345
|
className: "text-xs text-status-error-text",
|
|
1339
1346
|
children: u
|
|
1340
1347
|
})
|
|
1341
1348
|
]
|
|
1342
1349
|
})]
|
|
1343
1350
|
}),
|
|
1344
|
-
i && /* @__PURE__ */
|
|
1351
|
+
i && /* @__PURE__ */ J("p", {
|
|
1345
1352
|
className: "text-xs text-text-secondary",
|
|
1346
1353
|
children: i
|
|
1347
1354
|
})
|
|
1348
1355
|
]
|
|
1349
1356
|
});
|
|
1350
|
-
},
|
|
1357
|
+
}, ze = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
1351
1358
|
let s = P(null), c = M(async (t) => {
|
|
1352
1359
|
try {
|
|
1353
1360
|
let i = await r(t);
|
|
@@ -1360,45 +1367,45 @@ var Ee = [
|
|
|
1360
1367
|
]), l = (t) => {
|
|
1361
1368
|
n(e.filter((e, n) => n !== t));
|
|
1362
1369
|
};
|
|
1363
|
-
return /* @__PURE__ */
|
|
1370
|
+
return /* @__PURE__ */ Y("div", {
|
|
1364
1371
|
className: "space-y-2",
|
|
1365
1372
|
children: [
|
|
1366
|
-
/* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ J("label", {
|
|
1367
1374
|
className: "text-sm font-medium",
|
|
1368
1375
|
children: "Screenshots"
|
|
1369
1376
|
}),
|
|
1370
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ Y("div", {
|
|
1371
1378
|
className: "flex flex-wrap gap-3",
|
|
1372
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
1379
|
+
children: [e.map((e, t) => /* @__PURE__ */ Y("div", {
|
|
1373
1380
|
className: "relative group w-36 aspect-video rounded-lg border border-border-subtle overflow-hidden bg-bg-sunken",
|
|
1374
|
-
children: [/* @__PURE__ */
|
|
1381
|
+
children: [/* @__PURE__ */ J("img", {
|
|
1375
1382
|
src: e,
|
|
1376
1383
|
alt: `Screenshot ${t + 1}`,
|
|
1377
1384
|
className: "w-full h-full object-cover"
|
|
1378
|
-
}), /* @__PURE__ */
|
|
1385
|
+
}), /* @__PURE__ */ J("button", {
|
|
1379
1386
|
type: "button",
|
|
1380
1387
|
onClick: () => l(t),
|
|
1381
1388
|
className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1382
|
-
children: /* @__PURE__ */
|
|
1389
|
+
children: /* @__PURE__ */ J(K, { size: 12 })
|
|
1383
1390
|
})]
|
|
1384
|
-
}, t)), /* @__PURE__ */
|
|
1391
|
+
}, t)), /* @__PURE__ */ J("button", {
|
|
1385
1392
|
type: "button",
|
|
1386
1393
|
disabled: i,
|
|
1387
1394
|
onClick: () => s.current?.click(),
|
|
1388
1395
|
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"),
|
|
1389
|
-
children: i ? /* @__PURE__ */
|
|
1396
|
+
children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
|
|
1390
1397
|
size: 18,
|
|
1391
1398
|
className: "animate-spin text-primary"
|
|
1392
|
-
}), /* @__PURE__ */
|
|
1399
|
+
}), /* @__PURE__ */ Y("span", {
|
|
1393
1400
|
className: "text-xs",
|
|
1394
1401
|
children: [a, "%"]
|
|
1395
|
-
})] }) : /* @__PURE__ */
|
|
1402
|
+
})] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, { size: 18 }), /* @__PURE__ */ J("span", {
|
|
1396
1403
|
className: "text-xs",
|
|
1397
1404
|
children: "Add screenshot"
|
|
1398
1405
|
})] })
|
|
1399
1406
|
})]
|
|
1400
1407
|
}),
|
|
1401
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ J("input", {
|
|
1402
1409
|
ref: s,
|
|
1403
1410
|
type: "file",
|
|
1404
1411
|
accept: "image/png,image/jpeg,image/webp,image/gif",
|
|
@@ -1408,19 +1415,19 @@ var Ee = [
|
|
|
1408
1415
|
t && c(t), e.target.value = "";
|
|
1409
1416
|
}
|
|
1410
1417
|
}),
|
|
1411
|
-
o && /* @__PURE__ */
|
|
1418
|
+
o && /* @__PURE__ */ J("p", {
|
|
1412
1419
|
className: "text-xs text-status-error-text",
|
|
1413
1420
|
children: o
|
|
1414
1421
|
})
|
|
1415
1422
|
]
|
|
1416
1423
|
});
|
|
1417
|
-
},
|
|
1424
|
+
}, Be = new Set(["workflow", "template"]), Ve = [{
|
|
1418
1425
|
value: "FREE",
|
|
1419
1426
|
label: "Free"
|
|
1420
1427
|
}, {
|
|
1421
1428
|
value: "PAID",
|
|
1422
1429
|
label: "Paid"
|
|
1423
|
-
}],
|
|
1430
|
+
}], He = [
|
|
1424
1431
|
{
|
|
1425
1432
|
value: "agent",
|
|
1426
1433
|
label: "Agent"
|
|
@@ -1490,7 +1497,7 @@ var Ee = [
|
|
|
1490
1497
|
label: "Component"
|
|
1491
1498
|
}
|
|
1492
1499
|
];
|
|
1493
|
-
function
|
|
1500
|
+
function Ue(e) {
|
|
1494
1501
|
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") : "";
|
|
1495
1502
|
return {
|
|
1496
1503
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -1519,15 +1526,15 @@ function We(e) {
|
|
|
1519
1526
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
1520
1527
|
};
|
|
1521
1528
|
}
|
|
1522
|
-
var
|
|
1529
|
+
var We = ({ app: n }) => {
|
|
1523
1530
|
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o } = e(), { t: s } = I(), c = (e, t) => {
|
|
1524
1531
|
let n = s(e);
|
|
1525
1532
|
return n === e ? t : n;
|
|
1526
|
-
}, [l, u] = F(() =>
|
|
1533
|
+
}, [l, u] = F(() => Ue(n)), [d, f] = F(!1), [m, g] = F(!1), v = P(n);
|
|
1527
1534
|
v.current = n;
|
|
1528
1535
|
let [y] = h(), [b, { loading: x }] = p();
|
|
1529
1536
|
re(() => {
|
|
1530
|
-
u(
|
|
1537
|
+
u(Ue(v.current));
|
|
1531
1538
|
}, [n.id]);
|
|
1532
1539
|
let S = (e, t) => {
|
|
1533
1540
|
u((n) => ({
|
|
@@ -1537,7 +1544,7 @@ var Ge = ({ app: n }) => {
|
|
|
1537
1544
|
}, ee = async () => {
|
|
1538
1545
|
f(!0);
|
|
1539
1546
|
try {
|
|
1540
|
-
let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r =
|
|
1547
|
+
let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Be.has(l.manifestItemType), i = n.manifest ?? {}, a = {
|
|
1541
1548
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1542
1549
|
itemType: l.manifestItemType || void 0,
|
|
1543
1550
|
identity: {
|
|
@@ -1586,80 +1593,45 @@ var Ge = ({ app: n }) => {
|
|
|
1586
1593
|
} catch {
|
|
1587
1594
|
C("error");
|
|
1588
1595
|
}
|
|
1589
|
-
}, T = P(null),
|
|
1596
|
+
}, T = P(null), { upload: k, uploading: A, progress: te, error: ne } = j(r, i, a, o), { upload: N, uploading: ae, progress: L, error: se } = j(r, i, a, o, "/DevPortal/Assets"), { upload: z, uploading: ce, progress: le, error: ue } = j(r, i, a, o, "/DevPortal/Assets"), { upload: H, uploading: de, progress: fe, error: pe } = j(r, i, a, o, "/DevPortal/Assets"), U = M(async (e) => {
|
|
1590
1597
|
let t = e.target.files?.[0];
|
|
1591
1598
|
if (t) {
|
|
1592
1599
|
e.target.value = "";
|
|
1593
1600
|
try {
|
|
1594
|
-
let e = await
|
|
1601
|
+
let e = await k(t);
|
|
1595
1602
|
u((t) => ({
|
|
1596
1603
|
...t,
|
|
1597
1604
|
manifestRegistryUrl: e.downloadUrl
|
|
1598
1605
|
}));
|
|
1599
1606
|
} catch {}
|
|
1600
1607
|
}
|
|
1601
|
-
}, [
|
|
1608
|
+
}, [k]), he = M(async (e) => {
|
|
1602
1609
|
e.preventDefault(), g(!1);
|
|
1603
1610
|
let t = e.dataTransfer.files?.[0];
|
|
1604
1611
|
if (t) try {
|
|
1605
|
-
let e = await
|
|
1612
|
+
let e = await k(t);
|
|
1606
1613
|
u((t) => ({
|
|
1607
1614
|
...t,
|
|
1608
1615
|
manifestRegistryUrl: e.downloadUrl
|
|
1609
1616
|
}));
|
|
1610
1617
|
} catch {}
|
|
1611
|
-
}, [
|
|
1612
|
-
let t = e.target.files?.[0];
|
|
1613
|
-
if (!t) return;
|
|
1614
|
-
let n = new FileReader();
|
|
1615
|
-
n.onload = (e) => {
|
|
1616
|
-
try {
|
|
1617
|
-
let t = JSON.parse(e.target?.result), n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [];
|
|
1618
|
-
u((e) => ({
|
|
1619
|
-
...e,
|
|
1620
|
-
manifestItemType: typeof t.itemType == "string" ? t.itemType : e.manifestItemType,
|
|
1621
|
-
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.manifestDisplayName,
|
|
1622
|
-
manifestVersion: typeof n.version == "string" ? n.version : e.manifestVersion,
|
|
1623
|
-
manifestInstallType: typeof r.type == "string" ? r.type : e.manifestInstallType,
|
|
1624
|
-
manifestRegistryUrl: typeof r.url == "string" ? r.url : typeof r.registryUrl == "string" ? r.registryUrl : e.manifestRegistryUrl,
|
|
1625
|
-
manifestPermissionsText: a.length > 0 ? a.join("\n") : e.manifestPermissionsText,
|
|
1626
|
-
manifestMinPlatformVersion: typeof i.minPlatformVersion == "string" ? i.minPlatformVersion : e.manifestMinPlatformVersion
|
|
1627
|
-
}));
|
|
1628
|
-
} catch {}
|
|
1629
|
-
}, n.readAsText(t), e.target.value = "";
|
|
1630
|
-
}, []), ve = M(() => {
|
|
1631
|
-
let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Ve.has(l.manifestItemType), r = {
|
|
1632
|
-
manifestVersion: "1.0",
|
|
1633
|
-
itemType: l.manifestItemType || void 0,
|
|
1634
|
-
identity: {
|
|
1635
|
-
version: l.manifestVersion || "1.0.0",
|
|
1636
|
-
displayName: l.manifestDisplayName
|
|
1637
|
-
},
|
|
1638
|
-
...t ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
|
|
1639
|
-
type: l.manifestInstallType,
|
|
1640
|
-
...l.manifestInstallType === "zip" && l.manifestRegistryUrl ? { url: l.manifestRegistryUrl } : {}
|
|
1641
|
-
} } },
|
|
1642
|
-
permissions: e,
|
|
1643
|
-
compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
|
|
1644
|
-
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1645
|
-
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1646
|
-
}, [n.slug, l]), ye = Ve.has(l.manifestItemType), be = l.manifestInstallType === "builtin", Y = l.pricingType !== "FREE", xe = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1618
|
+
}, [k]), G = Be.has(l.manifestItemType), K = l.manifestInstallType === "builtin", ge = l.pricingType !== "FREE", _e = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1647
1619
|
n.status;
|
|
1648
|
-
let
|
|
1649
|
-
return /* @__PURE__ */
|
|
1620
|
+
let ve = n.status === "SUBMITTED", ye = n.status === "PUBLISHED";
|
|
1621
|
+
return /* @__PURE__ */ Y("div", {
|
|
1650
1622
|
className: "space-y-8 max-w-3xl",
|
|
1651
1623
|
children: [
|
|
1652
|
-
|
|
1624
|
+
ye ? /* @__PURE__ */ Y("div", {
|
|
1653
1625
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1654
|
-
children: [/* @__PURE__ */
|
|
1626
|
+
children: [/* @__PURE__ */ J(R, {
|
|
1655
1627
|
size: 16,
|
|
1656
1628
|
className: "text-success mt-0.5 shrink-0"
|
|
1657
|
-
}), /* @__PURE__ */
|
|
1629
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1658
1630
|
className: "text-sm",
|
|
1659
|
-
children: [/* @__PURE__ */
|
|
1631
|
+
children: [/* @__PURE__ */ J("span", {
|
|
1660
1632
|
className: "font-medium text-success",
|
|
1661
1633
|
children: c("devportal.storeListing.published", "Published")
|
|
1662
|
-
}), n.publishedAt && /* @__PURE__ */
|
|
1634
|
+
}), n.publishedAt && /* @__PURE__ */ Y("span", {
|
|
1663
1635
|
className: "text-text-secondary ml-2",
|
|
1664
1636
|
children: [
|
|
1665
1637
|
c("devportal.storeListing.since", "since"),
|
|
@@ -1668,69 +1640,69 @@ var Ge = ({ app: n }) => {
|
|
|
1668
1640
|
]
|
|
1669
1641
|
})]
|
|
1670
1642
|
})]
|
|
1671
|
-
}) :
|
|
1643
|
+
}) : ve ? /* @__PURE__ */ Y("div", {
|
|
1672
1644
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
1673
|
-
children: [/* @__PURE__ */
|
|
1645
|
+
children: [/* @__PURE__ */ J(oe, {
|
|
1674
1646
|
size: 16,
|
|
1675
1647
|
className: "text-primary mt-0.5 shrink-0"
|
|
1676
|
-
}), /* @__PURE__ */
|
|
1648
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1677
1649
|
className: "text-sm",
|
|
1678
1650
|
children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1651
|
+
/* @__PURE__ */ J("span", {
|
|
1680
1652
|
className: "font-medium text-primary",
|
|
1681
1653
|
children: c("devportal.storeListing.underReview", "Submitted for review")
|
|
1682
1654
|
}),
|
|
1683
|
-
n.submittedAt && /* @__PURE__ */
|
|
1655
|
+
n.submittedAt && /* @__PURE__ */ J("span", {
|
|
1684
1656
|
className: "text-text-secondary ml-2",
|
|
1685
1657
|
children: new Date(n.submittedAt).toLocaleDateString()
|
|
1686
1658
|
}),
|
|
1687
|
-
n.reviewStatus && /* @__PURE__ */
|
|
1659
|
+
n.reviewStatus && /* @__PURE__ */ Y("span", {
|
|
1688
1660
|
className: "text-text-secondary ml-2",
|
|
1689
1661
|
children: ["· ", n.reviewStatus]
|
|
1690
1662
|
})
|
|
1691
1663
|
]
|
|
1692
1664
|
})]
|
|
1693
|
-
}) : /* @__PURE__ */
|
|
1665
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1694
1666
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
1695
|
-
children: [/* @__PURE__ */
|
|
1667
|
+
children: [/* @__PURE__ */ J(ie, {
|
|
1696
1668
|
size: 16,
|
|
1697
1669
|
className: "text-warning mt-0.5 shrink-0"
|
|
1698
|
-
}), /* @__PURE__ */
|
|
1670
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1699
1671
|
className: "text-sm",
|
|
1700
|
-
children: [/* @__PURE__ */
|
|
1672
|
+
children: [/* @__PURE__ */ J("span", {
|
|
1701
1673
|
className: "font-medium text-warning",
|
|
1702
1674
|
children: c("devportal.storeListing.draft", "Draft")
|
|
1703
|
-
}), /* @__PURE__ */
|
|
1675
|
+
}), /* @__PURE__ */ J("span", {
|
|
1704
1676
|
className: "text-text-secondary ml-2",
|
|
1705
1677
|
children: c("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
1706
1678
|
})]
|
|
1707
1679
|
})]
|
|
1708
1680
|
}),
|
|
1709
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ J(_, {
|
|
1710
1682
|
title: c("devportal.package", "Package"),
|
|
1711
1683
|
description: c("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
1712
|
-
children: /* @__PURE__ */
|
|
1684
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1713
1685
|
className: "space-y-6",
|
|
1714
1686
|
children: [
|
|
1715
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ J(D, {
|
|
1716
1688
|
label: c("devportal.storeItemType", "Item Type"),
|
|
1717
1689
|
value: l.manifestItemType,
|
|
1718
1690
|
onChange: (e) => {
|
|
1719
1691
|
let t = e.target.value;
|
|
1720
|
-
S("manifestItemType", t),
|
|
1692
|
+
S("manifestItemType", t), Be.has(t) ? S("manifestInstallType", "json") : l.manifestInstallType === "json" && S("manifestInstallType", "zip");
|
|
1721
1693
|
},
|
|
1722
|
-
options:
|
|
1694
|
+
options: He,
|
|
1723
1695
|
placeholder: c("devportal.selectItemType", "Select item type…"),
|
|
1724
1696
|
hint: c("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
|
|
1725
1697
|
}),
|
|
1726
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ Y("div", {
|
|
1727
1699
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1728
|
-
children: [/* @__PURE__ */
|
|
1700
|
+
children: [/* @__PURE__ */ J(E, {
|
|
1729
1701
|
label: c("devportal.manifestDisplayName", "Display Name"),
|
|
1730
1702
|
value: l.manifestDisplayName,
|
|
1731
1703
|
onChange: (e) => S("manifestDisplayName", e.target.value),
|
|
1732
1704
|
placeholder: "My Awesome Node"
|
|
1733
|
-
}), /* @__PURE__ */
|
|
1705
|
+
}), /* @__PURE__ */ J(E, {
|
|
1734
1706
|
label: c("devportal.manifestVersion", "Version"),
|
|
1735
1707
|
value: l.manifestVersion,
|
|
1736
1708
|
onChange: (e) => S("manifestVersion", e.target.value),
|
|
@@ -1738,7 +1710,7 @@ var Ge = ({ app: n }) => {
|
|
|
1738
1710
|
hint: c("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1739
1711
|
})]
|
|
1740
1712
|
}),
|
|
1741
|
-
|
|
1713
|
+
G && /* @__PURE__ */ J(O, {
|
|
1742
1714
|
label: c("devportal.jsonContent", l.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1743
1715
|
value: l.manifestJsonContent,
|
|
1744
1716
|
onChange: (e) => S("manifestJsonContent", e.target.value),
|
|
@@ -1746,187 +1718,155 @@ var Ge = ({ app: n }) => {
|
|
|
1746
1718
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1747
1719
|
hint: c("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
1748
1720
|
}),
|
|
1749
|
-
!
|
|
1721
|
+
!G && /* @__PURE__ */ Y("div", {
|
|
1750
1722
|
className: "space-y-3",
|
|
1751
1723
|
children: [
|
|
1752
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ Y("div", {
|
|
1753
1725
|
className: "flex items-center justify-between flex-wrap gap-2",
|
|
1754
|
-
children: [/* @__PURE__ */
|
|
1726
|
+
children: [/* @__PURE__ */ J("label", {
|
|
1755
1727
|
className: "text-sm font-medium",
|
|
1756
1728
|
children: c("devportal.packageFile", "Package File")
|
|
1757
|
-
}), /* @__PURE__ */
|
|
1729
|
+
}), /* @__PURE__ */ Y("label", {
|
|
1758
1730
|
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
1759
|
-
children: [/* @__PURE__ */
|
|
1731
|
+
children: [/* @__PURE__ */ J("input", {
|
|
1760
1732
|
type: "checkbox",
|
|
1761
|
-
checked:
|
|
1733
|
+
checked: K,
|
|
1762
1734
|
onChange: (e) => S("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1763
1735
|
className: "h-4 w-4 rounded border-border-subtle accent-primary"
|
|
1764
|
-
}), /* @__PURE__ */
|
|
1736
|
+
}), /* @__PURE__ */ J("span", {
|
|
1765
1737
|
className: "text-text-secondary",
|
|
1766
1738
|
children: c("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
|
|
1767
1739
|
})]
|
|
1768
1740
|
})]
|
|
1769
1741
|
}),
|
|
1770
|
-
!
|
|
1771
|
-
/* @__PURE__ */
|
|
1742
|
+
!K && /* @__PURE__ */ Y(q, { children: [
|
|
1743
|
+
/* @__PURE__ */ Y("div", {
|
|
1772
1744
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1773
|
-
children: [/* @__PURE__ */
|
|
1745
|
+
children: [/* @__PURE__ */ J(B, {
|
|
1774
1746
|
size: 15,
|
|
1775
1747
|
className: "mt-0.5 shrink-0"
|
|
1776
|
-
}), /* @__PURE__ */
|
|
1748
|
+
}), /* @__PURE__ */ Y("span", { children: [
|
|
1777
1749
|
c("devportal.zipModelHint", "Package your code and a "),
|
|
1778
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ J("code", {
|
|
1779
1751
|
className: "rounded bg-bg-sunken px-1 py-0.5 font-mono text-xs",
|
|
1780
1752
|
children: "manifest.json"
|
|
1781
1753
|
}),
|
|
1782
1754
|
c("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
|
|
1783
1755
|
] })]
|
|
1784
1756
|
}),
|
|
1785
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ Y("div", {
|
|
1786
1758
|
onDragOver: (e) => {
|
|
1787
1759
|
e.preventDefault(), g(!0);
|
|
1788
1760
|
},
|
|
1789
1761
|
onDragLeave: () => g(!1),
|
|
1790
|
-
onDrop: (e) => void
|
|
1791
|
-
onClick: () => !
|
|
1792
|
-
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", m ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-border-strong hover:bg-bg-sunken",
|
|
1793
|
-
children: [/* @__PURE__ */
|
|
1794
|
-
ref:
|
|
1762
|
+
onDrop: (e) => void he(e),
|
|
1763
|
+
onClick: () => !A && T.current?.click(),
|
|
1764
|
+
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", m ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-border-strong hover:bg-bg-sunken", A && "pointer-events-none opacity-75"),
|
|
1765
|
+
children: [/* @__PURE__ */ J("input", {
|
|
1766
|
+
ref: T,
|
|
1795
1767
|
type: "file",
|
|
1796
1768
|
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1797
1769
|
className: "hidden",
|
|
1798
|
-
onChange: (e) => void
|
|
1799
|
-
}),
|
|
1800
|
-
/* @__PURE__ */
|
|
1770
|
+
onChange: (e) => void U(e)
|
|
1771
|
+
}), A ? /* @__PURE__ */ Y(q, { children: [
|
|
1772
|
+
/* @__PURE__ */ J(V, {
|
|
1801
1773
|
size: 28,
|
|
1802
1774
|
className: "animate-spin text-primary"
|
|
1803
1775
|
}),
|
|
1804
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
|
|
1805
1777
|
className: "text-sm font-medium",
|
|
1806
1778
|
children: [
|
|
1807
1779
|
c("devportal.uploading", "Uploading…"),
|
|
1808
1780
|
" ",
|
|
1809
|
-
|
|
1781
|
+
te,
|
|
1810
1782
|
"%"
|
|
1811
1783
|
]
|
|
1812
|
-
}), /* @__PURE__ */
|
|
1784
|
+
}), /* @__PURE__ */ J("p", {
|
|
1813
1785
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1814
1786
|
children: c("devportal.uploadingHint", "Stored securely in your workspace")
|
|
1815
1787
|
})] }),
|
|
1816
|
-
/* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ J("div", {
|
|
1817
1789
|
className: "w-48 h-1.5 rounded-full bg-bg-sunken overflow-hidden",
|
|
1818
|
-
children: /* @__PURE__ */
|
|
1790
|
+
children: /* @__PURE__ */ J("div", {
|
|
1819
1791
|
className: "h-full bg-action-primary-bg transition-all",
|
|
1820
|
-
style: { width: `${
|
|
1792
|
+
style: { width: `${te}%` }
|
|
1821
1793
|
})
|
|
1822
1794
|
})
|
|
1823
|
-
] }) :
|
|
1795
|
+
] }) : _e ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(R, {
|
|
1824
1796
|
size: 28,
|
|
1825
1797
|
className: "text-status-success-text"
|
|
1826
|
-
}), /* @__PURE__ */
|
|
1798
|
+
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
1827
1799
|
className: "text-sm font-medium",
|
|
1828
|
-
children:
|
|
1829
|
-
}), /* @__PURE__ */
|
|
1800
|
+
children: _e
|
|
1801
|
+
}), /* @__PURE__ */ J("p", {
|
|
1830
1802
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1831
1803
|
children: c("devportal.clickToReplace", "Click or drag to replace")
|
|
1832
|
-
})] })] }) : /* @__PURE__ */
|
|
1804
|
+
})] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, {
|
|
1833
1805
|
size: 28,
|
|
1834
1806
|
className: "text-text-secondary"
|
|
1835
|
-
}), /* @__PURE__ */
|
|
1807
|
+
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
1836
1808
|
className: "text-sm font-medium",
|
|
1837
1809
|
children: c("devportal.dropZipHere", "Drop your .zip here")
|
|
1838
|
-
}), /* @__PURE__ */
|
|
1810
|
+
}), /* @__PURE__ */ J("p", {
|
|
1839
1811
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1840
1812
|
children: c("devportal.orClickToBrowse", "or click to browse")
|
|
1841
1813
|
})] })] })]
|
|
1842
1814
|
}),
|
|
1843
|
-
|
|
1815
|
+
ne && /* @__PURE__ */ J("p", {
|
|
1844
1816
|
className: "text-xs text-status-error-text",
|
|
1845
|
-
children:
|
|
1817
|
+
children: ne
|
|
1846
1818
|
})
|
|
1847
1819
|
] }),
|
|
1848
|
-
|
|
1820
|
+
K && /* @__PURE__ */ Y("div", {
|
|
1849
1821
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1850
|
-
children: [/* @__PURE__ */
|
|
1822
|
+
children: [/* @__PURE__ */ J(B, {
|
|
1851
1823
|
size: 15,
|
|
1852
1824
|
className: "mt-0.5 shrink-0"
|
|
1853
|
-
}), /* @__PURE__ */
|
|
1854
|
-
})
|
|
1855
|
-
]
|
|
1856
|
-
}),
|
|
1857
|
-
/* @__PURE__ */ J("div", {
|
|
1858
|
-
className: "flex flex-wrap items-center gap-2 border-t pt-4",
|
|
1859
|
-
children: [
|
|
1860
|
-
/* @__PURE__ */ q("input", {
|
|
1861
|
-
ref: T,
|
|
1862
|
-
type: "file",
|
|
1863
|
-
accept: ".json,application/json",
|
|
1864
|
-
className: "hidden",
|
|
1865
|
-
onChange: _e
|
|
1866
|
-
}),
|
|
1867
|
-
/* @__PURE__ */ q("span", {
|
|
1868
|
-
className: "text-xs text-text-secondary mr-1",
|
|
1869
|
-
children: "manifest.json:"
|
|
1870
|
-
}),
|
|
1871
|
-
/* @__PURE__ */ J("button", {
|
|
1872
|
-
type: "button",
|
|
1873
|
-
onClick: () => T.current?.click(),
|
|
1874
|
-
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",
|
|
1875
|
-
children: [/* @__PURE__ */ q(W, { size: 12 }), c("devportal.importManifest", "Import")]
|
|
1876
|
-
}),
|
|
1877
|
-
/* @__PURE__ */ J("button", {
|
|
1878
|
-
type: "button",
|
|
1879
|
-
onClick: ve,
|
|
1880
|
-
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",
|
|
1881
|
-
children: [/* @__PURE__ */ q(se, { size: 12 }), c("devportal.exportManifest", "Export")]
|
|
1882
|
-
}),
|
|
1883
|
-
/* @__PURE__ */ q("span", {
|
|
1884
|
-
className: "text-xs text-text-secondary",
|
|
1885
|
-
children: c("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
|
|
1825
|
+
}), /* @__PURE__ */ J("span", { children: c("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
1886
1826
|
})
|
|
1887
1827
|
]
|
|
1888
1828
|
})
|
|
1889
1829
|
]
|
|
1890
1830
|
})
|
|
1891
1831
|
}),
|
|
1892
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ J(_, {
|
|
1893
1833
|
title: c("devportal.storePresentation", "Store Presence"),
|
|
1894
1834
|
description: c("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
1895
|
-
children: /* @__PURE__ */
|
|
1835
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1896
1836
|
className: "space-y-5",
|
|
1897
1837
|
children: [
|
|
1898
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ Y("div", {
|
|
1899
1839
|
className: "grid gap-5 sm:grid-cols-2",
|
|
1900
|
-
children: [/* @__PURE__ */
|
|
1840
|
+
children: [/* @__PURE__ */ J(Re, {
|
|
1901
1841
|
label: c("devportal.iconUrl", "Icon"),
|
|
1902
1842
|
value: l.iconUrl,
|
|
1903
1843
|
onChange: (e) => S("iconUrl", e),
|
|
1904
1844
|
hint: c("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
1905
1845
|
aspectClass: "aspect-square",
|
|
1906
|
-
upload:
|
|
1907
|
-
uploading:
|
|
1908
|
-
progress:
|
|
1909
|
-
error:
|
|
1910
|
-
}), /* @__PURE__ */
|
|
1846
|
+
upload: N,
|
|
1847
|
+
uploading: ae,
|
|
1848
|
+
progress: L,
|
|
1849
|
+
error: se
|
|
1850
|
+
}), /* @__PURE__ */ J(Re, {
|
|
1911
1851
|
label: c("devportal.bannerUrl", "Banner"),
|
|
1912
1852
|
value: l.bannerUrl,
|
|
1913
1853
|
onChange: (e) => S("bannerUrl", e),
|
|
1914
1854
|
hint: c("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
1915
1855
|
aspectClass: "aspect-video",
|
|
1916
|
-
upload:
|
|
1917
|
-
uploading:
|
|
1918
|
-
progress:
|
|
1919
|
-
error:
|
|
1856
|
+
upload: z,
|
|
1857
|
+
uploading: ce,
|
|
1858
|
+
progress: le,
|
|
1859
|
+
error: ue
|
|
1920
1860
|
})]
|
|
1921
1861
|
}),
|
|
1922
|
-
/* @__PURE__ */
|
|
1862
|
+
/* @__PURE__ */ J(E, {
|
|
1923
1863
|
label: c("devportal.videoUrl", "Demo Video URL"),
|
|
1924
1864
|
value: l.videoUrl,
|
|
1925
1865
|
onChange: (e) => S("videoUrl", e.target.value),
|
|
1926
1866
|
placeholder: "https://...",
|
|
1927
1867
|
hint: c("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
1928
1868
|
}),
|
|
1929
|
-
/* @__PURE__ */
|
|
1869
|
+
/* @__PURE__ */ J(O, {
|
|
1930
1870
|
label: c("devportal.shortDescription", "Short Description"),
|
|
1931
1871
|
value: l.shortDescription,
|
|
1932
1872
|
onChange: (e) => S("shortDescription", e.target.value),
|
|
@@ -1934,62 +1874,62 @@ var Ge = ({ app: n }) => {
|
|
|
1934
1874
|
rows: 2,
|
|
1935
1875
|
hint: `${l.shortDescription.length}/200 · ${c("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
1936
1876
|
}),
|
|
1937
|
-
/* @__PURE__ */
|
|
1877
|
+
/* @__PURE__ */ J(O, {
|
|
1938
1878
|
label: c("devportal.longDescription", "Full Description"),
|
|
1939
1879
|
value: l.description,
|
|
1940
1880
|
onChange: (e) => S("description", e.target.value),
|
|
1941
1881
|
rows: 5,
|
|
1942
1882
|
hint: c("devportal.fullDescHint", "Markdown supported")
|
|
1943
1883
|
}),
|
|
1944
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ J(ze, {
|
|
1945
1885
|
urls: l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
1946
1886
|
onChange: (e) => S("screenshotsText", e.join("\n")),
|
|
1947
|
-
upload:
|
|
1948
|
-
uploading:
|
|
1949
|
-
progress:
|
|
1950
|
-
error:
|
|
1887
|
+
upload: H,
|
|
1888
|
+
uploading: de,
|
|
1889
|
+
progress: fe,
|
|
1890
|
+
error: pe
|
|
1951
1891
|
})
|
|
1952
1892
|
]
|
|
1953
1893
|
})
|
|
1954
1894
|
}),
|
|
1955
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ J(_, {
|
|
1956
1896
|
title: c("devportal.linksPolicies", "Links & Policies"),
|
|
1957
1897
|
description: c("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
1958
|
-
children: /* @__PURE__ */
|
|
1898
|
+
children: /* @__PURE__ */ Y("div", {
|
|
1959
1899
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1960
1900
|
children: [
|
|
1961
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ J(E, {
|
|
1962
1902
|
label: c("devportal.websiteUrl", "Website"),
|
|
1963
1903
|
value: l.websiteUrl,
|
|
1964
1904
|
onChange: (e) => S("websiteUrl", e.target.value),
|
|
1965
1905
|
placeholder: "https://..."
|
|
1966
1906
|
}),
|
|
1967
|
-
/* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ J(E, {
|
|
1968
1908
|
label: c("devportal.documentationUrl", "Documentation"),
|
|
1969
1909
|
value: l.documentationUrl,
|
|
1970
1910
|
onChange: (e) => S("documentationUrl", e.target.value),
|
|
1971
1911
|
placeholder: "https://..."
|
|
1972
1912
|
}),
|
|
1973
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ J(E, {
|
|
1974
1914
|
label: c("devportal.githubUrl", "GitHub"),
|
|
1975
1915
|
value: l.githubUrl,
|
|
1976
1916
|
onChange: (e) => S("githubUrl", e.target.value),
|
|
1977
1917
|
placeholder: "https://github.com/..."
|
|
1978
1918
|
}),
|
|
1979
|
-
/* @__PURE__ */
|
|
1919
|
+
/* @__PURE__ */ J(E, {
|
|
1980
1920
|
label: c("devportal.supportUrl", "Support"),
|
|
1981
1921
|
value: l.supportUrl,
|
|
1982
1922
|
onChange: (e) => S("supportUrl", e.target.value),
|
|
1983
1923
|
placeholder: "https://..."
|
|
1984
1924
|
}),
|
|
1985
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ J(E, {
|
|
1986
1926
|
label: `${c("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
1987
1927
|
value: l.privacyPolicyUrl,
|
|
1988
1928
|
onChange: (e) => S("privacyPolicyUrl", e.target.value),
|
|
1989
1929
|
placeholder: "https://...",
|
|
1990
1930
|
hint: c("devportal.requiredForStore", "Required for store submission")
|
|
1991
1931
|
}),
|
|
1992
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ J(E, {
|
|
1993
1933
|
label: `${c("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
1994
1934
|
value: l.termsOfServiceUrl,
|
|
1995
1935
|
onChange: (e) => S("termsOfServiceUrl", e.target.value),
|
|
@@ -1999,31 +1939,31 @@ var Ge = ({ app: n }) => {
|
|
|
1999
1939
|
]
|
|
2000
1940
|
})
|
|
2001
1941
|
}),
|
|
2002
|
-
/* @__PURE__ */
|
|
1942
|
+
/* @__PURE__ */ J(_, {
|
|
2003
1943
|
title: c("devportal.pricing", "Pricing"),
|
|
2004
1944
|
description: c("devportal.pricingDescription", "How this item is priced in the marketplace"),
|
|
2005
|
-
children: /* @__PURE__ */
|
|
1945
|
+
children: /* @__PURE__ */ Y("div", {
|
|
2006
1946
|
className: "space-y-4",
|
|
2007
|
-
children: [/* @__PURE__ */
|
|
1947
|
+
children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
|
|
2008
1948
|
className: "mb-2 block text-sm font-medium",
|
|
2009
1949
|
children: c("devportal.pricingType", "Pricing Type")
|
|
2010
|
-
}), /* @__PURE__ */
|
|
1950
|
+
}), /* @__PURE__ */ J("div", {
|
|
2011
1951
|
className: "flex flex-wrap gap-2",
|
|
2012
|
-
children:
|
|
1952
|
+
children: Ve.map((e) => /* @__PURE__ */ J("button", {
|
|
2013
1953
|
type: "button",
|
|
2014
1954
|
onClick: () => S("pricingType", e.value),
|
|
2015
1955
|
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken"),
|
|
2016
1956
|
children: e.label
|
|
2017
1957
|
}, e.value))
|
|
2018
|
-
})] }),
|
|
1958
|
+
})] }), ge && /* @__PURE__ */ Y("div", {
|
|
2019
1959
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2020
|
-
children: [/* @__PURE__ */
|
|
1960
|
+
children: [/* @__PURE__ */ J(E, {
|
|
2021
1961
|
label: c("devportal.price", "Price"),
|
|
2022
1962
|
type: "number",
|
|
2023
1963
|
value: l.price,
|
|
2024
1964
|
onChange: (e) => S("price", e.target.value),
|
|
2025
1965
|
placeholder: "0.00"
|
|
2026
|
-
}), /* @__PURE__ */
|
|
1966
|
+
}), /* @__PURE__ */ J(E, {
|
|
2027
1967
|
label: c("devportal.currency", "Currency"),
|
|
2028
1968
|
value: l.currency,
|
|
2029
1969
|
onChange: (e) => S("currency", e.target.value),
|
|
@@ -2032,45 +1972,45 @@ var Ge = ({ app: n }) => {
|
|
|
2032
1972
|
})]
|
|
2033
1973
|
})
|
|
2034
1974
|
}),
|
|
2035
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ Y("div", {
|
|
2036
1976
|
className: "border-t pt-6 flex items-center gap-3 flex-wrap",
|
|
2037
|
-
children: [/* @__PURE__ */
|
|
1977
|
+
children: [/* @__PURE__ */ J("button", {
|
|
2038
1978
|
type: "button",
|
|
2039
1979
|
onClick: ee,
|
|
2040
1980
|
disabled: d,
|
|
2041
1981
|
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",
|
|
2042
|
-
children: d ? /* @__PURE__ */
|
|
1982
|
+
children: d ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
|
|
2043
1983
|
size: 16,
|
|
2044
1984
|
className: "animate-spin"
|
|
2045
|
-
}), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */
|
|
2046
|
-
}), !
|
|
1985
|
+
}), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(me, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
|
|
1986
|
+
}), !ye && /* @__PURE__ */ J("button", {
|
|
2047
1987
|
type: "button",
|
|
2048
1988
|
onClick: () => void w(),
|
|
2049
1989
|
disabled: x || d,
|
|
2050
1990
|
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-action-primary-bg/5 transition-colors disabled:opacity-50",
|
|
2051
|
-
children: x ? /* @__PURE__ */
|
|
1991
|
+
children: x ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
|
|
2052
1992
|
size: 16,
|
|
2053
1993
|
className: "animate-spin"
|
|
2054
|
-
}), c("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */
|
|
1994
|
+
}), c("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(R, { size: 16 }), ve ? c("devportal.resubmitForReview", "Resubmit for Review") : c("devportal.submitForReview", "Submit for Review")] })
|
|
2055
1995
|
})]
|
|
2056
1996
|
})
|
|
2057
1997
|
]
|
|
2058
1998
|
});
|
|
2059
1999
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2060
2000
|
let { t: i } = I();
|
|
2061
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ Y(be, {
|
|
2062
2002
|
treatment: "metric",
|
|
2063
2003
|
className: "p-4",
|
|
2064
2004
|
children: [
|
|
2065
|
-
/* @__PURE__ */
|
|
2005
|
+
/* @__PURE__ */ J("p", {
|
|
2066
2006
|
className: "text-sm text-text-secondary",
|
|
2067
2007
|
children: e
|
|
2068
2008
|
}),
|
|
2069
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ J("p", {
|
|
2070
2010
|
className: "text-2xl font-bold tabular-nums",
|
|
2071
2011
|
children: n
|
|
2072
2012
|
}),
|
|
2073
|
-
r !== void 0 && /* @__PURE__ */
|
|
2013
|
+
r !== void 0 && /* @__PURE__ */ Y("p", {
|
|
2074
2014
|
className: t("text-xs mt-1 tabular-nums", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-text-secondary"),
|
|
2075
2015
|
children: [
|
|
2076
2016
|
r > 0 ? "+" : "",
|
|
@@ -2084,13 +2024,13 @@ var Ge = ({ app: n }) => {
|
|
|
2084
2024
|
})
|
|
2085
2025
|
]
|
|
2086
2026
|
});
|
|
2087
|
-
}, $ = ({ label: e, url: t }) => /* @__PURE__ */
|
|
2027
|
+
}, $ = ({ label: e, url: t }) => /* @__PURE__ */ Y("a", {
|
|
2088
2028
|
href: t,
|
|
2089
2029
|
target: "_blank",
|
|
2090
2030
|
rel: "noopener noreferrer",
|
|
2091
2031
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2092
|
-
children: [/* @__PURE__ */
|
|
2093
|
-
}),
|
|
2032
|
+
children: [/* @__PURE__ */ J(z, { size: 14 }), e]
|
|
2033
|
+
}), Ge = [
|
|
2094
2034
|
{
|
|
2095
2035
|
id: "auth",
|
|
2096
2036
|
label: "Authentication",
|
|
@@ -2162,14 +2102,14 @@ var Ge = ({ app: n }) => {
|
|
|
2162
2102
|
description: "Access control configuration"
|
|
2163
2103
|
}
|
|
2164
2104
|
];
|
|
2165
|
-
function
|
|
2166
|
-
let t = Object.fromEntries(
|
|
2105
|
+
function Ke(e) {
|
|
2106
|
+
let t = Object.fromEntries(Ge.map((e) => [e.id, "none"]));
|
|
2167
2107
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2168
2108
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2169
2109
|
return t;
|
|
2170
2110
|
}
|
|
2171
|
-
var
|
|
2172
|
-
let t = e.manifest ?? {}, [n, r] = F(() =>
|
|
2111
|
+
var qe = ({ app: e }) => {
|
|
2112
|
+
let t = e.manifest ?? {}, [n, r] = F(() => Ke(t)), [i, a] = F(!1), [o, s] = F(!1), [c] = h(), l = (e, t) => {
|
|
2173
2113
|
s(!1), r((n) => ({
|
|
2174
2114
|
...n,
|
|
2175
2115
|
[e]: t
|
|
@@ -2200,41 +2140,41 @@ var Je = ({ app: e }) => {
|
|
|
2200
2140
|
"read",
|
|
2201
2141
|
"write"
|
|
2202
2142
|
];
|
|
2203
|
-
return /* @__PURE__ */
|
|
2143
|
+
return /* @__PURE__ */ J(_, {
|
|
2204
2144
|
title: "Permissions",
|
|
2205
2145
|
description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
|
|
2206
|
-
children: /* @__PURE__ */
|
|
2146
|
+
children: /* @__PURE__ */ Y("div", {
|
|
2207
2147
|
className: "space-y-4",
|
|
2208
2148
|
children: [
|
|
2209
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ J("div", {
|
|
2210
2150
|
className: "overflow-x-auto rounded-lg border border-border-subtle",
|
|
2211
|
-
children: /* @__PURE__ */
|
|
2151
|
+
children: /* @__PURE__ */ Y("table", {
|
|
2212
2152
|
className: "w-full text-sm",
|
|
2213
|
-
children: [/* @__PURE__ */
|
|
2153
|
+
children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", {
|
|
2214
2154
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
2215
|
-
children: [/* @__PURE__ */
|
|
2155
|
+
children: [/* @__PURE__ */ J("th", {
|
|
2216
2156
|
className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
|
|
2217
2157
|
children: "Resource"
|
|
2218
|
-
}), f.map((e) => /* @__PURE__ */
|
|
2158
|
+
}), f.map((e) => /* @__PURE__ */ J("th", {
|
|
2219
2159
|
className: "px-4 py-3 text-center font-medium text-text-secondary",
|
|
2220
2160
|
children: d[e]
|
|
2221
2161
|
}, e))]
|
|
2222
|
-
}) }), /* @__PURE__ */
|
|
2162
|
+
}) }), /* @__PURE__ */ J("tbody", {
|
|
2223
2163
|
className: "divide-y divide-border",
|
|
2224
|
-
children:
|
|
2164
|
+
children: Ge.map((e) => /* @__PURE__ */ Y("tr", {
|
|
2225
2165
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
2226
|
-
children: [/* @__PURE__ */
|
|
2166
|
+
children: [/* @__PURE__ */ Y("td", {
|
|
2227
2167
|
className: "px-4 py-3",
|
|
2228
|
-
children: [/* @__PURE__ */
|
|
2168
|
+
children: [/* @__PURE__ */ J("p", {
|
|
2229
2169
|
className: "font-medium text-text-primary",
|
|
2230
2170
|
children: e.label
|
|
2231
|
-
}), /* @__PURE__ */
|
|
2171
|
+
}), /* @__PURE__ */ J("p", {
|
|
2232
2172
|
className: "text-xs text-text-secondary",
|
|
2233
2173
|
children: e.description
|
|
2234
2174
|
})]
|
|
2235
|
-
}), f.map((t) => /* @__PURE__ */
|
|
2175
|
+
}), f.map((t) => /* @__PURE__ */ J("td", {
|
|
2236
2176
|
className: "px-4 py-3 text-center",
|
|
2237
|
-
children: /* @__PURE__ */
|
|
2177
|
+
children: /* @__PURE__ */ J("input", {
|
|
2238
2178
|
type: "radio",
|
|
2239
2179
|
name: `perm-${e.id}`,
|
|
2240
2180
|
value: t,
|
|
@@ -2247,27 +2187,27 @@ var Je = ({ app: e }) => {
|
|
|
2247
2187
|
})]
|
|
2248
2188
|
})
|
|
2249
2189
|
}),
|
|
2250
|
-
/* @__PURE__ */
|
|
2190
|
+
/* @__PURE__ */ Y("div", {
|
|
2251
2191
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2252
|
-
children: [/* @__PURE__ */
|
|
2192
|
+
children: [/* @__PURE__ */ J(B, {
|
|
2253
2193
|
size: 14,
|
|
2254
2194
|
className: "flex-shrink-0 mt-0.5"
|
|
2255
|
-
}), /* @__PURE__ */
|
|
2195
|
+
}), /* @__PURE__ */ Y("span", { children: [/* @__PURE__ */ J("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
2256
2196
|
}),
|
|
2257
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ Y("div", {
|
|
2258
2198
|
className: "flex items-center justify-end gap-3",
|
|
2259
|
-
children: [o && /* @__PURE__ */
|
|
2199
|
+
children: [o && /* @__PURE__ */ Y("span", {
|
|
2260
2200
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2261
|
-
children: [/* @__PURE__ */
|
|
2262
|
-
}), /* @__PURE__ */
|
|
2201
|
+
children: [/* @__PURE__ */ J(R, { size: 14 }), "Saved"]
|
|
2202
|
+
}), /* @__PURE__ */ Y("button", {
|
|
2263
2203
|
type: "button",
|
|
2264
2204
|
onClick: () => void u(),
|
|
2265
2205
|
disabled: i,
|
|
2266
2206
|
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",
|
|
2267
|
-
children: [i ? /* @__PURE__ */
|
|
2207
|
+
children: [i ? /* @__PURE__ */ J(V, {
|
|
2268
2208
|
size: 14,
|
|
2269
2209
|
className: "animate-spin"
|
|
2270
|
-
}) : /* @__PURE__ */
|
|
2210
|
+
}) : /* @__PURE__ */ J(U, { size: 14 }), "Save Permissions"]
|
|
2271
2211
|
})]
|
|
2272
2212
|
})
|
|
2273
2213
|
]
|
|
@@ -2275,6 +2215,6 @@ var Je = ({ app: e }) => {
|
|
|
2275
2215
|
});
|
|
2276
2216
|
};
|
|
2277
2217
|
//#endregion
|
|
2278
|
-
export {
|
|
2218
|
+
export { Z as ApplicationDetailPage };
|
|
2279
2219
|
|
|
2280
2220
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|