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