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