@burdenoff/microfe-devportal 2026.1107.2 → 2026.1107.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/ApplicationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +743 -726
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/utils/submitForReview.d.ts +40 -0
- package/dist/devportal/utils/submitForReview.d.ts.map +1 -0
- package/dist/devportal/utils/submitForReview.js +37 -0
- package/dist/devportal/utils/submitForReview.js.map +1 -0
- package/package.json +1 -1
|
@@ -18,13 +18,14 @@ import { DEVELOPER_LINKS as ce } from "../constants/developerLinks.js";
|
|
|
18
18
|
import { useDevportalPermission as le } from "../hooks/usePermission.js";
|
|
19
19
|
import { DEVPORTAL_PERMISSIONS as ue } from "../constants/permissions.js";
|
|
20
20
|
import { ImageUploadField as de, ScreenshotGallery as fe } from "../components/ImageUploadField.js";
|
|
21
|
-
import { usePackageUpload as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
21
|
+
import { usePackageUpload as pe } from "../hooks/usePackageUpload.js";
|
|
22
|
+
import { submitForReview as me } from "../utils/submitForReview.js";
|
|
23
|
+
import { useCallback as A, useEffect as he, useMemo as j, useRef as ge, useState as M } from "react";
|
|
24
|
+
import { Markdown as _e } from "@burdenoff/fe-libs/shared/components";
|
|
25
|
+
import { AlertCircle as N, AppWindow as ve, BarChart3 as ye, Check as P, CheckCircle as be, ChevronRight as xe, CircleDollarSign as F, Clock as Se, Copy as Ce, Edit as we, ExternalLink as I, FlaskConical as Te, Gift as Ee, Info as De, Key as L, Link as Oe, Loader2 as R, Lock as ke, MoreHorizontal as Ae, Package as je, Plus as z, Power as Me, RefreshCw as Ne, SendHorizontal as Pe, Shield as B, Store as Fe, TrendingUp as Ie, Upload as Le, Users as Re, Wallet as V, Webhook as ze, X as Be, XCircle as Ve } from "lucide-react";
|
|
25
26
|
import { useParams as He } from "react-router";
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import { useI18n as
|
|
27
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
28
|
+
import { useI18n as G } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
28
29
|
import { CTAOverflowMenu as Ue, EmphasisPanel as We, GlassCard as Ge } from "@burdenoff/fe-libs/ui";
|
|
29
30
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
30
31
|
function Ke(e) {
|
|
@@ -147,12 +148,12 @@ var Xe = [
|
|
|
147
148
|
{
|
|
148
149
|
id: "overview",
|
|
149
150
|
label: "Overview",
|
|
150
|
-
icon:
|
|
151
|
+
icon: ve
|
|
151
152
|
},
|
|
152
153
|
{
|
|
153
154
|
id: "analytics",
|
|
154
155
|
label: "Analytics",
|
|
155
|
-
icon:
|
|
156
|
+
icon: ye
|
|
156
157
|
},
|
|
157
158
|
{
|
|
158
159
|
id: "store-listing",
|
|
@@ -172,7 +173,7 @@ var Xe = [
|
|
|
172
173
|
{
|
|
173
174
|
id: "permissions",
|
|
174
175
|
label: "Permissions",
|
|
175
|
-
icon:
|
|
176
|
+
icon: B
|
|
176
177
|
},
|
|
177
178
|
{
|
|
178
179
|
id: "webhooks",
|
|
@@ -182,7 +183,7 @@ var Xe = [
|
|
|
182
183
|
{
|
|
183
184
|
id: "delegations",
|
|
184
185
|
label: "Delegations",
|
|
185
|
-
icon:
|
|
186
|
+
icon: Re
|
|
186
187
|
},
|
|
187
188
|
{
|
|
188
189
|
id: "playground",
|
|
@@ -197,342 +198,358 @@ var Xe = [
|
|
|
197
198
|
{
|
|
198
199
|
id: "api-keys",
|
|
199
200
|
label: "API Keys",
|
|
200
|
-
icon:
|
|
201
|
+
icon: L
|
|
201
202
|
}
|
|
202
|
-
],
|
|
203
|
+
], Ze = {
|
|
203
204
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
204
205
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
205
206
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
206
|
-
},
|
|
207
|
+
}, Qe = ({ message: e = "Loading..." }) => /* @__PURE__ */ W("div", {
|
|
207
208
|
className: "flex items-center justify-center gap-3 py-12",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ U(R, {
|
|
209
210
|
size: 20,
|
|
210
211
|
className: "animate-spin text-text-secondary"
|
|
211
|
-
}), /* @__PURE__ */
|
|
212
|
+
}), /* @__PURE__ */ U("p", {
|
|
212
213
|
className: "text-sm text-text-secondary",
|
|
213
214
|
children: e
|
|
214
215
|
})]
|
|
215
|
-
}),
|
|
216
|
+
}), K = ({ message: e }) => /* @__PURE__ */ W("div", {
|
|
216
217
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ U(N, {
|
|
218
219
|
size: 32,
|
|
219
220
|
className: "text-status-error-text"
|
|
220
|
-
}), /* @__PURE__ */
|
|
221
|
+
}), /* @__PURE__ */ U("p", {
|
|
221
222
|
className: "text-sm text-text-secondary",
|
|
222
223
|
children: e
|
|
223
224
|
})]
|
|
224
|
-
}),
|
|
225
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } =
|
|
225
|
+
}), q = () => {
|
|
226
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = G(), m = (e, t) => {
|
|
226
227
|
let n = u(e);
|
|
227
228
|
return n === e ? t : n;
|
|
228
|
-
}, { allowed: g } = le(ue.APP_UPDATE), { allowed: y } = le(ue.APP_DELETE), { appId: b } = He(), [S, D] =
|
|
229
|
+
}, { allowed: g } = le(ue.APP_UPDATE), { allowed: y } = le(ue.APP_DELETE), { appId: b } = He(), [S, D] = M("overview"), [te, ne] = M(!1), [k, ie] = M(!1), [se, ce] = M(null), [de, fe] = M(null), [pe, he] = M(!1), { data: j, loading: ge, error: _e, refetch: ye } = s({
|
|
229
230
|
variables: { id: b },
|
|
230
231
|
skip: !b
|
|
231
|
-
}), [
|
|
232
|
+
}), [F, { loading: Ce }] = h(), [I, { loading: Ee }] = a(), [De, { loading: L }] = _(), [Oe] = p(), [ke, { loading: Ae }] = f(), [je, { loading: z }] = v(), { data: B, refetch: Ie } = d({
|
|
232
233
|
variables: {
|
|
233
234
|
applicationId: b,
|
|
234
235
|
workspaceId: c ?? void 0
|
|
235
236
|
},
|
|
236
237
|
skip: !c || !b,
|
|
237
238
|
fetchPolicy: "cache-and-network"
|
|
238
|
-
}),
|
|
239
|
-
variables: { id:
|
|
240
|
-
skip: !
|
|
239
|
+
}), Le = B?.appInstallations?.edges?.[0]?.node ?? null, { data: Re } = l({
|
|
240
|
+
variables: { id: j?.application?.developerOrganizationId ?? "" },
|
|
241
|
+
skip: !j?.application?.developerOrganizationId,
|
|
241
242
|
fetchPolicy: "cache-first"
|
|
242
|
-
}),
|
|
243
|
+
}), V = A((e) => {
|
|
243
244
|
i?.(`${o}${e}`);
|
|
244
|
-
}, [i, o]),
|
|
245
|
-
let e =
|
|
245
|
+
}, [i, o]), ze = A(async () => {
|
|
246
|
+
let e = j?.application?.appId;
|
|
246
247
|
if (e) try {
|
|
247
|
-
let t = (await
|
|
248
|
+
let t = (await F({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
248
249
|
t && ce(t), ne(!1);
|
|
249
250
|
} catch {}
|
|
250
|
-
}, [
|
|
251
|
+
}, [j?.application?.appId, F]), Be = A(async () => {
|
|
251
252
|
if (b) try {
|
|
252
|
-
await
|
|
253
|
+
await I({ variables: { id: b } }), ie(!1), V("/apps");
|
|
253
254
|
} catch {}
|
|
254
255
|
}, [
|
|
255
256
|
b,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
]),
|
|
257
|
+
I,
|
|
258
|
+
V
|
|
259
|
+
]), We = A(async (e) => {
|
|
259
260
|
if (!(!b || !c)) try {
|
|
260
|
-
await
|
|
261
|
+
await ke({ variables: { input: {
|
|
261
262
|
applicationId: b,
|
|
262
263
|
scope: "WORKSPACE",
|
|
263
264
|
workspaceId: c,
|
|
264
265
|
autoUpdate: !1,
|
|
265
266
|
...e ? { version: e } : {}
|
|
266
|
-
} } }),
|
|
267
|
+
} } }), Ie(), O("success");
|
|
267
268
|
} catch (e) {
|
|
268
269
|
console.error("[DevPortal] Test in Workspace failed:", e), O("error");
|
|
269
270
|
}
|
|
270
271
|
}, [
|
|
271
272
|
b,
|
|
272
273
|
c,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
]), [
|
|
274
|
+
ke,
|
|
275
|
+
Ie
|
|
276
|
+
]), [Ge, qe] = M(!1), [Je, Ye] = M(""), Ze = A(async (e) => {
|
|
276
277
|
try {
|
|
277
|
-
await
|
|
278
|
+
await je({ variables: { id: e } }), Ie(), O("success");
|
|
278
279
|
} catch {
|
|
279
280
|
O("error");
|
|
280
281
|
}
|
|
281
|
-
}, [
|
|
282
|
-
if (b)
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
me();
|
|
290
|
-
}
|
|
282
|
+
}, [je, Ie]), Qe = A(async () => {
|
|
283
|
+
if (!b) return;
|
|
284
|
+
fe(null);
|
|
285
|
+
let e = await me((j?.application?.versions?.edges ?? []).map((e) => e.node), {
|
|
286
|
+
publishVersion: (e) => Oe({ variables: { id: e } }),
|
|
287
|
+
submitApplication: () => De({ variables: { id: b } })
|
|
288
|
+
});
|
|
289
|
+
e.ok ? O("success") : (fe(e.message), O("error")), ye();
|
|
291
290
|
}, [
|
|
292
291
|
b,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
292
|
+
j?.application?.versions?.edges,
|
|
293
|
+
Oe,
|
|
294
|
+
De,
|
|
295
|
+
ye
|
|
297
296
|
]);
|
|
298
|
-
if (
|
|
299
|
-
if (
|
|
297
|
+
if (ge && !j) return /* @__PURE__ */ U(n, { message: m("devportal.loadingApplication", "Loading application...") });
|
|
298
|
+
if (_e) return /* @__PURE__ */ U(x, {
|
|
300
299
|
title: m("devportal.error", "Error"),
|
|
301
300
|
backLink: `${o}/apps`,
|
|
302
301
|
backLabel: m("devportal.backToApplications", "Back to Applications"),
|
|
303
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ W("div", {
|
|
304
303
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
305
304
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ U(N, {
|
|
307
306
|
size: 48,
|
|
308
307
|
className: "text-status-error-text mb-4"
|
|
309
308
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ U("h3", {
|
|
311
310
|
className: "text-lg font-semibold mb-2",
|
|
312
311
|
children: m("devportal.failedToLoadApplication", "Failed to load application")
|
|
313
312
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ U("p", {
|
|
315
314
|
className: "text-sm text-text-secondary",
|
|
316
|
-
children:
|
|
315
|
+
children: _e.message
|
|
317
316
|
})
|
|
318
317
|
]
|
|
319
318
|
})
|
|
320
319
|
});
|
|
321
|
-
let
|
|
322
|
-
if (!
|
|
320
|
+
let K = Ke(j?.application);
|
|
321
|
+
if (!K) return /* @__PURE__ */ U(x, {
|
|
323
322
|
title: m("devportal.notFound", "Not Found"),
|
|
324
323
|
backLink: `${o}/apps`,
|
|
325
324
|
backLabel: m("devportal.backToApplications", "Back to Applications"),
|
|
326
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ U(r, {
|
|
327
326
|
illustration: "empty-generic",
|
|
328
|
-
icon: /* @__PURE__ */
|
|
327
|
+
icon: /* @__PURE__ */ U(ve, { size: 48 }),
|
|
329
328
|
title: m("devportal.applicationNotFound", "Application not found"),
|
|
330
329
|
description: m("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
331
330
|
})
|
|
332
331
|
});
|
|
333
|
-
let
|
|
332
|
+
let q = [
|
|
334
333
|
"NODE",
|
|
335
334
|
"WORKFLOW",
|
|
336
335
|
"PARSER",
|
|
337
336
|
"WIDGET",
|
|
338
337
|
"DASHBOARD"
|
|
339
|
-
].includes(
|
|
340
|
-
...
|
|
338
|
+
].includes(K.appType), J = K.appType === "API_INTEGRATION", Y = j?.application?.versions?.totalCount ?? 0, tt = K.appType === "NODE", ct = j?.application?.versions?.edges ?? [], lt = ct.find((e) => e.node.isLatest)?.node ?? ct[0]?.node ?? null, ut = (lt?.metadata ?? {}).sandboxBuildStatus, dt = tt && ut !== "READY", pt = dt ? ut === "FAILED" || ut === "DISPATCH_FAILED" ? m("devportal.testInWorkspaceBuildFailed", "Test in Workspace (sandbox build failed)") : m("devportal.testInWorkspaceBuilding", "Test in Workspace (building sandbox image…)") : m("devportal.testInWorkspace", "Test in Workspace"), mt = K.pricingType === "PAID", ht = Re?.developerOrganization, gt = ht?.platformFeeRate ?? .3, X = !!ht?.billingAccountId, Z = K.pricingDetails ?? {}, Q = K.pricingType === "FREE" || K.pricingType === "PAID" && typeof Z.price == "number" && Z.price > 0, $ = !!K.description?.trim() && !!K.category && !!K.iconUrl && (K.visibility === "PUBLIC" || K.visibility === "UNLISTED") && (!q && !J || Y > 0) && (!mt || X) && Q, vt = $ && K.status !== "PUBLISHED" && K.status !== "SUBMITTED" && K.status !== "INACTIVE" && K.status !== "REVOKED", yt = [
|
|
339
|
+
...q ? [] : [{
|
|
341
340
|
label: m("devportal.rotateSecret", "Rotate Secret"),
|
|
342
|
-
icon: /* @__PURE__ */
|
|
343
|
-
disabled: !
|
|
341
|
+
icon: /* @__PURE__ */ U(Ne, { size: 16 }),
|
|
342
|
+
disabled: !K.appId,
|
|
344
343
|
onSelect: () => ne(!0)
|
|
345
344
|
}],
|
|
346
|
-
...!
|
|
345
|
+
...!q || tt ? Le ? [{
|
|
347
346
|
label: m("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
348
|
-
icon: /* @__PURE__ */
|
|
349
|
-
disabled:
|
|
350
|
-
onSelect: () => void
|
|
347
|
+
icon: /* @__PURE__ */ U(Ve, { size: 16 }),
|
|
348
|
+
disabled: z || !c,
|
|
349
|
+
onSelect: () => void Ze(Le.id)
|
|
351
350
|
}] : [{
|
|
352
|
-
label:
|
|
353
|
-
icon: /* @__PURE__ */
|
|
354
|
-
disabled:
|
|
351
|
+
label: pt,
|
|
352
|
+
icon: /* @__PURE__ */ U(Te, { size: 16 }),
|
|
353
|
+
disabled: Ae || !c || dt,
|
|
355
354
|
onSelect: () => {
|
|
356
|
-
if (
|
|
357
|
-
|
|
355
|
+
if (ct.length <= 1) {
|
|
356
|
+
We(lt?.version);
|
|
358
357
|
return;
|
|
359
358
|
}
|
|
360
|
-
|
|
359
|
+
Ye(lt?.version ?? ""), qe(!0);
|
|
361
360
|
}
|
|
362
361
|
}] : [],
|
|
363
362
|
{
|
|
364
363
|
label: m("devportal.deactivate", "Deactivate"),
|
|
365
|
-
icon: /* @__PURE__ */
|
|
364
|
+
icon: /* @__PURE__ */ U(Me, { size: 16 }),
|
|
366
365
|
intent: "destructive",
|
|
367
366
|
disabled: !y,
|
|
368
367
|
onSelect: () => ie(!0)
|
|
369
368
|
}
|
|
370
369
|
];
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
title:
|
|
373
|
-
description:
|
|
370
|
+
return /* @__PURE__ */ W(x, {
|
|
371
|
+
title: K.name,
|
|
372
|
+
description: K.shortDescription,
|
|
374
373
|
purpose: m("devportal.appDetailPurpose", "Everything about this application in one place — its credentials, the permissions and webhooks it uses, its analytics, and its store listing. Use the tabs to configure each area, then edit or publish when it is ready."),
|
|
375
374
|
backLink: `${o}/apps`,
|
|
376
375
|
backLabel: m("devportal.backToApplications", "Back to Applications"),
|
|
377
|
-
actions: /* @__PURE__ */
|
|
376
|
+
actions: /* @__PURE__ */ W("div", {
|
|
378
377
|
className: "flex items-center gap-2",
|
|
379
|
-
children: [
|
|
378
|
+
children: [K.status === "SUBMITTED" ? /* @__PURE__ */ W("div", {
|
|
380
379
|
className: "flex items-center gap-1.5 rounded-full border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-1.5 text-xs font-medium text-status-warning-text",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
382
|
-
}) :
|
|
380
|
+
children: [/* @__PURE__ */ U(Se, { size: 13 }), m("devportal.underReview", "Under Review")]
|
|
381
|
+
}) : K.status !== "PUBLISHED" && K.status !== "INACTIVE" && K.status !== "REVOKED" ? /* @__PURE__ */ U("button", {
|
|
383
382
|
type: "button",
|
|
384
|
-
onClick: () => void
|
|
385
|
-
disabled: !
|
|
386
|
-
title:
|
|
387
|
-
!
|
|
388
|
-
!
|
|
389
|
-
!
|
|
390
|
-
(
|
|
391
|
-
|
|
392
|
-
!
|
|
393
|
-
|
|
383
|
+
onClick: () => void Qe(),
|
|
384
|
+
disabled: !vt || L,
|
|
385
|
+
title: $ ? void 0 : [
|
|
386
|
+
!K.description?.trim() && "Add full description",
|
|
387
|
+
!K.category && "Select a category",
|
|
388
|
+
!K.iconUrl && "Upload an app icon",
|
|
389
|
+
(K.visibility === "PRIVATE" || K.visibility === "INTERNAL") && "Set visibility to Public (marketplace) or Unlisted (link sharing) — Private and Internal cannot be submitted for review",
|
|
390
|
+
q && Y === 0 && "Upload at least one version",
|
|
391
|
+
!Q && "Set pricing (choose Free or Paid in the Pricing tab)",
|
|
392
|
+
mt && !X && "Link a billing account to receive payments"
|
|
394
393
|
].filter(Boolean).join(" · "),
|
|
395
|
-
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors",
|
|
396
|
-
children:
|
|
394
|
+
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", vt && !L ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 cursor-pointer" : "cursor-not-allowed bg-bg-muted text-text-tertiary ring-1 ring-border-subtle"),
|
|
395
|
+
children: L ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(R, {
|
|
397
396
|
size: 15,
|
|
398
397
|
className: "animate-spin"
|
|
399
|
-
}), m("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */
|
|
400
|
-
}) : null, /* @__PURE__ */
|
|
398
|
+
}), m("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Pe, { size: 15 }), m("devportal.submitForReview", "Submit for Review")] })
|
|
399
|
+
}) : null, /* @__PURE__ */ U(Ue, {
|
|
401
400
|
primary: {
|
|
402
401
|
label: m("devportal.editApp", "Edit App"),
|
|
403
|
-
icon: /* @__PURE__ */
|
|
402
|
+
icon: /* @__PURE__ */ U(we, { size: 16 }),
|
|
404
403
|
disabled: !g,
|
|
405
|
-
onSelect: () =>
|
|
404
|
+
onSelect: () => V(`/apps/${K.id}/edit`)
|
|
406
405
|
},
|
|
407
|
-
actions:
|
|
406
|
+
actions: yt
|
|
408
407
|
})]
|
|
409
408
|
}),
|
|
410
409
|
children: [
|
|
411
|
-
se && /* @__PURE__ */
|
|
410
|
+
se && /* @__PURE__ */ U(ee, {
|
|
412
411
|
title: m("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
413
412
|
secret: se,
|
|
414
413
|
description: m("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
415
414
|
onDismiss: () => ce(null)
|
|
416
415
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ W("div", {
|
|
418
417
|
className: "flex flex-wrap items-center gap-2",
|
|
419
418
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
status:
|
|
419
|
+
/* @__PURE__ */ U(T, {
|
|
420
|
+
status: K.status,
|
|
422
421
|
type: "app"
|
|
423
422
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
title:
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
status:
|
|
423
|
+
/* @__PURE__ */ U("span", {
|
|
424
|
+
title: K.visibility === "PUBLIC" ? "Public — discoverable in the marketplace. Requires review approval before going live." : K.visibility === "UNLISTED" ? "Unlisted — not in the store, but accessible via a direct share link. You can still submit for marketplace review." : K.visibility === "INTERNAL" ? "Internal — visible to all members of your developer organization, but not to anyone outside." : "Private — only you (the creator) can see this. Other org members cannot access it.",
|
|
425
|
+
children: /* @__PURE__ */ U(T, {
|
|
426
|
+
status: K.visibility,
|
|
428
427
|
type: "app"
|
|
429
428
|
})
|
|
430
429
|
}),
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
/* @__PURE__ */
|
|
430
|
+
K.isVerified && /* @__PURE__ */ U(E, { verified: !0 }),
|
|
431
|
+
K.isFeatured && /* @__PURE__ */ U(w, {}),
|
|
432
|
+
/* @__PURE__ */ U("span", {
|
|
434
433
|
className: "text-sm text-text-secondary",
|
|
435
|
-
children: C[
|
|
434
|
+
children: C[K.appType] || K.appType
|
|
436
435
|
})
|
|
437
436
|
]
|
|
438
437
|
}),
|
|
439
|
-
|
|
438
|
+
de && K.status !== "SUBMITTED" && /* @__PURE__ */ W("div", {
|
|
439
|
+
role: "alert",
|
|
440
|
+
"data-testid": "devportal-submit-error",
|
|
441
|
+
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
442
|
+
children: [/* @__PURE__ */ U(Ve, {
|
|
443
|
+
size: 18,
|
|
444
|
+
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
445
|
+
}), /* @__PURE__ */ W("div", {
|
|
446
|
+
className: "text-sm",
|
|
447
|
+
children: [/* @__PURE__ */ U("p", {
|
|
448
|
+
className: "font-medium text-status-error-text",
|
|
449
|
+
children: m("devportal.submitFailed", "Submission failed")
|
|
450
|
+
}), /* @__PURE__ */ U("p", {
|
|
451
|
+
className: "mt-0.5 text-text-secondary",
|
|
452
|
+
children: de
|
|
453
|
+
})]
|
|
454
|
+
})]
|
|
455
|
+
}),
|
|
456
|
+
K.status === "SUBMITTED" && /* @__PURE__ */ W("div", {
|
|
440
457
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
442
459
|
size: 18,
|
|
443
460
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
444
|
-
}), /* @__PURE__ */
|
|
461
|
+
}), /* @__PURE__ */ W("div", {
|
|
445
462
|
className: "text-sm",
|
|
446
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ U("p", {
|
|
447
464
|
className: "font-medium text-status-warning-text",
|
|
448
465
|
children: m("devportal.underReview", "Under Review")
|
|
449
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ W("p", {
|
|
450
467
|
className: "mt-0.5 text-text-secondary",
|
|
451
|
-
children: [m("devportal.underReviewDesc", "Your submission is being reviewed by our team. You'll be notified of the outcome."),
|
|
468
|
+
children: [m("devportal.underReviewDesc", "Your submission is being reviewed by our team. You'll be notified of the outcome."), K.submittedAt && /* @__PURE__ */ W("span", {
|
|
452
469
|
className: "ml-1",
|
|
453
470
|
children: [
|
|
454
471
|
"Submitted ",
|
|
455
|
-
new Date(
|
|
472
|
+
new Date(K.submittedAt).toLocaleDateString(),
|
|
456
473
|
"."
|
|
457
474
|
]
|
|
458
475
|
})]
|
|
459
476
|
})]
|
|
460
477
|
})]
|
|
461
478
|
}),
|
|
462
|
-
|
|
479
|
+
K.status === "REJECTED" && /* @__PURE__ */ W("div", {
|
|
463
480
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ U(Ve, {
|
|
465
482
|
size: 18,
|
|
466
483
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
467
|
-
}), /* @__PURE__ */
|
|
484
|
+
}), /* @__PURE__ */ W("div", {
|
|
468
485
|
className: "text-sm",
|
|
469
486
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ U("p", {
|
|
471
488
|
className: "font-medium text-status-error-text",
|
|
472
489
|
children: m("devportal.reviewRejected", "Review Rejected")
|
|
473
490
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ U("p", {
|
|
475
492
|
className: "mt-0.5 text-text-secondary",
|
|
476
|
-
children:
|
|
493
|
+
children: K.reviewNotes || m("devportal.reviewRejectedDesc", "Your submission was not approved. Please review the feedback, update your app, and re-submit.")
|
|
477
494
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ U("button", {
|
|
479
496
|
type: "button",
|
|
480
|
-
onClick: () =>
|
|
497
|
+
onClick: () => V(`/apps/${K.id}/edit`),
|
|
481
498
|
className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-primary underline",
|
|
482
499
|
children: m("devportal.editAndResubmit", "Edit app and re-submit →")
|
|
483
500
|
})
|
|
484
501
|
]
|
|
485
502
|
})]
|
|
486
503
|
}),
|
|
487
|
-
|
|
504
|
+
K.status === "PUBLISHED" && /* @__PURE__ */ W("div", {
|
|
488
505
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
506
|
+
children: [/* @__PURE__ */ U(be, {
|
|
490
507
|
size: 18,
|
|
491
508
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
492
|
-
}), /* @__PURE__ */
|
|
509
|
+
}), /* @__PURE__ */ W("div", {
|
|
493
510
|
className: "text-sm",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ U("p", {
|
|
495
512
|
className: "font-medium text-status-success-text",
|
|
496
513
|
children: m("devportal.liveInStore", "Live in the Store")
|
|
497
|
-
}), /* @__PURE__ */
|
|
514
|
+
}), /* @__PURE__ */ U("p", {
|
|
498
515
|
className: "mt-0.5 text-text-secondary",
|
|
499
516
|
children: m("devportal.liveInStoreDesc", "Your app is published and visible to users in the marketplace.")
|
|
500
517
|
})]
|
|
501
518
|
})]
|
|
502
519
|
}),
|
|
503
|
-
|
|
520
|
+
K.status === "UNLISTED" && /* @__PURE__ */ W("div", {
|
|
504
521
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
522
|
+
children: [/* @__PURE__ */ U(N, {
|
|
506
523
|
size: 18,
|
|
507
524
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
508
|
-
}), /* @__PURE__ */
|
|
525
|
+
}), /* @__PURE__ */ W("div", {
|
|
509
526
|
className: "text-sm",
|
|
510
527
|
children: [
|
|
511
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ U("p", {
|
|
512
529
|
className: "font-medium text-status-warning-text",
|
|
513
530
|
children: m("devportal.delistedFromStore", "Delisted from the Store")
|
|
514
531
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ U("p", {
|
|
516
533
|
className: "mt-0.5 text-text-secondary",
|
|
517
534
|
children: m("devportal.delistedFromStoreDesc", "Your app has been removed from the marketplace and is no longer visible to new users. Existing installs continue to work.")
|
|
518
535
|
}),
|
|
519
|
-
|
|
536
|
+
K.reviewNotes && /* @__PURE__ */ W("p", {
|
|
520
537
|
className: "mt-2 rounded-md bg-status-warning-bg px-3 py-2 font-mono text-xs text-status-warning-text",
|
|
521
538
|
children: [
|
|
522
539
|
m("devportal.delistReason", "Reason"),
|
|
523
540
|
": ",
|
|
524
|
-
|
|
541
|
+
K.reviewNotes
|
|
525
542
|
]
|
|
526
543
|
})
|
|
527
544
|
]
|
|
528
545
|
})]
|
|
529
546
|
}),
|
|
530
|
-
(
|
|
531
|
-
let e = !!
|
|
532
|
-
!
|
|
533
|
-
!
|
|
534
|
-
!
|
|
535
|
-
(
|
|
547
|
+
(K.status === "DRAFT" || K.status === "REJECTED") && !$ && (() => {
|
|
548
|
+
let e = !!K.description?.trim() && !!K.category && !!K.iconUrl && (K.visibility === "PUBLIC" || K.visibility === "UNLISTED"), n = !q && !J || Y > 0, r = [
|
|
549
|
+
!K.description?.trim() && "Add a full description",
|
|
550
|
+
!K.category && "Select a category",
|
|
551
|
+
!K.iconUrl && "Upload an app icon",
|
|
552
|
+
(K.visibility === "PRIVATE" || K.visibility === "INTERNAL") && "Set to Public (marketplace) or Unlisted (share via link) — Private and Internal block review submission"
|
|
536
553
|
].filter(Boolean), i = [
|
|
537
554
|
{
|
|
538
555
|
id: "store",
|
|
@@ -541,14 +558,14 @@ var Xe = [
|
|
|
541
558
|
done: e,
|
|
542
559
|
onClick: () => D("store-listing")
|
|
543
560
|
},
|
|
544
|
-
...
|
|
561
|
+
...q ? [{
|
|
545
562
|
id: "version",
|
|
546
563
|
label: m("devportal.setupVersionStep", "Upload a Version"),
|
|
547
|
-
hint: n ? m("devportal.done", "Done") :
|
|
564
|
+
hint: n ? m("devportal.done", "Done") : K.appType === "NODE" ? m("devportal.uploadVersionHint", "Upload your ZIP bundle and manifest") : m("devportal.uploadManifestVersionHint", "Upload your manifest JSON"),
|
|
548
565
|
done: n,
|
|
549
566
|
onClick: () => D("versions")
|
|
550
567
|
}] : [],
|
|
551
|
-
...
|
|
568
|
+
...J ? [{
|
|
552
569
|
id: "version",
|
|
553
570
|
label: m("devportal.setupIntegrationVersionStep", "Publish a Version"),
|
|
554
571
|
hint: n ? m("devportal.done", "Done") : m("devportal.integrationVersionHint", "Define required scopes and publish your first API version"),
|
|
@@ -564,41 +581,41 @@ var Xe = [
|
|
|
564
581
|
{
|
|
565
582
|
id: "pricing",
|
|
566
583
|
label: m("devportal.setupPricingStep", "Set Pricing"),
|
|
567
|
-
hint:
|
|
568
|
-
done:
|
|
584
|
+
hint: Q ? m("devportal.done", "Done") : m("devportal.pricingHint", "Choose Free or set a credit price in the Pricing tab"),
|
|
585
|
+
done: Q,
|
|
569
586
|
onClick: () => D("pricing")
|
|
570
587
|
},
|
|
571
|
-
...
|
|
588
|
+
...mt ? [{
|
|
572
589
|
id: "billing",
|
|
573
590
|
label: m("devportal.setupBillingStep", "Link Billing Account"),
|
|
574
|
-
hint:
|
|
575
|
-
done:
|
|
591
|
+
hint: X ? m("devportal.done", "Done") : m("devportal.billingAccountHint", "Link a billing account to receive payouts — required for paid apps"),
|
|
592
|
+
done: X,
|
|
576
593
|
onClick: () => D("pricing")
|
|
577
594
|
}] : [],
|
|
578
595
|
{
|
|
579
596
|
id: "submit",
|
|
580
597
|
label: m("devportal.submitForReview", "Submit for Review"),
|
|
581
|
-
hint:
|
|
598
|
+
hint: $ ? m("devportal.readyToSubmit", "Ready — click Submit for Review above") : K.description?.trim() ? K.category ? K.iconUrl ? K.visibility === "PRIVATE" || K.visibility === "INTERNAL" ? m("devportal.hintPrivateVisibility", "Set visibility to Public (marketplace) or Unlisted (share via link) — Private and Internal cannot be submitted") : (q || J) && Y === 0 ? m("devportal.hintMissingVersion", "Upload at least one version") : Q ? mt && !X ? m("devportal.hintMissingBilling", "Link a billing account in the Pricing tab to receive payouts") : m("devportal.completeStepsFirst", "Complete the steps above first") : m("devportal.hintMissingPricing", "Choose Free or set a credit price in the Pricing tab") : m("devportal.hintMissingIcon", "Upload an app icon on the Store Listing tab") : m("devportal.hintMissingCategory", "Select a category on the Store Listing tab") : m("devportal.hintMissingDescription", "Add a full description on the Store Listing tab"),
|
|
582
599
|
done: !1,
|
|
583
600
|
onClick: void 0
|
|
584
601
|
}
|
|
585
602
|
], a = i.filter((e) => e.done).length;
|
|
586
|
-
return /* @__PURE__ */
|
|
603
|
+
return /* @__PURE__ */ W("div", {
|
|
587
604
|
className: "rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
605
|
+
children: [/* @__PURE__ */ U("div", {
|
|
589
606
|
className: "flex items-center justify-between border-b border-border-subtle px-5 py-4",
|
|
590
|
-
children: /* @__PURE__ */
|
|
607
|
+
children: /* @__PURE__ */ W("div", {
|
|
591
608
|
className: "flex items-center gap-3",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
609
|
+
children: [/* @__PURE__ */ U("div", {
|
|
593
610
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
594
|
-
children: /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ U(Fe, {
|
|
595
612
|
size: 16,
|
|
596
613
|
className: "text-primary"
|
|
597
614
|
})
|
|
598
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
599
616
|
className: "text-sm font-semibold text-text-primary",
|
|
600
617
|
children: m("devportal.completeSetup", "Complete your app setup")
|
|
601
|
-
}), /* @__PURE__ */
|
|
618
|
+
}), /* @__PURE__ */ W("p", {
|
|
602
619
|
className: "text-xs text-text-secondary",
|
|
603
620
|
children: [
|
|
604
621
|
a,
|
|
@@ -610,29 +627,29 @@ var Xe = [
|
|
|
610
627
|
]
|
|
611
628
|
})] })]
|
|
612
629
|
})
|
|
613
|
-
}), /* @__PURE__ */
|
|
630
|
+
}), /* @__PURE__ */ U("div", {
|
|
614
631
|
className: "divide-y divide-border-subtle",
|
|
615
|
-
children: i.map((e, n) => /* @__PURE__ */
|
|
632
|
+
children: i.map((e, n) => /* @__PURE__ */ W("button", {
|
|
616
633
|
type: "button",
|
|
617
634
|
onClick: e.onClick,
|
|
618
635
|
disabled: !e.onClick,
|
|
619
636
|
className: t("w-full flex items-center gap-4 px-5 py-4 text-left transition-colors", e.onClick ? "hover:bg-bg-sunken/40 cursor-pointer" : "cursor-default opacity-60"),
|
|
620
637
|
children: [
|
|
621
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ U("div", {
|
|
622
639
|
className: t("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-bold", e.done ? "bg-status-success-bg text-status-success-text" : "border-2 border-border-subtle bg-bg-sunken text-text-secondary"),
|
|
623
|
-
children: e.done ? /* @__PURE__ */
|
|
640
|
+
children: e.done ? /* @__PURE__ */ U(P, { size: 13 }) : n + 1
|
|
624
641
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ W("div", {
|
|
626
643
|
className: "flex-1 min-w-0",
|
|
627
|
-
children: [/* @__PURE__ */
|
|
644
|
+
children: [/* @__PURE__ */ U("p", {
|
|
628
645
|
className: t("text-sm font-medium", e.done ? "text-text-secondary line-through" : "text-text-primary"),
|
|
629
646
|
children: e.label
|
|
630
|
-
}), e.hint && !e.done && /* @__PURE__ */
|
|
647
|
+
}), e.hint && !e.done && /* @__PURE__ */ U("p", {
|
|
631
648
|
className: "mt-0.5 text-xs text-text-secondary truncate",
|
|
632
649
|
children: e.hint
|
|
633
650
|
})]
|
|
634
651
|
}),
|
|
635
|
-
e.onClick && !e.done && /* @__PURE__ */
|
|
652
|
+
e.onClick && !e.done && /* @__PURE__ */ U(xe, {
|
|
636
653
|
size: 16,
|
|
637
654
|
className: "flex-shrink-0 text-text-secondary"
|
|
638
655
|
})
|
|
@@ -641,198 +658,198 @@ var Xe = [
|
|
|
641
658
|
})]
|
|
642
659
|
});
|
|
643
660
|
})(),
|
|
644
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ U("div", {
|
|
645
662
|
className: "border-b",
|
|
646
|
-
children: /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ U("nav", {
|
|
647
664
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
648
665
|
role: "tablist",
|
|
649
666
|
"aria-label": m("devportal.applicationSections", "Application sections"),
|
|
650
|
-
children: Xe.filter((e) => !(
|
|
667
|
+
children: Xe.filter((e) => !(q && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground" || e.id === "oauth" || e.id === "api-keys") || !q && !J && e.id === "versions" || !J && (e.id === "oauth" || e.id === "api-keys"))).map((e) => {
|
|
651
668
|
let n = e.icon;
|
|
652
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ W("button", {
|
|
653
670
|
id: `application-tab-${e.id}`,
|
|
654
671
|
role: "tab",
|
|
655
672
|
"aria-selected": S === e.id,
|
|
656
673
|
"aria-controls": `application-panel-${e.id}`,
|
|
657
674
|
onClick: () => D(e.id),
|
|
658
675
|
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", S === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
659
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ U(n, { size: 16 }), e.label]
|
|
660
677
|
}, e.id);
|
|
661
678
|
})
|
|
662
679
|
})
|
|
663
680
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ W("div", {
|
|
665
682
|
className: "mt-6",
|
|
666
683
|
id: `application-panel-${S}`,
|
|
667
684
|
role: "tabpanel",
|
|
668
685
|
"aria-labelledby": `application-tab-${S}`,
|
|
669
686
|
tabIndex: 0,
|
|
670
687
|
children: [
|
|
671
|
-
S === "overview" && /* @__PURE__ */
|
|
672
|
-
app:
|
|
688
|
+
S === "overview" && /* @__PURE__ */ U(st, {
|
|
689
|
+
app: K,
|
|
673
690
|
appId: b,
|
|
674
|
-
refetch: () => void
|
|
691
|
+
refetch: () => void ye()
|
|
675
692
|
}),
|
|
676
|
-
S === "permissions" && /* @__PURE__ */
|
|
677
|
-
app:
|
|
678
|
-
versionScopes:
|
|
679
|
-
locked:
|
|
693
|
+
S === "permissions" && /* @__PURE__ */ U(Ct, {
|
|
694
|
+
app: K,
|
|
695
|
+
versionScopes: j?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? [],
|
|
696
|
+
locked: K.status === "PUBLISHED" || K.status === "APPROVED" || K.status === "ACTIVE",
|
|
680
697
|
onNavigateToVersions: () => D("versions")
|
|
681
698
|
}),
|
|
682
|
-
S === "webhooks" && /* @__PURE__ */
|
|
683
|
-
appId:
|
|
684
|
-
onNavigate:
|
|
699
|
+
S === "webhooks" && /* @__PURE__ */ U(it, {
|
|
700
|
+
appId: K.id,
|
|
701
|
+
onNavigate: V
|
|
685
702
|
}),
|
|
686
|
-
S === "delegations" && /* @__PURE__ */
|
|
687
|
-
authAppId:
|
|
688
|
-
appName:
|
|
689
|
-
onGrantDelegation: () =>
|
|
690
|
-
onNavigate:
|
|
703
|
+
S === "delegations" && /* @__PURE__ */ U(at, {
|
|
704
|
+
authAppId: K.appId || void 0,
|
|
705
|
+
appName: K.name,
|
|
706
|
+
onGrantDelegation: () => he(!0),
|
|
707
|
+
onNavigate: V
|
|
691
708
|
}),
|
|
692
|
-
S === "analytics" && /* @__PURE__ */
|
|
693
|
-
S === "playground" && /* @__PURE__ */
|
|
694
|
-
S === "oauth" && /* @__PURE__ */
|
|
695
|
-
appId:
|
|
696
|
-
onNavigate:
|
|
709
|
+
S === "analytics" && /* @__PURE__ */ U(ot, { appId: K.id }),
|
|
710
|
+
S === "playground" && /* @__PURE__ */ U(ft, { app: K }),
|
|
711
|
+
S === "oauth" && /* @__PURE__ */ U($e, {
|
|
712
|
+
appId: K.id,
|
|
713
|
+
onNavigate: V
|
|
697
714
|
}),
|
|
698
|
-
S === "api-keys" && /* @__PURE__ */
|
|
699
|
-
appId:
|
|
700
|
-
onNavigate:
|
|
715
|
+
S === "api-keys" && /* @__PURE__ */ U(et, {
|
|
716
|
+
appId: K.id,
|
|
717
|
+
onNavigate: V
|
|
701
718
|
}),
|
|
702
|
-
S === "store-listing" && /* @__PURE__ */
|
|
703
|
-
app:
|
|
704
|
-
versionCount:
|
|
705
|
-
isPackageApp:
|
|
706
|
-
pricingDone:
|
|
707
|
-
onNavigateToVersions:
|
|
719
|
+
S === "store-listing" && /* @__PURE__ */ U(_t, {
|
|
720
|
+
app: K,
|
|
721
|
+
versionCount: j?.application?.versions?.totalCount ?? 0,
|
|
722
|
+
isPackageApp: q,
|
|
723
|
+
pricingDone: Q,
|
|
724
|
+
onNavigateToVersions: q || J ? () => D("versions") : void 0,
|
|
708
725
|
onNavigateToPricing: () => D("pricing"),
|
|
709
|
-
onNavigateToSubmission: () =>
|
|
726
|
+
onNavigateToSubmission: () => V(`/apps/${K.id}/store-submission`)
|
|
710
727
|
}),
|
|
711
|
-
S === "pricing" && /* @__PURE__ */
|
|
712
|
-
app:
|
|
713
|
-
platformFeeRate:
|
|
714
|
-
billingAccountLinked:
|
|
715
|
-
onNavigateToRevenue: () =>
|
|
716
|
-
isReadyToSubmit:
|
|
728
|
+
S === "pricing" && /* @__PURE__ */ U(nt, {
|
|
729
|
+
app: K,
|
|
730
|
+
platformFeeRate: gt,
|
|
731
|
+
billingAccountLinked: X,
|
|
732
|
+
onNavigateToRevenue: () => V("/revenue"),
|
|
733
|
+
isReadyToSubmit: $
|
|
717
734
|
}),
|
|
718
|
-
S === "versions" && /* @__PURE__ */
|
|
719
|
-
appId:
|
|
720
|
-
onNavigate:
|
|
721
|
-
pricingDone:
|
|
735
|
+
S === "versions" && /* @__PURE__ */ U(rt, {
|
|
736
|
+
appId: K.id,
|
|
737
|
+
onNavigate: V,
|
|
738
|
+
pricingDone: Q,
|
|
722
739
|
onNavigateToPricing: () => D("pricing")
|
|
723
740
|
})
|
|
724
741
|
]
|
|
725
742
|
}),
|
|
726
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ U(ae, {
|
|
727
744
|
open: te,
|
|
728
745
|
onOpenChange: ne,
|
|
729
|
-
onConfirm:
|
|
746
|
+
onConfirm: ze,
|
|
730
747
|
title: m("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
731
748
|
description: m("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."),
|
|
732
749
|
confirmLabel: m("devportal.rotateSecret", "Rotate Secret"),
|
|
733
750
|
cancelLabel: m("devportal.cancel", "Cancel"),
|
|
734
751
|
variant: "warning",
|
|
735
|
-
loading:
|
|
752
|
+
loading: Ce
|
|
736
753
|
}),
|
|
737
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ U(ae, {
|
|
738
755
|
open: k,
|
|
739
756
|
onOpenChange: ie,
|
|
740
|
-
onConfirm:
|
|
757
|
+
onConfirm: Be,
|
|
741
758
|
title: m("devportal.deactivateApplication", "Deactivate Application"),
|
|
742
759
|
description: m("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."),
|
|
743
760
|
confirmLabel: m("devportal.deactivate", "Deactivate"),
|
|
744
761
|
cancelLabel: m("devportal.cancel", "Cancel"),
|
|
745
762
|
variant: "destructive",
|
|
746
|
-
loading:
|
|
763
|
+
loading: Ee
|
|
747
764
|
}),
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
open:
|
|
750
|
-
onOpenChange:
|
|
751
|
-
onConfirm: () =>
|
|
765
|
+
/* @__PURE__ */ U(ae, {
|
|
766
|
+
open: Ge,
|
|
767
|
+
onOpenChange: qe,
|
|
768
|
+
onConfirm: () => We(Je || void 0),
|
|
752
769
|
title: m("devportal.testInWorkspaceChooseVersion", "Test a Version"),
|
|
753
770
|
description: m("devportal.testInWorkspaceChooseVersionDescription", "Choose which version to install into your test workspace. This does not affect what other users see — it only installs the selected version for you to try here."),
|
|
754
771
|
confirmLabel: m("devportal.testInWorkspace", "Test in Workspace"),
|
|
755
772
|
cancelLabel: m("devportal.cancel", "Cancel"),
|
|
756
|
-
loading:
|
|
757
|
-
children: /* @__PURE__ */
|
|
773
|
+
loading: Ae,
|
|
774
|
+
children: /* @__PURE__ */ U(re, {
|
|
758
775
|
label: m("devportal.version", "Version"),
|
|
759
|
-
value:
|
|
760
|
-
onChange: (e) =>
|
|
761
|
-
options:
|
|
776
|
+
value: Je,
|
|
777
|
+
onChange: (e) => Ye(e.target.value),
|
|
778
|
+
options: ct.map((e) => ({
|
|
762
779
|
value: e.node.version,
|
|
763
780
|
label: e.node.isLatest ? `${e.node.version} — ${m("devportal.latest", "latest")} (${e.node.status})` : `${e.node.version} (${e.node.status})`
|
|
764
781
|
}))
|
|
765
782
|
})
|
|
766
783
|
}),
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
open:
|
|
769
|
-
onOpenChange:
|
|
770
|
-
appId:
|
|
771
|
-
appName:
|
|
772
|
-
appScopes:
|
|
784
|
+
/* @__PURE__ */ U(oe, {
|
|
785
|
+
open: pe,
|
|
786
|
+
onOpenChange: he,
|
|
787
|
+
appId: K.appId || "",
|
|
788
|
+
appName: K.name,
|
|
789
|
+
appScopes: K.scopes?.map((e) => e.scope) ?? [],
|
|
773
790
|
onSuccess: () => {
|
|
774
|
-
|
|
791
|
+
he(!1);
|
|
775
792
|
}
|
|
776
793
|
})
|
|
777
794
|
]
|
|
778
795
|
});
|
|
779
|
-
},
|
|
780
|
-
let { t } =
|
|
796
|
+
}, $e = ({ onNavigate: e }) => {
|
|
797
|
+
let { t } = G(), n = (e, n) => {
|
|
781
798
|
let r = t(e);
|
|
782
799
|
return r === e ? n : r;
|
|
783
800
|
};
|
|
784
|
-
return /* @__PURE__ */
|
|
801
|
+
return /* @__PURE__ */ W("div", {
|
|
785
802
|
className: "space-y-4 py-4 text-center",
|
|
786
803
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ U(B, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
805
|
+
/* @__PURE__ */ U("h3", {
|
|
789
806
|
className: "font-medium",
|
|
790
807
|
children: n("devportal.oauthApps", "OAuth Apps")
|
|
791
808
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ U("p", {
|
|
793
810
|
className: "text-sm text-text-secondary",
|
|
794
811
|
children: n("devportal.oauthAppsManagedCentrally", "OAuth apps are now managed centrally. Visit the OAuth Apps page to create and manage your apps.")
|
|
795
812
|
}),
|
|
796
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ W("button", {
|
|
797
814
|
onClick: () => e("/oauth"),
|
|
798
815
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
799
|
-
children: [/* @__PURE__ */
|
|
816
|
+
children: [/* @__PURE__ */ U(I, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
800
817
|
})
|
|
801
818
|
]
|
|
802
819
|
});
|
|
803
|
-
},
|
|
804
|
-
let { t } =
|
|
820
|
+
}, et = ({ onNavigate: e }) => {
|
|
821
|
+
let { t } = G(), n = (e, n) => {
|
|
805
822
|
let r = t(e);
|
|
806
823
|
return r === e ? n : r;
|
|
807
824
|
};
|
|
808
|
-
return /* @__PURE__ */
|
|
825
|
+
return /* @__PURE__ */ W("div", {
|
|
809
826
|
className: "space-y-4 py-4 text-center",
|
|
810
827
|
children: [
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ U(L, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
829
|
+
/* @__PURE__ */ U("h3", {
|
|
813
830
|
className: "font-medium",
|
|
814
831
|
children: n("devportal.apiKeys", "API Keys")
|
|
815
832
|
}),
|
|
816
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ U("p", {
|
|
817
834
|
className: "text-sm text-text-secondary",
|
|
818
835
|
children: n("devportal.apiKeysManagedCentrally", "API keys are now managed centrally. Visit the API Keys page to generate and manage your keys.")
|
|
819
836
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ W("button", {
|
|
821
838
|
onClick: () => e("/api-keys"),
|
|
822
839
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
823
|
-
children: [/* @__PURE__ */
|
|
840
|
+
children: [/* @__PURE__ */ U(I, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
824
841
|
})
|
|
825
842
|
]
|
|
826
843
|
});
|
|
827
|
-
},
|
|
828
|
-
let { t: o } =
|
|
844
|
+
}, J = .01, Y = (e) => e * J, tt = (e) => Math.round(e / J), nt = ({ app: e, platformFeeRate: n, billingAccountLinked: r, onNavigateToRevenue: i, isReadyToSubmit: a = !1 }) => {
|
|
845
|
+
let { t: o } = G(), s = (e, t) => {
|
|
829
846
|
let n = o(e);
|
|
830
847
|
return n === e ? t : n;
|
|
831
|
-
}, c = e.pricingDetails ?? {}, [l, u] =
|
|
848
|
+
}, c = e.pricingDetails ?? {}, [l, u] = M({
|
|
832
849
|
pricingType: e.pricingType ?? "FREE",
|
|
833
850
|
price: typeof c.price == "number" ? String(c.price) : ""
|
|
834
|
-
}), [d, f] =
|
|
835
|
-
m.current = e,
|
|
851
|
+
}), [d, f] = M(!1), [p] = b(), m = ge(e);
|
|
852
|
+
m.current = e, he(() => {
|
|
836
853
|
let e = m.current.pricingDetails ?? {};
|
|
837
854
|
u({
|
|
838
855
|
pricingType: m.current.pricingType ?? "FREE",
|
|
@@ -864,33 +881,33 @@ var Xe = [
|
|
|
864
881
|
} finally {
|
|
865
882
|
f(!1);
|
|
866
883
|
}
|
|
867
|
-
}, _ = l.pricingType !== "FREE", v = parseInt(l.price, 10), y = _ && !isNaN(v) && v > 0, x = y ?
|
|
884
|
+
}, _ = l.pricingType !== "FREE", v = parseInt(l.price, 10), y = _ && !isNaN(v) && v > 0, x = y ? Y(v) : 0, S = y ? Math.round(v * n) : 0, C = Y(S), w = y ? v - S : 0, T = Y(w), E = (e) => "$" + e.toLocaleString("en-US", {
|
|
868
885
|
minimumFractionDigits: 2,
|
|
869
886
|
maximumFractionDigits: 2
|
|
870
887
|
}), D = (e) => e.toLocaleString("en-US") + " cr";
|
|
871
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ W("div", {
|
|
872
889
|
className: "space-y-8",
|
|
873
890
|
children: [
|
|
874
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ W("div", {
|
|
875
892
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
876
|
-
children: [/* @__PURE__ */
|
|
893
|
+
children: [/* @__PURE__ */ U(F, {
|
|
877
894
|
size: 16,
|
|
878
895
|
className: "mt-0.5 shrink-0 text-primary"
|
|
879
|
-
}), /* @__PURE__ */
|
|
896
|
+
}), /* @__PURE__ */ W("p", {
|
|
880
897
|
className: "text-sm text-text-secondary",
|
|
881
898
|
children: [
|
|
882
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ U("span", {
|
|
883
900
|
className: "font-medium text-text-primary",
|
|
884
901
|
children: "Platform credits"
|
|
885
902
|
}),
|
|
886
903
|
" ",
|
|
887
904
|
"are the currency of the Burdenoff marketplace.",
|
|
888
905
|
" ",
|
|
889
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ W("span", {
|
|
890
907
|
className: "font-medium",
|
|
891
908
|
children: [
|
|
892
909
|
"1 credit = ",
|
|
893
|
-
E(
|
|
910
|
+
E(J),
|
|
894
911
|
" USD."
|
|
895
912
|
]
|
|
896
913
|
}),
|
|
@@ -899,41 +916,41 @@ var Xe = [
|
|
|
899
916
|
]
|
|
900
917
|
})]
|
|
901
918
|
}),
|
|
902
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ W("div", {
|
|
903
920
|
className: "space-y-3",
|
|
904
|
-
children: [/* @__PURE__ */
|
|
921
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h2", {
|
|
905
922
|
className: "text-lg font-semibold",
|
|
906
923
|
children: s("devportal.howMonetizationWorks", "How App Monetization Works")
|
|
907
|
-
}), /* @__PURE__ */
|
|
924
|
+
}), /* @__PURE__ */ U("p", {
|
|
908
925
|
className: "mt-1 text-sm text-text-secondary",
|
|
909
926
|
children: s("devportal.monetizationDesc", "Earn revenue when users install or purchase your app. Here's exactly how the money flows.")
|
|
910
|
-
})] }), /* @__PURE__ */
|
|
927
|
+
})] }), /* @__PURE__ */ W("div", {
|
|
911
928
|
className: "grid gap-4 sm:grid-cols-3",
|
|
912
929
|
children: [
|
|
913
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ W("div", {
|
|
914
931
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
915
|
-
children: [/* @__PURE__ */
|
|
932
|
+
children: [/* @__PURE__ */ U("div", {
|
|
916
933
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
|
|
917
|
-
children: /* @__PURE__ */
|
|
934
|
+
children: /* @__PURE__ */ U(Ie, {
|
|
918
935
|
size: 18,
|
|
919
936
|
className: "text-status-success-text"
|
|
920
937
|
})
|
|
921
|
-
}), /* @__PURE__ */
|
|
938
|
+
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("p", {
|
|
922
939
|
className: "font-semibold",
|
|
923
940
|
children: [(100 - n * 100).toFixed(0), "% revenue share"]
|
|
924
|
-
}), /* @__PURE__ */
|
|
941
|
+
}), /* @__PURE__ */ W("p", {
|
|
925
942
|
className: "mt-1 text-sm text-text-secondary",
|
|
926
943
|
children: [
|
|
927
944
|
"You keep",
|
|
928
945
|
" ",
|
|
929
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ W("span", {
|
|
930
947
|
className: "font-medium text-status-success-text",
|
|
931
948
|
children: [(100 - n * 100).toFixed(0), "%"]
|
|
932
949
|
}),
|
|
933
950
|
" ",
|
|
934
951
|
"of every sale in credits. The platform retains a",
|
|
935
952
|
" ",
|
|
936
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ W("span", {
|
|
937
954
|
className: "font-medium",
|
|
938
955
|
children: [(n * 100).toFixed(0), "%"]
|
|
939
956
|
}),
|
|
@@ -942,28 +959,28 @@ var Xe = [
|
|
|
942
959
|
]
|
|
943
960
|
})] })]
|
|
944
961
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ W("div", {
|
|
946
963
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
947
|
-
children: [/* @__PURE__ */
|
|
964
|
+
children: [/* @__PURE__ */ U("div", {
|
|
948
965
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
949
|
-
children: /* @__PURE__ */
|
|
966
|
+
children: /* @__PURE__ */ U(V, {
|
|
950
967
|
size: 18,
|
|
951
968
|
className: "text-primary"
|
|
952
969
|
})
|
|
953
|
-
}), /* @__PURE__ */
|
|
970
|
+
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
954
971
|
className: "font-semibold",
|
|
955
972
|
children: "Credits → cash via billing"
|
|
956
|
-
}), /* @__PURE__ */
|
|
973
|
+
}), /* @__PURE__ */ W("p", {
|
|
957
974
|
className: "mt-1 text-sm text-text-secondary",
|
|
958
975
|
children: [
|
|
959
976
|
"Every sale instantly deposits your earned credits into your linked billing account. You can spend them on platform services or request a cash withdrawal. Track everything on the",
|
|
960
977
|
" ",
|
|
961
|
-
i ? /* @__PURE__ */
|
|
978
|
+
i ? /* @__PURE__ */ U("button", {
|
|
962
979
|
type: "button",
|
|
963
980
|
onClick: i,
|
|
964
981
|
className: "font-medium text-primary underline-offset-2 hover:underline",
|
|
965
982
|
children: "Revenue page"
|
|
966
|
-
}) : /* @__PURE__ */
|
|
983
|
+
}) : /* @__PURE__ */ U("span", {
|
|
967
984
|
className: "font-medium text-primary",
|
|
968
985
|
children: "Revenue page"
|
|
969
986
|
}),
|
|
@@ -971,18 +988,18 @@ var Xe = [
|
|
|
971
988
|
]
|
|
972
989
|
})] })]
|
|
973
990
|
}),
|
|
974
|
-
/* @__PURE__ */
|
|
991
|
+
/* @__PURE__ */ W("div", {
|
|
975
992
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
976
|
-
children: [/* @__PURE__ */
|
|
993
|
+
children: [/* @__PURE__ */ U("div", {
|
|
977
994
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
978
|
-
children: /* @__PURE__ */
|
|
995
|
+
children: /* @__PURE__ */ U(Ee, {
|
|
979
996
|
size: 18,
|
|
980
997
|
className: "text-status-warning-text"
|
|
981
998
|
})
|
|
982
|
-
}), /* @__PURE__ */
|
|
999
|
+
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
983
1000
|
className: "font-semibold",
|
|
984
1001
|
children: "Reach the full marketplace"
|
|
985
|
-
}), /* @__PURE__ */
|
|
1002
|
+
}), /* @__PURE__ */ U("p", {
|
|
986
1003
|
className: "mt-1 text-sm text-text-secondary",
|
|
987
1004
|
children: "Any user with platform credits can discover and install your app directly from the marketplace. Free apps maximise reach; paid apps let you monetise your work."
|
|
988
1005
|
})] })]
|
|
@@ -990,52 +1007,52 @@ var Xe = [
|
|
|
990
1007
|
]
|
|
991
1008
|
})]
|
|
992
1009
|
}),
|
|
993
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ W("div", {
|
|
994
1011
|
className: "space-y-4",
|
|
995
1012
|
children: [
|
|
996
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", {
|
|
997
1014
|
className: "text-base font-semibold",
|
|
998
1015
|
children: s("devportal.setPricingTitle", "Set Your Price")
|
|
999
|
-
}), /* @__PURE__ */
|
|
1016
|
+
}), /* @__PURE__ */ W("p", {
|
|
1000
1017
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
1001
1018
|
children: [
|
|
1002
1019
|
"Choose ",
|
|
1003
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ U("strong", { children: "Free" }),
|
|
1004
1021
|
" to maximise installs, or",
|
|
1005
1022
|
" ",
|
|
1006
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ U("strong", { children: "Paid" }),
|
|
1007
1024
|
" to earn credits on every install. Paid apps require a linked billing account before publishing."
|
|
1008
1025
|
]
|
|
1009
1026
|
})] }),
|
|
1010
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ U("div", {
|
|
1011
1028
|
className: "flex flex-wrap gap-2",
|
|
1012
|
-
children: mt.map((e) => /* @__PURE__ */
|
|
1029
|
+
children: mt.map((e) => /* @__PURE__ */ U("button", {
|
|
1013
1030
|
type: "button",
|
|
1014
1031
|
onClick: () => h("pricingType", e.value),
|
|
1015
1032
|
className: t("rounded-md border px-4 py-2 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken border-border-subtle"),
|
|
1016
1033
|
children: e.label
|
|
1017
1034
|
}, e.value))
|
|
1018
1035
|
}),
|
|
1019
|
-
_ && /* @__PURE__ */
|
|
1036
|
+
_ && /* @__PURE__ */ W("div", {
|
|
1020
1037
|
className: "space-y-4",
|
|
1021
1038
|
children: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ W("div", {
|
|
1023
1040
|
className: "max-w-xs",
|
|
1024
1041
|
children: [
|
|
1025
|
-
/* @__PURE__ */
|
|
1042
|
+
/* @__PURE__ */ W("label", {
|
|
1026
1043
|
className: "mb-1.5 block text-sm font-medium",
|
|
1027
1044
|
children: [
|
|
1028
1045
|
"Listing price",
|
|
1029
1046
|
" ",
|
|
1030
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ U("span", {
|
|
1031
1048
|
className: "text-text-tertiary font-normal",
|
|
1032
1049
|
children: "(credits)"
|
|
1033
1050
|
})
|
|
1034
1051
|
]
|
|
1035
1052
|
}),
|
|
1036
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ W("div", {
|
|
1037
1054
|
className: "relative flex items-center",
|
|
1038
|
-
children: [/* @__PURE__ */
|
|
1055
|
+
children: [/* @__PURE__ */ U("input", {
|
|
1039
1056
|
type: "number",
|
|
1040
1057
|
min: 1,
|
|
1041
1058
|
step: 1,
|
|
@@ -1043,36 +1060,36 @@ var Xe = [
|
|
|
1043
1060
|
onChange: (e) => h("price", e.target.value),
|
|
1044
1061
|
placeholder: "e.g. 1000",
|
|
1045
1062
|
className: "w-full rounded-md border border-border-subtle bg-bg-input px-3 py-2 pr-20 text-sm focus:outline-none focus:ring-2 focus:ring-primary/50"
|
|
1046
|
-
}), /* @__PURE__ */
|
|
1063
|
+
}), /* @__PURE__ */ U("span", {
|
|
1047
1064
|
className: "pointer-events-none absolute right-3 text-xs text-text-tertiary",
|
|
1048
1065
|
children: "credits"
|
|
1049
1066
|
})]
|
|
1050
1067
|
}),
|
|
1051
|
-
y && /* @__PURE__ */
|
|
1068
|
+
y && /* @__PURE__ */ W("p", {
|
|
1052
1069
|
className: "mt-1.5 text-xs text-text-secondary",
|
|
1053
1070
|
children: [
|
|
1054
1071
|
"≈ ",
|
|
1055
1072
|
E(x),
|
|
1056
1073
|
" USD at the current credit rate (1 cr =",
|
|
1057
1074
|
" ",
|
|
1058
|
-
E(
|
|
1075
|
+
E(J),
|
|
1059
1076
|
")"
|
|
1060
1077
|
]
|
|
1061
1078
|
}),
|
|
1062
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ U("p", {
|
|
1063
1080
|
className: "mt-1 text-xs text-text-tertiary",
|
|
1064
1081
|
children: s("devportal.priceHint", "Set the number of credits a buyer spends to install your app")
|
|
1065
1082
|
})
|
|
1066
1083
|
]
|
|
1067
1084
|
}),
|
|
1068
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ W("div", {
|
|
1069
1086
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
1070
|
-
children: [/* @__PURE__ */
|
|
1087
|
+
children: [/* @__PURE__ */ U("span", { children: "Quick convert:" }), [
|
|
1071
1088
|
5,
|
|
1072
1089
|
10,
|
|
1073
1090
|
25,
|
|
1074
1091
|
50
|
|
1075
|
-
].map((e) => /* @__PURE__ */
|
|
1092
|
+
].map((e) => /* @__PURE__ */ W("button", {
|
|
1076
1093
|
type: "button",
|
|
1077
1094
|
onClick: () => h("price", String(tt(e))),
|
|
1078
1095
|
className: "rounded border border-border-subtle px-2 py-0.5 hover:bg-bg-sunken transition-colors",
|
|
@@ -1085,27 +1102,27 @@ var Xe = [
|
|
|
1085
1102
|
]
|
|
1086
1103
|
}, e))]
|
|
1087
1104
|
}),
|
|
1088
|
-
y && /* @__PURE__ */
|
|
1105
|
+
y && /* @__PURE__ */ W("div", {
|
|
1089
1106
|
className: "rounded-lg border border-border-subtle bg-bg-sunken p-4 space-y-3",
|
|
1090
1107
|
children: [
|
|
1091
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ U("p", {
|
|
1092
1109
|
className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
|
|
1093
1110
|
children: s("devportal.revenueBreakdown", "Revenue Breakdown per Sale")
|
|
1094
1111
|
}),
|
|
1095
|
-
/* @__PURE__ */
|
|
1112
|
+
/* @__PURE__ */ W("div", {
|
|
1096
1113
|
className: "space-y-2 text-sm",
|
|
1097
1114
|
children: [
|
|
1098
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ W("div", {
|
|
1099
1116
|
className: "flex items-center justify-between",
|
|
1100
|
-
children: [/* @__PURE__ */
|
|
1117
|
+
children: [/* @__PURE__ */ U("span", {
|
|
1101
1118
|
className: "text-text-secondary",
|
|
1102
1119
|
children: "Buyer pays"
|
|
1103
|
-
}), /* @__PURE__ */
|
|
1120
|
+
}), /* @__PURE__ */ W("span", {
|
|
1104
1121
|
className: "font-medium tabular-nums",
|
|
1105
1122
|
children: [
|
|
1106
1123
|
D(v),
|
|
1107
1124
|
" ",
|
|
1108
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ W("span", {
|
|
1109
1126
|
className: "text-text-tertiary text-xs",
|
|
1110
1127
|
children: [
|
|
1111
1128
|
"(",
|
|
@@ -1116,12 +1133,12 @@ var Xe = [
|
|
|
1116
1133
|
]
|
|
1117
1134
|
})]
|
|
1118
1135
|
}),
|
|
1119
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ W("div", {
|
|
1120
1137
|
className: "flex items-center justify-between text-status-error-text",
|
|
1121
|
-
children: [/* @__PURE__ */
|
|
1138
|
+
children: [/* @__PURE__ */ W("span", { children: [
|
|
1122
1139
|
"Platform fee",
|
|
1123
1140
|
" ",
|
|
1124
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ W("span", {
|
|
1125
1142
|
className: "opacity-70",
|
|
1126
1143
|
children: [
|
|
1127
1144
|
"(",
|
|
@@ -1129,13 +1146,13 @@ var Xe = [
|
|
|
1129
1146
|
"%)"
|
|
1130
1147
|
]
|
|
1131
1148
|
})
|
|
1132
|
-
] }), /* @__PURE__ */
|
|
1149
|
+
] }), /* @__PURE__ */ W("span", {
|
|
1133
1150
|
className: "tabular-nums",
|
|
1134
1151
|
children: [
|
|
1135
1152
|
"− ",
|
|
1136
1153
|
D(S),
|
|
1137
1154
|
" ",
|
|
1138
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ W("span", {
|
|
1139
1156
|
className: "text-xs opacity-70",
|
|
1140
1157
|
children: [
|
|
1141
1158
|
"(",
|
|
@@ -1146,14 +1163,14 @@ var Xe = [
|
|
|
1146
1163
|
]
|
|
1147
1164
|
})]
|
|
1148
1165
|
}),
|
|
1149
|
-
/* @__PURE__ */
|
|
1166
|
+
/* @__PURE__ */ W("div", {
|
|
1150
1167
|
className: "flex items-center justify-between border-t border-border-subtle pt-2 font-semibold text-status-success-text",
|
|
1151
|
-
children: [/* @__PURE__ */
|
|
1168
|
+
children: [/* @__PURE__ */ U("span", { children: "You earn" }), /* @__PURE__ */ W("span", {
|
|
1152
1169
|
className: "tabular-nums",
|
|
1153
1170
|
children: [
|
|
1154
1171
|
D(w),
|
|
1155
1172
|
" ",
|
|
1156
|
-
/* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ W("span", {
|
|
1157
1174
|
className: "text-sm font-normal",
|
|
1158
1175
|
children: ["≈ ", E(T)]
|
|
1159
1176
|
})
|
|
@@ -1162,29 +1179,29 @@ var Xe = [
|
|
|
1162
1179
|
})
|
|
1163
1180
|
]
|
|
1164
1181
|
}),
|
|
1165
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ U("p", {
|
|
1166
1183
|
className: "text-xs text-text-tertiary",
|
|
1167
1184
|
children: "Credits are deposited to your billing account on each sale. Cash withdrawal is subject to platform terms and minimum payout thresholds."
|
|
1168
1185
|
})
|
|
1169
1186
|
]
|
|
1170
1187
|
}),
|
|
1171
|
-
!r && /* @__PURE__ */
|
|
1188
|
+
!r && /* @__PURE__ */ W("div", {
|
|
1172
1189
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
1173
|
-
children: [/* @__PURE__ */
|
|
1190
|
+
children: [/* @__PURE__ */ U(N, {
|
|
1174
1191
|
size: 16,
|
|
1175
1192
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1176
|
-
}), /* @__PURE__ */
|
|
1193
|
+
}), /* @__PURE__ */ W("div", {
|
|
1177
1194
|
className: "flex-1 min-w-0",
|
|
1178
1195
|
children: [
|
|
1179
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ U("p", {
|
|
1180
1197
|
className: "text-sm font-medium text-status-warning-text",
|
|
1181
1198
|
children: s("devportal.billingAccountRequired", "Billing account required to publish")
|
|
1182
1199
|
}),
|
|
1183
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ U("p", {
|
|
1184
1201
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
1185
1202
|
children: "Paid apps must have a billing account linked to your developer organization before you can submit for review. This is where your earned credits and cash withdrawals will be managed."
|
|
1186
1203
|
}),
|
|
1187
|
-
i && /* @__PURE__ */
|
|
1204
|
+
i && /* @__PURE__ */ U("button", {
|
|
1188
1205
|
type: "button",
|
|
1189
1206
|
onClick: i,
|
|
1190
1207
|
className: "mt-2 text-xs font-medium text-primary hover:underline underline-offset-2",
|
|
@@ -1197,23 +1214,23 @@ var Xe = [
|
|
|
1197
1214
|
})
|
|
1198
1215
|
]
|
|
1199
1216
|
}),
|
|
1200
|
-
/* @__PURE__ */
|
|
1217
|
+
/* @__PURE__ */ W("div", {
|
|
1201
1218
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
1202
|
-
children: [/* @__PURE__ */
|
|
1219
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
1203
1220
|
className: "text-sm font-semibold",
|
|
1204
1221
|
children: s("devportal.termsTitle", "Developer & Marketplace Terms")
|
|
1205
|
-
}), /* @__PURE__ */
|
|
1222
|
+
}), /* @__PURE__ */ W("ul", {
|
|
1206
1223
|
className: "space-y-2 text-sm text-text-secondary",
|
|
1207
1224
|
children: [
|
|
1208
|
-
/* @__PURE__ */
|
|
1225
|
+
/* @__PURE__ */ W("li", {
|
|
1209
1226
|
className: "flex items-start gap-2",
|
|
1210
|
-
children: [/* @__PURE__ */
|
|
1227
|
+
children: [/* @__PURE__ */ U(P, {
|
|
1211
1228
|
size: 14,
|
|
1212
1229
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1213
|
-
}), /* @__PURE__ */
|
|
1230
|
+
}), /* @__PURE__ */ W("span", { children: [
|
|
1214
1231
|
"By publishing to the marketplace you agree to the",
|
|
1215
1232
|
" ",
|
|
1216
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ U("a", {
|
|
1217
1234
|
href: ce.developerAgreement,
|
|
1218
1235
|
target: "_blank",
|
|
1219
1236
|
rel: "noopener noreferrer",
|
|
@@ -1223,29 +1240,29 @@ var Xe = [
|
|
|
1223
1240
|
"."
|
|
1224
1241
|
] })]
|
|
1225
1242
|
}),
|
|
1226
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ W("li", {
|
|
1227
1244
|
className: "flex items-start gap-2",
|
|
1228
|
-
children: [/* @__PURE__ */
|
|
1245
|
+
children: [/* @__PURE__ */ U(P, {
|
|
1229
1246
|
size: 14,
|
|
1230
1247
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1231
|
-
}), /* @__PURE__ */
|
|
1248
|
+
}), /* @__PURE__ */ U("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1232
1249
|
}),
|
|
1233
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ W("li", {
|
|
1234
1251
|
className: "flex items-start gap-2",
|
|
1235
|
-
children: [/* @__PURE__ */
|
|
1252
|
+
children: [/* @__PURE__ */ U(P, {
|
|
1236
1253
|
size: 14,
|
|
1237
1254
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1238
|
-
}), /* @__PURE__ */
|
|
1255
|
+
}), /* @__PURE__ */ U("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1239
1256
|
}),
|
|
1240
|
-
/* @__PURE__ */
|
|
1257
|
+
/* @__PURE__ */ W("li", {
|
|
1241
1258
|
className: "flex items-start gap-2",
|
|
1242
|
-
children: [/* @__PURE__ */
|
|
1259
|
+
children: [/* @__PURE__ */ U(P, {
|
|
1243
1260
|
size: 14,
|
|
1244
1261
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1245
|
-
}), /* @__PURE__ */
|
|
1262
|
+
}), /* @__PURE__ */ W("span", { children: [
|
|
1246
1263
|
"The platform reserves the right to adjust the credit rate, fee structure, or payout schedule with 30 days notice. See the",
|
|
1247
1264
|
" ",
|
|
1248
|
-
/* @__PURE__ */
|
|
1265
|
+
/* @__PURE__ */ U("a", {
|
|
1249
1266
|
href: "/legal/marketplace-terms",
|
|
1250
1267
|
target: "_blank",
|
|
1251
1268
|
rel: "noopener noreferrer",
|
|
@@ -1259,26 +1276,26 @@ var Xe = [
|
|
|
1259
1276
|
]
|
|
1260
1277
|
})]
|
|
1261
1278
|
}),
|
|
1262
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ W("div", {
|
|
1263
1280
|
className: "border-t border-border-subtle pt-6 space-y-4",
|
|
1264
|
-
children: [/* @__PURE__ */
|
|
1281
|
+
children: [/* @__PURE__ */ U("button", {
|
|
1265
1282
|
type: "button",
|
|
1266
1283
|
onClick: () => void g(),
|
|
1267
1284
|
disabled: d,
|
|
1268
1285
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
1269
|
-
children: d ? /* @__PURE__ */
|
|
1286
|
+
children: d ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(R, {
|
|
1270
1287
|
size: 16,
|
|
1271
1288
|
className: "animate-spin"
|
|
1272
|
-
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */
|
|
1273
|
-
}), a && /* @__PURE__ */
|
|
1289
|
+
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(F, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
|
|
1290
|
+
}), a && /* @__PURE__ */ W("div", {
|
|
1274
1291
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1275
|
-
children: [/* @__PURE__ */
|
|
1292
|
+
children: [/* @__PURE__ */ U(P, {
|
|
1276
1293
|
size: 16,
|
|
1277
1294
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1278
|
-
}), /* @__PURE__ */
|
|
1295
|
+
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1279
1296
|
className: "text-sm font-medium text-status-success-text",
|
|
1280
1297
|
children: s("devportal.allSetToSubmit", "You're all set!")
|
|
1281
|
-
}), /* @__PURE__ */
|
|
1298
|
+
}), /* @__PURE__ */ U("p", {
|
|
1282
1299
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
1283
1300
|
children: s("devportal.allSetDesc", "Store listing, versions, and pricing are complete. Head to the top of the page and click Submit for Review.")
|
|
1284
1301
|
})] })]
|
|
@@ -1287,87 +1304,87 @@ var Xe = [
|
|
|
1287
1304
|
]
|
|
1288
1305
|
});
|
|
1289
1306
|
}, rt = ({ appId: e, onNavigate: n, pricingDone: i = !1, onNavigateToPricing: a }) => {
|
|
1290
|
-
let { t: o } =
|
|
1307
|
+
let { t: o } = G(), s = (e, t) => {
|
|
1291
1308
|
let n = o(e);
|
|
1292
1309
|
return n === e ? t : n;
|
|
1293
1310
|
}, { data: l, loading: u, error: d } = c({
|
|
1294
1311
|
variables: { applicationId: e },
|
|
1295
1312
|
fetchPolicy: "cache-and-network"
|
|
1296
1313
|
});
|
|
1297
|
-
if (u) return /* @__PURE__ */
|
|
1298
|
-
if (d) return /* @__PURE__ */
|
|
1314
|
+
if (u) return /* @__PURE__ */ U(Qe, { message: s("devportal.loadingVersions", "Loading versions…") });
|
|
1315
|
+
if (d) return /* @__PURE__ */ U(K, { message: d.message });
|
|
1299
1316
|
let f = (l?.application?.versions?.edges ?? []).map((e) => e.node);
|
|
1300
|
-
return /* @__PURE__ */
|
|
1317
|
+
return /* @__PURE__ */ W("div", {
|
|
1301
1318
|
className: "space-y-4",
|
|
1302
1319
|
children: [
|
|
1303
|
-
/* @__PURE__ */
|
|
1320
|
+
/* @__PURE__ */ W("div", {
|
|
1304
1321
|
className: "flex items-center justify-between",
|
|
1305
|
-
children: [/* @__PURE__ */
|
|
1322
|
+
children: [/* @__PURE__ */ W("p", {
|
|
1306
1323
|
className: "text-sm text-text-secondary",
|
|
1307
1324
|
children: [
|
|
1308
1325
|
f.length,
|
|
1309
1326
|
" ",
|
|
1310
1327
|
f.length === 1 ? s("devportal.version", "version") : s("devportal.versions", "versions")
|
|
1311
1328
|
]
|
|
1312
|
-
}), /* @__PURE__ */
|
|
1329
|
+
}), /* @__PURE__ */ W("button", {
|
|
1313
1330
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1314
1331
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1315
|
-
children: [/* @__PURE__ */
|
|
1332
|
+
children: [/* @__PURE__ */ U(Le, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1316
1333
|
})]
|
|
1317
1334
|
}),
|
|
1318
|
-
f.length > 0 ? /* @__PURE__ */
|
|
1335
|
+
f.length > 0 ? /* @__PURE__ */ U("div", {
|
|
1319
1336
|
className: "overflow-hidden rounded-lg border border-border-subtle",
|
|
1320
|
-
children: /* @__PURE__ */
|
|
1337
|
+
children: /* @__PURE__ */ W("table", {
|
|
1321
1338
|
className: "w-full text-sm",
|
|
1322
|
-
children: [/* @__PURE__ */
|
|
1339
|
+
children: [/* @__PURE__ */ U("thead", { children: /* @__PURE__ */ W("tr", {
|
|
1323
1340
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
1324
1341
|
children: [
|
|
1325
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ U("th", {
|
|
1326
1343
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
1327
1344
|
children: s("devportal.version", "Version")
|
|
1328
1345
|
}),
|
|
1329
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ U("th", {
|
|
1330
1347
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
1331
1348
|
children: s("devportal.status", "Status")
|
|
1332
1349
|
}),
|
|
1333
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ U("th", {
|
|
1334
1351
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
1335
1352
|
children: s("devportal.released", "Released")
|
|
1336
1353
|
}),
|
|
1337
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ U("th", {
|
|
1338
1355
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
1339
1356
|
children: s("devportal.flags", "Flags")
|
|
1340
1357
|
})
|
|
1341
1358
|
]
|
|
1342
|
-
}) }), /* @__PURE__ */
|
|
1359
|
+
}) }), /* @__PURE__ */ U("tbody", {
|
|
1343
1360
|
className: "divide-y divide-border-subtle",
|
|
1344
|
-
children: f.map((e) => /* @__PURE__ */
|
|
1345
|
-
/* @__PURE__ */
|
|
1361
|
+
children: f.map((e) => /* @__PURE__ */ W(H, { children: [
|
|
1362
|
+
/* @__PURE__ */ W("tr", {
|
|
1346
1363
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
1347
1364
|
children: [
|
|
1348
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ U("td", {
|
|
1349
1366
|
className: "px-4 py-3 font-mono font-medium",
|
|
1350
1367
|
children: e.version
|
|
1351
1368
|
}),
|
|
1352
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ U("td", {
|
|
1353
1370
|
className: "px-4 py-3",
|
|
1354
|
-
children: /* @__PURE__ */
|
|
1371
|
+
children: /* @__PURE__ */ U("span", {
|
|
1355
1372
|
className: t("inline-flex rounded-full px-2 py-0.5 text-xs font-medium", e.status === "published" ? "bg-status-success-bg-subtle text-status-success-text" : e.status === "pending_review" ? "bg-status-info-bg-subtle text-status-info-text" : e.status === "rejected" ? "bg-status-error-bg-subtle text-status-error-text" : e.status === "deprecated" ? "bg-bg-sunken text-text-secondary" : "bg-status-warning-bg-subtle text-status-warning-text"),
|
|
1356
1373
|
children: e.status === "pending_review" ? "In Review" : e.status
|
|
1357
1374
|
})
|
|
1358
1375
|
}),
|
|
1359
|
-
/* @__PURE__ */
|
|
1376
|
+
/* @__PURE__ */ U("td", {
|
|
1360
1377
|
className: "px-4 py-3 text-text-secondary",
|
|
1361
1378
|
children: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : new Date(e.createdAt).toLocaleDateString()
|
|
1362
1379
|
}),
|
|
1363
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ U("td", {
|
|
1364
1381
|
className: "px-4 py-3",
|
|
1365
|
-
children: /* @__PURE__ */
|
|
1382
|
+
children: /* @__PURE__ */ W("div", {
|
|
1366
1383
|
className: "flex gap-1.5",
|
|
1367
|
-
children: [e.isLatest && /* @__PURE__ */
|
|
1384
|
+
children: [e.isLatest && /* @__PURE__ */ U("span", {
|
|
1368
1385
|
className: "rounded-full bg-action-primary-bg/10 px-2 py-0.5 text-xs text-primary font-medium",
|
|
1369
1386
|
children: "latest"
|
|
1370
|
-
}), e.isStable && /* @__PURE__ */
|
|
1387
|
+
}), e.isStable && /* @__PURE__ */ U("span", {
|
|
1371
1388
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text font-medium",
|
|
1372
1389
|
children: "stable"
|
|
1373
1390
|
})]
|
|
@@ -1375,26 +1392,26 @@ var Xe = [
|
|
|
1375
1392
|
})
|
|
1376
1393
|
]
|
|
1377
1394
|
}, e.id),
|
|
1378
|
-
e.status === "rejected" && e.reviewNotes && /* @__PURE__ */
|
|
1395
|
+
e.status === "rejected" && e.reviewNotes && /* @__PURE__ */ U("tr", {
|
|
1379
1396
|
className: "bg-status-error-bg-subtle/40",
|
|
1380
|
-
children: /* @__PURE__ */
|
|
1397
|
+
children: /* @__PURE__ */ U("td", {
|
|
1381
1398
|
colSpan: 4,
|
|
1382
1399
|
className: "px-4 py-2",
|
|
1383
|
-
children: /* @__PURE__ */
|
|
1400
|
+
children: /* @__PURE__ */ W("p", {
|
|
1384
1401
|
className: "text-xs text-status-error-text",
|
|
1385
|
-
children: [/* @__PURE__ */
|
|
1402
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1386
1403
|
className: "font-semibold",
|
|
1387
1404
|
children: ["Review feedback:", " "]
|
|
1388
1405
|
}), e.reviewNotes]
|
|
1389
1406
|
})
|
|
1390
1407
|
})
|
|
1391
1408
|
}, `${e.id}-notes`),
|
|
1392
|
-
e.status === "pending_review" && /* @__PURE__ */
|
|
1409
|
+
e.status === "pending_review" && /* @__PURE__ */ U("tr", {
|
|
1393
1410
|
className: "bg-status-info-bg-subtle/30",
|
|
1394
|
-
children: /* @__PURE__ */
|
|
1411
|
+
children: /* @__PURE__ */ U("td", {
|
|
1395
1412
|
colSpan: 4,
|
|
1396
1413
|
className: "px-4 py-2",
|
|
1397
|
-
children: /* @__PURE__ */
|
|
1414
|
+
children: /* @__PURE__ */ U("p", {
|
|
1398
1415
|
className: "text-xs text-status-info-text",
|
|
1399
1416
|
children: "Submitted for platform review — you will be notified once approved or if changes are needed."
|
|
1400
1417
|
})
|
|
@@ -1403,67 +1420,67 @@ var Xe = [
|
|
|
1403
1420
|
] }))
|
|
1404
1421
|
})]
|
|
1405
1422
|
})
|
|
1406
|
-
}) : /* @__PURE__ */
|
|
1423
|
+
}) : /* @__PURE__ */ U(r, {
|
|
1407
1424
|
illustration: "empty-generic",
|
|
1408
|
-
icon: /* @__PURE__ */
|
|
1425
|
+
icon: /* @__PURE__ */ U(je, { size: 32 }),
|
|
1409
1426
|
title: s("devportal.noVersions", "No versions yet"),
|
|
1410
1427
|
description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1411
|
-
action: /* @__PURE__ */
|
|
1428
|
+
action: /* @__PURE__ */ W("button", {
|
|
1412
1429
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1413
1430
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1414
|
-
children: [/* @__PURE__ */
|
|
1431
|
+
children: [/* @__PURE__ */ U(Le, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1415
1432
|
})
|
|
1416
1433
|
}),
|
|
1417
|
-
f.length > 0 && !i && a && /* @__PURE__ */
|
|
1434
|
+
f.length > 0 && !i && a && /* @__PURE__ */ W("div", {
|
|
1418
1435
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1419
1436
|
children: [
|
|
1420
|
-
/* @__PURE__ */
|
|
1437
|
+
/* @__PURE__ */ U(F, {
|
|
1421
1438
|
size: 16,
|
|
1422
1439
|
className: "shrink-0 text-primary"
|
|
1423
1440
|
}),
|
|
1424
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ U("p", {
|
|
1425
1442
|
className: "flex-1 text-sm text-text-secondary",
|
|
1426
1443
|
children: s("devportal.versionsNextPricing", "You've got versions covered. Now set your pricing before you can submit.")
|
|
1427
1444
|
}),
|
|
1428
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ W("button", {
|
|
1429
1446
|
type: "button",
|
|
1430
1447
|
onClick: a,
|
|
1431
1448
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1432
|
-
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */
|
|
1449
|
+
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ U(xe, { size: 15 })]
|
|
1433
1450
|
})
|
|
1434
1451
|
]
|
|
1435
1452
|
})
|
|
1436
1453
|
]
|
|
1437
1454
|
});
|
|
1438
1455
|
}, it = ({ appId: e, onNavigate: t }) => {
|
|
1439
|
-
let { t: n } =
|
|
1456
|
+
let { t: n } = G(), r = (e, t) => {
|
|
1440
1457
|
let r = n(e);
|
|
1441
1458
|
return r === e ? t : r;
|
|
1442
1459
|
}, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
|
|
1443
|
-
return a ? /* @__PURE__ */
|
|
1460
|
+
return a ? /* @__PURE__ */ U(Qe, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ U(K, { message: o.message }) : /* @__PURE__ */ U(ct, {
|
|
1444
1461
|
appId: e,
|
|
1445
1462
|
webhooks: (i?.webhooks ?? []).map(qe),
|
|
1446
1463
|
onNavigate: t
|
|
1447
1464
|
});
|
|
1448
1465
|
}, at = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
1449
|
-
let { t: o } =
|
|
1466
|
+
let { t: o } = G(), s = (e, t) => {
|
|
1450
1467
|
let n = o(e);
|
|
1451
1468
|
return n === e ? t : n;
|
|
1452
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] =
|
|
1469
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = m(), [p, h] = M([]), [g, _] = M(!1), [v, y] = M(/* @__PURE__ */ new Set()), [b, x] = M(null), S = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Ye) : [], [e, c]), C = j(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = j(() => C.filter((e) => v.has(e.id)), [C, v]), T = C.length > 0 && C.every((e) => v.has(e.id)), E = C.some((e) => v.has(e.id)) && !T, D = A((e, t) => {
|
|
1453
1470
|
y((n) => {
|
|
1454
1471
|
let r = new Set(n);
|
|
1455
1472
|
return t ? r.add(e) : r.delete(e), r;
|
|
1456
1473
|
});
|
|
1457
|
-
}, []), O =
|
|
1474
|
+
}, []), O = A((e) => {
|
|
1458
1475
|
y((t) => {
|
|
1459
1476
|
let n = new Set(t);
|
|
1460
1477
|
return C.forEach((t) => {
|
|
1461
1478
|
e ? n.add(t.id) : n.delete(t.id);
|
|
1462
1479
|
}), n;
|
|
1463
1480
|
});
|
|
1464
|
-
}, [C]), ee =
|
|
1481
|
+
}, [C]), ee = A(() => {
|
|
1465
1482
|
y(/* @__PURE__ */ new Set());
|
|
1466
|
-
}, []), te =
|
|
1483
|
+
}, []), te = A(async (e) => {
|
|
1467
1484
|
_(!0);
|
|
1468
1485
|
try {
|
|
1469
1486
|
let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
@@ -1475,19 +1492,19 @@ var Xe = [
|
|
|
1475
1492
|
_(!1);
|
|
1476
1493
|
}
|
|
1477
1494
|
}, [f, d]);
|
|
1478
|
-
return e ? l ? /* @__PURE__ */
|
|
1479
|
-
b && /* @__PURE__ */
|
|
1495
|
+
return e ? l ? /* @__PURE__ */ U(Qe, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ U(K, { message: u.message }) : /* @__PURE__ */ W(H, { children: [
|
|
1496
|
+
b && /* @__PURE__ */ U("div", {
|
|
1480
1497
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1481
|
-
children: /* @__PURE__ */
|
|
1498
|
+
children: /* @__PURE__ */ W("div", {
|
|
1482
1499
|
className: "flex items-center justify-between gap-3",
|
|
1483
|
-
children: [/* @__PURE__ */
|
|
1500
|
+
children: [/* @__PURE__ */ U("span", { children: b }), /* @__PURE__ */ U("button", {
|
|
1484
1501
|
onClick: () => x(null),
|
|
1485
1502
|
className: "text-status-success-text hover:text-status-success-text",
|
|
1486
1503
|
children: s("devportal.dismiss", "Dismiss")
|
|
1487
1504
|
})]
|
|
1488
1505
|
})
|
|
1489
1506
|
}),
|
|
1490
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ U(lt, {
|
|
1491
1508
|
appName: t,
|
|
1492
1509
|
delegations: S,
|
|
1493
1510
|
onGrantDelegation: n,
|
|
@@ -1500,7 +1517,7 @@ var Xe = [
|
|
|
1500
1517
|
allVisibleSelected: T,
|
|
1501
1518
|
partiallySelected: E
|
|
1502
1519
|
}),
|
|
1503
|
-
/* @__PURE__ */
|
|
1520
|
+
/* @__PURE__ */ U(ae, {
|
|
1504
1521
|
open: p.length > 0,
|
|
1505
1522
|
onOpenChange: (e) => {
|
|
1506
1523
|
e || h([]);
|
|
@@ -1515,69 +1532,69 @@ var Xe = [
|
|
|
1515
1532
|
variant: "destructive",
|
|
1516
1533
|
loading: g
|
|
1517
1534
|
})
|
|
1518
|
-
] }) : /* @__PURE__ */
|
|
1535
|
+
] }) : /* @__PURE__ */ U(r, {
|
|
1519
1536
|
illustration: "empty-generic",
|
|
1520
|
-
icon: /* @__PURE__ */
|
|
1537
|
+
icon: /* @__PURE__ */ U(B, { size: 32 }),
|
|
1521
1538
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1522
1539
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1523
|
-
action: /* @__PURE__ */
|
|
1540
|
+
action: /* @__PURE__ */ W("button", {
|
|
1524
1541
|
onClick: () => a("/oauth"),
|
|
1525
1542
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1526
|
-
children: [/* @__PURE__ */
|
|
1543
|
+
children: [/* @__PURE__ */ U(I, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1527
1544
|
})
|
|
1528
1545
|
});
|
|
1529
1546
|
}, ot = ({ appId: e }) => {
|
|
1530
|
-
let { t } =
|
|
1547
|
+
let { t } = G(), n = (e, n) => {
|
|
1531
1548
|
let r = t(e);
|
|
1532
1549
|
return r === e ? n : r;
|
|
1533
|
-
}, r =
|
|
1550
|
+
}, r = j(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
1534
1551
|
applicationId: e,
|
|
1535
1552
|
period: "daily",
|
|
1536
|
-
startDate:
|
|
1553
|
+
startDate: j(() => {
|
|
1537
1554
|
let e = new Date(r);
|
|
1538
1555
|
return e.setDate(e.getDate() - 30), e;
|
|
1539
1556
|
}, [r]).toISOString(),
|
|
1540
1557
|
endDate: r.toISOString()
|
|
1541
1558
|
} });
|
|
1542
|
-
return a ? /* @__PURE__ */
|
|
1559
|
+
return a ? /* @__PURE__ */ U(Qe, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ U(K, { message: s.message }) : /* @__PURE__ */ U(ut, { analytics: (i?.applicationAnalytics ?? []).map(Je) });
|
|
1543
1560
|
}, st = ({ app: e, appId: t, refetch: n }) => {
|
|
1544
|
-
let { t: r } =
|
|
1561
|
+
let { t: r } = G(), i = (e, t) => {
|
|
1545
1562
|
let n = r(e);
|
|
1546
1563
|
return n === e ? t : n;
|
|
1547
|
-
}, [a, { loading: o }] = g(), [s, { loading: c }] = y(), [l, u] =
|
|
1548
|
-
return /* @__PURE__ */
|
|
1564
|
+
}, [a, { loading: o }] = g(), [s, { loading: c }] = y(), [l, u] = M(!1);
|
|
1565
|
+
return /* @__PURE__ */ W("div", {
|
|
1549
1566
|
className: "space-y-6",
|
|
1550
|
-
children: [e.appType === "WORKFLOW" && /* @__PURE__ */
|
|
1567
|
+
children: [e.appType === "WORKFLOW" && /* @__PURE__ */ U("div", {
|
|
1551
1568
|
className: "rounded-lg border border-border-subtle bg-bg-elevated p-4",
|
|
1552
|
-
children: /* @__PURE__ */
|
|
1569
|
+
children: /* @__PURE__ */ W("div", {
|
|
1553
1570
|
className: "flex items-start justify-between gap-4",
|
|
1554
|
-
children: [/* @__PURE__ */
|
|
1571
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1555
1572
|
className: "flex items-start gap-3",
|
|
1556
|
-
children: [/* @__PURE__ */
|
|
1573
|
+
children: [/* @__PURE__ */ U("div", {
|
|
1557
1574
|
className: "mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg-subtle",
|
|
1558
|
-
children: /* @__PURE__ */
|
|
1575
|
+
children: /* @__PURE__ */ U(Oe, {
|
|
1559
1576
|
size: 15,
|
|
1560
1577
|
className: "text-action-primary-text"
|
|
1561
1578
|
})
|
|
1562
|
-
}), /* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1579
|
+
}), /* @__PURE__ */ W("div", { children: [
|
|
1580
|
+
/* @__PURE__ */ U("p", {
|
|
1564
1581
|
className: "text-sm font-medium text-text-primary",
|
|
1565
1582
|
children: i("devportal.shareWorkflow.title", "Share as Public Link")
|
|
1566
1583
|
}),
|
|
1567
|
-
/* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ U("p", {
|
|
1568
1585
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
1569
1586
|
children: e.visibility === "UNLISTED" ? i("devportal.shareWorkflow.activeDesc", "Anyone with the link can preview and copy this workflow into their FluidGrids workspace.") : i("devportal.shareWorkflow.inactiveDesc", "Generate a public link anyone can use to copy this workflow into their own FluidGrids workspace — no store review needed.")
|
|
1570
1587
|
}),
|
|
1571
|
-
e.visibility === "UNLISTED" && (e.status === "PUBLISHED" || e.status === "SUBMITTED") && /* @__PURE__ */
|
|
1588
|
+
e.visibility === "UNLISTED" && (e.status === "PUBLISHED" || e.status === "SUBMITTED") && /* @__PURE__ */ U("p", {
|
|
1572
1589
|
className: "mt-1.5 text-xs text-status-warning-text",
|
|
1573
1590
|
children: i("devportal.shareWorkflow.stopSharingPublishedNote", "This app is in the marketplace. Stopping the share link will keep it there — visibility will switch to Public so the store listing is preserved.")
|
|
1574
1591
|
}),
|
|
1575
|
-
e.visibility === "UNLISTED" && /* @__PURE__ */
|
|
1592
|
+
e.visibility === "UNLISTED" && /* @__PURE__ */ W("div", {
|
|
1576
1593
|
className: "mt-2 flex items-center gap-2",
|
|
1577
|
-
children: [/* @__PURE__ */
|
|
1594
|
+
children: [/* @__PURE__ */ U("code", {
|
|
1578
1595
|
className: "rounded bg-bg-canvas px-2 py-1 text-xs text-text-secondary",
|
|
1579
1596
|
children: `${window.location.protocol}//${window.location.host}/shared/${t}`
|
|
1580
|
-
}), /* @__PURE__ */
|
|
1597
|
+
}), /* @__PURE__ */ W("button", {
|
|
1581
1598
|
type: "button",
|
|
1582
1599
|
className: "flex items-center gap-1 rounded px-2 py-1 text-xs text-action-primary-text hover:bg-action-primary-bg-subtle transition-colors",
|
|
1583
1600
|
onClick: () => {
|
|
@@ -1586,11 +1603,11 @@ var Xe = [
|
|
|
1586
1603
|
u(!0), setTimeout(() => u(!1), 2e3);
|
|
1587
1604
|
});
|
|
1588
1605
|
},
|
|
1589
|
-
children: [
|
|
1606
|
+
children: [U(l ? P : Ce, { size: 12 }), l ? i("devportal.copied", "Copied!") : i("devportal.copyLink", "Copy Link")]
|
|
1590
1607
|
})]
|
|
1591
1608
|
})
|
|
1592
1609
|
] })]
|
|
1593
|
-
}), /* @__PURE__ */
|
|
1610
|
+
}), /* @__PURE__ */ U("button", {
|
|
1594
1611
|
type: "button",
|
|
1595
1612
|
disabled: o || c || !e.manifest,
|
|
1596
1613
|
title: e.manifest ? void 0 : i("devportal.shareWorkflow.noManifestHint", "Add a workflow manifest before sharing"),
|
|
@@ -1598,67 +1615,67 @@ var Xe = [
|
|
|
1598
1615
|
e.visibility === "UNLISTED" ? s({ variables: { id: t } }).then(() => n()) : a({ variables: { id: t } }).then(() => n());
|
|
1599
1616
|
},
|
|
1600
1617
|
className: `flex-shrink-0 rounded-full px-3 py-1.5 text-xs font-medium transition-colors ${e.visibility === "UNLISTED" ? "border border-status-error-bg text-status-error-text hover:bg-status-error-bg-subtle" : "bg-action-primary-bg text-text-on-action hover:opacity-90 disabled:opacity-50"}`,
|
|
1601
|
-
children: o || c ? /* @__PURE__ */
|
|
1618
|
+
children: o || c ? /* @__PURE__ */ U(R, {
|
|
1602
1619
|
size: 12,
|
|
1603
1620
|
className: "animate-spin"
|
|
1604
1621
|
}) : e.visibility === "UNLISTED" ? i("devportal.shareWorkflow.stopSharing", "Stop Sharing") : i("devportal.shareWorkflow.share", "Share Link")
|
|
1605
1622
|
})]
|
|
1606
1623
|
})
|
|
1607
|
-
}), /* @__PURE__ */
|
|
1624
|
+
}), /* @__PURE__ */ W("div", {
|
|
1608
1625
|
className: "grid gap-6 lg:grid-cols-3",
|
|
1609
|
-
children: [/* @__PURE__ */
|
|
1626
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1610
1627
|
className: "lg:col-span-2 space-y-6",
|
|
1611
1628
|
children: [
|
|
1612
|
-
/* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ U(We, { children: /* @__PURE__ */ W("div", {
|
|
1613
1630
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1614
1631
|
children: [
|
|
1615
|
-
/* @__PURE__ */
|
|
1632
|
+
/* @__PURE__ */ U(Z, {
|
|
1616
1633
|
label: i("devportal.totalInstalls", "Total Installs"),
|
|
1617
1634
|
value: e.installCount.toLocaleString()
|
|
1618
1635
|
}),
|
|
1619
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ U(Z, {
|
|
1620
1637
|
label: i("devportal.activeInstalls", "Active Installs"),
|
|
1621
1638
|
value: e.activeInstallCount.toLocaleString()
|
|
1622
1639
|
}),
|
|
1623
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ U(Z, {
|
|
1624
1641
|
label: i("devportal.averageRating", "Average Rating"),
|
|
1625
1642
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : i("devportal.notAvailable", "N/A")
|
|
1626
1643
|
}),
|
|
1627
|
-
/* @__PURE__ */
|
|
1644
|
+
/* @__PURE__ */ U(Z, {
|
|
1628
1645
|
label: i("devportal.reviews", "Reviews"),
|
|
1629
1646
|
value: e.reviewCount.toString()
|
|
1630
1647
|
})
|
|
1631
1648
|
]
|
|
1632
1649
|
}) }),
|
|
1633
|
-
/* @__PURE__ */
|
|
1650
|
+
/* @__PURE__ */ U(S, {
|
|
1634
1651
|
title: i("devportal.description", "Description"),
|
|
1635
|
-
children: e.description ? /* @__PURE__ */
|
|
1652
|
+
children: e.description ? /* @__PURE__ */ U(_e, {
|
|
1636
1653
|
className: "prose prose-sm max-w-none",
|
|
1637
1654
|
children: e.description
|
|
1638
|
-
}) : /* @__PURE__ */
|
|
1655
|
+
}) : /* @__PURE__ */ U("p", {
|
|
1639
1656
|
className: "text-sm text-text-secondary",
|
|
1640
1657
|
children: i("devportal.noDescriptionProvided", "No description provided.")
|
|
1641
1658
|
})
|
|
1642
1659
|
}),
|
|
1643
|
-
/* @__PURE__ */
|
|
1660
|
+
/* @__PURE__ */ U(S, {
|
|
1644
1661
|
title: i("devportal.tagsAndKeywords", "Tags & Keywords"),
|
|
1645
|
-
children: /* @__PURE__ */
|
|
1662
|
+
children: /* @__PURE__ */ W("div", {
|
|
1646
1663
|
className: "space-y-3",
|
|
1647
|
-
children: [e.tags.length > 0 && /* @__PURE__ */
|
|
1664
|
+
children: [e.tags.length > 0 && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1648
1665
|
className: "text-xs text-text-secondary mb-2",
|
|
1649
1666
|
children: i("devportal.tags", "Tags")
|
|
1650
|
-
}), /* @__PURE__ */
|
|
1667
|
+
}), /* @__PURE__ */ U("div", {
|
|
1651
1668
|
className: "flex flex-wrap gap-2",
|
|
1652
|
-
children: e.tags.map((e) => /* @__PURE__ */
|
|
1669
|
+
children: e.tags.map((e) => /* @__PURE__ */ U("span", {
|
|
1653
1670
|
className: "rounded-full bg-action-primary-bg/10 px-3 py-1 text-xs font-medium text-primary",
|
|
1654
1671
|
children: e
|
|
1655
1672
|
}, e))
|
|
1656
|
-
})] }), e.keywords.length > 0 && /* @__PURE__ */
|
|
1673
|
+
})] }), e.keywords.length > 0 && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1657
1674
|
className: "text-xs text-text-secondary mb-2",
|
|
1658
1675
|
children: i("devportal.keywords", "Keywords")
|
|
1659
|
-
}), /* @__PURE__ */
|
|
1676
|
+
}), /* @__PURE__ */ U("div", {
|
|
1660
1677
|
className: "flex flex-wrap gap-2",
|
|
1661
|
-
children: e.keywords.map((e) => /* @__PURE__ */
|
|
1678
|
+
children: e.keywords.map((e) => /* @__PURE__ */ U("span", {
|
|
1662
1679
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-xs",
|
|
1663
1680
|
children: e
|
|
1664
1681
|
}, e))
|
|
@@ -1666,14 +1683,14 @@ var Xe = [
|
|
|
1666
1683
|
})
|
|
1667
1684
|
})
|
|
1668
1685
|
]
|
|
1669
|
-
}), /* @__PURE__ */
|
|
1686
|
+
}), /* @__PURE__ */ W("div", {
|
|
1670
1687
|
className: "space-y-6",
|
|
1671
|
-
children: [/* @__PURE__ */
|
|
1688
|
+
children: [/* @__PURE__ */ U(S, {
|
|
1672
1689
|
title: i("devportal.details", "Details"),
|
|
1673
|
-
children: /* @__PURE__ */
|
|
1690
|
+
children: /* @__PURE__ */ U(ne, { items: [
|
|
1674
1691
|
{
|
|
1675
1692
|
label: i("devportal.appId", "App ID"),
|
|
1676
|
-
value: /* @__PURE__ */
|
|
1693
|
+
value: /* @__PURE__ */ U("code", {
|
|
1677
1694
|
className: "text-xs",
|
|
1678
1695
|
children: e.id
|
|
1679
1696
|
})
|
|
@@ -1709,32 +1726,32 @@ var Xe = [
|
|
|
1709
1726
|
value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : i("devportal.notPublished", "Not published")
|
|
1710
1727
|
}
|
|
1711
1728
|
] })
|
|
1712
|
-
}), /* @__PURE__ */
|
|
1729
|
+
}), /* @__PURE__ */ U(S, {
|
|
1713
1730
|
title: i("devportal.links", "Links"),
|
|
1714
|
-
children: /* @__PURE__ */
|
|
1731
|
+
children: /* @__PURE__ */ W("div", {
|
|
1715
1732
|
className: "space-y-2",
|
|
1716
1733
|
children: [
|
|
1717
|
-
e.websiteUrl && /* @__PURE__ */
|
|
1734
|
+
e.websiteUrl && /* @__PURE__ */ U(Q, {
|
|
1718
1735
|
label: i("devportal.website", "Website"),
|
|
1719
1736
|
url: e.websiteUrl
|
|
1720
1737
|
}),
|
|
1721
|
-
e.documentationUrl && /* @__PURE__ */
|
|
1738
|
+
e.documentationUrl && /* @__PURE__ */ U(Q, {
|
|
1722
1739
|
label: i("devportal.documentation", "Documentation"),
|
|
1723
1740
|
url: e.documentationUrl
|
|
1724
1741
|
}),
|
|
1725
|
-
e.supportUrl && /* @__PURE__ */
|
|
1742
|
+
e.supportUrl && /* @__PURE__ */ U(Q, {
|
|
1726
1743
|
label: i("devportal.support", "Support"),
|
|
1727
1744
|
url: e.supportUrl
|
|
1728
1745
|
}),
|
|
1729
|
-
e.githubUrl && /* @__PURE__ */
|
|
1746
|
+
e.githubUrl && /* @__PURE__ */ U(Q, {
|
|
1730
1747
|
label: i("devportal.github", "GitHub"),
|
|
1731
1748
|
url: e.githubUrl
|
|
1732
1749
|
}),
|
|
1733
|
-
e.privacyPolicyUrl && /* @__PURE__ */
|
|
1750
|
+
e.privacyPolicyUrl && /* @__PURE__ */ U(Q, {
|
|
1734
1751
|
label: i("devportal.privacyPolicy", "Privacy Policy"),
|
|
1735
1752
|
url: e.privacyPolicyUrl
|
|
1736
1753
|
}),
|
|
1737
|
-
e.termsOfServiceUrl && /* @__PURE__ */
|
|
1754
|
+
e.termsOfServiceUrl && /* @__PURE__ */ U(Q, {
|
|
1738
1755
|
label: i("devportal.termsOfService", "Terms of Service"),
|
|
1739
1756
|
url: e.termsOfServiceUrl
|
|
1740
1757
|
})
|
|
@@ -1745,15 +1762,15 @@ var Xe = [
|
|
|
1745
1762
|
})]
|
|
1746
1763
|
});
|
|
1747
1764
|
}, ct = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
1748
|
-
let { t: i } =
|
|
1765
|
+
let { t: i } = G(), a = (e, t) => {
|
|
1749
1766
|
let n = i(e);
|
|
1750
1767
|
return n === e ? t : n;
|
|
1751
1768
|
};
|
|
1752
|
-
return /* @__PURE__ */
|
|
1769
|
+
return /* @__PURE__ */ W("div", {
|
|
1753
1770
|
className: "space-y-6",
|
|
1754
|
-
children: [/* @__PURE__ */
|
|
1771
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1755
1772
|
className: "flex items-center justify-between",
|
|
1756
|
-
children: [/* @__PURE__ */
|
|
1773
|
+
children: [/* @__PURE__ */ W("p", {
|
|
1757
1774
|
className: "text-sm text-text-secondary",
|
|
1758
1775
|
children: [
|
|
1759
1776
|
t.length,
|
|
@@ -1762,81 +1779,81 @@ var Xe = [
|
|
|
1762
1779
|
" ",
|
|
1763
1780
|
a("devportal.configured", "configured")
|
|
1764
1781
|
]
|
|
1765
|
-
}), /* @__PURE__ */
|
|
1782
|
+
}), /* @__PURE__ */ W("button", {
|
|
1766
1783
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1767
1784
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1768
|
-
children: [/* @__PURE__ */
|
|
1785
|
+
children: [/* @__PURE__ */ U(z, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1769
1786
|
})]
|
|
1770
|
-
}), t.length > 0 ? /* @__PURE__ */
|
|
1787
|
+
}), t.length > 0 ? /* @__PURE__ */ U("div", {
|
|
1771
1788
|
className: "space-y-4",
|
|
1772
|
-
children: t.map((t) => /* @__PURE__ */
|
|
1789
|
+
children: t.map((t) => /* @__PURE__ */ W("div", {
|
|
1773
1790
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
|
|
1774
1791
|
children: [
|
|
1775
|
-
/* @__PURE__ */
|
|
1792
|
+
/* @__PURE__ */ W("div", {
|
|
1776
1793
|
className: "flex items-start justify-between",
|
|
1777
|
-
children: [/* @__PURE__ */
|
|
1794
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("div", {
|
|
1778
1795
|
className: "flex items-center gap-2",
|
|
1779
|
-
children: [/* @__PURE__ */
|
|
1796
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
1780
1797
|
className: "font-medium",
|
|
1781
1798
|
children: t.name
|
|
1782
|
-
}), /* @__PURE__ */
|
|
1799
|
+
}), /* @__PURE__ */ U(T, {
|
|
1783
1800
|
status: t.status,
|
|
1784
1801
|
type: "webhook"
|
|
1785
1802
|
})]
|
|
1786
|
-
}), t.description && /* @__PURE__ */
|
|
1803
|
+
}), t.description && /* @__PURE__ */ U("p", {
|
|
1787
1804
|
className: "text-sm text-text-secondary mt-1",
|
|
1788
1805
|
children: t.description
|
|
1789
|
-
})] }), /* @__PURE__ */
|
|
1806
|
+
})] }), /* @__PURE__ */ U("button", {
|
|
1790
1807
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1791
1808
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1792
|
-
children: /* @__PURE__ */
|
|
1809
|
+
children: /* @__PURE__ */ U(Ae, { size: 20 })
|
|
1793
1810
|
})]
|
|
1794
1811
|
}),
|
|
1795
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1796
1813
|
className: "text-xs text-text-secondary mb-1",
|
|
1797
1814
|
children: a("devportal.endpointUrl", "Endpoint URL")
|
|
1798
|
-
}), /* @__PURE__ */
|
|
1815
|
+
}), /* @__PURE__ */ U("code", {
|
|
1799
1816
|
className: "text-sm bg-bg-sunken px-2 py-1 rounded block truncate",
|
|
1800
1817
|
children: t.url
|
|
1801
1818
|
})] }),
|
|
1802
|
-
/* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1803
1820
|
className: "text-xs text-text-secondary mb-2",
|
|
1804
1821
|
children: a("devportal.events", "Events")
|
|
1805
|
-
}), /* @__PURE__ */
|
|
1822
|
+
}), /* @__PURE__ */ U("div", {
|
|
1806
1823
|
className: "flex flex-wrap gap-2",
|
|
1807
|
-
children: t.events.map((e) => /* @__PURE__ */
|
|
1824
|
+
children: t.events.map((e) => /* @__PURE__ */ U("span", {
|
|
1808
1825
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs",
|
|
1809
1826
|
children: e
|
|
1810
1827
|
}, e))
|
|
1811
1828
|
})] }),
|
|
1812
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ W("div", {
|
|
1813
1830
|
className: "grid gap-4 sm:grid-cols-4 text-sm",
|
|
1814
1831
|
children: [
|
|
1815
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1816
1833
|
className: "text-xs text-text-secondary",
|
|
1817
1834
|
children: a("devportal.success", "Success")
|
|
1818
|
-
}), /* @__PURE__ */
|
|
1835
|
+
}), /* @__PURE__ */ U("p", {
|
|
1819
1836
|
className: "font-medium text-status-success-text",
|
|
1820
1837
|
children: t.successCount.toLocaleString()
|
|
1821
1838
|
})] }),
|
|
1822
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1823
1840
|
className: "text-xs text-text-secondary",
|
|
1824
1841
|
children: a("devportal.failed", "Failed")
|
|
1825
|
-
}), /* @__PURE__ */
|
|
1842
|
+
}), /* @__PURE__ */ U("p", {
|
|
1826
1843
|
className: "font-medium text-status-error-text",
|
|
1827
1844
|
children: t.failureCount.toLocaleString()
|
|
1828
1845
|
})] }),
|
|
1829
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1830
1847
|
className: "text-xs text-text-secondary",
|
|
1831
1848
|
children: a("devportal.successRate", "Success Rate")
|
|
1832
|
-
}), /* @__PURE__ */
|
|
1849
|
+
}), /* @__PURE__ */ W("p", {
|
|
1833
1850
|
className: "font-medium",
|
|
1834
1851
|
children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
|
|
1835
1852
|
})] }),
|
|
1836
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1837
1854
|
className: "text-xs text-text-secondary",
|
|
1838
1855
|
children: a("devportal.lastTriggered", "Last Triggered")
|
|
1839
|
-
}), /* @__PURE__ */
|
|
1856
|
+
}), /* @__PURE__ */ U("p", {
|
|
1840
1857
|
className: "font-medium",
|
|
1841
1858
|
children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
|
|
1842
1859
|
})] })
|
|
@@ -1844,29 +1861,29 @@ var Xe = [
|
|
|
1844
1861
|
})
|
|
1845
1862
|
]
|
|
1846
1863
|
}, t.id))
|
|
1847
|
-
}) : /* @__PURE__ */
|
|
1864
|
+
}) : /* @__PURE__ */ U(r, {
|
|
1848
1865
|
illustration: "empty-notifications",
|
|
1849
|
-
icon: /* @__PURE__ */
|
|
1866
|
+
icon: /* @__PURE__ */ U(ze, { size: 32 }),
|
|
1850
1867
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
1851
1868
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
1852
|
-
action: /* @__PURE__ */
|
|
1869
|
+
action: /* @__PURE__ */ W("button", {
|
|
1853
1870
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1854
1871
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1855
|
-
children: [/* @__PURE__ */
|
|
1872
|
+
children: [/* @__PURE__ */ U(z, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1856
1873
|
})
|
|
1857
1874
|
})]
|
|
1858
1875
|
});
|
|
1859
1876
|
}, lt = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
1860
|
-
let { t: p } =
|
|
1877
|
+
let { t: p } = G(), m = (e, t) => {
|
|
1861
1878
|
let n = p(e);
|
|
1862
1879
|
return n === e ? t : n;
|
|
1863
1880
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
1864
|
-
return /* @__PURE__ */
|
|
1881
|
+
return /* @__PURE__ */ W("div", {
|
|
1865
1882
|
className: "space-y-6",
|
|
1866
1883
|
children: [
|
|
1867
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ W("div", {
|
|
1868
1885
|
className: "flex items-center justify-between",
|
|
1869
|
-
children: [/* @__PURE__ */
|
|
1886
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("p", {
|
|
1870
1887
|
className: "text-sm text-text-secondary",
|
|
1871
1888
|
children: [
|
|
1872
1889
|
n.length,
|
|
@@ -1877,7 +1894,7 @@ var Xe = [
|
|
|
1877
1894
|
" ",
|
|
1878
1895
|
e
|
|
1879
1896
|
]
|
|
1880
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
1897
|
+
}), h.length > 0 && /* @__PURE__ */ W("p", {
|
|
1881
1898
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1882
1899
|
children: [
|
|
1883
1900
|
h.length,
|
|
@@ -1889,44 +1906,44 @@ var Xe = [
|
|
|
1889
1906
|
" ",
|
|
1890
1907
|
m("devportal.revokedExpired", "revoked/expired")
|
|
1891
1908
|
]
|
|
1892
|
-
})] }), /* @__PURE__ */
|
|
1909
|
+
})] }), /* @__PURE__ */ W("button", {
|
|
1893
1910
|
onClick: i,
|
|
1894
1911
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
1895
|
-
children: [/* @__PURE__ */
|
|
1912
|
+
children: [/* @__PURE__ */ U(z, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1896
1913
|
})]
|
|
1897
1914
|
}),
|
|
1898
|
-
h.length > 0 && /* @__PURE__ */
|
|
1915
|
+
h.length > 0 && /* @__PURE__ */ U("div", {
|
|
1899
1916
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
1900
|
-
children: /* @__PURE__ */
|
|
1917
|
+
children: /* @__PURE__ */ W("div", {
|
|
1901
1918
|
className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
|
|
1902
|
-
children: [/* @__PURE__ */
|
|
1919
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1903
1920
|
className: "flex flex-wrap items-center gap-3",
|
|
1904
|
-
children: [/* @__PURE__ */
|
|
1921
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1905
1922
|
className: "flex items-center gap-2",
|
|
1906
|
-
children: [/* @__PURE__ */
|
|
1923
|
+
children: [/* @__PURE__ */ U(D, {
|
|
1907
1924
|
checked: d,
|
|
1908
1925
|
indeterminate: f,
|
|
1909
1926
|
onChange: c,
|
|
1910
1927
|
ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
|
|
1911
|
-
}), /* @__PURE__ */
|
|
1928
|
+
}), /* @__PURE__ */ U("span", {
|
|
1912
1929
|
className: "text-sm font-medium",
|
|
1913
1930
|
children: m("devportal.selectAllActive", "Select all active")
|
|
1914
1931
|
})]
|
|
1915
|
-
}), o.size > 0 && /* @__PURE__ */
|
|
1932
|
+
}), o.size > 0 && /* @__PURE__ */ U("button", {
|
|
1916
1933
|
onClick: l,
|
|
1917
1934
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
1918
1935
|
children: m("devportal.clearSelection", "Clear selection")
|
|
1919
1936
|
})]
|
|
1920
|
-
}), /* @__PURE__ */
|
|
1937
|
+
}), /* @__PURE__ */ W("div", {
|
|
1921
1938
|
className: "flex flex-wrap items-center gap-2",
|
|
1922
|
-
children: [/* @__PURE__ */
|
|
1939
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1923
1940
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
1924
1941
|
children: [
|
|
1925
1942
|
o.size,
|
|
1926
1943
|
" ",
|
|
1927
1944
|
m("devportal.selected", "selected")
|
|
1928
1945
|
]
|
|
1929
|
-
}), /* @__PURE__ */
|
|
1946
|
+
}), /* @__PURE__ */ W("button", {
|
|
1930
1947
|
onClick: u,
|
|
1931
1948
|
disabled: o.size === 0,
|
|
1932
1949
|
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",
|
|
@@ -1935,33 +1952,33 @@ var Xe = [
|
|
|
1935
1952
|
})]
|
|
1936
1953
|
})
|
|
1937
1954
|
}),
|
|
1938
|
-
n.length > 0 ? /* @__PURE__ */
|
|
1955
|
+
n.length > 0 ? /* @__PURE__ */ U("div", {
|
|
1939
1956
|
className: "space-y-4",
|
|
1940
|
-
children: n.map((e) => /* @__PURE__ */
|
|
1957
|
+
children: n.map((e) => /* @__PURE__ */ W("div", {
|
|
1941
1958
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 space-y-4 shadow-[var(--shadow-pop)]",
|
|
1942
1959
|
children: [
|
|
1943
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ W("div", {
|
|
1944
1961
|
className: "flex items-start justify-between",
|
|
1945
|
-
children: [/* @__PURE__ */
|
|
1962
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1946
1963
|
className: "flex items-start gap-3",
|
|
1947
|
-
children: [e.status === "ACTIVE" && /* @__PURE__ */
|
|
1964
|
+
children: [e.status === "ACTIVE" && /* @__PURE__ */ U("div", {
|
|
1948
1965
|
onClick: (e) => e.stopPropagation(),
|
|
1949
|
-
children: /* @__PURE__ */
|
|
1966
|
+
children: /* @__PURE__ */ U(D, {
|
|
1950
1967
|
checked: o.has(e.id),
|
|
1951
1968
|
onChange: (t) => s(e.id, t),
|
|
1952
1969
|
ariaLabel: `Select delegation ${e.id}`,
|
|
1953
1970
|
className: "mt-1"
|
|
1954
1971
|
})
|
|
1955
|
-
}), /* @__PURE__ */
|
|
1972
|
+
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ W("div", {
|
|
1956
1973
|
className: "flex items-center gap-2",
|
|
1957
|
-
children: [/* @__PURE__ */
|
|
1974
|
+
children: [/* @__PURE__ */ W("h3", {
|
|
1958
1975
|
className: "font-medium",
|
|
1959
1976
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
1960
|
-
}), /* @__PURE__ */
|
|
1961
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1977
|
+
}), /* @__PURE__ */ U("span", {
|
|
1978
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Ze[e.status]),
|
|
1962
1979
|
children: e.status
|
|
1963
1980
|
})]
|
|
1964
|
-
}), /* @__PURE__ */
|
|
1981
|
+
}), /* @__PURE__ */ W("p", {
|
|
1965
1982
|
className: "text-sm text-text-secondary mt-1",
|
|
1966
1983
|
children: [
|
|
1967
1984
|
m("devportal.granted", "Granted"),
|
|
@@ -1973,55 +1990,55 @@ var Xe = [
|
|
|
1973
1990
|
e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
|
|
1974
1991
|
]
|
|
1975
1992
|
})] })]
|
|
1976
|
-
}), e.status === "ACTIVE" && /* @__PURE__ */
|
|
1993
|
+
}), e.status === "ACTIVE" && /* @__PURE__ */ W("button", {
|
|
1977
1994
|
onClick: () => a(e.id),
|
|
1978
1995
|
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",
|
|
1979
|
-
children: [/* @__PURE__ */
|
|
1996
|
+
children: [/* @__PURE__ */ U(Ve, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
1980
1997
|
})]
|
|
1981
1998
|
}),
|
|
1982
|
-
/* @__PURE__ */
|
|
1999
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1983
2000
|
className: "text-xs text-text-secondary mb-2",
|
|
1984
2001
|
children: m("devportal.grantedScopes", "Granted Scopes")
|
|
1985
|
-
}), /* @__PURE__ */
|
|
2002
|
+
}), /* @__PURE__ */ U("div", {
|
|
1986
2003
|
className: "flex flex-wrap gap-2",
|
|
1987
|
-
children: e.scopes.map((e) => /* @__PURE__ */
|
|
2004
|
+
children: e.scopes.map((e) => /* @__PURE__ */ U("span", {
|
|
1988
2005
|
className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
|
|
1989
2006
|
children: e
|
|
1990
2007
|
}, e))
|
|
1991
2008
|
})] }),
|
|
1992
|
-
e.workspaceIds.length > 0 && /* @__PURE__ */
|
|
2009
|
+
e.workspaceIds.length > 0 && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
1993
2010
|
className: "text-xs text-text-secondary mb-2",
|
|
1994
2011
|
children: m("devportal.workspaceScope", "Workspace Scope")
|
|
1995
|
-
}), /* @__PURE__ */
|
|
2012
|
+
}), /* @__PURE__ */ U("div", {
|
|
1996
2013
|
className: "flex flex-wrap gap-2",
|
|
1997
|
-
children: e.workspaceIds.map((e) => /* @__PURE__ */
|
|
2014
|
+
children: e.workspaceIds.map((e) => /* @__PURE__ */ U("code", {
|
|
1998
2015
|
className: "rounded bg-bg-sunken px-2 py-0.5 text-xs",
|
|
1999
2016
|
children: e
|
|
2000
2017
|
}, e))
|
|
2001
2018
|
})] }),
|
|
2002
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ W("div", {
|
|
2003
2020
|
className: "flex items-center gap-4 text-xs text-text-secondary",
|
|
2004
2021
|
children: [
|
|
2005
|
-
e.expiresAt && /* @__PURE__ */
|
|
2022
|
+
e.expiresAt && /* @__PURE__ */ W("span", {
|
|
2006
2023
|
className: "flex items-center gap-1",
|
|
2007
2024
|
children: [
|
|
2008
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ U(Se, { size: 12 }),
|
|
2009
2026
|
m("devportal.expires", "Expires"),
|
|
2010
2027
|
" ",
|
|
2011
2028
|
new Date(e.expiresAt).toLocaleDateString()
|
|
2012
2029
|
]
|
|
2013
2030
|
}),
|
|
2014
|
-
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */
|
|
2031
|
+
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ W("span", {
|
|
2015
2032
|
className: "flex items-center gap-1",
|
|
2016
|
-
children: [/* @__PURE__ */
|
|
2033
|
+
children: [/* @__PURE__ */ U(be, {
|
|
2017
2034
|
size: 12,
|
|
2018
2035
|
className: "text-status-success-text"
|
|
2019
2036
|
}), m("devportal.noExpiration", "No expiration")]
|
|
2020
2037
|
}),
|
|
2021
|
-
e.revokedAt && /* @__PURE__ */
|
|
2038
|
+
e.revokedAt && /* @__PURE__ */ W("span", {
|
|
2022
2039
|
className: "flex items-center gap-1",
|
|
2023
2040
|
children: [
|
|
2024
|
-
/* @__PURE__ */
|
|
2041
|
+
/* @__PURE__ */ U(Ve, {
|
|
2025
2042
|
size: 12,
|
|
2026
2043
|
className: "text-status-error-text"
|
|
2027
2044
|
}),
|
|
@@ -2034,53 +2051,53 @@ var Xe = [
|
|
|
2034
2051
|
})
|
|
2035
2052
|
]
|
|
2036
2053
|
}, e.id))
|
|
2037
|
-
}) : /* @__PURE__ */
|
|
2054
|
+
}) : /* @__PURE__ */ U(r, {
|
|
2038
2055
|
illustration: "empty-people",
|
|
2039
|
-
icon: /* @__PURE__ */
|
|
2056
|
+
icon: /* @__PURE__ */ U(Re, { size: 32 }),
|
|
2040
2057
|
title: m("devportal.noDelegations", "No delegations"),
|
|
2041
2058
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
2042
|
-
action: /* @__PURE__ */
|
|
2059
|
+
action: /* @__PURE__ */ W("button", {
|
|
2043
2060
|
onClick: i,
|
|
2044
2061
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
2045
|
-
children: [/* @__PURE__ */
|
|
2062
|
+
children: [/* @__PURE__ */ U(z, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
2046
2063
|
})
|
|
2047
2064
|
})
|
|
2048
2065
|
]
|
|
2049
2066
|
});
|
|
2050
2067
|
}, ut = ({ analytics: e }) => {
|
|
2051
|
-
let { t } =
|
|
2068
|
+
let { t } = G(), n = (e, n) => {
|
|
2052
2069
|
let r = t(e);
|
|
2053
2070
|
return r === e ? n : r;
|
|
2054
2071
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
2055
|
-
return /* @__PURE__ */
|
|
2072
|
+
return /* @__PURE__ */ W("div", {
|
|
2056
2073
|
className: "space-y-6",
|
|
2057
|
-
children: [/* @__PURE__ */
|
|
2074
|
+
children: [/* @__PURE__ */ W("div", {
|
|
2058
2075
|
className: "grid gap-4 sm:grid-cols-4",
|
|
2059
2076
|
children: [
|
|
2060
|
-
/* @__PURE__ */
|
|
2077
|
+
/* @__PURE__ */ U(Z, {
|
|
2061
2078
|
label: n("devportal.activeUsers", "Active Users"),
|
|
2062
2079
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
2063
2080
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
2064
2081
|
}),
|
|
2065
|
-
/* @__PURE__ */
|
|
2082
|
+
/* @__PURE__ */ U(Z, {
|
|
2066
2083
|
label: n("devportal.apiCalls", "API Calls"),
|
|
2067
2084
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
2068
2085
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
2069
2086
|
}),
|
|
2070
|
-
/* @__PURE__ */
|
|
2087
|
+
/* @__PURE__ */ U(Z, {
|
|
2071
2088
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
2072
2089
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
2073
2090
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
2074
2091
|
}),
|
|
2075
|
-
/* @__PURE__ */
|
|
2092
|
+
/* @__PURE__ */ U(Z, {
|
|
2076
2093
|
label: n("devportal.errorRate", "Error Rate"),
|
|
2077
2094
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
2078
2095
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
2079
2096
|
})
|
|
2080
2097
|
]
|
|
2081
|
-
}), /* @__PURE__ */
|
|
2098
|
+
}), /* @__PURE__ */ U(S, {
|
|
2082
2099
|
title: n("devportal.dailyBreakdown", "Daily Breakdown"),
|
|
2083
|
-
children: e.length > 0 ? /* @__PURE__ */
|
|
2100
|
+
children: e.length > 0 ? /* @__PURE__ */ U(te, {
|
|
2084
2101
|
data: e,
|
|
2085
2102
|
keyField: "id",
|
|
2086
2103
|
columns: [
|
|
@@ -2120,19 +2137,19 @@ var Xe = [
|
|
|
2120
2137
|
render: (e) => e.sessions.toLocaleString()
|
|
2121
2138
|
}
|
|
2122
2139
|
]
|
|
2123
|
-
}) : /* @__PURE__ */
|
|
2140
|
+
}) : /* @__PURE__ */ U(r, {
|
|
2124
2141
|
illustration: "empty-data",
|
|
2125
|
-
icon: /* @__PURE__ */
|
|
2142
|
+
icon: /* @__PURE__ */ U(ye, { size: 32 }),
|
|
2126
2143
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
2127
2144
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
2128
2145
|
})
|
|
2129
2146
|
})]
|
|
2130
2147
|
});
|
|
2131
2148
|
}, dt = "# Sample query — replace with your own\n# Note: introspection is disabled on this gateway for security.\n# Use a real query from your app's API schema instead.\nquery GetCurrentUser {\n currentUser {\n id\n email\n }\n}", ft = ({ app: t }) => {
|
|
2132
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
2149
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = G(), o = (e, t) => {
|
|
2133
2150
|
let n = a(e);
|
|
2134
2151
|
return n === e ? t : n;
|
|
2135
|
-
}, [s, c] =
|
|
2152
|
+
}, [s, c] = M(dt), [l, u] = M("{}"), [d, f] = M(""), [p, m] = M(!1), [h, g] = M(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = M(i || ""), [y, b] = M(!1), x = A(async () => {
|
|
2136
2153
|
m(!0), f("");
|
|
2137
2154
|
try {
|
|
2138
2155
|
let e = {};
|
|
@@ -2163,24 +2180,24 @@ var Xe = [
|
|
|
2163
2180
|
l,
|
|
2164
2181
|
h,
|
|
2165
2182
|
_
|
|
2166
|
-
]), S =
|
|
2183
|
+
]), S = A(() => {
|
|
2167
2184
|
i && v(i), b(!0);
|
|
2168
2185
|
}, [i]);
|
|
2169
|
-
return /* @__PURE__ */
|
|
2186
|
+
return /* @__PURE__ */ W("div", {
|
|
2170
2187
|
className: "space-y-4",
|
|
2171
2188
|
children: [
|
|
2172
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ W("div", {
|
|
2173
2190
|
className: "flex items-center justify-between",
|
|
2174
|
-
children: [/* @__PURE__ */
|
|
2191
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", {
|
|
2175
2192
|
className: "text-lg font-semibold",
|
|
2176
2193
|
children: o("devportal.apiPlayground", "API Playground")
|
|
2177
|
-
}), /* @__PURE__ */
|
|
2194
|
+
}), /* @__PURE__ */ W("p", {
|
|
2178
2195
|
className: "text-sm text-text-secondary",
|
|
2179
2196
|
children: [
|
|
2180
2197
|
o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
|
|
2181
2198
|
" ",
|
|
2182
|
-
/* @__PURE__ */
|
|
2183
|
-
t.appId && /* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ U("strong", { children: t.name }),
|
|
2200
|
+
t.appId && /* @__PURE__ */ W("span", {
|
|
2184
2201
|
className: "ml-1 text-xs text-text-secondary",
|
|
2185
2202
|
children: [
|
|
2186
2203
|
"(OAuth App: ",
|
|
@@ -2189,39 +2206,39 @@ var Xe = [
|
|
|
2189
2206
|
]
|
|
2190
2207
|
})
|
|
2191
2208
|
]
|
|
2192
|
-
})] }), /* @__PURE__ */
|
|
2209
|
+
})] }), /* @__PURE__ */ W("button", {
|
|
2193
2210
|
onClick: S,
|
|
2194
2211
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
2195
|
-
children: [/* @__PURE__ */
|
|
2212
|
+
children: [/* @__PURE__ */ U(L, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
2196
2213
|
})]
|
|
2197
2214
|
}),
|
|
2198
|
-
y && /* @__PURE__ */
|
|
2215
|
+
y && /* @__PURE__ */ W("div", {
|
|
2199
2216
|
className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
|
|
2200
2217
|
children: [
|
|
2201
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ U("p", {
|
|
2202
2219
|
className: "font-medium text-status-info-text",
|
|
2203
2220
|
children: o("devportal.authenticationGuide", "Authentication Guide")
|
|
2204
2221
|
}),
|
|
2205
|
-
/* @__PURE__ */
|
|
2222
|
+
/* @__PURE__ */ W("p", {
|
|
2206
2223
|
className: "text-status-info-text",
|
|
2207
2224
|
children: [
|
|
2208
2225
|
o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
|
|
2209
2226
|
" ",
|
|
2210
|
-
/* @__PURE__ */
|
|
2227
|
+
/* @__PURE__ */ U("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
|
|
2211
2228
|
" ",
|
|
2212
2229
|
o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
|
|
2213
2230
|
]
|
|
2214
2231
|
}),
|
|
2215
|
-
/* @__PURE__ */
|
|
2232
|
+
/* @__PURE__ */ U("pre", {
|
|
2216
2233
|
className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
|
|
2217
2234
|
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}"
|
|
2218
2235
|
}),
|
|
2219
|
-
/* @__PURE__ */
|
|
2236
|
+
/* @__PURE__ */ W("p", {
|
|
2220
2237
|
className: "text-status-info-text",
|
|
2221
2238
|
children: [
|
|
2222
2239
|
o("devportal.useReturnedAccessToken", "Use the returned"),
|
|
2223
2240
|
" ",
|
|
2224
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ U("code", {
|
|
2225
2242
|
className: "bg-status-info-bg-subtle px-1 rounded",
|
|
2226
2243
|
children: "accessToken"
|
|
2227
2244
|
}),
|
|
@@ -2229,79 +2246,79 @@ var Xe = [
|
|
|
2229
2246
|
o("devportal.asBearerToken", "as the Bearer token below.")
|
|
2230
2247
|
]
|
|
2231
2248
|
}),
|
|
2232
|
-
/* @__PURE__ */
|
|
2249
|
+
/* @__PURE__ */ U("button", {
|
|
2233
2250
|
onClick: () => b(!1),
|
|
2234
2251
|
className: "text-xs text-accent-blue hover:underline",
|
|
2235
2252
|
children: o("devportal.dismiss", "Dismiss")
|
|
2236
2253
|
})
|
|
2237
2254
|
]
|
|
2238
2255
|
}),
|
|
2239
|
-
/* @__PURE__ */
|
|
2256
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("label", {
|
|
2240
2257
|
className: "block text-sm font-medium mb-1",
|
|
2241
2258
|
children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
|
|
2242
|
-
}), /* @__PURE__ */
|
|
2259
|
+
}), /* @__PURE__ */ W("div", {
|
|
2243
2260
|
className: "flex gap-2",
|
|
2244
|
-
children: [/* @__PURE__ */
|
|
2261
|
+
children: [/* @__PURE__ */ U("input", {
|
|
2245
2262
|
type: "text",
|
|
2246
2263
|
value: h,
|
|
2247
2264
|
onChange: (e) => g(e.target.value),
|
|
2248
2265
|
className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
|
|
2249
|
-
}), /* @__PURE__ */
|
|
2266
|
+
}), /* @__PURE__ */ W("select", {
|
|
2250
2267
|
onChange: (e) => g(e.target.value),
|
|
2251
2268
|
className: "rounded-md border px-3 py-2 text-sm bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
2252
2269
|
value: h,
|
|
2253
|
-
children: [/* @__PURE__ */
|
|
2270
|
+
children: [/* @__PURE__ */ U("option", {
|
|
2254
2271
|
value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
|
|
2255
2272
|
children: o("devportal.globalGateway", "Global Gateway")
|
|
2256
|
-
}), /* @__PURE__ */
|
|
2273
|
+
}), /* @__PURE__ */ U("option", {
|
|
2257
2274
|
value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
|
|
2258
2275
|
children: o("devportal.workspaceGateway", "Workspace Gateway")
|
|
2259
2276
|
})]
|
|
2260
2277
|
})]
|
|
2261
2278
|
})] }),
|
|
2262
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("label", {
|
|
2263
2280
|
className: "block text-sm font-medium mb-1",
|
|
2264
2281
|
children: o("devportal.bearerToken", "Bearer Token")
|
|
2265
|
-
}), /* @__PURE__ */
|
|
2282
|
+
}), /* @__PURE__ */ U("input", {
|
|
2266
2283
|
type: "password",
|
|
2267
2284
|
value: _,
|
|
2268
2285
|
onChange: (e) => v(e.target.value),
|
|
2269
2286
|
placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
|
|
2270
2287
|
className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface"
|
|
2271
2288
|
})] }),
|
|
2272
|
-
/* @__PURE__ */
|
|
2289
|
+
/* @__PURE__ */ W("div", {
|
|
2273
2290
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
2274
|
-
children: [/* @__PURE__ */
|
|
2291
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("label", {
|
|
2275
2292
|
className: "block text-sm font-medium mb-1",
|
|
2276
2293
|
children: o("devportal.query", "Query")
|
|
2277
|
-
}), /* @__PURE__ */
|
|
2294
|
+
}), /* @__PURE__ */ U("textarea", {
|
|
2278
2295
|
value: s,
|
|
2279
2296
|
onChange: (e) => c(e.target.value),
|
|
2280
2297
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
|
|
2281
2298
|
spellCheck: !1
|
|
2282
|
-
})] }), /* @__PURE__ */
|
|
2299
|
+
})] }), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("label", {
|
|
2283
2300
|
className: "block text-sm font-medium mb-1",
|
|
2284
2301
|
children: o("devportal.variablesJson", "Variables (JSON)")
|
|
2285
|
-
}), /* @__PURE__ */
|
|
2302
|
+
}), /* @__PURE__ */ U("textarea", {
|
|
2286
2303
|
value: l,
|
|
2287
2304
|
onChange: (e) => u(e.target.value),
|
|
2288
2305
|
className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-bg-surface resize-y",
|
|
2289
2306
|
spellCheck: !1
|
|
2290
2307
|
})] })]
|
|
2291
2308
|
}),
|
|
2292
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ W("button", {
|
|
2293
2310
|
onClick: x,
|
|
2294
2311
|
disabled: p,
|
|
2295
2312
|
className: "flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
2296
|
-
children: [p ? /* @__PURE__ */
|
|
2313
|
+
children: [p ? /* @__PURE__ */ U(R, {
|
|
2297
2314
|
size: 16,
|
|
2298
2315
|
className: "animate-spin"
|
|
2299
|
-
}) : /* @__PURE__ */
|
|
2316
|
+
}) : /* @__PURE__ */ U(I, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2300
2317
|
}),
|
|
2301
|
-
d && /* @__PURE__ */
|
|
2318
|
+
d && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("label", {
|
|
2302
2319
|
className: "block text-sm font-medium mb-1",
|
|
2303
2320
|
children: o("devportal.response", "Response")
|
|
2304
|
-
}), /* @__PURE__ */
|
|
2321
|
+
}), /* @__PURE__ */ U("pre", {
|
|
2305
2322
|
className: "w-full max-h-96 overflow-auto rounded-md border bg-bg-sunken p-4 text-xs font-mono",
|
|
2306
2323
|
children: d
|
|
2307
2324
|
})] })
|
|
@@ -2313,7 +2330,7 @@ var Xe = [
|
|
|
2313
2330
|
}, {
|
|
2314
2331
|
value: "PAID",
|
|
2315
2332
|
label: "Paid"
|
|
2316
|
-
}],
|
|
2333
|
+
}], ht = {
|
|
2317
2334
|
NODE: [
|
|
2318
2335
|
{
|
|
2319
2336
|
value: "node",
|
|
@@ -2385,7 +2402,7 @@ var Xe = [
|
|
|
2385
2402
|
label: "Plugin"
|
|
2386
2403
|
}
|
|
2387
2404
|
]
|
|
2388
|
-
},
|
|
2405
|
+
}, gt = {
|
|
2389
2406
|
NODE: "node",
|
|
2390
2407
|
WORKFLOW: "workflow",
|
|
2391
2408
|
APP: "app"
|
|
@@ -2405,7 +2422,7 @@ function X(e) {
|
|
|
2405
2422
|
supportUrl: e.supportUrl ?? "",
|
|
2406
2423
|
privacyPolicyUrl: e.privacyPolicyUrl ?? "",
|
|
2407
2424
|
termsOfServiceUrl: e.termsOfServiceUrl ?? "",
|
|
2408
|
-
manifestItemType: typeof t.itemType == "string" ? t.itemType :
|
|
2425
|
+
manifestItemType: typeof t.itemType == "string" ? t.itemType : gt[e.appType] ?? "",
|
|
2409
2426
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
|
|
2410
2427
|
manifestVersion: typeof n.version == "string" ? n.version : "",
|
|
2411
2428
|
manifestInstallType: typeof r.type == "string" ? r.type : "zip",
|
|
@@ -2416,14 +2433,14 @@ function X(e) {
|
|
|
2416
2433
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
2417
2434
|
};
|
|
2418
2435
|
}
|
|
2419
|
-
var
|
|
2420
|
-
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } =
|
|
2436
|
+
var _t = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i = !1, onNavigateToVersions: a, onNavigateToPricing: o, onNavigateToSubmission: s }) => {
|
|
2437
|
+
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } = G(), p = (e, t) => {
|
|
2421
2438
|
let n = f(e);
|
|
2422
2439
|
return n === e ? t : n;
|
|
2423
|
-
}, [m, h] =
|
|
2440
|
+
}, [m, h] = M(() => X(t)), [g, _] = M(!1), [v, y] = M(null), x = ge(X(t)), C = ge(t);
|
|
2424
2441
|
C.current = t;
|
|
2425
2442
|
let w = JSON.stringify(m) !== JSON.stringify(x.current), [T] = b();
|
|
2426
|
-
|
|
2443
|
+
he(() => {
|
|
2427
2444
|
let e = X(C.current);
|
|
2428
2445
|
h(e), x.current = e, y(null);
|
|
2429
2446
|
}, [t.id]);
|
|
@@ -2472,21 +2489,21 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2472
2489
|
} finally {
|
|
2473
2490
|
_(!1);
|
|
2474
2491
|
}
|
|
2475
|
-
}, { upload: te, uploading: ne, progress: ae, error: oe } =
|
|
2476
|
-
return /* @__PURE__ */
|
|
2492
|
+
}, { upload: te, uploading: ne, progress: ae, error: oe } = pe(c, l, u, d, "/DevPortal/Assets"), { upload: ce, uploading: le, progress: ue, error: me } = pe(c, l, u, d, "/DevPortal/Assets"), { upload: A, uploading: j, progress: _e, error: ve } = pe(c, l, u, d, "/DevPortal/Assets"), ye = pt.has(m.manifestItemType), F = t.status === "SUBMITTED";
|
|
2493
|
+
return /* @__PURE__ */ W("div", {
|
|
2477
2494
|
className: "space-y-8 max-w-3xl",
|
|
2478
2495
|
children: [
|
|
2479
|
-
t.status === "PUBLISHED" ? /* @__PURE__ */
|
|
2496
|
+
t.status === "PUBLISHED" ? /* @__PURE__ */ W("div", {
|
|
2480
2497
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2481
|
-
children: [/* @__PURE__ */
|
|
2498
|
+
children: [/* @__PURE__ */ U(be, {
|
|
2482
2499
|
size: 16,
|
|
2483
2500
|
className: "text-success mt-0.5 shrink-0"
|
|
2484
|
-
}), /* @__PURE__ */
|
|
2501
|
+
}), /* @__PURE__ */ W("div", {
|
|
2485
2502
|
className: "text-sm",
|
|
2486
|
-
children: [/* @__PURE__ */
|
|
2503
|
+
children: [/* @__PURE__ */ U("span", {
|
|
2487
2504
|
className: "font-medium text-success",
|
|
2488
2505
|
children: p("devportal.storeListing.published", "Published")
|
|
2489
|
-
}), t.publishedAt && /* @__PURE__ */
|
|
2506
|
+
}), t.publishedAt && /* @__PURE__ */ W("span", {
|
|
2490
2507
|
className: "text-text-secondary ml-2",
|
|
2491
2508
|
children: [
|
|
2492
2509
|
p("devportal.storeListing.since", "since"),
|
|
@@ -2495,76 +2512,76 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2495
2512
|
]
|
|
2496
2513
|
})]
|
|
2497
2514
|
})]
|
|
2498
|
-
}) :
|
|
2515
|
+
}) : F ? /* @__PURE__ */ W("div", {
|
|
2499
2516
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2500
|
-
children: [/* @__PURE__ */
|
|
2517
|
+
children: [/* @__PURE__ */ W("div", {
|
|
2501
2518
|
className: "flex items-start gap-3",
|
|
2502
|
-
children: [/* @__PURE__ */
|
|
2519
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
2503
2520
|
size: 16,
|
|
2504
2521
|
className: "text-primary mt-0.5 shrink-0"
|
|
2505
|
-
}), /* @__PURE__ */
|
|
2522
|
+
}), /* @__PURE__ */ W("div", {
|
|
2506
2523
|
className: "text-sm",
|
|
2507
2524
|
children: [
|
|
2508
|
-
/* @__PURE__ */
|
|
2525
|
+
/* @__PURE__ */ U("span", {
|
|
2509
2526
|
className: "font-medium text-primary",
|
|
2510
2527
|
children: p("devportal.storeListing.underReview", "Submitted for review")
|
|
2511
2528
|
}),
|
|
2512
|
-
t.submittedAt && /* @__PURE__ */
|
|
2529
|
+
t.submittedAt && /* @__PURE__ */ U("span", {
|
|
2513
2530
|
className: "text-text-secondary ml-2",
|
|
2514
2531
|
children: new Date(t.submittedAt).toLocaleDateString()
|
|
2515
2532
|
}),
|
|
2516
|
-
t.reviewStatus && /* @__PURE__ */
|
|
2533
|
+
t.reviewStatus && /* @__PURE__ */ W("span", {
|
|
2517
2534
|
className: "text-text-secondary ml-2",
|
|
2518
2535
|
children: ["· ", t.reviewStatus]
|
|
2519
2536
|
})
|
|
2520
2537
|
]
|
|
2521
2538
|
})]
|
|
2522
|
-
}), s && /* @__PURE__ */
|
|
2539
|
+
}), s && /* @__PURE__ */ W("button", {
|
|
2523
2540
|
type: "button",
|
|
2524
2541
|
onClick: s,
|
|
2525
2542
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2526
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */
|
|
2543
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ U(I, { size: 12 })]
|
|
2527
2544
|
})]
|
|
2528
|
-
}) : /* @__PURE__ */
|
|
2545
|
+
}) : /* @__PURE__ */ W("div", {
|
|
2529
2546
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
2530
|
-
children: [/* @__PURE__ */
|
|
2547
|
+
children: [/* @__PURE__ */ U(N, {
|
|
2531
2548
|
size: 16,
|
|
2532
2549
|
className: "text-warning mt-0.5 shrink-0"
|
|
2533
|
-
}), /* @__PURE__ */
|
|
2550
|
+
}), /* @__PURE__ */ W("div", {
|
|
2534
2551
|
className: "text-sm",
|
|
2535
|
-
children: [/* @__PURE__ */
|
|
2552
|
+
children: [/* @__PURE__ */ U("span", {
|
|
2536
2553
|
className: "font-medium text-warning",
|
|
2537
2554
|
children: p("devportal.storeListing.draft", "Draft")
|
|
2538
|
-
}), /* @__PURE__ */
|
|
2555
|
+
}), /* @__PURE__ */ U("span", {
|
|
2539
2556
|
className: "text-text-secondary ml-2",
|
|
2540
2557
|
children: p("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
2541
2558
|
})]
|
|
2542
2559
|
})]
|
|
2543
2560
|
}),
|
|
2544
|
-
/* @__PURE__ */
|
|
2561
|
+
/* @__PURE__ */ U(S, {
|
|
2545
2562
|
title: p("devportal.package", "Package"),
|
|
2546
2563
|
description: p("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
2547
|
-
children: /* @__PURE__ */
|
|
2564
|
+
children: /* @__PURE__ */ W("div", {
|
|
2548
2565
|
className: "space-y-6",
|
|
2549
2566
|
children: [
|
|
2550
|
-
/* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ U(re, {
|
|
2551
2568
|
label: p("devportal.storeItemType", "Item Type"),
|
|
2552
2569
|
value: m.manifestItemType,
|
|
2553
2570
|
onChange: (e) => {
|
|
2554
2571
|
let t = e.target.value;
|
|
2555
2572
|
E("manifestItemType", t), pt.has(t) ? E("manifestInstallType", "json") : m.manifestInstallType === "json" && E("manifestInstallType", "zip");
|
|
2556
2573
|
},
|
|
2557
|
-
options:
|
|
2574
|
+
options: ht[t.appType] ?? ht.APP,
|
|
2558
2575
|
placeholder: p("devportal.selectItemType", "Select item type…"),
|
|
2559
2576
|
hint: p("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
|
|
2560
2577
|
}),
|
|
2561
|
-
/* @__PURE__ */
|
|
2578
|
+
/* @__PURE__ */ U(k, {
|
|
2562
2579
|
label: p("devportal.manifestDisplayName", "Display Name"),
|
|
2563
2580
|
value: m.manifestDisplayName,
|
|
2564
2581
|
onChange: (e) => E("manifestDisplayName", e.target.value),
|
|
2565
2582
|
placeholder: "My Awesome Node"
|
|
2566
2583
|
}),
|
|
2567
|
-
|
|
2584
|
+
ye && /* @__PURE__ */ U(ie, {
|
|
2568
2585
|
label: t.appType === "WORKFLOW" ? p("devportal.workflowJsonContent", "Workflow Canvas Definition (JSON)") : p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2569
2586
|
value: m.manifestJsonContent,
|
|
2570
2587
|
onChange: (e) => E("manifestJsonContent", e.target.value),
|
|
@@ -2575,15 +2592,15 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2575
2592
|
]
|
|
2576
2593
|
})
|
|
2577
2594
|
}),
|
|
2578
|
-
/* @__PURE__ */
|
|
2595
|
+
/* @__PURE__ */ U(S, {
|
|
2579
2596
|
title: p("devportal.storePresentation", "Store Presence"),
|
|
2580
2597
|
description: p("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
2581
|
-
children: /* @__PURE__ */
|
|
2598
|
+
children: /* @__PURE__ */ W("div", {
|
|
2582
2599
|
className: "space-y-5",
|
|
2583
2600
|
children: [
|
|
2584
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ W("div", {
|
|
2585
2602
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2586
|
-
children: [/* @__PURE__ */
|
|
2603
|
+
children: [/* @__PURE__ */ U(de, {
|
|
2587
2604
|
label: p("devportal.iconUrl", "Icon"),
|
|
2588
2605
|
value: m.iconUrl,
|
|
2589
2606
|
onChange: (e) => E("iconUrl", e),
|
|
@@ -2593,7 +2610,7 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2593
2610
|
uploading: ne,
|
|
2594
2611
|
progress: ae,
|
|
2595
2612
|
error: oe
|
|
2596
|
-
}), /* @__PURE__ */
|
|
2613
|
+
}), /* @__PURE__ */ U(de, {
|
|
2597
2614
|
label: p("devportal.bannerUrl", "Banner"),
|
|
2598
2615
|
value: m.bannerUrl,
|
|
2599
2616
|
onChange: (e) => E("bannerUrl", e),
|
|
@@ -2602,17 +2619,17 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2602
2619
|
upload: ce,
|
|
2603
2620
|
uploading: le,
|
|
2604
2621
|
progress: ue,
|
|
2605
|
-
error:
|
|
2622
|
+
error: me
|
|
2606
2623
|
})]
|
|
2607
2624
|
}),
|
|
2608
|
-
/* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ U(k, {
|
|
2609
2626
|
label: p("devportal.videoUrl", "Demo Video URL"),
|
|
2610
2627
|
value: m.videoUrl,
|
|
2611
2628
|
onChange: (e) => E("videoUrl", e.target.value),
|
|
2612
2629
|
placeholder: "https://...",
|
|
2613
2630
|
hint: p("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2614
2631
|
}),
|
|
2615
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ U(se, {
|
|
2616
2633
|
label: p("devportal.shortDescription", "Short Description"),
|
|
2617
2634
|
value: m.shortDescription,
|
|
2618
2635
|
onChange: (e) => E("shortDescription", e),
|
|
@@ -2620,62 +2637,62 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2620
2637
|
rows: 2,
|
|
2621
2638
|
hint: `${m.shortDescription.length}/200 · ${p("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2622
2639
|
}),
|
|
2623
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ U(se, {
|
|
2624
2641
|
label: p("devportal.longDescription", "Full Description"),
|
|
2625
2642
|
value: m.description,
|
|
2626
2643
|
onChange: (e) => E("description", e),
|
|
2627
2644
|
rows: 5,
|
|
2628
2645
|
hint: p("devportal.fullDescHint", "Markdown supported")
|
|
2629
2646
|
}),
|
|
2630
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ U(fe, {
|
|
2631
2648
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2632
2649
|
onChange: (e) => E("screenshotsText", e.join("\n")),
|
|
2633
|
-
upload:
|
|
2634
|
-
uploading:
|
|
2650
|
+
upload: A,
|
|
2651
|
+
uploading: j,
|
|
2635
2652
|
progress: _e,
|
|
2636
2653
|
error: ve
|
|
2637
2654
|
})
|
|
2638
2655
|
]
|
|
2639
2656
|
})
|
|
2640
2657
|
}),
|
|
2641
|
-
/* @__PURE__ */
|
|
2658
|
+
/* @__PURE__ */ U(S, {
|
|
2642
2659
|
title: p("devportal.linksPolicies", "Links & Policies"),
|
|
2643
2660
|
description: p("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
2644
|
-
children: /* @__PURE__ */
|
|
2661
|
+
children: /* @__PURE__ */ W("div", {
|
|
2645
2662
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2646
2663
|
children: [
|
|
2647
|
-
/* @__PURE__ */
|
|
2664
|
+
/* @__PURE__ */ U(k, {
|
|
2648
2665
|
label: p("devportal.websiteUrl", "Website"),
|
|
2649
2666
|
value: m.websiteUrl,
|
|
2650
2667
|
onChange: (e) => E("websiteUrl", e.target.value),
|
|
2651
2668
|
placeholder: "https://..."
|
|
2652
2669
|
}),
|
|
2653
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ U(k, {
|
|
2654
2671
|
label: p("devportal.documentationUrl", "Documentation"),
|
|
2655
2672
|
value: m.documentationUrl,
|
|
2656
2673
|
onChange: (e) => E("documentationUrl", e.target.value),
|
|
2657
2674
|
placeholder: "https://..."
|
|
2658
2675
|
}),
|
|
2659
|
-
/* @__PURE__ */
|
|
2676
|
+
/* @__PURE__ */ U(k, {
|
|
2660
2677
|
label: p("devportal.githubUrl", "GitHub"),
|
|
2661
2678
|
value: m.githubUrl,
|
|
2662
2679
|
onChange: (e) => E("githubUrl", e.target.value),
|
|
2663
2680
|
placeholder: "https://github.com/..."
|
|
2664
2681
|
}),
|
|
2665
|
-
/* @__PURE__ */
|
|
2682
|
+
/* @__PURE__ */ U(k, {
|
|
2666
2683
|
label: p("devportal.supportUrl", "Support"),
|
|
2667
2684
|
value: m.supportUrl,
|
|
2668
2685
|
onChange: (e) => E("supportUrl", e.target.value),
|
|
2669
2686
|
placeholder: "https://..."
|
|
2670
2687
|
}),
|
|
2671
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ U(k, {
|
|
2672
2689
|
label: `${p("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2673
2690
|
value: m.privacyPolicyUrl,
|
|
2674
2691
|
onChange: (e) => E("privacyPolicyUrl", e.target.value),
|
|
2675
2692
|
placeholder: "https://...",
|
|
2676
2693
|
hint: p("devportal.requiredForStore", "Required for store submission")
|
|
2677
2694
|
}),
|
|
2678
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ U(k, {
|
|
2679
2696
|
label: `${p("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2680
2697
|
value: m.termsOfServiceUrl,
|
|
2681
2698
|
onChange: (e) => E("termsOfServiceUrl", e.target.value),
|
|
@@ -2685,52 +2702,52 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2685
2702
|
]
|
|
2686
2703
|
})
|
|
2687
2704
|
}),
|
|
2688
|
-
/* @__PURE__ */
|
|
2705
|
+
/* @__PURE__ */ W("div", {
|
|
2689
2706
|
className: "border-t pt-6 space-y-3",
|
|
2690
2707
|
children: [
|
|
2691
|
-
v === "success" && /* @__PURE__ */
|
|
2708
|
+
v === "success" && /* @__PURE__ */ W("div", {
|
|
2692
2709
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2693
|
-
children: [/* @__PURE__ */
|
|
2710
|
+
children: [/* @__PURE__ */ U(be, {
|
|
2694
2711
|
size: 15,
|
|
2695
2712
|
className: "shrink-0"
|
|
2696
2713
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
2697
2714
|
}),
|
|
2698
|
-
v === "error" && /* @__PURE__ */
|
|
2715
|
+
v === "error" && /* @__PURE__ */ W("div", {
|
|
2699
2716
|
className: "flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2700
|
-
children: [/* @__PURE__ */
|
|
2717
|
+
children: [/* @__PURE__ */ U(N, {
|
|
2701
2718
|
size: 15,
|
|
2702
2719
|
className: "shrink-0"
|
|
2703
2720
|
}), p("devportal.storeListing.savedError", "Failed to save. Please try again.")]
|
|
2704
2721
|
}),
|
|
2705
|
-
/* @__PURE__ */
|
|
2722
|
+
/* @__PURE__ */ W("div", {
|
|
2706
2723
|
className: "flex flex-wrap items-center gap-3",
|
|
2707
2724
|
children: [
|
|
2708
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ U("button", {
|
|
2709
2726
|
type: "button",
|
|
2710
2727
|
onClick: ee,
|
|
2711
2728
|
disabled: g || !D || !w,
|
|
2712
2729
|
title: D ? w ? void 0 : p("devportal.storeListing.noChanges", "All changes saved — edit any field to save again") : p("devportal.storeListing.requiredFieldsHint", "Fill in Short Description, Privacy Policy URL, and Terms of Service URL to save"),
|
|
2713
2730
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2714
|
-
children: g ? /* @__PURE__ */
|
|
2731
|
+
children: g ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(R, {
|
|
2715
2732
|
size: 16,
|
|
2716
2733
|
className: "animate-spin"
|
|
2717
|
-
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */
|
|
2734
|
+
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Fe, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(P, { size: 16 }), p("devportal.saved", "Saved")] })
|
|
2718
2735
|
}),
|
|
2719
|
-
!D && /* @__PURE__ */
|
|
2736
|
+
!D && /* @__PURE__ */ U("p", {
|
|
2720
2737
|
className: "text-xs text-text-secondary",
|
|
2721
2738
|
children: p("devportal.storeListing.requiredFieldsLabel", "Short Description, Privacy Policy URL, and Terms of Service URL are required")
|
|
2722
2739
|
}),
|
|
2723
|
-
r && n === 0 && a && /* @__PURE__ */
|
|
2740
|
+
r && n === 0 && a && /* @__PURE__ */ W("button", {
|
|
2724
2741
|
type: "button",
|
|
2725
2742
|
onClick: a,
|
|
2726
2743
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2727
|
-
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */
|
|
2744
|
+
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ U(xe, { size: 15 })]
|
|
2728
2745
|
}),
|
|
2729
|
-
(!r || n > 0) && !i && o && /* @__PURE__ */
|
|
2746
|
+
(!r || n > 0) && !i && o && /* @__PURE__ */ W("button", {
|
|
2730
2747
|
type: "button",
|
|
2731
2748
|
onClick: o,
|
|
2732
2749
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2733
|
-
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */
|
|
2750
|
+
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ U(xe, { size: 15 })]
|
|
2734
2751
|
})
|
|
2735
2752
|
]
|
|
2736
2753
|
})
|
|
@@ -2739,20 +2756,20 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2739
2756
|
]
|
|
2740
2757
|
});
|
|
2741
2758
|
}, Z = ({ label: e, value: n, trend: r }) => {
|
|
2742
|
-
let { t: i } =
|
|
2743
|
-
return /* @__PURE__ */
|
|
2759
|
+
let { t: i } = G();
|
|
2760
|
+
return /* @__PURE__ */ W(Ge, {
|
|
2744
2761
|
treatment: "metric",
|
|
2745
2762
|
className: "p-4",
|
|
2746
2763
|
children: [
|
|
2747
|
-
/* @__PURE__ */
|
|
2764
|
+
/* @__PURE__ */ U("p", {
|
|
2748
2765
|
className: "text-sm text-text-secondary",
|
|
2749
2766
|
children: e
|
|
2750
2767
|
}),
|
|
2751
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ U("p", {
|
|
2752
2769
|
className: "text-2xl font-bold tabular-nums",
|
|
2753
2770
|
children: n
|
|
2754
2771
|
}),
|
|
2755
|
-
r !== void 0 && /* @__PURE__ */
|
|
2772
|
+
r !== void 0 && /* @__PURE__ */ W("p", {
|
|
2756
2773
|
className: t("text-xs mt-1 tabular-nums", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-text-secondary"),
|
|
2757
2774
|
children: [
|
|
2758
2775
|
r > 0 ? "+" : "",
|
|
@@ -2766,12 +2783,12 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2766
2783
|
})
|
|
2767
2784
|
]
|
|
2768
2785
|
});
|
|
2769
|
-
}, Q = ({ label: e, url: t }) => /* @__PURE__ */
|
|
2786
|
+
}, Q = ({ label: e, url: t }) => /* @__PURE__ */ W("a", {
|
|
2770
2787
|
href: t,
|
|
2771
2788
|
target: "_blank",
|
|
2772
2789
|
rel: "noopener noreferrer",
|
|
2773
2790
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2774
|
-
children: [/* @__PURE__ */
|
|
2791
|
+
children: [/* @__PURE__ */ U(I, { size: 14 }), e]
|
|
2775
2792
|
}), $ = {
|
|
2776
2793
|
auth: {
|
|
2777
2794
|
label: "Authentication",
|
|
@@ -2829,8 +2846,8 @@ var gt = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2829
2846
|
label: "Roles & Permissions",
|
|
2830
2847
|
description: "Access control configuration"
|
|
2831
2848
|
}
|
|
2832
|
-
},
|
|
2833
|
-
function
|
|
2849
|
+
}, vt = Object.keys($);
|
|
2850
|
+
function yt(e) {
|
|
2834
2851
|
if (!e || !Array.isArray(e.permissions)) return [];
|
|
2835
2852
|
let t = [];
|
|
2836
2853
|
for (let n of e.permissions) n && typeof n == "object" && typeof n.resource == "string" && n.resource && t.push({
|
|
@@ -2839,7 +2856,7 @@ function vt(e) {
|
|
|
2839
2856
|
});
|
|
2840
2857
|
return t;
|
|
2841
2858
|
}
|
|
2842
|
-
function
|
|
2859
|
+
function bt(e) {
|
|
2843
2860
|
let t = [];
|
|
2844
2861
|
for (let n of e) {
|
|
2845
2862
|
let e = n.indexOf(":");
|
|
@@ -2852,21 +2869,21 @@ function yt(e) {
|
|
|
2852
2869
|
}
|
|
2853
2870
|
return t;
|
|
2854
2871
|
}
|
|
2855
|
-
function
|
|
2872
|
+
function xt(e, t) {
|
|
2856
2873
|
if (e.length > 0) return e;
|
|
2857
2874
|
let n = /* @__PURE__ */ new Set();
|
|
2858
2875
|
return t.filter((e) => n.has(e.resource) ? !1 : (n.add(e.resource), !0));
|
|
2859
2876
|
}
|
|
2860
|
-
var
|
|
2877
|
+
var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
2861
2878
|
className: "flex items-center gap-0.5 rounded-md border border-border-subtle bg-bg-sunken/50 p-0.5",
|
|
2862
|
-
children: ["read", "write"].map((n) => /* @__PURE__ */
|
|
2879
|
+
children: ["read", "write"].map((n) => /* @__PURE__ */ U("button", {
|
|
2863
2880
|
type: "button",
|
|
2864
2881
|
onClick: () => t(n),
|
|
2865
2882
|
className: `rounded px-2.5 py-1 text-xs font-medium transition-colors whitespace-nowrap ${e === n ? "bg-bg-base text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
|
|
2866
2883
|
children: n === "read" ? "Read" : "Read & Write"
|
|
2867
2884
|
}, n))
|
|
2868
|
-
}),
|
|
2869
|
-
let i = e.manifest ?? {}, [a, o] =
|
|
2885
|
+
}), Ct = ({ app: e, versionScopes: t, locked: n = !1, onNavigateToVersions: r }) => {
|
|
2886
|
+
let i = e.manifest ?? {}, [a, o] = M(() => xt(yt(i), bt(t ?? []))), [s, c] = M(!1), [l, u] = M(""), [d, f] = M("read"), [p, m] = M(!1), [h, g] = M(!1), [_] = b(), v = (e, t) => {
|
|
2870
2887
|
g(!1), o((n) => n.map((n) => n.resource === e ? {
|
|
2871
2888
|
...n,
|
|
2872
2889
|
level: t
|
|
@@ -2895,58 +2912,58 @@ var xt = ({ level: e, onChange: t }) => /* @__PURE__ */ H("div", {
|
|
|
2895
2912
|
} finally {
|
|
2896
2913
|
m(!1);
|
|
2897
2914
|
}
|
|
2898
|
-
}, w = /* @__PURE__ */
|
|
2915
|
+
}, w = /* @__PURE__ */ U("div", {
|
|
2899
2916
|
className: "rounded-lg border border-border-subtle divide-y divide-border-subtle",
|
|
2900
|
-
children: a.map((e) => /* @__PURE__ */
|
|
2917
|
+
children: a.map((e) => /* @__PURE__ */ W("div", {
|
|
2901
2918
|
className: "flex items-center gap-3 px-4 py-3 hover:bg-bg-sunken/30 transition-colors",
|
|
2902
|
-
children: [/* @__PURE__ */
|
|
2919
|
+
children: [/* @__PURE__ */ W("div", {
|
|
2903
2920
|
className: "flex-1 min-w-0",
|
|
2904
2921
|
children: [
|
|
2905
|
-
/* @__PURE__ */
|
|
2922
|
+
/* @__PURE__ */ U("p", {
|
|
2906
2923
|
className: "text-sm font-medium text-text-primary",
|
|
2907
2924
|
children: $[e.resource]?.label ?? e.resource
|
|
2908
2925
|
}),
|
|
2909
|
-
$[e.resource]?.description && /* @__PURE__ */
|
|
2926
|
+
$[e.resource]?.description && /* @__PURE__ */ U("p", {
|
|
2910
2927
|
className: "text-xs text-text-secondary",
|
|
2911
2928
|
children: $[e.resource].description
|
|
2912
2929
|
}),
|
|
2913
|
-
!$[e.resource] && /* @__PURE__ */
|
|
2930
|
+
!$[e.resource] && /* @__PURE__ */ U("p", {
|
|
2914
2931
|
className: "text-xs text-text-tertiary font-mono",
|
|
2915
2932
|
children: "custom scope"
|
|
2916
2933
|
})
|
|
2917
2934
|
]
|
|
2918
|
-
}), n ? /* @__PURE__ */
|
|
2935
|
+
}), n ? /* @__PURE__ */ U("span", {
|
|
2919
2936
|
className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${e.level === "write" ? "bg-status-warning-bg text-status-warning-text" : "bg-bg-sunken text-text-secondary"}`,
|
|
2920
2937
|
children: e.level === "write" ? "Read & Write" : "Read"
|
|
2921
|
-
}) : /* @__PURE__ */
|
|
2938
|
+
}) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(St, {
|
|
2922
2939
|
level: e.level,
|
|
2923
2940
|
onChange: (t) => v(e.resource, t)
|
|
2924
|
-
}), /* @__PURE__ */
|
|
2941
|
+
}), /* @__PURE__ */ U("button", {
|
|
2925
2942
|
type: "button",
|
|
2926
2943
|
onClick: () => y(e.resource),
|
|
2927
2944
|
title: "Remove permission",
|
|
2928
2945
|
className: "p-1.5 rounded text-text-tertiary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
2929
|
-
children: /* @__PURE__ */
|
|
2946
|
+
children: /* @__PURE__ */ U(Be, { size: 14 })
|
|
2930
2947
|
})] })]
|
|
2931
2948
|
}, e.resource))
|
|
2932
2949
|
});
|
|
2933
|
-
return /* @__PURE__ */
|
|
2950
|
+
return /* @__PURE__ */ U(S, {
|
|
2934
2951
|
title: "Permissions",
|
|
2935
2952
|
description: "These are the permissions your app requests from users. Users see exactly this list when authorizing your app.",
|
|
2936
|
-
children: /* @__PURE__ */
|
|
2953
|
+
children: /* @__PURE__ */ U("div", {
|
|
2937
2954
|
className: "space-y-4",
|
|
2938
|
-
children: n ? /* @__PURE__ */
|
|
2955
|
+
children: n ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W("div", {
|
|
2939
2956
|
className: "rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-3 flex gap-2 text-sm",
|
|
2940
|
-
children: [/* @__PURE__ */
|
|
2957
|
+
children: [/* @__PURE__ */ U(De, {
|
|
2941
2958
|
size: 15,
|
|
2942
2959
|
className: "flex-shrink-0 mt-0.5 text-status-warning-text"
|
|
2943
|
-
}), /* @__PURE__ */
|
|
2960
|
+
}), /* @__PURE__ */ W("span", {
|
|
2944
2961
|
className: "text-status-warning-text",
|
|
2945
2962
|
children: [
|
|
2946
|
-
/* @__PURE__ */
|
|
2963
|
+
/* @__PURE__ */ U("strong", { children: "Permission changes require a new version." }),
|
|
2947
2964
|
" Your app is live and users have already consented to the permissions below. To request new or fewer permissions, publish a new version — existing users will be shown what changed and asked to re-consent before the new version takes effect.",
|
|
2948
2965
|
" ",
|
|
2949
|
-
r && /* @__PURE__ */
|
|
2966
|
+
r && /* @__PURE__ */ U("button", {
|
|
2950
2967
|
type: "button",
|
|
2951
2968
|
onClick: r,
|
|
2952
2969
|
className: "underline font-medium hover:opacity-80 transition-opacity",
|
|
@@ -2954,31 +2971,31 @@ var xt = ({ level: e, onChange: t }) => /* @__PURE__ */ H("div", {
|
|
|
2954
2971
|
})
|
|
2955
2972
|
]
|
|
2956
2973
|
})]
|
|
2957
|
-
}), a.length === 0 ? /* @__PURE__ */
|
|
2974
|
+
}), a.length === 0 ? /* @__PURE__ */ U("div", {
|
|
2958
2975
|
className: "rounded-lg border border-border-subtle border-dashed p-6 text-center text-sm text-text-secondary",
|
|
2959
2976
|
children: "No permissions configured for this version."
|
|
2960
|
-
}) : w] }) : /* @__PURE__ */
|
|
2961
|
-
a.length === 0 ? /* @__PURE__ */
|
|
2977
|
+
}) : w] }) : /* @__PURE__ */ W(H, { children: [
|
|
2978
|
+
a.length === 0 ? /* @__PURE__ */ W("div", {
|
|
2962
2979
|
className: "rounded-lg border border-border-subtle border-dashed p-8 flex flex-col items-center gap-2 text-center text-text-secondary",
|
|
2963
2980
|
children: [
|
|
2964
|
-
/* @__PURE__ */
|
|
2981
|
+
/* @__PURE__ */ U(B, {
|
|
2965
2982
|
size: 28,
|
|
2966
2983
|
className: "opacity-25"
|
|
2967
2984
|
}),
|
|
2968
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ U("p", {
|
|
2969
2986
|
className: "text-sm font-medium text-text-primary",
|
|
2970
2987
|
children: "No permissions configured"
|
|
2971
2988
|
}),
|
|
2972
|
-
/* @__PURE__ */
|
|
2989
|
+
/* @__PURE__ */ U("p", {
|
|
2973
2990
|
className: "text-xs",
|
|
2974
2991
|
children: "Add the permissions your app needs to request from users."
|
|
2975
2992
|
})
|
|
2976
2993
|
]
|
|
2977
2994
|
}) : w,
|
|
2978
|
-
s ? /* @__PURE__ */
|
|
2995
|
+
s ? /* @__PURE__ */ W("div", {
|
|
2979
2996
|
className: "rounded-lg border border-border-subtle p-3 flex items-center gap-2 flex-wrap",
|
|
2980
2997
|
children: [
|
|
2981
|
-
/* @__PURE__ */
|
|
2998
|
+
/* @__PURE__ */ U("input", {
|
|
2982
2999
|
type: "text",
|
|
2983
3000
|
value: l,
|
|
2984
3001
|
onChange: (e) => u(e.target.value),
|
|
@@ -2990,60 +3007,60 @@ var xt = ({ level: e, onChange: t }) => /* @__PURE__ */ H("div", {
|
|
|
2990
3007
|
autoFocus: !0,
|
|
2991
3008
|
className: "flex-1 min-w-40 rounded-md border border-border-subtle bg-bg-base px-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-primary"
|
|
2992
3009
|
}),
|
|
2993
|
-
/* @__PURE__ */
|
|
3010
|
+
/* @__PURE__ */ U("datalist", {
|
|
2994
3011
|
id: "perm-resource-suggestions",
|
|
2995
|
-
children:
|
|
3012
|
+
children: vt.filter((e) => !a.some((t) => t.resource === e)).map((e) => /* @__PURE__ */ U("option", {
|
|
2996
3013
|
value: e,
|
|
2997
3014
|
children: $[e].label
|
|
2998
3015
|
}, e))
|
|
2999
3016
|
}),
|
|
3000
|
-
/* @__PURE__ */
|
|
3017
|
+
/* @__PURE__ */ U(St, {
|
|
3001
3018
|
level: d,
|
|
3002
3019
|
onChange: f
|
|
3003
3020
|
}),
|
|
3004
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ U("button", {
|
|
3005
3022
|
type: "button",
|
|
3006
3023
|
onClick: x,
|
|
3007
3024
|
disabled: !l.trim(),
|
|
3008
3025
|
className: "px-3 py-1.5 rounded-md bg-action-primary-bg text-action-primary-text text-xs font-medium hover:bg-action-primary-bg/90 disabled:opacity-50 transition-colors",
|
|
3009
3026
|
children: "Add"
|
|
3010
3027
|
}),
|
|
3011
|
-
/* @__PURE__ */
|
|
3028
|
+
/* @__PURE__ */ U("button", {
|
|
3012
3029
|
type: "button",
|
|
3013
3030
|
onClick: () => {
|
|
3014
3031
|
c(!1), u("");
|
|
3015
3032
|
},
|
|
3016
3033
|
className: "p-1.5 rounded text-text-secondary hover:text-text-primary transition-colors",
|
|
3017
|
-
children: /* @__PURE__ */
|
|
3034
|
+
children: /* @__PURE__ */ U(Be, { size: 14 })
|
|
3018
3035
|
})
|
|
3019
3036
|
]
|
|
3020
|
-
}) : /* @__PURE__ */
|
|
3037
|
+
}) : /* @__PURE__ */ W("button", {
|
|
3021
3038
|
type: "button",
|
|
3022
3039
|
onClick: () => c(!0),
|
|
3023
3040
|
className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
3024
|
-
children: [/* @__PURE__ */
|
|
3041
|
+
children: [/* @__PURE__ */ U(z, { size: 14 }), "Add permission"]
|
|
3025
3042
|
}),
|
|
3026
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ W("div", {
|
|
3027
3044
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
3028
|
-
children: [/* @__PURE__ */
|
|
3045
|
+
children: [/* @__PURE__ */ U(De, {
|
|
3029
3046
|
size: 14,
|
|
3030
3047
|
className: "flex-shrink-0 mt-0.5"
|
|
3031
|
-
}), /* @__PURE__ */
|
|
3048
|
+
}), /* @__PURE__ */ W("span", { children: [/* @__PURE__ */ U("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
3032
3049
|
}),
|
|
3033
|
-
/* @__PURE__ */
|
|
3050
|
+
/* @__PURE__ */ W("div", {
|
|
3034
3051
|
className: "flex items-center justify-end gap-3",
|
|
3035
|
-
children: [h && /* @__PURE__ */
|
|
3052
|
+
children: [h && /* @__PURE__ */ W("span", {
|
|
3036
3053
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
3037
|
-
children: [/* @__PURE__ */
|
|
3038
|
-
}), /* @__PURE__ */
|
|
3054
|
+
children: [/* @__PURE__ */ U(be, { size: 14 }), "Saved"]
|
|
3055
|
+
}), /* @__PURE__ */ W("button", {
|
|
3039
3056
|
type: "button",
|
|
3040
3057
|
onClick: () => void C(),
|
|
3041
3058
|
disabled: p,
|
|
3042
3059
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
3043
|
-
children: [p ? /* @__PURE__ */
|
|
3060
|
+
children: [p ? /* @__PURE__ */ U(R, {
|
|
3044
3061
|
size: 14,
|
|
3045
3062
|
className: "animate-spin"
|
|
3046
|
-
}) : /* @__PURE__ */
|
|
3063
|
+
}) : /* @__PURE__ */ U(B, { size: 14 }), "Save Permissions"]
|
|
3047
3064
|
})]
|
|
3048
3065
|
})
|
|
3049
3066
|
] })
|
|
@@ -3051,6 +3068,6 @@ var xt = ({ level: e, onChange: t }) => /* @__PURE__ */ H("div", {
|
|
|
3051
3068
|
});
|
|
3052
3069
|
};
|
|
3053
3070
|
//#endregion
|
|
3054
|
-
export {
|
|
3071
|
+
export { q as ApplicationDetailPage };
|
|
3055
3072
|
|
|
3056
3073
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|