@burdenoff/microfe-devportal 2026.626.4 → 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.
|
@@ -12,18 +12,18 @@ 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
14
|
import { ConfirmDialog as k } from "../components/ConfirmDialog.js";
|
|
15
|
-
import { GrantDelegationModal as
|
|
16
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
17
|
-
import { useDevportalPermission as
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
22
|
-
import { useParams as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import { CTAOverflowMenu as
|
|
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
|
+
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 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
|
-
function
|
|
26
|
+
function we(e) {
|
|
27
27
|
return e ? {
|
|
28
28
|
id: e.id,
|
|
29
29
|
name: e.name,
|
|
@@ -72,7 +72,7 @@ function Se(e) {
|
|
|
72
72
|
updatedAt: e.updatedAt
|
|
73
73
|
} : null;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Te(e) {
|
|
76
76
|
return {
|
|
77
77
|
id: e.id,
|
|
78
78
|
applicationId: e.applicationId,
|
|
@@ -96,7 +96,7 @@ function Ce(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,
|
|
@@ -112,7 +112,7 @@ function X(e) {
|
|
|
112
112
|
createdAt: e.createdAt
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Ee(e) {
|
|
116
116
|
return {
|
|
117
117
|
id: e.id,
|
|
118
118
|
appId: e.appId,
|
|
@@ -134,102 +134,102 @@ function we(e) {
|
|
|
134
134
|
revokedBy: e.revokedBy || void 0
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
var
|
|
137
|
+
var De = [
|
|
138
138
|
{
|
|
139
139
|
id: "overview",
|
|
140
140
|
label: "Overview",
|
|
141
|
-
icon:
|
|
141
|
+
icon: se
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
id: "permissions",
|
|
145
145
|
label: "Permissions",
|
|
146
|
-
icon:
|
|
146
|
+
icon: H
|
|
147
147
|
},
|
|
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",
|
|
160
160
|
label: "Analytics",
|
|
161
|
-
icon:
|
|
161
|
+
icon: F
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
id: "playground",
|
|
165
165
|
label: "API Playground",
|
|
166
|
-
icon:
|
|
166
|
+
icon: R
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
id: "store-listing",
|
|
170
170
|
label: "Store Listing",
|
|
171
|
-
icon:
|
|
171
|
+
icon: he
|
|
172
172
|
}
|
|
173
|
-
],
|
|
173
|
+
], Oe = {
|
|
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
|
-
},
|
|
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
|
})]
|
|
195
|
-
}),
|
|
196
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } =
|
|
195
|
+
}), X = () => {
|
|
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 } = ne
|
|
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
|
-
}),
|
|
209
|
+
}), Te = Se?.appInstallations?.edges?.[0]?.node ?? null, Y = j((e) => {
|
|
210
210
|
i?.(`${o}${e}`);
|
|
211
|
-
}, [i, o]),
|
|
212
|
-
let e =
|
|
211
|
+
}, [i, o]), Ee = j(async () => {
|
|
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
|
-
}, [
|
|
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
|
-
]),
|
|
223
|
+
V,
|
|
224
|
+
Y
|
|
225
|
+
]), ke = j(async () => {
|
|
226
226
|
if (!(!S || !c)) try {
|
|
227
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
|
}
|
|
@@ -237,266 +237,278 @@ var Te = [
|
|
|
237
237
|
S,
|
|
238
238
|
c,
|
|
239
239
|
W,
|
|
240
|
-
|
|
241
|
-
]),
|
|
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
|
-
let
|
|
272
|
-
if (!
|
|
271
|
+
let X = we(I?.application);
|
|
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
|
|
284
|
-
...
|
|
283
|
+
let Z = X.appType === "NODE" || X.appType === "WORKFLOW", Fe = X.status !== "PUBLISHED" && (!Z || (I?.application?.versions?.totalCount ?? 0) > 0), Ie = [
|
|
284
|
+
...Z ? [] : [{
|
|
285
285
|
label: p("devportal.rotateSecret", "Rotate Secret"),
|
|
286
|
-
icon: /* @__PURE__ */
|
|
287
|
-
disabled: !
|
|
286
|
+
icon: /* @__PURE__ */ K(pe, { size: 16 }),
|
|
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:
|
|
309
|
-
onSelect: () => void
|
|
311
|
+
icon: /* @__PURE__ */ K(le, { size: 16 }),
|
|
312
|
+
disabled: _e || !c,
|
|
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__ */
|
|
320
|
-
title:
|
|
321
|
-
description:
|
|
323
|
+
return /* @__PURE__ */ q(g, {
|
|
324
|
+
title: X.name,
|
|
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__ */
|
|
345
|
-
status:
|
|
348
|
+
/* @__PURE__ */ K(b, {
|
|
349
|
+
status: X.status,
|
|
346
350
|
type: "app"
|
|
347
351
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
status:
|
|
352
|
+
/* @__PURE__ */ K(b, {
|
|
353
|
+
status: X.visibility,
|
|
350
354
|
type: "app"
|
|
351
355
|
}),
|
|
352
|
-
|
|
353
|
-
|
|
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
|
-
children: v[
|
|
360
|
+
children: v[X.appType] || X.appType
|
|
357
361
|
})
|
|
358
362
|
]
|
|
359
363
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
storageKey: `devportal-app-${
|
|
364
|
+
/* @__PURE__ */ K(Ce, {
|
|
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 ? [{
|
|
375
|
+
id: "versions",
|
|
376
|
+
label: p("devportal.versions", "Versions"),
|
|
377
|
+
description: p("devportal.appDetailStepVersions", "Upload a zip package to create your first version"),
|
|
378
|
+
icon: /* @__PURE__ */ K(L, { size: 16 }),
|
|
379
|
+
onClick: () => Y(`/apps/${X.id}/versions`)
|
|
380
|
+
}] : [{
|
|
371
381
|
id: "permissions",
|
|
372
382
|
label: p("devportal.permissions", "Permissions"),
|
|
373
383
|
description: p("devportal.appDetailStepPermissions", "Request the scopes your app needs"),
|
|
374
|
-
icon: /* @__PURE__ */
|
|
384
|
+
icon: /* @__PURE__ */ K(H, { size: 16 }),
|
|
375
385
|
onClick: () => T("permissions")
|
|
376
|
-
},
|
|
377
|
-
{
|
|
386
|
+
}, {
|
|
378
387
|
id: "webhooks",
|
|
379
388
|
label: p("devportal.webhooks", "Webhooks"),
|
|
380
389
|
description: p("devportal.appDetailStepWebhooks", "Subscribe to events for real-time updates"),
|
|
381
|
-
icon: /* @__PURE__ */
|
|
390
|
+
icon: /* @__PURE__ */ K(ge, { size: 16 }),
|
|
382
391
|
onClick: () => T("webhooks")
|
|
383
|
-
},
|
|
392
|
+
}],
|
|
384
393
|
{
|
|
385
394
|
id: "store-listing",
|
|
386
395
|
label: p("devportal.storeListing", "Store Listing"),
|
|
387
396
|
description: p("devportal.appDetailStepStore", "Prepare and publish to the marketplace"),
|
|
388
|
-
icon: /* @__PURE__ */
|
|
397
|
+
icon: /* @__PURE__ */ K(he, { size: 16 }),
|
|
389
398
|
onClick: () => T("store-listing")
|
|
390
399
|
}
|
|
391
400
|
]
|
|
392
401
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ K("div", {
|
|
394
403
|
className: "border-b",
|
|
395
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ K("nav", {
|
|
396
405
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
397
406
|
role: "tablist",
|
|
398
407
|
"aria-label": p("devportal.applicationSections", "Application sections"),
|
|
399
|
-
children:
|
|
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) => {
|
|
400
409
|
let n = e.icon;
|
|
401
|
-
return /* @__PURE__ */
|
|
410
|
+
return /* @__PURE__ */ q("button", {
|
|
402
411
|
id: `application-tab-${e.id}`,
|
|
403
412
|
role: "tab",
|
|
404
413
|
"aria-selected": w === e.id,
|
|
405
414
|
"aria-controls": `application-panel-${e.id}`,
|
|
406
415
|
onClick: () => T(e.id),
|
|
407
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"),
|
|
408
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ K(n, { size: 16 }), e.label]
|
|
409
418
|
}, e.id);
|
|
410
419
|
})
|
|
411
420
|
})
|
|
412
421
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ q("div", {
|
|
414
423
|
className: "mt-6",
|
|
415
424
|
id: `application-panel-${w}`,
|
|
416
425
|
role: "tabpanel",
|
|
417
426
|
"aria-labelledby": `application-tab-${w}`,
|
|
418
427
|
tabIndex: 0,
|
|
419
428
|
children: [
|
|
420
|
-
w === "overview" && /* @__PURE__ */
|
|
421
|
-
w === "permissions" && /* @__PURE__ */
|
|
422
|
-
w === "webhooks" && /* @__PURE__ */
|
|
423
|
-
appId:
|
|
424
|
-
onNavigate:
|
|
429
|
+
w === "overview" && /* @__PURE__ */ K(Pe, { app: X }),
|
|
430
|
+
w === "permissions" && /* @__PURE__ */ K(Ye, { app: X }),
|
|
431
|
+
w === "webhooks" && /* @__PURE__ */ K(je, {
|
|
432
|
+
appId: X.id,
|
|
433
|
+
onNavigate: Y
|
|
425
434
|
}),
|
|
426
|
-
w === "delegations" && /* @__PURE__ */
|
|
427
|
-
authAppId:
|
|
428
|
-
appName:
|
|
429
|
-
onGrantDelegation: () =>
|
|
430
|
-
onNavigate:
|
|
435
|
+
w === "delegations" && /* @__PURE__ */ K(Me, {
|
|
436
|
+
authAppId: X.appId || void 0,
|
|
437
|
+
appName: X.name,
|
|
438
|
+
onGrantDelegation: () => F(!0),
|
|
439
|
+
onNavigate: Y
|
|
431
440
|
}),
|
|
432
|
-
w === "analytics" && /* @__PURE__ */
|
|
433
|
-
w === "playground" && /* @__PURE__ */
|
|
434
|
-
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
|
+
})
|
|
435
447
|
]
|
|
436
448
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ K(k, {
|
|
438
450
|
open: E,
|
|
439
451
|
onOpenChange: D,
|
|
440
|
-
onConfirm:
|
|
452
|
+
onConfirm: Ee,
|
|
441
453
|
title: p("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
442
454
|
description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
443
455
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
444
456
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
445
457
|
variant: "warning",
|
|
446
|
-
loading:
|
|
458
|
+
loading: de
|
|
447
459
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ K(k, {
|
|
449
461
|
open: O,
|
|
450
|
-
onOpenChange:
|
|
451
|
-
onConfirm:
|
|
462
|
+
onOpenChange: A,
|
|
463
|
+
onConfirm: Oe,
|
|
452
464
|
title: p("devportal.deactivateApplication", "Deactivate Application"),
|
|
453
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."),
|
|
454
466
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
455
467
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
456
468
|
variant: "destructive",
|
|
457
|
-
loading:
|
|
469
|
+
loading: U
|
|
458
470
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
open:
|
|
461
|
-
onOpenChange:
|
|
462
|
-
appId:
|
|
463
|
-
appName:
|
|
464
|
-
appScopes:
|
|
471
|
+
/* @__PURE__ */ K(te, {
|
|
472
|
+
open: ae,
|
|
473
|
+
onOpenChange: F,
|
|
474
|
+
appId: X.appId || "",
|
|
475
|
+
appName: X.name,
|
|
476
|
+
appScopes: X.scopes?.map((e) => e.scope) ?? [],
|
|
465
477
|
onSuccess: () => {
|
|
466
|
-
|
|
478
|
+
F(!1);
|
|
467
479
|
}
|
|
468
480
|
})
|
|
469
481
|
]
|
|
470
482
|
});
|
|
471
|
-
},
|
|
472
|
-
let { t: n } =
|
|
483
|
+
}, je = ({ appId: e, onNavigate: t }) => {
|
|
484
|
+
let { t: n } = P(), r = (e, t) => {
|
|
473
485
|
let r = n(e);
|
|
474
486
|
return r === e ? t : r;
|
|
475
487
|
}, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
|
|
476
|
-
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, {
|
|
477
489
|
appId: e,
|
|
478
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
490
|
+
webhooks: (i?.webhooks ?? []).map(Te),
|
|
479
491
|
onNavigate: t
|
|
480
492
|
});
|
|
481
|
-
},
|
|
482
|
-
let { t: o } =
|
|
493
|
+
}, Me = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
494
|
+
let { t: o } = P(), s = (e, t) => {
|
|
483
495
|
let n = o(e);
|
|
484
496
|
return n === e ? t : n;
|
|
485
|
-
}, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] =
|
|
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) => {
|
|
486
498
|
y((n) => {
|
|
487
499
|
let r = new Set(n);
|
|
488
500
|
return t ? r.add(e) : r.delete(e), r;
|
|
489
501
|
});
|
|
490
|
-
}, []), D =
|
|
502
|
+
}, []), D = j((e) => {
|
|
491
503
|
y((t) => {
|
|
492
504
|
let n = new Set(t);
|
|
493
505
|
return C.forEach((t) => {
|
|
494
506
|
e ? n.add(t.id) : n.delete(t.id);
|
|
495
507
|
}), n;
|
|
496
508
|
});
|
|
497
|
-
}, [C]), O =
|
|
509
|
+
}, [C]), O = j(() => {
|
|
498
510
|
y(/* @__PURE__ */ new Set());
|
|
499
|
-
}, []),
|
|
511
|
+
}, []), te = j(async (e) => {
|
|
500
512
|
_(!0);
|
|
501
513
|
try {
|
|
502
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;
|
|
@@ -508,19 +520,19 @@ var Te = [
|
|
|
508
520
|
_(!1);
|
|
509
521
|
}
|
|
510
522
|
}, [p, f]);
|
|
511
|
-
return e ? l ? /* @__PURE__ */
|
|
512
|
-
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", {
|
|
513
525
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
514
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ q("div", {
|
|
515
527
|
className: "flex items-center justify-between gap-3",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
528
|
+
children: [/* @__PURE__ */ K("span", { children: b }), /* @__PURE__ */ K("button", {
|
|
517
529
|
onClick: () => x(null),
|
|
518
530
|
className: "text-status-success-text hover:text-status-success-text",
|
|
519
531
|
children: s("devportal.dismiss", "Dismiss")
|
|
520
532
|
})]
|
|
521
533
|
})
|
|
522
534
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ K(Fe, {
|
|
524
536
|
appName: t,
|
|
525
537
|
delegations: S,
|
|
526
538
|
onGrantDelegation: n,
|
|
@@ -533,13 +545,13 @@ var Te = [
|
|
|
533
545
|
allVisibleSelected: w,
|
|
534
546
|
partiallySelected: T
|
|
535
547
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ K(k, {
|
|
537
549
|
open: m.length > 0,
|
|
538
550
|
onOpenChange: (e) => {
|
|
539
551
|
e || h([]);
|
|
540
552
|
},
|
|
541
553
|
onConfirm: () => {
|
|
542
|
-
m.length > 0 &&
|
|
554
|
+
m.length > 0 && te(m);
|
|
543
555
|
},
|
|
544
556
|
title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
545
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."),
|
|
@@ -548,91 +560,91 @@ var Te = [
|
|
|
548
560
|
variant: "destructive",
|
|
549
561
|
loading: g
|
|
550
562
|
})
|
|
551
|
-
] }) : /* @__PURE__ */
|
|
563
|
+
] }) : /* @__PURE__ */ K(r, {
|
|
552
564
|
illustration: "empty-generic",
|
|
553
|
-
icon: /* @__PURE__ */
|
|
565
|
+
icon: /* @__PURE__ */ K(H, { size: 32 }),
|
|
554
566
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
555
567
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
556
|
-
action: /* @__PURE__ */
|
|
568
|
+
action: /* @__PURE__ */ q("button", {
|
|
557
569
|
onClick: () => a("/oauth"),
|
|
558
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",
|
|
559
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ K(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
560
572
|
})
|
|
561
573
|
});
|
|
562
|
-
},
|
|
563
|
-
let { t } =
|
|
574
|
+
}, Ne = ({ appId: e }) => {
|
|
575
|
+
let { t } = P(), n = (e, n) => {
|
|
564
576
|
let r = t(e);
|
|
565
577
|
return r === e ? n : r;
|
|
566
|
-
}, r =
|
|
578
|
+
}, r = M(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
567
579
|
applicationId: e,
|
|
568
580
|
period: "daily",
|
|
569
|
-
startDate:
|
|
581
|
+
startDate: M(() => {
|
|
570
582
|
let e = new Date(r);
|
|
571
583
|
return e.setDate(e.getDate() - 30), e;
|
|
572
584
|
}, [r]).toISOString(),
|
|
573
585
|
endDate: r.toISOString()
|
|
574
586
|
} });
|
|
575
|
-
return a ? /* @__PURE__ */
|
|
576
|
-
},
|
|
577
|
-
let { t } =
|
|
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 }) => {
|
|
589
|
+
let { t } = P(), n = (e, n) => {
|
|
578
590
|
let r = t(e);
|
|
579
591
|
return r === e ? n : r;
|
|
580
592
|
};
|
|
581
|
-
return /* @__PURE__ */
|
|
593
|
+
return /* @__PURE__ */ q("div", {
|
|
582
594
|
className: "grid gap-6 lg:grid-cols-3",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ q("div", {
|
|
584
596
|
className: "lg:col-span-2 space-y-6",
|
|
585
597
|
children: [
|
|
586
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ K(Se, { children: /* @__PURE__ */ q("div", {
|
|
587
599
|
className: "grid gap-4 sm:grid-cols-4",
|
|
588
600
|
children: [
|
|
589
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ K(Q, {
|
|
590
602
|
label: n("devportal.totalInstalls", "Total Installs"),
|
|
591
603
|
value: e.installCount.toLocaleString()
|
|
592
604
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ K(Q, {
|
|
594
606
|
label: n("devportal.activeInstalls", "Active Installs"),
|
|
595
607
|
value: e.activeInstallCount.toLocaleString()
|
|
596
608
|
}),
|
|
597
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ K(Q, {
|
|
598
610
|
label: n("devportal.averageRating", "Average Rating"),
|
|
599
611
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
600
612
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ K(Q, {
|
|
602
614
|
label: n("devportal.reviews", "Reviews"),
|
|
603
615
|
value: e.reviewCount.toString()
|
|
604
616
|
})
|
|
605
617
|
]
|
|
606
618
|
}) }),
|
|
607
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ K(_, {
|
|
608
620
|
title: n("devportal.description", "Description"),
|
|
609
|
-
children: /* @__PURE__ */
|
|
621
|
+
children: /* @__PURE__ */ K("div", {
|
|
610
622
|
className: "prose prose-sm max-w-none",
|
|
611
|
-
children: /* @__PURE__ */
|
|
623
|
+
children: /* @__PURE__ */ K("pre", {
|
|
612
624
|
className: "whitespace-pre-wrap font-sans text-sm text-text-primary bg-transparent p-0 m-0",
|
|
613
625
|
children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
|
|
614
626
|
})
|
|
615
627
|
})
|
|
616
628
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ K(_, {
|
|
618
630
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
619
|
-
children: /* @__PURE__ */
|
|
631
|
+
children: /* @__PURE__ */ q("div", {
|
|
620
632
|
className: "space-y-3",
|
|
621
|
-
children: [e.tags.length > 0 && /* @__PURE__ */
|
|
633
|
+
children: [e.tags.length > 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
622
634
|
className: "text-xs text-text-secondary mb-2",
|
|
623
635
|
children: n("devportal.tags", "Tags")
|
|
624
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ K("div", {
|
|
625
637
|
className: "flex flex-wrap gap-2",
|
|
626
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
638
|
+
children: e.tags.map((e) => /* @__PURE__ */ K("span", {
|
|
627
639
|
className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-primary",
|
|
628
640
|
children: e
|
|
629
641
|
}, e))
|
|
630
|
-
})] }), e.keywords.length > 0 && /* @__PURE__ */
|
|
642
|
+
})] }), e.keywords.length > 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
631
643
|
className: "text-xs text-text-secondary mb-2",
|
|
632
644
|
children: n("devportal.keywords", "Keywords")
|
|
633
|
-
}), /* @__PURE__ */
|
|
645
|
+
}), /* @__PURE__ */ K("div", {
|
|
634
646
|
className: "flex flex-wrap gap-2",
|
|
635
|
-
children: e.keywords.map((e) => /* @__PURE__ */
|
|
647
|
+
children: e.keywords.map((e) => /* @__PURE__ */ K("span", {
|
|
636
648
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-xs",
|
|
637
649
|
children: e
|
|
638
650
|
}, e))
|
|
@@ -640,14 +652,14 @@ var Te = [
|
|
|
640
652
|
})
|
|
641
653
|
})
|
|
642
654
|
]
|
|
643
|
-
}), /* @__PURE__ */
|
|
655
|
+
}), /* @__PURE__ */ q("div", {
|
|
644
656
|
className: "space-y-6",
|
|
645
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ K(_, {
|
|
646
658
|
title: n("devportal.details", "Details"),
|
|
647
|
-
children: /* @__PURE__ */
|
|
659
|
+
children: /* @__PURE__ */ K(T, { items: [
|
|
648
660
|
{
|
|
649
661
|
label: n("devportal.appId", "App ID"),
|
|
650
|
-
value: /* @__PURE__ */
|
|
662
|
+
value: /* @__PURE__ */ K("code", {
|
|
651
663
|
className: "text-xs",
|
|
652
664
|
children: e.id
|
|
653
665
|
})
|
|
@@ -683,32 +695,32 @@ var Te = [
|
|
|
683
695
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
684
696
|
}
|
|
685
697
|
] })
|
|
686
|
-
}), /* @__PURE__ */
|
|
698
|
+
}), /* @__PURE__ */ K(_, {
|
|
687
699
|
title: n("devportal.links", "Links"),
|
|
688
|
-
children: /* @__PURE__ */
|
|
700
|
+
children: /* @__PURE__ */ q("div", {
|
|
689
701
|
className: "space-y-2",
|
|
690
702
|
children: [
|
|
691
|
-
e.websiteUrl && /* @__PURE__ */
|
|
703
|
+
e.websiteUrl && /* @__PURE__ */ K($, {
|
|
692
704
|
label: n("devportal.website", "Website"),
|
|
693
705
|
url: e.websiteUrl
|
|
694
706
|
}),
|
|
695
|
-
e.documentationUrl && /* @__PURE__ */
|
|
707
|
+
e.documentationUrl && /* @__PURE__ */ K($, {
|
|
696
708
|
label: n("devportal.documentation", "Documentation"),
|
|
697
709
|
url: e.documentationUrl
|
|
698
710
|
}),
|
|
699
|
-
e.supportUrl && /* @__PURE__ */
|
|
711
|
+
e.supportUrl && /* @__PURE__ */ K($, {
|
|
700
712
|
label: n("devportal.support", "Support"),
|
|
701
713
|
url: e.supportUrl
|
|
702
714
|
}),
|
|
703
|
-
e.githubUrl && /* @__PURE__ */
|
|
715
|
+
e.githubUrl && /* @__PURE__ */ K($, {
|
|
704
716
|
label: n("devportal.github", "GitHub"),
|
|
705
717
|
url: e.githubUrl
|
|
706
718
|
}),
|
|
707
|
-
e.privacyPolicyUrl && /* @__PURE__ */
|
|
719
|
+
e.privacyPolicyUrl && /* @__PURE__ */ K($, {
|
|
708
720
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
709
721
|
url: e.privacyPolicyUrl
|
|
710
722
|
}),
|
|
711
|
-
e.termsOfServiceUrl && /* @__PURE__ */
|
|
723
|
+
e.termsOfServiceUrl && /* @__PURE__ */ K($, {
|
|
712
724
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
713
725
|
url: e.termsOfServiceUrl
|
|
714
726
|
})
|
|
@@ -717,16 +729,16 @@ var Te = [
|
|
|
717
729
|
})]
|
|
718
730
|
})]
|
|
719
731
|
});
|
|
720
|
-
},
|
|
721
|
-
let { t: i } =
|
|
732
|
+
}, Z = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
733
|
+
let { t: i } = P(), a = (e, t) => {
|
|
722
734
|
let n = i(e);
|
|
723
735
|
return n === e ? t : n;
|
|
724
736
|
};
|
|
725
|
-
return /* @__PURE__ */
|
|
737
|
+
return /* @__PURE__ */ q("div", {
|
|
726
738
|
className: "space-y-6",
|
|
727
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ q("div", {
|
|
728
740
|
className: "flex items-center justify-between",
|
|
729
|
-
children: [/* @__PURE__ */
|
|
741
|
+
children: [/* @__PURE__ */ q("p", {
|
|
730
742
|
className: "text-sm text-text-secondary",
|
|
731
743
|
children: [
|
|
732
744
|
t.length,
|
|
@@ -735,81 +747,81 @@ var Te = [
|
|
|
735
747
|
" ",
|
|
736
748
|
a("devportal.configured", "configured")
|
|
737
749
|
]
|
|
738
|
-
}), /* @__PURE__ */
|
|
750
|
+
}), /* @__PURE__ */ q("button", {
|
|
739
751
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
740
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",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
753
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
742
754
|
})]
|
|
743
|
-
}), t.length > 0 ? /* @__PURE__ */
|
|
755
|
+
}), t.length > 0 ? /* @__PURE__ */ K("div", {
|
|
744
756
|
className: "space-y-4",
|
|
745
|
-
children: t.map((t) => /* @__PURE__ */
|
|
757
|
+
children: t.map((t) => /* @__PURE__ */ q("div", {
|
|
746
758
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
|
|
747
759
|
children: [
|
|
748
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ q("div", {
|
|
749
761
|
className: "flex items-start justify-between",
|
|
750
|
-
children: [/* @__PURE__ */
|
|
762
|
+
children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("div", {
|
|
751
763
|
className: "flex items-center gap-2",
|
|
752
|
-
children: [/* @__PURE__ */
|
|
764
|
+
children: [/* @__PURE__ */ K("h3", {
|
|
753
765
|
className: "font-medium",
|
|
754
766
|
children: t.name
|
|
755
|
-
}), /* @__PURE__ */
|
|
767
|
+
}), /* @__PURE__ */ K(b, {
|
|
756
768
|
status: t.status,
|
|
757
769
|
type: "webhook"
|
|
758
770
|
})]
|
|
759
|
-
}), t.description && /* @__PURE__ */
|
|
771
|
+
}), t.description && /* @__PURE__ */ K("p", {
|
|
760
772
|
className: "text-sm text-text-secondary mt-1",
|
|
761
773
|
children: t.description
|
|
762
|
-
})] }), /* @__PURE__ */
|
|
774
|
+
})] }), /* @__PURE__ */ K("button", {
|
|
763
775
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
764
776
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
765
|
-
children: /* @__PURE__ */
|
|
777
|
+
children: /* @__PURE__ */ K(de, { size: 20 })
|
|
766
778
|
})]
|
|
767
779
|
}),
|
|
768
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
769
781
|
className: "text-xs text-text-secondary mb-1",
|
|
770
782
|
children: a("devportal.endpointUrl", "Endpoint URL")
|
|
771
|
-
}), /* @__PURE__ */
|
|
783
|
+
}), /* @__PURE__ */ K("code", {
|
|
772
784
|
className: "text-sm bg-bg-sunken px-2 py-1 rounded block truncate",
|
|
773
785
|
children: t.url
|
|
774
786
|
})] }),
|
|
775
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
776
788
|
className: "text-xs text-text-secondary mb-2",
|
|
777
789
|
children: a("devportal.events", "Events")
|
|
778
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ K("div", {
|
|
779
791
|
className: "flex flex-wrap gap-2",
|
|
780
|
-
children: t.events.map((e) => /* @__PURE__ */
|
|
792
|
+
children: t.events.map((e) => /* @__PURE__ */ K("span", {
|
|
781
793
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs",
|
|
782
794
|
children: e
|
|
783
795
|
}, e))
|
|
784
796
|
})] }),
|
|
785
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ q("div", {
|
|
786
798
|
className: "grid gap-4 sm:grid-cols-4 text-sm",
|
|
787
799
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
800
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
789
801
|
className: "text-xs text-text-secondary",
|
|
790
802
|
children: a("devportal.success", "Success")
|
|
791
|
-
}), /* @__PURE__ */
|
|
803
|
+
}), /* @__PURE__ */ K("p", {
|
|
792
804
|
className: "font-medium text-status-success-text",
|
|
793
805
|
children: t.successCount.toLocaleString()
|
|
794
806
|
})] }),
|
|
795
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
796
808
|
className: "text-xs text-text-secondary",
|
|
797
809
|
children: a("devportal.failed", "Failed")
|
|
798
|
-
}), /* @__PURE__ */
|
|
810
|
+
}), /* @__PURE__ */ K("p", {
|
|
799
811
|
className: "font-medium text-status-error-text",
|
|
800
812
|
children: t.failureCount.toLocaleString()
|
|
801
813
|
})] }),
|
|
802
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
803
815
|
className: "text-xs text-text-secondary",
|
|
804
816
|
children: a("devportal.successRate", "Success Rate")
|
|
805
|
-
}), /* @__PURE__ */
|
|
817
|
+
}), /* @__PURE__ */ q("p", {
|
|
806
818
|
className: "font-medium",
|
|
807
819
|
children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
|
|
808
820
|
})] }),
|
|
809
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
810
822
|
className: "text-xs text-text-secondary",
|
|
811
823
|
children: a("devportal.lastTriggered", "Last Triggered")
|
|
812
|
-
}), /* @__PURE__ */
|
|
824
|
+
}), /* @__PURE__ */ K("p", {
|
|
813
825
|
className: "font-medium",
|
|
814
826
|
children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
|
|
815
827
|
})] })
|
|
@@ -817,29 +829,29 @@ var Te = [
|
|
|
817
829
|
})
|
|
818
830
|
]
|
|
819
831
|
}, t.id))
|
|
820
|
-
}) : /* @__PURE__ */
|
|
832
|
+
}) : /* @__PURE__ */ K(r, {
|
|
821
833
|
illustration: "empty-notifications",
|
|
822
|
-
icon: /* @__PURE__ */
|
|
834
|
+
icon: /* @__PURE__ */ K(ge, { size: 32 }),
|
|
823
835
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
824
836
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
825
|
-
action: /* @__PURE__ */
|
|
837
|
+
action: /* @__PURE__ */ q("button", {
|
|
826
838
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
827
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",
|
|
828
|
-
children: [/* @__PURE__ */
|
|
840
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
829
841
|
})
|
|
830
842
|
})]
|
|
831
843
|
});
|
|
832
|
-
},
|
|
833
|
-
let { t: p } =
|
|
844
|
+
}, Fe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
845
|
+
let { t: p } = P(), m = (e, t) => {
|
|
834
846
|
let n = p(e);
|
|
835
847
|
return n === e ? t : n;
|
|
836
848
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
837
|
-
return /* @__PURE__ */
|
|
849
|
+
return /* @__PURE__ */ q("div", {
|
|
838
850
|
className: "space-y-6",
|
|
839
851
|
children: [
|
|
840
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ q("div", {
|
|
841
853
|
className: "flex items-center justify-between",
|
|
842
|
-
children: [/* @__PURE__ */
|
|
854
|
+
children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("p", {
|
|
843
855
|
className: "text-sm text-text-secondary",
|
|
844
856
|
children: [
|
|
845
857
|
n.length,
|
|
@@ -850,7 +862,7 @@ var Te = [
|
|
|
850
862
|
" ",
|
|
851
863
|
e
|
|
852
864
|
]
|
|
853
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
865
|
+
}), h.length > 0 && /* @__PURE__ */ q("p", {
|
|
854
866
|
className: "text-xs text-text-secondary mt-0.5",
|
|
855
867
|
children: [
|
|
856
868
|
h.length,
|
|
@@ -862,44 +874,44 @@ var Te = [
|
|
|
862
874
|
" ",
|
|
863
875
|
m("devportal.revokedExpired", "revoked/expired")
|
|
864
876
|
]
|
|
865
|
-
})] }), /* @__PURE__ */
|
|
877
|
+
})] }), /* @__PURE__ */ q("button", {
|
|
866
878
|
onClick: i,
|
|
867
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",
|
|
868
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
869
881
|
})]
|
|
870
882
|
}),
|
|
871
|
-
h.length > 0 && /* @__PURE__ */
|
|
883
|
+
h.length > 0 && /* @__PURE__ */ K("div", {
|
|
872
884
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
873
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ q("div", {
|
|
874
886
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
875
|
-
children: [/* @__PURE__ */
|
|
887
|
+
children: [/* @__PURE__ */ q("div", {
|
|
876
888
|
className: "flex flex-wrap items-center gap-3",
|
|
877
|
-
children: [/* @__PURE__ */
|
|
889
|
+
children: [/* @__PURE__ */ q("div", {
|
|
878
890
|
className: "flex items-center gap-2",
|
|
879
|
-
children: [/* @__PURE__ */
|
|
891
|
+
children: [/* @__PURE__ */ K(S, {
|
|
880
892
|
checked: d,
|
|
881
893
|
indeterminate: f,
|
|
882
894
|
onChange: c,
|
|
883
895
|
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
884
|
-
}), /* @__PURE__ */
|
|
896
|
+
}), /* @__PURE__ */ K("span", {
|
|
885
897
|
className: "text-sm font-medium",
|
|
886
898
|
children: m("devportal.selectAllActive", "Select all active")
|
|
887
899
|
})]
|
|
888
|
-
}), o.size > 0 && /* @__PURE__ */
|
|
900
|
+
}), o.size > 0 && /* @__PURE__ */ K("button", {
|
|
889
901
|
onClick: l,
|
|
890
902
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
891
903
|
children: m("devportal.clearSelection", "Clear selection")
|
|
892
904
|
})]
|
|
893
|
-
}), /* @__PURE__ */
|
|
905
|
+
}), /* @__PURE__ */ q("div", {
|
|
894
906
|
className: "flex flex-wrap items-center gap-2",
|
|
895
|
-
children: [/* @__PURE__ */
|
|
907
|
+
children: [/* @__PURE__ */ q("span", {
|
|
896
908
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
897
909
|
children: [
|
|
898
910
|
o.size,
|
|
899
911
|
" ",
|
|
900
912
|
m("devportal.selected", "selected")
|
|
901
913
|
]
|
|
902
|
-
}), /* @__PURE__ */
|
|
914
|
+
}), /* @__PURE__ */ q("button", {
|
|
903
915
|
onClick: u,
|
|
904
916
|
disabled: o.size === 0,
|
|
905
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",
|
|
@@ -908,33 +920,33 @@ var Te = [
|
|
|
908
920
|
})]
|
|
909
921
|
})
|
|
910
922
|
}),
|
|
911
|
-
n.length > 0 ? /* @__PURE__ */
|
|
923
|
+
n.length > 0 ? /* @__PURE__ */ K("div", {
|
|
912
924
|
className: "space-y-4",
|
|
913
|
-
children: n.map((e) => /* @__PURE__ */
|
|
925
|
+
children: n.map((e) => /* @__PURE__ */ q("div", {
|
|
914
926
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
|
|
915
927
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ q("div", {
|
|
917
929
|
className: "flex items-start justify-between",
|
|
918
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ q("div", {
|
|
919
931
|
className: "flex items-start gap-3",
|
|
920
|
-
children: [e.status === "ACTIVE" && /* @__PURE__ */
|
|
932
|
+
children: [e.status === "ACTIVE" && /* @__PURE__ */ K("div", {
|
|
921
933
|
onClick: (e) => e.stopPropagation(),
|
|
922
|
-
children: /* @__PURE__ */
|
|
934
|
+
children: /* @__PURE__ */ K(S, {
|
|
923
935
|
checked: o.has(e.id),
|
|
924
936
|
onChange: (t) => s(e.id, t),
|
|
925
937
|
ariaLabel: `Select delegation ${e.id}`,
|
|
926
938
|
className: "mt-1"
|
|
927
939
|
})
|
|
928
|
-
}), /* @__PURE__ */
|
|
940
|
+
}), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ q("div", {
|
|
929
941
|
className: "flex items-center gap-2",
|
|
930
|
-
children: [/* @__PURE__ */
|
|
942
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
931
943
|
className: "font-medium",
|
|
932
944
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
933
|
-
}), /* @__PURE__ */
|
|
934
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
945
|
+
}), /* @__PURE__ */ K("span", {
|
|
946
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Oe[e.status]),
|
|
935
947
|
children: e.status
|
|
936
948
|
})]
|
|
937
|
-
}), /* @__PURE__ */
|
|
949
|
+
}), /* @__PURE__ */ q("p", {
|
|
938
950
|
className: "text-sm text-text-secondary mt-1",
|
|
939
951
|
children: [
|
|
940
952
|
m("devportal.granted", "Granted"),
|
|
@@ -946,55 +958,55 @@ var Te = [
|
|
|
946
958
|
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
947
959
|
]
|
|
948
960
|
})] })]
|
|
949
|
-
}), e.status === "ACTIVE" && /* @__PURE__ */
|
|
961
|
+
}), e.status === "ACTIVE" && /* @__PURE__ */ q("button", {
|
|
950
962
|
onClick: () => a(e.id),
|
|
951
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",
|
|
952
|
-
children: [/* @__PURE__ */
|
|
964
|
+
children: [/* @__PURE__ */ K(ve, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
953
965
|
})]
|
|
954
966
|
}),
|
|
955
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
956
968
|
className: "text-xs text-text-secondary mb-2",
|
|
957
969
|
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
958
|
-
}), /* @__PURE__ */
|
|
970
|
+
}), /* @__PURE__ */ K("div", {
|
|
959
971
|
className: "flex flex-wrap gap-2",
|
|
960
|
-
children: e.scopes.map((e) => /* @__PURE__ */
|
|
972
|
+
children: e.scopes.map((e) => /* @__PURE__ */ K("span", {
|
|
961
973
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
962
974
|
children: e
|
|
963
975
|
}, e))
|
|
964
976
|
})] }),
|
|
965
|
-
e.workspaceIds.length > 0 && /* @__PURE__ */
|
|
977
|
+
e.workspaceIds.length > 0 && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", {
|
|
966
978
|
className: "text-xs text-text-secondary mb-2",
|
|
967
979
|
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
968
|
-
}), /* @__PURE__ */
|
|
980
|
+
}), /* @__PURE__ */ K("div", {
|
|
969
981
|
className: "flex flex-wrap gap-2",
|
|
970
|
-
children: e.workspaceIds.map((e) => /* @__PURE__ */
|
|
982
|
+
children: e.workspaceIds.map((e) => /* @__PURE__ */ K("code", {
|
|
971
983
|
className: "rounded bg-bg-sunken px-2 py-0.5 text-xs",
|
|
972
984
|
children: e
|
|
973
985
|
}, e))
|
|
974
986
|
})] }),
|
|
975
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ q("div", {
|
|
976
988
|
className: "flex items-center gap-4 text-xs text-text-secondary",
|
|
977
989
|
children: [
|
|
978
|
-
e.expiresAt && /* @__PURE__ */
|
|
990
|
+
e.expiresAt && /* @__PURE__ */ q("span", {
|
|
979
991
|
className: "flex items-center gap-1",
|
|
980
992
|
children: [
|
|
981
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ K(L, { size: 12 }),
|
|
982
994
|
m("devportal.expires", "Expires"),
|
|
983
995
|
" ",
|
|
984
996
|
new Date(e.expiresAt).toLocaleDateString()
|
|
985
997
|
]
|
|
986
998
|
}),
|
|
987
|
-
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */
|
|
999
|
+
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ q("span", {
|
|
988
1000
|
className: "flex items-center gap-1",
|
|
989
|
-
children: [/* @__PURE__ */
|
|
1001
|
+
children: [/* @__PURE__ */ K(I, {
|
|
990
1002
|
size: 12,
|
|
991
1003
|
className: "text-status-success-text"
|
|
992
1004
|
}), m("devportal.noExpiration", "No expiration")]
|
|
993
1005
|
}),
|
|
994
|
-
e.revokedAt && /* @__PURE__ */
|
|
1006
|
+
e.revokedAt && /* @__PURE__ */ q("span", {
|
|
995
1007
|
className: "flex items-center gap-1",
|
|
996
1008
|
children: [
|
|
997
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ K(ve, {
|
|
998
1010
|
size: 12,
|
|
999
1011
|
className: "text-status-error-text"
|
|
1000
1012
|
}),
|
|
@@ -1007,53 +1019,53 @@ var Te = [
|
|
|
1007
1019
|
})
|
|
1008
1020
|
]
|
|
1009
1021
|
}, e.id))
|
|
1010
|
-
}) : /* @__PURE__ */
|
|
1022
|
+
}) : /* @__PURE__ */ K(r, {
|
|
1011
1023
|
illustration: "empty-people",
|
|
1012
|
-
icon: /* @__PURE__ */
|
|
1024
|
+
icon: /* @__PURE__ */ K(W, { size: 32 }),
|
|
1013
1025
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1014
1026
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1015
|
-
action: /* @__PURE__ */
|
|
1027
|
+
action: /* @__PURE__ */ q("button", {
|
|
1016
1028
|
onClick: i,
|
|
1017
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",
|
|
1018
|
-
children: [/* @__PURE__ */
|
|
1030
|
+
children: [/* @__PURE__ */ K(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1019
1031
|
})
|
|
1020
1032
|
})
|
|
1021
1033
|
]
|
|
1022
1034
|
});
|
|
1023
|
-
},
|
|
1024
|
-
let { t } =
|
|
1035
|
+
}, Ie = ({ analytics: e }) => {
|
|
1036
|
+
let { t } = P(), n = (e, n) => {
|
|
1025
1037
|
let r = t(e);
|
|
1026
1038
|
return r === e ? n : r;
|
|
1027
1039
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
1028
|
-
return /* @__PURE__ */
|
|
1040
|
+
return /* @__PURE__ */ q("div", {
|
|
1029
1041
|
className: "space-y-6",
|
|
1030
|
-
children: [/* @__PURE__ */
|
|
1042
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1031
1043
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1032
1044
|
children: [
|
|
1033
|
-
/* @__PURE__ */
|
|
1045
|
+
/* @__PURE__ */ K(Q, {
|
|
1034
1046
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1035
1047
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1036
1048
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1037
1049
|
}),
|
|
1038
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ K(Q, {
|
|
1039
1051
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1040
1052
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1041
1053
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1042
1054
|
}),
|
|
1043
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ K(Q, {
|
|
1044
1056
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1045
1057
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1046
1058
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1047
1059
|
}),
|
|
1048
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ K(Q, {
|
|
1049
1061
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1050
1062
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1051
1063
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1052
1064
|
})
|
|
1053
1065
|
]
|
|
1054
|
-
}), /* @__PURE__ */
|
|
1066
|
+
}), /* @__PURE__ */ K(_, {
|
|
1055
1067
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1056
|
-
children: e.length > 0 ? /* @__PURE__ */
|
|
1068
|
+
children: e.length > 0 ? /* @__PURE__ */ K(w, {
|
|
1057
1069
|
data: e,
|
|
1058
1070
|
keyField: "id",
|
|
1059
1071
|
columns: [
|
|
@@ -1093,19 +1105,19 @@ var Te = [
|
|
|
1093
1105
|
render: (e) => e.sessions.toLocaleString()
|
|
1094
1106
|
}
|
|
1095
1107
|
]
|
|
1096
|
-
}) : /* @__PURE__ */
|
|
1108
|
+
}) : /* @__PURE__ */ K(r, {
|
|
1097
1109
|
illustration: "empty-data",
|
|
1098
|
-
icon: /* @__PURE__ */
|
|
1110
|
+
icon: /* @__PURE__ */ K(F, { size: 32 }),
|
|
1099
1111
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1100
1112
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1101
1113
|
})
|
|
1102
1114
|
})]
|
|
1103
1115
|
});
|
|
1104
|
-
},
|
|
1105
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
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 }) => {
|
|
1117
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
|
|
1106
1118
|
let n = a(e);
|
|
1107
1119
|
return n === e ? t : n;
|
|
1108
|
-
}, [s, c] =
|
|
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 () => {
|
|
1109
1121
|
m(!0), f("");
|
|
1110
1122
|
try {
|
|
1111
1123
|
let e = {};
|
|
@@ -1136,24 +1148,24 @@ var Te = [
|
|
|
1136
1148
|
l,
|
|
1137
1149
|
h,
|
|
1138
1150
|
_
|
|
1139
|
-
]), S =
|
|
1151
|
+
]), S = j(() => {
|
|
1140
1152
|
i && v(i), b(!0);
|
|
1141
1153
|
}, [i]);
|
|
1142
|
-
return /* @__PURE__ */
|
|
1154
|
+
return /* @__PURE__ */ q("div", {
|
|
1143
1155
|
className: "space-y-4",
|
|
1144
1156
|
children: [
|
|
1145
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ q("div", {
|
|
1146
1158
|
className: "flex items-center justify-between",
|
|
1147
|
-
children: [/* @__PURE__ */
|
|
1159
|
+
children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("h3", {
|
|
1148
1160
|
className: "text-lg font-semibold",
|
|
1149
1161
|
children: o("devportal.apiPlayground", "API Playground")
|
|
1150
|
-
}), /* @__PURE__ */
|
|
1162
|
+
}), /* @__PURE__ */ q("p", {
|
|
1151
1163
|
className: "text-sm text-text-secondary",
|
|
1152
1164
|
children: [
|
|
1153
1165
|
o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
|
|
1154
1166
|
" ",
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
t.appId && /* @__PURE__ */
|
|
1167
|
+
/* @__PURE__ */ K("strong", { children: t.name }),
|
|
1168
|
+
t.appId && /* @__PURE__ */ q("span", {
|
|
1157
1169
|
className: "ml-1 text-xs text-text-secondary",
|
|
1158
1170
|
children: [
|
|
1159
1171
|
"(OAuth App: ",
|
|
@@ -1162,39 +1174,39 @@ var Te = [
|
|
|
1162
1174
|
]
|
|
1163
1175
|
})
|
|
1164
1176
|
]
|
|
1165
|
-
})] }), /* @__PURE__ */
|
|
1177
|
+
})] }), /* @__PURE__ */ q("button", {
|
|
1166
1178
|
onClick: S,
|
|
1167
1179
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1168
|
-
children: [/* @__PURE__ */
|
|
1180
|
+
children: [/* @__PURE__ */ K(z, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1169
1181
|
})]
|
|
1170
1182
|
}),
|
|
1171
|
-
y && /* @__PURE__ */
|
|
1183
|
+
y && /* @__PURE__ */ q("div", {
|
|
1172
1184
|
className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
|
|
1173
1185
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ K("p", {
|
|
1175
1187
|
className: "font-medium text-status-info-text",
|
|
1176
1188
|
children: o("devportal.authenticationGuide", "Authentication Guide")
|
|
1177
1189
|
}),
|
|
1178
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ q("p", {
|
|
1179
1191
|
className: "text-status-info-text",
|
|
1180
1192
|
children: [
|
|
1181
1193
|
o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
|
|
1182
1194
|
" ",
|
|
1183
|
-
/* @__PURE__ */
|
|
1195
|
+
/* @__PURE__ */ K("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
|
|
1184
1196
|
" ",
|
|
1185
1197
|
o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
|
|
1186
1198
|
]
|
|
1187
1199
|
}),
|
|
1188
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ K("pre", {
|
|
1189
1201
|
className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
|
|
1190
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}"
|
|
1191
1203
|
}),
|
|
1192
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ q("p", {
|
|
1193
1205
|
className: "text-status-info-text",
|
|
1194
1206
|
children: [
|
|
1195
1207
|
o("devportal.useReturnedAccessToken", "Use the returned"),
|
|
1196
1208
|
" ",
|
|
1197
|
-
/* @__PURE__ */
|
|
1209
|
+
/* @__PURE__ */ K("code", {
|
|
1198
1210
|
className: "bg-status-info-bg-subtle px-1 rounded",
|
|
1199
1211
|
children: "accessToken"
|
|
1200
1212
|
}),
|
|
@@ -1202,129 +1214,129 @@ var Te = [
|
|
|
1202
1214
|
o("devportal.asBearerToken", "as the Bearer token below.")
|
|
1203
1215
|
]
|
|
1204
1216
|
}),
|
|
1205
|
-
/* @__PURE__ */
|
|
1217
|
+
/* @__PURE__ */ K("button", {
|
|
1206
1218
|
onClick: () => b(!1),
|
|
1207
1219
|
className: "text-xs text-accent-blue hover:underline",
|
|
1208
1220
|
children: o("devportal.dismiss", "Dismiss")
|
|
1209
1221
|
})
|
|
1210
1222
|
]
|
|
1211
1223
|
}),
|
|
1212
|
-
/* @__PURE__ */
|
|
1224
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1213
1225
|
className: "block text-sm font-medium mb-1",
|
|
1214
1226
|
children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
|
|
1215
|
-
}), /* @__PURE__ */
|
|
1227
|
+
}), /* @__PURE__ */ q("div", {
|
|
1216
1228
|
className: "flex gap-2",
|
|
1217
|
-
children: [/* @__PURE__ */
|
|
1229
|
+
children: [/* @__PURE__ */ K("input", {
|
|
1218
1230
|
type: "text",
|
|
1219
1231
|
value: h,
|
|
1220
1232
|
onChange: (e) => g(e.target.value),
|
|
1221
1233
|
className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
|
|
1222
|
-
}), /* @__PURE__ */
|
|
1234
|
+
}), /* @__PURE__ */ q("select", {
|
|
1223
1235
|
onChange: (e) => g(e.target.value),
|
|
1224
1236
|
className: "rounded-md border px-3 py-2 text-sm bg-bg-surface",
|
|
1225
1237
|
value: h,
|
|
1226
|
-
children: [/* @__PURE__ */
|
|
1238
|
+
children: [/* @__PURE__ */ K("option", {
|
|
1227
1239
|
value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
|
|
1228
1240
|
children: o("devportal.globalGateway", "Global Gateway")
|
|
1229
|
-
}), /* @__PURE__ */
|
|
1241
|
+
}), /* @__PURE__ */ K("option", {
|
|
1230
1242
|
value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
|
|
1231
1243
|
children: o("devportal.workspaceGateway", "Workspace Gateway")
|
|
1232
1244
|
})]
|
|
1233
1245
|
})]
|
|
1234
1246
|
})] }),
|
|
1235
|
-
/* @__PURE__ */
|
|
1247
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1236
1248
|
className: "block text-sm font-medium mb-1",
|
|
1237
1249
|
children: o("devportal.bearerToken", "Bearer Token")
|
|
1238
|
-
}), /* @__PURE__ */
|
|
1250
|
+
}), /* @__PURE__ */ K("input", {
|
|
1239
1251
|
type: "password",
|
|
1240
1252
|
value: _,
|
|
1241
1253
|
onChange: (e) => v(e.target.value),
|
|
1242
1254
|
placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
|
|
1243
1255
|
className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
|
|
1244
1256
|
})] }),
|
|
1245
|
-
/* @__PURE__ */
|
|
1257
|
+
/* @__PURE__ */ q("div", {
|
|
1246
1258
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
1247
|
-
children: [/* @__PURE__ */
|
|
1259
|
+
children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1248
1260
|
className: "block text-sm font-medium mb-1",
|
|
1249
1261
|
children: o("devportal.query", "Query")
|
|
1250
|
-
}), /* @__PURE__ */
|
|
1262
|
+
}), /* @__PURE__ */ K("textarea", {
|
|
1251
1263
|
value: s,
|
|
1252
1264
|
onChange: (e) => c(e.target.value),
|
|
1253
1265
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
|
|
1254
1266
|
spellCheck: !1
|
|
1255
|
-
})] }), /* @__PURE__ */
|
|
1267
|
+
})] }), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1256
1268
|
className: "block text-sm font-medium mb-1",
|
|
1257
1269
|
children: o("devportal.variablesJson", "Variables (JSON)")
|
|
1258
|
-
}), /* @__PURE__ */
|
|
1270
|
+
}), /* @__PURE__ */ K("textarea", {
|
|
1259
1271
|
value: l,
|
|
1260
1272
|
onChange: (e) => u(e.target.value),
|
|
1261
1273
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
|
|
1262
1274
|
spellCheck: !1
|
|
1263
1275
|
})] })]
|
|
1264
1276
|
}),
|
|
1265
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ q("button", {
|
|
1266
1278
|
onClick: x,
|
|
1267
1279
|
disabled: p,
|
|
1268
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",
|
|
1269
|
-
children: [p ? /* @__PURE__ */
|
|
1281
|
+
children: [p ? /* @__PURE__ */ K(B, {
|
|
1270
1282
|
size: 16,
|
|
1271
1283
|
className: "animate-spin"
|
|
1272
|
-
}) : /* @__PURE__ */
|
|
1284
|
+
}) : /* @__PURE__ */ K(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1273
1285
|
}),
|
|
1274
|
-
d && /* @__PURE__ */
|
|
1286
|
+
d && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1275
1287
|
className: "block text-sm font-medium mb-1",
|
|
1276
1288
|
children: o("devportal.response", "Response")
|
|
1277
|
-
}), /* @__PURE__ */
|
|
1289
|
+
}), /* @__PURE__ */ K("pre", {
|
|
1278
1290
|
className: "w-full max-h-96 overflow-auto rounded-md border bg-bg-sunken p-4 text-xs font-mono",
|
|
1279
1291
|
children: d
|
|
1280
1292
|
})] })
|
|
1281
1293
|
]
|
|
1282
1294
|
});
|
|
1283
|
-
},
|
|
1284
|
-
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) => {
|
|
1285
1297
|
try {
|
|
1286
1298
|
r((await s(e)).downloadUrl);
|
|
1287
1299
|
} catch {}
|
|
1288
1300
|
}, [s, r]);
|
|
1289
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ q("div", {
|
|
1290
1302
|
className: "space-y-1.5",
|
|
1291
1303
|
children: [
|
|
1292
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ K("label", {
|
|
1293
1305
|
className: "text-sm font-medium",
|
|
1294
1306
|
children: e
|
|
1295
1307
|
}),
|
|
1296
|
-
/* @__PURE__ */
|
|
1308
|
+
/* @__PURE__ */ q("div", {
|
|
1297
1309
|
className: "flex gap-3 items-start",
|
|
1298
|
-
children: [/* @__PURE__ */
|
|
1310
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1299
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),
|
|
1300
|
-
children: [n ? /* @__PURE__ */
|
|
1312
|
+
children: [n ? /* @__PURE__ */ K("img", {
|
|
1301
1313
|
src: n,
|
|
1302
1314
|
alt: e,
|
|
1303
1315
|
className: "w-full h-full object-cover"
|
|
1304
|
-
}) : /* @__PURE__ */
|
|
1316
|
+
}) : /* @__PURE__ */ K(U, {
|
|
1305
1317
|
size: 18,
|
|
1306
1318
|
className: "text-text-secondary opacity-40"
|
|
1307
|
-
}), c && /* @__PURE__ */
|
|
1319
|
+
}), c && /* @__PURE__ */ q("div", {
|
|
1308
1320
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
1309
|
-
children: [/* @__PURE__ */
|
|
1321
|
+
children: [/* @__PURE__ */ K(B, {
|
|
1310
1322
|
size: 14,
|
|
1311
1323
|
className: "animate-spin text-white"
|
|
1312
|
-
}), /* @__PURE__ */
|
|
1324
|
+
}), /* @__PURE__ */ q("span", {
|
|
1313
1325
|
className: "text-white text-xs",
|
|
1314
1326
|
children: [l, "%"]
|
|
1315
1327
|
})]
|
|
1316
1328
|
})]
|
|
1317
|
-
}), /* @__PURE__ */
|
|
1329
|
+
}), /* @__PURE__ */ q("div", {
|
|
1318
1330
|
className: "flex-1 space-y-1.5",
|
|
1319
1331
|
children: [
|
|
1320
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ K("input", {
|
|
1321
1333
|
type: "url",
|
|
1322
1334
|
value: n,
|
|
1323
1335
|
onChange: (e) => r(e.target.value),
|
|
1324
1336
|
placeholder: "https://...",
|
|
1325
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"
|
|
1326
1338
|
}),
|
|
1327
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ K("input", {
|
|
1328
1340
|
ref: d,
|
|
1329
1341
|
type: "file",
|
|
1330
1342
|
accept: a,
|
|
@@ -1334,28 +1346,28 @@ var Te = [
|
|
|
1334
1346
|
t && f(t), e.target.value = "";
|
|
1335
1347
|
}
|
|
1336
1348
|
}),
|
|
1337
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ q("button", {
|
|
1338
1350
|
type: "button",
|
|
1339
1351
|
disabled: c,
|
|
1340
1352
|
onClick: () => d.current?.click(),
|
|
1341
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",
|
|
1342
|
-
children: [/* @__PURE__ */
|
|
1354
|
+
children: [/* @__PURE__ */ K(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
1343
1355
|
}),
|
|
1344
|
-
u && /* @__PURE__ */
|
|
1356
|
+
u && /* @__PURE__ */ K("p", {
|
|
1345
1357
|
className: "text-xs text-status-error-text",
|
|
1346
1358
|
children: u
|
|
1347
1359
|
})
|
|
1348
1360
|
]
|
|
1349
1361
|
})]
|
|
1350
1362
|
}),
|
|
1351
|
-
i && /* @__PURE__ */
|
|
1363
|
+
i && /* @__PURE__ */ K("p", {
|
|
1352
1364
|
className: "text-xs text-text-secondary",
|
|
1353
1365
|
children: i
|
|
1354
1366
|
})
|
|
1355
1367
|
]
|
|
1356
1368
|
});
|
|
1357
|
-
},
|
|
1358
|
-
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) => {
|
|
1359
1371
|
try {
|
|
1360
1372
|
let i = await r(t);
|
|
1361
1373
|
n([...e, i.downloadUrl]);
|
|
@@ -1367,45 +1379,45 @@ var Te = [
|
|
|
1367
1379
|
]), l = (t) => {
|
|
1368
1380
|
n(e.filter((e, n) => n !== t));
|
|
1369
1381
|
};
|
|
1370
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ q("div", {
|
|
1371
1383
|
className: "space-y-2",
|
|
1372
1384
|
children: [
|
|
1373
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ K("label", {
|
|
1374
1386
|
className: "text-sm font-medium",
|
|
1375
1387
|
children: "Screenshots"
|
|
1376
1388
|
}),
|
|
1377
|
-
/* @__PURE__ */
|
|
1389
|
+
/* @__PURE__ */ q("div", {
|
|
1378
1390
|
className: "flex flex-wrap gap-3",
|
|
1379
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
1391
|
+
children: [e.map((e, t) => /* @__PURE__ */ q("div", {
|
|
1380
1392
|
className: "relative group w-36 aspect-video rounded-lg border border-border-subtle overflow-hidden bg-bg-sunken",
|
|
1381
|
-
children: [/* @__PURE__ */
|
|
1393
|
+
children: [/* @__PURE__ */ K("img", {
|
|
1382
1394
|
src: e,
|
|
1383
1395
|
alt: `Screenshot ${t + 1}`,
|
|
1384
1396
|
className: "w-full h-full object-cover"
|
|
1385
|
-
}), /* @__PURE__ */
|
|
1397
|
+
}), /* @__PURE__ */ K("button", {
|
|
1386
1398
|
type: "button",
|
|
1387
1399
|
onClick: () => l(t),
|
|
1388
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",
|
|
1389
|
-
children: /* @__PURE__ */
|
|
1401
|
+
children: /* @__PURE__ */ K(_e, { size: 12 })
|
|
1390
1402
|
})]
|
|
1391
|
-
}, t)), /* @__PURE__ */
|
|
1403
|
+
}, t)), /* @__PURE__ */ K("button", {
|
|
1392
1404
|
type: "button",
|
|
1393
1405
|
disabled: i,
|
|
1394
1406
|
onClick: () => s.current?.click(),
|
|
1395
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"),
|
|
1396
|
-
children: i ? /* @__PURE__ */
|
|
1408
|
+
children: i ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
|
|
1397
1409
|
size: 18,
|
|
1398
1410
|
className: "animate-spin text-primary"
|
|
1399
|
-
}), /* @__PURE__ */
|
|
1411
|
+
}), /* @__PURE__ */ q("span", {
|
|
1400
1412
|
className: "text-xs",
|
|
1401
1413
|
children: [a, "%"]
|
|
1402
|
-
})] }) : /* @__PURE__ */
|
|
1414
|
+
})] }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(U, { size: 18 }), /* @__PURE__ */ K("span", {
|
|
1403
1415
|
className: "text-xs",
|
|
1404
1416
|
children: "Add screenshot"
|
|
1405
1417
|
})] })
|
|
1406
1418
|
})]
|
|
1407
1419
|
}),
|
|
1408
|
-
/* @__PURE__ */
|
|
1420
|
+
/* @__PURE__ */ K("input", {
|
|
1409
1421
|
ref: s,
|
|
1410
1422
|
type: "file",
|
|
1411
1423
|
accept: "image/png,image/jpeg,image/webp,image/gif",
|
|
@@ -1415,19 +1427,52 @@ var Te = [
|
|
|
1415
1427
|
t && c(t), e.target.value = "";
|
|
1416
1428
|
}
|
|
1417
1429
|
}),
|
|
1418
|
-
o && /* @__PURE__ */
|
|
1430
|
+
o && /* @__PURE__ */ K("p", {
|
|
1419
1431
|
className: "text-xs text-status-error-text",
|
|
1420
1432
|
children: o
|
|
1421
1433
|
})
|
|
1422
1434
|
]
|
|
1423
1435
|
});
|
|
1424
|
-
},
|
|
1436
|
+
}, Ve = new Set(["workflow", "template"]), He = [{
|
|
1425
1437
|
value: "FREE",
|
|
1426
1438
|
label: "Free"
|
|
1427
1439
|
}, {
|
|
1428
1440
|
value: "PAID",
|
|
1429
1441
|
label: "Paid"
|
|
1430
|
-
}],
|
|
1442
|
+
}], Ue = [
|
|
1443
|
+
{
|
|
1444
|
+
value: "USD",
|
|
1445
|
+
label: "USD — US Dollar"
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
value: "EUR",
|
|
1449
|
+
label: "EUR — Euro"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
value: "GBP",
|
|
1453
|
+
label: "GBP — British Pound"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
value: "INR",
|
|
1457
|
+
label: "INR — Indian Rupee"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
value: "CAD",
|
|
1461
|
+
label: "CAD — Canadian Dollar"
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
value: "AUD",
|
|
1465
|
+
label: "AUD — Australian Dollar"
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
value: "SGD",
|
|
1469
|
+
label: "SGD — Singapore Dollar"
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
value: "JPY",
|
|
1473
|
+
label: "JPY — Japanese Yen"
|
|
1474
|
+
}
|
|
1475
|
+
], We = [
|
|
1431
1476
|
{
|
|
1432
1477
|
value: "agent",
|
|
1433
1478
|
label: "Agent"
|
|
@@ -1497,7 +1542,7 @@ var Te = [
|
|
|
1497
1542
|
label: "Component"
|
|
1498
1543
|
}
|
|
1499
1544
|
];
|
|
1500
|
-
function
|
|
1545
|
+
function Ge(e) {
|
|
1501
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") : "";
|
|
1502
1547
|
return {
|
|
1503
1548
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -1526,58 +1571,58 @@ function Ue(e) {
|
|
|
1526
1571
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
1527
1572
|
};
|
|
1528
1573
|
}
|
|
1529
|
-
var
|
|
1530
|
-
let { workspacesGatewayUrl:
|
|
1531
|
-
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);
|
|
1532
1577
|
return n === e ? t : n;
|
|
1533
|
-
},
|
|
1534
|
-
|
|
1535
|
-
let [
|
|
1536
|
-
|
|
1537
|
-
|
|
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));
|
|
1538
1583
|
}, [n.id]);
|
|
1539
|
-
let
|
|
1540
|
-
|
|
1584
|
+
let w = (e, t) => {
|
|
1585
|
+
g((n) => ({
|
|
1541
1586
|
...n,
|
|
1542
1587
|
[e]: t
|
|
1543
1588
|
}));
|
|
1544
|
-
},
|
|
1545
|
-
|
|
1589
|
+
}, T = async () => {
|
|
1590
|
+
y(!0);
|
|
1546
1591
|
try {
|
|
1547
|
-
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 = {
|
|
1548
1593
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1549
|
-
itemType:
|
|
1594
|
+
itemType: m.manifestItemType || void 0,
|
|
1550
1595
|
identity: {
|
|
1551
|
-
version:
|
|
1552
|
-
displayName:
|
|
1596
|
+
version: m.manifestVersion || "1.0.0",
|
|
1597
|
+
displayName: m.manifestDisplayName
|
|
1553
1598
|
},
|
|
1554
|
-
...r ? { jsonContent:
|
|
1555
|
-
type:
|
|
1556
|
-
...
|
|
1599
|
+
...r ? { jsonContent: m.manifestJsonContent || void 0 } : { digital: { install: {
|
|
1600
|
+
type: m.manifestInstallType,
|
|
1601
|
+
...m.manifestInstallType === "zip" && m.manifestRegistryUrl ? { url: m.manifestRegistryUrl } : {}
|
|
1557
1602
|
} } },
|
|
1558
1603
|
permissions: t,
|
|
1559
|
-
compatibility: { minPlatformVersion:
|
|
1604
|
+
compatibility: { minPlatformVersion: m.manifestMinPlatformVersion }
|
|
1560
1605
|
}, o = { ...n.pricingDetails ?? {} };
|
|
1561
|
-
if (
|
|
1562
|
-
let e = parseFloat(
|
|
1563
|
-
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);
|
|
1564
1609
|
}
|
|
1565
|
-
await
|
|
1610
|
+
await x({ variables: {
|
|
1566
1611
|
id: n.id,
|
|
1567
1612
|
input: {
|
|
1568
|
-
iconUrl:
|
|
1569
|
-
bannerUrl:
|
|
1570
|
-
videoUrl:
|
|
1571
|
-
shortDescription:
|
|
1572
|
-
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,
|
|
1573
1618
|
screenshots: e.length > 0 ? e : null,
|
|
1574
|
-
websiteUrl:
|
|
1575
|
-
documentationUrl:
|
|
1576
|
-
githubUrl:
|
|
1577
|
-
supportUrl:
|
|
1578
|
-
privacyPolicyUrl:
|
|
1579
|
-
termsOfServiceUrl:
|
|
1580
|
-
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,
|
|
1581
1626
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1582
1627
|
manifest: a
|
|
1583
1628
|
}
|
|
@@ -1585,432 +1630,308 @@ var We = ({ app: n }) => {
|
|
|
1585
1630
|
} catch {
|
|
1586
1631
|
C("error");
|
|
1587
1632
|
} finally {
|
|
1588
|
-
|
|
1633
|
+
y(!1);
|
|
1589
1634
|
}
|
|
1590
|
-
},
|
|
1635
|
+
}, k = async () => {
|
|
1591
1636
|
try {
|
|
1592
|
-
await
|
|
1637
|
+
await S({ variables: { id: n.id } }), C("success");
|
|
1593
1638
|
} catch {
|
|
1594
1639
|
C("error");
|
|
1595
1640
|
}
|
|
1596
|
-
},
|
|
1597
|
-
let t = e.target.files?.[0];
|
|
1598
|
-
if (t) {
|
|
1599
|
-
e.target.value = "";
|
|
1600
|
-
try {
|
|
1601
|
-
let e = await k(t);
|
|
1602
|
-
u((t) => ({
|
|
1603
|
-
...t,
|
|
1604
|
-
manifestRegistryUrl: e.downloadUrl
|
|
1605
|
-
}));
|
|
1606
|
-
} catch {}
|
|
1607
|
-
}
|
|
1608
|
-
}, [k]), he = M(async (e) => {
|
|
1609
|
-
e.preventDefault(), g(!1);
|
|
1610
|
-
let t = e.dataTransfer.files?.[0];
|
|
1611
|
-
if (t) try {
|
|
1612
|
-
let e = await k(t);
|
|
1613
|
-
u((t) => ({
|
|
1614
|
-
...t,
|
|
1615
|
-
manifestRegistryUrl: e.downloadUrl
|
|
1616
|
-
}));
|
|
1617
|
-
} catch {}
|
|
1618
|
-
}, [k]), G = Be.has(l.manifestItemType), K = l.manifestInstallType === "builtin", ge = l.pricingType !== "FREE", _e = l.manifestRegistryUrl ? l.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
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";
|
|
1619
1642
|
n.status;
|
|
1620
|
-
let
|
|
1621
|
-
return /* @__PURE__ */
|
|
1643
|
+
let pe = n.status === "SUBMITTED", me = n.status === "PUBLISHED";
|
|
1644
|
+
return /* @__PURE__ */ q("div", {
|
|
1622
1645
|
className: "space-y-8 max-w-3xl",
|
|
1623
1646
|
children: [
|
|
1624
|
-
|
|
1647
|
+
me ? /* @__PURE__ */ q("div", {
|
|
1625
1648
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1626
|
-
children: [/* @__PURE__ */
|
|
1649
|
+
children: [/* @__PURE__ */ K(I, {
|
|
1627
1650
|
size: 16,
|
|
1628
1651
|
className: "text-success mt-0.5 shrink-0"
|
|
1629
|
-
}), /* @__PURE__ */
|
|
1652
|
+
}), /* @__PURE__ */ q("div", {
|
|
1630
1653
|
className: "text-sm",
|
|
1631
|
-
children: [/* @__PURE__ */
|
|
1654
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1632
1655
|
className: "font-medium text-success",
|
|
1633
|
-
children:
|
|
1634
|
-
}), n.publishedAt && /* @__PURE__ */
|
|
1656
|
+
children: u("devportal.storeListing.published", "Published")
|
|
1657
|
+
}), n.publishedAt && /* @__PURE__ */ q("span", {
|
|
1635
1658
|
className: "text-text-secondary ml-2",
|
|
1636
1659
|
children: [
|
|
1637
|
-
|
|
1660
|
+
u("devportal.storeListing.since", "since"),
|
|
1638
1661
|
" ",
|
|
1639
1662
|
new Date(n.publishedAt).toLocaleDateString()
|
|
1640
1663
|
]
|
|
1641
1664
|
})]
|
|
1642
1665
|
})]
|
|
1643
|
-
}) :
|
|
1644
|
-
className: "flex items-
|
|
1645
|
-
children: [/* @__PURE__ */
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
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 })]
|
|
1664
1695
|
})]
|
|
1665
|
-
}) : /* @__PURE__ */
|
|
1696
|
+
}) : /* @__PURE__ */ q("div", {
|
|
1666
1697
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
1667
|
-
children: [/* @__PURE__ */
|
|
1698
|
+
children: [/* @__PURE__ */ K(oe, {
|
|
1668
1699
|
size: 16,
|
|
1669
1700
|
className: "text-warning mt-0.5 shrink-0"
|
|
1670
|
-
}), /* @__PURE__ */
|
|
1701
|
+
}), /* @__PURE__ */ q("div", {
|
|
1671
1702
|
className: "text-sm",
|
|
1672
|
-
children: [/* @__PURE__ */
|
|
1703
|
+
children: [/* @__PURE__ */ K("span", {
|
|
1673
1704
|
className: "font-medium text-warning",
|
|
1674
|
-
children:
|
|
1675
|
-
}), /* @__PURE__ */
|
|
1705
|
+
children: u("devportal.storeListing.draft", "Draft")
|
|
1706
|
+
}), /* @__PURE__ */ K("span", {
|
|
1676
1707
|
className: "text-text-secondary ml-2",
|
|
1677
|
-
children:
|
|
1708
|
+
children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
1678
1709
|
})]
|
|
1679
1710
|
})]
|
|
1680
1711
|
}),
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
title:
|
|
1683
|
-
description:
|
|
1684
|
-
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", {
|
|
1685
1716
|
className: "space-y-6",
|
|
1686
1717
|
children: [
|
|
1687
|
-
/* @__PURE__ */
|
|
1688
|
-
label:
|
|
1689
|
-
value:
|
|
1718
|
+
/* @__PURE__ */ K(D, {
|
|
1719
|
+
label: u("devportal.storeItemType", "Item Type"),
|
|
1720
|
+
value: m.manifestItemType,
|
|
1690
1721
|
onChange: (e) => {
|
|
1691
1722
|
let t = e.target.value;
|
|
1692
|
-
|
|
1723
|
+
w("manifestItemType", t), Ve.has(t) ? w("manifestInstallType", "json") : m.manifestInstallType === "json" && w("manifestInstallType", "zip");
|
|
1693
1724
|
},
|
|
1694
|
-
options:
|
|
1695
|
-
placeholder:
|
|
1696
|
-
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")
|
|
1697
1728
|
}),
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
onChange: (e) => S("manifestDisplayName", e.target.value),
|
|
1704
|
-
placeholder: "My Awesome Node"
|
|
1705
|
-
}), /* @__PURE__ */ J(E, {
|
|
1706
|
-
label: c("devportal.manifestVersion", "Version"),
|
|
1707
|
-
value: l.manifestVersion,
|
|
1708
|
-
onChange: (e) => S("manifestVersion", e.target.value),
|
|
1709
|
-
placeholder: "1.0.0",
|
|
1710
|
-
hint: c("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1711
|
-
})]
|
|
1729
|
+
/* @__PURE__ */ K(E, {
|
|
1730
|
+
label: u("devportal.manifestDisplayName", "Display Name"),
|
|
1731
|
+
value: m.manifestDisplayName,
|
|
1732
|
+
onChange: (e) => w("manifestDisplayName", e.target.value),
|
|
1733
|
+
placeholder: "My Awesome Node"
|
|
1712
1734
|
}),
|
|
1713
|
-
|
|
1714
|
-
label:
|
|
1715
|
-
value:
|
|
1716
|
-
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),
|
|
1717
1739
|
rows: 12,
|
|
1718
1740
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1719
|
-
hint:
|
|
1720
|
-
}),
|
|
1721
|
-
!G && /* @__PURE__ */ Y("div", {
|
|
1722
|
-
className: "space-y-3",
|
|
1723
|
-
children: [
|
|
1724
|
-
/* @__PURE__ */ Y("div", {
|
|
1725
|
-
className: "flex items-center justify-between flex-wrap gap-2",
|
|
1726
|
-
children: [/* @__PURE__ */ J("label", {
|
|
1727
|
-
className: "text-sm font-medium",
|
|
1728
|
-
children: c("devportal.packageFile", "Package File")
|
|
1729
|
-
}), /* @__PURE__ */ Y("label", {
|
|
1730
|
-
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
1731
|
-
children: [/* @__PURE__ */ J("input", {
|
|
1732
|
-
type: "checkbox",
|
|
1733
|
-
checked: K,
|
|
1734
|
-
onChange: (e) => S("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1735
|
-
className: "h-4 w-4 rounded border-border-subtle accent-primary"
|
|
1736
|
-
}), /* @__PURE__ */ J("span", {
|
|
1737
|
-
className: "text-text-secondary",
|
|
1738
|
-
children: c("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
|
|
1739
|
-
})]
|
|
1740
|
-
})]
|
|
1741
|
-
}),
|
|
1742
|
-
!K && /* @__PURE__ */ Y(q, { children: [
|
|
1743
|
-
/* @__PURE__ */ Y("div", {
|
|
1744
|
-
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1745
|
-
children: [/* @__PURE__ */ J(B, {
|
|
1746
|
-
size: 15,
|
|
1747
|
-
className: "mt-0.5 shrink-0"
|
|
1748
|
-
}), /* @__PURE__ */ Y("span", { children: [
|
|
1749
|
-
c("devportal.zipModelHint", "Package your code and a "),
|
|
1750
|
-
/* @__PURE__ */ J("code", {
|
|
1751
|
-
className: "rounded bg-bg-sunken px-1 py-0.5 font-mono text-xs",
|
|
1752
|
-
children: "manifest.json"
|
|
1753
|
-
}),
|
|
1754
|
-
c("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
|
|
1755
|
-
] })]
|
|
1756
|
-
}),
|
|
1757
|
-
/* @__PURE__ */ Y("div", {
|
|
1758
|
-
onDragOver: (e) => {
|
|
1759
|
-
e.preventDefault(), g(!0);
|
|
1760
|
-
},
|
|
1761
|
-
onDragLeave: () => g(!1),
|
|
1762
|
-
onDrop: (e) => void he(e),
|
|
1763
|
-
onClick: () => !A && T.current?.click(),
|
|
1764
|
-
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", m ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:border-border-strong hover:bg-bg-sunken", A && "pointer-events-none opacity-75"),
|
|
1765
|
-
children: [/* @__PURE__ */ J("input", {
|
|
1766
|
-
ref: T,
|
|
1767
|
-
type: "file",
|
|
1768
|
-
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1769
|
-
className: "hidden",
|
|
1770
|
-
onChange: (e) => void U(e)
|
|
1771
|
-
}), A ? /* @__PURE__ */ Y(q, { children: [
|
|
1772
|
-
/* @__PURE__ */ J(V, {
|
|
1773
|
-
size: 28,
|
|
1774
|
-
className: "animate-spin text-primary"
|
|
1775
|
-
}),
|
|
1776
|
-
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
|
|
1777
|
-
className: "text-sm font-medium",
|
|
1778
|
-
children: [
|
|
1779
|
-
c("devportal.uploading", "Uploading…"),
|
|
1780
|
-
" ",
|
|
1781
|
-
te,
|
|
1782
|
-
"%"
|
|
1783
|
-
]
|
|
1784
|
-
}), /* @__PURE__ */ J("p", {
|
|
1785
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
1786
|
-
children: c("devportal.uploadingHint", "Stored securely in your workspace")
|
|
1787
|
-
})] }),
|
|
1788
|
-
/* @__PURE__ */ J("div", {
|
|
1789
|
-
className: "w-48 h-1.5 rounded-full bg-bg-sunken overflow-hidden",
|
|
1790
|
-
children: /* @__PURE__ */ J("div", {
|
|
1791
|
-
className: "h-full bg-action-primary-bg transition-all",
|
|
1792
|
-
style: { width: `${te}%` }
|
|
1793
|
-
})
|
|
1794
|
-
})
|
|
1795
|
-
] }) : _e ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(R, {
|
|
1796
|
-
size: 28,
|
|
1797
|
-
className: "text-status-success-text"
|
|
1798
|
-
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
1799
|
-
className: "text-sm font-medium",
|
|
1800
|
-
children: _e
|
|
1801
|
-
}), /* @__PURE__ */ J("p", {
|
|
1802
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
1803
|
-
children: c("devportal.clickToReplace", "Click or drag to replace")
|
|
1804
|
-
})] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, {
|
|
1805
|
-
size: 28,
|
|
1806
|
-
className: "text-text-secondary"
|
|
1807
|
-
}), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
|
|
1808
|
-
className: "text-sm font-medium",
|
|
1809
|
-
children: c("devportal.dropZipHere", "Drop your .zip here")
|
|
1810
|
-
}), /* @__PURE__ */ J("p", {
|
|
1811
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
1812
|
-
children: c("devportal.orClickToBrowse", "or click to browse")
|
|
1813
|
-
})] })] })]
|
|
1814
|
-
}),
|
|
1815
|
-
ne && /* @__PURE__ */ J("p", {
|
|
1816
|
-
className: "text-xs text-status-error-text",
|
|
1817
|
-
children: ne
|
|
1818
|
-
})
|
|
1819
|
-
] }),
|
|
1820
|
-
K && /* @__PURE__ */ Y("div", {
|
|
1821
|
-
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1822
|
-
children: [/* @__PURE__ */ J(B, {
|
|
1823
|
-
size: 15,
|
|
1824
|
-
className: "mt-0.5 shrink-0"
|
|
1825
|
-
}), /* @__PURE__ */ J("span", { children: c("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
1826
|
-
})
|
|
1827
|
-
]
|
|
1741
|
+
hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
1828
1742
|
})
|
|
1829
1743
|
]
|
|
1830
1744
|
})
|
|
1831
1745
|
}),
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
title:
|
|
1834
|
-
description:
|
|
1835
|
-
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", {
|
|
1836
1750
|
className: "space-y-5",
|
|
1837
1751
|
children: [
|
|
1838
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ q("div", {
|
|
1839
1753
|
className: "grid gap-5 sm:grid-cols-2",
|
|
1840
|
-
children: [/* @__PURE__ */
|
|
1841
|
-
label:
|
|
1842
|
-
value:
|
|
1843
|
-
onChange: (e) =>
|
|
1844
|
-
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"),
|
|
1845
1759
|
aspectClass: "aspect-square",
|
|
1846
|
-
upload:
|
|
1847
|
-
uploading:
|
|
1848
|
-
progress:
|
|
1849
|
-
error:
|
|
1850
|
-
}), /* @__PURE__ */
|
|
1851
|
-
label:
|
|
1852
|
-
value:
|
|
1853
|
-
onChange: (e) =>
|
|
1854
|
-
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"),
|
|
1855
1769
|
aspectClass: "aspect-video",
|
|
1856
|
-
upload:
|
|
1857
|
-
uploading:
|
|
1858
|
-
progress:
|
|
1859
|
-
error:
|
|
1770
|
+
upload: M,
|
|
1771
|
+
uploading: se,
|
|
1772
|
+
progress: F,
|
|
1773
|
+
error: ce
|
|
1860
1774
|
})]
|
|
1861
1775
|
}),
|
|
1862
|
-
/* @__PURE__ */
|
|
1863
|
-
label:
|
|
1864
|
-
value:
|
|
1865
|
-
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),
|
|
1866
1780
|
placeholder: "https://...",
|
|
1867
|
-
hint:
|
|
1781
|
+
hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
1868
1782
|
}),
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
label:
|
|
1871
|
-
value:
|
|
1872
|
-
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),
|
|
1873
1787
|
maxLength: 200,
|
|
1874
1788
|
rows: 2,
|
|
1875
|
-
hint: `${
|
|
1789
|
+
hint: `${m.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
1876
1790
|
}),
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
label:
|
|
1879
|
-
value:
|
|
1880
|
-
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),
|
|
1881
1795
|
rows: 5,
|
|
1882
|
-
hint:
|
|
1796
|
+
hint: u("devportal.fullDescHint", "Markdown supported")
|
|
1883
1797
|
}),
|
|
1884
|
-
/* @__PURE__ */
|
|
1885
|
-
urls:
|
|
1886
|
-
onChange: (e) =>
|
|
1887
|
-
upload:
|
|
1888
|
-
uploading:
|
|
1889
|
-
progress:
|
|
1890
|
-
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
|
|
1891
1805
|
})
|
|
1892
1806
|
]
|
|
1893
1807
|
})
|
|
1894
1808
|
}),
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
title:
|
|
1897
|
-
description:
|
|
1898
|
-
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", {
|
|
1899
1813
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1900
1814
|
children: [
|
|
1901
|
-
/* @__PURE__ */
|
|
1902
|
-
label:
|
|
1903
|
-
value:
|
|
1904
|
-
onChange: (e) =>
|
|
1815
|
+
/* @__PURE__ */ K(E, {
|
|
1816
|
+
label: u("devportal.websiteUrl", "Website"),
|
|
1817
|
+
value: m.websiteUrl,
|
|
1818
|
+
onChange: (e) => w("websiteUrl", e.target.value),
|
|
1905
1819
|
placeholder: "https://..."
|
|
1906
1820
|
}),
|
|
1907
|
-
/* @__PURE__ */
|
|
1908
|
-
label:
|
|
1909
|
-
value:
|
|
1910
|
-
onChange: (e) =>
|
|
1821
|
+
/* @__PURE__ */ K(E, {
|
|
1822
|
+
label: u("devportal.documentationUrl", "Documentation"),
|
|
1823
|
+
value: m.documentationUrl,
|
|
1824
|
+
onChange: (e) => w("documentationUrl", e.target.value),
|
|
1911
1825
|
placeholder: "https://..."
|
|
1912
1826
|
}),
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
label:
|
|
1915
|
-
value:
|
|
1916
|
-
onChange: (e) =>
|
|
1827
|
+
/* @__PURE__ */ K(E, {
|
|
1828
|
+
label: u("devportal.githubUrl", "GitHub"),
|
|
1829
|
+
value: m.githubUrl,
|
|
1830
|
+
onChange: (e) => w("githubUrl", e.target.value),
|
|
1917
1831
|
placeholder: "https://github.com/..."
|
|
1918
1832
|
}),
|
|
1919
|
-
/* @__PURE__ */
|
|
1920
|
-
label:
|
|
1921
|
-
value:
|
|
1922
|
-
onChange: (e) =>
|
|
1833
|
+
/* @__PURE__ */ K(E, {
|
|
1834
|
+
label: u("devportal.supportUrl", "Support"),
|
|
1835
|
+
value: m.supportUrl,
|
|
1836
|
+
onChange: (e) => w("supportUrl", e.target.value),
|
|
1923
1837
|
placeholder: "https://..."
|
|
1924
1838
|
}),
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
label: `${
|
|
1927
|
-
value:
|
|
1928
|
-
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),
|
|
1929
1843
|
placeholder: "https://...",
|
|
1930
|
-
hint:
|
|
1844
|
+
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
1931
1845
|
}),
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
label: `${
|
|
1934
|
-
value:
|
|
1935
|
-
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),
|
|
1936
1850
|
placeholder: "https://...",
|
|
1937
|
-
hint:
|
|
1851
|
+
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
1938
1852
|
})
|
|
1939
1853
|
]
|
|
1940
1854
|
})
|
|
1941
1855
|
}),
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
title:
|
|
1944
|
-
description:
|
|
1945
|
-
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", {
|
|
1946
1860
|
className: "space-y-4",
|
|
1947
|
-
children: [/* @__PURE__ */
|
|
1861
|
+
children: [/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("label", {
|
|
1948
1862
|
className: "mb-2 block text-sm font-medium",
|
|
1949
|
-
children:
|
|
1950
|
-
}), /* @__PURE__ */
|
|
1863
|
+
children: u("devportal.pricingType", "Pricing Type")
|
|
1864
|
+
}), /* @__PURE__ */ K("div", {
|
|
1951
1865
|
className: "flex flex-wrap gap-2",
|
|
1952
|
-
children:
|
|
1866
|
+
children: He.map((e) => /* @__PURE__ */ K("button", {
|
|
1953
1867
|
type: "button",
|
|
1954
|
-
onClick: () =>
|
|
1955
|
-
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"),
|
|
1956
1870
|
children: e.label
|
|
1957
1871
|
}, e.value))
|
|
1958
|
-
})] }),
|
|
1872
|
+
})] }), fe && /* @__PURE__ */ q("div", {
|
|
1959
1873
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1960
|
-
children: [/* @__PURE__ */
|
|
1961
|
-
label:
|
|
1874
|
+
children: [/* @__PURE__ */ K(E, {
|
|
1875
|
+
label: u("devportal.price", "Price"),
|
|
1962
1876
|
type: "number",
|
|
1963
|
-
value:
|
|
1964
|
-
onChange: (e) =>
|
|
1877
|
+
value: m.price,
|
|
1878
|
+
onChange: (e) => w("price", e.target.value),
|
|
1965
1879
|
placeholder: "0.00"
|
|
1966
|
-
}), /* @__PURE__ */
|
|
1967
|
-
label:
|
|
1968
|
-
value:
|
|
1969
|
-
onChange: (e) =>
|
|
1970
|
-
|
|
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…")
|
|
1971
1886
|
})]
|
|
1972
1887
|
})]
|
|
1973
1888
|
})
|
|
1974
1889
|
}),
|
|
1975
|
-
/* @__PURE__ */
|
|
1890
|
+
/* @__PURE__ */ q("div", {
|
|
1976
1891
|
className: "border-t pt-6 flex items-center gap-3 flex-wrap",
|
|
1977
|
-
children: [/* @__PURE__ */
|
|
1892
|
+
children: [/* @__PURE__ */ K("button", {
|
|
1978
1893
|
type: "button",
|
|
1979
|
-
onClick:
|
|
1980
|
-
disabled:
|
|
1894
|
+
onClick: T,
|
|
1895
|
+
disabled: v,
|
|
1981
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",
|
|
1982
|
-
children:
|
|
1983
|
-
size: 16,
|
|
1984
|
-
className: "animate-spin"
|
|
1985
|
-
}), c("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(me, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
|
|
1986
|
-
}), !ye && /* @__PURE__ */ J("button", {
|
|
1987
|
-
type: "button",
|
|
1988
|
-
onClick: () => void w(),
|
|
1989
|
-
disabled: x || d,
|
|
1990
|
-
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-action-primary-bg/5 transition-colors disabled:opacity-50",
|
|
1991
|
-
children: x ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(V, {
|
|
1897
|
+
children: v ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
|
|
1992
1898
|
size: 16,
|
|
1993
1899
|
className: "animate-spin"
|
|
1994
|
-
}),
|
|
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", {
|
|
1902
|
+
className: "flex flex-col gap-1",
|
|
1903
|
+
children: [/* @__PURE__ */ K("button", {
|
|
1904
|
+
type: "button",
|
|
1905
|
+
onClick: () => void k(),
|
|
1906
|
+
disabled: ee || v || !f,
|
|
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",
|
|
1908
|
+
children: ee ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(B, {
|
|
1909
|
+
size: 16,
|
|
1910
|
+
className: "animate-spin"
|
|
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", {
|
|
1913
|
+
className: "text-xs text-text-secondary",
|
|
1914
|
+
children: u("devportal.versionRequiredHint", "At least one version is required before submitting for review.")
|
|
1915
|
+
})]
|
|
1995
1916
|
})]
|
|
1996
1917
|
})
|
|
1997
1918
|
]
|
|
1998
1919
|
});
|
|
1999
1920
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2000
|
-
let { t: i } =
|
|
2001
|
-
return /* @__PURE__ */
|
|
1921
|
+
let { t: i } = P();
|
|
1922
|
+
return /* @__PURE__ */ q(J, {
|
|
2002
1923
|
treatment: "metric",
|
|
2003
1924
|
className: "p-4",
|
|
2004
1925
|
children: [
|
|
2005
|
-
/* @__PURE__ */
|
|
1926
|
+
/* @__PURE__ */ K("p", {
|
|
2006
1927
|
className: "text-sm text-text-secondary",
|
|
2007
1928
|
children: e
|
|
2008
1929
|
}),
|
|
2009
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ K("p", {
|
|
2010
1931
|
className: "text-2xl font-bold tabular-nums",
|
|
2011
1932
|
children: n
|
|
2012
1933
|
}),
|
|
2013
|
-
r !== void 0 && /* @__PURE__ */
|
|
1934
|
+
r !== void 0 && /* @__PURE__ */ q("p", {
|
|
2014
1935
|
className: t("text-xs mt-1 tabular-nums", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-text-secondary"),
|
|
2015
1936
|
children: [
|
|
2016
1937
|
r > 0 ? "+" : "",
|
|
@@ -2024,13 +1945,13 @@ var We = ({ app: n }) => {
|
|
|
2024
1945
|
})
|
|
2025
1946
|
]
|
|
2026
1947
|
});
|
|
2027
|
-
}, $ = ({ label: e, url: t }) => /* @__PURE__ */
|
|
1948
|
+
}, $ = ({ label: e, url: t }) => /* @__PURE__ */ q("a", {
|
|
2028
1949
|
href: t,
|
|
2029
1950
|
target: "_blank",
|
|
2030
1951
|
rel: "noopener noreferrer",
|
|
2031
1952
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2032
|
-
children: [/* @__PURE__ */
|
|
2033
|
-
}),
|
|
1953
|
+
children: [/* @__PURE__ */ K(R, { size: 14 }), e]
|
|
1954
|
+
}), qe = [
|
|
2034
1955
|
{
|
|
2035
1956
|
id: "auth",
|
|
2036
1957
|
label: "Authentication",
|
|
@@ -2102,14 +2023,14 @@ var We = ({ app: n }) => {
|
|
|
2102
2023
|
description: "Access control configuration"
|
|
2103
2024
|
}
|
|
2104
2025
|
];
|
|
2105
|
-
function
|
|
2106
|
-
let t = Object.fromEntries(
|
|
2026
|
+
function Je(e) {
|
|
2027
|
+
let t = Object.fromEntries(qe.map((e) => [e.id, "none"]));
|
|
2107
2028
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2108
2029
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2109
2030
|
return t;
|
|
2110
2031
|
}
|
|
2111
|
-
var
|
|
2112
|
-
let t = e.manifest ?? {}, [n, r] =
|
|
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) => {
|
|
2113
2034
|
s(!1), r((n) => ({
|
|
2114
2035
|
...n,
|
|
2115
2036
|
[e]: t
|
|
@@ -2140,41 +2061,41 @@ var qe = ({ app: e }) => {
|
|
|
2140
2061
|
"read",
|
|
2141
2062
|
"write"
|
|
2142
2063
|
];
|
|
2143
|
-
return /* @__PURE__ */
|
|
2064
|
+
return /* @__PURE__ */ K(_, {
|
|
2144
2065
|
title: "Permissions",
|
|
2145
2066
|
description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
|
|
2146
|
-
children: /* @__PURE__ */
|
|
2067
|
+
children: /* @__PURE__ */ q("div", {
|
|
2147
2068
|
className: "space-y-4",
|
|
2148
2069
|
children: [
|
|
2149
|
-
/* @__PURE__ */
|
|
2070
|
+
/* @__PURE__ */ K("div", {
|
|
2150
2071
|
className: "overflow-x-auto rounded-lg border border-border-subtle",
|
|
2151
|
-
children: /* @__PURE__ */
|
|
2072
|
+
children: /* @__PURE__ */ q("table", {
|
|
2152
2073
|
className: "w-full text-sm",
|
|
2153
|
-
children: [/* @__PURE__ */
|
|
2074
|
+
children: [/* @__PURE__ */ K("thead", { children: /* @__PURE__ */ q("tr", {
|
|
2154
2075
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
2155
|
-
children: [/* @__PURE__ */
|
|
2076
|
+
children: [/* @__PURE__ */ K("th", {
|
|
2156
2077
|
className: "px-4 py-3 text-left font-medium text-text-secondary w-1/2",
|
|
2157
2078
|
children: "Resource"
|
|
2158
|
-
}), f.map((e) => /* @__PURE__ */
|
|
2079
|
+
}), f.map((e) => /* @__PURE__ */ K("th", {
|
|
2159
2080
|
className: "px-4 py-3 text-center font-medium text-text-secondary",
|
|
2160
2081
|
children: d[e]
|
|
2161
2082
|
}, e))]
|
|
2162
|
-
}) }), /* @__PURE__ */
|
|
2083
|
+
}) }), /* @__PURE__ */ K("tbody", {
|
|
2163
2084
|
className: "divide-y divide-border",
|
|
2164
|
-
children:
|
|
2085
|
+
children: qe.map((e) => /* @__PURE__ */ q("tr", {
|
|
2165
2086
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
2166
|
-
children: [/* @__PURE__ */
|
|
2087
|
+
children: [/* @__PURE__ */ q("td", {
|
|
2167
2088
|
className: "px-4 py-3",
|
|
2168
|
-
children: [/* @__PURE__ */
|
|
2089
|
+
children: [/* @__PURE__ */ K("p", {
|
|
2169
2090
|
className: "font-medium text-text-primary",
|
|
2170
2091
|
children: e.label
|
|
2171
|
-
}), /* @__PURE__ */
|
|
2092
|
+
}), /* @__PURE__ */ K("p", {
|
|
2172
2093
|
className: "text-xs text-text-secondary",
|
|
2173
2094
|
children: e.description
|
|
2174
2095
|
})]
|
|
2175
|
-
}), f.map((t) => /* @__PURE__ */
|
|
2096
|
+
}), f.map((t) => /* @__PURE__ */ K("td", {
|
|
2176
2097
|
className: "px-4 py-3 text-center",
|
|
2177
|
-
children: /* @__PURE__ */
|
|
2098
|
+
children: /* @__PURE__ */ K("input", {
|
|
2178
2099
|
type: "radio",
|
|
2179
2100
|
name: `perm-${e.id}`,
|
|
2180
2101
|
value: t,
|
|
@@ -2187,27 +2108,27 @@ var qe = ({ app: e }) => {
|
|
|
2187
2108
|
})]
|
|
2188
2109
|
})
|
|
2189
2110
|
}),
|
|
2190
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ q("div", {
|
|
2191
2112
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2192
|
-
children: [/* @__PURE__ */
|
|
2113
|
+
children: [/* @__PURE__ */ K(ue, {
|
|
2193
2114
|
size: 14,
|
|
2194
2115
|
className: "flex-shrink-0 mt-0.5"
|
|
2195
|
-
}), /* @__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."] })]
|
|
2196
2117
|
}),
|
|
2197
|
-
/* @__PURE__ */
|
|
2118
|
+
/* @__PURE__ */ q("div", {
|
|
2198
2119
|
className: "flex items-center justify-end gap-3",
|
|
2199
|
-
children: [o && /* @__PURE__ */
|
|
2120
|
+
children: [o && /* @__PURE__ */ q("span", {
|
|
2200
2121
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2201
|
-
children: [/* @__PURE__ */
|
|
2202
|
-
}), /* @__PURE__ */
|
|
2122
|
+
children: [/* @__PURE__ */ K(I, { size: 14 }), "Saved"]
|
|
2123
|
+
}), /* @__PURE__ */ q("button", {
|
|
2203
2124
|
type: "button",
|
|
2204
2125
|
onClick: () => void u(),
|
|
2205
2126
|
disabled: i,
|
|
2206
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",
|
|
2207
|
-
children: [i ? /* @__PURE__ */
|
|
2128
|
+
children: [i ? /* @__PURE__ */ K(B, {
|
|
2208
2129
|
size: 14,
|
|
2209
2130
|
className: "animate-spin"
|
|
2210
|
-
}) : /* @__PURE__ */
|
|
2131
|
+
}) : /* @__PURE__ */ K(H, { size: 14 }), "Save Permissions"]
|
|
2211
2132
|
})]
|
|
2212
2133
|
})
|
|
2213
2134
|
]
|
|
@@ -2215,6 +2136,6 @@ var qe = ({ app: e }) => {
|
|
|
2215
2136
|
});
|
|
2216
2137
|
};
|
|
2217
2138
|
//#endregion
|
|
2218
|
-
export {
|
|
2139
|
+
export { X as ApplicationDetailPage };
|
|
2219
2140
|
|
|
2220
2141
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|