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