@burdenoff/microfe-devportal 2026.624.17 → 2026.624.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/ApplicationDetailPage.js +336 -324
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +227 -223
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/generated/global-operations.js +214 -203
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,27 +2,27 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { LoadingState as n } from "../components/LoadingState.js";
|
|
4
4
|
import { EmptyState as r } from "../components/EmptyState.js";
|
|
5
|
-
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s,
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { APP_TYPE_LABELS as
|
|
8
|
-
import { FeaturedBadge as
|
|
9
|
-
import { SelectionCheckbox as
|
|
10
|
-
import { nativeNotify as
|
|
5
|
+
import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetMyPublisherQuery as c, useGetPublisherProductsQuery as l, useGetStoreInstallationsQuery as u, useGetWebhooksQuery as d, useGetWorkspaceInstallationQuery as f, useInstallApplicationMutation as p, useRevokeDelegationMutation as m, useRotateAppSecretMutation as h, useSubmitApplicationMutation as g, useUninstallApplicationMutation as _, useUpdateApplicationMutation as v } from "../../generated/global-operations.js";
|
|
6
|
+
import { PageLayout as y, PageSection as b } from "../components/PageLayout.js";
|
|
7
|
+
import { APP_TYPE_LABELS as ee } from "../utils/constants.js";
|
|
8
|
+
import { FeaturedBadge as x, StatusBadge as S, VerifiedBadge as te } from "../components/StatusBadge.js";
|
|
9
|
+
import { SelectionCheckbox as C } from "../components/SelectionCheckbox.js";
|
|
10
|
+
import { nativeNotify as w } from "../../utils/nativeBridge.js";
|
|
11
11
|
import { NewSecretAlert as ne } from "../components/SecretDisplay.js";
|
|
12
|
-
import { DataTable as
|
|
13
|
-
import { InputField as
|
|
14
|
-
import { ConfirmDialog as
|
|
12
|
+
import { DataTable as T, DetailList as E } from "../components/DataTable.js";
|
|
13
|
+
import { InputField as D, SelectField as re, TextareaField as ie } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as O } from "../components/ConfirmDialog.js";
|
|
15
15
|
import { GrantDelegationModal as ae } from "../components/GrantDelegationModal.js";
|
|
16
16
|
import { DEVPORTAL_PERMISSIONS as oe } from "../constants/permissions.js";
|
|
17
17
|
import { useDevportalPermission as se } from "../hooks/usePermission.js";
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as le, AppWindow as
|
|
22
|
-
import { useParams as
|
|
18
|
+
import { usePackageUpload as k } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as A, useEffect as ce, useMemo as j, useRef as M, useState as N } from "react";
|
|
20
|
+
import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
+
import { AlertCircle as le, AppWindow as F, BarChart3 as I, CheckCircle as L, Clock as ue, Download as de, Edit as fe, ExternalLink as R, FlaskConical as pe, Info as z, Key as me, Loader2 as B, MoreHorizontal as he, Plus as V, Power as ge, RefreshCw as _e, SendHorizontal as ve, Shield as H, Store as ye, Upload as U, Users as W, Webhook as G, X as be, XCircle as xe } from "lucide-react";
|
|
22
|
+
import { useParams as Se } from "react-router-dom";
|
|
23
23
|
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
24
|
-
import { gql as
|
|
25
|
-
import { useMutation as
|
|
24
|
+
import { gql as Ce } from "@apollo/client";
|
|
25
|
+
import { useMutation as we, useQuery as Y } from "@apollo/client/react";
|
|
26
26
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
27
27
|
function Te(e) {
|
|
28
28
|
return e ? {
|
|
@@ -79,7 +79,7 @@ function Te(e) {
|
|
|
79
79
|
updatedAt: e.updatedAt
|
|
80
80
|
} : null;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ee(e) {
|
|
83
83
|
return {
|
|
84
84
|
id: e.id,
|
|
85
85
|
applicationId: e.applicationId,
|
|
@@ -103,7 +103,7 @@ function Y(e) {
|
|
|
103
103
|
updatedAt: e.updatedAt
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function De(e) {
|
|
107
107
|
return {
|
|
108
108
|
id: e.id,
|
|
109
109
|
applicationId: e.applicationId,
|
|
@@ -119,7 +119,7 @@ function Ee(e) {
|
|
|
119
119
|
createdAt: e.createdAt
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function Oe(e) {
|
|
123
123
|
return {
|
|
124
124
|
id: e.id,
|
|
125
125
|
appId: e.appId,
|
|
@@ -141,11 +141,11 @@ function De(e) {
|
|
|
141
141
|
revokedBy: e.revokedBy || void 0
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var ke = [
|
|
145
145
|
{
|
|
146
146
|
id: "overview",
|
|
147
147
|
label: "Overview",
|
|
148
|
-
icon:
|
|
148
|
+
icon: F
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
id: "permissions",
|
|
@@ -155,7 +155,7 @@ var Oe = [
|
|
|
155
155
|
{
|
|
156
156
|
id: "webhooks",
|
|
157
157
|
label: "Webhooks",
|
|
158
|
-
icon:
|
|
158
|
+
icon: G
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
id: "delegations",
|
|
@@ -165,7 +165,7 @@ var Oe = [
|
|
|
165
165
|
{
|
|
166
166
|
id: "analytics",
|
|
167
167
|
label: "Analytics",
|
|
168
|
-
icon:
|
|
168
|
+
icon: I
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
id: "playground",
|
|
@@ -175,9 +175,9 @@ var Oe = [
|
|
|
175
175
|
{
|
|
176
176
|
id: "store-listing",
|
|
177
177
|
label: "Marketplace Listing",
|
|
178
|
-
icon:
|
|
178
|
+
icon: ye
|
|
179
179
|
}
|
|
180
|
-
],
|
|
180
|
+
], Ae = {
|
|
181
181
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
182
182
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
183
183
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
@@ -199,61 +199,61 @@ var Oe = [
|
|
|
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: l } =
|
|
202
|
+
}), je = () => {
|
|
203
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: l } = P(), u = (e, t) => {
|
|
204
204
|
let n = l(e);
|
|
205
205
|
return n === e ? t : n;
|
|
206
|
-
}, { allowed:
|
|
207
|
-
variables: { id:
|
|
208
|
-
skip: !
|
|
209
|
-
}), [
|
|
206
|
+
}, { allowed: d } = se(oe.APP_UPDATE), { allowed: m } = se(oe.APP_DELETE), { appId: g } = Se(), [v, b] = N("overview"), [C, T] = N(!1), [E, D] = N(!1), [re, ie] = N(null), [k, ce] = N(!1), { data: j, loading: M, error: I } = s({
|
|
207
|
+
variables: { id: g },
|
|
208
|
+
skip: !g
|
|
209
|
+
}), [L, { loading: de }] = h(), [R, { loading: z }] = a(), [me, { loading: he }] = p(), [V, { loading: H }] = _(), { data: ye, refetch: U } = f({
|
|
210
210
|
variables: {
|
|
211
|
-
applicationId:
|
|
211
|
+
applicationId: g,
|
|
212
212
|
workspaceId: c ?? void 0
|
|
213
213
|
},
|
|
214
|
-
skip: !c || !
|
|
214
|
+
skip: !c || !g,
|
|
215
215
|
fetchPolicy: "cache-and-network"
|
|
216
|
-
}),
|
|
216
|
+
}), W = ye?.appInstallations?.edges?.[0]?.node ?? null, G = A((e) => {
|
|
217
217
|
i?.(`${o}${e}`);
|
|
218
|
-
}, [i, o]),
|
|
218
|
+
}, [i, o]), be = A(async () => {
|
|
219
219
|
let e = j?.application?.appId;
|
|
220
220
|
if (e) try {
|
|
221
|
-
let t = (await
|
|
222
|
-
t &&
|
|
221
|
+
let t = (await L({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
222
|
+
t && ie(t), T(!1);
|
|
223
223
|
} catch {}
|
|
224
|
-
}, [j?.application?.appId,
|
|
225
|
-
if (
|
|
226
|
-
await
|
|
224
|
+
}, [j?.application?.appId, L]), K = A(async () => {
|
|
225
|
+
if (g) try {
|
|
226
|
+
await R({ variables: { id: g } }), D(!1), G("/apps");
|
|
227
227
|
} catch {}
|
|
228
228
|
}, [
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
g,
|
|
230
|
+
R,
|
|
231
231
|
G
|
|
232
|
-
]), Ce =
|
|
233
|
-
if (!(!
|
|
232
|
+
]), Ce = A(async () => {
|
|
233
|
+
if (!(!g || !c)) try {
|
|
234
234
|
await me({ variables: { input: {
|
|
235
|
-
applicationId:
|
|
235
|
+
applicationId: g,
|
|
236
236
|
scope: "WORKSPACE",
|
|
237
237
|
workspaceId: c,
|
|
238
238
|
autoUpdate: !1
|
|
239
|
-
} } }),
|
|
239
|
+
} } }), U(), w("success");
|
|
240
240
|
} catch (e) {
|
|
241
|
-
console.error("[DevPortal] Test in Workspace failed:", e),
|
|
241
|
+
console.error("[DevPortal] Test in Workspace failed:", e), w("error");
|
|
242
242
|
}
|
|
243
243
|
}, [
|
|
244
|
-
|
|
244
|
+
g,
|
|
245
245
|
c,
|
|
246
246
|
me,
|
|
247
|
-
|
|
248
|
-
]), we =
|
|
247
|
+
U
|
|
248
|
+
]), we = A(async (e) => {
|
|
249
249
|
try {
|
|
250
|
-
await
|
|
250
|
+
await V({ variables: { id: e } }), U(), w("success");
|
|
251
251
|
} catch {
|
|
252
|
-
|
|
252
|
+
w("error");
|
|
253
253
|
}
|
|
254
|
-
}, [
|
|
255
|
-
if (
|
|
256
|
-
if (I) return /* @__PURE__ */ q(
|
|
254
|
+
}, [V, U]);
|
|
255
|
+
if (M && !j) return /* @__PURE__ */ q(n, { message: u("devportal.loadingApplication", "Loading application...") });
|
|
256
|
+
if (I) return /* @__PURE__ */ q(y, {
|
|
257
257
|
title: u("devportal.error", "Error"),
|
|
258
258
|
backLink: `${o}/apps`,
|
|
259
259
|
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
@@ -276,7 +276,7 @@ var Oe = [
|
|
|
276
276
|
})
|
|
277
277
|
});
|
|
278
278
|
let Y = Te(j?.application);
|
|
279
|
-
return Y ? /* @__PURE__ */ J(
|
|
279
|
+
return Y ? /* @__PURE__ */ J(y, {
|
|
280
280
|
title: Y.name,
|
|
281
281
|
description: Y.shortDescription,
|
|
282
282
|
backLink: `${o}/apps`,
|
|
@@ -289,37 +289,37 @@ var Oe = [
|
|
|
289
289
|
disabled: !Y.appId,
|
|
290
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__ */ q(
|
|
292
|
+
children: [/* @__PURE__ */ q(_e, { size: 16 }), u("devportal.rotateSecret", "Rotate Secret")]
|
|
293
293
|
}),
|
|
294
294
|
/* @__PURE__ */ J("button", {
|
|
295
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__ */ q(
|
|
297
|
+
children: [/* @__PURE__ */ q(ue, { size: 16 }), u("devportal.versions", "Versions")]
|
|
298
298
|
}),
|
|
299
299
|
Y.status !== "PUBLISHED" && /* @__PURE__ */ J("button", {
|
|
300
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__ */ q(
|
|
302
|
+
children: [/* @__PURE__ */ q(ve, { size: 16 }), u("devportal.submitForReview", "Submit for Review")]
|
|
303
303
|
}),
|
|
304
|
-
Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && (
|
|
305
|
-
onClick: () => void we(
|
|
306
|
-
disabled:
|
|
304
|
+
Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && (W ? /* @__PURE__ */ J("button", {
|
|
305
|
+
onClick: () => void we(W.id),
|
|
306
|
+
disabled: H || !c,
|
|
307
307
|
title: u("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
|
|
308
308
|
className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
|
|
309
|
-
children: [
|
|
309
|
+
children: [H ? /* @__PURE__ */ q(B, {
|
|
310
310
|
size: 16,
|
|
311
311
|
className: "animate-spin"
|
|
312
|
-
}) : /* @__PURE__ */ q(
|
|
312
|
+
}) : /* @__PURE__ */ q(xe, { size: 16 }), u("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
|
|
313
313
|
}) : /* @__PURE__ */ J("button", {
|
|
314
314
|
onClick: () => void Ce(),
|
|
315
|
-
disabled:
|
|
315
|
+
disabled: he || !c,
|
|
316
316
|
"aria-disabled": !c,
|
|
317
317
|
title: c ? u("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : u("devportal.noWorkspaceContext", "No workspace context available"),
|
|
318
318
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
|
|
319
|
-
children: [
|
|
319
|
+
children: [he ? /* @__PURE__ */ q(B, {
|
|
320
320
|
size: 16,
|
|
321
321
|
className: "animate-spin"
|
|
322
|
-
}) : /* @__PURE__ */ q(
|
|
322
|
+
}) : /* @__PURE__ */ q(pe, { size: 16 }), u("devportal.testInWorkspace", "Test in Workspace")]
|
|
323
323
|
})),
|
|
324
324
|
Y.appType === "NODE" && /* @__PURE__ */ J("button", {
|
|
325
325
|
onClick: () => i?.(`/workflows/new?nodeId=${Y.id}`),
|
|
@@ -327,21 +327,21 @@ var Oe = [
|
|
|
327
327
|
"aria-disabled": !c,
|
|
328
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__ */ q(
|
|
330
|
+
children: [/* @__PURE__ */ q(pe, { size: 16 }), u("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
|
|
331
331
|
}),
|
|
332
332
|
/* @__PURE__ */ J("button", {
|
|
333
333
|
onClick: () => G(`/apps/${Y.id}/edit`),
|
|
334
|
-
disabled: !
|
|
335
|
-
"aria-disabled": !
|
|
334
|
+
disabled: !d,
|
|
335
|
+
"aria-disabled": !d,
|
|
336
336
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
337
|
-
children: [/* @__PURE__ */ q(
|
|
337
|
+
children: [/* @__PURE__ */ q(fe, { size: 16 }), u("devportal.editApp", "Edit App")]
|
|
338
338
|
}),
|
|
339
339
|
/* @__PURE__ */ J("button", {
|
|
340
340
|
onClick: () => D(!0),
|
|
341
|
-
disabled: !
|
|
342
|
-
"aria-disabled": !
|
|
341
|
+
disabled: !m,
|
|
342
|
+
"aria-disabled": !m,
|
|
343
343
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
344
|
-
children: [/* @__PURE__ */ q(
|
|
344
|
+
children: [/* @__PURE__ */ q(ge, { size: 16 }), u("devportal.deactivate", "Deactivate")]
|
|
345
345
|
})
|
|
346
346
|
]
|
|
347
347
|
}),
|
|
@@ -350,24 +350,24 @@ var Oe = [
|
|
|
350
350
|
title: u("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
351
351
|
secret: re,
|
|
352
352
|
description: u("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
353
|
-
onDismiss: () =>
|
|
353
|
+
onDismiss: () => ie(null)
|
|
354
354
|
}),
|
|
355
355
|
/* @__PURE__ */ J("div", {
|
|
356
356
|
className: "flex flex-wrap items-center gap-2",
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */ q(
|
|
358
|
+
/* @__PURE__ */ q(S, {
|
|
359
359
|
status: Y.status,
|
|
360
360
|
type: "app"
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */ q(
|
|
362
|
+
/* @__PURE__ */ q(S, {
|
|
363
363
|
status: Y.visibility,
|
|
364
364
|
type: "app"
|
|
365
365
|
}),
|
|
366
|
-
Y.isVerified && /* @__PURE__ */ q(
|
|
367
|
-
Y.isFeatured && /* @__PURE__ */ q(
|
|
366
|
+
Y.isVerified && /* @__PURE__ */ q(te, { verified: !0 }),
|
|
367
|
+
Y.isFeatured && /* @__PURE__ */ q(x, {}),
|
|
368
368
|
/* @__PURE__ */ q("span", {
|
|
369
369
|
className: "text-sm text-muted-foreground",
|
|
370
|
-
children:
|
|
370
|
+
children: ee[Y.appType] || Y.appType
|
|
371
371
|
})
|
|
372
372
|
]
|
|
373
373
|
}),
|
|
@@ -377,15 +377,15 @@ var Oe = [
|
|
|
377
377
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
378
378
|
role: "tablist",
|
|
379
379
|
"aria-label": u("devportal.applicationSections", "Application sections"),
|
|
380
|
-
children:
|
|
380
|
+
children: ke.filter((e) => !((Y.appType === "NODE" || Y.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
|
|
381
381
|
let n = e.icon;
|
|
382
382
|
return /* @__PURE__ */ J("button", {
|
|
383
383
|
id: `application-tab-${e.id}`,
|
|
384
384
|
role: "tab",
|
|
385
|
-
"aria-selected":
|
|
385
|
+
"aria-selected": v === e.id,
|
|
386
386
|
"aria-controls": `application-panel-${e.id}`,
|
|
387
|
-
onClick: () =>
|
|
388
|
-
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
387
|
+
onClick: () => b(e.id),
|
|
388
|
+
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", v === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
|
|
389
389
|
children: [/* @__PURE__ */ q(n, { size: 16 }), e.label]
|
|
390
390
|
}, e.id);
|
|
391
391
|
})
|
|
@@ -393,100 +393,100 @@ var Oe = [
|
|
|
393
393
|
}),
|
|
394
394
|
/* @__PURE__ */ J("div", {
|
|
395
395
|
className: "mt-6",
|
|
396
|
-
id: `application-panel-${
|
|
396
|
+
id: `application-panel-${v}`,
|
|
397
397
|
role: "tabpanel",
|
|
398
|
-
"aria-labelledby": `application-tab-${
|
|
398
|
+
"aria-labelledby": `application-tab-${v}`,
|
|
399
399
|
tabIndex: 0,
|
|
400
400
|
children: [
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
v === "overview" && /* @__PURE__ */ q(Fe, { app: Y }),
|
|
402
|
+
v === "permissions" && /* @__PURE__ */ q($e, { app: Y }),
|
|
403
|
+
v === "webhooks" && /* @__PURE__ */ q(Me, {
|
|
404
404
|
appId: Y.id,
|
|
405
405
|
onNavigate: G
|
|
406
406
|
}),
|
|
407
|
-
|
|
407
|
+
v === "delegations" && /* @__PURE__ */ q(Ne, {
|
|
408
408
|
authAppId: Y.appId || void 0,
|
|
409
409
|
appName: Y.name,
|
|
410
|
-
onGrantDelegation: () =>
|
|
410
|
+
onGrantDelegation: () => ce(!0),
|
|
411
411
|
onNavigate: G
|
|
412
412
|
}),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
v === "analytics" && /* @__PURE__ */ q(Pe, { app: Y }),
|
|
414
|
+
v === "playground" && /* @__PURE__ */ q(Be, { app: Y }),
|
|
415
|
+
v === "store-listing" && /* @__PURE__ */ q(Xe, { app: Y })
|
|
416
416
|
]
|
|
417
417
|
}),
|
|
418
|
-
/* @__PURE__ */ q(
|
|
419
|
-
open:
|
|
418
|
+
/* @__PURE__ */ q(O, {
|
|
419
|
+
open: C,
|
|
420
420
|
onOpenChange: T,
|
|
421
|
-
onConfirm:
|
|
421
|
+
onConfirm: be,
|
|
422
422
|
title: u("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
423
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
424
|
confirmLabel: u("devportal.rotateSecret", "Rotate Secret"),
|
|
425
425
|
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
426
426
|
variant: "warning",
|
|
427
|
-
loading:
|
|
427
|
+
loading: de
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */ q(
|
|
429
|
+
/* @__PURE__ */ q(O, {
|
|
430
430
|
open: E,
|
|
431
431
|
onOpenChange: D,
|
|
432
|
-
onConfirm:
|
|
432
|
+
onConfirm: K,
|
|
433
433
|
title: u("devportal.deactivateApplication", "Deactivate Application"),
|
|
434
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
435
|
confirmLabel: u("devportal.deactivate", "Deactivate"),
|
|
436
436
|
cancelLabel: u("devportal.cancel", "Cancel"),
|
|
437
437
|
variant: "destructive",
|
|
438
|
-
loading:
|
|
438
|
+
loading: z
|
|
439
439
|
}),
|
|
440
440
|
/* @__PURE__ */ q(ae, {
|
|
441
|
-
open:
|
|
442
|
-
onOpenChange:
|
|
441
|
+
open: k,
|
|
442
|
+
onOpenChange: ce,
|
|
443
443
|
appId: Y.appId || "",
|
|
444
444
|
appName: Y.name,
|
|
445
445
|
appScopes: Y.scopes?.map((e) => e.scope) ?? [],
|
|
446
446
|
onSuccess: () => {
|
|
447
|
-
|
|
447
|
+
ce(!1);
|
|
448
448
|
}
|
|
449
449
|
})
|
|
450
450
|
]
|
|
451
|
-
}) : /* @__PURE__ */ q(
|
|
451
|
+
}) : /* @__PURE__ */ q(y, {
|
|
452
452
|
title: u("devportal.notFound", "Not Found"),
|
|
453
453
|
backLink: `${o}/apps`,
|
|
454
454
|
backLabel: u("devportal.backToApplications", "Back to Applications"),
|
|
455
455
|
children: /* @__PURE__ */ q(r, {
|
|
456
|
-
icon: /* @__PURE__ */ q(
|
|
456
|
+
icon: /* @__PURE__ */ q(F, { size: 48 }),
|
|
457
457
|
title: u("devportal.applicationNotFound", "Application not found"),
|
|
458
458
|
description: u("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
459
459
|
})
|
|
460
460
|
});
|
|
461
|
-
},
|
|
462
|
-
let { t: n } =
|
|
461
|
+
}, Me = ({ appId: e, onNavigate: t }) => {
|
|
462
|
+
let { t: n } = P(), r = (e, t) => {
|
|
463
463
|
let r = n(e);
|
|
464
464
|
return r === e ? t : r;
|
|
465
|
-
}, { data: i, loading: a, error: o } =
|
|
466
|
-
return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(
|
|
465
|
+
}, { data: i, loading: a, error: o } = d({ variables: { applicationId: e } });
|
|
466
|
+
return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(Ie, {
|
|
467
467
|
appId: e,
|
|
468
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
468
|
+
webhooks: (i?.webhooks ?? []).map(Ee),
|
|
469
469
|
onNavigate: t
|
|
470
470
|
});
|
|
471
|
-
},
|
|
472
|
-
let { t: o } =
|
|
471
|
+
}, Ne = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
472
|
+
let { t: o } = P(), s = (e, t) => {
|
|
473
473
|
let n = o(e);
|
|
474
474
|
return n === e ? t : n;
|
|
475
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] =
|
|
475
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, ee] = N(null), x = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Oe) : [], [e, c]), S = j(() => x.filter((e) => e.status === "ACTIVE"), [x]), te = j(() => S.filter((e) => v.has(e.id)), [S, v]), C = S.length > 0 && S.every((e) => v.has(e.id)), w = S.some((e) => v.has(e.id)) && !C, ne = A((e, t) => {
|
|
476
476
|
y((n) => {
|
|
477
477
|
let r = new Set(n);
|
|
478
478
|
return t ? r.add(e) : r.delete(e), r;
|
|
479
479
|
});
|
|
480
|
-
}, []), T =
|
|
480
|
+
}, []), T = A((e) => {
|
|
481
481
|
y((t) => {
|
|
482
482
|
let n = new Set(t);
|
|
483
483
|
return S.forEach((t) => {
|
|
484
484
|
e ? n.add(t.id) : n.delete(t.id);
|
|
485
485
|
}), n;
|
|
486
486
|
});
|
|
487
|
-
}, [S]), E =
|
|
487
|
+
}, [S]), E = A(() => {
|
|
488
488
|
y(/* @__PURE__ */ new Set());
|
|
489
|
-
}, []), D =
|
|
489
|
+
}, []), D = A(async (e) => {
|
|
490
490
|
_(!0);
|
|
491
491
|
try {
|
|
492
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;
|
|
@@ -510,29 +510,29 @@ var Oe = [
|
|
|
510
510
|
})]
|
|
511
511
|
})
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */ q(
|
|
513
|
+
/* @__PURE__ */ q(Le, {
|
|
514
514
|
appName: t,
|
|
515
515
|
delegations: x,
|
|
516
516
|
onGrantDelegation: n,
|
|
517
517
|
onRevokeDelegation: (e) => h([e]),
|
|
518
518
|
selectedDelegationIds: v,
|
|
519
|
-
onToggleSelectDelegation:
|
|
519
|
+
onToggleSelectDelegation: ne,
|
|
520
520
|
onToggleAllDelegations: T,
|
|
521
521
|
onClearSelection: E,
|
|
522
522
|
onRevokeSelected: () => h(te.map((e) => e.id)),
|
|
523
523
|
allVisibleSelected: C,
|
|
524
|
-
partiallySelected:
|
|
524
|
+
partiallySelected: w
|
|
525
525
|
}),
|
|
526
|
-
/* @__PURE__ */ q(
|
|
527
|
-
open:
|
|
526
|
+
/* @__PURE__ */ q(O, {
|
|
527
|
+
open: p.length > 0,
|
|
528
528
|
onOpenChange: (e) => {
|
|
529
529
|
e || h([]);
|
|
530
530
|
},
|
|
531
531
|
onConfirm: () => {
|
|
532
|
-
|
|
532
|
+
p.length > 0 && D(p);
|
|
533
533
|
},
|
|
534
|
-
title:
|
|
535
|
-
description:
|
|
534
|
+
title: p.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
535
|
+
description: p.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${p.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
|
|
536
536
|
confirmLabel: s("devportal.revoke", "Revoke"),
|
|
537
537
|
cancelLabel: s("devportal.cancel", "Cancel"),
|
|
538
538
|
variant: "destructive",
|
|
@@ -548,21 +548,25 @@ var Oe = [
|
|
|
548
548
|
children: [/* @__PURE__ */ q(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
549
549
|
})
|
|
550
550
|
});
|
|
551
|
-
},
|
|
552
|
-
let { t } =
|
|
551
|
+
}, Pe = ({ app: e }) => {
|
|
552
|
+
let { t } = P(), n = (e, n) => {
|
|
553
553
|
let r = t(e);
|
|
554
554
|
return r === e ? n : r;
|
|
555
|
-
}, r = e.appType === "NODE" || e.appType === "WORKFLOW", i =
|
|
555
|
+
}, r = e.appType === "NODE" || e.appType === "WORKFLOW", i = j(() => /* @__PURE__ */ new Date(), []), a = j(() => {
|
|
556
556
|
let e = new Date(i);
|
|
557
557
|
return e.setDate(e.getDate() - 30), e;
|
|
558
558
|
}, [i]), { data: s } = c({
|
|
559
559
|
fetchPolicy: "cache-first",
|
|
560
560
|
skip: !r
|
|
561
|
-
}),
|
|
562
|
-
variables: {
|
|
563
|
-
|
|
561
|
+
}), d = s?.myPublisher?.id ?? null, { data: f } = l({
|
|
562
|
+
variables: { publisherId: d ?? "" },
|
|
563
|
+
fetchPolicy: "cache-first",
|
|
564
|
+
skip: !r || !d
|
|
565
|
+
}), p = f?.products?.find((t) => t.productId === e.id)?.id ?? null, { data: m, loading: h } = u({
|
|
566
|
+
variables: { productId: p ?? "" },
|
|
567
|
+
skip: !r || !p,
|
|
564
568
|
fetchPolicy: "cache-and-network"
|
|
565
|
-
}), { data:
|
|
569
|
+
}), { data: g, loading: _, error: v } = o({
|
|
566
570
|
variables: {
|
|
567
571
|
applicationId: e.id,
|
|
568
572
|
period: "daily",
|
|
@@ -572,8 +576,8 @@ var Oe = [
|
|
|
572
576
|
skip: r
|
|
573
577
|
});
|
|
574
578
|
if (r) {
|
|
575
|
-
let t =
|
|
576
|
-
return
|
|
579
|
+
let t = m?.productInstallations?.items ?? [], r = m?.productInstallations?.total ?? 0, i = t.filter((e) => e.status === "ACTIVE").length;
|
|
580
|
+
return h && !m ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : /* @__PURE__ */ J("div", {
|
|
577
581
|
className: "space-y-6",
|
|
578
582
|
children: [/* @__PURE__ */ J("div", {
|
|
579
583
|
className: "grid gap-4 sm:grid-cols-4",
|
|
@@ -595,9 +599,9 @@ var Oe = [
|
|
|
595
599
|
value: e.reviewCount.toString()
|
|
596
600
|
})
|
|
597
601
|
]
|
|
598
|
-
}), t.length > 0 && /* @__PURE__ */ q(
|
|
602
|
+
}), t.length > 0 && /* @__PURE__ */ q(b, {
|
|
599
603
|
title: n("devportal.installBreakdown", "Install Breakdown"),
|
|
600
|
-
children: /* @__PURE__ */ q(
|
|
604
|
+
children: /* @__PURE__ */ q(T, {
|
|
601
605
|
data: t,
|
|
602
606
|
keyField: "id",
|
|
603
607
|
columns: [
|
|
@@ -630,9 +634,9 @@ var Oe = [
|
|
|
630
634
|
})]
|
|
631
635
|
});
|
|
632
636
|
}
|
|
633
|
-
return
|
|
634
|
-
},
|
|
635
|
-
let { t } =
|
|
637
|
+
return _ ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : v ? /* @__PURE__ */ q(Z, { message: v.message }) : /* @__PURE__ */ q(Re, { analytics: (g?.applicationAnalytics ?? []).map(De) });
|
|
638
|
+
}, Fe = ({ app: e }) => {
|
|
639
|
+
let { t } = P(), n = (e, n) => {
|
|
636
640
|
let r = t(e);
|
|
637
641
|
return r === e ? n : r;
|
|
638
642
|
};
|
|
@@ -662,7 +666,7 @@ var Oe = [
|
|
|
662
666
|
})
|
|
663
667
|
]
|
|
664
668
|
}),
|
|
665
|
-
/* @__PURE__ */ q(
|
|
669
|
+
/* @__PURE__ */ q(b, {
|
|
666
670
|
title: n("devportal.description", "Description"),
|
|
667
671
|
children: /* @__PURE__ */ q("div", {
|
|
668
672
|
className: "prose prose-sm max-w-none",
|
|
@@ -672,7 +676,7 @@ var Oe = [
|
|
|
672
676
|
})
|
|
673
677
|
})
|
|
674
678
|
}),
|
|
675
|
-
/* @__PURE__ */ q(
|
|
679
|
+
/* @__PURE__ */ q(b, {
|
|
676
680
|
title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
677
681
|
children: /* @__PURE__ */ J("div", {
|
|
678
682
|
className: "space-y-3",
|
|
@@ -700,9 +704,9 @@ var Oe = [
|
|
|
700
704
|
]
|
|
701
705
|
}), /* @__PURE__ */ J("div", {
|
|
702
706
|
className: "space-y-6",
|
|
703
|
-
children: [/* @__PURE__ */ q(
|
|
707
|
+
children: [/* @__PURE__ */ q(b, {
|
|
704
708
|
title: n("devportal.details", "Details"),
|
|
705
|
-
children: /* @__PURE__ */ q(
|
|
709
|
+
children: /* @__PURE__ */ q(E, { items: [
|
|
706
710
|
{
|
|
707
711
|
label: n("devportal.appId", "App ID"),
|
|
708
712
|
value: /* @__PURE__ */ q("code", {
|
|
@@ -735,7 +739,7 @@ var Oe = [
|
|
|
735
739
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
|
|
736
740
|
}
|
|
737
741
|
] })
|
|
738
|
-
}), /* @__PURE__ */ q(
|
|
742
|
+
}), /* @__PURE__ */ q(b, {
|
|
739
743
|
title: n("devportal.links", "Links"),
|
|
740
744
|
children: /* @__PURE__ */ J("div", {
|
|
741
745
|
className: "space-y-2",
|
|
@@ -769,8 +773,8 @@ var Oe = [
|
|
|
769
773
|
})]
|
|
770
774
|
})]
|
|
771
775
|
});
|
|
772
|
-
},
|
|
773
|
-
let { t: i } =
|
|
776
|
+
}, Ie = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
777
|
+
let { t: i } = P(), a = (e, t) => {
|
|
774
778
|
let n = i(e);
|
|
775
779
|
return n === e ? t : n;
|
|
776
780
|
};
|
|
@@ -804,7 +808,7 @@ var Oe = [
|
|
|
804
808
|
children: [/* @__PURE__ */ q("h3", {
|
|
805
809
|
className: "font-medium",
|
|
806
810
|
children: t.name
|
|
807
|
-
}), /* @__PURE__ */ q(
|
|
811
|
+
}), /* @__PURE__ */ q(S, {
|
|
808
812
|
status: t.status,
|
|
809
813
|
type: "webhook"
|
|
810
814
|
})]
|
|
@@ -814,7 +818,7 @@ var Oe = [
|
|
|
814
818
|
})] }), /* @__PURE__ */ q("button", {
|
|
815
819
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
816
820
|
className: "rounded-md p-1 hover:bg-muted",
|
|
817
|
-
children: /* @__PURE__ */ q(
|
|
821
|
+
children: /* @__PURE__ */ q(he, { size: 20 })
|
|
818
822
|
})]
|
|
819
823
|
}),
|
|
820
824
|
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
@@ -870,7 +874,7 @@ var Oe = [
|
|
|
870
874
|
]
|
|
871
875
|
}, t.id))
|
|
872
876
|
}) : /* @__PURE__ */ q(r, {
|
|
873
|
-
icon: /* @__PURE__ */ q(
|
|
877
|
+
icon: /* @__PURE__ */ q(G, { size: 32 }),
|
|
874
878
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
875
879
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
876
880
|
action: /* @__PURE__ */ J("button", {
|
|
@@ -880,8 +884,8 @@ var Oe = [
|
|
|
880
884
|
})
|
|
881
885
|
})]
|
|
882
886
|
});
|
|
883
|
-
},
|
|
884
|
-
let { t: p } =
|
|
887
|
+
}, Le = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
888
|
+
let { t: p } = P(), m = (e, t) => {
|
|
885
889
|
let n = p(e);
|
|
886
890
|
return n === e ? t : n;
|
|
887
891
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
@@ -927,7 +931,7 @@ var Oe = [
|
|
|
927
931
|
className: "flex flex-wrap items-center gap-3",
|
|
928
932
|
children: [/* @__PURE__ */ J("div", {
|
|
929
933
|
className: "flex items-center gap-2",
|
|
930
|
-
children: [/* @__PURE__ */ q(
|
|
934
|
+
children: [/* @__PURE__ */ q(C, {
|
|
931
935
|
checked: d,
|
|
932
936
|
indeterminate: f,
|
|
933
937
|
onChange: c,
|
|
@@ -970,7 +974,7 @@ var Oe = [
|
|
|
970
974
|
className: "flex items-start gap-3",
|
|
971
975
|
children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
|
|
972
976
|
onClick: (e) => e.stopPropagation(),
|
|
973
|
-
children: /* @__PURE__ */ q(
|
|
977
|
+
children: /* @__PURE__ */ q(C, {
|
|
974
978
|
checked: o.has(e.id),
|
|
975
979
|
onChange: (t) => s(e.id, t),
|
|
976
980
|
ariaLabel: `Select delegation ${e.id}`,
|
|
@@ -982,7 +986,7 @@ var Oe = [
|
|
|
982
986
|
className: "font-medium",
|
|
983
987
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
984
988
|
}), /* @__PURE__ */ q("span", {
|
|
985
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
989
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Ae[e.status]),
|
|
986
990
|
children: e.status
|
|
987
991
|
})]
|
|
988
992
|
}), /* @__PURE__ */ J("p", {
|
|
@@ -1000,7 +1004,7 @@ var Oe = [
|
|
|
1000
1004
|
}), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
|
|
1001
1005
|
onClick: () => a(e.id),
|
|
1002
1006
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
1003
|
-
children: [/* @__PURE__ */ q(
|
|
1007
|
+
children: [/* @__PURE__ */ q(xe, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
1004
1008
|
})]
|
|
1005
1009
|
}),
|
|
1006
1010
|
/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
@@ -1029,7 +1033,7 @@ var Oe = [
|
|
|
1029
1033
|
e.expiresAt && /* @__PURE__ */ J("span", {
|
|
1030
1034
|
className: "flex items-center gap-1",
|
|
1031
1035
|
children: [
|
|
1032
|
-
/* @__PURE__ */ q(
|
|
1036
|
+
/* @__PURE__ */ q(ue, { size: 12 }),
|
|
1033
1037
|
m("devportal.expires", "Expires"),
|
|
1034
1038
|
" ",
|
|
1035
1039
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1037,7 +1041,7 @@ var Oe = [
|
|
|
1037
1041
|
}),
|
|
1038
1042
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ J("span", {
|
|
1039
1043
|
className: "flex items-center gap-1",
|
|
1040
|
-
children: [/* @__PURE__ */ q(
|
|
1044
|
+
children: [/* @__PURE__ */ q(L, {
|
|
1041
1045
|
size: 12,
|
|
1042
1046
|
className: "text-status-success-text"
|
|
1043
1047
|
}), m("devportal.noExpiration", "No expiration")]
|
|
@@ -1045,7 +1049,7 @@ var Oe = [
|
|
|
1045
1049
|
e.revokedAt && /* @__PURE__ */ J("span", {
|
|
1046
1050
|
className: "flex items-center gap-1",
|
|
1047
1051
|
children: [
|
|
1048
|
-
/* @__PURE__ */ q(
|
|
1052
|
+
/* @__PURE__ */ q(xe, {
|
|
1049
1053
|
size: 12,
|
|
1050
1054
|
className: "text-status-error-text"
|
|
1051
1055
|
}),
|
|
@@ -1070,8 +1074,8 @@ var Oe = [
|
|
|
1070
1074
|
})
|
|
1071
1075
|
]
|
|
1072
1076
|
});
|
|
1073
|
-
},
|
|
1074
|
-
let { t } =
|
|
1077
|
+
}, Re = ({ analytics: e }) => {
|
|
1078
|
+
let { t } = P(), n = (e, n) => {
|
|
1075
1079
|
let r = t(e);
|
|
1076
1080
|
return r === e ? n : r;
|
|
1077
1081
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
@@ -1101,9 +1105,9 @@ var Oe = [
|
|
|
1101
1105
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
1102
1106
|
})
|
|
1103
1107
|
]
|
|
1104
|
-
}), /* @__PURE__ */ q(
|
|
1108
|
+
}), /* @__PURE__ */ q(b, {
|
|
1105
1109
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
1106
|
-
children: e.length > 0 ? /* @__PURE__ */ q(
|
|
1110
|
+
children: e.length > 0 ? /* @__PURE__ */ q(T, {
|
|
1107
1111
|
data: e,
|
|
1108
1112
|
keyField: "id",
|
|
1109
1113
|
columns: [
|
|
@@ -1144,17 +1148,17 @@ var Oe = [
|
|
|
1144
1148
|
}
|
|
1145
1149
|
]
|
|
1146
1150
|
}) : /* @__PURE__ */ q(r, {
|
|
1147
|
-
icon: /* @__PURE__ */ q(
|
|
1151
|
+
icon: /* @__PURE__ */ q(I, { size: 32 }),
|
|
1148
1152
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1149
1153
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1150
1154
|
})
|
|
1151
1155
|
})]
|
|
1152
1156
|
});
|
|
1153
|
-
},
|
|
1154
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1157
|
+
}, ze = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Be = ({ app: t }) => {
|
|
1158
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
|
|
1155
1159
|
let n = a(e);
|
|
1156
1160
|
return n === e ? t : n;
|
|
1157
|
-
}, [s, c] =
|
|
1161
|
+
}, [s, c] = N(ze), [l, u] = N("{}"), [d, f] = N(""), [p, m] = N(!1), [h, g] = N(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = N(i || ""), [y, b] = N(!1), ee = A(async () => {
|
|
1158
1162
|
m(!0), f("");
|
|
1159
1163
|
try {
|
|
1160
1164
|
let e = {};
|
|
@@ -1185,7 +1189,7 @@ var Oe = [
|
|
|
1185
1189
|
l,
|
|
1186
1190
|
h,
|
|
1187
1191
|
_
|
|
1188
|
-
]), x =
|
|
1192
|
+
]), x = A(() => {
|
|
1189
1193
|
i && v(i), b(!0);
|
|
1190
1194
|
}, [i]);
|
|
1191
1195
|
return /* @__PURE__ */ J("div", {
|
|
@@ -1214,7 +1218,7 @@ var Oe = [
|
|
|
1214
1218
|
})] }), /* @__PURE__ */ J("button", {
|
|
1215
1219
|
onClick: x,
|
|
1216
1220
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1217
|
-
children: [/* @__PURE__ */ q(
|
|
1221
|
+
children: [/* @__PURE__ */ q(me, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1218
1222
|
})]
|
|
1219
1223
|
}),
|
|
1220
1224
|
y && /* @__PURE__ */ J("div", {
|
|
@@ -1329,8 +1333,8 @@ var Oe = [
|
|
|
1329
1333
|
})] })
|
|
1330
1334
|
]
|
|
1331
1335
|
});
|
|
1332
|
-
},
|
|
1333
|
-
let d =
|
|
1336
|
+
}, Ve = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
|
|
1337
|
+
let d = M(null), f = A(async (e) => {
|
|
1334
1338
|
try {
|
|
1335
1339
|
r((await s(e)).downloadUrl);
|
|
1336
1340
|
} catch {}
|
|
@@ -1403,8 +1407,8 @@ var Oe = [
|
|
|
1403
1407
|
})
|
|
1404
1408
|
]
|
|
1405
1409
|
});
|
|
1406
|
-
},
|
|
1407
|
-
let s =
|
|
1410
|
+
}, He = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
1411
|
+
let s = M(null), c = A(async (t) => {
|
|
1408
1412
|
try {
|
|
1409
1413
|
let i = await r(t);
|
|
1410
1414
|
n([...e, i.downloadUrl]);
|
|
@@ -1435,7 +1439,7 @@ var Oe = [
|
|
|
1435
1439
|
type: "button",
|
|
1436
1440
|
onClick: () => l(t),
|
|
1437
1441
|
className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1438
|
-
children: /* @__PURE__ */ q(
|
|
1442
|
+
children: /* @__PURE__ */ q(be, { size: 12 })
|
|
1439
1443
|
})]
|
|
1440
1444
|
}, t)), /* @__PURE__ */ q("button", {
|
|
1441
1445
|
type: "button",
|
|
@@ -1470,13 +1474,13 @@ var Oe = [
|
|
|
1470
1474
|
})
|
|
1471
1475
|
]
|
|
1472
1476
|
});
|
|
1473
|
-
},
|
|
1477
|
+
}, Ue = new Set(["workflow", "template"]), We = [{
|
|
1474
1478
|
value: "FREE",
|
|
1475
1479
|
label: "Free"
|
|
1476
1480
|
}, {
|
|
1477
1481
|
value: "PAID",
|
|
1478
1482
|
label: "Paid"
|
|
1479
|
-
}],
|
|
1483
|
+
}], Ge = [
|
|
1480
1484
|
{
|
|
1481
1485
|
value: "agent",
|
|
1482
1486
|
label: "Agent"
|
|
@@ -1546,7 +1550,7 @@ var Oe = [
|
|
|
1546
1550
|
label: "Component"
|
|
1547
1551
|
}
|
|
1548
1552
|
];
|
|
1549
|
-
function
|
|
1553
|
+
function Ke(e) {
|
|
1550
1554
|
let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = e.pricingDetails ?? {}, s = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
|
|
1551
1555
|
return {
|
|
1552
1556
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -1575,33 +1579,41 @@ function Ge(e) {
|
|
|
1575
1579
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
1576
1580
|
};
|
|
1577
1581
|
}
|
|
1578
|
-
var
|
|
1579
|
-
query
|
|
1580
|
-
myPublisher { id
|
|
1582
|
+
var qe = Ce`
|
|
1583
|
+
query MyPublisherForListing {
|
|
1584
|
+
myPublisher { id }
|
|
1585
|
+
}
|
|
1586
|
+
`, Je = Ce`
|
|
1587
|
+
query PublisherProductsForListing($publisherId: String!) {
|
|
1588
|
+
products(filter: { publisherId: $publisherId }) { id productId }
|
|
1581
1589
|
}
|
|
1582
|
-
`,
|
|
1590
|
+
`, Ye = Ce`
|
|
1583
1591
|
mutation UpdateStoreProduct($input: UpdateProductInput!) {
|
|
1584
1592
|
updateProduct(input: $input) { id name description }
|
|
1585
1593
|
}
|
|
1586
|
-
`,
|
|
1587
|
-
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } =
|
|
1594
|
+
`, Xe = ({ app: n }) => {
|
|
1595
|
+
let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = P(), u = (e, t) => {
|
|
1588
1596
|
let n = l(e);
|
|
1589
1597
|
return n === e ? t : n;
|
|
1590
|
-
}, [d, f] =
|
|
1591
|
-
|
|
1592
|
-
let { data: ee } =
|
|
1598
|
+
}, [d, f] = N(() => Ke(n)), [p, m] = N(!1), [h, _] = N(!1), y = M(n);
|
|
1599
|
+
y.current = n;
|
|
1600
|
+
let { data: ee } = Y(qe, { fetchPolicy: "cache-first" }), x = ee?.myPublisher?.id ?? null, { data: S } = Y(Je, {
|
|
1601
|
+
variables: { publisherId: x ?? "" },
|
|
1602
|
+
fetchPolicy: "cache-first",
|
|
1603
|
+
skip: !x
|
|
1604
|
+
}), te = S?.products?.find((e) => e.productId === n.id)?.id ?? null, [C] = we(Ye), [ne] = v(), [T, { loading: E }] = g();
|
|
1593
1605
|
ce(() => {
|
|
1594
|
-
f(
|
|
1606
|
+
f(Ke(y.current));
|
|
1595
1607
|
}, [n.id]);
|
|
1596
|
-
let
|
|
1608
|
+
let O = (e, t) => {
|
|
1597
1609
|
f((n) => ({
|
|
1598
1610
|
...n,
|
|
1599
1611
|
[e]: t
|
|
1600
1612
|
}));
|
|
1601
|
-
},
|
|
1613
|
+
}, ae = async () => {
|
|
1602
1614
|
m(!0);
|
|
1603
1615
|
try {
|
|
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 =
|
|
1616
|
+
let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Ue.has(d.manifestItemType), i = n.manifest ?? {}, a = {
|
|
1605
1617
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
1606
1618
|
itemType: d.manifestItemType || void 0,
|
|
1607
1619
|
identity: {
|
|
@@ -1619,7 +1631,7 @@ var Ke = Se`
|
|
|
1619
1631
|
let e = parseFloat(d.price);
|
|
1620
1632
|
isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
|
|
1621
1633
|
}
|
|
1622
|
-
await
|
|
1634
|
+
await ne({ variables: {
|
|
1623
1635
|
id: n.id,
|
|
1624
1636
|
input: {
|
|
1625
1637
|
iconUrl: d.iconUrl || null,
|
|
@@ -1638,8 +1650,8 @@ var Ke = Se`
|
|
|
1638
1650
|
pricingDetails: Object.keys(o).length > 0 ? o : null,
|
|
1639
1651
|
manifest: a
|
|
1640
1652
|
}
|
|
1641
|
-
} }),
|
|
1642
|
-
id:
|
|
1653
|
+
} }), te && await C({ variables: { input: {
|
|
1654
|
+
id: te,
|
|
1643
1655
|
name: n.name,
|
|
1644
1656
|
description: d.shortDescription || void 0,
|
|
1645
1657
|
longDescription: d.description || void 0,
|
|
@@ -1647,41 +1659,41 @@ var Ke = Se`
|
|
|
1647
1659
|
screenshots: e.length > 0 ? e : void 0,
|
|
1648
1660
|
documentationUrl: d.documentationUrl || void 0,
|
|
1649
1661
|
category: n.category || void 0
|
|
1650
|
-
} } }),
|
|
1662
|
+
} } }), w("success");
|
|
1651
1663
|
} catch {
|
|
1652
|
-
|
|
1664
|
+
w("error");
|
|
1653
1665
|
} finally {
|
|
1654
1666
|
m(!1);
|
|
1655
1667
|
}
|
|
1656
|
-
},
|
|
1668
|
+
}, oe = async () => {
|
|
1657
1669
|
try {
|
|
1658
|
-
await
|
|
1670
|
+
await T({ variables: { id: n.id } }), w("success");
|
|
1659
1671
|
} catch {
|
|
1660
|
-
|
|
1672
|
+
w("error");
|
|
1661
1673
|
}
|
|
1662
|
-
},
|
|
1674
|
+
}, se = M(null), j = M(null), { upload: F, uploading: I, progress: fe, error: R } = k(r, i, a, o), { upload: pe, uploading: me, progress: he, error: V } = k(r, i, a, o, "/DevPortal/Assets"), { upload: ge, uploading: _e, progress: H, error: W } = k(r, i, a, o, "/DevPortal/Assets"), { upload: G, uploading: be, progress: xe, error: Se } = k(r, i, a, o, "/DevPortal/Assets"), Ce = A(async (e) => {
|
|
1663
1675
|
let t = e.target.files?.[0];
|
|
1664
1676
|
if (t) {
|
|
1665
1677
|
e.target.value = "";
|
|
1666
1678
|
try {
|
|
1667
|
-
let e = await
|
|
1679
|
+
let e = await F(t);
|
|
1668
1680
|
f((t) => ({
|
|
1669
1681
|
...t,
|
|
1670
1682
|
manifestRegistryUrl: e.downloadUrl
|
|
1671
1683
|
}));
|
|
1672
1684
|
} catch {}
|
|
1673
1685
|
}
|
|
1674
|
-
}, [
|
|
1675
|
-
e.preventDefault(),
|
|
1686
|
+
}, [F]), Te = A(async (e) => {
|
|
1687
|
+
e.preventDefault(), _(!1);
|
|
1676
1688
|
let t = e.dataTransfer.files?.[0];
|
|
1677
1689
|
if (t) try {
|
|
1678
|
-
let e = await
|
|
1690
|
+
let e = await F(t);
|
|
1679
1691
|
f((t) => ({
|
|
1680
1692
|
...t,
|
|
1681
1693
|
manifestRegistryUrl: e.downloadUrl
|
|
1682
1694
|
}));
|
|
1683
1695
|
} catch {}
|
|
1684
|
-
}, [
|
|
1696
|
+
}, [F]), Ee = A((e) => {
|
|
1685
1697
|
let t = e.target.files?.[0];
|
|
1686
1698
|
if (!t) return;
|
|
1687
1699
|
let n = new FileReader();
|
|
@@ -1700,8 +1712,8 @@ var Ke = Se`
|
|
|
1700
1712
|
}));
|
|
1701
1713
|
} catch {}
|
|
1702
1714
|
}, n.readAsText(t), e.target.value = "";
|
|
1703
|
-
}, []),
|
|
1704
|
-
let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t =
|
|
1715
|
+
}, []), De = A(() => {
|
|
1716
|
+
let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Ue.has(d.manifestItemType), r = {
|
|
1705
1717
|
manifestVersion: "1.0",
|
|
1706
1718
|
itemType: d.manifestItemType || void 0,
|
|
1707
1719
|
identity: {
|
|
@@ -1716,9 +1728,9 @@ var Ke = Se`
|
|
|
1716
1728
|
compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
|
|
1717
1729
|
}, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1718
1730
|
o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
|
|
1719
|
-
}, [n.slug, d]),
|
|
1731
|
+
}, [n.slug, d]), Oe = Ue.has(d.manifestItemType), ke = d.manifestInstallType === "builtin", Ae = d.pricingType !== "FREE", X = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
|
|
1720
1732
|
n.status;
|
|
1721
|
-
let
|
|
1733
|
+
let Z = n.status === "SUBMITTED", je = n.status === "PUBLISHED", Me = n.appType === "NODE" || n.appType === "WORKFLOW", Ne = [
|
|
1722
1734
|
{
|
|
1723
1735
|
label: "Short description",
|
|
1724
1736
|
done: !!d.shortDescription.trim()
|
|
@@ -1739,7 +1751,7 @@ var Ke = Se`
|
|
|
1739
1751
|
label: "Terms of Service URL",
|
|
1740
1752
|
done: !!d.termsOfServiceUrl.trim()
|
|
1741
1753
|
}
|
|
1742
|
-
],
|
|
1754
|
+
], Pe = Ne.filter((e) => e.done).length, Fe = Ne.length;
|
|
1743
1755
|
return /* @__PURE__ */ J("div", {
|
|
1744
1756
|
className: "space-y-8 max-w-3xl",
|
|
1745
1757
|
children: [
|
|
@@ -1753,7 +1765,7 @@ var Ke = Se`
|
|
|
1753
1765
|
children: [
|
|
1754
1766
|
/* @__PURE__ */ J("li", {
|
|
1755
1767
|
className: "flex items-start gap-2",
|
|
1756
|
-
children: [/* @__PURE__ */ q(
|
|
1768
|
+
children: [/* @__PURE__ */ q(ye, {
|
|
1757
1769
|
size: 14,
|
|
1758
1770
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1759
1771
|
}), /* @__PURE__ */ J("span", { children: [
|
|
@@ -1762,9 +1774,9 @@ var Ke = Se`
|
|
|
1762
1774
|
u("devportal.listingTabDesc", "controls your store card — the name, description, icon and screenshots users see in the marketplace. Save changes here any time without creating a new release.")
|
|
1763
1775
|
] })]
|
|
1764
1776
|
}),
|
|
1765
|
-
|
|
1777
|
+
Me && /* @__PURE__ */ J("li", {
|
|
1766
1778
|
className: "flex items-start gap-2",
|
|
1767
|
-
children: [/* @__PURE__ */ q(
|
|
1779
|
+
children: [/* @__PURE__ */ q(ue, {
|
|
1768
1780
|
size: 14,
|
|
1769
1781
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1770
1782
|
}), /* @__PURE__ */ J("span", { children: [
|
|
@@ -1781,7 +1793,7 @@ var Ke = Se`
|
|
|
1781
1793
|
}),
|
|
1782
1794
|
/* @__PURE__ */ J("li", {
|
|
1783
1795
|
className: "flex items-start gap-2",
|
|
1784
|
-
children: [/* @__PURE__ */ q(
|
|
1796
|
+
children: [/* @__PURE__ */ q(ve, {
|
|
1785
1797
|
size: 14,
|
|
1786
1798
|
className: "mt-0.5 shrink-0 text-primary"
|
|
1787
1799
|
}), /* @__PURE__ */ q("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
|
|
@@ -1789,7 +1801,7 @@ var Ke = Se`
|
|
|
1789
1801
|
]
|
|
1790
1802
|
})]
|
|
1791
1803
|
}),
|
|
1792
|
-
!
|
|
1804
|
+
!je && /* @__PURE__ */ J("div", {
|
|
1793
1805
|
className: "rounded-lg border bg-card p-4 space-y-3",
|
|
1794
1806
|
children: [/* @__PURE__ */ J("div", {
|
|
1795
1807
|
className: "flex items-center justify-between",
|
|
@@ -1799,23 +1811,23 @@ var Ke = Se`
|
|
|
1799
1811
|
u("devportal.listingCompleteness", "Listing completeness"),
|
|
1800
1812
|
" ",
|
|
1801
1813
|
/* @__PURE__ */ J("span", {
|
|
1802
|
-
className: t("ml-1 text-xs font-semibold",
|
|
1814
|
+
className: t("ml-1 text-xs font-semibold", Pe === Fe ? "text-status-success-text" : "text-status-warning-text"),
|
|
1803
1815
|
children: [
|
|
1804
|
-
|
|
1816
|
+
Pe,
|
|
1805
1817
|
"/",
|
|
1806
|
-
|
|
1818
|
+
Fe
|
|
1807
1819
|
]
|
|
1808
1820
|
})
|
|
1809
1821
|
]
|
|
1810
|
-
}),
|
|
1822
|
+
}), Pe === Fe && /* @__PURE__ */ J("span", {
|
|
1811
1823
|
className: "text-xs text-status-success-text flex items-center gap-1",
|
|
1812
|
-
children: [/* @__PURE__ */ q(
|
|
1824
|
+
children: [/* @__PURE__ */ q(L, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
|
|
1813
1825
|
})]
|
|
1814
1826
|
}), /* @__PURE__ */ q("div", {
|
|
1815
1827
|
className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
|
|
1816
|
-
children:
|
|
1828
|
+
children: Ne.map((e) => /* @__PURE__ */ J("div", {
|
|
1817
1829
|
className: "flex items-center gap-1.5 text-xs",
|
|
1818
|
-
children: [e.done ? /* @__PURE__ */ q(
|
|
1830
|
+
children: [e.done ? /* @__PURE__ */ q(L, {
|
|
1819
1831
|
size: 12,
|
|
1820
1832
|
className: "text-status-success-text shrink-0"
|
|
1821
1833
|
}) : /* @__PURE__ */ q(le, {
|
|
@@ -1828,9 +1840,9 @@ var Ke = Se`
|
|
|
1828
1840
|
}, e.label))
|
|
1829
1841
|
})]
|
|
1830
1842
|
}),
|
|
1831
|
-
|
|
1843
|
+
je ? /* @__PURE__ */ J("div", {
|
|
1832
1844
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
1833
|
-
children: [/* @__PURE__ */ q(
|
|
1845
|
+
children: [/* @__PURE__ */ q(L, {
|
|
1834
1846
|
size: 16,
|
|
1835
1847
|
className: "text-success mt-0.5 shrink-0"
|
|
1836
1848
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -1847,9 +1859,9 @@ var Ke = Se`
|
|
|
1847
1859
|
]
|
|
1848
1860
|
})]
|
|
1849
1861
|
})]
|
|
1850
|
-
}) :
|
|
1862
|
+
}) : Z ? /* @__PURE__ */ J("div", {
|
|
1851
1863
|
className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
|
|
1852
|
-
children: [/* @__PURE__ */ q(
|
|
1864
|
+
children: [/* @__PURE__ */ q(ue, {
|
|
1853
1865
|
size: 16,
|
|
1854
1866
|
className: "text-primary mt-0.5 shrink-0"
|
|
1855
1867
|
}), /* @__PURE__ */ J("div", {
|
|
@@ -1885,7 +1897,7 @@ var Ke = Se`
|
|
|
1885
1897
|
})]
|
|
1886
1898
|
})]
|
|
1887
1899
|
}),
|
|
1888
|
-
|
|
1900
|
+
Me ? /* @__PURE__ */ J("div", {
|
|
1889
1901
|
className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
|
|
1890
1902
|
children: [/* @__PURE__ */ q(z, {
|
|
1891
1903
|
size: 16,
|
|
@@ -1900,47 +1912,47 @@ var Ke = Se`
|
|
|
1900
1912
|
children: u("devportal.packageManagedInVersionsDesc", "For NODE and WORKFLOW types, each release is uploaded through the Versions page — including the ZIP archive and manifest.json. This keeps your code releases separate from your store card.")
|
|
1901
1913
|
})]
|
|
1902
1914
|
})]
|
|
1903
|
-
}) : /* @__PURE__ */ q(
|
|
1915
|
+
}) : /* @__PURE__ */ q(b, {
|
|
1904
1916
|
title: u("devportal.package", "Package"),
|
|
1905
1917
|
description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
1906
1918
|
children: /* @__PURE__ */ J("div", {
|
|
1907
1919
|
className: "space-y-6",
|
|
1908
1920
|
children: [
|
|
1909
|
-
/* @__PURE__ */ q(
|
|
1921
|
+
/* @__PURE__ */ q(re, {
|
|
1910
1922
|
label: u("devportal.storeItemType", "Item Type"),
|
|
1911
1923
|
value: d.manifestItemType,
|
|
1912
1924
|
onChange: (e) => {
|
|
1913
1925
|
let t = e.target.value;
|
|
1914
|
-
|
|
1926
|
+
O("manifestItemType", t), Ue.has(t) ? O("manifestInstallType", "json") : d.manifestInstallType === "json" && O("manifestInstallType", "zip");
|
|
1915
1927
|
},
|
|
1916
|
-
options:
|
|
1928
|
+
options: Ge,
|
|
1917
1929
|
placeholder: u("devportal.selectItemType", "Select item type…"),
|
|
1918
1930
|
hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
|
|
1919
1931
|
}),
|
|
1920
1932
|
/* @__PURE__ */ J("div", {
|
|
1921
1933
|
className: "grid gap-4 sm:grid-cols-2",
|
|
1922
|
-
children: [/* @__PURE__ */ q(
|
|
1934
|
+
children: [/* @__PURE__ */ q(D, {
|
|
1923
1935
|
label: u("devportal.manifestDisplayName", "Display Name"),
|
|
1924
1936
|
value: d.manifestDisplayName,
|
|
1925
|
-
onChange: (e) =>
|
|
1937
|
+
onChange: (e) => O("manifestDisplayName", e.target.value),
|
|
1926
1938
|
placeholder: "My Awesome Node"
|
|
1927
|
-
}), /* @__PURE__ */ q(
|
|
1939
|
+
}), /* @__PURE__ */ q(D, {
|
|
1928
1940
|
label: u("devportal.manifestVersion", "Version"),
|
|
1929
1941
|
value: d.manifestVersion,
|
|
1930
|
-
onChange: (e) =>
|
|
1942
|
+
onChange: (e) => O("manifestVersion", e.target.value),
|
|
1931
1943
|
placeholder: "1.0.0",
|
|
1932
1944
|
hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
|
|
1933
1945
|
})]
|
|
1934
1946
|
}),
|
|
1935
|
-
|
|
1947
|
+
Oe && /* @__PURE__ */ q(ie, {
|
|
1936
1948
|
label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
|
|
1937
1949
|
value: d.manifestJsonContent,
|
|
1938
|
-
onChange: (e) =>
|
|
1950
|
+
onChange: (e) => O("manifestJsonContent", e.target.value),
|
|
1939
1951
|
rows: 12,
|
|
1940
1952
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
1941
1953
|
hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
1942
1954
|
}),
|
|
1943
|
-
!
|
|
1955
|
+
!Oe && /* @__PURE__ */ J("div", {
|
|
1944
1956
|
className: "space-y-3",
|
|
1945
1957
|
children: [
|
|
1946
1958
|
/* @__PURE__ */ J("div", {
|
|
@@ -1952,8 +1964,8 @@ var Ke = Se`
|
|
|
1952
1964
|
className: "flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
1953
1965
|
children: [/* @__PURE__ */ q("input", {
|
|
1954
1966
|
type: "checkbox",
|
|
1955
|
-
checked:
|
|
1956
|
-
onChange: (e) =>
|
|
1967
|
+
checked: ke,
|
|
1968
|
+
onChange: (e) => O("manifestInstallType", e.target.checked ? "builtin" : "zip"),
|
|
1957
1969
|
className: "h-4 w-4 rounded border-border accent-primary"
|
|
1958
1970
|
}), /* @__PURE__ */ q("span", {
|
|
1959
1971
|
className: "text-text-secondary",
|
|
@@ -1961,7 +1973,7 @@ var Ke = Se`
|
|
|
1961
1973
|
})]
|
|
1962
1974
|
})]
|
|
1963
1975
|
}),
|
|
1964
|
-
!
|
|
1976
|
+
!ke && /* @__PURE__ */ J(K, { children: [
|
|
1965
1977
|
/* @__PURE__ */ J("div", {
|
|
1966
1978
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
1967
1979
|
children: [/* @__PURE__ */ q(z, {
|
|
@@ -1978,19 +1990,19 @@ var Ke = Se`
|
|
|
1978
1990
|
}),
|
|
1979
1991
|
/* @__PURE__ */ J("div", {
|
|
1980
1992
|
onDragOver: (e) => {
|
|
1981
|
-
e.preventDefault(),
|
|
1993
|
+
e.preventDefault(), _(!0);
|
|
1982
1994
|
},
|
|
1983
|
-
onDragLeave: () =>
|
|
1984
|
-
onDrop: (e) => void
|
|
1985
|
-
onClick: () => !
|
|
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",
|
|
1995
|
+
onDragLeave: () => _(!1),
|
|
1996
|
+
onDrop: (e) => void Te(e),
|
|
1997
|
+
onClick: () => !I && j.current?.click(),
|
|
1998
|
+
className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", h ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", I && "pointer-events-none opacity-75"),
|
|
1987
1999
|
children: [/* @__PURE__ */ q("input", {
|
|
1988
|
-
ref:
|
|
2000
|
+
ref: j,
|
|
1989
2001
|
type: "file",
|
|
1990
2002
|
accept: ".zip,application/zip,application/x-zip-compressed",
|
|
1991
2003
|
className: "hidden",
|
|
1992
|
-
onChange: (e) => void
|
|
1993
|
-
}),
|
|
2004
|
+
onChange: (e) => void Ce(e)
|
|
2005
|
+
}), I ? /* @__PURE__ */ J(K, { children: [
|
|
1994
2006
|
/* @__PURE__ */ q(B, {
|
|
1995
2007
|
size: 28,
|
|
1996
2008
|
className: "animate-spin text-primary"
|
|
@@ -2000,7 +2012,7 @@ var Ke = Se`
|
|
|
2000
2012
|
children: [
|
|
2001
2013
|
u("devportal.uploading", "Uploading…"),
|
|
2002
2014
|
" ",
|
|
2003
|
-
|
|
2015
|
+
fe,
|
|
2004
2016
|
"%"
|
|
2005
2017
|
]
|
|
2006
2018
|
}), /* @__PURE__ */ q("p", {
|
|
@@ -2011,15 +2023,15 @@ var Ke = Se`
|
|
|
2011
2023
|
className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
|
|
2012
2024
|
children: /* @__PURE__ */ q("div", {
|
|
2013
2025
|
className: "h-full bg-primary transition-all",
|
|
2014
|
-
style: { width: `${
|
|
2026
|
+
style: { width: `${fe}%` }
|
|
2015
2027
|
})
|
|
2016
2028
|
})
|
|
2017
|
-
] }) :
|
|
2029
|
+
] }) : X ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(L, {
|
|
2018
2030
|
size: 28,
|
|
2019
2031
|
className: "text-status-success-text"
|
|
2020
2032
|
}), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
|
|
2021
2033
|
className: "text-sm font-medium",
|
|
2022
|
-
children:
|
|
2034
|
+
children: X
|
|
2023
2035
|
}), /* @__PURE__ */ q("p", {
|
|
2024
2036
|
className: "text-xs text-text-secondary mt-0.5",
|
|
2025
2037
|
children: u("devportal.clickToReplace", "Click or drag to replace")
|
|
@@ -2034,12 +2046,12 @@ var Ke = Se`
|
|
|
2034
2046
|
children: u("devportal.orClickToBrowse", "or click to browse")
|
|
2035
2047
|
})] })] })]
|
|
2036
2048
|
}),
|
|
2037
|
-
|
|
2049
|
+
R && /* @__PURE__ */ q("p", {
|
|
2038
2050
|
className: "text-xs text-status-error-text",
|
|
2039
|
-
children:
|
|
2051
|
+
children: R
|
|
2040
2052
|
})
|
|
2041
2053
|
] }),
|
|
2042
|
-
|
|
2054
|
+
ke && /* @__PURE__ */ J("div", {
|
|
2043
2055
|
className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
|
|
2044
2056
|
children: [/* @__PURE__ */ q(z, {
|
|
2045
2057
|
size: 15,
|
|
@@ -2052,11 +2064,11 @@ var Ke = Se`
|
|
|
2052
2064
|
className: "flex flex-wrap items-center gap-2 border-t pt-4",
|
|
2053
2065
|
children: [
|
|
2054
2066
|
/* @__PURE__ */ q("input", {
|
|
2055
|
-
ref:
|
|
2067
|
+
ref: se,
|
|
2056
2068
|
type: "file",
|
|
2057
2069
|
accept: ".json,application/json",
|
|
2058
2070
|
className: "hidden",
|
|
2059
|
-
onChange:
|
|
2071
|
+
onChange: Ee
|
|
2060
2072
|
}),
|
|
2061
2073
|
/* @__PURE__ */ q("span", {
|
|
2062
2074
|
className: "text-xs text-text-secondary mr-1",
|
|
@@ -2064,15 +2076,15 @@ var Ke = Se`
|
|
|
2064
2076
|
}),
|
|
2065
2077
|
/* @__PURE__ */ J("button", {
|
|
2066
2078
|
type: "button",
|
|
2067
|
-
onClick: () =>
|
|
2079
|
+
onClick: () => se.current?.click(),
|
|
2068
2080
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2069
2081
|
children: [/* @__PURE__ */ q(U, { size: 12 }), u("devportal.importManifest", "Import")]
|
|
2070
2082
|
}),
|
|
2071
2083
|
/* @__PURE__ */ J("button", {
|
|
2072
2084
|
type: "button",
|
|
2073
|
-
onClick:
|
|
2085
|
+
onClick: De,
|
|
2074
2086
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
|
|
2075
|
-
children: [/* @__PURE__ */ q(
|
|
2087
|
+
children: [/* @__PURE__ */ q(de, { size: 12 }), u("devportal.exportManifest", "Export")]
|
|
2076
2088
|
}),
|
|
2077
2089
|
/* @__PURE__ */ q("span", {
|
|
2078
2090
|
className: "text-xs text-text-secondary",
|
|
@@ -2083,7 +2095,7 @@ var Ke = Se`
|
|
|
2083
2095
|
]
|
|
2084
2096
|
})
|
|
2085
2097
|
}),
|
|
2086
|
-
/* @__PURE__ */ q(
|
|
2098
|
+
/* @__PURE__ */ q(b, {
|
|
2087
2099
|
title: u("devportal.storePresentation", "Store Presence"),
|
|
2088
2100
|
description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
2089
2101
|
children: /* @__PURE__ */ J("div", {
|
|
@@ -2091,109 +2103,109 @@ var Ke = Se`
|
|
|
2091
2103
|
children: [
|
|
2092
2104
|
/* @__PURE__ */ J("div", {
|
|
2093
2105
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2094
|
-
children: [/* @__PURE__ */ q(
|
|
2106
|
+
children: [/* @__PURE__ */ q(Ve, {
|
|
2095
2107
|
label: u("devportal.iconUrl", "Icon"),
|
|
2096
2108
|
value: d.iconUrl,
|
|
2097
|
-
onChange: (e) =>
|
|
2109
|
+
onChange: (e) => O("iconUrl", e),
|
|
2098
2110
|
hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
|
|
2099
2111
|
aspectClass: "aspect-square",
|
|
2100
|
-
upload:
|
|
2101
|
-
uploading:
|
|
2102
|
-
progress:
|
|
2103
|
-
error:
|
|
2104
|
-
}), /* @__PURE__ */ q(
|
|
2112
|
+
upload: pe,
|
|
2113
|
+
uploading: me,
|
|
2114
|
+
progress: he,
|
|
2115
|
+
error: V
|
|
2116
|
+
}), /* @__PURE__ */ q(Ve, {
|
|
2105
2117
|
label: u("devportal.bannerUrl", "Banner"),
|
|
2106
2118
|
value: d.bannerUrl,
|
|
2107
|
-
onChange: (e) =>
|
|
2119
|
+
onChange: (e) => O("bannerUrl", e),
|
|
2108
2120
|
hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
|
|
2109
2121
|
aspectClass: "aspect-video",
|
|
2110
|
-
upload:
|
|
2111
|
-
uploading:
|
|
2112
|
-
progress:
|
|
2113
|
-
error:
|
|
2122
|
+
upload: ge,
|
|
2123
|
+
uploading: _e,
|
|
2124
|
+
progress: H,
|
|
2125
|
+
error: W
|
|
2114
2126
|
})]
|
|
2115
2127
|
}),
|
|
2116
|
-
/* @__PURE__ */ q(
|
|
2128
|
+
/* @__PURE__ */ q(D, {
|
|
2117
2129
|
label: u("devportal.videoUrl", "Demo Video URL"),
|
|
2118
2130
|
value: d.videoUrl,
|
|
2119
|
-
onChange: (e) =>
|
|
2131
|
+
onChange: (e) => O("videoUrl", e.target.value),
|
|
2120
2132
|
placeholder: "https://...",
|
|
2121
2133
|
hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2122
2134
|
}),
|
|
2123
|
-
/* @__PURE__ */ q(
|
|
2135
|
+
/* @__PURE__ */ q(ie, {
|
|
2124
2136
|
label: u("devportal.shortDescription", "Short Description"),
|
|
2125
2137
|
value: d.shortDescription,
|
|
2126
|
-
onChange: (e) =>
|
|
2138
|
+
onChange: (e) => O("shortDescription", e.target.value),
|
|
2127
2139
|
maxLength: 200,
|
|
2128
2140
|
rows: 2,
|
|
2129
2141
|
hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2130
2142
|
}),
|
|
2131
|
-
/* @__PURE__ */ q(
|
|
2143
|
+
/* @__PURE__ */ q(ie, {
|
|
2132
2144
|
label: u("devportal.longDescription", "Full Description"),
|
|
2133
2145
|
value: d.description,
|
|
2134
|
-
onChange: (e) =>
|
|
2146
|
+
onChange: (e) => O("description", e.target.value),
|
|
2135
2147
|
rows: 5,
|
|
2136
2148
|
hint: u("devportal.fullDescHint", "Markdown supported")
|
|
2137
2149
|
}),
|
|
2138
|
-
/* @__PURE__ */ q(
|
|
2150
|
+
/* @__PURE__ */ q(He, {
|
|
2139
2151
|
urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2140
|
-
onChange: (e) =>
|
|
2141
|
-
upload:
|
|
2142
|
-
uploading:
|
|
2143
|
-
progress:
|
|
2144
|
-
error:
|
|
2152
|
+
onChange: (e) => O("screenshotsText", e.join("\n")),
|
|
2153
|
+
upload: G,
|
|
2154
|
+
uploading: be,
|
|
2155
|
+
progress: xe,
|
|
2156
|
+
error: Se
|
|
2145
2157
|
})
|
|
2146
2158
|
]
|
|
2147
2159
|
})
|
|
2148
2160
|
}),
|
|
2149
|
-
/* @__PURE__ */ q(
|
|
2161
|
+
/* @__PURE__ */ q(b, {
|
|
2150
2162
|
title: u("devportal.linksPolicies", "Links & Policies"),
|
|
2151
2163
|
description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
2152
2164
|
children: /* @__PURE__ */ J("div", {
|
|
2153
2165
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2154
2166
|
children: [
|
|
2155
|
-
/* @__PURE__ */ q(
|
|
2167
|
+
/* @__PURE__ */ q(D, {
|
|
2156
2168
|
label: u("devportal.websiteUrl", "Website"),
|
|
2157
2169
|
value: d.websiteUrl,
|
|
2158
|
-
onChange: (e) =>
|
|
2170
|
+
onChange: (e) => O("websiteUrl", e.target.value),
|
|
2159
2171
|
placeholder: "https://..."
|
|
2160
2172
|
}),
|
|
2161
|
-
/* @__PURE__ */ q(
|
|
2173
|
+
/* @__PURE__ */ q(D, {
|
|
2162
2174
|
label: u("devportal.documentationUrl", "Documentation"),
|
|
2163
2175
|
value: d.documentationUrl,
|
|
2164
|
-
onChange: (e) =>
|
|
2176
|
+
onChange: (e) => O("documentationUrl", e.target.value),
|
|
2165
2177
|
placeholder: "https://..."
|
|
2166
2178
|
}),
|
|
2167
|
-
/* @__PURE__ */ q(
|
|
2179
|
+
/* @__PURE__ */ q(D, {
|
|
2168
2180
|
label: u("devportal.githubUrl", "GitHub"),
|
|
2169
2181
|
value: d.githubUrl,
|
|
2170
|
-
onChange: (e) =>
|
|
2182
|
+
onChange: (e) => O("githubUrl", e.target.value),
|
|
2171
2183
|
placeholder: "https://github.com/..."
|
|
2172
2184
|
}),
|
|
2173
|
-
/* @__PURE__ */ q(
|
|
2185
|
+
/* @__PURE__ */ q(D, {
|
|
2174
2186
|
label: u("devportal.supportUrl", "Support"),
|
|
2175
2187
|
value: d.supportUrl,
|
|
2176
|
-
onChange: (e) =>
|
|
2188
|
+
onChange: (e) => O("supportUrl", e.target.value),
|
|
2177
2189
|
placeholder: "https://..."
|
|
2178
2190
|
}),
|
|
2179
|
-
/* @__PURE__ */ q(
|
|
2191
|
+
/* @__PURE__ */ q(D, {
|
|
2180
2192
|
label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2181
2193
|
value: d.privacyPolicyUrl,
|
|
2182
|
-
onChange: (e) =>
|
|
2194
|
+
onChange: (e) => O("privacyPolicyUrl", e.target.value),
|
|
2183
2195
|
placeholder: "https://...",
|
|
2184
2196
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2185
2197
|
}),
|
|
2186
|
-
/* @__PURE__ */ q(
|
|
2198
|
+
/* @__PURE__ */ q(D, {
|
|
2187
2199
|
label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2188
2200
|
value: d.termsOfServiceUrl,
|
|
2189
|
-
onChange: (e) =>
|
|
2201
|
+
onChange: (e) => O("termsOfServiceUrl", e.target.value),
|
|
2190
2202
|
placeholder: "https://...",
|
|
2191
2203
|
hint: u("devportal.requiredForStore", "Required for store submission")
|
|
2192
2204
|
})
|
|
2193
2205
|
]
|
|
2194
2206
|
})
|
|
2195
2207
|
}),
|
|
2196
|
-
/* @__PURE__ */ q(
|
|
2208
|
+
/* @__PURE__ */ q(b, {
|
|
2197
2209
|
title: u("devportal.pricing", "Pricing"),
|
|
2198
2210
|
description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
|
|
2199
2211
|
children: /* @__PURE__ */ J("div", {
|
|
@@ -2203,24 +2215,24 @@ var Ke = Se`
|
|
|
2203
2215
|
children: u("devportal.pricingType", "Pricing Type")
|
|
2204
2216
|
}), /* @__PURE__ */ q("div", {
|
|
2205
2217
|
className: "flex flex-wrap gap-2",
|
|
2206
|
-
children:
|
|
2218
|
+
children: We.map((e) => /* @__PURE__ */ q("button", {
|
|
2207
2219
|
type: "button",
|
|
2208
|
-
onClick: () =>
|
|
2220
|
+
onClick: () => O("pricingType", e.value),
|
|
2209
2221
|
className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
|
|
2210
2222
|
children: e.label
|
|
2211
2223
|
}, e.value))
|
|
2212
|
-
})] }),
|
|
2224
|
+
})] }), Ae && /* @__PURE__ */ J("div", {
|
|
2213
2225
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2214
|
-
children: [/* @__PURE__ */ q(
|
|
2226
|
+
children: [/* @__PURE__ */ q(D, {
|
|
2215
2227
|
label: u("devportal.price", "Price"),
|
|
2216
2228
|
type: "number",
|
|
2217
2229
|
value: d.price,
|
|
2218
|
-
onChange: (e) =>
|
|
2230
|
+
onChange: (e) => O("price", e.target.value),
|
|
2219
2231
|
placeholder: "0.00"
|
|
2220
|
-
}), /* @__PURE__ */ q(
|
|
2232
|
+
}), /* @__PURE__ */ q(D, {
|
|
2221
2233
|
label: u("devportal.currency", "Currency"),
|
|
2222
2234
|
value: d.currency,
|
|
2223
|
-
onChange: (e) =>
|
|
2235
|
+
onChange: (e) => O("currency", e.target.value),
|
|
2224
2236
|
placeholder: "USD"
|
|
2225
2237
|
})]
|
|
2226
2238
|
})]
|
|
@@ -2231,34 +2243,34 @@ var Ke = Se`
|
|
|
2231
2243
|
children: [
|
|
2232
2244
|
/* @__PURE__ */ q("button", {
|
|
2233
2245
|
type: "button",
|
|
2234
|
-
onClick:
|
|
2246
|
+
onClick: ae,
|
|
2235
2247
|
disabled: p,
|
|
2236
2248
|
className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
2237
2249
|
children: p ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
2238
2250
|
size: 16,
|
|
2239
2251
|
className: "animate-spin"
|
|
2240
|
-
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2252
|
+
}), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ye, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
|
|
2241
2253
|
}),
|
|
2242
|
-
!
|
|
2254
|
+
!je && !Z && /* @__PURE__ */ q("button", {
|
|
2243
2255
|
type: "button",
|
|
2244
|
-
onClick: () => void
|
|
2245
|
-
disabled:
|
|
2256
|
+
onClick: () => void oe(),
|
|
2257
|
+
disabled: E || p,
|
|
2246
2258
|
className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
|
|
2247
|
-
children:
|
|
2259
|
+
children: E ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
|
|
2248
2260
|
size: 16,
|
|
2249
2261
|
className: "animate-spin"
|
|
2250
|
-
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2262
|
+
}), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ve, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
|
|
2251
2263
|
}),
|
|
2252
|
-
!
|
|
2264
|
+
!je && Z && /* @__PURE__ */ J("p", {
|
|
2253
2265
|
className: "text-xs text-muted-foreground flex items-center gap-1.5",
|
|
2254
|
-
children: [/* @__PURE__ */ q(
|
|
2266
|
+
children: [/* @__PURE__ */ q(ue, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
|
|
2255
2267
|
})
|
|
2256
2268
|
]
|
|
2257
2269
|
})
|
|
2258
2270
|
]
|
|
2259
2271
|
});
|
|
2260
2272
|
}, Q = ({ label: e, value: n, trend: r }) => {
|
|
2261
|
-
let { t: i } =
|
|
2273
|
+
let { t: i } = P();
|
|
2262
2274
|
return /* @__PURE__ */ J("div", {
|
|
2263
2275
|
className: "rounded-lg border bg-card p-4",
|
|
2264
2276
|
children: [
|
|
@@ -2290,7 +2302,7 @@ var Ke = Se`
|
|
|
2290
2302
|
rel: "noopener noreferrer",
|
|
2291
2303
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2292
2304
|
children: [/* @__PURE__ */ q(R, { size: 14 }), e]
|
|
2293
|
-
}),
|
|
2305
|
+
}), Ze = [
|
|
2294
2306
|
{
|
|
2295
2307
|
id: "auth",
|
|
2296
2308
|
label: "Authentication",
|
|
@@ -2362,14 +2374,14 @@ var Ke = Se`
|
|
|
2362
2374
|
description: "Access control configuration"
|
|
2363
2375
|
}
|
|
2364
2376
|
];
|
|
2365
|
-
function
|
|
2366
|
-
let t = Object.fromEntries(
|
|
2377
|
+
function Qe(e) {
|
|
2378
|
+
let t = Object.fromEntries(Ze.map((e) => [e.id, "none"]));
|
|
2367
2379
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2368
2380
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2369
2381
|
return t;
|
|
2370
2382
|
}
|
|
2371
|
-
var
|
|
2372
|
-
let t = e.manifest ?? {}, [n, r] =
|
|
2383
|
+
var $e = ({ app: e }) => {
|
|
2384
|
+
let t = e.manifest ?? {}, [n, r] = N(() => Qe(t)), [i, a] = N(!1), [o, s] = N(!1), [c] = v(), l = (e, t) => {
|
|
2373
2385
|
s(!1), r((n) => ({
|
|
2374
2386
|
...n,
|
|
2375
2387
|
[e]: t
|
|
@@ -2400,7 +2412,7 @@ var Ze = ({ app: e }) => {
|
|
|
2400
2412
|
"read",
|
|
2401
2413
|
"write"
|
|
2402
2414
|
];
|
|
2403
|
-
return /* @__PURE__ */ q(
|
|
2415
|
+
return /* @__PURE__ */ q(b, {
|
|
2404
2416
|
title: "Permissions",
|
|
2405
2417
|
description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
|
|
2406
2418
|
children: /* @__PURE__ */ J("div", {
|
|
@@ -2421,7 +2433,7 @@ var Ze = ({ app: e }) => {
|
|
|
2421
2433
|
}, e))]
|
|
2422
2434
|
}) }), /* @__PURE__ */ q("tbody", {
|
|
2423
2435
|
className: "divide-y divide-border",
|
|
2424
|
-
children:
|
|
2436
|
+
children: Ze.map((e) => /* @__PURE__ */ J("tr", {
|
|
2425
2437
|
className: "hover:bg-muted/30 transition-colors",
|
|
2426
2438
|
children: [/* @__PURE__ */ J("td", {
|
|
2427
2439
|
className: "px-4 py-3",
|
|
@@ -2458,7 +2470,7 @@ var Ze = ({ app: e }) => {
|
|
|
2458
2470
|
className: "flex items-center justify-end gap-3",
|
|
2459
2471
|
children: [o && /* @__PURE__ */ J("span", {
|
|
2460
2472
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2461
|
-
children: [/* @__PURE__ */ q(
|
|
2473
|
+
children: [/* @__PURE__ */ q(L, { size: 14 }), "Saved"]
|
|
2462
2474
|
}), /* @__PURE__ */ J("button", {
|
|
2463
2475
|
type: "button",
|
|
2464
2476
|
onClick: () => void u(),
|
|
@@ -2475,6 +2487,6 @@ var Ze = ({ app: e }) => {
|
|
|
2475
2487
|
});
|
|
2476
2488
|
};
|
|
2477
2489
|
//#endregion
|
|
2478
|
-
export {
|
|
2490
|
+
export { je as ApplicationDetailPage };
|
|
2479
2491
|
|
|
2480
2492
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|