@burdenoff/microfe-devportal 2026.705.2 → 2026.705.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.
|
@@ -18,7 +18,7 @@ import { useDevportalPermission as oe } from "../hooks/usePermission.js";
|
|
|
18
18
|
import { usePackageUpload as k } from "../hooks/usePackageUpload.js";
|
|
19
19
|
import { useCallback as A, useEffect as se, useMemo as j, useRef as M, useState as N } from "react";
|
|
20
20
|
import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
-
import { AlertCircle as ce, AppWindow as le, BarChart3 as
|
|
21
|
+
import { AlertCircle as ce, AppWindow as le, BarChart3 as ue, Check as F, CheckCircle as de, ChevronRight as fe, CircleDollarSign as I, Clock as pe, Edit as me, ExternalLink as L, FlaskConical as he, Gift as ge, Info as _e, Key as R, Loader2 as z, Lock as ve, MoreHorizontal as ye, Package as be, Plus as B, Power as xe, RefreshCw as Se, SendHorizontal as Ce, Shield as V, Store as we, TrendingUp as Te, Upload as H, Users as Ee, Wallet as De, Webhook as Oe, X as U, XCircle as ke } from "lucide-react";
|
|
22
22
|
import { useParams as Ae } from "react-router-dom";
|
|
23
23
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
24
24
|
import { CTAOverflowMenu as je, EmphasisPanel as Me, GlassCard as Ne } from "@burdenoff/fe-libs/ui";
|
|
@@ -147,52 +147,52 @@ var Le = [
|
|
|
147
147
|
{
|
|
148
148
|
id: "analytics",
|
|
149
149
|
label: "Analytics",
|
|
150
|
-
icon:
|
|
150
|
+
icon: ue
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
id: "store-listing",
|
|
154
154
|
label: "Store Listing",
|
|
155
|
-
icon:
|
|
155
|
+
icon: we
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
id: "versions",
|
|
159
159
|
label: "Versions",
|
|
160
|
-
icon:
|
|
160
|
+
icon: be
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
id: "pricing",
|
|
164
164
|
label: "Pricing",
|
|
165
|
-
icon:
|
|
165
|
+
icon: I
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
id: "permissions",
|
|
169
169
|
label: "Permissions",
|
|
170
|
-
icon:
|
|
170
|
+
icon: V
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
id: "webhooks",
|
|
174
174
|
label: "Webhooks",
|
|
175
|
-
icon:
|
|
175
|
+
icon: Oe
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
id: "delegations",
|
|
179
179
|
label: "Delegations",
|
|
180
|
-
icon:
|
|
180
|
+
icon: Ee
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
id: "playground",
|
|
184
184
|
label: "API Playground",
|
|
185
|
-
icon:
|
|
185
|
+
icon: L
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
id: "oauth",
|
|
189
189
|
label: "OAuth",
|
|
190
|
-
icon:
|
|
190
|
+
icon: ve
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
id: "api-keys",
|
|
194
194
|
label: "API Keys",
|
|
195
|
-
icon:
|
|
195
|
+
icon: R
|
|
196
196
|
}
|
|
197
197
|
], Re = {
|
|
198
198
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
@@ -200,7 +200,7 @@ var Le = [
|
|
|
200
200
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
201
201
|
}, ze = ({ message: e = "Loading..." }) => /* @__PURE__ */ K("div", {
|
|
202
202
|
className: "flex items-center justify-center gap-3 py-12",
|
|
203
|
-
children: [/* @__PURE__ */ G(
|
|
203
|
+
children: [/* @__PURE__ */ G(z, {
|
|
204
204
|
size: 20,
|
|
205
205
|
className: "animate-spin text-text-secondary"
|
|
206
206
|
}), /* @__PURE__ */ G("p", {
|
|
@@ -220,73 +220,73 @@ var Le = [
|
|
|
220
220
|
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = P(), p = (e, t) => {
|
|
221
221
|
let n = u(e);
|
|
222
222
|
return n === e ? t : n;
|
|
223
|
-
}, { allowed: _ } = oe(ae.APP_UPDATE), { allowed: y } = oe(ae.APP_DELETE), { appId: w } = Ae(), [E, D] = N("overview"), [O, te] = N(!1), [ne, k] = N(!1), [se, j] = N(null), [M,
|
|
223
|
+
}, { allowed: _ } = oe(ae.APP_UPDATE), { allowed: y } = oe(ae.APP_DELETE), { appId: w } = Ae(), [E, D] = N("overview"), [O, te] = N(!1), [ne, k] = N(!1), [se, j] = N(null), [M, ue] = N(!1), { data: I, loading: L, error: ge, refetch: _e } = s({
|
|
224
224
|
variables: { id: w },
|
|
225
225
|
skip: !w
|
|
226
|
-
}), [
|
|
226
|
+
}), [R, { loading: ve }] = m(), [ye, { loading: be }] = a(), [B, { loading: V }] = h(), [Te, { loading: H }] = f(), [Ee, { loading: De }] = g(), { data: Oe, refetch: U } = d({
|
|
227
227
|
variables: {
|
|
228
228
|
applicationId: w,
|
|
229
229
|
workspaceId: c ?? void 0
|
|
230
230
|
},
|
|
231
231
|
skip: !c || !w,
|
|
232
232
|
fetchPolicy: "cache-and-network"
|
|
233
|
-
}), Me =
|
|
234
|
-
variables: { id:
|
|
235
|
-
skip: !
|
|
233
|
+
}), Me = Oe?.appInstallations?.edges?.[0]?.node ?? null, { data: Ne } = l({
|
|
234
|
+
variables: { id: I?.application?.developerOrganizationId ?? "" },
|
|
235
|
+
skip: !I?.application?.developerOrganizationId,
|
|
236
236
|
fetchPolicy: "cache-first"
|
|
237
237
|
}), q = A((e) => {
|
|
238
238
|
i?.(`${o}${e}`);
|
|
239
239
|
}, [i, o]), Fe = A(async () => {
|
|
240
|
-
let e =
|
|
240
|
+
let e = I?.application?.appId;
|
|
241
241
|
if (e) try {
|
|
242
|
-
let t = (await
|
|
242
|
+
let t = (await R({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
243
243
|
t && j(t), te(!1);
|
|
244
244
|
} catch {}
|
|
245
|
-
}, [
|
|
245
|
+
}, [I?.application?.appId, R]), Ie = A(async () => {
|
|
246
246
|
if (w) try {
|
|
247
|
-
await
|
|
247
|
+
await ye({ variables: { id: w } }), k(!1), q("/apps");
|
|
248
248
|
} catch {}
|
|
249
249
|
}, [
|
|
250
250
|
w,
|
|
251
|
-
|
|
251
|
+
ye,
|
|
252
252
|
q
|
|
253
253
|
]), Re = A(async () => {
|
|
254
254
|
if (!(!w || !c)) try {
|
|
255
|
-
await
|
|
255
|
+
await Te({ variables: { input: {
|
|
256
256
|
applicationId: w,
|
|
257
257
|
scope: "WORKSPACE",
|
|
258
258
|
workspaceId: c,
|
|
259
259
|
autoUpdate: !1
|
|
260
|
-
} } }),
|
|
260
|
+
} } }), U(), T("success");
|
|
261
261
|
} catch (e) {
|
|
262
262
|
console.error("[DevPortal] Test in Workspace failed:", e), T("error");
|
|
263
263
|
}
|
|
264
264
|
}, [
|
|
265
265
|
w,
|
|
266
266
|
c,
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
Te,
|
|
268
|
+
U
|
|
269
269
|
]), ze = A(async (e) => {
|
|
270
270
|
try {
|
|
271
|
-
await
|
|
271
|
+
await Ee({ variables: { id: e } }), U(), T("success");
|
|
272
272
|
} catch {
|
|
273
273
|
T("error");
|
|
274
274
|
}
|
|
275
|
-
}, [
|
|
275
|
+
}, [Ee, U]), Be = A(async () => {
|
|
276
276
|
if (w) try {
|
|
277
|
-
await
|
|
277
|
+
await B({ variables: { id: w } }), T("success");
|
|
278
278
|
} catch (e) {
|
|
279
279
|
console.error("[DevPortal] Submit failed:", e), T("error");
|
|
280
280
|
} finally {
|
|
281
|
-
|
|
281
|
+
_e();
|
|
282
282
|
}
|
|
283
283
|
}, [
|
|
284
284
|
w,
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
B,
|
|
286
|
+
_e
|
|
287
287
|
]);
|
|
288
|
-
if (
|
|
289
|
-
if (
|
|
288
|
+
if (L && !I) return /* @__PURE__ */ G(n, { message: p("devportal.loadingApplication", "Loading application...") });
|
|
289
|
+
if (ge) return /* @__PURE__ */ G(v, {
|
|
290
290
|
title: p("devportal.error", "Error"),
|
|
291
291
|
backLink: `${o}/apps`,
|
|
292
292
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
@@ -303,12 +303,12 @@ var Le = [
|
|
|
303
303
|
}),
|
|
304
304
|
/* @__PURE__ */ G("p", {
|
|
305
305
|
className: "text-sm text-text-secondary",
|
|
306
|
-
children:
|
|
306
|
+
children: ge.message
|
|
307
307
|
})
|
|
308
308
|
]
|
|
309
309
|
})
|
|
310
310
|
});
|
|
311
|
-
let J = Pe(
|
|
311
|
+
let J = Pe(I?.application);
|
|
312
312
|
if (!J) return /* @__PURE__ */ G(v, {
|
|
313
313
|
title: p("devportal.notFound", "Not Found"),
|
|
314
314
|
backLink: `${o}/apps`,
|
|
@@ -320,27 +320,27 @@ var Le = [
|
|
|
320
320
|
description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
321
321
|
})
|
|
322
322
|
});
|
|
323
|
-
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", X = J.appType === "API_INTEGRATION", Ue =
|
|
323
|
+
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", X = J.appType === "API_INTEGRATION", Ue = I?.application?.versions?.totalCount ?? 0, Xe = J.pricingType === "PAID", Ze = Ne?.developerOrganization, Qe = Ze?.platformFeeRate ?? .3, $e = !!Ze?.billingAccountId, tt = J.pricingDetails ?? {}, Z = J.pricingType === "FREE" || J.pricingType === "PAID" && typeof tt.price == "number" && tt.price > 0, Q = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED") && (!Y && !X || Ue > 0) && (!Xe || $e) && Z, nt = Q && J.status !== "PUBLISHED" && J.status !== "SUBMITTED", rt = [
|
|
324
324
|
...Y ? [] : [{
|
|
325
325
|
label: p("devportal.rotateSecret", "Rotate Secret"),
|
|
326
|
-
icon: /* @__PURE__ */ G(
|
|
326
|
+
icon: /* @__PURE__ */ G(Se, { size: 16 }),
|
|
327
327
|
disabled: !J.appId,
|
|
328
328
|
onSelect: () => te(!0)
|
|
329
329
|
}],
|
|
330
330
|
...Y ? [] : Me ? [{
|
|
331
331
|
label: p("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
332
332
|
icon: /* @__PURE__ */ G(ke, { size: 16 }),
|
|
333
|
-
disabled:
|
|
333
|
+
disabled: De || !c,
|
|
334
334
|
onSelect: () => void ze(Me.id)
|
|
335
335
|
}] : [{
|
|
336
336
|
label: p("devportal.testInWorkspace", "Test in Workspace"),
|
|
337
|
-
icon: /* @__PURE__ */ G(
|
|
338
|
-
disabled:
|
|
337
|
+
icon: /* @__PURE__ */ G(he, { size: 16 }),
|
|
338
|
+
disabled: H || !c,
|
|
339
339
|
onSelect: () => void Re()
|
|
340
340
|
}],
|
|
341
341
|
{
|
|
342
342
|
label: p("devportal.deactivate", "Deactivate"),
|
|
343
|
-
icon: /* @__PURE__ */ G(
|
|
343
|
+
icon: /* @__PURE__ */ G(xe, { size: 16 }),
|
|
344
344
|
intent: "destructive",
|
|
345
345
|
disabled: !y,
|
|
346
346
|
onSelect: () => k(!0)
|
|
@@ -356,11 +356,11 @@ var Le = [
|
|
|
356
356
|
className: "flex items-center gap-2",
|
|
357
357
|
children: [J.status === "SUBMITTED" ? /* @__PURE__ */ K("div", {
|
|
358
358
|
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",
|
|
359
|
-
children: [/* @__PURE__ */ G(
|
|
359
|
+
children: [/* @__PURE__ */ G(pe, { size: 13 }), p("devportal.underReview", "Under Review")]
|
|
360
360
|
}) : J.status === "PUBLISHED" ? null : /* @__PURE__ */ G("button", {
|
|
361
361
|
type: "button",
|
|
362
362
|
onClick: () => void Be(),
|
|
363
|
-
disabled: !nt ||
|
|
363
|
+
disabled: !nt || V,
|
|
364
364
|
title: Q ? void 0 : [
|
|
365
365
|
!J.description?.trim() && "Add full description",
|
|
366
366
|
!J.category && "Select a category",
|
|
@@ -370,15 +370,15 @@ var Le = [
|
|
|
370
370
|
!Z && "Set pricing (choose Free or Paid in the Pricing tab)",
|
|
371
371
|
Xe && !$e && "Link a billing account to receive payments"
|
|
372
372
|
].filter(Boolean).join(" · "),
|
|
373
|
-
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", nt && !
|
|
374
|
-
children:
|
|
373
|
+
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", nt && !V ? "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"),
|
|
374
|
+
children: V ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
375
375
|
size: 15,
|
|
376
376
|
className: "animate-spin"
|
|
377
|
-
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
377
|
+
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Ce, { size: 15 }), p("devportal.submitForReview", "Submit for Review")] })
|
|
378
378
|
}), /* @__PURE__ */ G(je, {
|
|
379
379
|
primary: {
|
|
380
380
|
label: p("devportal.editApp", "Edit App"),
|
|
381
|
-
icon: /* @__PURE__ */ G(
|
|
381
|
+
icon: /* @__PURE__ */ G(me, { size: 16 }),
|
|
382
382
|
disabled: !_,
|
|
383
383
|
onSelect: () => q(`/apps/${J.id}/edit`)
|
|
384
384
|
},
|
|
@@ -413,7 +413,7 @@ var Le = [
|
|
|
413
413
|
}),
|
|
414
414
|
J.status === "SUBMITTED" && /* @__PURE__ */ K("div", {
|
|
415
415
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
416
|
-
children: [/* @__PURE__ */ G(
|
|
416
|
+
children: [/* @__PURE__ */ G(pe, {
|
|
417
417
|
size: 18,
|
|
418
418
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
419
419
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -461,7 +461,7 @@ var Le = [
|
|
|
461
461
|
}),
|
|
462
462
|
J.status === "PUBLISHED" && /* @__PURE__ */ K("div", {
|
|
463
463
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
464
|
-
children: [/* @__PURE__ */ G(
|
|
464
|
+
children: [/* @__PURE__ */ G(de, {
|
|
465
465
|
size: 18,
|
|
466
466
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
467
467
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -532,7 +532,7 @@ var Le = [
|
|
|
532
532
|
className: "flex items-center gap-3",
|
|
533
533
|
children: [/* @__PURE__ */ G("div", {
|
|
534
534
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
535
|
-
children: /* @__PURE__ */ G(
|
|
535
|
+
children: /* @__PURE__ */ G(we, {
|
|
536
536
|
size: 16,
|
|
537
537
|
className: "text-primary"
|
|
538
538
|
})
|
|
@@ -561,7 +561,7 @@ var Le = [
|
|
|
561
561
|
children: [
|
|
562
562
|
/* @__PURE__ */ G("div", {
|
|
563
563
|
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"),
|
|
564
|
-
children: e.done ? /* @__PURE__ */ G(
|
|
564
|
+
children: e.done ? /* @__PURE__ */ G(F, { size: 13 }) : n + 1
|
|
565
565
|
}),
|
|
566
566
|
/* @__PURE__ */ K("div", {
|
|
567
567
|
className: "flex-1 min-w-0",
|
|
@@ -573,7 +573,7 @@ var Le = [
|
|
|
573
573
|
children: e.hint
|
|
574
574
|
})]
|
|
575
575
|
}),
|
|
576
|
-
e.onClick && !e.done && /* @__PURE__ */ G(
|
|
576
|
+
e.onClick && !e.done && /* @__PURE__ */ G(fe, {
|
|
577
577
|
size: 16,
|
|
578
578
|
className: "flex-shrink-0 text-text-secondary"
|
|
579
579
|
})
|
|
@@ -610,9 +610,9 @@ var Le = [
|
|
|
610
610
|
tabIndex: 0,
|
|
611
611
|
children: [
|
|
612
612
|
E === "overview" && /* @__PURE__ */ G(Ye, { app: J }),
|
|
613
|
-
E === "permissions" && /* @__PURE__ */ G(
|
|
613
|
+
E === "permissions" && /* @__PURE__ */ G(mt, {
|
|
614
614
|
app: J,
|
|
615
|
-
versionScopes:
|
|
615
|
+
versionScopes: I?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? []
|
|
616
616
|
}),
|
|
617
617
|
E === "webhooks" && /* @__PURE__ */ G(Ke, {
|
|
618
618
|
appId: J.id,
|
|
@@ -621,7 +621,7 @@ var Le = [
|
|
|
621
621
|
E === "delegations" && /* @__PURE__ */ G(qe, {
|
|
622
622
|
authAppId: J.appId || void 0,
|
|
623
623
|
appName: J.name,
|
|
624
|
-
onGrantDelegation: () =>
|
|
624
|
+
onGrantDelegation: () => ue(!0),
|
|
625
625
|
onNavigate: q
|
|
626
626
|
}),
|
|
627
627
|
E === "analytics" && /* @__PURE__ */ G(Je, { appId: J.id }),
|
|
@@ -636,7 +636,7 @@ var Le = [
|
|
|
636
636
|
}),
|
|
637
637
|
E === "store-listing" && /* @__PURE__ */ G(ot, {
|
|
638
638
|
app: J,
|
|
639
|
-
versionCount:
|
|
639
|
+
versionCount: I?.application?.versions?.totalCount ?? 0,
|
|
640
640
|
isPackageApp: Y,
|
|
641
641
|
pricingDone: Z,
|
|
642
642
|
onNavigateToVersions: Y || X ? () => D("versions") : void 0,
|
|
@@ -667,7 +667,7 @@ var Le = [
|
|
|
667
667
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
668
668
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
669
669
|
variant: "warning",
|
|
670
|
-
loading:
|
|
670
|
+
loading: ve
|
|
671
671
|
}),
|
|
672
672
|
/* @__PURE__ */ G(re, {
|
|
673
673
|
open: ne,
|
|
@@ -678,16 +678,16 @@ var Le = [
|
|
|
678
678
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
679
679
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
680
680
|
variant: "destructive",
|
|
681
|
-
loading:
|
|
681
|
+
loading: be
|
|
682
682
|
}),
|
|
683
683
|
/* @__PURE__ */ G(ie, {
|
|
684
684
|
open: M,
|
|
685
|
-
onOpenChange:
|
|
685
|
+
onOpenChange: ue,
|
|
686
686
|
appId: J.appId || "",
|
|
687
687
|
appName: J.name,
|
|
688
688
|
appScopes: J.scopes?.map((e) => e.scope) ?? [],
|
|
689
689
|
onSuccess: () => {
|
|
690
|
-
|
|
690
|
+
ue(!1);
|
|
691
691
|
}
|
|
692
692
|
})
|
|
693
693
|
]
|
|
@@ -700,7 +700,7 @@ var Le = [
|
|
|
700
700
|
return /* @__PURE__ */ K("div", {
|
|
701
701
|
className: "space-y-4 py-4 text-center",
|
|
702
702
|
children: [
|
|
703
|
-
/* @__PURE__ */ G(
|
|
703
|
+
/* @__PURE__ */ G(V, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
704
704
|
/* @__PURE__ */ G("h3", {
|
|
705
705
|
className: "font-medium",
|
|
706
706
|
children: n("devportal.oauthApps", "OAuth Apps")
|
|
@@ -712,7 +712,7 @@ var Le = [
|
|
|
712
712
|
/* @__PURE__ */ K("button", {
|
|
713
713
|
onClick: () => e("/oauth"),
|
|
714
714
|
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",
|
|
715
|
-
children: [/* @__PURE__ */ G(
|
|
715
|
+
children: [/* @__PURE__ */ G(L, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
716
716
|
})
|
|
717
717
|
]
|
|
718
718
|
});
|
|
@@ -724,7 +724,7 @@ var Le = [
|
|
|
724
724
|
return /* @__PURE__ */ K("div", {
|
|
725
725
|
className: "space-y-4 py-4 text-center",
|
|
726
726
|
children: [
|
|
727
|
-
/* @__PURE__ */ G(
|
|
727
|
+
/* @__PURE__ */ G(R, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
728
728
|
/* @__PURE__ */ G("h3", {
|
|
729
729
|
className: "font-medium",
|
|
730
730
|
children: n("devportal.apiKeys", "API Keys")
|
|
@@ -736,7 +736,7 @@ var Le = [
|
|
|
736
736
|
/* @__PURE__ */ K("button", {
|
|
737
737
|
onClick: () => e("/api-keys"),
|
|
738
738
|
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",
|
|
739
|
-
children: [/* @__PURE__ */ G(
|
|
739
|
+
children: [/* @__PURE__ */ G(L, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
740
740
|
})
|
|
741
741
|
]
|
|
742
742
|
});
|
|
@@ -789,7 +789,7 @@ var Le = [
|
|
|
789
789
|
children: [
|
|
790
790
|
/* @__PURE__ */ K("div", {
|
|
791
791
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
792
|
-
children: [/* @__PURE__ */ G(
|
|
792
|
+
children: [/* @__PURE__ */ G(I, {
|
|
793
793
|
size: 16,
|
|
794
794
|
className: "mt-0.5 shrink-0 text-primary"
|
|
795
795
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -830,7 +830,7 @@ var Le = [
|
|
|
830
830
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
831
831
|
children: [/* @__PURE__ */ G("div", {
|
|
832
832
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
|
|
833
|
-
children: /* @__PURE__ */ G(
|
|
833
|
+
children: /* @__PURE__ */ G(Te, {
|
|
834
834
|
size: 18,
|
|
835
835
|
className: "text-status-success-text"
|
|
836
836
|
})
|
|
@@ -862,7 +862,7 @@ var Le = [
|
|
|
862
862
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
863
863
|
children: [/* @__PURE__ */ G("div", {
|
|
864
864
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
865
|
-
children: /* @__PURE__ */ G(
|
|
865
|
+
children: /* @__PURE__ */ G(De, {
|
|
866
866
|
size: 18,
|
|
867
867
|
className: "text-primary"
|
|
868
868
|
})
|
|
@@ -891,7 +891,7 @@ var Le = [
|
|
|
891
891
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
892
892
|
children: [/* @__PURE__ */ G("div", {
|
|
893
893
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
894
|
-
children: /* @__PURE__ */ G(
|
|
894
|
+
children: /* @__PURE__ */ G(ge, {
|
|
895
895
|
size: 18,
|
|
896
896
|
className: "text-status-warning-text"
|
|
897
897
|
})
|
|
@@ -1123,7 +1123,7 @@ var Le = [
|
|
|
1123
1123
|
children: [
|
|
1124
1124
|
/* @__PURE__ */ K("li", {
|
|
1125
1125
|
className: "flex items-start gap-2",
|
|
1126
|
-
children: [/* @__PURE__ */ G(
|
|
1126
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1127
1127
|
size: 14,
|
|
1128
1128
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1129
1129
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1141,21 +1141,21 @@ var Le = [
|
|
|
1141
1141
|
}),
|
|
1142
1142
|
/* @__PURE__ */ K("li", {
|
|
1143
1143
|
className: "flex items-start gap-2",
|
|
1144
|
-
children: [/* @__PURE__ */ G(
|
|
1144
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1145
1145
|
size: 14,
|
|
1146
1146
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1147
1147
|
}), /* @__PURE__ */ G("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1148
1148
|
}),
|
|
1149
1149
|
/* @__PURE__ */ K("li", {
|
|
1150
1150
|
className: "flex items-start gap-2",
|
|
1151
|
-
children: [/* @__PURE__ */ G(
|
|
1151
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1152
1152
|
size: 14,
|
|
1153
1153
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1154
1154
|
}), /* @__PURE__ */ G("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1155
1155
|
}),
|
|
1156
1156
|
/* @__PURE__ */ K("li", {
|
|
1157
1157
|
className: "flex items-start gap-2",
|
|
1158
|
-
children: [/* @__PURE__ */ G(
|
|
1158
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1159
1159
|
size: 14,
|
|
1160
1160
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1161
1161
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1182,13 +1182,13 @@ var Le = [
|
|
|
1182
1182
|
onClick: () => void g(),
|
|
1183
1183
|
disabled: d,
|
|
1184
1184
|
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",
|
|
1185
|
-
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1185
|
+
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
1186
1186
|
size: 16,
|
|
1187
1187
|
className: "animate-spin"
|
|
1188
|
-
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1188
|
+
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(I, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
|
|
1189
1189
|
}), a && /* @__PURE__ */ K("div", {
|
|
1190
1190
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1191
|
-
children: [/* @__PURE__ */ G(
|
|
1191
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1192
1192
|
size: 16,
|
|
1193
1193
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1194
1194
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1228,7 +1228,7 @@ var Le = [
|
|
|
1228
1228
|
}), /* @__PURE__ */ K("button", {
|
|
1229
1229
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1230
1230
|
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",
|
|
1231
|
-
children: [/* @__PURE__ */ G(
|
|
1231
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1232
1232
|
})]
|
|
1233
1233
|
}),
|
|
1234
1234
|
f.length > 0 ? /* @__PURE__ */ G("div", {
|
|
@@ -1321,19 +1321,19 @@ var Le = [
|
|
|
1321
1321
|
})
|
|
1322
1322
|
}) : /* @__PURE__ */ G(r, {
|
|
1323
1323
|
illustration: "empty-generic",
|
|
1324
|
-
icon: /* @__PURE__ */ G(
|
|
1324
|
+
icon: /* @__PURE__ */ G(be, { size: 32 }),
|
|
1325
1325
|
title: s("devportal.noVersions", "No versions yet"),
|
|
1326
1326
|
description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1327
1327
|
action: /* @__PURE__ */ K("button", {
|
|
1328
1328
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1329
1329
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1330
|
-
children: [/* @__PURE__ */ G(
|
|
1330
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1331
1331
|
})
|
|
1332
1332
|
}),
|
|
1333
1333
|
f.length > 0 && !i && a && /* @__PURE__ */ K("div", {
|
|
1334
1334
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1335
1335
|
children: [
|
|
1336
|
-
/* @__PURE__ */ G(
|
|
1336
|
+
/* @__PURE__ */ G(I, {
|
|
1337
1337
|
size: 16,
|
|
1338
1338
|
className: "shrink-0 text-primary"
|
|
1339
1339
|
}),
|
|
@@ -1345,7 +1345,7 @@ var Le = [
|
|
|
1345
1345
|
type: "button",
|
|
1346
1346
|
onClick: a,
|
|
1347
1347
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1348
|
-
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(
|
|
1348
|
+
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(fe, { size: 15 })]
|
|
1349
1349
|
})
|
|
1350
1350
|
]
|
|
1351
1351
|
})
|
|
@@ -1433,13 +1433,13 @@ var Le = [
|
|
|
1433
1433
|
})
|
|
1434
1434
|
] }) : /* @__PURE__ */ G(r, {
|
|
1435
1435
|
illustration: "empty-generic",
|
|
1436
|
-
icon: /* @__PURE__ */ G(
|
|
1436
|
+
icon: /* @__PURE__ */ G(V, { size: 32 }),
|
|
1437
1437
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1438
1438
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1439
1439
|
action: /* @__PURE__ */ K("button", {
|
|
1440
1440
|
onClick: () => a("/oauth"),
|
|
1441
1441
|
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",
|
|
1442
|
-
children: [/* @__PURE__ */ G(
|
|
1442
|
+
children: [/* @__PURE__ */ G(L, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1443
1443
|
})
|
|
1444
1444
|
});
|
|
1445
1445
|
}, Je = ({ appId: e }) => {
|
|
@@ -1621,7 +1621,7 @@ var Le = [
|
|
|
1621
1621
|
}), /* @__PURE__ */ K("button", {
|
|
1622
1622
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1623
1623
|
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",
|
|
1624
|
-
children: [/* @__PURE__ */ G(
|
|
1624
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1625
1625
|
})]
|
|
1626
1626
|
}), t.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1627
1627
|
className: "space-y-4",
|
|
@@ -1645,7 +1645,7 @@ var Le = [
|
|
|
1645
1645
|
})] }), /* @__PURE__ */ G("button", {
|
|
1646
1646
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1647
1647
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1648
|
-
children: /* @__PURE__ */ G(
|
|
1648
|
+
children: /* @__PURE__ */ G(ye, { size: 20 })
|
|
1649
1649
|
})]
|
|
1650
1650
|
}),
|
|
1651
1651
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1702,13 +1702,13 @@ var Le = [
|
|
|
1702
1702
|
}, t.id))
|
|
1703
1703
|
}) : /* @__PURE__ */ G(r, {
|
|
1704
1704
|
illustration: "empty-notifications",
|
|
1705
|
-
icon: /* @__PURE__ */ G(
|
|
1705
|
+
icon: /* @__PURE__ */ G(Oe, { size: 32 }),
|
|
1706
1706
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
1707
1707
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
1708
1708
|
action: /* @__PURE__ */ K("button", {
|
|
1709
1709
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1710
1710
|
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",
|
|
1711
|
-
children: [/* @__PURE__ */ G(
|
|
1711
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1712
1712
|
})
|
|
1713
1713
|
})]
|
|
1714
1714
|
});
|
|
@@ -1748,7 +1748,7 @@ var Le = [
|
|
|
1748
1748
|
})] }), /* @__PURE__ */ K("button", {
|
|
1749
1749
|
onClick: i,
|
|
1750
1750
|
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",
|
|
1751
|
-
children: [/* @__PURE__ */ G(
|
|
1751
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1752
1752
|
})]
|
|
1753
1753
|
}),
|
|
1754
1754
|
h.length > 0 && /* @__PURE__ */ G("div", {
|
|
@@ -1861,7 +1861,7 @@ var Le = [
|
|
|
1861
1861
|
e.expiresAt && /* @__PURE__ */ K("span", {
|
|
1862
1862
|
className: "flex items-center gap-1",
|
|
1863
1863
|
children: [
|
|
1864
|
-
/* @__PURE__ */ G(
|
|
1864
|
+
/* @__PURE__ */ G(pe, { size: 12 }),
|
|
1865
1865
|
m("devportal.expires", "Expires"),
|
|
1866
1866
|
" ",
|
|
1867
1867
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1869,7 +1869,7 @@ var Le = [
|
|
|
1869
1869
|
}),
|
|
1870
1870
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ K("span", {
|
|
1871
1871
|
className: "flex items-center gap-1",
|
|
1872
|
-
children: [/* @__PURE__ */ G(
|
|
1872
|
+
children: [/* @__PURE__ */ G(de, {
|
|
1873
1873
|
size: 12,
|
|
1874
1874
|
className: "text-status-success-text"
|
|
1875
1875
|
}), m("devportal.noExpiration", "No expiration")]
|
|
@@ -1892,13 +1892,13 @@ var Le = [
|
|
|
1892
1892
|
}, e.id))
|
|
1893
1893
|
}) : /* @__PURE__ */ G(r, {
|
|
1894
1894
|
illustration: "empty-people",
|
|
1895
|
-
icon: /* @__PURE__ */ G(
|
|
1895
|
+
icon: /* @__PURE__ */ G(Ee, { size: 32 }),
|
|
1896
1896
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1897
1897
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1898
1898
|
action: /* @__PURE__ */ K("button", {
|
|
1899
1899
|
onClick: i,
|
|
1900
1900
|
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",
|
|
1901
|
-
children: [/* @__PURE__ */ G(
|
|
1901
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1902
1902
|
})
|
|
1903
1903
|
})
|
|
1904
1904
|
]
|
|
@@ -1978,7 +1978,7 @@ var Le = [
|
|
|
1978
1978
|
]
|
|
1979
1979
|
}) : /* @__PURE__ */ G(r, {
|
|
1980
1980
|
illustration: "empty-data",
|
|
1981
|
-
icon: /* @__PURE__ */ G(
|
|
1981
|
+
icon: /* @__PURE__ */ G(ue, { size: 32 }),
|
|
1982
1982
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1983
1983
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1984
1984
|
})
|
|
@@ -2048,7 +2048,7 @@ var Le = [
|
|
|
2048
2048
|
})] }), /* @__PURE__ */ K("button", {
|
|
2049
2049
|
onClick: S,
|
|
2050
2050
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
2051
|
-
children: [/* @__PURE__ */ G(
|
|
2051
|
+
children: [/* @__PURE__ */ G(R, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
2052
2052
|
})]
|
|
2053
2053
|
}),
|
|
2054
2054
|
y && /* @__PURE__ */ K("div", {
|
|
@@ -2149,10 +2149,10 @@ var Le = [
|
|
|
2149
2149
|
onClick: x,
|
|
2150
2150
|
disabled: p,
|
|
2151
2151
|
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",
|
|
2152
|
-
children: [p ? /* @__PURE__ */ G(
|
|
2152
|
+
children: [p ? /* @__PURE__ */ G(z, {
|
|
2153
2153
|
size: 16,
|
|
2154
2154
|
className: "animate-spin"
|
|
2155
|
-
}) : /* @__PURE__ */ G(
|
|
2155
|
+
}) : /* @__PURE__ */ G(L, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2156
2156
|
}),
|
|
2157
2157
|
d && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2158
2158
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2187,12 +2187,12 @@ var Le = [
|
|
|
2187
2187
|
alt: e,
|
|
2188
2188
|
className: "w-full h-full object-cover",
|
|
2189
2189
|
onError: () => p(!0)
|
|
2190
|
-
}) : /* @__PURE__ */ G(
|
|
2190
|
+
}) : /* @__PURE__ */ G(H, {
|
|
2191
2191
|
size: 18,
|
|
2192
2192
|
className: "text-text-secondary opacity-40"
|
|
2193
2193
|
}), c && /* @__PURE__ */ K("div", {
|
|
2194
2194
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
2195
|
-
children: [/* @__PURE__ */ G(
|
|
2195
|
+
children: [/* @__PURE__ */ G(z, {
|
|
2196
2196
|
size: 14,
|
|
2197
2197
|
className: "animate-spin text-white"
|
|
2198
2198
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2225,7 +2225,7 @@ var Le = [
|
|
|
2225
2225
|
disabled: c,
|
|
2226
2226
|
onClick: () => d.current?.click(),
|
|
2227
2227
|
className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-bg-sunken transition-colors disabled:opacity-50",
|
|
2228
|
-
children: [/* @__PURE__ */ G(
|
|
2228
|
+
children: [/* @__PURE__ */ G(H, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
2229
2229
|
}),
|
|
2230
2230
|
u && /* @__PURE__ */ G("p", {
|
|
2231
2231
|
className: "text-xs text-status-error-text",
|
|
@@ -2281,20 +2281,20 @@ var Le = [
|
|
|
2281
2281
|
type: "button",
|
|
2282
2282
|
onClick: () => f(t),
|
|
2283
2283
|
className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2284
|
-
children: /* @__PURE__ */ G(
|
|
2284
|
+
children: /* @__PURE__ */ G(U, { size: 12 })
|
|
2285
2285
|
})]
|
|
2286
2286
|
}, t)), /* @__PURE__ */ G("button", {
|
|
2287
2287
|
type: "button",
|
|
2288
2288
|
disabled: i,
|
|
2289
2289
|
onClick: () => s.current?.click(),
|
|
2290
2290
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border-subtle flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
2291
|
-
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2291
|
+
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
2292
2292
|
size: 18,
|
|
2293
2293
|
className: "animate-spin text-primary"
|
|
2294
2294
|
}), /* @__PURE__ */ K("span", {
|
|
2295
2295
|
className: "text-xs",
|
|
2296
2296
|
children: [a, "%"]
|
|
2297
|
-
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2297
|
+
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(H, { size: 18 }), /* @__PURE__ */ G("span", {
|
|
2298
2298
|
className: "text-xs",
|
|
2299
2299
|
children: "Add screenshot"
|
|
2300
2300
|
})] })
|
|
@@ -2500,13 +2500,13 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2500
2500
|
} finally {
|
|
2501
2501
|
v(!1);
|
|
2502
2502
|
}
|
|
2503
|
-
}, { upload: ie, uploading: ae, progress: oe, error: A } = k(c, l, u, d, "/DevPortal/Assets"), { upload: j, uploading: le, progress:
|
|
2503
|
+
}, { upload: ie, uploading: ae, progress: oe, error: A } = k(c, l, u, d, "/DevPortal/Assets"), { upload: j, uploading: le, progress: ue, error: I } = k(c, l, u, d, "/DevPortal/Assets"), { upload: me, uploading: he, progress: ge, error: _e } = k(c, l, u, d, "/DevPortal/Assets"), R = Q.has(m.manifestItemType), ve = t.status === "SUBMITTED";
|
|
2504
2504
|
return /* @__PURE__ */ K("div", {
|
|
2505
2505
|
className: "space-y-8 max-w-3xl",
|
|
2506
2506
|
children: [
|
|
2507
2507
|
t.status === "PUBLISHED" ? /* @__PURE__ */ K("div", {
|
|
2508
2508
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2509
|
-
children: [/* @__PURE__ */ G(
|
|
2509
|
+
children: [/* @__PURE__ */ G(de, {
|
|
2510
2510
|
size: 16,
|
|
2511
2511
|
className: "text-success mt-0.5 shrink-0"
|
|
2512
2512
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2523,11 +2523,11 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2523
2523
|
]
|
|
2524
2524
|
})]
|
|
2525
2525
|
})]
|
|
2526
|
-
}) :
|
|
2526
|
+
}) : ve ? /* @__PURE__ */ K("div", {
|
|
2527
2527
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2528
2528
|
children: [/* @__PURE__ */ K("div", {
|
|
2529
2529
|
className: "flex items-start gap-3",
|
|
2530
|
-
children: [/* @__PURE__ */ G(
|
|
2530
|
+
children: [/* @__PURE__ */ G(pe, {
|
|
2531
2531
|
size: 16,
|
|
2532
2532
|
className: "text-primary mt-0.5 shrink-0"
|
|
2533
2533
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2551,7 +2551,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2551
2551
|
type: "button",
|
|
2552
2552
|
onClick: s,
|
|
2553
2553
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2554
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(
|
|
2554
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(L, { size: 12 })]
|
|
2555
2555
|
})]
|
|
2556
2556
|
}) : /* @__PURE__ */ K("div", {
|
|
2557
2557
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
@@ -2592,7 +2592,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2592
2592
|
onChange: (e) => E("manifestDisplayName", e.target.value),
|
|
2593
2593
|
placeholder: "My Awesome Node"
|
|
2594
2594
|
}),
|
|
2595
|
-
|
|
2595
|
+
R && t.appType !== "WORKFLOW" && /* @__PURE__ */ G(ne, {
|
|
2596
2596
|
label: p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2597
2597
|
value: m.manifestJsonContent,
|
|
2598
2598
|
onChange: (e) => E("manifestJsonContent", e.target.value),
|
|
@@ -2600,7 +2600,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2600
2600
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2601
2601
|
hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2602
2602
|
}),
|
|
2603
|
-
|
|
2603
|
+
R && t.appType === "WORKFLOW" && /* @__PURE__ */ K("p", {
|
|
2604
2604
|
className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
|
|
2605
2605
|
children: [
|
|
2606
2606
|
"The Workflow Definition (JSON) is set per version. Go to the",
|
|
@@ -2638,8 +2638,8 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2638
2638
|
aspectClass: "aspect-square",
|
|
2639
2639
|
upload: j,
|
|
2640
2640
|
uploading: le,
|
|
2641
|
-
progress:
|
|
2642
|
-
error:
|
|
2641
|
+
progress: ue,
|
|
2642
|
+
error: I
|
|
2643
2643
|
})]
|
|
2644
2644
|
}),
|
|
2645
2645
|
/* @__PURE__ */ G(O, {
|
|
@@ -2667,10 +2667,10 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2667
2667
|
/* @__PURE__ */ G(Z, {
|
|
2668
2668
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2669
2669
|
onChange: (e) => E("screenshotsText", e.join("\n")),
|
|
2670
|
-
upload:
|
|
2671
|
-
uploading:
|
|
2672
|
-
progress:
|
|
2673
|
-
error:
|
|
2670
|
+
upload: me,
|
|
2671
|
+
uploading: he,
|
|
2672
|
+
progress: ge,
|
|
2673
|
+
error: _e
|
|
2674
2674
|
})
|
|
2675
2675
|
]
|
|
2676
2676
|
})
|
|
@@ -2727,7 +2727,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2727
2727
|
children: [
|
|
2728
2728
|
b === "success" && /* @__PURE__ */ K("div", {
|
|
2729
2729
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2730
|
-
children: [/* @__PURE__ */ G(
|
|
2730
|
+
children: [/* @__PURE__ */ G(de, {
|
|
2731
2731
|
size: 15,
|
|
2732
2732
|
className: "shrink-0"
|
|
2733
2733
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
@@ -2748,10 +2748,10 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2748
2748
|
disabled: g || !D || !w,
|
|
2749
2749
|
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"),
|
|
2750
2750
|
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",
|
|
2751
|
-
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2751
|
+
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
2752
2752
|
size: 16,
|
|
2753
2753
|
className: "animate-spin"
|
|
2754
|
-
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2754
|
+
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(we, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(F, { size: 16 }), p("devportal.saved", "Saved")] })
|
|
2755
2755
|
}),
|
|
2756
2756
|
!D && /* @__PURE__ */ G("p", {
|
|
2757
2757
|
className: "text-xs text-text-secondary",
|
|
@@ -2761,13 +2761,13 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2761
2761
|
type: "button",
|
|
2762
2762
|
onClick: a,
|
|
2763
2763
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2764
|
-
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(
|
|
2764
|
+
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(fe, { size: 15 })]
|
|
2765
2765
|
}),
|
|
2766
2766
|
(!r || n > 0) && !i && o && /* @__PURE__ */ K("button", {
|
|
2767
2767
|
type: "button",
|
|
2768
2768
|
onClick: o,
|
|
2769
2769
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2770
|
-
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(
|
|
2770
|
+
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(fe, { size: 15 })]
|
|
2771
2771
|
})
|
|
2772
2772
|
]
|
|
2773
2773
|
})
|
|
@@ -2808,196 +2808,258 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2808
2808
|
target: "_blank",
|
|
2809
2809
|
rel: "noopener noreferrer",
|
|
2810
2810
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2811
|
-
children: [/* @__PURE__ */ G(
|
|
2812
|
-
}), ct =
|
|
2813
|
-
{
|
|
2814
|
-
id: "auth",
|
|
2811
|
+
children: [/* @__PURE__ */ G(L, { size: 14 }), e]
|
|
2812
|
+
}), ct = {
|
|
2813
|
+
auth: {
|
|
2815
2814
|
label: "Authentication",
|
|
2816
2815
|
description: "User identity and session management"
|
|
2817
2816
|
},
|
|
2818
|
-
{
|
|
2819
|
-
id: "billing",
|
|
2817
|
+
billing: {
|
|
2820
2818
|
label: "Billing",
|
|
2821
2819
|
description: "Billing accounts and subscriptions"
|
|
2822
2820
|
},
|
|
2823
|
-
{
|
|
2824
|
-
id: "files",
|
|
2821
|
+
files: {
|
|
2825
2822
|
label: "Files",
|
|
2826
2823
|
description: "File storage and management"
|
|
2827
2824
|
},
|
|
2828
|
-
{
|
|
2829
|
-
id: "tags",
|
|
2825
|
+
tags: {
|
|
2830
2826
|
label: "Tags",
|
|
2831
2827
|
description: "Tags and labels on resources"
|
|
2832
2828
|
},
|
|
2833
|
-
{
|
|
2834
|
-
id: "calendar",
|
|
2829
|
+
calendar: {
|
|
2835
2830
|
label: "Calendar",
|
|
2836
2831
|
description: "Events and scheduling"
|
|
2837
2832
|
},
|
|
2838
|
-
{
|
|
2839
|
-
id: "workflows",
|
|
2833
|
+
workflows: {
|
|
2840
2834
|
label: "Workflows",
|
|
2841
2835
|
description: "Automation workflows"
|
|
2842
2836
|
},
|
|
2843
|
-
{
|
|
2844
|
-
id: "channels",
|
|
2837
|
+
channels: {
|
|
2845
2838
|
label: "Channels",
|
|
2846
2839
|
description: "Messaging channels"
|
|
2847
2840
|
},
|
|
2848
|
-
{
|
|
2849
|
-
id: "notifications",
|
|
2841
|
+
notifications: {
|
|
2850
2842
|
label: "Notifications",
|
|
2851
2843
|
description: "Platform notifications"
|
|
2852
2844
|
},
|
|
2853
|
-
{
|
|
2854
|
-
id: "users",
|
|
2845
|
+
users: {
|
|
2855
2846
|
label: "Users & Members",
|
|
2856
2847
|
description: "Workspace members and profiles"
|
|
2857
2848
|
},
|
|
2858
|
-
{
|
|
2859
|
-
id: "workspaces",
|
|
2849
|
+
workspaces: {
|
|
2860
2850
|
label: "Workspaces",
|
|
2861
2851
|
description: "Workspace settings and metadata"
|
|
2862
2852
|
},
|
|
2863
|
-
{
|
|
2864
|
-
id: "content",
|
|
2853
|
+
content: {
|
|
2865
2854
|
label: "Content",
|
|
2866
2855
|
description: "Pages, documents, and content"
|
|
2867
2856
|
},
|
|
2868
|
-
{
|
|
2869
|
-
id: "analytics",
|
|
2857
|
+
analytics: {
|
|
2870
2858
|
label: "Analytics",
|
|
2871
2859
|
description: "Usage analytics and reporting"
|
|
2872
2860
|
},
|
|
2873
|
-
{
|
|
2874
|
-
id: "webhooks",
|
|
2861
|
+
webhooks: {
|
|
2875
2862
|
label: "Webhooks",
|
|
2876
2863
|
description: "Webhook subscriptions"
|
|
2877
2864
|
},
|
|
2878
|
-
{
|
|
2879
|
-
id: "rbac",
|
|
2865
|
+
rbac: {
|
|
2880
2866
|
label: "Roles & Permissions",
|
|
2881
2867
|
description: "Access control configuration"
|
|
2882
2868
|
}
|
|
2883
|
-
|
|
2884
|
-
function
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
for (let n of e.permissions) n && typeof n == "object" && n.resource
|
|
2869
|
+
}, lt = Object.keys(ct);
|
|
2870
|
+
function ut(e) {
|
|
2871
|
+
if (!e || !Array.isArray(e.permissions)) return [];
|
|
2872
|
+
let t = [];
|
|
2873
|
+
for (let n of e.permissions) n && typeof n == "object" && typeof n.resource == "string" && n.resource && t.push({
|
|
2874
|
+
resource: n.resource,
|
|
2875
|
+
level: n.level === "write" ? "write" : "read"
|
|
2876
|
+
});
|
|
2888
2877
|
return t;
|
|
2889
2878
|
}
|
|
2890
|
-
function
|
|
2891
|
-
let t =
|
|
2879
|
+
function dt(e) {
|
|
2880
|
+
let t = [];
|
|
2892
2881
|
for (let n of e) {
|
|
2893
|
-
let
|
|
2894
|
-
|
|
2882
|
+
let e = n.indexOf(":");
|
|
2883
|
+
if (e === -1) continue;
|
|
2884
|
+
let r = n.slice(0, e), i = n.slice(e + 1);
|
|
2885
|
+
i && t.push({
|
|
2886
|
+
resource: i,
|
|
2887
|
+
level: r === "write" ? "write" : "read"
|
|
2888
|
+
});
|
|
2895
2889
|
}
|
|
2896
2890
|
return t;
|
|
2897
2891
|
}
|
|
2898
|
-
function
|
|
2899
|
-
|
|
2892
|
+
function ft(e, t) {
|
|
2893
|
+
if (e.length > 0) return e;
|
|
2894
|
+
let n = /* @__PURE__ */ new Set();
|
|
2895
|
+
return t.filter((e) => n.has(e.resource) ? !1 : (n.add(e.resource), !0));
|
|
2900
2896
|
}
|
|
2901
|
-
var
|
|
2902
|
-
|
|
2903
|
-
|
|
2897
|
+
var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
|
|
2898
|
+
className: "flex items-center gap-0.5 rounded-md border border-border-subtle bg-bg-sunken/50 p-0.5",
|
|
2899
|
+
children: ["read", "write"].map((n) => /* @__PURE__ */ G("button", {
|
|
2900
|
+
type: "button",
|
|
2901
|
+
onClick: () => t(n),
|
|
2902
|
+
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"}`,
|
|
2903
|
+
children: n === "read" ? "Read" : "Read & Write"
|
|
2904
|
+
}, n))
|
|
2905
|
+
}), mt = ({ app: e, versionScopes: t }) => {
|
|
2906
|
+
let n = e.manifest ?? {}, [r, i] = N(() => ft(ut(n), dt(t ?? []))), [a, o] = N(!1), [s, c] = N(""), [l, u] = N("read"), [d, f] = N(!1), [p, m] = N(!1), [h] = _(), g = (e, t) => {
|
|
2907
|
+
m(!1), i((n) => n.map((n) => n.resource === e ? {
|
|
2904
2908
|
...n,
|
|
2905
|
-
|
|
2906
|
-
}));
|
|
2907
|
-
},
|
|
2908
|
-
|
|
2909
|
+
level: t
|
|
2910
|
+
} : n));
|
|
2911
|
+
}, v = (e) => {
|
|
2912
|
+
m(!1), i((t) => t.filter((t) => t.resource !== e));
|
|
2913
|
+
}, b = () => {
|
|
2914
|
+
let e = s.trim().toLowerCase().replace(/\s+/g, "-");
|
|
2915
|
+
!e || r.some((t) => t.resource === e) || (i((t) => [...t, {
|
|
2916
|
+
resource: e,
|
|
2917
|
+
level: l
|
|
2918
|
+
}]), c(""), u("read"), o(!1), m(!1));
|
|
2919
|
+
}, x = async () => {
|
|
2920
|
+
f(!0);
|
|
2909
2921
|
try {
|
|
2910
|
-
|
|
2911
|
-
resource: e,
|
|
2912
|
-
level: t
|
|
2913
|
-
}));
|
|
2914
|
-
await l({ variables: {
|
|
2922
|
+
await h({ variables: {
|
|
2915
2923
|
id: e.id,
|
|
2916
2924
|
input: { manifest: {
|
|
2917
2925
|
...n,
|
|
2918
|
-
permissions: t
|
|
2926
|
+
permissions: r.map(({ resource: e, level: t }) => ({
|
|
2927
|
+
resource: e,
|
|
2928
|
+
level: t
|
|
2929
|
+
}))
|
|
2919
2930
|
} }
|
|
2920
|
-
} }),
|
|
2931
|
+
} }), m(!0);
|
|
2921
2932
|
} finally {
|
|
2922
|
-
|
|
2933
|
+
f(!1);
|
|
2923
2934
|
}
|
|
2924
|
-
}
|
|
2925
|
-
none: "No access",
|
|
2926
|
-
read: "Read",
|
|
2927
|
-
write: "Read & Write"
|
|
2928
|
-
}, p = [
|
|
2929
|
-
"none",
|
|
2930
|
-
"read",
|
|
2931
|
-
"write"
|
|
2932
|
-
];
|
|
2935
|
+
};
|
|
2933
2936
|
return /* @__PURE__ */ G(y, {
|
|
2934
2937
|
title: "Permissions",
|
|
2935
|
-
description: "
|
|
2938
|
+
description: "These are the permissions your app requests from users. Users see exactly this list when authorizing your app.",
|
|
2936
2939
|
children: /* @__PURE__ */ K("div", {
|
|
2937
2940
|
className: "space-y-4",
|
|
2938
2941
|
children: [
|
|
2939
|
-
/* @__PURE__ */
|
|
2940
|
-
className: "
|
|
2941
|
-
children:
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
className: "
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2942
|
+
r.length === 0 ? /* @__PURE__ */ K("div", {
|
|
2943
|
+
className: "rounded-lg border border-border-subtle border-dashed p-8 flex flex-col items-center gap-2 text-center text-text-secondary",
|
|
2944
|
+
children: [
|
|
2945
|
+
/* @__PURE__ */ G(V, {
|
|
2946
|
+
size: 28,
|
|
2947
|
+
className: "opacity-25"
|
|
2948
|
+
}),
|
|
2949
|
+
/* @__PURE__ */ G("p", {
|
|
2950
|
+
className: "text-sm font-medium text-text-primary",
|
|
2951
|
+
children: "No permissions configured"
|
|
2952
|
+
}),
|
|
2953
|
+
/* @__PURE__ */ G("p", {
|
|
2954
|
+
className: "text-xs",
|
|
2955
|
+
children: "Add the permissions your app needs to request from users."
|
|
2956
|
+
})
|
|
2957
|
+
]
|
|
2958
|
+
}) : /* @__PURE__ */ G("div", {
|
|
2959
|
+
className: "rounded-lg border border-border-subtle divide-y divide-border-subtle",
|
|
2960
|
+
children: r.map((e) => /* @__PURE__ */ K("div", {
|
|
2961
|
+
className: "flex items-center gap-3 px-4 py-3 hover:bg-bg-sunken/30 transition-colors",
|
|
2962
|
+
children: [
|
|
2963
|
+
/* @__PURE__ */ K("div", {
|
|
2964
|
+
className: "flex-1 min-w-0",
|
|
2965
|
+
children: [
|
|
2966
|
+
/* @__PURE__ */ G("p", {
|
|
2967
|
+
className: "text-sm font-medium text-text-primary",
|
|
2968
|
+
children: ct[e.resource]?.label ?? e.resource
|
|
2969
|
+
}),
|
|
2970
|
+
ct[e.resource]?.description && /* @__PURE__ */ G("p", {
|
|
2962
2971
|
className: "text-xs text-text-secondary",
|
|
2963
|
-
children: e.description
|
|
2964
|
-
})
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
type: "radio",
|
|
2969
|
-
name: `perm-${e.id}`,
|
|
2970
|
-
value: t,
|
|
2971
|
-
checked: r[e.id] === t,
|
|
2972
|
-
onChange: () => u(e.id, t),
|
|
2973
|
-
className: "h-4 w-4 accent-primary cursor-pointer"
|
|
2972
|
+
children: ct[e.resource].description
|
|
2973
|
+
}),
|
|
2974
|
+
!ct[e.resource] && /* @__PURE__ */ G("p", {
|
|
2975
|
+
className: "text-xs text-text-tertiary font-mono",
|
|
2976
|
+
children: "custom scope"
|
|
2974
2977
|
})
|
|
2975
|
-
|
|
2976
|
-
},
|
|
2977
|
-
|
|
2978
|
-
|
|
2978
|
+
]
|
|
2979
|
+
}),
|
|
2980
|
+
/* @__PURE__ */ G(pt, {
|
|
2981
|
+
level: e.level,
|
|
2982
|
+
onChange: (t) => g(e.resource, t)
|
|
2983
|
+
}),
|
|
2984
|
+
/* @__PURE__ */ G("button", {
|
|
2985
|
+
type: "button",
|
|
2986
|
+
onClick: () => v(e.resource),
|
|
2987
|
+
title: "Remove permission",
|
|
2988
|
+
className: "p-1.5 rounded text-text-tertiary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
2989
|
+
children: /* @__PURE__ */ G(U, { size: 14 })
|
|
2990
|
+
})
|
|
2991
|
+
]
|
|
2992
|
+
}, e.resource))
|
|
2993
|
+
}),
|
|
2994
|
+
a ? /* @__PURE__ */ K("div", {
|
|
2995
|
+
className: "rounded-lg border border-border-subtle p-3 flex items-center gap-2 flex-wrap",
|
|
2996
|
+
children: [
|
|
2997
|
+
/* @__PURE__ */ G("input", {
|
|
2998
|
+
type: "text",
|
|
2999
|
+
value: s,
|
|
3000
|
+
onChange: (e) => c(e.target.value),
|
|
3001
|
+
onKeyDown: (e) => {
|
|
3002
|
+
e.key === "Enter" && b(), e.key === "Escape" && o(!1);
|
|
3003
|
+
},
|
|
3004
|
+
placeholder: "Resource (e.g. auth, files, widgets)",
|
|
3005
|
+
list: "perm-resource-suggestions",
|
|
3006
|
+
autoFocus: !0,
|
|
3007
|
+
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"
|
|
3008
|
+
}),
|
|
3009
|
+
/* @__PURE__ */ G("datalist", {
|
|
3010
|
+
id: "perm-resource-suggestions",
|
|
3011
|
+
children: lt.filter((e) => !r.some((t) => t.resource === e)).map((e) => /* @__PURE__ */ G("option", {
|
|
3012
|
+
value: e,
|
|
3013
|
+
children: ct[e].label
|
|
3014
|
+
}, e))
|
|
3015
|
+
}),
|
|
3016
|
+
/* @__PURE__ */ G(pt, {
|
|
3017
|
+
level: l,
|
|
3018
|
+
onChange: u
|
|
3019
|
+
}),
|
|
3020
|
+
/* @__PURE__ */ G("button", {
|
|
3021
|
+
type: "button",
|
|
3022
|
+
onClick: b,
|
|
3023
|
+
disabled: !s.trim(),
|
|
3024
|
+
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",
|
|
3025
|
+
children: "Add"
|
|
3026
|
+
}),
|
|
3027
|
+
/* @__PURE__ */ G("button", {
|
|
3028
|
+
type: "button",
|
|
3029
|
+
onClick: () => {
|
|
3030
|
+
o(!1), c("");
|
|
3031
|
+
},
|
|
3032
|
+
className: "p-1.5 rounded text-text-secondary hover:text-text-primary transition-colors",
|
|
3033
|
+
children: /* @__PURE__ */ G(U, { size: 14 })
|
|
3034
|
+
})
|
|
3035
|
+
]
|
|
3036
|
+
}) : /* @__PURE__ */ K("button", {
|
|
3037
|
+
type: "button",
|
|
3038
|
+
onClick: () => o(!0),
|
|
3039
|
+
className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
3040
|
+
children: [/* @__PURE__ */ G(B, { size: 14 }), "Add permission"]
|
|
2979
3041
|
}),
|
|
2980
3042
|
/* @__PURE__ */ K("div", {
|
|
2981
3043
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2982
|
-
children: [/* @__PURE__ */ G(
|
|
3044
|
+
children: [/* @__PURE__ */ G(_e, {
|
|
2983
3045
|
size: 14,
|
|
2984
3046
|
className: "flex-shrink-0 mt-0.5"
|
|
2985
3047
|
}), /* @__PURE__ */ K("span", { children: [/* @__PURE__ */ G("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
2986
3048
|
}),
|
|
2987
3049
|
/* @__PURE__ */ K("div", {
|
|
2988
3050
|
className: "flex items-center justify-end gap-3",
|
|
2989
|
-
children: [
|
|
3051
|
+
children: [p && /* @__PURE__ */ K("span", {
|
|
2990
3052
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2991
|
-
children: [/* @__PURE__ */ G(
|
|
3053
|
+
children: [/* @__PURE__ */ G(de, { size: 14 }), "Saved"]
|
|
2992
3054
|
}), /* @__PURE__ */ K("button", {
|
|
2993
3055
|
type: "button",
|
|
2994
|
-
onClick: () => void
|
|
2995
|
-
disabled:
|
|
3056
|
+
onClick: () => void x(),
|
|
3057
|
+
disabled: d,
|
|
2996
3058
|
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",
|
|
2997
|
-
children: [
|
|
3059
|
+
children: [d ? /* @__PURE__ */ G(z, {
|
|
2998
3060
|
size: 14,
|
|
2999
3061
|
className: "animate-spin"
|
|
3000
|
-
}) : /* @__PURE__ */ G(
|
|
3062
|
+
}) : /* @__PURE__ */ G(V, { size: 14 }), "Save Permissions"]
|
|
3001
3063
|
})]
|
|
3002
3064
|
})
|
|
3003
3065
|
]
|