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