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