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