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