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