@burdenoff/microfe-devportal 2026.624.15 → 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,90 +538,159 @@ 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 =
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
},
|
|
566
|
-
|
|
555
|
+
}, r = e.appType === "NODE" || e.appType === "WORKFLOW", i = A(() => /* @__PURE__ */ new Date(), []), a = A(() => {
|
|
556
|
+
let e = new Date(i);
|
|
557
|
+
return e.setDate(e.getDate() - 30), e;
|
|
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({
|
|
566
|
+
variables: {
|
|
567
|
+
applicationId: e.id,
|
|
568
|
+
period: "daily",
|
|
569
|
+
startDate: a.toISOString(),
|
|
570
|
+
endDate: i.toISOString()
|
|
571
|
+
},
|
|
572
|
+
skip: r
|
|
573
|
+
});
|
|
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
|
+
]
|
|
629
|
+
})
|
|
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) => {
|
|
567
636
|
let r = t(e);
|
|
568
637
|
return r === e ? n : r;
|
|
569
638
|
};
|
|
570
|
-
return /* @__PURE__ */
|
|
639
|
+
return /* @__PURE__ */ J("div", {
|
|
571
640
|
className: "grid gap-6 lg:grid-cols-3",
|
|
572
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ J("div", {
|
|
573
642
|
className: "lg:col-span-2 space-y-6",
|
|
574
643
|
children: [
|
|
575
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ J("div", {
|
|
576
645
|
className: "grid gap-4 sm:grid-cols-4",
|
|
577
646
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ q(Q, {
|
|
579
648
|
label: n("devportal.totalInstalls", "Total Installs"),
|
|
580
649
|
value: e.installCount.toLocaleString()
|
|
581
650
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ q(Q, {
|
|
583
652
|
label: n("devportal.activeInstalls", "Active Installs"),
|
|
584
653
|
value: e.activeInstallCount.toLocaleString()
|
|
585
654
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ q(Q, {
|
|
587
656
|
label: n("devportal.averageRating", "Average Rating"),
|
|
588
657
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
589
658
|
}),
|
|
590
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ q(Q, {
|
|
591
660
|
label: n("devportal.reviews", "Reviews"),
|
|
592
661
|
value: e.reviewCount.toString()
|
|
593
662
|
})
|
|
594
663
|
]
|
|
595
664
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ q(y, {
|
|
597
666
|
title: n("devportal.description", "Description"),
|
|
598
|
-
children: /* @__PURE__ */
|
|
667
|
+
children: /* @__PURE__ */ q("div", {
|
|
599
668
|
className: "prose prose-sm max-w-none",
|
|
600
|
-
children: /* @__PURE__ */
|
|
669
|
+
children: /* @__PURE__ */ q("pre", {
|
|
601
670
|
className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
|
|
602
671
|
children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
|
|
603
672
|
})
|
|
604
673
|
})
|
|
605
674
|
}),
|
|
606
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ q(y, {
|
|
607
676
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
608
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ J("div", {
|
|
609
678
|
className: "space-y-3",
|
|
610
|
-
children: [e.tags.length > 0 && /* @__PURE__ */
|
|
679
|
+
children: [e.tags.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
611
680
|
className: "text-xs text-muted-foreground mb-2",
|
|
612
681
|
children: n("devportal.tags", "Tags")
|
|
613
|
-
}), /* @__PURE__ */
|
|
682
|
+
}), /* @__PURE__ */ q("div", {
|
|
614
683
|
className: "flex flex-wrap gap-2",
|
|
615
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
684
|
+
children: e.tags.map((e) => /* @__PURE__ */ q("span", {
|
|
616
685
|
className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
|
|
617
686
|
children: e
|
|
618
687
|
}, e))
|
|
619
|
-
})] }), e.keywords.length > 0 && /* @__PURE__ */
|
|
688
|
+
})] }), e.keywords.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
620
689
|
className: "text-xs text-muted-foreground mb-2",
|
|
621
690
|
children: n("devportal.keywords", "Keywords")
|
|
622
|
-
}), /* @__PURE__ */
|
|
691
|
+
}), /* @__PURE__ */ q("div", {
|
|
623
692
|
className: "flex flex-wrap gap-2",
|
|
624
|
-
children: e.keywords.map((e) => /* @__PURE__ */
|
|
693
|
+
children: e.keywords.map((e) => /* @__PURE__ */ q("span", {
|
|
625
694
|
className: "rounded-full bg-muted px-3 py-1 text-xs",
|
|
626
695
|
children: e
|
|
627
696
|
}, e))
|
|
@@ -629,14 +698,14 @@ var we = [
|
|
|
629
698
|
})
|
|
630
699
|
})
|
|
631
700
|
]
|
|
632
|
-
}), /* @__PURE__ */
|
|
701
|
+
}), /* @__PURE__ */ J("div", {
|
|
633
702
|
className: "space-y-6",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ q(y, {
|
|
635
704
|
title: n("devportal.details", "Details"),
|
|
636
|
-
children: /* @__PURE__ */
|
|
705
|
+
children: /* @__PURE__ */ q(T, { items: [
|
|
637
706
|
{
|
|
638
707
|
label: n("devportal.appId", "App ID"),
|
|
639
|
-
value: /* @__PURE__ */
|
|
708
|
+
value: /* @__PURE__ */ q("code", {
|
|
640
709
|
className: "text-xs",
|
|
641
710
|
children: e.id
|
|
642
711
|
})
|
|
@@ -666,32 +735,32 @@ var we = [
|
|
|
666
735
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
667
736
|
}
|
|
668
737
|
] })
|
|
669
|
-
}), /* @__PURE__ */
|
|
738
|
+
}), /* @__PURE__ */ q(y, {
|
|
670
739
|
title: n("devportal.links", "Links"),
|
|
671
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ J("div", {
|
|
672
741
|
className: "space-y-2",
|
|
673
742
|
children: [
|
|
674
|
-
e.websiteUrl && /* @__PURE__ */
|
|
743
|
+
e.websiteUrl && /* @__PURE__ */ q($, {
|
|
675
744
|
label: n("devportal.website", "Website"),
|
|
676
745
|
url: e.websiteUrl
|
|
677
746
|
}),
|
|
678
|
-
e.documentationUrl && /* @__PURE__ */
|
|
747
|
+
e.documentationUrl && /* @__PURE__ */ q($, {
|
|
679
748
|
label: n("devportal.documentation", "Documentation"),
|
|
680
749
|
url: e.documentationUrl
|
|
681
750
|
}),
|
|
682
|
-
e.supportUrl && /* @__PURE__ */
|
|
751
|
+
e.supportUrl && /* @__PURE__ */ q($, {
|
|
683
752
|
label: n("devportal.support", "Support"),
|
|
684
753
|
url: e.supportUrl
|
|
685
754
|
}),
|
|
686
|
-
e.githubUrl && /* @__PURE__ */
|
|
755
|
+
e.githubUrl && /* @__PURE__ */ q($, {
|
|
687
756
|
label: n("devportal.github", "GitHub"),
|
|
688
757
|
url: e.githubUrl
|
|
689
758
|
}),
|
|
690
|
-
e.privacyPolicyUrl && /* @__PURE__ */
|
|
759
|
+
e.privacyPolicyUrl && /* @__PURE__ */ q($, {
|
|
691
760
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
692
761
|
url: e.privacyPolicyUrl
|
|
693
762
|
}),
|
|
694
|
-
e.termsOfServiceUrl && /* @__PURE__ */
|
|
763
|
+
e.termsOfServiceUrl && /* @__PURE__ */ q($, {
|
|
695
764
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
696
765
|
url: e.termsOfServiceUrl
|
|
697
766
|
})
|
|
@@ -700,16 +769,16 @@ var we = [
|
|
|
700
769
|
})]
|
|
701
770
|
})]
|
|
702
771
|
});
|
|
703
|
-
},
|
|
704
|
-
let { t: i } =
|
|
772
|
+
}, Fe = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
773
|
+
let { t: i } = N(), a = (e, t) => {
|
|
705
774
|
let n = i(e);
|
|
706
775
|
return n === e ? t : n;
|
|
707
776
|
};
|
|
708
|
-
return /* @__PURE__ */
|
|
777
|
+
return /* @__PURE__ */ J("div", {
|
|
709
778
|
className: "space-y-6",
|
|
710
|
-
children: [/* @__PURE__ */
|
|
779
|
+
children: [/* @__PURE__ */ J("div", {
|
|
711
780
|
className: "flex items-center justify-between",
|
|
712
|
-
children: [/* @__PURE__ */
|
|
781
|
+
children: [/* @__PURE__ */ J("p", {
|
|
713
782
|
className: "text-sm text-muted-foreground",
|
|
714
783
|
children: [
|
|
715
784
|
t.length,
|
|
@@ -718,81 +787,81 @@ var we = [
|
|
|
718
787
|
" ",
|
|
719
788
|
a("devportal.configured", "configured")
|
|
720
789
|
]
|
|
721
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ J("button", {
|
|
722
791
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
723
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",
|
|
724
|
-
children: [/* @__PURE__ */
|
|
793
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
725
794
|
})]
|
|
726
|
-
}), t.length > 0 ? /* @__PURE__ */
|
|
795
|
+
}), t.length > 0 ? /* @__PURE__ */ q("div", {
|
|
727
796
|
className: "space-y-4",
|
|
728
|
-
children: t.map((t) => /* @__PURE__ */
|
|
797
|
+
children: t.map((t) => /* @__PURE__ */ J("div", {
|
|
729
798
|
className: "rounded-lg border bg-card p-4 space-y-4",
|
|
730
799
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
800
|
+
/* @__PURE__ */ J("div", {
|
|
732
801
|
className: "flex items-start justify-between",
|
|
733
|
-
children: [/* @__PURE__ */
|
|
802
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
734
803
|
className: "flex items-center gap-2",
|
|
735
|
-
children: [/* @__PURE__ */
|
|
804
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
736
805
|
className: "font-medium",
|
|
737
806
|
children: t.name
|
|
738
|
-
}), /* @__PURE__ */
|
|
807
|
+
}), /* @__PURE__ */ q(x, {
|
|
739
808
|
status: t.status,
|
|
740
809
|
type: "webhook"
|
|
741
810
|
})]
|
|
742
|
-
}), t.description && /* @__PURE__ */
|
|
811
|
+
}), t.description && /* @__PURE__ */ q("p", {
|
|
743
812
|
className: "text-sm text-muted-foreground mt-1",
|
|
744
813
|
children: t.description
|
|
745
|
-
})] }), /* @__PURE__ */
|
|
814
|
+
})] }), /* @__PURE__ */ q("button", {
|
|
746
815
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
747
816
|
className: "rounded-md p-1 hover:bg-muted",
|
|
748
|
-
children: /* @__PURE__ */
|
|
817
|
+
children: /* @__PURE__ */ q(me, { size: 20 })
|
|
749
818
|
})]
|
|
750
819
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
752
821
|
className: "text-xs text-muted-foreground mb-1",
|
|
753
822
|
children: a("devportal.endpointUrl", "Endpoint URL")
|
|
754
|
-
}), /* @__PURE__ */
|
|
823
|
+
}), /* @__PURE__ */ q("code", {
|
|
755
824
|
className: "text-sm bg-muted px-2 py-1 rounded block truncate",
|
|
756
825
|
children: t.url
|
|
757
826
|
})] }),
|
|
758
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
759
828
|
className: "text-xs text-muted-foreground mb-2",
|
|
760
829
|
children: a("devportal.events", "Events")
|
|
761
|
-
}), /* @__PURE__ */
|
|
830
|
+
}), /* @__PURE__ */ q("div", {
|
|
762
831
|
className: "flex flex-wrap gap-2",
|
|
763
|
-
children: t.events.map((e) => /* @__PURE__ */
|
|
832
|
+
children: t.events.map((e) => /* @__PURE__ */ q("span", {
|
|
764
833
|
className: "rounded-full bg-muted px-2 py-0.5 text-xs",
|
|
765
834
|
children: e
|
|
766
835
|
}, e))
|
|
767
836
|
})] }),
|
|
768
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ J("div", {
|
|
769
838
|
className: "grid gap-4 sm:grid-cols-4 text-sm",
|
|
770
839
|
children: [
|
|
771
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
772
841
|
className: "text-xs text-muted-foreground",
|
|
773
842
|
children: a("devportal.success", "Success")
|
|
774
|
-
}), /* @__PURE__ */
|
|
843
|
+
}), /* @__PURE__ */ q("p", {
|
|
775
844
|
className: "font-medium text-status-success-text",
|
|
776
845
|
children: t.successCount.toLocaleString()
|
|
777
846
|
})] }),
|
|
778
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
779
848
|
className: "text-xs text-muted-foreground",
|
|
780
849
|
children: a("devportal.failed", "Failed")
|
|
781
|
-
}), /* @__PURE__ */
|
|
850
|
+
}), /* @__PURE__ */ q("p", {
|
|
782
851
|
className: "font-medium text-status-error-text",
|
|
783
852
|
children: t.failureCount.toLocaleString()
|
|
784
853
|
})] }),
|
|
785
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
786
855
|
className: "text-xs text-muted-foreground",
|
|
787
856
|
children: a("devportal.successRate", "Success Rate")
|
|
788
|
-
}), /* @__PURE__ */
|
|
857
|
+
}), /* @__PURE__ */ J("p", {
|
|
789
858
|
className: "font-medium",
|
|
790
859
|
children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
|
|
791
860
|
})] }),
|
|
792
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
793
862
|
className: "text-xs text-muted-foreground",
|
|
794
863
|
children: a("devportal.lastTriggered", "Last Triggered")
|
|
795
|
-
}), /* @__PURE__ */
|
|
864
|
+
}), /* @__PURE__ */ q("p", {
|
|
796
865
|
className: "font-medium",
|
|
797
866
|
children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
|
|
798
867
|
})] })
|
|
@@ -800,28 +869,28 @@ var we = [
|
|
|
800
869
|
})
|
|
801
870
|
]
|
|
802
871
|
}, t.id))
|
|
803
|
-
}) : /* @__PURE__ */
|
|
804
|
-
icon: /* @__PURE__ */
|
|
872
|
+
}) : /* @__PURE__ */ q(r, {
|
|
873
|
+
icon: /* @__PURE__ */ q(ye, { size: 32 }),
|
|
805
874
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
806
875
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
807
|
-
action: /* @__PURE__ */
|
|
876
|
+
action: /* @__PURE__ */ J("button", {
|
|
808
877
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
809
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",
|
|
810
|
-
children: [/* @__PURE__ */
|
|
879
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
811
880
|
})
|
|
812
881
|
})]
|
|
813
882
|
});
|
|
814
|
-
},
|
|
815
|
-
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) => {
|
|
816
885
|
let n = p(e);
|
|
817
886
|
return n === e ? t : n;
|
|
818
887
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
819
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ J("div", {
|
|
820
889
|
className: "space-y-6",
|
|
821
890
|
children: [
|
|
822
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ J("div", {
|
|
823
892
|
className: "flex items-center justify-between",
|
|
824
|
-
children: [/* @__PURE__ */
|
|
893
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
|
|
825
894
|
className: "text-sm text-muted-foreground",
|
|
826
895
|
children: [
|
|
827
896
|
n.length,
|
|
@@ -832,7 +901,7 @@ var we = [
|
|
|
832
901
|
" ",
|
|
833
902
|
e
|
|
834
903
|
]
|
|
835
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
904
|
+
}), h.length > 0 && /* @__PURE__ */ J("p", {
|
|
836
905
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
837
906
|
children: [
|
|
838
907
|
h.length,
|
|
@@ -844,44 +913,44 @@ var we = [
|
|
|
844
913
|
" ",
|
|
845
914
|
m("devportal.revokedExpired", "revoked/expired")
|
|
846
915
|
]
|
|
847
|
-
})] }), /* @__PURE__ */
|
|
916
|
+
})] }), /* @__PURE__ */ J("button", {
|
|
848
917
|
onClick: i,
|
|
849
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",
|
|
850
|
-
children: [/* @__PURE__ */
|
|
919
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
851
920
|
})]
|
|
852
921
|
}),
|
|
853
|
-
h.length > 0 && /* @__PURE__ */
|
|
922
|
+
h.length > 0 && /* @__PURE__ */ q("div", {
|
|
854
923
|
className: "rounded-lg border bg-card p-4",
|
|
855
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ J("div", {
|
|
856
925
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
857
|
-
children: [/* @__PURE__ */
|
|
926
|
+
children: [/* @__PURE__ */ J("div", {
|
|
858
927
|
className: "flex flex-wrap items-center gap-3",
|
|
859
|
-
children: [/* @__PURE__ */
|
|
928
|
+
children: [/* @__PURE__ */ J("div", {
|
|
860
929
|
className: "flex items-center gap-2",
|
|
861
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ q(te, {
|
|
862
931
|
checked: d,
|
|
863
932
|
indeterminate: f,
|
|
864
933
|
onChange: c,
|
|
865
934
|
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
866
|
-
}), /* @__PURE__ */
|
|
935
|
+
}), /* @__PURE__ */ q("span", {
|
|
867
936
|
className: "text-sm font-medium",
|
|
868
937
|
children: m("devportal.selectAllActive", "Select all active")
|
|
869
938
|
})]
|
|
870
|
-
}), o.size > 0 && /* @__PURE__ */
|
|
939
|
+
}), o.size > 0 && /* @__PURE__ */ q("button", {
|
|
871
940
|
onClick: l,
|
|
872
941
|
className: "text-sm text-muted-foreground hover:text-foreground",
|
|
873
942
|
children: m("devportal.clearSelection", "Clear selection")
|
|
874
943
|
})]
|
|
875
|
-
}), /* @__PURE__ */
|
|
944
|
+
}), /* @__PURE__ */ J("div", {
|
|
876
945
|
className: "flex flex-wrap items-center gap-2",
|
|
877
|
-
children: [/* @__PURE__ */
|
|
946
|
+
children: [/* @__PURE__ */ J("span", {
|
|
878
947
|
className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
|
|
879
948
|
children: [
|
|
880
949
|
o.size,
|
|
881
950
|
" ",
|
|
882
951
|
m("devportal.selected", "selected")
|
|
883
952
|
]
|
|
884
|
-
}), /* @__PURE__ */
|
|
953
|
+
}), /* @__PURE__ */ J("button", {
|
|
885
954
|
onClick: u,
|
|
886
955
|
disabled: o.size === 0,
|
|
887
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",
|
|
@@ -890,33 +959,33 @@ var we = [
|
|
|
890
959
|
})]
|
|
891
960
|
})
|
|
892
961
|
}),
|
|
893
|
-
n.length > 0 ? /* @__PURE__ */
|
|
962
|
+
n.length > 0 ? /* @__PURE__ */ q("div", {
|
|
894
963
|
className: "space-y-4",
|
|
895
|
-
children: n.map((e) => /* @__PURE__ */
|
|
964
|
+
children: n.map((e) => /* @__PURE__ */ J("div", {
|
|
896
965
|
className: "rounded-lg border bg-card p-4 space-y-4",
|
|
897
966
|
children: [
|
|
898
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ J("div", {
|
|
899
968
|
className: "flex items-start justify-between",
|
|
900
|
-
children: [/* @__PURE__ */
|
|
969
|
+
children: [/* @__PURE__ */ J("div", {
|
|
901
970
|
className: "flex items-start gap-3",
|
|
902
|
-
children: [e.status === "ACTIVE" && /* @__PURE__ */
|
|
971
|
+
children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
|
|
903
972
|
onClick: (e) => e.stopPropagation(),
|
|
904
|
-
children: /* @__PURE__ */
|
|
973
|
+
children: /* @__PURE__ */ q(te, {
|
|
905
974
|
checked: o.has(e.id),
|
|
906
975
|
onChange: (t) => s(e.id, t),
|
|
907
976
|
ariaLabel: `Select delegation ${e.id}`,
|
|
908
977
|
className: "mt-1"
|
|
909
978
|
})
|
|
910
|
-
}), /* @__PURE__ */
|
|
979
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
|
|
911
980
|
className: "flex items-center gap-2",
|
|
912
|
-
children: [/* @__PURE__ */
|
|
981
|
+
children: [/* @__PURE__ */ J("h3", {
|
|
913
982
|
className: "font-medium",
|
|
914
983
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
915
|
-
}), /* @__PURE__ */
|
|
916
|
-
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]),
|
|
917
986
|
children: e.status
|
|
918
987
|
})]
|
|
919
|
-
}), /* @__PURE__ */
|
|
988
|
+
}), /* @__PURE__ */ J("p", {
|
|
920
989
|
className: "text-sm text-muted-foreground mt-1",
|
|
921
990
|
children: [
|
|
922
991
|
m("devportal.granted", "Granted"),
|
|
@@ -928,55 +997,55 @@ var we = [
|
|
|
928
997
|
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
929
998
|
]
|
|
930
999
|
})] })]
|
|
931
|
-
}), e.status === "ACTIVE" && /* @__PURE__ */
|
|
1000
|
+
}), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
|
|
932
1001
|
onClick: () => a(e.id),
|
|
933
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",
|
|
934
|
-
children: [/* @__PURE__ */
|
|
1003
|
+
children: [/* @__PURE__ */ q(be, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
935
1004
|
})]
|
|
936
1005
|
}),
|
|
937
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
938
1007
|
className: "text-xs text-muted-foreground mb-2",
|
|
939
1008
|
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
940
|
-
}), /* @__PURE__ */
|
|
1009
|
+
}), /* @__PURE__ */ q("div", {
|
|
941
1010
|
className: "flex flex-wrap gap-2",
|
|
942
|
-
children: e.scopes.map((e) => /* @__PURE__ */
|
|
1011
|
+
children: e.scopes.map((e) => /* @__PURE__ */ q("span", {
|
|
943
1012
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
944
1013
|
children: e
|
|
945
1014
|
}, e))
|
|
946
1015
|
})] }),
|
|
947
|
-
e.workspaceIds.length > 0 && /* @__PURE__ */
|
|
1016
|
+
e.workspaceIds.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
948
1017
|
className: "text-xs text-muted-foreground mb-2",
|
|
949
1018
|
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
950
|
-
}), /* @__PURE__ */
|
|
1019
|
+
}), /* @__PURE__ */ q("div", {
|
|
951
1020
|
className: "flex flex-wrap gap-2",
|
|
952
|
-
children: e.workspaceIds.map((e) => /* @__PURE__ */
|
|
1021
|
+
children: e.workspaceIds.map((e) => /* @__PURE__ */ q("code", {
|
|
953
1022
|
className: "rounded bg-muted px-2 py-0.5 text-xs",
|
|
954
1023
|
children: e
|
|
955
1024
|
}, e))
|
|
956
1025
|
})] }),
|
|
957
|
-
/* @__PURE__ */
|
|
1026
|
+
/* @__PURE__ */ J("div", {
|
|
958
1027
|
className: "flex items-center gap-4 text-xs text-muted-foreground",
|
|
959
1028
|
children: [
|
|
960
|
-
e.expiresAt && /* @__PURE__ */
|
|
1029
|
+
e.expiresAt && /* @__PURE__ */ J("span", {
|
|
961
1030
|
className: "flex items-center gap-1",
|
|
962
1031
|
children: [
|
|
963
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ q(L, { size: 12 }),
|
|
964
1033
|
m("devportal.expires", "Expires"),
|
|
965
1034
|
" ",
|
|
966
1035
|
new Date(e.expiresAt).toLocaleDateString()
|
|
967
1036
|
]
|
|
968
1037
|
}),
|
|
969
|
-
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */
|
|
1038
|
+
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ J("span", {
|
|
970
1039
|
className: "flex items-center gap-1",
|
|
971
|
-
children: [/* @__PURE__ */
|
|
1040
|
+
children: [/* @__PURE__ */ q(I, {
|
|
972
1041
|
size: 12,
|
|
973
1042
|
className: "text-status-success-text"
|
|
974
1043
|
}), m("devportal.noExpiration", "No expiration")]
|
|
975
1044
|
}),
|
|
976
|
-
e.revokedAt && /* @__PURE__ */
|
|
1045
|
+
e.revokedAt && /* @__PURE__ */ J("span", {
|
|
977
1046
|
className: "flex items-center gap-1",
|
|
978
1047
|
children: [
|
|
979
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ q(be, {
|
|
980
1049
|
size: 12,
|
|
981
1050
|
className: "text-status-error-text"
|
|
982
1051
|
}),
|
|
@@ -989,52 +1058,52 @@ var we = [
|
|
|
989
1058
|
})
|
|
990
1059
|
]
|
|
991
1060
|
}, e.id))
|
|
992
|
-
}) : /* @__PURE__ */
|
|
993
|
-
icon: /* @__PURE__ */
|
|
1061
|
+
}) : /* @__PURE__ */ q(r, {
|
|
1062
|
+
icon: /* @__PURE__ */ q(W, { size: 32 }),
|
|
994
1063
|
title: m("devportal.noDelegations", "No delegations"),
|
|
995
1064
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
996
|
-
action: /* @__PURE__ */
|
|
1065
|
+
action: /* @__PURE__ */ J("button", {
|
|
997
1066
|
onClick: i,
|
|
998
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",
|
|
999
|
-
children: [/* @__PURE__ */
|
|
1068
|
+
children: [/* @__PURE__ */ q(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1000
1069
|
})
|
|
1001
1070
|
})
|
|
1002
1071
|
]
|
|
1003
1072
|
});
|
|
1004
|
-
},
|
|
1005
|
-
let { t } =
|
|
1073
|
+
}, Le = ({ analytics: e }) => {
|
|
1074
|
+
let { t } = N(), n = (e, n) => {
|
|
1006
1075
|
let r = t(e);
|
|
1007
1076
|
return r === e ? n : r;
|
|
1008
1077
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
1009
|
-
return /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ J("div", {
|
|
1010
1079
|
className: "space-y-6",
|
|
1011
|
-
children: [/* @__PURE__ */
|
|
1080
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1012
1081
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1013
1082
|
children: [
|
|
1014
|
-
/* @__PURE__ */
|
|
1083
|
+
/* @__PURE__ */ q(Q, {
|
|
1015
1084
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1016
1085
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1017
1086
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1018
1087
|
}),
|
|
1019
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ q(Q, {
|
|
1020
1089
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1021
1090
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1022
1091
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1023
1092
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1093
|
+
/* @__PURE__ */ q(Q, {
|
|
1025
1094
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1026
1095
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1027
1096
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1028
1097
|
}),
|
|
1029
|
-
/* @__PURE__ */
|
|
1098
|
+
/* @__PURE__ */ q(Q, {
|
|
1030
1099
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1031
1100
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1032
1101
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1033
1102
|
})
|
|
1034
1103
|
]
|
|
1035
|
-
}), /* @__PURE__ */
|
|
1104
|
+
}), /* @__PURE__ */ q(y, {
|
|
1036
1105
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1037
|
-
children: e.length > 0 ? /* @__PURE__ */
|
|
1106
|
+
children: e.length > 0 ? /* @__PURE__ */ q(w, {
|
|
1038
1107
|
data: e,
|
|
1039
1108
|
keyField: "id",
|
|
1040
1109
|
columns: [
|
|
@@ -1074,18 +1143,18 @@ var we = [
|
|
|
1074
1143
|
render: (e) => e.sessions.toLocaleString()
|
|
1075
1144
|
}
|
|
1076
1145
|
]
|
|
1077
|
-
}) : /* @__PURE__ */
|
|
1078
|
-
icon: /* @__PURE__ */
|
|
1146
|
+
}) : /* @__PURE__ */ q(r, {
|
|
1147
|
+
icon: /* @__PURE__ */ q(F, { size: 32 }),
|
|
1079
1148
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1080
1149
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1081
1150
|
})
|
|
1082
1151
|
})]
|
|
1083
1152
|
});
|
|
1084
|
-
},
|
|
1085
|
-
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) => {
|
|
1086
1155
|
let n = a(e);
|
|
1087
1156
|
return n === e ? t : n;
|
|
1088
|
-
}, [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 () => {
|
|
1089
1158
|
m(!0), f("");
|
|
1090
1159
|
try {
|
|
1091
1160
|
let e = {};
|
|
@@ -1116,24 +1185,24 @@ var we = [
|
|
|
1116
1185
|
l,
|
|
1117
1186
|
h,
|
|
1118
1187
|
_
|
|
1119
|
-
]),
|
|
1188
|
+
]), x = k(() => {
|
|
1120
1189
|
i && v(i), b(!0);
|
|
1121
1190
|
}, [i]);
|
|
1122
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ J("div", {
|
|
1123
1192
|
className: "space-y-4",
|
|
1124
1193
|
children: [
|
|
1125
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ J("div", {
|
|
1126
1195
|
className: "flex items-center justify-between",
|
|
1127
|
-
children: [/* @__PURE__ */
|
|
1196
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("h3", {
|
|
1128
1197
|
className: "text-lg font-semibold",
|
|
1129
1198
|
children: o("devportal.apiPlayground", "API Playground")
|
|
1130
|
-
}), /* @__PURE__ */
|
|
1199
|
+
}), /* @__PURE__ */ J("p", {
|
|
1131
1200
|
className: "text-sm text-muted-foreground",
|
|
1132
1201
|
children: [
|
|
1133
1202
|
o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
|
|
1134
1203
|
" ",
|
|
1135
|
-
/* @__PURE__ */
|
|
1136
|
-
t.appId && /* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ q("strong", { children: t.name }),
|
|
1205
|
+
t.appId && /* @__PURE__ */ J("span", {
|
|
1137
1206
|
className: "ml-1 text-xs text-muted-foreground",
|
|
1138
1207
|
children: [
|
|
1139
1208
|
"(OAuth App: ",
|
|
@@ -1142,39 +1211,39 @@ var we = [
|
|
|
1142
1211
|
]
|
|
1143
1212
|
})
|
|
1144
1213
|
]
|
|
1145
|
-
})] }), /* @__PURE__ */
|
|
1146
|
-
onClick:
|
|
1214
|
+
})] }), /* @__PURE__ */ J("button", {
|
|
1215
|
+
onClick: x,
|
|
1147
1216
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1148
|
-
children: [/* @__PURE__ */
|
|
1217
|
+
children: [/* @__PURE__ */ q(pe, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1149
1218
|
})]
|
|
1150
1219
|
}),
|
|
1151
|
-
y && /* @__PURE__ */
|
|
1220
|
+
y && /* @__PURE__ */ J("div", {
|
|
1152
1221
|
className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
|
|
1153
1222
|
children: [
|
|
1154
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ q("p", {
|
|
1155
1224
|
className: "font-medium text-status-info-text",
|
|
1156
1225
|
children: o("devportal.authenticationGuide", "Authentication Guide")
|
|
1157
1226
|
}),
|
|
1158
|
-
/* @__PURE__ */
|
|
1227
|
+
/* @__PURE__ */ J("p", {
|
|
1159
1228
|
className: "text-status-info-text",
|
|
1160
1229
|
children: [
|
|
1161
1230
|
o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
|
|
1162
1231
|
" ",
|
|
1163
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ q("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
|
|
1164
1233
|
" ",
|
|
1165
1234
|
o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
|
|
1166
1235
|
]
|
|
1167
1236
|
}),
|
|
1168
|
-
/* @__PURE__ */
|
|
1237
|
+
/* @__PURE__ */ q("pre", {
|
|
1169
1238
|
className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
|
|
1170
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}"
|
|
1171
1240
|
}),
|
|
1172
|
-
/* @__PURE__ */
|
|
1241
|
+
/* @__PURE__ */ J("p", {
|
|
1173
1242
|
className: "text-status-info-text",
|
|
1174
1243
|
children: [
|
|
1175
1244
|
o("devportal.useReturnedAccessToken", "Use the returned"),
|
|
1176
1245
|
" ",
|
|
1177
|
-
/* @__PURE__ */
|
|
1246
|
+
/* @__PURE__ */ q("code", {
|
|
1178
1247
|
className: "bg-status-info-bg-subtle px-1 rounded",
|
|
1179
1248
|
children: "accessToken"
|
|
1180
1249
|
}),
|
|
@@ -1182,129 +1251,129 @@ var we = [
|
|
|
1182
1251
|
o("devportal.asBearerToken", "as the Bearer token below.")
|
|
1183
1252
|
]
|
|
1184
1253
|
}),
|
|
1185
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ q("button", {
|
|
1186
1255
|
onClick: () => b(!1),
|
|
1187
1256
|
className: "text-xs text-accent-blue hover:underline",
|
|
1188
1257
|
children: o("devportal.dismiss", "Dismiss")
|
|
1189
1258
|
})
|
|
1190
1259
|
]
|
|
1191
1260
|
}),
|
|
1192
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1193
1262
|
className: "block text-sm font-medium mb-1",
|
|
1194
1263
|
children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
|
|
1195
|
-
}), /* @__PURE__ */
|
|
1264
|
+
}), /* @__PURE__ */ J("div", {
|
|
1196
1265
|
className: "flex gap-2",
|
|
1197
|
-
children: [/* @__PURE__ */
|
|
1266
|
+
children: [/* @__PURE__ */ q("input", {
|
|
1198
1267
|
type: "text",
|
|
1199
1268
|
value: h,
|
|
1200
1269
|
onChange: (e) => g(e.target.value),
|
|
1201
1270
|
className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
|
|
1202
|
-
}), /* @__PURE__ */
|
|
1271
|
+
}), /* @__PURE__ */ J("select", {
|
|
1203
1272
|
onChange: (e) => g(e.target.value),
|
|
1204
1273
|
className: "rounded-md border px-3 py-2 text-sm bg-background",
|
|
1205
1274
|
value: h,
|
|
1206
|
-
children: [/* @__PURE__ */
|
|
1275
|
+
children: [/* @__PURE__ */ q("option", {
|
|
1207
1276
|
value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
|
|
1208
1277
|
children: o("devportal.globalGateway", "Global Gateway")
|
|
1209
|
-
}), /* @__PURE__ */
|
|
1278
|
+
}), /* @__PURE__ */ q("option", {
|
|
1210
1279
|
value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
|
|
1211
1280
|
children: o("devportal.workspaceGateway", "Workspace Gateway")
|
|
1212
1281
|
})]
|
|
1213
1282
|
})]
|
|
1214
1283
|
})] }),
|
|
1215
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1216
1285
|
className: "block text-sm font-medium mb-1",
|
|
1217
1286
|
children: o("devportal.bearerToken", "Bearer Token")
|
|
1218
|
-
}), /* @__PURE__ */
|
|
1287
|
+
}), /* @__PURE__ */ q("input", {
|
|
1219
1288
|
type: "password",
|
|
1220
1289
|
value: _,
|
|
1221
1290
|
onChange: (e) => v(e.target.value),
|
|
1222
1291
|
placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
|
|
1223
1292
|
className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
|
|
1224
1293
|
})] }),
|
|
1225
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ J("div", {
|
|
1226
1295
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
1227
|
-
children: [/* @__PURE__ */
|
|
1296
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1228
1297
|
className: "block text-sm font-medium mb-1",
|
|
1229
1298
|
children: o("devportal.query", "Query")
|
|
1230
|
-
}), /* @__PURE__ */
|
|
1299
|
+
}), /* @__PURE__ */ q("textarea", {
|
|
1231
1300
|
value: s,
|
|
1232
1301
|
onChange: (e) => c(e.target.value),
|
|
1233
1302
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
|
|
1234
1303
|
spellCheck: !1
|
|
1235
|
-
})] }), /* @__PURE__ */
|
|
1304
|
+
})] }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1236
1305
|
className: "block text-sm font-medium mb-1",
|
|
1237
1306
|
children: o("devportal.variablesJson", "Variables (JSON)")
|
|
1238
|
-
}), /* @__PURE__ */
|
|
1307
|
+
}), /* @__PURE__ */ q("textarea", {
|
|
1239
1308
|
value: l,
|
|
1240
1309
|
onChange: (e) => u(e.target.value),
|
|
1241
1310
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
|
|
1242
1311
|
spellCheck: !1
|
|
1243
1312
|
})] })]
|
|
1244
1313
|
}),
|
|
1245
|
-
/* @__PURE__ */
|
|
1246
|
-
onClick:
|
|
1314
|
+
/* @__PURE__ */ J("button", {
|
|
1315
|
+
onClick: ee,
|
|
1247
1316
|
disabled: p,
|
|
1248
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",
|
|
1249
|
-
children: [p ? /* @__PURE__ */
|
|
1318
|
+
children: [p ? /* @__PURE__ */ q(B, {
|
|
1250
1319
|
size: 16,
|
|
1251
1320
|
className: "animate-spin"
|
|
1252
|
-
}) : /* @__PURE__ */
|
|
1321
|
+
}) : /* @__PURE__ */ q(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
1253
1322
|
}),
|
|
1254
|
-
d && /* @__PURE__ */
|
|
1323
|
+
d && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
1255
1324
|
className: "block text-sm font-medium mb-1",
|
|
1256
1325
|
children: o("devportal.response", "Response")
|
|
1257
|
-
}), /* @__PURE__ */
|
|
1326
|
+
}), /* @__PURE__ */ q("pre", {
|
|
1258
1327
|
className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
|
|
1259
1328
|
children: d
|
|
1260
1329
|
})] })
|
|
1261
1330
|
]
|
|
1262
1331
|
});
|
|
1263
|
-
},
|
|
1264
|
-
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) => {
|
|
1265
1334
|
try {
|
|
1266
1335
|
r((await s(e)).downloadUrl);
|
|
1267
1336
|
} catch {}
|
|
1268
1337
|
}, [s, r]);
|
|
1269
|
-
return /* @__PURE__ */
|
|
1338
|
+
return /* @__PURE__ */ J("div", {
|
|
1270
1339
|
className: "space-y-1.5",
|
|
1271
1340
|
children: [
|
|
1272
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ q("label", {
|
|
1273
1342
|
className: "text-sm font-medium",
|
|
1274
1343
|
children: e
|
|
1275
1344
|
}),
|
|
1276
|
-
/* @__PURE__ */
|
|
1345
|
+
/* @__PURE__ */ J("div", {
|
|
1277
1346
|
className: "flex gap-3 items-start",
|
|
1278
|
-
children: [/* @__PURE__ */
|
|
1347
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1279
1348
|
className: t("relative shrink-0 w-20 rounded-lg border border-border bg-bg-sunken overflow-hidden flex items-center justify-center", o),
|
|
1280
|
-
children: [n ? /* @__PURE__ */
|
|
1349
|
+
children: [n ? /* @__PURE__ */ q("img", {
|
|
1281
1350
|
src: n,
|
|
1282
1351
|
alt: e,
|
|
1283
1352
|
className: "w-full h-full object-cover"
|
|
1284
|
-
}) : /* @__PURE__ */
|
|
1353
|
+
}) : /* @__PURE__ */ q(U, {
|
|
1285
1354
|
size: 18,
|
|
1286
1355
|
className: "text-text-secondary opacity-40"
|
|
1287
|
-
}), c && /* @__PURE__ */
|
|
1356
|
+
}), c && /* @__PURE__ */ J("div", {
|
|
1288
1357
|
className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
|
|
1289
|
-
children: [/* @__PURE__ */
|
|
1358
|
+
children: [/* @__PURE__ */ q(B, {
|
|
1290
1359
|
size: 14,
|
|
1291
1360
|
className: "animate-spin text-white"
|
|
1292
|
-
}), /* @__PURE__ */
|
|
1361
|
+
}), /* @__PURE__ */ J("span", {
|
|
1293
1362
|
className: "text-white text-xs",
|
|
1294
1363
|
children: [l, "%"]
|
|
1295
1364
|
})]
|
|
1296
1365
|
})]
|
|
1297
|
-
}), /* @__PURE__ */
|
|
1366
|
+
}), /* @__PURE__ */ J("div", {
|
|
1298
1367
|
className: "flex-1 space-y-1.5",
|
|
1299
1368
|
children: [
|
|
1300
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ q("input", {
|
|
1301
1370
|
type: "url",
|
|
1302
1371
|
value: n,
|
|
1303
1372
|
onChange: (e) => r(e.target.value),
|
|
1304
1373
|
placeholder: "https://...",
|
|
1305
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"
|
|
1306
1375
|
}),
|
|
1307
|
-
/* @__PURE__ */
|
|
1376
|
+
/* @__PURE__ */ q("input", {
|
|
1308
1377
|
ref: d,
|
|
1309
1378
|
type: "file",
|
|
1310
1379
|
accept: a,
|
|
@@ -1314,28 +1383,28 @@ var we = [
|
|
|
1314
1383
|
t && f(t), e.target.value = "";
|
|
1315
1384
|
}
|
|
1316
1385
|
}),
|
|
1317
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ J("button", {
|
|
1318
1387
|
type: "button",
|
|
1319
1388
|
disabled: c,
|
|
1320
1389
|
onClick: () => d.current?.click(),
|
|
1321
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",
|
|
1322
|
-
children: [/* @__PURE__ */
|
|
1391
|
+
children: [/* @__PURE__ */ q(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
1323
1392
|
}),
|
|
1324
|
-
u && /* @__PURE__ */
|
|
1393
|
+
u && /* @__PURE__ */ q("p", {
|
|
1325
1394
|
className: "text-xs text-status-error-text",
|
|
1326
1395
|
children: u
|
|
1327
1396
|
})
|
|
1328
1397
|
]
|
|
1329
1398
|
})]
|
|
1330
1399
|
}),
|
|
1331
|
-
i && /* @__PURE__ */
|
|
1400
|
+
i && /* @__PURE__ */ q("p", {
|
|
1332
1401
|
className: "text-xs text-text-secondary",
|
|
1333
1402
|
children: i
|
|
1334
1403
|
})
|
|
1335
1404
|
]
|
|
1336
1405
|
});
|
|
1337
|
-
},
|
|
1338
|
-
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) => {
|
|
1339
1408
|
try {
|
|
1340
1409
|
let i = await r(t);
|
|
1341
1410
|
n([...e, i.downloadUrl]);
|
|
@@ -1347,45 +1416,45 @@ var we = [
|
|
|
1347
1416
|
]), l = (t) => {
|
|
1348
1417
|
n(e.filter((e, n) => n !== t));
|
|
1349
1418
|
};
|
|
1350
|
-
return /* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ J("div", {
|
|
1351
1420
|
className: "space-y-2",
|
|
1352
1421
|
children: [
|
|
1353
|
-
/* @__PURE__ */
|
|
1422
|
+
/* @__PURE__ */ q("label", {
|
|
1354
1423
|
className: "text-sm font-medium",
|
|
1355
1424
|
children: "Screenshots"
|
|
1356
1425
|
}),
|
|
1357
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ J("div", {
|
|
1358
1427
|
className: "flex flex-wrap gap-3",
|
|
1359
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
1428
|
+
children: [e.map((e, t) => /* @__PURE__ */ J("div", {
|
|
1360
1429
|
className: "relative group w-36 aspect-video rounded-lg border border-border overflow-hidden bg-bg-sunken",
|
|
1361
|
-
children: [/* @__PURE__ */
|
|
1430
|
+
children: [/* @__PURE__ */ q("img", {
|
|
1362
1431
|
src: e,
|
|
1363
1432
|
alt: `Screenshot ${t + 1}`,
|
|
1364
1433
|
className: "w-full h-full object-cover"
|
|
1365
|
-
}), /* @__PURE__ */
|
|
1434
|
+
}), /* @__PURE__ */ q("button", {
|
|
1366
1435
|
type: "button",
|
|
1367
1436
|
onClick: () => l(t),
|
|
1368
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",
|
|
1369
|
-
children: /* @__PURE__ */
|
|
1438
|
+
children: /* @__PURE__ */ q(G, { size: 12 })
|
|
1370
1439
|
})]
|
|
1371
|
-
}, t)), /* @__PURE__ */
|
|
1440
|
+
}, t)), /* @__PURE__ */ q("button", {
|
|
1372
1441
|
type: "button",
|
|
1373
1442
|
disabled: i,
|
|
1374
1443
|
onClick: () => s.current?.click(),
|
|
1375
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"),
|
|
1376
|
-
children: i ? /* @__PURE__ */
|
|
1445
|
+
children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
1377
1446
|
size: 18,
|
|
1378
1447
|
className: "animate-spin text-primary"
|
|
1379
|
-
}), /* @__PURE__ */
|
|
1448
|
+
}), /* @__PURE__ */ J("span", {
|
|
1380
1449
|
className: "text-xs",
|
|
1381
1450
|
children: [a, "%"]
|
|
1382
|
-
})] }) : /* @__PURE__ */
|
|
1451
|
+
})] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, { size: 18 }), /* @__PURE__ */ q("span", {
|
|
1383
1452
|
className: "text-xs",
|
|
1384
1453
|
children: "Add screenshot"
|
|
1385
1454
|
})] })
|
|
1386
1455
|
})]
|
|
1387
1456
|
}),
|
|
1388
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ q("input", {
|
|
1389
1458
|
ref: s,
|
|
1390
1459
|
type: "file",
|
|
1391
1460
|
accept: "image/png,image/jpeg,image/webp,image/gif",
|
|
@@ -1395,19 +1464,19 @@ var we = [
|
|
|
1395
1464
|
t && c(t), e.target.value = "";
|
|
1396
1465
|
}
|
|
1397
1466
|
}),
|
|
1398
|
-
o && /* @__PURE__ */
|
|
1467
|
+
o && /* @__PURE__ */ q("p", {
|
|
1399
1468
|
className: "text-xs text-status-error-text",
|
|
1400
1469
|
children: o
|
|
1401
1470
|
})
|
|
1402
1471
|
]
|
|
1403
1472
|
});
|
|
1404
|
-
},
|
|
1473
|
+
}, He = new Set(["workflow", "template"]), Ue = [{
|
|
1405
1474
|
value: "FREE",
|
|
1406
1475
|
label: "Free"
|
|
1407
1476
|
}, {
|
|
1408
1477
|
value: "PAID",
|
|
1409
1478
|
label: "Paid"
|
|
1410
|
-
}],
|
|
1479
|
+
}], We = [
|
|
1411
1480
|
{
|
|
1412
1481
|
value: "agent",
|
|
1413
1482
|
label: "Agent"
|
|
@@ -1477,7 +1546,7 @@ var we = [
|
|
|
1477
1546
|
label: "Component"
|
|
1478
1547
|
}
|
|
1479
1548
|
];
|
|
1480
|
-
function
|
|
1549
|
+
function Ge(e) {
|
|
1481
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") : "";
|
|
1482
1551
|
return {
|
|
1483
1552
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -1506,33 +1575,33 @@ function Ue(e) {
|
|
|
1506
1575
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
1507
1576
|
};
|
|
1508
1577
|
}
|
|
1509
|
-
var
|
|
1578
|
+
var Ke = Se`
|
|
1510
1579
|
query MyPublisherProducts {
|
|
1511
1580
|
myPublisher { id products { id productId name } }
|
|
1512
1581
|
}
|
|
1513
|
-
`,
|
|
1582
|
+
`, qe = Se`
|
|
1514
1583
|
mutation UpdateStoreProduct($input: UpdateProductInput!) {
|
|
1515
1584
|
updateProduct(input: $input) { id name description }
|
|
1516
1585
|
}
|
|
1517
|
-
`,
|
|
1518
|
-
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) => {
|
|
1519
1588
|
let n = l(e);
|
|
1520
1589
|
return n === e ? t : n;
|
|
1521
|
-
}, [d, f] =
|
|
1590
|
+
}, [d, f] = M(() => Ge(n)), [p, m] = M(!1), [g, v] = M(!1), b = j(n);
|
|
1522
1591
|
b.current = n;
|
|
1523
|
-
let { data:
|
|
1524
|
-
|
|
1525
|
-
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));
|
|
1526
1595
|
}, [n.id]);
|
|
1527
|
-
let
|
|
1596
|
+
let T = (e, t) => {
|
|
1528
1597
|
f((n) => ({
|
|
1529
1598
|
...n,
|
|
1530
1599
|
[e]: t
|
|
1531
1600
|
}));
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1601
|
+
}, ie = async () => {
|
|
1602
|
+
m(!0);
|
|
1534
1603
|
try {
|
|
1535
|
-
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 = {
|
|
1536
1605
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1537
1606
|
itemType: d.manifestItemType || void 0,
|
|
1538
1607
|
identity: {
|
|
@@ -1550,7 +1619,7 @@ var We = X`
|
|
|
1550
1619
|
let e = parseFloat(d.price);
|
|
1551
1620
|
isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
|
|
1552
1621
|
}
|
|
1553
|
-
await
|
|
1622
|
+
await te({ variables: {
|
|
1554
1623
|
id: n.id,
|
|
1555
1624
|
input: {
|
|
1556
1625
|
iconUrl: d.iconUrl || null,
|
|
@@ -1569,8 +1638,8 @@ var We = X`
|
|
|
1569
1638
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1570
1639
|
manifest: a
|
|
1571
1640
|
}
|
|
1572
|
-
} }),
|
|
1573
|
-
id:
|
|
1641
|
+
} }), x && await S({ variables: { input: {
|
|
1642
|
+
id: x,
|
|
1574
1643
|
name: n.name,
|
|
1575
1644
|
description: d.shortDescription || void 0,
|
|
1576
1645
|
longDescription: d.description || void 0,
|
|
@@ -1582,37 +1651,37 @@ var We = X`
|
|
|
1582
1651
|
} catch {
|
|
1583
1652
|
C("error");
|
|
1584
1653
|
} finally {
|
|
1585
|
-
|
|
1654
|
+
m(!1);
|
|
1586
1655
|
}
|
|
1587
|
-
},
|
|
1656
|
+
}, ae = async () => {
|
|
1588
1657
|
try {
|
|
1589
|
-
await
|
|
1658
|
+
await ne({ variables: { id: n.id } }), C("success");
|
|
1590
1659
|
} catch {
|
|
1591
1660
|
C("error");
|
|
1592
1661
|
}
|
|
1593
|
-
},
|
|
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) => {
|
|
1594
1663
|
let t = e.target.files?.[0];
|
|
1595
1664
|
if (t) {
|
|
1596
1665
|
e.target.value = "";
|
|
1597
1666
|
try {
|
|
1598
|
-
let e = await
|
|
1667
|
+
let e = await A(t);
|
|
1599
1668
|
f((t) => ({
|
|
1600
1669
|
...t,
|
|
1601
1670
|
manifestRegistryUrl: e.downloadUrl
|
|
1602
1671
|
}));
|
|
1603
1672
|
} catch {}
|
|
1604
1673
|
}
|
|
1605
|
-
}, [
|
|
1606
|
-
e.preventDefault(),
|
|
1674
|
+
}, [A]), Se = k(async (e) => {
|
|
1675
|
+
e.preventDefault(), v(!1);
|
|
1607
1676
|
let t = e.dataTransfer.files?.[0];
|
|
1608
1677
|
if (t) try {
|
|
1609
|
-
let e = await
|
|
1678
|
+
let e = await A(t);
|
|
1610
1679
|
f((t) => ({
|
|
1611
1680
|
...t,
|
|
1612
1681
|
manifestRegistryUrl: e.downloadUrl
|
|
1613
1682
|
}));
|
|
1614
1683
|
} catch {}
|
|
1615
|
-
}, [
|
|
1684
|
+
}, [A]), Te = k((e) => {
|
|
1616
1685
|
let t = e.target.files?.[0];
|
|
1617
1686
|
if (!t) return;
|
|
1618
1687
|
let n = new FileReader();
|
|
@@ -1631,8 +1700,8 @@ var We = X`
|
|
|
1631
1700
|
}));
|
|
1632
1701
|
} catch {}
|
|
1633
1702
|
}, n.readAsText(t), e.target.value = "";
|
|
1634
|
-
}, []),
|
|
1635
|
-
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 = {
|
|
1636
1705
|
manifestVersion: "1.0",
|
|
1637
1706
|
itemType: d.manifestItemType || void 0,
|
|
1638
1707
|
identity: {
|
|
@@ -1647,9 +1716,9 @@ var We = X`
|
|
|
1647
1716
|
compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
|
|
1648
1717
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1649
1718
|
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1650
|
-
}, [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] ?? "" : "";
|
|
1651
1720
|
n.status;
|
|
1652
|
-
let
|
|
1721
|
+
let X = n.status === "SUBMITTED", Z = n.status === "PUBLISHED", Ae = n.appType === "NODE" || n.appType === "WORKFLOW", je = [
|
|
1653
1722
|
{
|
|
1654
1723
|
label: "Short description",
|
|
1655
1724
|
done: !!d.shortDescription.trim()
|
|
@@ -1671,37 +1740,37 @@ var We = X`
|
|
|
1671
1740
|
done: !!d.termsOfServiceUrl.trim()
|
|
1672
1741
|
}
|
|
1673
1742
|
], Me = je.filter((e) => e.done).length, Ne = je.length;
|
|
1674
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ J("div", {
|
|
1675
1744
|
className: "space-y-8 max-w-3xl",
|
|
1676
1745
|
children: [
|
|
1677
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ J("div", {
|
|
1678
1747
|
className: "rounded-lg border border-primary/20 bg-primary/5 px-4 py-3 space-y-2",
|
|
1679
|
-
children: [/* @__PURE__ */
|
|
1748
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1680
1749
|
className: "text-sm font-semibold text-primary",
|
|
1681
1750
|
children: u("devportal.listingTabPurpose", "What is this tab for?")
|
|
1682
|
-
}), /* @__PURE__ */
|
|
1751
|
+
}), /* @__PURE__ */ J("ul", {
|
|
1683
1752
|
className: "text-sm text-muted-foreground space-y-1 list-none pl-0",
|
|
1684
1753
|
children: [
|
|
1685
|
-
/* @__PURE__ */
|
|
1754
|
+
/* @__PURE__ */ J("li", {
|
|
1686
1755
|
className: "flex items-start gap-2",
|
|
1687
|
-
children: [/* @__PURE__ */
|
|
1756
|
+
children: [/* @__PURE__ */ q(ve, {
|
|
1688
1757
|
size: 14,
|
|
1689
1758
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1690
|
-
}), /* @__PURE__ */
|
|
1691
|
-
/* @__PURE__ */
|
|
1759
|
+
}), /* @__PURE__ */ J("span", { children: [
|
|
1760
|
+
/* @__PURE__ */ q("strong", { children: u("devportal.thisTab", "This tab") }),
|
|
1692
1761
|
" ",
|
|
1693
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.")
|
|
1694
1763
|
] })]
|
|
1695
1764
|
}),
|
|
1696
|
-
Ae && /* @__PURE__ */
|
|
1765
|
+
Ae && /* @__PURE__ */ J("li", {
|
|
1697
1766
|
className: "flex items-start gap-2",
|
|
1698
|
-
children: [/* @__PURE__ */
|
|
1767
|
+
children: [/* @__PURE__ */ q(L, {
|
|
1699
1768
|
size: 14,
|
|
1700
1769
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1701
|
-
}), /* @__PURE__ */
|
|
1770
|
+
}), /* @__PURE__ */ J("span", { children: [
|
|
1702
1771
|
u("devportal.versionsTabDesc", "To release a new version (ZIP package + manifest), go to the"),
|
|
1703
1772
|
" ",
|
|
1704
|
-
/* @__PURE__ */
|
|
1773
|
+
/* @__PURE__ */ q("button", {
|
|
1705
1774
|
type: "button",
|
|
1706
1775
|
className: "underline text-primary hover:no-underline",
|
|
1707
1776
|
onClick: () => s?.(`${c}/apps/${n.id}/versions`),
|
|
@@ -1710,26 +1779,26 @@ var We = X`
|
|
|
1710
1779
|
"."
|
|
1711
1780
|
] })]
|
|
1712
1781
|
}),
|
|
1713
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ J("li", {
|
|
1714
1783
|
className: "flex items-start gap-2",
|
|
1715
|
-
children: [/* @__PURE__ */
|
|
1784
|
+
children: [/* @__PURE__ */ q(_e, {
|
|
1716
1785
|
size: 14,
|
|
1717
1786
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1718
|
-
}), /* @__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.") })]
|
|
1719
1788
|
})
|
|
1720
1789
|
]
|
|
1721
1790
|
})]
|
|
1722
1791
|
}),
|
|
1723
|
-
!
|
|
1792
|
+
!Z && /* @__PURE__ */ J("div", {
|
|
1724
1793
|
className: "rounded-lg border bg-card p-4 space-y-3",
|
|
1725
|
-
children: [/* @__PURE__ */
|
|
1794
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1726
1795
|
className: "flex items-center justify-between",
|
|
1727
|
-
children: [/* @__PURE__ */
|
|
1796
|
+
children: [/* @__PURE__ */ J("p", {
|
|
1728
1797
|
className: "text-sm font-medium",
|
|
1729
1798
|
children: [
|
|
1730
1799
|
u("devportal.listingCompleteness", "Listing completeness"),
|
|
1731
1800
|
" ",
|
|
1732
|
-
/* @__PURE__ */
|
|
1801
|
+
/* @__PURE__ */ J("span", {
|
|
1733
1802
|
className: t("ml-1 text-xs font-semibold", Me === Ne ? "text-status-success-text" : "text-status-warning-text"),
|
|
1734
1803
|
children: [
|
|
1735
1804
|
Me,
|
|
@@ -1738,38 +1807,38 @@ var We = X`
|
|
|
1738
1807
|
]
|
|
1739
1808
|
})
|
|
1740
1809
|
]
|
|
1741
|
-
}), Me === Ne && /* @__PURE__ */
|
|
1810
|
+
}), Me === Ne && /* @__PURE__ */ J("span", {
|
|
1742
1811
|
className: "text-xs text-status-success-text flex items-center gap-1",
|
|
1743
|
-
children: [/* @__PURE__ */
|
|
1812
|
+
children: [/* @__PURE__ */ q(I, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
|
|
1744
1813
|
})]
|
|
1745
|
-
}), /* @__PURE__ */
|
|
1814
|
+
}), /* @__PURE__ */ q("div", {
|
|
1746
1815
|
className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
|
|
1747
|
-
children: je.map((e) => /* @__PURE__ */
|
|
1816
|
+
children: je.map((e) => /* @__PURE__ */ J("div", {
|
|
1748
1817
|
className: "flex items-center gap-1.5 text-xs",
|
|
1749
|
-
children: [e.done ? /* @__PURE__ */
|
|
1818
|
+
children: [e.done ? /* @__PURE__ */ q(I, {
|
|
1750
1819
|
size: 12,
|
|
1751
1820
|
className: "text-status-success-text shrink-0"
|
|
1752
|
-
}) : /* @__PURE__ */
|
|
1821
|
+
}) : /* @__PURE__ */ q(le, {
|
|
1753
1822
|
size: 12,
|
|
1754
1823
|
className: "text-status-warning-text shrink-0"
|
|
1755
|
-
}), /* @__PURE__ */
|
|
1824
|
+
}), /* @__PURE__ */ q("span", {
|
|
1756
1825
|
className: e.done ? "text-foreground" : "text-muted-foreground",
|
|
1757
1826
|
children: e.label
|
|
1758
1827
|
})]
|
|
1759
1828
|
}, e.label))
|
|
1760
1829
|
})]
|
|
1761
1830
|
}),
|
|
1762
|
-
|
|
1831
|
+
Z ? /* @__PURE__ */ J("div", {
|
|
1763
1832
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1764
|
-
children: [/* @__PURE__ */
|
|
1833
|
+
children: [/* @__PURE__ */ q(I, {
|
|
1765
1834
|
size: 16,
|
|
1766
1835
|
className: "text-success mt-0.5 shrink-0"
|
|
1767
|
-
}), /* @__PURE__ */
|
|
1836
|
+
}), /* @__PURE__ */ J("div", {
|
|
1768
1837
|
className: "text-sm",
|
|
1769
|
-
children: [/* @__PURE__ */
|
|
1838
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1770
1839
|
className: "font-medium text-success",
|
|
1771
1840
|
children: u("devportal.storeListing.published", "Published")
|
|
1772
|
-
}), n.publishedAt && /* @__PURE__ */
|
|
1841
|
+
}), n.publishedAt && /* @__PURE__ */ J("span", {
|
|
1773
1842
|
className: "text-muted-foreground ml-2",
|
|
1774
1843
|
children: [
|
|
1775
1844
|
u("devportal.storeListing.since", "since"),
|
|
@@ -1778,234 +1847,234 @@ var We = X`
|
|
|
1778
1847
|
]
|
|
1779
1848
|
})]
|
|
1780
1849
|
})]
|
|
1781
|
-
}) :
|
|
1850
|
+
}) : X ? /* @__PURE__ */ J("div", {
|
|
1782
1851
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
|
|
1783
|
-
children: [/* @__PURE__ */
|
|
1852
|
+
children: [/* @__PURE__ */ q(L, {
|
|
1784
1853
|
size: 16,
|
|
1785
1854
|
className: "text-primary mt-0.5 shrink-0"
|
|
1786
|
-
}), /* @__PURE__ */
|
|
1855
|
+
}), /* @__PURE__ */ J("div", {
|
|
1787
1856
|
className: "text-sm",
|
|
1788
1857
|
children: [
|
|
1789
|
-
/* @__PURE__ */
|
|
1858
|
+
/* @__PURE__ */ q("span", {
|
|
1790
1859
|
className: "font-medium text-primary",
|
|
1791
1860
|
children: u("devportal.storeListing.underReview", "Submitted for review")
|
|
1792
1861
|
}),
|
|
1793
|
-
n.submittedAt && /* @__PURE__ */
|
|
1862
|
+
n.submittedAt && /* @__PURE__ */ q("span", {
|
|
1794
1863
|
className: "text-muted-foreground ml-2",
|
|
1795
1864
|
children: new Date(n.submittedAt).toLocaleDateString()
|
|
1796
1865
|
}),
|
|
1797
|
-
n.reviewStatus && /* @__PURE__ */
|
|
1866
|
+
n.reviewStatus && /* @__PURE__ */ J("span", {
|
|
1798
1867
|
className: "text-muted-foreground ml-2",
|
|
1799
1868
|
children: ["· ", n.reviewStatus]
|
|
1800
1869
|
})
|
|
1801
1870
|
]
|
|
1802
1871
|
})]
|
|
1803
|
-
}) : /* @__PURE__ */
|
|
1872
|
+
}) : /* @__PURE__ */ J("div", {
|
|
1804
1873
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
1805
|
-
children: [/* @__PURE__ */
|
|
1874
|
+
children: [/* @__PURE__ */ q(le, {
|
|
1806
1875
|
size: 16,
|
|
1807
1876
|
className: "text-warning mt-0.5 shrink-0"
|
|
1808
|
-
}), /* @__PURE__ */
|
|
1877
|
+
}), /* @__PURE__ */ J("div", {
|
|
1809
1878
|
className: "text-sm",
|
|
1810
|
-
children: [/* @__PURE__ */
|
|
1879
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1811
1880
|
className: "font-medium text-warning",
|
|
1812
1881
|
children: u("devportal.storeListing.draft", "Draft")
|
|
1813
|
-
}), /* @__PURE__ */
|
|
1882
|
+
}), /* @__PURE__ */ q("span", {
|
|
1814
1883
|
className: "text-muted-foreground ml-2",
|
|
1815
1884
|
children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
1816
1885
|
})]
|
|
1817
1886
|
})]
|
|
1818
1887
|
}),
|
|
1819
|
-
Ae ? /* @__PURE__ */
|
|
1888
|
+
Ae ? /* @__PURE__ */ J("div", {
|
|
1820
1889
|
className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
|
|
1821
|
-
children: [/* @__PURE__ */
|
|
1890
|
+
children: [/* @__PURE__ */ q(z, {
|
|
1822
1891
|
size: 16,
|
|
1823
1892
|
className: "shrink-0 mt-0.5 text-muted-foreground"
|
|
1824
|
-
}), /* @__PURE__ */
|
|
1893
|
+
}), /* @__PURE__ */ J("div", {
|
|
1825
1894
|
className: "text-sm space-y-1",
|
|
1826
|
-
children: [/* @__PURE__ */
|
|
1895
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1827
1896
|
className: "font-medium",
|
|
1828
1897
|
children: u("devportal.packageManagedInVersions", "ZIP package & manifest are managed in Versions")
|
|
1829
|
-
}), /* @__PURE__ */
|
|
1898
|
+
}), /* @__PURE__ */ q("p", {
|
|
1830
1899
|
className: "text-muted-foreground",
|
|
1831
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.")
|
|
1832
1901
|
})]
|
|
1833
1902
|
})]
|
|
1834
|
-
}) : /* @__PURE__ */
|
|
1903
|
+
}) : /* @__PURE__ */ q(y, {
|
|
1835
1904
|
title: u("devportal.package", "Package"),
|
|
1836
1905
|
description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
1837
|
-
children: /* @__PURE__ */
|
|
1906
|
+
children: /* @__PURE__ */ J("div", {
|
|
1838
1907
|
className: "space-y-6",
|
|
1839
1908
|
children: [
|
|
1840
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ q(D, {
|
|
1841
1910
|
label: u("devportal.storeItemType", "Item Type"),
|
|
1842
1911
|
value: d.manifestItemType,
|
|
1843
1912
|
onChange: (e) => {
|
|
1844
1913
|
let t = e.target.value;
|
|
1845
|
-
|
|
1914
|
+
T("manifestItemType", t), He.has(t) ? T("manifestInstallType", "json") : d.manifestInstallType === "json" && T("manifestInstallType", "zip");
|
|
1846
1915
|
},
|
|
1847
|
-
options:
|
|
1916
|
+
options: We,
|
|
1848
1917
|
placeholder: u("devportal.selectItemType", "Select item type…"),
|
|
1849
1918
|
hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
|
|
1850
1919
|
}),
|
|
1851
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ J("div", {
|
|
1852
1921
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1853
|
-
children: [/* @__PURE__ */
|
|
1922
|
+
children: [/* @__PURE__ */ q(E, {
|
|
1854
1923
|
label: u("devportal.manifestDisplayName", "Display Name"),
|
|
1855
1924
|
value: d.manifestDisplayName,
|
|
1856
|
-
onChange: (e) =>
|
|
1925
|
+
onChange: (e) => T("manifestDisplayName", e.target.value),
|
|
1857
1926
|
placeholder: "My Awesome Node"
|
|
1858
|
-
}), /* @__PURE__ */
|
|
1927
|
+
}), /* @__PURE__ */ q(E, {
|
|
1859
1928
|
label: u("devportal.manifestVersion", "Version"),
|
|
1860
1929
|
value: d.manifestVersion,
|
|
1861
|
-
onChange: (e) =>
|
|
1930
|
+
onChange: (e) => T("manifestVersion", e.target.value),
|
|
1862
1931
|
placeholder: "1.0.0",
|
|
1863
1932
|
hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1864
1933
|
})]
|
|
1865
1934
|
}),
|
|
1866
|
-
|
|
1935
|
+
Ee && /* @__PURE__ */ q(re, {
|
|
1867
1936
|
label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1868
1937
|
value: d.manifestJsonContent,
|
|
1869
|
-
onChange: (e) =>
|
|
1938
|
+
onChange: (e) => T("manifestJsonContent", e.target.value),
|
|
1870
1939
|
rows: 12,
|
|
1871
1940
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1872
1941
|
hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
1873
1942
|
}),
|
|
1874
|
-
!
|
|
1943
|
+
!Ee && /* @__PURE__ */ J("div", {
|
|
1875
1944
|
className: "space-y-3",
|
|
1876
1945
|
children: [
|
|
1877
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ J("div", {
|
|
1878
1947
|
className: "flex items-center justify-between flex-wrap gap-2",
|
|
1879
|
-
children: [/* @__PURE__ */
|
|
1948
|
+
children: [/* @__PURE__ */ q("label", {
|
|
1880
1949
|
className: "text-sm font-medium",
|
|
1881
1950
|
children: u("devportal.packageFile", "Package File")
|
|
1882
|
-
}), /* @__PURE__ */
|
|
1951
|
+
}), /* @__PURE__ */ J("label", {
|
|
1883
1952
|
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
1884
|
-
children: [/* @__PURE__ */
|
|
1953
|
+
children: [/* @__PURE__ */ q("input", {
|
|
1885
1954
|
type: "checkbox",
|
|
1886
|
-
checked:
|
|
1887
|
-
onChange: (e) =>
|
|
1955
|
+
checked: De,
|
|
1956
|
+
onChange: (e) => T("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1888
1957
|
className: "h-4 w-4 rounded border-border accent-primary"
|
|
1889
|
-
}), /* @__PURE__ */
|
|
1958
|
+
}), /* @__PURE__ */ q("span", {
|
|
1890
1959
|
className: "text-text-secondary",
|
|
1891
1960
|
children: u("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
|
|
1892
1961
|
})]
|
|
1893
1962
|
})]
|
|
1894
1963
|
}),
|
|
1895
|
-
!
|
|
1896
|
-
/* @__PURE__ */
|
|
1964
|
+
!De && /* @__PURE__ */ J(K, { children: [
|
|
1965
|
+
/* @__PURE__ */ J("div", {
|
|
1897
1966
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1898
|
-
children: [/* @__PURE__ */
|
|
1967
|
+
children: [/* @__PURE__ */ q(z, {
|
|
1899
1968
|
size: 15,
|
|
1900
1969
|
className: "mt-0.5 shrink-0"
|
|
1901
|
-
}), /* @__PURE__ */
|
|
1970
|
+
}), /* @__PURE__ */ J("span", { children: [
|
|
1902
1971
|
u("devportal.zipModelHint", "Package your code and a "),
|
|
1903
|
-
/* @__PURE__ */
|
|
1972
|
+
/* @__PURE__ */ q("code", {
|
|
1904
1973
|
className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
|
|
1905
1974
|
children: "manifest.json"
|
|
1906
1975
|
}),
|
|
1907
1976
|
u("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
|
|
1908
1977
|
] })]
|
|
1909
1978
|
}),
|
|
1910
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ J("div", {
|
|
1911
1980
|
onDragOver: (e) => {
|
|
1912
|
-
e.preventDefault(),
|
|
1981
|
+
e.preventDefault(), v(!0);
|
|
1913
1982
|
},
|
|
1914
|
-
onDragLeave: () =>
|
|
1983
|
+
onDragLeave: () => v(!1),
|
|
1915
1984
|
onDrop: (e) => void Se(e),
|
|
1916
|
-
onClick: () => !
|
|
1917
|
-
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",
|
|
1918
|
-
children: [/* @__PURE__ */
|
|
1919
|
-
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,
|
|
1920
1989
|
type: "file",
|
|
1921
1990
|
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1922
1991
|
className: "hidden",
|
|
1923
1992
|
onChange: (e) => void xe(e)
|
|
1924
|
-
}),
|
|
1925
|
-
/* @__PURE__ */
|
|
1993
|
+
}), P ? /* @__PURE__ */ J(K, { children: [
|
|
1994
|
+
/* @__PURE__ */ q(B, {
|
|
1926
1995
|
size: 28,
|
|
1927
1996
|
className: "animate-spin text-primary"
|
|
1928
1997
|
}),
|
|
1929
|
-
/* @__PURE__ */
|
|
1998
|
+
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
|
|
1930
1999
|
className: "text-sm font-medium",
|
|
1931
2000
|
children: [
|
|
1932
2001
|
u("devportal.uploading", "Uploading…"),
|
|
1933
2002
|
" ",
|
|
1934
|
-
|
|
2003
|
+
F,
|
|
1935
2004
|
"%"
|
|
1936
2005
|
]
|
|
1937
|
-
}), /* @__PURE__ */
|
|
2006
|
+
}), /* @__PURE__ */ q("p", {
|
|
1938
2007
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1939
2008
|
children: u("devportal.uploadingHint", "Stored securely in your workspace")
|
|
1940
2009
|
})] }),
|
|
1941
|
-
/* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ q("div", {
|
|
1942
2011
|
className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
|
|
1943
|
-
children: /* @__PURE__ */
|
|
2012
|
+
children: /* @__PURE__ */ q("div", {
|
|
1944
2013
|
className: "h-full bg-primary transition-all",
|
|
1945
|
-
style: { width: `${
|
|
2014
|
+
style: { width: `${F}%` }
|
|
1946
2015
|
})
|
|
1947
2016
|
})
|
|
1948
|
-
] }) :
|
|
2017
|
+
] }) : ke ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(I, {
|
|
1949
2018
|
size: 28,
|
|
1950
2019
|
className: "text-status-success-text"
|
|
1951
|
-
}), /* @__PURE__ */
|
|
2020
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
1952
2021
|
className: "text-sm font-medium",
|
|
1953
|
-
children:
|
|
1954
|
-
}), /* @__PURE__ */
|
|
2022
|
+
children: ke
|
|
2023
|
+
}), /* @__PURE__ */ q("p", {
|
|
1955
2024
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1956
2025
|
children: u("devportal.clickToReplace", "Click or drag to replace")
|
|
1957
|
-
})] })] }) : /* @__PURE__ */
|
|
2026
|
+
})] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, {
|
|
1958
2027
|
size: 28,
|
|
1959
2028
|
className: "text-text-secondary"
|
|
1960
|
-
}), /* @__PURE__ */
|
|
2029
|
+
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
1961
2030
|
className: "text-sm font-medium",
|
|
1962
2031
|
children: u("devportal.dropZipHere", "Drop your .zip here")
|
|
1963
|
-
}), /* @__PURE__ */
|
|
2032
|
+
}), /* @__PURE__ */ q("p", {
|
|
1964
2033
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1965
2034
|
children: u("devportal.orClickToBrowse", "or click to browse")
|
|
1966
2035
|
})] })] })]
|
|
1967
2036
|
}),
|
|
1968
|
-
|
|
2037
|
+
de && /* @__PURE__ */ q("p", {
|
|
1969
2038
|
className: "text-xs text-status-error-text",
|
|
1970
|
-
children:
|
|
2039
|
+
children: de
|
|
1971
2040
|
})
|
|
1972
2041
|
] }),
|
|
1973
|
-
|
|
2042
|
+
De && /* @__PURE__ */ J("div", {
|
|
1974
2043
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1975
|
-
children: [/* @__PURE__ */
|
|
2044
|
+
children: [/* @__PURE__ */ q(z, {
|
|
1976
2045
|
size: 15,
|
|
1977
2046
|
className: "mt-0.5 shrink-0"
|
|
1978
|
-
}), /* @__PURE__ */
|
|
2047
|
+
}), /* @__PURE__ */ q("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
|
|
1979
2048
|
})
|
|
1980
2049
|
]
|
|
1981
2050
|
}),
|
|
1982
|
-
/* @__PURE__ */
|
|
2051
|
+
/* @__PURE__ */ J("div", {
|
|
1983
2052
|
className: "flex flex-wrap items-center gap-2 border-t pt-4",
|
|
1984
2053
|
children: [
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
ref:
|
|
2054
|
+
/* @__PURE__ */ q("input", {
|
|
2055
|
+
ref: oe,
|
|
1987
2056
|
type: "file",
|
|
1988
2057
|
accept: ".json,application/json",
|
|
1989
2058
|
className: "hidden",
|
|
1990
|
-
onChange:
|
|
2059
|
+
onChange: Te
|
|
1991
2060
|
}),
|
|
1992
|
-
/* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ q("span", {
|
|
1993
2062
|
className: "text-xs text-text-secondary mr-1",
|
|
1994
2063
|
children: "manifest.json:"
|
|
1995
2064
|
}),
|
|
1996
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ J("button", {
|
|
1997
2066
|
type: "button",
|
|
1998
|
-
onClick: () =>
|
|
2067
|
+
onClick: () => oe.current?.click(),
|
|
1999
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",
|
|
2000
|
-
children: [/* @__PURE__ */
|
|
2069
|
+
children: [/* @__PURE__ */ q(U, { size: 12 }), u("devportal.importManifest", "Import")]
|
|
2001
2070
|
}),
|
|
2002
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ J("button", {
|
|
2003
2072
|
type: "button",
|
|
2004
|
-
onClick:
|
|
2073
|
+
onClick: Y,
|
|
2005
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",
|
|
2006
|
-
children: [/* @__PURE__ */
|
|
2075
|
+
children: [/* @__PURE__ */ q(ue, { size: 12 }), u("devportal.exportManifest", "Export")]
|
|
2007
2076
|
}),
|
|
2008
|
-
/* @__PURE__ */
|
|
2077
|
+
/* @__PURE__ */ q("span", {
|
|
2009
2078
|
className: "text-xs text-text-secondary",
|
|
2010
2079
|
children: u("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
|
|
2011
2080
|
})
|
|
@@ -2014,194 +2083,194 @@ var We = X`
|
|
|
2014
2083
|
]
|
|
2015
2084
|
})
|
|
2016
2085
|
}),
|
|
2017
|
-
/* @__PURE__ */
|
|
2086
|
+
/* @__PURE__ */ q(y, {
|
|
2018
2087
|
title: u("devportal.storePresentation", "Store Presence"),
|
|
2019
2088
|
description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
2020
|
-
children: /* @__PURE__ */
|
|
2089
|
+
children: /* @__PURE__ */ J("div", {
|
|
2021
2090
|
className: "space-y-5",
|
|
2022
2091
|
children: [
|
|
2023
|
-
/* @__PURE__ */
|
|
2092
|
+
/* @__PURE__ */ J("div", {
|
|
2024
2093
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2025
|
-
children: [/* @__PURE__ */
|
|
2094
|
+
children: [/* @__PURE__ */ q(Be, {
|
|
2026
2095
|
label: u("devportal.iconUrl", "Icon"),
|
|
2027
2096
|
value: d.iconUrl,
|
|
2028
|
-
onChange: (e) =>
|
|
2097
|
+
onChange: (e) => T("iconUrl", e),
|
|
2029
2098
|
hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
2030
2099
|
aspectClass: "aspect-square",
|
|
2031
|
-
upload:
|
|
2100
|
+
upload: R,
|
|
2032
2101
|
uploading: fe,
|
|
2033
|
-
progress:
|
|
2034
|
-
error:
|
|
2035
|
-
}), /* @__PURE__ */
|
|
2102
|
+
progress: pe,
|
|
2103
|
+
error: me
|
|
2104
|
+
}), /* @__PURE__ */ q(Be, {
|
|
2036
2105
|
label: u("devportal.bannerUrl", "Banner"),
|
|
2037
2106
|
value: d.bannerUrl,
|
|
2038
|
-
onChange: (e) =>
|
|
2107
|
+
onChange: (e) => T("bannerUrl", e),
|
|
2039
2108
|
hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
2040
2109
|
aspectClass: "aspect-video",
|
|
2041
|
-
upload:
|
|
2042
|
-
uploading:
|
|
2043
|
-
progress:
|
|
2044
|
-
error:
|
|
2110
|
+
upload: V,
|
|
2111
|
+
uploading: he,
|
|
2112
|
+
progress: ge,
|
|
2113
|
+
error: H
|
|
2045
2114
|
})]
|
|
2046
2115
|
}),
|
|
2047
|
-
/* @__PURE__ */
|
|
2116
|
+
/* @__PURE__ */ q(E, {
|
|
2048
2117
|
label: u("devportal.videoUrl", "Demo Video URL"),
|
|
2049
2118
|
value: d.videoUrl,
|
|
2050
|
-
onChange: (e) =>
|
|
2119
|
+
onChange: (e) => T("videoUrl", e.target.value),
|
|
2051
2120
|
placeholder: "https://...",
|
|
2052
2121
|
hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2053
2122
|
}),
|
|
2054
|
-
/* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ q(re, {
|
|
2055
2124
|
label: u("devportal.shortDescription", "Short Description"),
|
|
2056
2125
|
value: d.shortDescription,
|
|
2057
|
-
onChange: (e) =>
|
|
2126
|
+
onChange: (e) => T("shortDescription", e.target.value),
|
|
2058
2127
|
maxLength: 200,
|
|
2059
2128
|
rows: 2,
|
|
2060
2129
|
hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2061
2130
|
}),
|
|
2062
|
-
/* @__PURE__ */
|
|
2131
|
+
/* @__PURE__ */ q(re, {
|
|
2063
2132
|
label: u("devportal.longDescription", "Full Description"),
|
|
2064
2133
|
value: d.description,
|
|
2065
|
-
onChange: (e) =>
|
|
2134
|
+
onChange: (e) => T("description", e.target.value),
|
|
2066
2135
|
rows: 5,
|
|
2067
2136
|
hint: u("devportal.fullDescHint", "Markdown supported")
|
|
2068
2137
|
}),
|
|
2069
|
-
/* @__PURE__ */
|
|
2138
|
+
/* @__PURE__ */ q(Ve, {
|
|
2070
2139
|
urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2071
|
-
onChange: (e) =>
|
|
2072
|
-
upload:
|
|
2073
|
-
uploading:
|
|
2074
|
-
progress:
|
|
2075
|
-
error:
|
|
2140
|
+
onChange: (e) => T("screenshotsText", e.join("\n")),
|
|
2141
|
+
upload: W,
|
|
2142
|
+
uploading: ye,
|
|
2143
|
+
progress: G,
|
|
2144
|
+
error: be
|
|
2076
2145
|
})
|
|
2077
2146
|
]
|
|
2078
2147
|
})
|
|
2079
2148
|
}),
|
|
2080
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ q(y, {
|
|
2081
2150
|
title: u("devportal.linksPolicies", "Links & Policies"),
|
|
2082
2151
|
description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
2083
|
-
children: /* @__PURE__ */
|
|
2152
|
+
children: /* @__PURE__ */ J("div", {
|
|
2084
2153
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2085
2154
|
children: [
|
|
2086
|
-
/* @__PURE__ */
|
|
2155
|
+
/* @__PURE__ */ q(E, {
|
|
2087
2156
|
label: u("devportal.websiteUrl", "Website"),
|
|
2088
2157
|
value: d.websiteUrl,
|
|
2089
|
-
onChange: (e) =>
|
|
2158
|
+
onChange: (e) => T("websiteUrl", e.target.value),
|
|
2090
2159
|
placeholder: "https://..."
|
|
2091
2160
|
}),
|
|
2092
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ q(E, {
|
|
2093
2162
|
label: u("devportal.documentationUrl", "Documentation"),
|
|
2094
2163
|
value: d.documentationUrl,
|
|
2095
|
-
onChange: (e) =>
|
|
2164
|
+
onChange: (e) => T("documentationUrl", e.target.value),
|
|
2096
2165
|
placeholder: "https://..."
|
|
2097
2166
|
}),
|
|
2098
|
-
/* @__PURE__ */
|
|
2167
|
+
/* @__PURE__ */ q(E, {
|
|
2099
2168
|
label: u("devportal.githubUrl", "GitHub"),
|
|
2100
2169
|
value: d.githubUrl,
|
|
2101
|
-
onChange: (e) =>
|
|
2170
|
+
onChange: (e) => T("githubUrl", e.target.value),
|
|
2102
2171
|
placeholder: "https://github.com/..."
|
|
2103
2172
|
}),
|
|
2104
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ q(E, {
|
|
2105
2174
|
label: u("devportal.supportUrl", "Support"),
|
|
2106
2175
|
value: d.supportUrl,
|
|
2107
|
-
onChange: (e) =>
|
|
2176
|
+
onChange: (e) => T("supportUrl", e.target.value),
|
|
2108
2177
|
placeholder: "https://..."
|
|
2109
2178
|
}),
|
|
2110
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ q(E, {
|
|
2111
2180
|
label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2112
2181
|
value: d.privacyPolicyUrl,
|
|
2113
|
-
onChange: (e) =>
|
|
2182
|
+
onChange: (e) => T("privacyPolicyUrl", e.target.value),
|
|
2114
2183
|
placeholder: "https://...",
|
|
2115
2184
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2116
2185
|
}),
|
|
2117
|
-
/* @__PURE__ */
|
|
2186
|
+
/* @__PURE__ */ q(E, {
|
|
2118
2187
|
label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2119
2188
|
value: d.termsOfServiceUrl,
|
|
2120
|
-
onChange: (e) =>
|
|
2189
|
+
onChange: (e) => T("termsOfServiceUrl", e.target.value),
|
|
2121
2190
|
placeholder: "https://...",
|
|
2122
2191
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2123
2192
|
})
|
|
2124
2193
|
]
|
|
2125
2194
|
})
|
|
2126
2195
|
}),
|
|
2127
|
-
/* @__PURE__ */
|
|
2196
|
+
/* @__PURE__ */ q(y, {
|
|
2128
2197
|
title: u("devportal.pricing", "Pricing"),
|
|
2129
2198
|
description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
|
|
2130
|
-
children: /* @__PURE__ */
|
|
2199
|
+
children: /* @__PURE__ */ J("div", {
|
|
2131
2200
|
className: "space-y-4",
|
|
2132
|
-
children: [/* @__PURE__ */
|
|
2201
|
+
children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
|
|
2133
2202
|
className: "mb-2 block text-sm font-medium",
|
|
2134
2203
|
children: u("devportal.pricingType", "Pricing Type")
|
|
2135
|
-
}), /* @__PURE__ */
|
|
2204
|
+
}), /* @__PURE__ */ q("div", {
|
|
2136
2205
|
className: "flex flex-wrap gap-2",
|
|
2137
|
-
children:
|
|
2206
|
+
children: Ue.map((e) => /* @__PURE__ */ q("button", {
|
|
2138
2207
|
type: "button",
|
|
2139
|
-
onClick: () =>
|
|
2208
|
+
onClick: () => T("pricingType", e.value),
|
|
2140
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"),
|
|
2141
2210
|
children: e.label
|
|
2142
2211
|
}, e.value))
|
|
2143
|
-
})] }),
|
|
2212
|
+
})] }), Oe && /* @__PURE__ */ J("div", {
|
|
2144
2213
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2145
|
-
children: [/* @__PURE__ */
|
|
2214
|
+
children: [/* @__PURE__ */ q(E, {
|
|
2146
2215
|
label: u("devportal.price", "Price"),
|
|
2147
2216
|
type: "number",
|
|
2148
2217
|
value: d.price,
|
|
2149
|
-
onChange: (e) =>
|
|
2218
|
+
onChange: (e) => T("price", e.target.value),
|
|
2150
2219
|
placeholder: "0.00"
|
|
2151
|
-
}), /* @__PURE__ */
|
|
2220
|
+
}), /* @__PURE__ */ q(E, {
|
|
2152
2221
|
label: u("devportal.currency", "Currency"),
|
|
2153
2222
|
value: d.currency,
|
|
2154
|
-
onChange: (e) =>
|
|
2223
|
+
onChange: (e) => T("currency", e.target.value),
|
|
2155
2224
|
placeholder: "USD"
|
|
2156
2225
|
})]
|
|
2157
2226
|
})]
|
|
2158
2227
|
})
|
|
2159
2228
|
}),
|
|
2160
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ J("div", {
|
|
2161
2230
|
className: "border-t pt-6 flex items-center gap-3 flex-wrap",
|
|
2162
2231
|
children: [
|
|
2163
|
-
/* @__PURE__ */
|
|
2232
|
+
/* @__PURE__ */ q("button", {
|
|
2164
2233
|
type: "button",
|
|
2165
|
-
onClick:
|
|
2166
|
-
disabled:
|
|
2234
|
+
onClick: ie,
|
|
2235
|
+
disabled: p,
|
|
2167
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",
|
|
2168
|
-
children:
|
|
2237
|
+
children: p ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
2169
2238
|
size: 16,
|
|
2170
2239
|
className: "animate-spin"
|
|
2171
|
-
}), 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")] })
|
|
2172
2241
|
}),
|
|
2173
|
-
!
|
|
2242
|
+
!Z && !X && /* @__PURE__ */ q("button", {
|
|
2174
2243
|
type: "button",
|
|
2175
|
-
onClick: () => void
|
|
2176
|
-
disabled:
|
|
2244
|
+
onClick: () => void ae(),
|
|
2245
|
+
disabled: w || p,
|
|
2177
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",
|
|
2178
|
-
children:
|
|
2247
|
+
children: w ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
2179
2248
|
size: 16,
|
|
2180
2249
|
className: "animate-spin"
|
|
2181
|
-
}), 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")] })
|
|
2182
2251
|
}),
|
|
2183
|
-
!
|
|
2252
|
+
!Z && X && /* @__PURE__ */ J("p", {
|
|
2184
2253
|
className: "text-xs text-muted-foreground flex items-center gap-1.5",
|
|
2185
|
-
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.")]
|
|
2186
2255
|
})
|
|
2187
2256
|
]
|
|
2188
2257
|
})
|
|
2189
2258
|
]
|
|
2190
2259
|
});
|
|
2191
2260
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2192
|
-
let { t: i } =
|
|
2193
|
-
return /* @__PURE__ */
|
|
2261
|
+
let { t: i } = N();
|
|
2262
|
+
return /* @__PURE__ */ J("div", {
|
|
2194
2263
|
className: "rounded-lg border bg-card p-4",
|
|
2195
2264
|
children: [
|
|
2196
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ q("p", {
|
|
2197
2266
|
className: "text-sm text-muted-foreground",
|
|
2198
2267
|
children: e
|
|
2199
2268
|
}),
|
|
2200
|
-
/* @__PURE__ */
|
|
2269
|
+
/* @__PURE__ */ q("p", {
|
|
2201
2270
|
className: "text-2xl font-bold",
|
|
2202
2271
|
children: n
|
|
2203
2272
|
}),
|
|
2204
|
-
r !== void 0 && /* @__PURE__ */
|
|
2273
|
+
r !== void 0 && /* @__PURE__ */ J("p", {
|
|
2205
2274
|
className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
|
|
2206
2275
|
children: [
|
|
2207
2276
|
r > 0 ? "+" : "",
|
|
@@ -2215,13 +2284,13 @@ var We = X`
|
|
|
2215
2284
|
})
|
|
2216
2285
|
]
|
|
2217
2286
|
});
|
|
2218
|
-
}, $ = ({ label: e, url: t }) => /* @__PURE__ */
|
|
2287
|
+
}, $ = ({ label: e, url: t }) => /* @__PURE__ */ J("a", {
|
|
2219
2288
|
href: t,
|
|
2220
2289
|
target: "_blank",
|
|
2221
2290
|
rel: "noopener noreferrer",
|
|
2222
2291
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2223
|
-
children: [/* @__PURE__ */
|
|
2224
|
-
}),
|
|
2292
|
+
children: [/* @__PURE__ */ q(R, { size: 14 }), e]
|
|
2293
|
+
}), Ye = [
|
|
2225
2294
|
{
|
|
2226
2295
|
id: "auth",
|
|
2227
2296
|
label: "Authentication",
|
|
@@ -2293,14 +2362,14 @@ var We = X`
|
|
|
2293
2362
|
description: "Access control configuration"
|
|
2294
2363
|
}
|
|
2295
2364
|
];
|
|
2296
|
-
function
|
|
2297
|
-
let t = Object.fromEntries(
|
|
2365
|
+
function Xe(e) {
|
|
2366
|
+
let t = Object.fromEntries(Ye.map((e) => [e.id, "none"]));
|
|
2298
2367
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2299
2368
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2300
2369
|
return t;
|
|
2301
2370
|
}
|
|
2302
|
-
var
|
|
2303
|
-
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) => {
|
|
2304
2373
|
s(!1), r((n) => ({
|
|
2305
2374
|
...n,
|
|
2306
2375
|
[e]: t
|
|
@@ -2331,41 +2400,41 @@ var Ye = ({ app: e }) => {
|
|
|
2331
2400
|
"read",
|
|
2332
2401
|
"write"
|
|
2333
2402
|
];
|
|
2334
|
-
return /* @__PURE__ */
|
|
2403
|
+
return /* @__PURE__ */ q(y, {
|
|
2335
2404
|
title: "Permissions",
|
|
2336
2405
|
description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
|
|
2337
|
-
children: /* @__PURE__ */
|
|
2406
|
+
children: /* @__PURE__ */ J("div", {
|
|
2338
2407
|
className: "space-y-4",
|
|
2339
2408
|
children: [
|
|
2340
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ q("div", {
|
|
2341
2410
|
className: "overflow-x-auto rounded-lg border border-border",
|
|
2342
|
-
children: /* @__PURE__ */
|
|
2411
|
+
children: /* @__PURE__ */ J("table", {
|
|
2343
2412
|
className: "w-full text-sm",
|
|
2344
|
-
children: [/* @__PURE__ */
|
|
2413
|
+
children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", {
|
|
2345
2414
|
className: "border-b border-border bg-muted/50",
|
|
2346
|
-
children: [/* @__PURE__ */
|
|
2415
|
+
children: [/* @__PURE__ */ q("th", {
|
|
2347
2416
|
className: "px-4 py-3 text-left font-medium text-muted-foreground w-1/2",
|
|
2348
2417
|
children: "Resource"
|
|
2349
|
-
}), f.map((e) => /* @__PURE__ */
|
|
2418
|
+
}), f.map((e) => /* @__PURE__ */ q("th", {
|
|
2350
2419
|
className: "px-4 py-3 text-center font-medium text-muted-foreground",
|
|
2351
2420
|
children: d[e]
|
|
2352
2421
|
}, e))]
|
|
2353
|
-
}) }), /* @__PURE__ */
|
|
2422
|
+
}) }), /* @__PURE__ */ q("tbody", {
|
|
2354
2423
|
className: "divide-y divide-border",
|
|
2355
|
-
children:
|
|
2424
|
+
children: Ye.map((e) => /* @__PURE__ */ J("tr", {
|
|
2356
2425
|
className: "hover:bg-muted/30 transition-colors",
|
|
2357
|
-
children: [/* @__PURE__ */
|
|
2426
|
+
children: [/* @__PURE__ */ J("td", {
|
|
2358
2427
|
className: "px-4 py-3",
|
|
2359
|
-
children: [/* @__PURE__ */
|
|
2428
|
+
children: [/* @__PURE__ */ q("p", {
|
|
2360
2429
|
className: "font-medium text-foreground",
|
|
2361
2430
|
children: e.label
|
|
2362
|
-
}), /* @__PURE__ */
|
|
2431
|
+
}), /* @__PURE__ */ q("p", {
|
|
2363
2432
|
className: "text-xs text-muted-foreground",
|
|
2364
2433
|
children: e.description
|
|
2365
2434
|
})]
|
|
2366
|
-
}), f.map((t) => /* @__PURE__ */
|
|
2435
|
+
}), f.map((t) => /* @__PURE__ */ q("td", {
|
|
2367
2436
|
className: "px-4 py-3 text-center",
|
|
2368
|
-
children: /* @__PURE__ */
|
|
2437
|
+
children: /* @__PURE__ */ q("input", {
|
|
2369
2438
|
type: "radio",
|
|
2370
2439
|
name: `perm-${e.id}`,
|
|
2371
2440
|
value: t,
|
|
@@ -2378,27 +2447,27 @@ var Ye = ({ app: e }) => {
|
|
|
2378
2447
|
})]
|
|
2379
2448
|
})
|
|
2380
2449
|
}),
|
|
2381
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ J("div", {
|
|
2382
2451
|
className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
|
|
2383
|
-
children: [/* @__PURE__ */
|
|
2452
|
+
children: [/* @__PURE__ */ q(z, {
|
|
2384
2453
|
size: 14,
|
|
2385
2454
|
className: "flex-shrink-0 mt-0.5"
|
|
2386
|
-
}), /* @__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."] })]
|
|
2387
2456
|
}),
|
|
2388
|
-
/* @__PURE__ */
|
|
2457
|
+
/* @__PURE__ */ J("div", {
|
|
2389
2458
|
className: "flex items-center justify-end gap-3",
|
|
2390
|
-
children: [o && /* @__PURE__ */
|
|
2459
|
+
children: [o && /* @__PURE__ */ J("span", {
|
|
2391
2460
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2392
|
-
children: [/* @__PURE__ */
|
|
2393
|
-
}), /* @__PURE__ */
|
|
2461
|
+
children: [/* @__PURE__ */ q(I, { size: 14 }), "Saved"]
|
|
2462
|
+
}), /* @__PURE__ */ J("button", {
|
|
2394
2463
|
type: "button",
|
|
2395
2464
|
onClick: () => void u(),
|
|
2396
2465
|
disabled: i,
|
|
2397
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",
|
|
2398
|
-
children: [i ? /* @__PURE__ */
|
|
2467
|
+
children: [i ? /* @__PURE__ */ q(B, {
|
|
2399
2468
|
size: 14,
|
|
2400
2469
|
className: "animate-spin"
|
|
2401
|
-
}) : /* @__PURE__ */
|
|
2470
|
+
}) : /* @__PURE__ */ q(H, { size: 14 }), "Save Permissions"]
|
|
2402
2471
|
})]
|
|
2403
2472
|
})
|
|
2404
2473
|
]
|
|
@@ -2406,6 +2475,6 @@ var Ye = ({ app: e }) => {
|
|
|
2406
2475
|
});
|
|
2407
2476
|
};
|
|
2408
2477
|
//#endregion
|
|
2409
|
-
export {
|
|
2478
|
+
export { Ae as ApplicationDetailPage };
|
|
2410
2479
|
|
|
2411
2480
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|