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