@burdenoff/microfe-devportal 2026.624.16 → 2026.624.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/ApplicationDetailPage.js +766 -711
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +227 -223
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/generated/global-operations.js +248 -198
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,29 +2,29 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { LoadingState as n } from "../components/LoadingState.js";
|
|
4
4
|
import { EmptyState as r } from "../components/EmptyState.js";
|
|
5
|
-
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s,
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { APP_TYPE_LABELS as
|
|
8
|
-
import { FeaturedBadge as
|
|
9
|
-
import { SelectionCheckbox as
|
|
10
|
-
import { nativeNotify as
|
|
11
|
-
import { NewSecretAlert as
|
|
12
|
-
import { DataTable as
|
|
13
|
-
import { InputField as
|
|
5
|
+
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetMyPublisherQuery as c, useGetPublisherProductsQuery as l, useGetStoreInstallationsQuery as u, useGetWebhooksQuery as d, useGetWorkspaceInstallationQuery as f, useInstallApplicationMutation as p, useRevokeDelegationMutation as m, useRotateAppSecretMutation as h, useSubmitApplicationMutation as g, useUninstallApplicationMutation as _, useUpdateApplicationMutation as v } from "../../generated/global-operations.js";
|
|
6
|
+
import { PageLayout as y, PageSection as b } from "../components/PageLayout.js";
|
|
7
|
+
import { APP_TYPE_LABELS as ee } from "../utils/constants.js";
|
|
8
|
+
import { FeaturedBadge as x, StatusBadge as S, VerifiedBadge as te } from "../components/StatusBadge.js";
|
|
9
|
+
import { SelectionCheckbox as C } from "../components/SelectionCheckbox.js";
|
|
10
|
+
import { nativeNotify as w } from "../../utils/nativeBridge.js";
|
|
11
|
+
import { NewSecretAlert as ne } from "../components/SecretDisplay.js";
|
|
12
|
+
import { DataTable as T, DetailList as E } from "../components/DataTable.js";
|
|
13
|
+
import { InputField as D, SelectField as re, TextareaField as ie } from "../components/FormField.js";
|
|
14
14
|
import { ConfirmDialog as O } from "../components/ConfirmDialog.js";
|
|
15
|
-
import { GrantDelegationModal as
|
|
16
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
17
|
-
import { useDevportalPermission as
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
22
|
-
import { useParams as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import { gql as
|
|
25
|
-
import { useMutation as
|
|
15
|
+
import { GrantDelegationModal as ae } from "../components/GrantDelegationModal.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as oe } from "../constants/permissions.js";
|
|
17
|
+
import { useDevportalPermission as se } from "../hooks/usePermission.js";
|
|
18
|
+
import { usePackageUpload as k } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as A, useEffect as ce, 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 le, AppWindow as F, BarChart3 as I, CheckCircle as L, Clock as ue, Download as de, Edit as fe, ExternalLink as R, FlaskConical as pe, Info as z, Key as me, Loader2 as B, MoreHorizontal as he, Plus as V, Power as ge, RefreshCw as _e, SendHorizontal as ve, Shield as H, Store as ye, Upload as U, Users as W, Webhook as G, X as be, XCircle as xe } from "lucide-react";
|
|
22
|
+
import { useParams as Se } from "react-router-dom";
|
|
23
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
24
|
+
import { gql as Ce } from "@apollo/client";
|
|
25
|
+
import { useMutation as we, useQuery as Y } from "@apollo/client/react";
|
|
26
26
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
27
|
-
function
|
|
27
|
+
function Te(e) {
|
|
28
28
|
return e ? {
|
|
29
29
|
id: e.id,
|
|
30
30
|
name: e.name,
|
|
@@ -79,7 +79,7 @@ function xe(e) {
|
|
|
79
79
|
updatedAt: e.updatedAt
|
|
80
80
|
} : null;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ee(e) {
|
|
83
83
|
return {
|
|
84
84
|
id: e.id,
|
|
85
85
|
applicationId: e.applicationId,
|
|
@@ -103,7 +103,7 @@ function Se(e) {
|
|
|
103
103
|
updatedAt: e.updatedAt
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function De(e) {
|
|
107
107
|
return {
|
|
108
108
|
id: e.id,
|
|
109
109
|
applicationId: e.applicationId,
|
|
@@ -119,7 +119,7 @@ function Ce(e) {
|
|
|
119
119
|
createdAt: e.createdAt
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Oe(e) {
|
|
123
123
|
return {
|
|
124
124
|
id: e.id,
|
|
125
125
|
appId: e.appId,
|
|
@@ -141,11 +141,11 @@ function Z(e) {
|
|
|
141
141
|
revokedBy: e.revokedBy || void 0
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var ke = [
|
|
145
145
|
{
|
|
146
146
|
id: "overview",
|
|
147
147
|
label: "Overview",
|
|
148
|
-
icon:
|
|
148
|
+
icon: F
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
id: "permissions",
|
|
@@ -155,12 +155,12 @@ var we = [
|
|
|
155
155
|
{
|
|
156
156
|
id: "webhooks",
|
|
157
157
|
label: "Webhooks",
|
|
158
|
-
icon:
|
|
158
|
+
icon: G
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
id: "delegations",
|
|
162
162
|
label: "Delegations",
|
|
163
|
-
icon:
|
|
163
|
+
icon: W
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
id: "analytics",
|
|
@@ -175,387 +175,398 @@ var we = [
|
|
|
175
175
|
{
|
|
176
176
|
id: "store-listing",
|
|
177
177
|
label: "Marketplace Listing",
|
|
178
|
-
icon:
|
|
178
|
+
icon: ye
|
|
179
179
|
}
|
|
180
|
-
],
|
|
180
|
+
], Ae = {
|
|
181
181
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
182
182
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
183
183
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
184
|
-
},
|
|
184
|
+
}, X = ({ message: e = "Loading..." }) => /* @__PURE__ */ J("div", {
|
|
185
185
|
className: "flex items-center justify-center gap-3 py-12",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ q(B, {
|
|
187
187
|
size: 20,
|
|
188
188
|
className: "animate-spin text-muted-foreground"
|
|
189
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ q("p", {
|
|
190
190
|
className: "text-sm text-muted-foreground",
|
|
191
191
|
children: e
|
|
192
192
|
})]
|
|
193
|
-
}),
|
|
193
|
+
}), Z = ({ message: e }) => /* @__PURE__ */ J("div", {
|
|
194
194
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ q(le, {
|
|
196
196
|
size: 32,
|
|
197
197
|
className: "text-destructive"
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ q("p", {
|
|
199
199
|
className: "text-sm text-muted-foreground",
|
|
200
200
|
children: e
|
|
201
201
|
})]
|
|
202
|
-
}),
|
|
203
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t:
|
|
204
|
-
let n =
|
|
202
|
+
}), je = () => {
|
|
203
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: l } = P(), u = (e, t) => {
|
|
204
|
+
let n = l(e);
|
|
205
205
|
return n === e ? t : n;
|
|
206
|
-
}, { allowed:
|
|
207
|
-
variables: { id:
|
|
208
|
-
skip: !
|
|
209
|
-
}), [
|
|
206
|
+
}, { allowed: d } = se(oe.APP_UPDATE), { allowed: m } = se(oe.APP_DELETE), { appId: g } = Se(), [v, b] = N("overview"), [C, T] = N(!1), [E, D] = N(!1), [re, ie] = N(null), [k, ce] = N(!1), { data: j, loading: M, error: I } = s({
|
|
207
|
+
variables: { id: g },
|
|
208
|
+
skip: !g
|
|
209
|
+
}), [L, { loading: de }] = h(), [R, { loading: z }] = a(), [me, { loading: he }] = p(), [V, { loading: H }] = _(), { data: ye, refetch: U } = f({
|
|
210
210
|
variables: {
|
|
211
|
-
applicationId:
|
|
211
|
+
applicationId: g,
|
|
212
212
|
workspaceId: c ?? void 0
|
|
213
213
|
},
|
|
214
|
-
skip: !c || !
|
|
214
|
+
skip: !c || !g,
|
|
215
215
|
fetchPolicy: "cache-and-network"
|
|
216
|
-
}),
|
|
216
|
+
}), W = ye?.appInstallations?.edges?.[0]?.node ?? null, G = A((e) => {
|
|
217
217
|
i?.(`${o}${e}`);
|
|
218
|
-
}, [i, o]),
|
|
219
|
-
let e =
|
|
218
|
+
}, [i, o]), be = A(async () => {
|
|
219
|
+
let e = j?.application?.appId;
|
|
220
220
|
if (e) try {
|
|
221
|
-
let t = (await
|
|
222
|
-
t &&
|
|
221
|
+
let t = (await L({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
222
|
+
t && ie(t), T(!1);
|
|
223
223
|
} catch {}
|
|
224
|
-
}, [
|
|
225
|
-
if (
|
|
226
|
-
await
|
|
224
|
+
}, [j?.application?.appId, L]), K = A(async () => {
|
|
225
|
+
if (g) try {
|
|
226
|
+
await R({ variables: { id: g } }), D(!1), G("/apps");
|
|
227
227
|
} catch {}
|
|
228
228
|
}, [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
]),
|
|
233
|
-
if (!(!
|
|
234
|
-
await
|
|
235
|
-
applicationId:
|
|
229
|
+
g,
|
|
230
|
+
R,
|
|
231
|
+
G
|
|
232
|
+
]), Ce = A(async () => {
|
|
233
|
+
if (!(!g || !c)) try {
|
|
234
|
+
await me({ variables: { input: {
|
|
235
|
+
applicationId: g,
|
|
236
236
|
scope: "WORKSPACE",
|
|
237
237
|
workspaceId: c,
|
|
238
238
|
autoUpdate: !1
|
|
239
|
-
} } }),
|
|
239
|
+
} } }), U(), w("success");
|
|
240
240
|
} catch (e) {
|
|
241
|
-
console.error("[DevPortal] Test in Workspace failed:", e),
|
|
241
|
+
console.error("[DevPortal] Test in Workspace failed:", e), w("error");
|
|
242
242
|
}
|
|
243
243
|
}, [
|
|
244
|
-
|
|
244
|
+
g,
|
|
245
245
|
c,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
]),
|
|
246
|
+
me,
|
|
247
|
+
U
|
|
248
|
+
]), we = A(async (e) => {
|
|
249
249
|
try {
|
|
250
|
-
await
|
|
250
|
+
await V({ variables: { id: e } }), U(), w("success");
|
|
251
251
|
} catch {
|
|
252
|
-
|
|
252
|
+
w("error");
|
|
253
253
|
}
|
|
254
|
-
}, [
|
|
255
|
-
if (
|
|
256
|
-
if (
|
|
257
|
-
title:
|
|
254
|
+
}, [V, U]);
|
|
255
|
+
if (M && !j) return /* @__PURE__ */ q(n, { message: u("devportal.loadingApplication", "Loading application...") });
|
|
256
|
+
if (I) return /* @__PURE__ */ q(y, {
|
|
257
|
+
title: u("devportal.error", "Error"),
|
|
258
258
|
backLink: `${o}/apps`,
|
|
259
|
-
backLabel:
|
|
260
|
-
children: /* @__PURE__ */
|
|
259
|
+
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
260
|
+
children: /* @__PURE__ */ J("div", {
|
|
261
261
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ q(le, {
|
|
264
264
|
size: 48,
|
|
265
265
|
className: "text-destructive mb-4"
|
|
266
266
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ q("h3", {
|
|
268
268
|
className: "text-lg font-semibold mb-2",
|
|
269
|
-
children:
|
|
269
|
+
children: u("devportal.failedToLoadApplication", "Failed to load application")
|
|
270
270
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ q("p", {
|
|
272
272
|
className: "text-sm text-muted-foreground",
|
|
273
|
-
children:
|
|
273
|
+
children: I.message
|
|
274
274
|
})
|
|
275
275
|
]
|
|
276
276
|
})
|
|
277
277
|
});
|
|
278
|
-
let
|
|
279
|
-
return
|
|
280
|
-
title:
|
|
281
|
-
description:
|
|
278
|
+
let Y = Te(j?.application);
|
|
279
|
+
return Y ? /* @__PURE__ */ J(y, {
|
|
280
|
+
title: Y.name,
|
|
281
|
+
description: Y.shortDescription,
|
|
282
282
|
backLink: `${o}/apps`,
|
|
283
|
-
backLabel:
|
|
284
|
-
actions: /* @__PURE__ */
|
|
283
|
+
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
284
|
+
actions: /* @__PURE__ */ J("div", {
|
|
285
285
|
className: "flex items-center gap-2",
|
|
286
286
|
children: [
|
|
287
|
-
|
|
288
|
-
onClick: () =>
|
|
289
|
-
disabled: !
|
|
290
|
-
title:
|
|
287
|
+
Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && /* @__PURE__ */ J("button", {
|
|
288
|
+
onClick: () => T(!0),
|
|
289
|
+
disabled: !Y.appId,
|
|
290
|
+
title: Y.appId ? u("devportal.rotateSecretHint", "Generate a new client secret") : u("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
|
|
291
291
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ q(_e, { size: 16 }), u("devportal.rotateSecret", "Rotate Secret")]
|
|
293
293
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
onClick: () =>
|
|
294
|
+
/* @__PURE__ */ J("button", {
|
|
295
|
+
onClick: () => G(`/apps/${Y.id}/versions`),
|
|
296
296
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ q(ue, { size: 16 }), u("devportal.versions", "Versions")]
|
|
298
298
|
}),
|
|
299
|
-
|
|
300
|
-
onClick: () =>
|
|
299
|
+
Y.status !== "PUBLISHED" && /* @__PURE__ */ J("button", {
|
|
300
|
+
onClick: () => G(`/apps/${Y.id}/publish`),
|
|
301
301
|
className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ q(ve, { size: 16 }), u("devportal.submitForReview", "Submit for Review")]
|
|
303
303
|
}),
|
|
304
|
-
|
|
305
|
-
onClick: () => void
|
|
306
|
-
disabled:
|
|
307
|
-
title:
|
|
304
|
+
Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && (W ? /* @__PURE__ */ J("button", {
|
|
305
|
+
onClick: () => void we(W.id),
|
|
306
|
+
disabled: H || !c,
|
|
307
|
+
title: u("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
|
|
308
308
|
className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
|
|
309
|
-
children: [
|
|
309
|
+
children: [H ? /* @__PURE__ */ q(B, {
|
|
310
310
|
size: 16,
|
|
311
311
|
className: "animate-spin"
|
|
312
|
-
}) : /* @__PURE__ */
|
|
313
|
-
}) : /* @__PURE__ */
|
|
314
|
-
onClick: () => void
|
|
315
|
-
disabled:
|
|
312
|
+
}) : /* @__PURE__ */ q(xe, { size: 16 }), u("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
|
|
313
|
+
}) : /* @__PURE__ */ J("button", {
|
|
314
|
+
onClick: () => void Ce(),
|
|
315
|
+
disabled: he || !c,
|
|
316
316
|
"aria-disabled": !c,
|
|
317
|
-
title: c ?
|
|
317
|
+
title: c ? u("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : u("devportal.noWorkspaceContext", "No workspace context available"),
|
|
318
318
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
319
|
-
children: [
|
|
319
|
+
children: [he ? /* @__PURE__ */ q(B, {
|
|
320
320
|
size: 16,
|
|
321
321
|
className: "animate-spin"
|
|
322
|
-
}) : /* @__PURE__ */
|
|
322
|
+
}) : /* @__PURE__ */ q(pe, { size: 16 }), u("devportal.testInWorkspace", "Test in Workspace")]
|
|
323
323
|
})),
|
|
324
|
-
|
|
325
|
-
onClick: () => i?.(`/workflows/new?nodeId=${
|
|
324
|
+
Y.appType === "NODE" && /* @__PURE__ */ J("button", {
|
|
325
|
+
onClick: () => i?.(`/workflows/new?nodeId=${Y.id}`),
|
|
326
326
|
disabled: !c,
|
|
327
327
|
"aria-disabled": !c,
|
|
328
|
-
title: c ?
|
|
328
|
+
title: c ? u("devportal.testInWorkflowBuilderHint", "Open a new workflow with this node available in the builder") : u("devportal.noWorkspaceContext", "No workspace context available"),
|
|
329
329
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ q(pe, { size: 16 }), u("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
|
|
331
331
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
onClick: () =>
|
|
334
|
-
disabled: !
|
|
335
|
-
"aria-disabled": !
|
|
332
|
+
/* @__PURE__ */ J("button", {
|
|
333
|
+
onClick: () => G(`/apps/${Y.id}/edit`),
|
|
334
|
+
disabled: !d,
|
|
335
|
+
"aria-disabled": !d,
|
|
336
336
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
337
|
+
children: [/* @__PURE__ */ q(fe, { size: 16 }), u("devportal.editApp", "Edit App")]
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
onClick: () =>
|
|
341
|
-
disabled: !
|
|
342
|
-
"aria-disabled": !
|
|
339
|
+
/* @__PURE__ */ J("button", {
|
|
340
|
+
onClick: () => D(!0),
|
|
341
|
+
disabled: !m,
|
|
342
|
+
"aria-disabled": !m,
|
|
343
343
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ q(ge, { size: 16 }), u("devportal.deactivate", "Deactivate")]
|
|
345
345
|
})
|
|
346
346
|
]
|
|
347
347
|
}),
|
|
348
348
|
children: [
|
|
349
|
-
|
|
350
|
-
title:
|
|
351
|
-
secret:
|
|
352
|
-
description:
|
|
353
|
-
onDismiss: () =>
|
|
349
|
+
re && /* @__PURE__ */ q(ne, {
|
|
350
|
+
title: u("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
351
|
+
secret: re,
|
|
352
|
+
description: u("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
353
|
+
onDismiss: () => ie(null)
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ J("div", {
|
|
356
356
|
className: "flex flex-wrap items-center gap-2",
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
359
|
-
status:
|
|
358
|
+
/* @__PURE__ */ q(S, {
|
|
359
|
+
status: Y.status,
|
|
360
360
|
type: "app"
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
status:
|
|
362
|
+
/* @__PURE__ */ q(S, {
|
|
363
|
+
status: Y.visibility,
|
|
364
364
|
type: "app"
|
|
365
365
|
}),
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
/* @__PURE__ */
|
|
366
|
+
Y.isVerified && /* @__PURE__ */ q(te, { verified: !0 }),
|
|
367
|
+
Y.isFeatured && /* @__PURE__ */ q(x, {}),
|
|
368
|
+
/* @__PURE__ */ q("span", {
|
|
369
369
|
className: "text-sm text-muted-foreground",
|
|
370
|
-
children:
|
|
370
|
+
children: ee[Y.appType] || Y.appType
|
|
371
371
|
})
|
|
372
372
|
]
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ q("div", {
|
|
375
375
|
className: "border-b",
|
|
376
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ q("nav", {
|
|
377
377
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
378
378
|
role: "tablist",
|
|
379
|
-
"aria-label":
|
|
380
|
-
children:
|
|
379
|
+
"aria-label": u("devportal.applicationSections", "Application sections"),
|
|
380
|
+
children: ke.filter((e) => !((Y.appType === "NODE" || Y.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
|
|
381
381
|
let n = e.icon;
|
|
382
|
-
return /* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ J("button", {
|
|
383
383
|
id: `application-tab-${e.id}`,
|
|
384
384
|
role: "tab",
|
|
385
|
-
"aria-selected":
|
|
385
|
+
"aria-selected": v === e.id,
|
|
386
386
|
"aria-controls": `application-panel-${e.id}`,
|
|
387
|
-
onClick: () =>
|
|
388
|
-
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
387
|
+
onClick: () => b(e.id),
|
|
388
|
+
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", v === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
|
|
389
|
+
children: [/* @__PURE__ */ q(n, { size: 16 }), e.label]
|
|
390
390
|
}, e.id);
|
|
391
391
|
})
|
|
392
392
|
})
|
|
393
393
|
}),
|
|
394
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ J("div", {
|
|
395
395
|
className: "mt-6",
|
|
396
|
-
id: `application-panel-${
|
|
396
|
+
id: `application-panel-${v}`,
|
|
397
397
|
role: "tabpanel",
|
|
398
|
-
"aria-labelledby": `application-tab-${
|
|
398
|
+
"aria-labelledby": `application-tab-${v}`,
|
|
399
399
|
tabIndex: 0,
|
|
400
400
|
children: [
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
appId:
|
|
405
|
-
onNavigate:
|
|
401
|
+
v === "overview" && /* @__PURE__ */ q(Fe, { app: Y }),
|
|
402
|
+
v === "permissions" && /* @__PURE__ */ q($e, { app: Y }),
|
|
403
|
+
v === "webhooks" && /* @__PURE__ */ q(Me, {
|
|
404
|
+
appId: Y.id,
|
|
405
|
+
onNavigate: G
|
|
406
406
|
}),
|
|
407
|
-
|
|
408
|
-
authAppId:
|
|
409
|
-
appName:
|
|
410
|
-
onGrantDelegation: () =>
|
|
411
|
-
onNavigate:
|
|
407
|
+
v === "delegations" && /* @__PURE__ */ q(Ne, {
|
|
408
|
+
authAppId: Y.appId || void 0,
|
|
409
|
+
appName: Y.name,
|
|
410
|
+
onGrantDelegation: () => ce(!0),
|
|
411
|
+
onNavigate: G
|
|
412
412
|
}),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
v === "analytics" && /* @__PURE__ */ q(Pe, { app: Y }),
|
|
414
|
+
v === "playground" && /* @__PURE__ */ q(Be, { app: Y }),
|
|
415
|
+
v === "store-listing" && /* @__PURE__ */ q(Xe, { app: Y })
|
|
416
416
|
]
|
|
417
417
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
open:
|
|
420
|
-
onOpenChange:
|
|
421
|
-
onConfirm:
|
|
422
|
-
title:
|
|
423
|
-
description:
|
|
424
|
-
confirmLabel:
|
|
425
|
-
cancelLabel:
|
|
418
|
+
/* @__PURE__ */ q(O, {
|
|
419
|
+
open: C,
|
|
420
|
+
onOpenChange: T,
|
|
421
|
+
onConfirm: be,
|
|
422
|
+
title: u("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
423
|
+
description: u("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
424
|
+
confirmLabel: u("devportal.rotateSecret", "Rotate Secret"),
|
|
425
|
+
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
426
426
|
variant: "warning",
|
|
427
427
|
loading: de
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
open:
|
|
431
|
-
onOpenChange:
|
|
432
|
-
onConfirm:
|
|
433
|
-
title:
|
|
434
|
-
description:
|
|
435
|
-
confirmLabel:
|
|
436
|
-
cancelLabel:
|
|
429
|
+
/* @__PURE__ */ q(O, {
|
|
430
|
+
open: E,
|
|
431
|
+
onOpenChange: D,
|
|
432
|
+
onConfirm: K,
|
|
433
|
+
title: u("devportal.deactivateApplication", "Deactivate Application"),
|
|
434
|
+
description: u("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
435
|
+
confirmLabel: u("devportal.deactivate", "Deactivate"),
|
|
436
|
+
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
437
437
|
variant: "destructive",
|
|
438
|
-
loading:
|
|
438
|
+
loading: z
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
open:
|
|
442
|
-
onOpenChange:
|
|
443
|
-
appId:
|
|
444
|
-
appName:
|
|
445
|
-
appScopes:
|
|
440
|
+
/* @__PURE__ */ q(ae, {
|
|
441
|
+
open: k,
|
|
442
|
+
onOpenChange: ce,
|
|
443
|
+
appId: Y.appId || "",
|
|
444
|
+
appName: Y.name,
|
|
445
|
+
appScopes: Y.scopes?.map((e) => e.scope) ?? [],
|
|
446
446
|
onSuccess: () => {
|
|
447
|
-
|
|
447
|
+
ce(!1);
|
|
448
448
|
}
|
|
449
449
|
})
|
|
450
450
|
]
|
|
451
|
-
}) : /* @__PURE__ */
|
|
452
|
-
title:
|
|
451
|
+
}) : /* @__PURE__ */ q(y, {
|
|
452
|
+
title: u("devportal.notFound", "Not Found"),
|
|
453
453
|
backLink: `${o}/apps`,
|
|
454
|
-
backLabel:
|
|
455
|
-
children: /* @__PURE__ */
|
|
456
|
-
icon: /* @__PURE__ */
|
|
457
|
-
title:
|
|
458
|
-
description:
|
|
454
|
+
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
455
|
+
children: /* @__PURE__ */ q(r, {
|
|
456
|
+
icon: /* @__PURE__ */ q(F, { size: 48 }),
|
|
457
|
+
title: u("devportal.applicationNotFound", "Application not found"),
|
|
458
|
+
description: u("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
459
459
|
})
|
|
460
460
|
});
|
|
461
|
-
},
|
|
462
|
-
let { t: n } =
|
|
461
|
+
}, Me = ({ appId: e, onNavigate: t }) => {
|
|
462
|
+
let { t: n } = P(), r = (e, t) => {
|
|
463
463
|
let r = n(e);
|
|
464
464
|
return r === e ? t : r;
|
|
465
|
-
}, { data: i, loading: a, error: o } =
|
|
466
|
-
return a ? /* @__PURE__ */
|
|
465
|
+
}, { data: i, loading: a, error: o } = d({ variables: { applicationId: e } });
|
|
466
|
+
return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(Ie, {
|
|
467
467
|
appId: e,
|
|
468
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
468
|
+
webhooks: (i?.webhooks ?? []).map(Ee),
|
|
469
469
|
onNavigate: t
|
|
470
470
|
});
|
|
471
|
-
},
|
|
472
|
-
let { t: o } =
|
|
471
|
+
}, Ne = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
472
|
+
let { t: o } = P(), s = (e, t) => {
|
|
473
473
|
let n = o(e);
|
|
474
474
|
return n === e ? t : n;
|
|
475
|
-
}, { data: c, loading: l, error: u, refetch:
|
|
475
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, ee] = N(null), x = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Oe) : [], [e, c]), S = j(() => x.filter((e) => e.status === "ACTIVE"), [x]), te = j(() => S.filter((e) => v.has(e.id)), [S, v]), C = S.length > 0 && S.every((e) => v.has(e.id)), w = S.some((e) => v.has(e.id)) && !C, ne = A((e, t) => {
|
|
476
476
|
y((n) => {
|
|
477
477
|
let r = new Set(n);
|
|
478
478
|
return t ? r.add(e) : r.delete(e), r;
|
|
479
479
|
});
|
|
480
|
-
}, []),
|
|
480
|
+
}, []), T = A((e) => {
|
|
481
481
|
y((t) => {
|
|
482
482
|
let n = new Set(t);
|
|
483
|
-
return
|
|
483
|
+
return S.forEach((t) => {
|
|
484
484
|
e ? n.add(t.id) : n.delete(t.id);
|
|
485
485
|
}), n;
|
|
486
486
|
});
|
|
487
|
-
}, [
|
|
487
|
+
}, [S]), E = A(() => {
|
|
488
488
|
y(/* @__PURE__ */ new Set());
|
|
489
|
-
}, []),
|
|
489
|
+
}, []), D = A(async (e) => {
|
|
490
490
|
_(!0);
|
|
491
491
|
try {
|
|
492
|
-
let t = await Promise.allSettled(e.map((e) =>
|
|
493
|
-
|
|
492
|
+
let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
493
|
+
ee(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
|
|
494
494
|
let n = new Set(t);
|
|
495
495
|
return e.forEach((e) => n.delete(e)), n;
|
|
496
|
-
}), h([]),
|
|
496
|
+
}), h([]), d();
|
|
497
497
|
} catch {} finally {
|
|
498
498
|
_(!1);
|
|
499
499
|
}
|
|
500
|
-
}, [
|
|
501
|
-
return e ? l ? /* @__PURE__ */
|
|
502
|
-
b && /* @__PURE__ */
|
|
500
|
+
}, [f, d]);
|
|
501
|
+
return e ? l ? /* @__PURE__ */ q(X, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ q(Z, { message: u.message }) : /* @__PURE__ */ J(K, { children: [
|
|
502
|
+
b && /* @__PURE__ */ q("div", {
|
|
503
503
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
504
|
-
children: /* @__PURE__ */
|
|
504
|
+
children: /* @__PURE__ */ J("div", {
|
|
505
505
|
className: "flex items-center justify-between gap-3",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
507
|
-
onClick: () =>
|
|
506
|
+
children: [/* @__PURE__ */ q("span", { children: b }), /* @__PURE__ */ q("button", {
|
|
507
|
+
onClick: () => ee(null),
|
|
508
508
|
className: "text-status-success-text hover:text-status-success-text",
|
|
509
509
|
children: s("devportal.dismiss", "Dismiss")
|
|
510
510
|
})]
|
|
511
511
|
})
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ q(Le, {
|
|
514
514
|
appName: t,
|
|
515
|
-
delegations:
|
|
515
|
+
delegations: x,
|
|
516
516
|
onGrantDelegation: n,
|
|
517
517
|
onRevokeDelegation: (e) => h([e]),
|
|
518
518
|
selectedDelegationIds: v,
|
|
519
|
-
onToggleSelectDelegation:
|
|
520
|
-
onToggleAllDelegations:
|
|
521
|
-
onClearSelection:
|
|
522
|
-
onRevokeSelected: () => h(
|
|
523
|
-
allVisibleSelected:
|
|
524
|
-
partiallySelected:
|
|
519
|
+
onToggleSelectDelegation: ne,
|
|
520
|
+
onToggleAllDelegations: T,
|
|
521
|
+
onClearSelection: E,
|
|
522
|
+
onRevokeSelected: () => h(te.map((e) => e.id)),
|
|
523
|
+
allVisibleSelected: C,
|
|
524
|
+
partiallySelected: w
|
|
525
525
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
open:
|
|
526
|
+
/* @__PURE__ */ q(O, {
|
|
527
|
+
open: p.length > 0,
|
|
528
528
|
onOpenChange: (e) => {
|
|
529
529
|
e || h([]);
|
|
530
530
|
},
|
|
531
531
|
onConfirm: () => {
|
|
532
|
-
|
|
532
|
+
p.length > 0 && D(p);
|
|
533
533
|
},
|
|
534
|
-
title:
|
|
535
|
-
description:
|
|
534
|
+
title: p.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
535
|
+
description: p.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${p.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."),
|
|
536
536
|
confirmLabel: s("devportal.revoke", "Revoke"),
|
|
537
537
|
cancelLabel: s("devportal.cancel", "Cancel"),
|
|
538
538
|
variant: "destructive",
|
|
539
539
|
loading: g
|
|
540
540
|
})
|
|
541
|
-
] }) : /* @__PURE__ */
|
|
542
|
-
icon: /* @__PURE__ */
|
|
541
|
+
] }) : /* @__PURE__ */ q(r, {
|
|
542
|
+
icon: /* @__PURE__ */ q(H, { size: 32 }),
|
|
543
543
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
544
544
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
545
|
-
action: /* @__PURE__ */
|
|
545
|
+
action: /* @__PURE__ */ J("button", {
|
|
546
546
|
onClick: () => a("/oauth"),
|
|
547
547
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
548
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ q(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
549
549
|
})
|
|
550
550
|
});
|
|
551
|
-
},
|
|
552
|
-
let { t } =
|
|
551
|
+
}, Pe = ({ app: e }) => {
|
|
552
|
+
let { t } = P(), n = (e, n) => {
|
|
553
553
|
let r = t(e);
|
|
554
554
|
return r === e ? n : r;
|
|
555
|
-
}, r = e.appType === "NODE" || e.appType === "WORKFLOW", i =
|
|
555
|
+
}, r = e.appType === "NODE" || e.appType === "WORKFLOW", i = j(() => /* @__PURE__ */ new Date(), []), a = j(() => {
|
|
556
556
|
let e = new Date(i);
|
|
557
557
|
return e.setDate(e.getDate() - 30), e;
|
|
558
|
-
}, [i]), { data: s
|
|
558
|
+
}, [i]), { data: s } = c({
|
|
559
|
+
fetchPolicy: "cache-first",
|
|
560
|
+
skip: !r
|
|
561
|
+
}), d = s?.myPublisher?.id ?? null, { data: f } = l({
|
|
562
|
+
variables: { publisherId: d ?? "" },
|
|
563
|
+
fetchPolicy: "cache-first",
|
|
564
|
+
skip: !r || !d
|
|
565
|
+
}), p = f?.products?.find((t) => t.productId === e.id)?.id ?? null, { data: m, loading: h } = u({
|
|
566
|
+
variables: { productId: p ?? "" },
|
|
567
|
+
skip: !r || !p,
|
|
568
|
+
fetchPolicy: "cache-and-network"
|
|
569
|
+
}), { data: g, loading: _, error: v } = o({
|
|
559
570
|
variables: {
|
|
560
571
|
applicationId: e.id,
|
|
561
572
|
period: "daily",
|
|
@@ -564,90 +575,126 @@ var we = [
|
|
|
564
575
|
},
|
|
565
576
|
skip: r
|
|
566
577
|
});
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
className: "
|
|
571
|
-
children: [
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
578
|
+
if (r) {
|
|
579
|
+
let t = m?.productInstallations?.items ?? [], r = m?.productInstallations?.total ?? 0, i = t.filter((e) => e.status === "ACTIVE").length;
|
|
580
|
+
return h && !m ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : /* @__PURE__ */ J("div", {
|
|
581
|
+
className: "space-y-6",
|
|
582
|
+
children: [/* @__PURE__ */ J("div", {
|
|
583
|
+
className: "grid gap-4 sm:grid-cols-4",
|
|
584
|
+
children: [
|
|
585
|
+
/* @__PURE__ */ q(Q, {
|
|
586
|
+
label: n("devportal.totalInstalls", "Total Installs"),
|
|
587
|
+
value: r.toLocaleString()
|
|
588
|
+
}),
|
|
589
|
+
/* @__PURE__ */ q(Q, {
|
|
590
|
+
label: n("devportal.activeInstalls", "Active Installs"),
|
|
591
|
+
value: i.toLocaleString()
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ q(Q, {
|
|
594
|
+
label: n("devportal.averageRating", "Average Rating"),
|
|
595
|
+
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
596
|
+
}),
|
|
597
|
+
/* @__PURE__ */ q(Q, {
|
|
598
|
+
label: n("devportal.reviews", "Reviews"),
|
|
599
|
+
value: e.reviewCount.toString()
|
|
600
|
+
})
|
|
601
|
+
]
|
|
602
|
+
}), t.length > 0 && /* @__PURE__ */ q(b, {
|
|
603
|
+
title: n("devportal.installBreakdown", "Install Breakdown"),
|
|
604
|
+
children: /* @__PURE__ */ q(T, {
|
|
605
|
+
data: t,
|
|
606
|
+
keyField: "id",
|
|
607
|
+
columns: [
|
|
608
|
+
{
|
|
609
|
+
key: "workspaceId",
|
|
610
|
+
header: n("devportal.workspace", "Workspace"),
|
|
611
|
+
render: (e) => e.workspaceId
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
key: "version",
|
|
615
|
+
header: n("devportal.version", "Version"),
|
|
616
|
+
render: (e) => e.version ?? "—"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
key: "status",
|
|
620
|
+
header: n("devportal.status", "Status"),
|
|
621
|
+
render: (e) => e.status
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
key: "installedAt",
|
|
625
|
+
header: n("devportal.installedAt", "Installed"),
|
|
626
|
+
render: (e) => new Date(e.installedAt).toLocaleDateString(void 0, {
|
|
627
|
+
month: "short",
|
|
628
|
+
day: "numeric",
|
|
629
|
+
year: "numeric"
|
|
630
|
+
})
|
|
631
|
+
}
|
|
632
|
+
]
|
|
587
633
|
})
|
|
588
|
-
]
|
|
589
|
-
})
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
|
|
634
|
+
})]
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
return _ ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : v ? /* @__PURE__ */ q(Z, { message: v.message }) : /* @__PURE__ */ q(Re, { analytics: (g?.applicationAnalytics ?? []).map(De) });
|
|
638
|
+
}, Fe = ({ app: e }) => {
|
|
639
|
+
let { t } = P(), n = (e, n) => {
|
|
593
640
|
let r = t(e);
|
|
594
641
|
return r === e ? n : r;
|
|
595
642
|
};
|
|
596
|
-
return /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ J("div", {
|
|
597
644
|
className: "grid gap-6 lg:grid-cols-3",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
645
|
+
children: [/* @__PURE__ */ J("div", {
|
|
599
646
|
className: "lg:col-span-2 space-y-6",
|
|
600
647
|
children: [
|
|
601
|
-
/* @__PURE__ */
|
|
648
|
+
/* @__PURE__ */ J("div", {
|
|
602
649
|
className: "grid gap-4 sm:grid-cols-4",
|
|
603
650
|
children: [
|
|
604
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ q(Q, {
|
|
605
652
|
label: n("devportal.totalInstalls", "Total Installs"),
|
|
606
653
|
value: e.installCount.toLocaleString()
|
|
607
654
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ q(Q, {
|
|
609
656
|
label: n("devportal.activeInstalls", "Active Installs"),
|
|
610
657
|
value: e.activeInstallCount.toLocaleString()
|
|
611
658
|
}),
|
|
612
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ q(Q, {
|
|
613
660
|
label: n("devportal.averageRating", "Average Rating"),
|
|
614
661
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
615
662
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ q(Q, {
|
|
617
664
|
label: n("devportal.reviews", "Reviews"),
|
|
618
665
|
value: e.reviewCount.toString()
|
|
619
666
|
})
|
|
620
667
|
]
|
|
621
668
|
}),
|
|
622
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ q(b, {
|
|
623
670
|
title: n("devportal.description", "Description"),
|
|
624
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */ q("div", {
|
|
625
672
|
className: "prose prose-sm max-w-none",
|
|
626
|
-
children: /* @__PURE__ */
|
|
673
|
+
children: /* @__PURE__ */ q("pre", {
|
|
627
674
|
className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
|
|
628
675
|
children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
|
|
629
676
|
})
|
|
630
677
|
})
|
|
631
678
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ q(b, {
|
|
633
680
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
634
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ J("div", {
|
|
635
682
|
className: "space-y-3",
|
|
636
|
-
children: [e.tags.length > 0 && /* @__PURE__ */
|
|
683
|
+
children: [e.tags.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
637
684
|
className: "text-xs text-muted-foreground mb-2",
|
|
638
685
|
children: n("devportal.tags", "Tags")
|
|
639
|
-
}), /* @__PURE__ */
|
|
686
|
+
}), /* @__PURE__ */ q("div", {
|
|
640
687
|
className: "flex flex-wrap gap-2",
|
|
641
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
688
|
+
children: e.tags.map((e) => /* @__PURE__ */ q("span", {
|
|
642
689
|
className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
|
|
643
690
|
children: e
|
|
644
691
|
}, e))
|
|
645
|
-
})] }), e.keywords.length > 0 && /* @__PURE__ */
|
|
692
|
+
})] }), e.keywords.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
646
693
|
className: "text-xs text-muted-foreground mb-2",
|
|
647
694
|
children: n("devportal.keywords", "Keywords")
|
|
648
|
-
}), /* @__PURE__ */
|
|
695
|
+
}), /* @__PURE__ */ q("div", {
|
|
649
696
|
className: "flex flex-wrap gap-2",
|
|
650
|
-
children: e.keywords.map((e) => /* @__PURE__ */
|
|
697
|
+
children: e.keywords.map((e) => /* @__PURE__ */ q("span", {
|
|
651
698
|
className: "rounded-full bg-muted px-3 py-1 text-xs",
|
|
652
699
|
children: e
|
|
653
700
|
}, e))
|
|
@@ -655,14 +702,14 @@ var we = [
|
|
|
655
702
|
})
|
|
656
703
|
})
|
|
657
704
|
]
|
|
658
|
-
}), /* @__PURE__ */
|
|
705
|
+
}), /* @__PURE__ */ J("div", {
|
|
659
706
|
className: "space-y-6",
|
|
660
|
-
children: [/* @__PURE__ */
|
|
707
|
+
children: [/* @__PURE__ */ q(b, {
|
|
661
708
|
title: n("devportal.details", "Details"),
|
|
662
|
-
children: /* @__PURE__ */
|
|
709
|
+
children: /* @__PURE__ */ q(E, { items: [
|
|
663
710
|
{
|
|
664
711
|
label: n("devportal.appId", "App ID"),
|
|
665
|
-
value: /* @__PURE__ */
|
|
712
|
+
value: /* @__PURE__ */ q("code", {
|
|
666
713
|
className: "text-xs",
|
|
667
714
|
children: e.id
|
|
668
715
|
})
|
|
@@ -692,32 +739,32 @@ var we = [
|
|
|
692
739
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
693
740
|
}
|
|
694
741
|
] })
|
|
695
|
-
}), /* @__PURE__ */
|
|
742
|
+
}), /* @__PURE__ */ q(b, {
|
|
696
743
|
title: n("devportal.links", "Links"),
|
|
697
|
-
children: /* @__PURE__ */
|
|
744
|
+
children: /* @__PURE__ */ J("div", {
|
|
698
745
|
className: "space-y-2",
|
|
699
746
|
children: [
|
|
700
|
-
e.websiteUrl && /* @__PURE__ */
|
|
747
|
+
e.websiteUrl && /* @__PURE__ */ q($, {
|
|
701
748
|
label: n("devportal.website", "Website"),
|
|
702
749
|
url: e.websiteUrl
|
|
703
750
|
}),
|
|
704
|
-
e.documentationUrl && /* @__PURE__ */
|
|
751
|
+
e.documentationUrl && /* @__PURE__ */ q($, {
|
|
705
752
|
label: n("devportal.documentation", "Documentation"),
|
|
706
753
|
url: e.documentationUrl
|
|
707
754
|
}),
|
|
708
|
-
e.supportUrl && /* @__PURE__ */
|
|
755
|
+
e.supportUrl && /* @__PURE__ */ q($, {
|
|
709
756
|
label: n("devportal.support", "Support"),
|
|
710
757
|
url: e.supportUrl
|
|
711
758
|
}),
|
|
712
|
-
e.githubUrl && /* @__PURE__ */
|
|
759
|
+
e.githubUrl && /* @__PURE__ */ q($, {
|
|
713
760
|
label: n("devportal.github", "GitHub"),
|
|
714
761
|
url: e.githubUrl
|
|
715
762
|
}),
|
|
716
|
-
e.privacyPolicyUrl && /* @__PURE__ */
|
|
763
|
+
e.privacyPolicyUrl && /* @__PURE__ */ q($, {
|
|
717
764
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
718
765
|
url: e.privacyPolicyUrl
|
|
719
766
|
}),
|
|
720
|
-
e.termsOfServiceUrl && /* @__PURE__ */
|
|
767
|
+
e.termsOfServiceUrl && /* @__PURE__ */ q($, {
|
|
721
768
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
722
769
|
url: e.termsOfServiceUrl
|
|
723
770
|
})
|
|
@@ -726,16 +773,16 @@ var we = [
|
|
|
726
773
|
})]
|
|
727
774
|
})]
|
|
728
775
|
});
|
|
729
|
-
},
|
|
730
|
-
let { t: i } =
|
|
776
|
+
}, Ie = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
777
|
+
let { t: i } = P(), a = (e, t) => {
|
|
731
778
|
let n = i(e);
|
|
732
779
|
return n === e ? t : n;
|
|
733
780
|
};
|
|
734
|
-
return /* @__PURE__ */
|
|
781
|
+
return /* @__PURE__ */ J("div", {
|
|
735
782
|
className: "space-y-6",
|
|
736
|
-
children: [/* @__PURE__ */
|
|
783
|
+
children: [/* @__PURE__ */ J("div", {
|
|
737
784
|
className: "flex items-center justify-between",
|
|
738
|
-
children: [/* @__PURE__ */
|
|
785
|
+
children: [/* @__PURE__ */ J("p", {
|
|
739
786
|
className: "text-sm text-muted-foreground",
|
|
740
787
|
children: [
|
|
741
788
|
t.length,
|
|
@@ -744,81 +791,81 @@ var we = [
|
|
|
744
791
|
" ",
|
|
745
792
|
a("devportal.configured", "configured")
|
|
746
793
|
]
|
|
747
|
-
}), /* @__PURE__ */
|
|
794
|
+
}), /* @__PURE__ */ J("button", {
|
|
748
795
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
749
796
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
750
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
751
798
|
})]
|
|
752
|
-
}), t.length > 0 ? /* @__PURE__ */
|
|
799
|
+
}), t.length > 0 ? /* @__PURE__ */ q("div", {
|
|
753
800
|
className: "space-y-4",
|
|
754
|
-
children: t.map((t) => /* @__PURE__ */
|
|
801
|
+
children: t.map((t) => /* @__PURE__ */ J("div", {
|
|
755
802
|
className: "rounded-lg border bg-card p-4 space-y-4",
|
|
756
803
|
children: [
|
|
757
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ J("div", {
|
|
758
805
|
className: "flex items-start justify-between",
|
|
759
|
-
children: [/* @__PURE__ */
|
|
806
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
760
807
|
className: "flex items-center gap-2",
|
|
761
|
-
children: [/* @__PURE__ */
|
|
808
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
762
809
|
className: "font-medium",
|
|
763
810
|
children: t.name
|
|
764
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ q(S, {
|
|
765
812
|
status: t.status,
|
|
766
813
|
type: "webhook"
|
|
767
814
|
})]
|
|
768
|
-
}), t.description && /* @__PURE__ */
|
|
815
|
+
}), t.description && /* @__PURE__ */ q("p", {
|
|
769
816
|
className: "text-sm text-muted-foreground mt-1",
|
|
770
817
|
children: t.description
|
|
771
|
-
})] }), /* @__PURE__ */
|
|
818
|
+
})] }), /* @__PURE__ */ q("button", {
|
|
772
819
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
773
820
|
className: "rounded-md p-1 hover:bg-muted",
|
|
774
|
-
children: /* @__PURE__ */
|
|
821
|
+
children: /* @__PURE__ */ q(he, { size: 20 })
|
|
775
822
|
})]
|
|
776
823
|
}),
|
|
777
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
778
825
|
className: "text-xs text-muted-foreground mb-1",
|
|
779
826
|
children: a("devportal.endpointUrl", "Endpoint URL")
|
|
780
|
-
}), /* @__PURE__ */
|
|
827
|
+
}), /* @__PURE__ */ q("code", {
|
|
781
828
|
className: "text-sm bg-muted px-2 py-1 rounded block truncate",
|
|
782
829
|
children: t.url
|
|
783
830
|
})] }),
|
|
784
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
785
832
|
className: "text-xs text-muted-foreground mb-2",
|
|
786
833
|
children: a("devportal.events", "Events")
|
|
787
|
-
}), /* @__PURE__ */
|
|
834
|
+
}), /* @__PURE__ */ q("div", {
|
|
788
835
|
className: "flex flex-wrap gap-2",
|
|
789
|
-
children: t.events.map((e) => /* @__PURE__ */
|
|
836
|
+
children: t.events.map((e) => /* @__PURE__ */ q("span", {
|
|
790
837
|
className: "rounded-full bg-muted px-2 py-0.5 text-xs",
|
|
791
838
|
children: e
|
|
792
839
|
}, e))
|
|
793
840
|
})] }),
|
|
794
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ J("div", {
|
|
795
842
|
className: "grid gap-4 sm:grid-cols-4 text-sm",
|
|
796
843
|
children: [
|
|
797
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
798
845
|
className: "text-xs text-muted-foreground",
|
|
799
846
|
children: a("devportal.success", "Success")
|
|
800
|
-
}), /* @__PURE__ */
|
|
847
|
+
}), /* @__PURE__ */ q("p", {
|
|
801
848
|
className: "font-medium text-status-success-text",
|
|
802
849
|
children: t.successCount.toLocaleString()
|
|
803
850
|
})] }),
|
|
804
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
805
852
|
className: "text-xs text-muted-foreground",
|
|
806
853
|
children: a("devportal.failed", "Failed")
|
|
807
|
-
}), /* @__PURE__ */
|
|
854
|
+
}), /* @__PURE__ */ q("p", {
|
|
808
855
|
className: "font-medium text-status-error-text",
|
|
809
856
|
children: t.failureCount.toLocaleString()
|
|
810
857
|
})] }),
|
|
811
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
812
859
|
className: "text-xs text-muted-foreground",
|
|
813
860
|
children: a("devportal.successRate", "Success Rate")
|
|
814
|
-
}), /* @__PURE__ */
|
|
861
|
+
}), /* @__PURE__ */ J("p", {
|
|
815
862
|
className: "font-medium",
|
|
816
863
|
children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
|
|
817
864
|
})] }),
|
|
818
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
819
866
|
className: "text-xs text-muted-foreground",
|
|
820
867
|
children: a("devportal.lastTriggered", "Last Triggered")
|
|
821
|
-
}), /* @__PURE__ */
|
|
868
|
+
}), /* @__PURE__ */ q("p", {
|
|
822
869
|
className: "font-medium",
|
|
823
870
|
children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
|
|
824
871
|
})] })
|
|
@@ -826,28 +873,28 @@ var we = [
|
|
|
826
873
|
})
|
|
827
874
|
]
|
|
828
875
|
}, t.id))
|
|
829
|
-
}) : /* @__PURE__ */
|
|
830
|
-
icon: /* @__PURE__ */
|
|
876
|
+
}) : /* @__PURE__ */ q(r, {
|
|
877
|
+
icon: /* @__PURE__ */ q(G, { size: 32 }),
|
|
831
878
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
832
879
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
833
|
-
action: /* @__PURE__ */
|
|
880
|
+
action: /* @__PURE__ */ J("button", {
|
|
834
881
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
835
882
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
836
|
-
children: [/* @__PURE__ */
|
|
883
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
837
884
|
})
|
|
838
885
|
})]
|
|
839
886
|
});
|
|
840
|
-
},
|
|
841
|
-
let { t: p } =
|
|
887
|
+
}, Le = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
888
|
+
let { t: p } = P(), m = (e, t) => {
|
|
842
889
|
let n = p(e);
|
|
843
890
|
return n === e ? t : n;
|
|
844
891
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
845
|
-
return /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ J("div", {
|
|
846
893
|
className: "space-y-6",
|
|
847
894
|
children: [
|
|
848
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ J("div", {
|
|
849
896
|
className: "flex items-center justify-between",
|
|
850
|
-
children: [/* @__PURE__ */
|
|
897
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
|
|
851
898
|
className: "text-sm text-muted-foreground",
|
|
852
899
|
children: [
|
|
853
900
|
n.length,
|
|
@@ -858,7 +905,7 @@ var we = [
|
|
|
858
905
|
" ",
|
|
859
906
|
e
|
|
860
907
|
]
|
|
861
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
908
|
+
}), h.length > 0 && /* @__PURE__ */ J("p", {
|
|
862
909
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
863
910
|
children: [
|
|
864
911
|
h.length,
|
|
@@ -870,44 +917,44 @@ var we = [
|
|
|
870
917
|
" ",
|
|
871
918
|
m("devportal.revokedExpired", "revoked/expired")
|
|
872
919
|
]
|
|
873
|
-
})] }), /* @__PURE__ */
|
|
920
|
+
})] }), /* @__PURE__ */ J("button", {
|
|
874
921
|
onClick: i,
|
|
875
922
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
876
|
-
children: [/* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
877
924
|
})]
|
|
878
925
|
}),
|
|
879
|
-
h.length > 0 && /* @__PURE__ */
|
|
926
|
+
h.length > 0 && /* @__PURE__ */ q("div", {
|
|
880
927
|
className: "rounded-lg border bg-card p-4",
|
|
881
|
-
children: /* @__PURE__ */
|
|
928
|
+
children: /* @__PURE__ */ J("div", {
|
|
882
929
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
883
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ J("div", {
|
|
884
931
|
className: "flex flex-wrap items-center gap-3",
|
|
885
|
-
children: [/* @__PURE__ */
|
|
932
|
+
children: [/* @__PURE__ */ J("div", {
|
|
886
933
|
className: "flex items-center gap-2",
|
|
887
|
-
children: [/* @__PURE__ */
|
|
934
|
+
children: [/* @__PURE__ */ q(C, {
|
|
888
935
|
checked: d,
|
|
889
936
|
indeterminate: f,
|
|
890
937
|
onChange: c,
|
|
891
938
|
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
892
|
-
}), /* @__PURE__ */
|
|
939
|
+
}), /* @__PURE__ */ q("span", {
|
|
893
940
|
className: "text-sm font-medium",
|
|
894
941
|
children: m("devportal.selectAllActive", "Select all active")
|
|
895
942
|
})]
|
|
896
|
-
}), o.size > 0 && /* @__PURE__ */
|
|
943
|
+
}), o.size > 0 && /* @__PURE__ */ q("button", {
|
|
897
944
|
onClick: l,
|
|
898
945
|
className: "text-sm text-muted-foreground hover:text-foreground",
|
|
899
946
|
children: m("devportal.clearSelection", "Clear selection")
|
|
900
947
|
})]
|
|
901
|
-
}), /* @__PURE__ */
|
|
948
|
+
}), /* @__PURE__ */ J("div", {
|
|
902
949
|
className: "flex flex-wrap items-center gap-2",
|
|
903
|
-
children: [/* @__PURE__ */
|
|
950
|
+
children: [/* @__PURE__ */ J("span", {
|
|
904
951
|
className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
|
|
905
952
|
children: [
|
|
906
953
|
o.size,
|
|
907
954
|
" ",
|
|
908
955
|
m("devportal.selected", "selected")
|
|
909
956
|
]
|
|
910
|
-
}), /* @__PURE__ */
|
|
957
|
+
}), /* @__PURE__ */ J("button", {
|
|
911
958
|
onClick: u,
|
|
912
959
|
disabled: o.size === 0,
|
|
913
960
|
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",
|
|
@@ -916,33 +963,33 @@ var we = [
|
|
|
916
963
|
})]
|
|
917
964
|
})
|
|
918
965
|
}),
|
|
919
|
-
n.length > 0 ? /* @__PURE__ */
|
|
966
|
+
n.length > 0 ? /* @__PURE__ */ q("div", {
|
|
920
967
|
className: "space-y-4",
|
|
921
|
-
children: n.map((e) => /* @__PURE__ */
|
|
968
|
+
children: n.map((e) => /* @__PURE__ */ J("div", {
|
|
922
969
|
className: "rounded-lg border bg-card p-4 space-y-4",
|
|
923
970
|
children: [
|
|
924
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ J("div", {
|
|
925
972
|
className: "flex items-start justify-between",
|
|
926
|
-
children: [/* @__PURE__ */
|
|
973
|
+
children: [/* @__PURE__ */ J("div", {
|
|
927
974
|
className: "flex items-start gap-3",
|
|
928
|
-
children: [e.status === "ACTIVE" && /* @__PURE__ */
|
|
975
|
+
children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
|
|
929
976
|
onClick: (e) => e.stopPropagation(),
|
|
930
|
-
children: /* @__PURE__ */
|
|
977
|
+
children: /* @__PURE__ */ q(C, {
|
|
931
978
|
checked: o.has(e.id),
|
|
932
979
|
onChange: (t) => s(e.id, t),
|
|
933
980
|
ariaLabel: `Select delegation ${e.id}`,
|
|
934
981
|
className: "mt-1"
|
|
935
982
|
})
|
|
936
|
-
}), /* @__PURE__ */
|
|
983
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
937
984
|
className: "flex items-center gap-2",
|
|
938
|
-
children: [/* @__PURE__ */
|
|
985
|
+
children: [/* @__PURE__ */ J("h3", {
|
|
939
986
|
className: "font-medium",
|
|
940
987
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
941
|
-
}), /* @__PURE__ */
|
|
942
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
988
|
+
}), /* @__PURE__ */ q("span", {
|
|
989
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Ae[e.status]),
|
|
943
990
|
children: e.status
|
|
944
991
|
})]
|
|
945
|
-
}), /* @__PURE__ */
|
|
992
|
+
}), /* @__PURE__ */ J("p", {
|
|
946
993
|
className: "text-sm text-muted-foreground mt-1",
|
|
947
994
|
children: [
|
|
948
995
|
m("devportal.granted", "Granted"),
|
|
@@ -954,55 +1001,55 @@ var we = [
|
|
|
954
1001
|
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
955
1002
|
]
|
|
956
1003
|
})] })]
|
|
957
|
-
}), e.status === "ACTIVE" && /* @__PURE__ */
|
|
1004
|
+
}), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
|
|
958
1005
|
onClick: () => a(e.id),
|
|
959
1006
|
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",
|
|
960
|
-
children: [/* @__PURE__ */
|
|
1007
|
+
children: [/* @__PURE__ */ q(xe, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
961
1008
|
})]
|
|
962
1009
|
}),
|
|
963
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
964
1011
|
className: "text-xs text-muted-foreground mb-2",
|
|
965
1012
|
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
966
|
-
}), /* @__PURE__ */
|
|
1013
|
+
}), /* @__PURE__ */ q("div", {
|
|
967
1014
|
className: "flex flex-wrap gap-2",
|
|
968
|
-
children: e.scopes.map((e) => /* @__PURE__ */
|
|
1015
|
+
children: e.scopes.map((e) => /* @__PURE__ */ q("span", {
|
|
969
1016
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
970
1017
|
children: e
|
|
971
1018
|
}, e))
|
|
972
1019
|
})] }),
|
|
973
|
-
e.workspaceIds.length > 0 && /* @__PURE__ */
|
|
1020
|
+
e.workspaceIds.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
974
1021
|
className: "text-xs text-muted-foreground mb-2",
|
|
975
1022
|
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
976
|
-
}), /* @__PURE__ */
|
|
1023
|
+
}), /* @__PURE__ */ q("div", {
|
|
977
1024
|
className: "flex flex-wrap gap-2",
|
|
978
|
-
children: e.workspaceIds.map((e) => /* @__PURE__ */
|
|
1025
|
+
children: e.workspaceIds.map((e) => /* @__PURE__ */ q("code", {
|
|
979
1026
|
className: "rounded bg-muted px-2 py-0.5 text-xs",
|
|
980
1027
|
children: e
|
|
981
1028
|
}, e))
|
|
982
1029
|
})] }),
|
|
983
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ J("div", {
|
|
984
1031
|
className: "flex items-center gap-4 text-xs text-muted-foreground",
|
|
985
1032
|
children: [
|
|
986
|
-
e.expiresAt && /* @__PURE__ */
|
|
1033
|
+
e.expiresAt && /* @__PURE__ */ J("span", {
|
|
987
1034
|
className: "flex items-center gap-1",
|
|
988
1035
|
children: [
|
|
989
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ q(ue, { size: 12 }),
|
|
990
1037
|
m("devportal.expires", "Expires"),
|
|
991
1038
|
" ",
|
|
992
1039
|
new Date(e.expiresAt).toLocaleDateString()
|
|
993
1040
|
]
|
|
994
1041
|
}),
|
|
995
|
-
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */
|
|
1042
|
+
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ J("span", {
|
|
996
1043
|
className: "flex items-center gap-1",
|
|
997
|
-
children: [/* @__PURE__ */
|
|
1044
|
+
children: [/* @__PURE__ */ q(L, {
|
|
998
1045
|
size: 12,
|
|
999
1046
|
className: "text-status-success-text"
|
|
1000
1047
|
}), m("devportal.noExpiration", "No expiration")]
|
|
1001
1048
|
}),
|
|
1002
|
-
e.revokedAt && /* @__PURE__ */
|
|
1049
|
+
e.revokedAt && /* @__PURE__ */ J("span", {
|
|
1003
1050
|
className: "flex items-center gap-1",
|
|
1004
1051
|
children: [
|
|
1005
|
-
/* @__PURE__ */
|
|
1052
|
+
/* @__PURE__ */ q(xe, {
|
|
1006
1053
|
size: 12,
|
|
1007
1054
|
className: "text-status-error-text"
|
|
1008
1055
|
}),
|
|
@@ -1015,52 +1062,52 @@ var we = [
|
|
|
1015
1062
|
})
|
|
1016
1063
|
]
|
|
1017
1064
|
}, e.id))
|
|
1018
|
-
}) : /* @__PURE__ */
|
|
1019
|
-
icon: /* @__PURE__ */
|
|
1065
|
+
}) : /* @__PURE__ */ q(r, {
|
|
1066
|
+
icon: /* @__PURE__ */ q(W, { size: 32 }),
|
|
1020
1067
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1021
1068
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1022
|
-
action: /* @__PURE__ */
|
|
1069
|
+
action: /* @__PURE__ */ J("button", {
|
|
1023
1070
|
onClick: i,
|
|
1024
1071
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
1025
|
-
children: [/* @__PURE__ */
|
|
1072
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1026
1073
|
})
|
|
1027
1074
|
})
|
|
1028
1075
|
]
|
|
1029
1076
|
});
|
|
1030
|
-
},
|
|
1031
|
-
let { t } =
|
|
1077
|
+
}, Re = ({ analytics: e }) => {
|
|
1078
|
+
let { t } = P(), n = (e, n) => {
|
|
1032
1079
|
let r = t(e);
|
|
1033
1080
|
return r === e ? n : r;
|
|
1034
1081
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
1035
|
-
return /* @__PURE__ */
|
|
1082
|
+
return /* @__PURE__ */ J("div", {
|
|
1036
1083
|
className: "space-y-6",
|
|
1037
|
-
children: [/* @__PURE__ */
|
|
1084
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1038
1085
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1039
1086
|
children: [
|
|
1040
|
-
/* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ q(Q, {
|
|
1041
1088
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1042
1089
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1043
1090
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1044
1091
|
}),
|
|
1045
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ q(Q, {
|
|
1046
1093
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1047
1094
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1048
1095
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1049
1096
|
}),
|
|
1050
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ q(Q, {
|
|
1051
1098
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1052
1099
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1053
1100
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1054
1101
|
}),
|
|
1055
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ q(Q, {
|
|
1056
1103
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1057
1104
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1058
1105
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1059
1106
|
})
|
|
1060
1107
|
]
|
|
1061
|
-
}), /* @__PURE__ */
|
|
1108
|
+
}), /* @__PURE__ */ q(b, {
|
|
1062
1109
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1063
|
-
children: e.length > 0 ? /* @__PURE__ */
|
|
1110
|
+
children: e.length > 0 ? /* @__PURE__ */ q(T, {
|
|
1064
1111
|
data: e,
|
|
1065
1112
|
keyField: "id",
|
|
1066
1113
|
columns: [
|
|
@@ -1100,18 +1147,18 @@ var we = [
|
|
|
1100
1147
|
render: (e) => e.sessions.toLocaleString()
|
|
1101
1148
|
}
|
|
1102
1149
|
]
|
|
1103
|
-
}) : /* @__PURE__ */
|
|
1104
|
-
icon: /* @__PURE__ */
|
|
1150
|
+
}) : /* @__PURE__ */ q(r, {
|
|
1151
|
+
icon: /* @__PURE__ */ q(I, { size: 32 }),
|
|
1105
1152
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1106
1153
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1107
1154
|
})
|
|
1108
1155
|
})]
|
|
1109
1156
|
});
|
|
1110
|
-
},
|
|
1111
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1157
|
+
}, ze = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Be = ({ app: t }) => {
|
|
1158
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
|
|
1112
1159
|
let n = a(e);
|
|
1113
1160
|
return n === e ? t : n;
|
|
1114
|
-
}, [s, c] =
|
|
1161
|
+
}, [s, c] = N(ze), [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), ee = A(async () => {
|
|
1115
1162
|
m(!0), f("");
|
|
1116
1163
|
try {
|
|
1117
1164
|
let e = {};
|
|
@@ -1142,24 +1189,24 @@ var we = [
|
|
|
1142
1189
|
l,
|
|
1143
1190
|
h,
|
|
1144
1191
|
_
|
|
1145
|
-
]),
|
|
1192
|
+
]), x = A(() => {
|
|
1146
1193
|
i && v(i), b(!0);
|
|
1147
1194
|
}, [i]);
|
|
1148
|
-
return /* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ J("div", {
|
|
1149
1196
|
className: "space-y-4",
|
|
1150
1197
|
children: [
|
|
1151
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ J("div", {
|
|
1152
1199
|
className: "flex items-center justify-between",
|
|
1153
|
-
children: [/* @__PURE__ */
|
|
1200
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("h3", {
|
|
1154
1201
|
className: "text-lg font-semibold",
|
|
1155
1202
|
children: o("devportal.apiPlayground", "API Playground")
|
|
1156
|
-
}), /* @__PURE__ */
|
|
1203
|
+
}), /* @__PURE__ */ J("p", {
|
|
1157
1204
|
className: "text-sm text-muted-foreground",
|
|
1158
1205
|
children: [
|
|
1159
1206
|
o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
|
|
1160
1207
|
" ",
|
|
1161
|
-
/* @__PURE__ */
|
|
1162
|
-
t.appId && /* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ q("strong", { children: t.name }),
|
|
1209
|
+
t.appId && /* @__PURE__ */ J("span", {
|
|
1163
1210
|
className: "ml-1 text-xs text-muted-foreground",
|
|
1164
1211
|
children: [
|
|
1165
1212
|
"(OAuth App: ",
|
|
@@ -1168,39 +1215,39 @@ var we = [
|
|
|
1168
1215
|
]
|
|
1169
1216
|
})
|
|
1170
1217
|
]
|
|
1171
|
-
})] }), /* @__PURE__ */
|
|
1172
|
-
onClick:
|
|
1218
|
+
})] }), /* @__PURE__ */ J("button", {
|
|
1219
|
+
onClick: x,
|
|
1173
1220
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1174
|
-
children: [/* @__PURE__ */
|
|
1221
|
+
children: [/* @__PURE__ */ q(me, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1175
1222
|
})]
|
|
1176
1223
|
}),
|
|
1177
|
-
y && /* @__PURE__ */
|
|
1224
|
+
y && /* @__PURE__ */ J("div", {
|
|
1178
1225
|
className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
|
|
1179
1226
|
children: [
|
|
1180
|
-
/* @__PURE__ */
|
|
1227
|
+
/* @__PURE__ */ q("p", {
|
|
1181
1228
|
className: "font-medium text-status-info-text",
|
|
1182
1229
|
children: o("devportal.authenticationGuide", "Authentication Guide")
|
|
1183
1230
|
}),
|
|
1184
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ J("p", {
|
|
1185
1232
|
className: "text-status-info-text",
|
|
1186
1233
|
children: [
|
|
1187
1234
|
o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
|
|
1188
1235
|
" ",
|
|
1189
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ q("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
|
|
1190
1237
|
" ",
|
|
1191
1238
|
o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
|
|
1192
1239
|
]
|
|
1193
1240
|
}),
|
|
1194
|
-
/* @__PURE__ */
|
|
1241
|
+
/* @__PURE__ */ q("pre", {
|
|
1195
1242
|
className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
|
|
1196
1243
|
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}"
|
|
1197
1244
|
}),
|
|
1198
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ J("p", {
|
|
1199
1246
|
className: "text-status-info-text",
|
|
1200
1247
|
children: [
|
|
1201
1248
|
o("devportal.useReturnedAccessToken", "Use the returned"),
|
|
1202
1249
|
" ",
|
|
1203
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ q("code", {
|
|
1204
1251
|
className: "bg-status-info-bg-subtle px-1 rounded",
|
|
1205
1252
|
children: "accessToken"
|
|
1206
1253
|
}),
|
|
@@ -1208,129 +1255,129 @@ var we = [
|
|
|
1208
1255
|
o("devportal.asBearerToken", "as the Bearer token below.")
|
|
1209
1256
|
]
|
|
1210
1257
|
}),
|
|
1211
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ q("button", {
|
|
1212
1259
|
onClick: () => b(!1),
|
|
1213
1260
|
className: "text-xs text-accent-blue hover:underline",
|
|
1214
1261
|
children: o("devportal.dismiss", "Dismiss")
|
|
1215
1262
|
})
|
|
1216
1263
|
]
|
|
1217
1264
|
}),
|
|
1218
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1219
1266
|
className: "block text-sm font-medium mb-1",
|
|
1220
1267
|
children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
|
|
1221
|
-
}), /* @__PURE__ */
|
|
1268
|
+
}), /* @__PURE__ */ J("div", {
|
|
1222
1269
|
className: "flex gap-2",
|
|
1223
|
-
children: [/* @__PURE__ */
|
|
1270
|
+
children: [/* @__PURE__ */ q("input", {
|
|
1224
1271
|
type: "text",
|
|
1225
1272
|
value: h,
|
|
1226
1273
|
onChange: (e) => g(e.target.value),
|
|
1227
1274
|
className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
|
|
1228
|
-
}), /* @__PURE__ */
|
|
1275
|
+
}), /* @__PURE__ */ J("select", {
|
|
1229
1276
|
onChange: (e) => g(e.target.value),
|
|
1230
1277
|
className: "rounded-md border px-3 py-2 text-sm bg-background",
|
|
1231
1278
|
value: h,
|
|
1232
|
-
children: [/* @__PURE__ */
|
|
1279
|
+
children: [/* @__PURE__ */ q("option", {
|
|
1233
1280
|
value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
|
|
1234
1281
|
children: o("devportal.globalGateway", "Global Gateway")
|
|
1235
|
-
}), /* @__PURE__ */
|
|
1282
|
+
}), /* @__PURE__ */ q("option", {
|
|
1236
1283
|
value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
|
|
1237
1284
|
children: o("devportal.workspaceGateway", "Workspace Gateway")
|
|
1238
1285
|
})]
|
|
1239
1286
|
})]
|
|
1240
1287
|
})] }),
|
|
1241
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1242
1289
|
className: "block text-sm font-medium mb-1",
|
|
1243
1290
|
children: o("devportal.bearerToken", "Bearer Token")
|
|
1244
|
-
}), /* @__PURE__ */
|
|
1291
|
+
}), /* @__PURE__ */ q("input", {
|
|
1245
1292
|
type: "password",
|
|
1246
1293
|
value: _,
|
|
1247
1294
|
onChange: (e) => v(e.target.value),
|
|
1248
1295
|
placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
|
|
1249
1296
|
className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
|
|
1250
1297
|
})] }),
|
|
1251
|
-
/* @__PURE__ */
|
|
1298
|
+
/* @__PURE__ */ J("div", {
|
|
1252
1299
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
1253
|
-
children: [/* @__PURE__ */
|
|
1300
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1254
1301
|
className: "block text-sm font-medium mb-1",
|
|
1255
1302
|
children: o("devportal.query", "Query")
|
|
1256
|
-
}), /* @__PURE__ */
|
|
1303
|
+
}), /* @__PURE__ */ q("textarea", {
|
|
1257
1304
|
value: s,
|
|
1258
1305
|
onChange: (e) => c(e.target.value),
|
|
1259
1306
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
|
|
1260
1307
|
spellCheck: !1
|
|
1261
|
-
})] }), /* @__PURE__ */
|
|
1308
|
+
})] }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1262
1309
|
className: "block text-sm font-medium mb-1",
|
|
1263
1310
|
children: o("devportal.variablesJson", "Variables (JSON)")
|
|
1264
|
-
}), /* @__PURE__ */
|
|
1311
|
+
}), /* @__PURE__ */ q("textarea", {
|
|
1265
1312
|
value: l,
|
|
1266
1313
|
onChange: (e) => u(e.target.value),
|
|
1267
1314
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
|
|
1268
1315
|
spellCheck: !1
|
|
1269
1316
|
})] })]
|
|
1270
1317
|
}),
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
onClick:
|
|
1318
|
+
/* @__PURE__ */ J("button", {
|
|
1319
|
+
onClick: ee,
|
|
1273
1320
|
disabled: p,
|
|
1274
1321
|
className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
1275
|
-
children: [p ? /* @__PURE__ */
|
|
1322
|
+
children: [p ? /* @__PURE__ */ q(B, {
|
|
1276
1323
|
size: 16,
|
|
1277
1324
|
className: "animate-spin"
|
|
1278
|
-
}) : /* @__PURE__ */
|
|
1325
|
+
}) : /* @__PURE__ */ q(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1279
1326
|
}),
|
|
1280
|
-
d && /* @__PURE__ */
|
|
1327
|
+
d && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1281
1328
|
className: "block text-sm font-medium mb-1",
|
|
1282
1329
|
children: o("devportal.response", "Response")
|
|
1283
|
-
}), /* @__PURE__ */
|
|
1330
|
+
}), /* @__PURE__ */ q("pre", {
|
|
1284
1331
|
className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
|
|
1285
1332
|
children: d
|
|
1286
1333
|
})] })
|
|
1287
1334
|
]
|
|
1288
1335
|
});
|
|
1289
|
-
},
|
|
1290
|
-
let d =
|
|
1336
|
+
}, Ve = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
|
|
1337
|
+
let d = M(null), f = A(async (e) => {
|
|
1291
1338
|
try {
|
|
1292
1339
|
r((await s(e)).downloadUrl);
|
|
1293
1340
|
} catch {}
|
|
1294
1341
|
}, [s, r]);
|
|
1295
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ J("div", {
|
|
1296
1343
|
className: "space-y-1.5",
|
|
1297
1344
|
children: [
|
|
1298
|
-
/* @__PURE__ */
|
|
1345
|
+
/* @__PURE__ */ q("label", {
|
|
1299
1346
|
className: "text-sm font-medium",
|
|
1300
1347
|
children: e
|
|
1301
1348
|
}),
|
|
1302
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ J("div", {
|
|
1303
1350
|
className: "flex gap-3 items-start",
|
|
1304
|
-
children: [/* @__PURE__ */
|
|
1351
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1305
1352
|
className: t("relative shrink-0 w-20 rounded-lg border border-border bg-bg-sunken overflow-hidden flex items-center justify-center", o),
|
|
1306
|
-
children: [n ? /* @__PURE__ */
|
|
1353
|
+
children: [n ? /* @__PURE__ */ q("img", {
|
|
1307
1354
|
src: n,
|
|
1308
1355
|
alt: e,
|
|
1309
1356
|
className: "w-full h-full object-cover"
|
|
1310
|
-
}) : /* @__PURE__ */
|
|
1357
|
+
}) : /* @__PURE__ */ q(U, {
|
|
1311
1358
|
size: 18,
|
|
1312
1359
|
className: "text-text-secondary opacity-40"
|
|
1313
|
-
}), c && /* @__PURE__ */
|
|
1360
|
+
}), c && /* @__PURE__ */ J("div", {
|
|
1314
1361
|
className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
|
|
1315
|
-
children: [/* @__PURE__ */
|
|
1362
|
+
children: [/* @__PURE__ */ q(B, {
|
|
1316
1363
|
size: 14,
|
|
1317
1364
|
className: "animate-spin text-white"
|
|
1318
|
-
}), /* @__PURE__ */
|
|
1365
|
+
}), /* @__PURE__ */ J("span", {
|
|
1319
1366
|
className: "text-white text-xs",
|
|
1320
1367
|
children: [l, "%"]
|
|
1321
1368
|
})]
|
|
1322
1369
|
})]
|
|
1323
|
-
}), /* @__PURE__ */
|
|
1370
|
+
}), /* @__PURE__ */ J("div", {
|
|
1324
1371
|
className: "flex-1 space-y-1.5",
|
|
1325
1372
|
children: [
|
|
1326
|
-
/* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ q("input", {
|
|
1327
1374
|
type: "url",
|
|
1328
1375
|
value: n,
|
|
1329
1376
|
onChange: (e) => r(e.target.value),
|
|
1330
1377
|
placeholder: "https://...",
|
|
1331
1378
|
className: "w-full rounded-md border border-border bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
|
|
1332
1379
|
}),
|
|
1333
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ q("input", {
|
|
1334
1381
|
ref: d,
|
|
1335
1382
|
type: "file",
|
|
1336
1383
|
accept: a,
|
|
@@ -1340,28 +1387,28 @@ var we = [
|
|
|
1340
1387
|
t && f(t), e.target.value = "";
|
|
1341
1388
|
}
|
|
1342
1389
|
}),
|
|
1343
|
-
/* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ J("button", {
|
|
1344
1391
|
type: "button",
|
|
1345
1392
|
disabled: c,
|
|
1346
1393
|
onClick: () => d.current?.click(),
|
|
1347
1394
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
1348
|
-
children: [/* @__PURE__ */
|
|
1395
|
+
children: [/* @__PURE__ */ q(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
1349
1396
|
}),
|
|
1350
|
-
u && /* @__PURE__ */
|
|
1397
|
+
u && /* @__PURE__ */ q("p", {
|
|
1351
1398
|
className: "text-xs text-status-error-text",
|
|
1352
1399
|
children: u
|
|
1353
1400
|
})
|
|
1354
1401
|
]
|
|
1355
1402
|
})]
|
|
1356
1403
|
}),
|
|
1357
|
-
i && /* @__PURE__ */
|
|
1404
|
+
i && /* @__PURE__ */ q("p", {
|
|
1358
1405
|
className: "text-xs text-text-secondary",
|
|
1359
1406
|
children: i
|
|
1360
1407
|
})
|
|
1361
1408
|
]
|
|
1362
1409
|
});
|
|
1363
|
-
},
|
|
1364
|
-
let s =
|
|
1410
|
+
}, He = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
1411
|
+
let s = M(null), c = A(async (t) => {
|
|
1365
1412
|
try {
|
|
1366
1413
|
let i = await r(t);
|
|
1367
1414
|
n([...e, i.downloadUrl]);
|
|
@@ -1373,45 +1420,45 @@ var we = [
|
|
|
1373
1420
|
]), l = (t) => {
|
|
1374
1421
|
n(e.filter((e, n) => n !== t));
|
|
1375
1422
|
};
|
|
1376
|
-
return /* @__PURE__ */
|
|
1423
|
+
return /* @__PURE__ */ J("div", {
|
|
1377
1424
|
className: "space-y-2",
|
|
1378
1425
|
children: [
|
|
1379
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ q("label", {
|
|
1380
1427
|
className: "text-sm font-medium",
|
|
1381
1428
|
children: "Screenshots"
|
|
1382
1429
|
}),
|
|
1383
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ J("div", {
|
|
1384
1431
|
className: "flex flex-wrap gap-3",
|
|
1385
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
1432
|
+
children: [e.map((e, t) => /* @__PURE__ */ J("div", {
|
|
1386
1433
|
className: "relative group w-36 aspect-video rounded-lg border border-border overflow-hidden bg-bg-sunken",
|
|
1387
|
-
children: [/* @__PURE__ */
|
|
1434
|
+
children: [/* @__PURE__ */ q("img", {
|
|
1388
1435
|
src: e,
|
|
1389
1436
|
alt: `Screenshot ${t + 1}`,
|
|
1390
1437
|
className: "w-full h-full object-cover"
|
|
1391
|
-
}), /* @__PURE__ */
|
|
1438
|
+
}), /* @__PURE__ */ q("button", {
|
|
1392
1439
|
type: "button",
|
|
1393
1440
|
onClick: () => l(t),
|
|
1394
1441
|
className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1395
|
-
children: /* @__PURE__ */
|
|
1442
|
+
children: /* @__PURE__ */ q(be, { size: 12 })
|
|
1396
1443
|
})]
|
|
1397
|
-
}, t)), /* @__PURE__ */
|
|
1444
|
+
}, t)), /* @__PURE__ */ q("button", {
|
|
1398
1445
|
type: "button",
|
|
1399
1446
|
disabled: i,
|
|
1400
1447
|
onClick: () => s.current?.click(),
|
|
1401
1448
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
1402
|
-
children: i ? /* @__PURE__ */
|
|
1449
|
+
children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
1403
1450
|
size: 18,
|
|
1404
1451
|
className: "animate-spin text-primary"
|
|
1405
|
-
}), /* @__PURE__ */
|
|
1452
|
+
}), /* @__PURE__ */ J("span", {
|
|
1406
1453
|
className: "text-xs",
|
|
1407
1454
|
children: [a, "%"]
|
|
1408
|
-
})] }) : /* @__PURE__ */
|
|
1455
|
+
})] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, { size: 18 }), /* @__PURE__ */ q("span", {
|
|
1409
1456
|
className: "text-xs",
|
|
1410
1457
|
children: "Add screenshot"
|
|
1411
1458
|
})] })
|
|
1412
1459
|
})]
|
|
1413
1460
|
}),
|
|
1414
|
-
/* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ q("input", {
|
|
1415
1462
|
ref: s,
|
|
1416
1463
|
type: "file",
|
|
1417
1464
|
accept: "image/png,image/jpeg,image/webp,image/gif",
|
|
@@ -1421,19 +1468,19 @@ var we = [
|
|
|
1421
1468
|
t && c(t), e.target.value = "";
|
|
1422
1469
|
}
|
|
1423
1470
|
}),
|
|
1424
|
-
o && /* @__PURE__ */
|
|
1471
|
+
o && /* @__PURE__ */ q("p", {
|
|
1425
1472
|
className: "text-xs text-status-error-text",
|
|
1426
1473
|
children: o
|
|
1427
1474
|
})
|
|
1428
1475
|
]
|
|
1429
1476
|
});
|
|
1430
|
-
},
|
|
1477
|
+
}, Ue = new Set(["workflow", "template"]), We = [{
|
|
1431
1478
|
value: "FREE",
|
|
1432
1479
|
label: "Free"
|
|
1433
1480
|
}, {
|
|
1434
1481
|
value: "PAID",
|
|
1435
1482
|
label: "Paid"
|
|
1436
|
-
}],
|
|
1483
|
+
}], Ge = [
|
|
1437
1484
|
{
|
|
1438
1485
|
value: "agent",
|
|
1439
1486
|
label: "Agent"
|
|
@@ -1503,7 +1550,7 @@ var we = [
|
|
|
1503
1550
|
label: "Component"
|
|
1504
1551
|
}
|
|
1505
1552
|
];
|
|
1506
|
-
function
|
|
1553
|
+
function Ke(e) {
|
|
1507
1554
|
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") : "";
|
|
1508
1555
|
return {
|
|
1509
1556
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -1532,33 +1579,41 @@ function Ue(e) {
|
|
|
1532
1579
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
1533
1580
|
};
|
|
1534
1581
|
}
|
|
1535
|
-
var
|
|
1536
|
-
query
|
|
1537
|
-
myPublisher { id
|
|
1582
|
+
var qe = Ce`
|
|
1583
|
+
query MyPublisherForListing {
|
|
1584
|
+
myPublisher { id }
|
|
1538
1585
|
}
|
|
1539
|
-
`,
|
|
1586
|
+
`, Je = Ce`
|
|
1587
|
+
query PublisherProductsForListing($publisherId: String!) {
|
|
1588
|
+
products(filter: { publisherId: $publisherId }) { id productId }
|
|
1589
|
+
}
|
|
1590
|
+
`, Ye = Ce`
|
|
1540
1591
|
mutation UpdateStoreProduct($input: UpdateProductInput!) {
|
|
1541
1592
|
updateProduct(input: $input) { id name description }
|
|
1542
1593
|
}
|
|
1543
|
-
`,
|
|
1544
|
-
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } =
|
|
1594
|
+
`, Xe = ({ app: n }) => {
|
|
1595
|
+
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = P(), u = (e, t) => {
|
|
1545
1596
|
let n = l(e);
|
|
1546
1597
|
return n === e ? t : n;
|
|
1547
|
-
}, [d, f] =
|
|
1548
|
-
|
|
1549
|
-
let { data:
|
|
1550
|
-
|
|
1551
|
-
|
|
1598
|
+
}, [d, f] = N(() => Ke(n)), [p, m] = N(!1), [h, _] = N(!1), y = M(n);
|
|
1599
|
+
y.current = n;
|
|
1600
|
+
let { data: ee } = Y(qe, { fetchPolicy: "cache-first" }), x = ee?.myPublisher?.id ?? null, { data: S } = Y(Je, {
|
|
1601
|
+
variables: { publisherId: x ?? "" },
|
|
1602
|
+
fetchPolicy: "cache-first",
|
|
1603
|
+
skip: !x
|
|
1604
|
+
}), te = S?.products?.find((e) => e.productId === n.id)?.id ?? null, [C] = we(Ye), [ne] = v(), [T, { loading: E }] = g();
|
|
1605
|
+
ce(() => {
|
|
1606
|
+
f(Ke(y.current));
|
|
1552
1607
|
}, [n.id]);
|
|
1553
|
-
let
|
|
1608
|
+
let O = (e, t) => {
|
|
1554
1609
|
f((n) => ({
|
|
1555
1610
|
...n,
|
|
1556
1611
|
[e]: t
|
|
1557
1612
|
}));
|
|
1558
|
-
},
|
|
1559
|
-
|
|
1613
|
+
}, ae = async () => {
|
|
1614
|
+
m(!0);
|
|
1560
1615
|
try {
|
|
1561
|
-
let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r =
|
|
1616
|
+
let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Ue.has(d.manifestItemType), i = n.manifest ?? {}, a = {
|
|
1562
1617
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1563
1618
|
itemType: d.manifestItemType || void 0,
|
|
1564
1619
|
identity: {
|
|
@@ -1576,7 +1631,7 @@ var We = X`
|
|
|
1576
1631
|
let e = parseFloat(d.price);
|
|
1577
1632
|
isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
|
|
1578
1633
|
}
|
|
1579
|
-
await
|
|
1634
|
+
await ne({ variables: {
|
|
1580
1635
|
id: n.id,
|
|
1581
1636
|
input: {
|
|
1582
1637
|
iconUrl: d.iconUrl || null,
|
|
@@ -1595,8 +1650,8 @@ var We = X`
|
|
|
1595
1650
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1596
1651
|
manifest: a
|
|
1597
1652
|
}
|
|
1598
|
-
} }),
|
|
1599
|
-
id:
|
|
1653
|
+
} }), te && await C({ variables: { input: {
|
|
1654
|
+
id: te,
|
|
1600
1655
|
name: n.name,
|
|
1601
1656
|
description: d.shortDescription || void 0,
|
|
1602
1657
|
longDescription: d.description || void 0,
|
|
@@ -1604,41 +1659,41 @@ var We = X`
|
|
|
1604
1659
|
screenshots: e.length > 0 ? e : void 0,
|
|
1605
1660
|
documentationUrl: d.documentationUrl || void 0,
|
|
1606
1661
|
category: n.category || void 0
|
|
1607
|
-
} } }),
|
|
1662
|
+
} } }), w("success");
|
|
1608
1663
|
} catch {
|
|
1609
|
-
|
|
1664
|
+
w("error");
|
|
1610
1665
|
} finally {
|
|
1611
|
-
|
|
1666
|
+
m(!1);
|
|
1612
1667
|
}
|
|
1613
|
-
},
|
|
1668
|
+
}, oe = async () => {
|
|
1614
1669
|
try {
|
|
1615
|
-
await
|
|
1670
|
+
await T({ variables: { id: n.id } }), w("success");
|
|
1616
1671
|
} catch {
|
|
1617
|
-
|
|
1672
|
+
w("error");
|
|
1618
1673
|
}
|
|
1619
|
-
},
|
|
1674
|
+
}, se = M(null), j = M(null), { upload: F, uploading: I, progress: fe, error: R } = k(r, i, a, o), { upload: pe, uploading: me, progress: he, error: V } = k(r, i, a, o, "/DevPortal/Assets"), { upload: ge, uploading: _e, progress: H, error: W } = k(r, i, a, o, "/DevPortal/Assets"), { upload: G, uploading: be, progress: xe, error: Se } = k(r, i, a, o, "/DevPortal/Assets"), Ce = A(async (e) => {
|
|
1620
1675
|
let t = e.target.files?.[0];
|
|
1621
1676
|
if (t) {
|
|
1622
1677
|
e.target.value = "";
|
|
1623
1678
|
try {
|
|
1624
|
-
let e = await
|
|
1679
|
+
let e = await F(t);
|
|
1625
1680
|
f((t) => ({
|
|
1626
1681
|
...t,
|
|
1627
1682
|
manifestRegistryUrl: e.downloadUrl
|
|
1628
1683
|
}));
|
|
1629
1684
|
} catch {}
|
|
1630
1685
|
}
|
|
1631
|
-
}, [
|
|
1632
|
-
e.preventDefault(),
|
|
1686
|
+
}, [F]), Te = A(async (e) => {
|
|
1687
|
+
e.preventDefault(), _(!1);
|
|
1633
1688
|
let t = e.dataTransfer.files?.[0];
|
|
1634
1689
|
if (t) try {
|
|
1635
|
-
let e = await
|
|
1690
|
+
let e = await F(t);
|
|
1636
1691
|
f((t) => ({
|
|
1637
1692
|
...t,
|
|
1638
1693
|
manifestRegistryUrl: e.downloadUrl
|
|
1639
1694
|
}));
|
|
1640
1695
|
} catch {}
|
|
1641
|
-
}, [
|
|
1696
|
+
}, [F]), Ee = A((e) => {
|
|
1642
1697
|
let t = e.target.files?.[0];
|
|
1643
1698
|
if (!t) return;
|
|
1644
1699
|
let n = new FileReader();
|
|
@@ -1657,8 +1712,8 @@ var We = X`
|
|
|
1657
1712
|
}));
|
|
1658
1713
|
} catch {}
|
|
1659
1714
|
}, n.readAsText(t), e.target.value = "";
|
|
1660
|
-
}, []),
|
|
1661
|
-
let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t =
|
|
1715
|
+
}, []), De = A(() => {
|
|
1716
|
+
let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Ue.has(d.manifestItemType), r = {
|
|
1662
1717
|
manifestVersion: "1.0",
|
|
1663
1718
|
itemType: d.manifestItemType || void 0,
|
|
1664
1719
|
identity: {
|
|
@@ -1673,9 +1728,9 @@ var We = X`
|
|
|
1673
1728
|
compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
|
|
1674
1729
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1675
1730
|
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1676
|
-
}, [n.slug, d]),
|
|
1731
|
+
}, [n.slug, d]), Oe = Ue.has(d.manifestItemType), ke = d.manifestInstallType === "builtin", Ae = d.pricingType !== "FREE", X = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1677
1732
|
n.status;
|
|
1678
|
-
let
|
|
1733
|
+
let Z = n.status === "SUBMITTED", je = n.status === "PUBLISHED", Me = n.appType === "NODE" || n.appType === "WORKFLOW", Ne = [
|
|
1679
1734
|
{
|
|
1680
1735
|
label: "Short description",
|
|
1681
1736
|
done: !!d.shortDescription.trim()
|
|
@@ -1696,38 +1751,38 @@ var We = X`
|
|
|
1696
1751
|
label: "Terms of Service URL",
|
|
1697
1752
|
done: !!d.termsOfServiceUrl.trim()
|
|
1698
1753
|
}
|
|
1699
|
-
],
|
|
1700
|
-
return /* @__PURE__ */
|
|
1754
|
+
], Pe = Ne.filter((e) => e.done).length, Fe = Ne.length;
|
|
1755
|
+
return /* @__PURE__ */ J("div", {
|
|
1701
1756
|
className: "space-y-8 max-w-3xl",
|
|
1702
1757
|
children: [
|
|
1703
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ J("div", {
|
|
1704
1759
|
className: "rounded-lg border border-primary/20 bg-primary/5 px-4 py-3 space-y-2",
|
|
1705
|
-
children: [/* @__PURE__ */
|
|
1760
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1706
1761
|
className: "text-sm font-semibold text-primary",
|
|
1707
1762
|
children: u("devportal.listingTabPurpose", "What is this tab for?")
|
|
1708
|
-
}), /* @__PURE__ */
|
|
1763
|
+
}), /* @__PURE__ */ J("ul", {
|
|
1709
1764
|
className: "text-sm text-muted-foreground space-y-1 list-none pl-0",
|
|
1710
1765
|
children: [
|
|
1711
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ J("li", {
|
|
1712
1767
|
className: "flex items-start gap-2",
|
|
1713
|
-
children: [/* @__PURE__ */
|
|
1768
|
+
children: [/* @__PURE__ */ q(ye, {
|
|
1714
1769
|
size: 14,
|
|
1715
1770
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1716
|
-
}), /* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */
|
|
1771
|
+
}), /* @__PURE__ */ J("span", { children: [
|
|
1772
|
+
/* @__PURE__ */ q("strong", { children: u("devportal.thisTab", "This tab") }),
|
|
1718
1773
|
" ",
|
|
1719
1774
|
u("devportal.listingTabDesc", "controls your store card — the name, description, icon and screenshots users see in the marketplace. Save changes here any time without creating a new release.")
|
|
1720
1775
|
] })]
|
|
1721
1776
|
}),
|
|
1722
|
-
|
|
1777
|
+
Me && /* @__PURE__ */ J("li", {
|
|
1723
1778
|
className: "flex items-start gap-2",
|
|
1724
|
-
children: [/* @__PURE__ */
|
|
1779
|
+
children: [/* @__PURE__ */ q(ue, {
|
|
1725
1780
|
size: 14,
|
|
1726
1781
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1727
|
-
}), /* @__PURE__ */
|
|
1782
|
+
}), /* @__PURE__ */ J("span", { children: [
|
|
1728
1783
|
u("devportal.versionsTabDesc", "To release a new version (ZIP package + manifest), go to the"),
|
|
1729
1784
|
" ",
|
|
1730
|
-
/* @__PURE__ */
|
|
1785
|
+
/* @__PURE__ */ q("button", {
|
|
1731
1786
|
type: "button",
|
|
1732
1787
|
className: "underline text-primary hover:no-underline",
|
|
1733
1788
|
onClick: () => s?.(`${c}/apps/${n.id}/versions`),
|
|
@@ -1736,66 +1791,66 @@ var We = X`
|
|
|
1736
1791
|
"."
|
|
1737
1792
|
] })]
|
|
1738
1793
|
}),
|
|
1739
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ J("li", {
|
|
1740
1795
|
className: "flex items-start gap-2",
|
|
1741
|
-
children: [/* @__PURE__ */
|
|
1796
|
+
children: [/* @__PURE__ */ q(ve, {
|
|
1742
1797
|
size: 14,
|
|
1743
1798
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1744
|
-
}), /* @__PURE__ */
|
|
1799
|
+
}), /* @__PURE__ */ q("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
|
|
1745
1800
|
})
|
|
1746
1801
|
]
|
|
1747
1802
|
})]
|
|
1748
1803
|
}),
|
|
1749
|
-
!
|
|
1804
|
+
!je && /* @__PURE__ */ J("div", {
|
|
1750
1805
|
className: "rounded-lg border bg-card p-4 space-y-3",
|
|
1751
|
-
children: [/* @__PURE__ */
|
|
1806
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1752
1807
|
className: "flex items-center justify-between",
|
|
1753
|
-
children: [/* @__PURE__ */
|
|
1808
|
+
children: [/* @__PURE__ */ J("p", {
|
|
1754
1809
|
className: "text-sm font-medium",
|
|
1755
1810
|
children: [
|
|
1756
1811
|
u("devportal.listingCompleteness", "Listing completeness"),
|
|
1757
1812
|
" ",
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
className: t("ml-1 text-xs font-semibold",
|
|
1813
|
+
/* @__PURE__ */ J("span", {
|
|
1814
|
+
className: t("ml-1 text-xs font-semibold", Pe === Fe ? "text-status-success-text" : "text-status-warning-text"),
|
|
1760
1815
|
children: [
|
|
1761
|
-
|
|
1816
|
+
Pe,
|
|
1762
1817
|
"/",
|
|
1763
|
-
|
|
1818
|
+
Fe
|
|
1764
1819
|
]
|
|
1765
1820
|
})
|
|
1766
1821
|
]
|
|
1767
|
-
}),
|
|
1822
|
+
}), Pe === Fe && /* @__PURE__ */ J("span", {
|
|
1768
1823
|
className: "text-xs text-status-success-text flex items-center gap-1",
|
|
1769
|
-
children: [/* @__PURE__ */
|
|
1824
|
+
children: [/* @__PURE__ */ q(L, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
|
|
1770
1825
|
})]
|
|
1771
|
-
}), /* @__PURE__ */
|
|
1826
|
+
}), /* @__PURE__ */ q("div", {
|
|
1772
1827
|
className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
|
|
1773
|
-
children:
|
|
1828
|
+
children: Ne.map((e) => /* @__PURE__ */ J("div", {
|
|
1774
1829
|
className: "flex items-center gap-1.5 text-xs",
|
|
1775
|
-
children: [e.done ? /* @__PURE__ */
|
|
1830
|
+
children: [e.done ? /* @__PURE__ */ q(L, {
|
|
1776
1831
|
size: 12,
|
|
1777
1832
|
className: "text-status-success-text shrink-0"
|
|
1778
|
-
}) : /* @__PURE__ */
|
|
1833
|
+
}) : /* @__PURE__ */ q(le, {
|
|
1779
1834
|
size: 12,
|
|
1780
1835
|
className: "text-status-warning-text shrink-0"
|
|
1781
|
-
}), /* @__PURE__ */
|
|
1836
|
+
}), /* @__PURE__ */ q("span", {
|
|
1782
1837
|
className: e.done ? "text-foreground" : "text-muted-foreground",
|
|
1783
1838
|
children: e.label
|
|
1784
1839
|
})]
|
|
1785
1840
|
}, e.label))
|
|
1786
1841
|
})]
|
|
1787
1842
|
}),
|
|
1788
|
-
|
|
1843
|
+
je ? /* @__PURE__ */ J("div", {
|
|
1789
1844
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1790
|
-
children: [/* @__PURE__ */
|
|
1845
|
+
children: [/* @__PURE__ */ q(L, {
|
|
1791
1846
|
size: 16,
|
|
1792
1847
|
className: "text-success mt-0.5 shrink-0"
|
|
1793
|
-
}), /* @__PURE__ */
|
|
1848
|
+
}), /* @__PURE__ */ J("div", {
|
|
1794
1849
|
className: "text-sm",
|
|
1795
|
-
children: [/* @__PURE__ */
|
|
1850
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1796
1851
|
className: "font-medium text-success",
|
|
1797
1852
|
children: u("devportal.storeListing.published", "Published")
|
|
1798
|
-
}), n.publishedAt && /* @__PURE__ */
|
|
1853
|
+
}), n.publishedAt && /* @__PURE__ */ J("span", {
|
|
1799
1854
|
className: "text-muted-foreground ml-2",
|
|
1800
1855
|
children: [
|
|
1801
1856
|
u("devportal.storeListing.since", "since"),
|
|
@@ -1804,234 +1859,234 @@ var We = X`
|
|
|
1804
1859
|
]
|
|
1805
1860
|
})]
|
|
1806
1861
|
})]
|
|
1807
|
-
}) :
|
|
1862
|
+
}) : Z ? /* @__PURE__ */ J("div", {
|
|
1808
1863
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
|
|
1809
|
-
children: [/* @__PURE__ */
|
|
1864
|
+
children: [/* @__PURE__ */ q(ue, {
|
|
1810
1865
|
size: 16,
|
|
1811
1866
|
className: "text-primary mt-0.5 shrink-0"
|
|
1812
|
-
}), /* @__PURE__ */
|
|
1867
|
+
}), /* @__PURE__ */ J("div", {
|
|
1813
1868
|
className: "text-sm",
|
|
1814
1869
|
children: [
|
|
1815
|
-
/* @__PURE__ */
|
|
1870
|
+
/* @__PURE__ */ q("span", {
|
|
1816
1871
|
className: "font-medium text-primary",
|
|
1817
1872
|
children: u("devportal.storeListing.underReview", "Submitted for review")
|
|
1818
1873
|
}),
|
|
1819
|
-
n.submittedAt && /* @__PURE__ */
|
|
1874
|
+
n.submittedAt && /* @__PURE__ */ q("span", {
|
|
1820
1875
|
className: "text-muted-foreground ml-2",
|
|
1821
1876
|
children: new Date(n.submittedAt).toLocaleDateString()
|
|
1822
1877
|
}),
|
|
1823
|
-
n.reviewStatus && /* @__PURE__ */
|
|
1878
|
+
n.reviewStatus && /* @__PURE__ */ J("span", {
|
|
1824
1879
|
className: "text-muted-foreground ml-2",
|
|
1825
1880
|
children: ["· ", n.reviewStatus]
|
|
1826
1881
|
})
|
|
1827
1882
|
]
|
|
1828
1883
|
})]
|
|
1829
|
-
}) : /* @__PURE__ */
|
|
1884
|
+
}) : /* @__PURE__ */ J("div", {
|
|
1830
1885
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
1831
|
-
children: [/* @__PURE__ */
|
|
1886
|
+
children: [/* @__PURE__ */ q(le, {
|
|
1832
1887
|
size: 16,
|
|
1833
1888
|
className: "text-warning mt-0.5 shrink-0"
|
|
1834
|
-
}), /* @__PURE__ */
|
|
1889
|
+
}), /* @__PURE__ */ J("div", {
|
|
1835
1890
|
className: "text-sm",
|
|
1836
|
-
children: [/* @__PURE__ */
|
|
1891
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1837
1892
|
className: "font-medium text-warning",
|
|
1838
1893
|
children: u("devportal.storeListing.draft", "Draft")
|
|
1839
|
-
}), /* @__PURE__ */
|
|
1894
|
+
}), /* @__PURE__ */ q("span", {
|
|
1840
1895
|
className: "text-muted-foreground ml-2",
|
|
1841
1896
|
children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
1842
1897
|
})]
|
|
1843
1898
|
})]
|
|
1844
1899
|
}),
|
|
1845
|
-
|
|
1900
|
+
Me ? /* @__PURE__ */ J("div", {
|
|
1846
1901
|
className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
|
|
1847
|
-
children: [/* @__PURE__ */
|
|
1902
|
+
children: [/* @__PURE__ */ q(z, {
|
|
1848
1903
|
size: 16,
|
|
1849
1904
|
className: "shrink-0 mt-0.5 text-muted-foreground"
|
|
1850
|
-
}), /* @__PURE__ */
|
|
1905
|
+
}), /* @__PURE__ */ J("div", {
|
|
1851
1906
|
className: "text-sm space-y-1",
|
|
1852
|
-
children: [/* @__PURE__ */
|
|
1907
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1853
1908
|
className: "font-medium",
|
|
1854
1909
|
children: u("devportal.packageManagedInVersions", "ZIP package & manifest are managed in Versions")
|
|
1855
|
-
}), /* @__PURE__ */
|
|
1910
|
+
}), /* @__PURE__ */ q("p", {
|
|
1856
1911
|
className: "text-muted-foreground",
|
|
1857
1912
|
children: u("devportal.packageManagedInVersionsDesc", "For NODE and WORKFLOW types, each release is uploaded through the Versions page — including the ZIP archive and manifest.json. This keeps your code releases separate from your store card.")
|
|
1858
1913
|
})]
|
|
1859
1914
|
})]
|
|
1860
|
-
}) : /* @__PURE__ */
|
|
1915
|
+
}) : /* @__PURE__ */ q(b, {
|
|
1861
1916
|
title: u("devportal.package", "Package"),
|
|
1862
1917
|
description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
1863
|
-
children: /* @__PURE__ */
|
|
1918
|
+
children: /* @__PURE__ */ J("div", {
|
|
1864
1919
|
className: "space-y-6",
|
|
1865
1920
|
children: [
|
|
1866
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ q(re, {
|
|
1867
1922
|
label: u("devportal.storeItemType", "Item Type"),
|
|
1868
1923
|
value: d.manifestItemType,
|
|
1869
1924
|
onChange: (e) => {
|
|
1870
1925
|
let t = e.target.value;
|
|
1871
|
-
|
|
1926
|
+
O("manifestItemType", t), Ue.has(t) ? O("manifestInstallType", "json") : d.manifestInstallType === "json" && O("manifestInstallType", "zip");
|
|
1872
1927
|
},
|
|
1873
|
-
options:
|
|
1928
|
+
options: Ge,
|
|
1874
1929
|
placeholder: u("devportal.selectItemType", "Select item type…"),
|
|
1875
1930
|
hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
|
|
1876
1931
|
}),
|
|
1877
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ J("div", {
|
|
1878
1933
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1879
|
-
children: [/* @__PURE__ */
|
|
1934
|
+
children: [/* @__PURE__ */ q(D, {
|
|
1880
1935
|
label: u("devportal.manifestDisplayName", "Display Name"),
|
|
1881
1936
|
value: d.manifestDisplayName,
|
|
1882
|
-
onChange: (e) =>
|
|
1937
|
+
onChange: (e) => O("manifestDisplayName", e.target.value),
|
|
1883
1938
|
placeholder: "My Awesome Node"
|
|
1884
|
-
}), /* @__PURE__ */
|
|
1939
|
+
}), /* @__PURE__ */ q(D, {
|
|
1885
1940
|
label: u("devportal.manifestVersion", "Version"),
|
|
1886
1941
|
value: d.manifestVersion,
|
|
1887
|
-
onChange: (e) =>
|
|
1942
|
+
onChange: (e) => O("manifestVersion", e.target.value),
|
|
1888
1943
|
placeholder: "1.0.0",
|
|
1889
1944
|
hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1890
1945
|
})]
|
|
1891
1946
|
}),
|
|
1892
|
-
|
|
1947
|
+
Oe && /* @__PURE__ */ q(ie, {
|
|
1893
1948
|
label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1894
1949
|
value: d.manifestJsonContent,
|
|
1895
|
-
onChange: (e) =>
|
|
1950
|
+
onChange: (e) => O("manifestJsonContent", e.target.value),
|
|
1896
1951
|
rows: 12,
|
|
1897
1952
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1898
1953
|
hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
1899
1954
|
}),
|
|
1900
|
-
!
|
|
1955
|
+
!Oe && /* @__PURE__ */ J("div", {
|
|
1901
1956
|
className: "space-y-3",
|
|
1902
1957
|
children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ J("div", {
|
|
1904
1959
|
className: "flex items-center justify-between flex-wrap gap-2",
|
|
1905
|
-
children: [/* @__PURE__ */
|
|
1960
|
+
children: [/* @__PURE__ */ q("label", {
|
|
1906
1961
|
className: "text-sm font-medium",
|
|
1907
1962
|
children: u("devportal.packageFile", "Package File")
|
|
1908
|
-
}), /* @__PURE__ */
|
|
1963
|
+
}), /* @__PURE__ */ J("label", {
|
|
1909
1964
|
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
1910
|
-
children: [/* @__PURE__ */
|
|
1965
|
+
children: [/* @__PURE__ */ q("input", {
|
|
1911
1966
|
type: "checkbox",
|
|
1912
|
-
checked:
|
|
1913
|
-
onChange: (e) =>
|
|
1967
|
+
checked: ke,
|
|
1968
|
+
onChange: (e) => O("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1914
1969
|
className: "h-4 w-4 rounded border-border accent-primary"
|
|
1915
|
-
}), /* @__PURE__ */
|
|
1970
|
+
}), /* @__PURE__ */ q("span", {
|
|
1916
1971
|
className: "text-text-secondary",
|
|
1917
1972
|
children: u("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
|
|
1918
1973
|
})]
|
|
1919
1974
|
})]
|
|
1920
1975
|
}),
|
|
1921
|
-
!
|
|
1922
|
-
/* @__PURE__ */
|
|
1976
|
+
!ke && /* @__PURE__ */ J(K, { children: [
|
|
1977
|
+
/* @__PURE__ */ J("div", {
|
|
1923
1978
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1924
|
-
children: [/* @__PURE__ */
|
|
1979
|
+
children: [/* @__PURE__ */ q(z, {
|
|
1925
1980
|
size: 15,
|
|
1926
1981
|
className: "mt-0.5 shrink-0"
|
|
1927
|
-
}), /* @__PURE__ */
|
|
1982
|
+
}), /* @__PURE__ */ J("span", { children: [
|
|
1928
1983
|
u("devportal.zipModelHint", "Package your code and a "),
|
|
1929
|
-
/* @__PURE__ */
|
|
1984
|
+
/* @__PURE__ */ q("code", {
|
|
1930
1985
|
className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
|
|
1931
1986
|
children: "manifest.json"
|
|
1932
1987
|
}),
|
|
1933
1988
|
u("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
|
|
1934
1989
|
] })]
|
|
1935
1990
|
}),
|
|
1936
|
-
/* @__PURE__ */
|
|
1991
|
+
/* @__PURE__ */ J("div", {
|
|
1937
1992
|
onDragOver: (e) => {
|
|
1938
|
-
e.preventDefault(),
|
|
1993
|
+
e.preventDefault(), _(!0);
|
|
1939
1994
|
},
|
|
1940
|
-
onDragLeave: () =>
|
|
1941
|
-
onDrop: (e) => void
|
|
1942
|
-
onClick: () => !
|
|
1943
|
-
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",
|
|
1944
|
-
children: [/* @__PURE__ */
|
|
1945
|
-
ref:
|
|
1995
|
+
onDragLeave: () => _(!1),
|
|
1996
|
+
onDrop: (e) => void Te(e),
|
|
1997
|
+
onClick: () => !I && j.current?.click(),
|
|
1998
|
+
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", h ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", I && "pointer-events-none opacity-75"),
|
|
1999
|
+
children: [/* @__PURE__ */ q("input", {
|
|
2000
|
+
ref: j,
|
|
1946
2001
|
type: "file",
|
|
1947
2002
|
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1948
2003
|
className: "hidden",
|
|
1949
|
-
onChange: (e) => void
|
|
1950
|
-
}),
|
|
1951
|
-
/* @__PURE__ */
|
|
2004
|
+
onChange: (e) => void Ce(e)
|
|
2005
|
+
}), I ? /* @__PURE__ */ J(K, { children: [
|
|
2006
|
+
/* @__PURE__ */ q(B, {
|
|
1952
2007
|
size: 28,
|
|
1953
2008
|
className: "animate-spin text-primary"
|
|
1954
2009
|
}),
|
|
1955
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
|
|
1956
2011
|
className: "text-sm font-medium",
|
|
1957
2012
|
children: [
|
|
1958
2013
|
u("devportal.uploading", "Uploading…"),
|
|
1959
2014
|
" ",
|
|
1960
|
-
|
|
2015
|
+
fe,
|
|
1961
2016
|
"%"
|
|
1962
2017
|
]
|
|
1963
|
-
}), /* @__PURE__ */
|
|
2018
|
+
}), /* @__PURE__ */ q("p", {
|
|
1964
2019
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1965
2020
|
children: u("devportal.uploadingHint", "Stored securely in your workspace")
|
|
1966
2021
|
})] }),
|
|
1967
|
-
/* @__PURE__ */
|
|
2022
|
+
/* @__PURE__ */ q("div", {
|
|
1968
2023
|
className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
|
|
1969
|
-
children: /* @__PURE__ */
|
|
2024
|
+
children: /* @__PURE__ */ q("div", {
|
|
1970
2025
|
className: "h-full bg-primary transition-all",
|
|
1971
|
-
style: { width: `${
|
|
2026
|
+
style: { width: `${fe}%` }
|
|
1972
2027
|
})
|
|
1973
2028
|
})
|
|
1974
|
-
] }) :
|
|
2029
|
+
] }) : X ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(L, {
|
|
1975
2030
|
size: 28,
|
|
1976
2031
|
className: "text-status-success-text"
|
|
1977
|
-
}), /* @__PURE__ */
|
|
2032
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
1978
2033
|
className: "text-sm font-medium",
|
|
1979
|
-
children:
|
|
1980
|
-
}), /* @__PURE__ */
|
|
2034
|
+
children: X
|
|
2035
|
+
}), /* @__PURE__ */ q("p", {
|
|
1981
2036
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1982
2037
|
children: u("devportal.clickToReplace", "Click or drag to replace")
|
|
1983
|
-
})] })] }) : /* @__PURE__ */
|
|
2038
|
+
})] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, {
|
|
1984
2039
|
size: 28,
|
|
1985
2040
|
className: "text-text-secondary"
|
|
1986
|
-
}), /* @__PURE__ */
|
|
2041
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
1987
2042
|
className: "text-sm font-medium",
|
|
1988
2043
|
children: u("devportal.dropZipHere", "Drop your .zip here")
|
|
1989
|
-
}), /* @__PURE__ */
|
|
2044
|
+
}), /* @__PURE__ */ q("p", {
|
|
1990
2045
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1991
2046
|
children: u("devportal.orClickToBrowse", "or click to browse")
|
|
1992
2047
|
})] })] })]
|
|
1993
2048
|
}),
|
|
1994
|
-
|
|
2049
|
+
R && /* @__PURE__ */ q("p", {
|
|
1995
2050
|
className: "text-xs text-status-error-text",
|
|
1996
|
-
children:
|
|
2051
|
+
children: R
|
|
1997
2052
|
})
|
|
1998
2053
|
] }),
|
|
1999
|
-
|
|
2054
|
+
ke && /* @__PURE__ */ J("div", {
|
|
2000
2055
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
2001
|
-
children: [/* @__PURE__ */
|
|
2056
|
+
children: [/* @__PURE__ */ q(z, {
|
|
2002
2057
|
size: 15,
|
|
2003
2058
|
className: "mt-0.5 shrink-0"
|
|
2004
|
-
}), /* @__PURE__ */
|
|
2059
|
+
}), /* @__PURE__ */ q("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
2005
2060
|
})
|
|
2006
2061
|
]
|
|
2007
2062
|
}),
|
|
2008
|
-
/* @__PURE__ */
|
|
2063
|
+
/* @__PURE__ */ J("div", {
|
|
2009
2064
|
className: "flex flex-wrap items-center gap-2 border-t pt-4",
|
|
2010
2065
|
children: [
|
|
2011
|
-
/* @__PURE__ */
|
|
2012
|
-
ref:
|
|
2066
|
+
/* @__PURE__ */ q("input", {
|
|
2067
|
+
ref: se,
|
|
2013
2068
|
type: "file",
|
|
2014
2069
|
accept: ".json,application/json",
|
|
2015
2070
|
className: "hidden",
|
|
2016
|
-
onChange:
|
|
2071
|
+
onChange: Ee
|
|
2017
2072
|
}),
|
|
2018
|
-
/* @__PURE__ */
|
|
2073
|
+
/* @__PURE__ */ q("span", {
|
|
2019
2074
|
className: "text-xs text-text-secondary mr-1",
|
|
2020
2075
|
children: "manifest.json:"
|
|
2021
2076
|
}),
|
|
2022
|
-
/* @__PURE__ */
|
|
2077
|
+
/* @__PURE__ */ J("button", {
|
|
2023
2078
|
type: "button",
|
|
2024
|
-
onClick: () =>
|
|
2079
|
+
onClick: () => se.current?.click(),
|
|
2025
2080
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2026
|
-
children: [/* @__PURE__ */
|
|
2081
|
+
children: [/* @__PURE__ */ q(U, { size: 12 }), u("devportal.importManifest", "Import")]
|
|
2027
2082
|
}),
|
|
2028
|
-
/* @__PURE__ */
|
|
2083
|
+
/* @__PURE__ */ J("button", {
|
|
2029
2084
|
type: "button",
|
|
2030
|
-
onClick:
|
|
2085
|
+
onClick: De,
|
|
2031
2086
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2032
|
-
children: [/* @__PURE__ */
|
|
2087
|
+
children: [/* @__PURE__ */ q(de, { size: 12 }), u("devportal.exportManifest", "Export")]
|
|
2033
2088
|
}),
|
|
2034
|
-
/* @__PURE__ */
|
|
2089
|
+
/* @__PURE__ */ q("span", {
|
|
2035
2090
|
className: "text-xs text-text-secondary",
|
|
2036
2091
|
children: u("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
|
|
2037
2092
|
})
|
|
@@ -2040,194 +2095,194 @@ var We = X`
|
|
|
2040
2095
|
]
|
|
2041
2096
|
})
|
|
2042
2097
|
}),
|
|
2043
|
-
/* @__PURE__ */
|
|
2098
|
+
/* @__PURE__ */ q(b, {
|
|
2044
2099
|
title: u("devportal.storePresentation", "Store Presence"),
|
|
2045
2100
|
description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
2046
|
-
children: /* @__PURE__ */
|
|
2101
|
+
children: /* @__PURE__ */ J("div", {
|
|
2047
2102
|
className: "space-y-5",
|
|
2048
2103
|
children: [
|
|
2049
|
-
/* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ J("div", {
|
|
2050
2105
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2051
|
-
children: [/* @__PURE__ */
|
|
2106
|
+
children: [/* @__PURE__ */ q(Ve, {
|
|
2052
2107
|
label: u("devportal.iconUrl", "Icon"),
|
|
2053
2108
|
value: d.iconUrl,
|
|
2054
|
-
onChange: (e) =>
|
|
2109
|
+
onChange: (e) => O("iconUrl", e),
|
|
2055
2110
|
hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
2056
2111
|
aspectClass: "aspect-square",
|
|
2057
|
-
upload:
|
|
2058
|
-
uploading:
|
|
2059
|
-
progress:
|
|
2060
|
-
error:
|
|
2061
|
-
}), /* @__PURE__ */
|
|
2112
|
+
upload: pe,
|
|
2113
|
+
uploading: me,
|
|
2114
|
+
progress: he,
|
|
2115
|
+
error: V
|
|
2116
|
+
}), /* @__PURE__ */ q(Ve, {
|
|
2062
2117
|
label: u("devportal.bannerUrl", "Banner"),
|
|
2063
2118
|
value: d.bannerUrl,
|
|
2064
|
-
onChange: (e) =>
|
|
2119
|
+
onChange: (e) => O("bannerUrl", e),
|
|
2065
2120
|
hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
2066
2121
|
aspectClass: "aspect-video",
|
|
2067
|
-
upload:
|
|
2068
|
-
uploading:
|
|
2069
|
-
progress:
|
|
2070
|
-
error:
|
|
2122
|
+
upload: ge,
|
|
2123
|
+
uploading: _e,
|
|
2124
|
+
progress: H,
|
|
2125
|
+
error: W
|
|
2071
2126
|
})]
|
|
2072
2127
|
}),
|
|
2073
|
-
/* @__PURE__ */
|
|
2128
|
+
/* @__PURE__ */ q(D, {
|
|
2074
2129
|
label: u("devportal.videoUrl", "Demo Video URL"),
|
|
2075
2130
|
value: d.videoUrl,
|
|
2076
|
-
onChange: (e) =>
|
|
2131
|
+
onChange: (e) => O("videoUrl", e.target.value),
|
|
2077
2132
|
placeholder: "https://...",
|
|
2078
2133
|
hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2079
2134
|
}),
|
|
2080
|
-
/* @__PURE__ */
|
|
2135
|
+
/* @__PURE__ */ q(ie, {
|
|
2081
2136
|
label: u("devportal.shortDescription", "Short Description"),
|
|
2082
2137
|
value: d.shortDescription,
|
|
2083
|
-
onChange: (e) =>
|
|
2138
|
+
onChange: (e) => O("shortDescription", e.target.value),
|
|
2084
2139
|
maxLength: 200,
|
|
2085
2140
|
rows: 2,
|
|
2086
2141
|
hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2087
2142
|
}),
|
|
2088
|
-
/* @__PURE__ */
|
|
2143
|
+
/* @__PURE__ */ q(ie, {
|
|
2089
2144
|
label: u("devportal.longDescription", "Full Description"),
|
|
2090
2145
|
value: d.description,
|
|
2091
|
-
onChange: (e) =>
|
|
2146
|
+
onChange: (e) => O("description", e.target.value),
|
|
2092
2147
|
rows: 5,
|
|
2093
2148
|
hint: u("devportal.fullDescHint", "Markdown supported")
|
|
2094
2149
|
}),
|
|
2095
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ q(He, {
|
|
2096
2151
|
urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2097
|
-
onChange: (e) =>
|
|
2098
|
-
upload:
|
|
2099
|
-
uploading:
|
|
2100
|
-
progress:
|
|
2101
|
-
error:
|
|
2152
|
+
onChange: (e) => O("screenshotsText", e.join("\n")),
|
|
2153
|
+
upload: G,
|
|
2154
|
+
uploading: be,
|
|
2155
|
+
progress: xe,
|
|
2156
|
+
error: Se
|
|
2102
2157
|
})
|
|
2103
2158
|
]
|
|
2104
2159
|
})
|
|
2105
2160
|
}),
|
|
2106
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ q(b, {
|
|
2107
2162
|
title: u("devportal.linksPolicies", "Links & Policies"),
|
|
2108
2163
|
description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
2109
|
-
children: /* @__PURE__ */
|
|
2164
|
+
children: /* @__PURE__ */ J("div", {
|
|
2110
2165
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2111
2166
|
children: [
|
|
2112
|
-
/* @__PURE__ */
|
|
2167
|
+
/* @__PURE__ */ q(D, {
|
|
2113
2168
|
label: u("devportal.websiteUrl", "Website"),
|
|
2114
2169
|
value: d.websiteUrl,
|
|
2115
|
-
onChange: (e) =>
|
|
2170
|
+
onChange: (e) => O("websiteUrl", e.target.value),
|
|
2116
2171
|
placeholder: "https://..."
|
|
2117
2172
|
}),
|
|
2118
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ q(D, {
|
|
2119
2174
|
label: u("devportal.documentationUrl", "Documentation"),
|
|
2120
2175
|
value: d.documentationUrl,
|
|
2121
|
-
onChange: (e) =>
|
|
2176
|
+
onChange: (e) => O("documentationUrl", e.target.value),
|
|
2122
2177
|
placeholder: "https://..."
|
|
2123
2178
|
}),
|
|
2124
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ q(D, {
|
|
2125
2180
|
label: u("devportal.githubUrl", "GitHub"),
|
|
2126
2181
|
value: d.githubUrl,
|
|
2127
|
-
onChange: (e) =>
|
|
2182
|
+
onChange: (e) => O("githubUrl", e.target.value),
|
|
2128
2183
|
placeholder: "https://github.com/..."
|
|
2129
2184
|
}),
|
|
2130
|
-
/* @__PURE__ */
|
|
2185
|
+
/* @__PURE__ */ q(D, {
|
|
2131
2186
|
label: u("devportal.supportUrl", "Support"),
|
|
2132
2187
|
value: d.supportUrl,
|
|
2133
|
-
onChange: (e) =>
|
|
2188
|
+
onChange: (e) => O("supportUrl", e.target.value),
|
|
2134
2189
|
placeholder: "https://..."
|
|
2135
2190
|
}),
|
|
2136
|
-
/* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ q(D, {
|
|
2137
2192
|
label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2138
2193
|
value: d.privacyPolicyUrl,
|
|
2139
|
-
onChange: (e) =>
|
|
2194
|
+
onChange: (e) => O("privacyPolicyUrl", e.target.value),
|
|
2140
2195
|
placeholder: "https://...",
|
|
2141
2196
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2142
2197
|
}),
|
|
2143
|
-
/* @__PURE__ */
|
|
2198
|
+
/* @__PURE__ */ q(D, {
|
|
2144
2199
|
label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2145
2200
|
value: d.termsOfServiceUrl,
|
|
2146
|
-
onChange: (e) =>
|
|
2201
|
+
onChange: (e) => O("termsOfServiceUrl", e.target.value),
|
|
2147
2202
|
placeholder: "https://...",
|
|
2148
2203
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2149
2204
|
})
|
|
2150
2205
|
]
|
|
2151
2206
|
})
|
|
2152
2207
|
}),
|
|
2153
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ q(b, {
|
|
2154
2209
|
title: u("devportal.pricing", "Pricing"),
|
|
2155
2210
|
description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
|
|
2156
|
-
children: /* @__PURE__ */
|
|
2211
|
+
children: /* @__PURE__ */ J("div", {
|
|
2157
2212
|
className: "space-y-4",
|
|
2158
|
-
children: [/* @__PURE__ */
|
|
2213
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
2159
2214
|
className: "mb-2 block text-sm font-medium",
|
|
2160
2215
|
children: u("devportal.pricingType", "Pricing Type")
|
|
2161
|
-
}), /* @__PURE__ */
|
|
2216
|
+
}), /* @__PURE__ */ q("div", {
|
|
2162
2217
|
className: "flex flex-wrap gap-2",
|
|
2163
|
-
children:
|
|
2218
|
+
children: We.map((e) => /* @__PURE__ */ q("button", {
|
|
2164
2219
|
type: "button",
|
|
2165
|
-
onClick: () =>
|
|
2220
|
+
onClick: () => O("pricingType", e.value),
|
|
2166
2221
|
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
|
|
2167
2222
|
children: e.label
|
|
2168
2223
|
}, e.value))
|
|
2169
|
-
})] }),
|
|
2224
|
+
})] }), Ae && /* @__PURE__ */ J("div", {
|
|
2170
2225
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2171
|
-
children: [/* @__PURE__ */
|
|
2226
|
+
children: [/* @__PURE__ */ q(D, {
|
|
2172
2227
|
label: u("devportal.price", "Price"),
|
|
2173
2228
|
type: "number",
|
|
2174
2229
|
value: d.price,
|
|
2175
|
-
onChange: (e) =>
|
|
2230
|
+
onChange: (e) => O("price", e.target.value),
|
|
2176
2231
|
placeholder: "0.00"
|
|
2177
|
-
}), /* @__PURE__ */
|
|
2232
|
+
}), /* @__PURE__ */ q(D, {
|
|
2178
2233
|
label: u("devportal.currency", "Currency"),
|
|
2179
2234
|
value: d.currency,
|
|
2180
|
-
onChange: (e) =>
|
|
2235
|
+
onChange: (e) => O("currency", e.target.value),
|
|
2181
2236
|
placeholder: "USD"
|
|
2182
2237
|
})]
|
|
2183
2238
|
})]
|
|
2184
2239
|
})
|
|
2185
2240
|
}),
|
|
2186
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ J("div", {
|
|
2187
2242
|
className: "border-t pt-6 flex items-center gap-3 flex-wrap",
|
|
2188
2243
|
children: [
|
|
2189
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ q("button", {
|
|
2190
2245
|
type: "button",
|
|
2191
|
-
onClick:
|
|
2192
|
-
disabled:
|
|
2246
|
+
onClick: ae,
|
|
2247
|
+
disabled: p,
|
|
2193
2248
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2194
|
-
children:
|
|
2249
|
+
children: p ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
2195
2250
|
size: 16,
|
|
2196
2251
|
className: "animate-spin"
|
|
2197
|
-
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */
|
|
2252
|
+
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ye, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
|
|
2198
2253
|
}),
|
|
2199
|
-
!
|
|
2254
|
+
!je && !Z && /* @__PURE__ */ q("button", {
|
|
2200
2255
|
type: "button",
|
|
2201
|
-
onClick: () => void
|
|
2202
|
-
disabled:
|
|
2256
|
+
onClick: () => void oe(),
|
|
2257
|
+
disabled: E || p,
|
|
2203
2258
|
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
|
|
2204
|
-
children:
|
|
2259
|
+
children: E ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
2205
2260
|
size: 16,
|
|
2206
2261
|
className: "animate-spin"
|
|
2207
|
-
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */
|
|
2262
|
+
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ve, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
|
|
2208
2263
|
}),
|
|
2209
|
-
!
|
|
2264
|
+
!je && Z && /* @__PURE__ */ J("p", {
|
|
2210
2265
|
className: "text-xs text-muted-foreground flex items-center gap-1.5",
|
|
2211
|
-
children: [/* @__PURE__ */
|
|
2266
|
+
children: [/* @__PURE__ */ q(ue, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
|
|
2212
2267
|
})
|
|
2213
2268
|
]
|
|
2214
2269
|
})
|
|
2215
2270
|
]
|
|
2216
2271
|
});
|
|
2217
2272
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2218
|
-
let { t: i } =
|
|
2219
|
-
return /* @__PURE__ */
|
|
2273
|
+
let { t: i } = P();
|
|
2274
|
+
return /* @__PURE__ */ J("div", {
|
|
2220
2275
|
className: "rounded-lg border bg-card p-4",
|
|
2221
2276
|
children: [
|
|
2222
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ q("p", {
|
|
2223
2278
|
className: "text-sm text-muted-foreground",
|
|
2224
2279
|
children: e
|
|
2225
2280
|
}),
|
|
2226
|
-
/* @__PURE__ */
|
|
2281
|
+
/* @__PURE__ */ q("p", {
|
|
2227
2282
|
className: "text-2xl font-bold",
|
|
2228
2283
|
children: n
|
|
2229
2284
|
}),
|
|
2230
|
-
r !== void 0 && /* @__PURE__ */
|
|
2285
|
+
r !== void 0 && /* @__PURE__ */ J("p", {
|
|
2231
2286
|
className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
|
|
2232
2287
|
children: [
|
|
2233
2288
|
r > 0 ? "+" : "",
|
|
@@ -2241,13 +2296,13 @@ var We = X`
|
|
|
2241
2296
|
})
|
|
2242
2297
|
]
|
|
2243
2298
|
});
|
|
2244
|
-
}, $ = ({ label: e, url: t }) => /* @__PURE__ */
|
|
2299
|
+
}, $ = ({ label: e, url: t }) => /* @__PURE__ */ J("a", {
|
|
2245
2300
|
href: t,
|
|
2246
2301
|
target: "_blank",
|
|
2247
2302
|
rel: "noopener noreferrer",
|
|
2248
2303
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2249
|
-
children: [/* @__PURE__ */
|
|
2250
|
-
}),
|
|
2304
|
+
children: [/* @__PURE__ */ q(R, { size: 14 }), e]
|
|
2305
|
+
}), Ze = [
|
|
2251
2306
|
{
|
|
2252
2307
|
id: "auth",
|
|
2253
2308
|
label: "Authentication",
|
|
@@ -2319,14 +2374,14 @@ var We = X`
|
|
|
2319
2374
|
description: "Access control configuration"
|
|
2320
2375
|
}
|
|
2321
2376
|
];
|
|
2322
|
-
function
|
|
2323
|
-
let t = Object.fromEntries(
|
|
2377
|
+
function Qe(e) {
|
|
2378
|
+
let t = Object.fromEntries(Ze.map((e) => [e.id, "none"]));
|
|
2324
2379
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2325
2380
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2326
2381
|
return t;
|
|
2327
2382
|
}
|
|
2328
|
-
var
|
|
2329
|
-
let t = e.manifest ?? {}, [n, r] =
|
|
2383
|
+
var $e = ({ app: e }) => {
|
|
2384
|
+
let t = e.manifest ?? {}, [n, r] = N(() => Qe(t)), [i, a] = N(!1), [o, s] = N(!1), [c] = v(), l = (e, t) => {
|
|
2330
2385
|
s(!1), r((n) => ({
|
|
2331
2386
|
...n,
|
|
2332
2387
|
[e]: t
|
|
@@ -2357,41 +2412,41 @@ var Ye = ({ app: e }) => {
|
|
|
2357
2412
|
"read",
|
|
2358
2413
|
"write"
|
|
2359
2414
|
];
|
|
2360
|
-
return /* @__PURE__ */
|
|
2415
|
+
return /* @__PURE__ */ q(b, {
|
|
2361
2416
|
title: "Permissions",
|
|
2362
2417
|
description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
|
|
2363
|
-
children: /* @__PURE__ */
|
|
2418
|
+
children: /* @__PURE__ */ J("div", {
|
|
2364
2419
|
className: "space-y-4",
|
|
2365
2420
|
children: [
|
|
2366
|
-
/* @__PURE__ */
|
|
2421
|
+
/* @__PURE__ */ q("div", {
|
|
2367
2422
|
className: "overflow-x-auto rounded-lg border border-border",
|
|
2368
|
-
children: /* @__PURE__ */
|
|
2423
|
+
children: /* @__PURE__ */ J("table", {
|
|
2369
2424
|
className: "w-full text-sm",
|
|
2370
|
-
children: [/* @__PURE__ */
|
|
2425
|
+
children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", {
|
|
2371
2426
|
className: "border-b border-border bg-muted/50",
|
|
2372
|
-
children: [/* @__PURE__ */
|
|
2427
|
+
children: [/* @__PURE__ */ q("th", {
|
|
2373
2428
|
className: "px-4 py-3 text-left font-medium text-muted-foreground w-1/2",
|
|
2374
2429
|
children: "Resource"
|
|
2375
|
-
}), f.map((e) => /* @__PURE__ */
|
|
2430
|
+
}), f.map((e) => /* @__PURE__ */ q("th", {
|
|
2376
2431
|
className: "px-4 py-3 text-center font-medium text-muted-foreground",
|
|
2377
2432
|
children: d[e]
|
|
2378
2433
|
}, e))]
|
|
2379
|
-
}) }), /* @__PURE__ */
|
|
2434
|
+
}) }), /* @__PURE__ */ q("tbody", {
|
|
2380
2435
|
className: "divide-y divide-border",
|
|
2381
|
-
children:
|
|
2436
|
+
children: Ze.map((e) => /* @__PURE__ */ J("tr", {
|
|
2382
2437
|
className: "hover:bg-muted/30 transition-colors",
|
|
2383
|
-
children: [/* @__PURE__ */
|
|
2438
|
+
children: [/* @__PURE__ */ J("td", {
|
|
2384
2439
|
className: "px-4 py-3",
|
|
2385
|
-
children: [/* @__PURE__ */
|
|
2440
|
+
children: [/* @__PURE__ */ q("p", {
|
|
2386
2441
|
className: "font-medium text-foreground",
|
|
2387
2442
|
children: e.label
|
|
2388
|
-
}), /* @__PURE__ */
|
|
2443
|
+
}), /* @__PURE__ */ q("p", {
|
|
2389
2444
|
className: "text-xs text-muted-foreground",
|
|
2390
2445
|
children: e.description
|
|
2391
2446
|
})]
|
|
2392
|
-
}), f.map((t) => /* @__PURE__ */
|
|
2447
|
+
}), f.map((t) => /* @__PURE__ */ q("td", {
|
|
2393
2448
|
className: "px-4 py-3 text-center",
|
|
2394
|
-
children: /* @__PURE__ */
|
|
2449
|
+
children: /* @__PURE__ */ q("input", {
|
|
2395
2450
|
type: "radio",
|
|
2396
2451
|
name: `perm-${e.id}`,
|
|
2397
2452
|
value: t,
|
|
@@ -2404,27 +2459,27 @@ var Ye = ({ app: e }) => {
|
|
|
2404
2459
|
})]
|
|
2405
2460
|
})
|
|
2406
2461
|
}),
|
|
2407
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ J("div", {
|
|
2408
2463
|
className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
|
|
2409
|
-
children: [/* @__PURE__ */
|
|
2464
|
+
children: [/* @__PURE__ */ q(z, {
|
|
2410
2465
|
size: 14,
|
|
2411
2466
|
className: "flex-shrink-0 mt-0.5"
|
|
2412
|
-
}), /* @__PURE__ */
|
|
2467
|
+
}), /* @__PURE__ */ J("span", { children: [/* @__PURE__ */ q("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
2413
2468
|
}),
|
|
2414
|
-
/* @__PURE__ */
|
|
2469
|
+
/* @__PURE__ */ J("div", {
|
|
2415
2470
|
className: "flex items-center justify-end gap-3",
|
|
2416
|
-
children: [o && /* @__PURE__ */
|
|
2471
|
+
children: [o && /* @__PURE__ */ J("span", {
|
|
2417
2472
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2418
|
-
children: [/* @__PURE__ */
|
|
2419
|
-
}), /* @__PURE__ */
|
|
2473
|
+
children: [/* @__PURE__ */ q(L, { size: 14 }), "Saved"]
|
|
2474
|
+
}), /* @__PURE__ */ J("button", {
|
|
2420
2475
|
type: "button",
|
|
2421
2476
|
onClick: () => void u(),
|
|
2422
2477
|
disabled: i,
|
|
2423
2478
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2424
|
-
children: [i ? /* @__PURE__ */
|
|
2479
|
+
children: [i ? /* @__PURE__ */ q(B, {
|
|
2425
2480
|
size: 14,
|
|
2426
2481
|
className: "animate-spin"
|
|
2427
|
-
}) : /* @__PURE__ */
|
|
2482
|
+
}) : /* @__PURE__ */ q(H, { size: 14 }), "Save Permissions"]
|
|
2428
2483
|
})]
|
|
2429
2484
|
})
|
|
2430
2485
|
]
|
|
@@ -2432,6 +2487,6 @@ var Ye = ({ app: e }) => {
|
|
|
2432
2487
|
});
|
|
2433
2488
|
};
|
|
2434
2489
|
//#endregion
|
|
2435
|
-
export {
|
|
2490
|
+
export { je as ApplicationDetailPage };
|
|
2436
2491
|
|
|
2437
2492
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|