@burdenoff/microfe-devportal 2026.705.1 → 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,7 +610,10 @@ 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
|
+
app: J,
|
|
615
|
+
versionScopes: I?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? []
|
|
616
|
+
}),
|
|
614
617
|
E === "webhooks" && /* @__PURE__ */ G(Ke, {
|
|
615
618
|
appId: J.id,
|
|
616
619
|
onNavigate: q
|
|
@@ -618,7 +621,7 @@ var Le = [
|
|
|
618
621
|
E === "delegations" && /* @__PURE__ */ G(qe, {
|
|
619
622
|
authAppId: J.appId || void 0,
|
|
620
623
|
appName: J.name,
|
|
621
|
-
onGrantDelegation: () =>
|
|
624
|
+
onGrantDelegation: () => ue(!0),
|
|
622
625
|
onNavigate: q
|
|
623
626
|
}),
|
|
624
627
|
E === "analytics" && /* @__PURE__ */ G(Je, { appId: J.id }),
|
|
@@ -633,7 +636,7 @@ var Le = [
|
|
|
633
636
|
}),
|
|
634
637
|
E === "store-listing" && /* @__PURE__ */ G(ot, {
|
|
635
638
|
app: J,
|
|
636
|
-
versionCount:
|
|
639
|
+
versionCount: I?.application?.versions?.totalCount ?? 0,
|
|
637
640
|
isPackageApp: Y,
|
|
638
641
|
pricingDone: Z,
|
|
639
642
|
onNavigateToVersions: Y || X ? () => D("versions") : void 0,
|
|
@@ -664,7 +667,7 @@ var Le = [
|
|
|
664
667
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
665
668
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
666
669
|
variant: "warning",
|
|
667
|
-
loading:
|
|
670
|
+
loading: ve
|
|
668
671
|
}),
|
|
669
672
|
/* @__PURE__ */ G(re, {
|
|
670
673
|
open: ne,
|
|
@@ -675,16 +678,16 @@ var Le = [
|
|
|
675
678
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
676
679
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
677
680
|
variant: "destructive",
|
|
678
|
-
loading:
|
|
681
|
+
loading: be
|
|
679
682
|
}),
|
|
680
683
|
/* @__PURE__ */ G(ie, {
|
|
681
684
|
open: M,
|
|
682
|
-
onOpenChange:
|
|
685
|
+
onOpenChange: ue,
|
|
683
686
|
appId: J.appId || "",
|
|
684
687
|
appName: J.name,
|
|
685
688
|
appScopes: J.scopes?.map((e) => e.scope) ?? [],
|
|
686
689
|
onSuccess: () => {
|
|
687
|
-
|
|
690
|
+
ue(!1);
|
|
688
691
|
}
|
|
689
692
|
})
|
|
690
693
|
]
|
|
@@ -697,7 +700,7 @@ var Le = [
|
|
|
697
700
|
return /* @__PURE__ */ K("div", {
|
|
698
701
|
className: "space-y-4 py-4 text-center",
|
|
699
702
|
children: [
|
|
700
|
-
/* @__PURE__ */ G(
|
|
703
|
+
/* @__PURE__ */ G(V, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
701
704
|
/* @__PURE__ */ G("h3", {
|
|
702
705
|
className: "font-medium",
|
|
703
706
|
children: n("devportal.oauthApps", "OAuth Apps")
|
|
@@ -709,7 +712,7 @@ var Le = [
|
|
|
709
712
|
/* @__PURE__ */ K("button", {
|
|
710
713
|
onClick: () => e("/oauth"),
|
|
711
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",
|
|
712
|
-
children: [/* @__PURE__ */ G(
|
|
715
|
+
children: [/* @__PURE__ */ G(L, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
713
716
|
})
|
|
714
717
|
]
|
|
715
718
|
});
|
|
@@ -721,7 +724,7 @@ var Le = [
|
|
|
721
724
|
return /* @__PURE__ */ K("div", {
|
|
722
725
|
className: "space-y-4 py-4 text-center",
|
|
723
726
|
children: [
|
|
724
|
-
/* @__PURE__ */ G(
|
|
727
|
+
/* @__PURE__ */ G(R, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
725
728
|
/* @__PURE__ */ G("h3", {
|
|
726
729
|
className: "font-medium",
|
|
727
730
|
children: n("devportal.apiKeys", "API Keys")
|
|
@@ -733,7 +736,7 @@ var Le = [
|
|
|
733
736
|
/* @__PURE__ */ K("button", {
|
|
734
737
|
onClick: () => e("/api-keys"),
|
|
735
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",
|
|
736
|
-
children: [/* @__PURE__ */ G(
|
|
739
|
+
children: [/* @__PURE__ */ G(L, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
737
740
|
})
|
|
738
741
|
]
|
|
739
742
|
});
|
|
@@ -786,7 +789,7 @@ var Le = [
|
|
|
786
789
|
children: [
|
|
787
790
|
/* @__PURE__ */ K("div", {
|
|
788
791
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
789
|
-
children: [/* @__PURE__ */ G(
|
|
792
|
+
children: [/* @__PURE__ */ G(I, {
|
|
790
793
|
size: 16,
|
|
791
794
|
className: "mt-0.5 shrink-0 text-primary"
|
|
792
795
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -827,7 +830,7 @@ var Le = [
|
|
|
827
830
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
828
831
|
children: [/* @__PURE__ */ G("div", {
|
|
829
832
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
|
|
830
|
-
children: /* @__PURE__ */ G(
|
|
833
|
+
children: /* @__PURE__ */ G(Te, {
|
|
831
834
|
size: 18,
|
|
832
835
|
className: "text-status-success-text"
|
|
833
836
|
})
|
|
@@ -859,7 +862,7 @@ var Le = [
|
|
|
859
862
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
860
863
|
children: [/* @__PURE__ */ G("div", {
|
|
861
864
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
862
|
-
children: /* @__PURE__ */ G(
|
|
865
|
+
children: /* @__PURE__ */ G(De, {
|
|
863
866
|
size: 18,
|
|
864
867
|
className: "text-primary"
|
|
865
868
|
})
|
|
@@ -888,7 +891,7 @@ var Le = [
|
|
|
888
891
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
889
892
|
children: [/* @__PURE__ */ G("div", {
|
|
890
893
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
891
|
-
children: /* @__PURE__ */ G(
|
|
894
|
+
children: /* @__PURE__ */ G(ge, {
|
|
892
895
|
size: 18,
|
|
893
896
|
className: "text-status-warning-text"
|
|
894
897
|
})
|
|
@@ -1120,7 +1123,7 @@ var Le = [
|
|
|
1120
1123
|
children: [
|
|
1121
1124
|
/* @__PURE__ */ K("li", {
|
|
1122
1125
|
className: "flex items-start gap-2",
|
|
1123
|
-
children: [/* @__PURE__ */ G(
|
|
1126
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1124
1127
|
size: 14,
|
|
1125
1128
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1126
1129
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1138,21 +1141,21 @@ var Le = [
|
|
|
1138
1141
|
}),
|
|
1139
1142
|
/* @__PURE__ */ K("li", {
|
|
1140
1143
|
className: "flex items-start gap-2",
|
|
1141
|
-
children: [/* @__PURE__ */ G(
|
|
1144
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1142
1145
|
size: 14,
|
|
1143
1146
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1144
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." })]
|
|
1145
1148
|
}),
|
|
1146
1149
|
/* @__PURE__ */ K("li", {
|
|
1147
1150
|
className: "flex items-start gap-2",
|
|
1148
|
-
children: [/* @__PURE__ */ G(
|
|
1151
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1149
1152
|
size: 14,
|
|
1150
1153
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1151
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." })]
|
|
1152
1155
|
}),
|
|
1153
1156
|
/* @__PURE__ */ K("li", {
|
|
1154
1157
|
className: "flex items-start gap-2",
|
|
1155
|
-
children: [/* @__PURE__ */ G(
|
|
1158
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1156
1159
|
size: 14,
|
|
1157
1160
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1158
1161
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1179,13 +1182,13 @@ var Le = [
|
|
|
1179
1182
|
onClick: () => void g(),
|
|
1180
1183
|
disabled: d,
|
|
1181
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",
|
|
1182
|
-
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1185
|
+
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
1183
1186
|
size: 16,
|
|
1184
1187
|
className: "animate-spin"
|
|
1185
|
-
}), 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")] })
|
|
1186
1189
|
}), a && /* @__PURE__ */ K("div", {
|
|
1187
1190
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1188
|
-
children: [/* @__PURE__ */ G(
|
|
1191
|
+
children: [/* @__PURE__ */ G(F, {
|
|
1189
1192
|
size: 16,
|
|
1190
1193
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1191
1194
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1225,7 +1228,7 @@ var Le = [
|
|
|
1225
1228
|
}), /* @__PURE__ */ K("button", {
|
|
1226
1229
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1227
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",
|
|
1228
|
-
children: [/* @__PURE__ */ G(
|
|
1231
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1229
1232
|
})]
|
|
1230
1233
|
}),
|
|
1231
1234
|
f.length > 0 ? /* @__PURE__ */ G("div", {
|
|
@@ -1318,19 +1321,19 @@ var Le = [
|
|
|
1318
1321
|
})
|
|
1319
1322
|
}) : /* @__PURE__ */ G(r, {
|
|
1320
1323
|
illustration: "empty-generic",
|
|
1321
|
-
icon: /* @__PURE__ */ G(
|
|
1324
|
+
icon: /* @__PURE__ */ G(be, { size: 32 }),
|
|
1322
1325
|
title: s("devportal.noVersions", "No versions yet"),
|
|
1323
1326
|
description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1324
1327
|
action: /* @__PURE__ */ K("button", {
|
|
1325
1328
|
onClick: () => n(`/apps/${e}/versions`),
|
|
1326
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",
|
|
1327
|
-
children: [/* @__PURE__ */ G(
|
|
1330
|
+
children: [/* @__PURE__ */ G(H, { size: 16 }), s("devportal.uploadVersion", "Upload Version")]
|
|
1328
1331
|
})
|
|
1329
1332
|
}),
|
|
1330
1333
|
f.length > 0 && !i && a && /* @__PURE__ */ K("div", {
|
|
1331
1334
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1332
1335
|
children: [
|
|
1333
|
-
/* @__PURE__ */ G(
|
|
1336
|
+
/* @__PURE__ */ G(I, {
|
|
1334
1337
|
size: 16,
|
|
1335
1338
|
className: "shrink-0 text-primary"
|
|
1336
1339
|
}),
|
|
@@ -1342,7 +1345,7 @@ var Le = [
|
|
|
1342
1345
|
type: "button",
|
|
1343
1346
|
onClick: a,
|
|
1344
1347
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1345
|
-
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(
|
|
1348
|
+
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(fe, { size: 15 })]
|
|
1346
1349
|
})
|
|
1347
1350
|
]
|
|
1348
1351
|
})
|
|
@@ -1430,13 +1433,13 @@ var Le = [
|
|
|
1430
1433
|
})
|
|
1431
1434
|
] }) : /* @__PURE__ */ G(r, {
|
|
1432
1435
|
illustration: "empty-generic",
|
|
1433
|
-
icon: /* @__PURE__ */ G(
|
|
1436
|
+
icon: /* @__PURE__ */ G(V, { size: 32 }),
|
|
1434
1437
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1435
1438
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1436
1439
|
action: /* @__PURE__ */ K("button", {
|
|
1437
1440
|
onClick: () => a("/oauth"),
|
|
1438
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",
|
|
1439
|
-
children: [/* @__PURE__ */ G(
|
|
1442
|
+
children: [/* @__PURE__ */ G(L, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1440
1443
|
})
|
|
1441
1444
|
});
|
|
1442
1445
|
}, Je = ({ appId: e }) => {
|
|
@@ -1618,7 +1621,7 @@ var Le = [
|
|
|
1618
1621
|
}), /* @__PURE__ */ K("button", {
|
|
1619
1622
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1620
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",
|
|
1621
|
-
children: [/* @__PURE__ */ G(
|
|
1624
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1622
1625
|
})]
|
|
1623
1626
|
}), t.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1624
1627
|
className: "space-y-4",
|
|
@@ -1642,7 +1645,7 @@ var Le = [
|
|
|
1642
1645
|
})] }), /* @__PURE__ */ G("button", {
|
|
1643
1646
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1644
1647
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1645
|
-
children: /* @__PURE__ */ G(
|
|
1648
|
+
children: /* @__PURE__ */ G(ye, { size: 20 })
|
|
1646
1649
|
})]
|
|
1647
1650
|
}),
|
|
1648
1651
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1699,13 +1702,13 @@ var Le = [
|
|
|
1699
1702
|
}, t.id))
|
|
1700
1703
|
}) : /* @__PURE__ */ G(r, {
|
|
1701
1704
|
illustration: "empty-notifications",
|
|
1702
|
-
icon: /* @__PURE__ */ G(
|
|
1705
|
+
icon: /* @__PURE__ */ G(Oe, { size: 32 }),
|
|
1703
1706
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
1704
1707
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
1705
1708
|
action: /* @__PURE__ */ K("button", {
|
|
1706
1709
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1707
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",
|
|
1708
|
-
children: [/* @__PURE__ */ G(
|
|
1711
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1709
1712
|
})
|
|
1710
1713
|
})]
|
|
1711
1714
|
});
|
|
@@ -1745,7 +1748,7 @@ var Le = [
|
|
|
1745
1748
|
})] }), /* @__PURE__ */ K("button", {
|
|
1746
1749
|
onClick: i,
|
|
1747
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",
|
|
1748
|
-
children: [/* @__PURE__ */ G(
|
|
1751
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1749
1752
|
})]
|
|
1750
1753
|
}),
|
|
1751
1754
|
h.length > 0 && /* @__PURE__ */ G("div", {
|
|
@@ -1858,7 +1861,7 @@ var Le = [
|
|
|
1858
1861
|
e.expiresAt && /* @__PURE__ */ K("span", {
|
|
1859
1862
|
className: "flex items-center gap-1",
|
|
1860
1863
|
children: [
|
|
1861
|
-
/* @__PURE__ */ G(
|
|
1864
|
+
/* @__PURE__ */ G(pe, { size: 12 }),
|
|
1862
1865
|
m("devportal.expires", "Expires"),
|
|
1863
1866
|
" ",
|
|
1864
1867
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1866,7 +1869,7 @@ var Le = [
|
|
|
1866
1869
|
}),
|
|
1867
1870
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ K("span", {
|
|
1868
1871
|
className: "flex items-center gap-1",
|
|
1869
|
-
children: [/* @__PURE__ */ G(
|
|
1872
|
+
children: [/* @__PURE__ */ G(de, {
|
|
1870
1873
|
size: 12,
|
|
1871
1874
|
className: "text-status-success-text"
|
|
1872
1875
|
}), m("devportal.noExpiration", "No expiration")]
|
|
@@ -1889,13 +1892,13 @@ var Le = [
|
|
|
1889
1892
|
}, e.id))
|
|
1890
1893
|
}) : /* @__PURE__ */ G(r, {
|
|
1891
1894
|
illustration: "empty-people",
|
|
1892
|
-
icon: /* @__PURE__ */ G(
|
|
1895
|
+
icon: /* @__PURE__ */ G(Ee, { size: 32 }),
|
|
1893
1896
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1894
1897
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1895
1898
|
action: /* @__PURE__ */ K("button", {
|
|
1896
1899
|
onClick: i,
|
|
1897
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",
|
|
1898
|
-
children: [/* @__PURE__ */ G(
|
|
1901
|
+
children: [/* @__PURE__ */ G(B, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1899
1902
|
})
|
|
1900
1903
|
})
|
|
1901
1904
|
]
|
|
@@ -1975,7 +1978,7 @@ var Le = [
|
|
|
1975
1978
|
]
|
|
1976
1979
|
}) : /* @__PURE__ */ G(r, {
|
|
1977
1980
|
illustration: "empty-data",
|
|
1978
|
-
icon: /* @__PURE__ */ G(
|
|
1981
|
+
icon: /* @__PURE__ */ G(ue, { size: 32 }),
|
|
1979
1982
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1980
1983
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1981
1984
|
})
|
|
@@ -2045,7 +2048,7 @@ var Le = [
|
|
|
2045
2048
|
})] }), /* @__PURE__ */ K("button", {
|
|
2046
2049
|
onClick: S,
|
|
2047
2050
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
2048
|
-
children: [/* @__PURE__ */ G(
|
|
2051
|
+
children: [/* @__PURE__ */ G(R, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
2049
2052
|
})]
|
|
2050
2053
|
}),
|
|
2051
2054
|
y && /* @__PURE__ */ K("div", {
|
|
@@ -2146,10 +2149,10 @@ var Le = [
|
|
|
2146
2149
|
onClick: x,
|
|
2147
2150
|
disabled: p,
|
|
2148
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",
|
|
2149
|
-
children: [p ? /* @__PURE__ */ G(
|
|
2152
|
+
children: [p ? /* @__PURE__ */ G(z, {
|
|
2150
2153
|
size: 16,
|
|
2151
2154
|
className: "animate-spin"
|
|
2152
|
-
}) : /* @__PURE__ */ G(
|
|
2155
|
+
}) : /* @__PURE__ */ G(L, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2153
2156
|
}),
|
|
2154
2157
|
d && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2155
2158
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2184,12 +2187,12 @@ var Le = [
|
|
|
2184
2187
|
alt: e,
|
|
2185
2188
|
className: "w-full h-full object-cover",
|
|
2186
2189
|
onError: () => p(!0)
|
|
2187
|
-
}) : /* @__PURE__ */ G(
|
|
2190
|
+
}) : /* @__PURE__ */ G(H, {
|
|
2188
2191
|
size: 18,
|
|
2189
2192
|
className: "text-text-secondary opacity-40"
|
|
2190
2193
|
}), c && /* @__PURE__ */ K("div", {
|
|
2191
2194
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
2192
|
-
children: [/* @__PURE__ */ G(
|
|
2195
|
+
children: [/* @__PURE__ */ G(z, {
|
|
2193
2196
|
size: 14,
|
|
2194
2197
|
className: "animate-spin text-white"
|
|
2195
2198
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2222,7 +2225,7 @@ var Le = [
|
|
|
2222
2225
|
disabled: c,
|
|
2223
2226
|
onClick: () => d.current?.click(),
|
|
2224
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",
|
|
2225
|
-
children: [/* @__PURE__ */ G(
|
|
2228
|
+
children: [/* @__PURE__ */ G(H, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
|
|
2226
2229
|
}),
|
|
2227
2230
|
u && /* @__PURE__ */ G("p", {
|
|
2228
2231
|
className: "text-xs text-status-error-text",
|
|
@@ -2278,20 +2281,20 @@ var Le = [
|
|
|
2278
2281
|
type: "button",
|
|
2279
2282
|
onClick: () => f(t),
|
|
2280
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",
|
|
2281
|
-
children: /* @__PURE__ */ G(
|
|
2284
|
+
children: /* @__PURE__ */ G(U, { size: 12 })
|
|
2282
2285
|
})]
|
|
2283
2286
|
}, t)), /* @__PURE__ */ G("button", {
|
|
2284
2287
|
type: "button",
|
|
2285
2288
|
disabled: i,
|
|
2286
2289
|
onClick: () => s.current?.click(),
|
|
2287
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"),
|
|
2288
|
-
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2291
|
+
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
2289
2292
|
size: 18,
|
|
2290
2293
|
className: "animate-spin text-primary"
|
|
2291
2294
|
}), /* @__PURE__ */ K("span", {
|
|
2292
2295
|
className: "text-xs",
|
|
2293
2296
|
children: [a, "%"]
|
|
2294
|
-
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2297
|
+
})] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(H, { size: 18 }), /* @__PURE__ */ G("span", {
|
|
2295
2298
|
className: "text-xs",
|
|
2296
2299
|
children: "Add screenshot"
|
|
2297
2300
|
})] })
|
|
@@ -2497,13 +2500,13 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2497
2500
|
} finally {
|
|
2498
2501
|
v(!1);
|
|
2499
2502
|
}
|
|
2500
|
-
}, { 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";
|
|
2501
2504
|
return /* @__PURE__ */ K("div", {
|
|
2502
2505
|
className: "space-y-8 max-w-3xl",
|
|
2503
2506
|
children: [
|
|
2504
2507
|
t.status === "PUBLISHED" ? /* @__PURE__ */ K("div", {
|
|
2505
2508
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2506
|
-
children: [/* @__PURE__ */ G(
|
|
2509
|
+
children: [/* @__PURE__ */ G(de, {
|
|
2507
2510
|
size: 16,
|
|
2508
2511
|
className: "text-success mt-0.5 shrink-0"
|
|
2509
2512
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2520,11 +2523,11 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2520
2523
|
]
|
|
2521
2524
|
})]
|
|
2522
2525
|
})]
|
|
2523
|
-
}) :
|
|
2526
|
+
}) : ve ? /* @__PURE__ */ K("div", {
|
|
2524
2527
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2525
2528
|
children: [/* @__PURE__ */ K("div", {
|
|
2526
2529
|
className: "flex items-start gap-3",
|
|
2527
|
-
children: [/* @__PURE__ */ G(
|
|
2530
|
+
children: [/* @__PURE__ */ G(pe, {
|
|
2528
2531
|
size: 16,
|
|
2529
2532
|
className: "text-primary mt-0.5 shrink-0"
|
|
2530
2533
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2548,7 +2551,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2548
2551
|
type: "button",
|
|
2549
2552
|
onClick: s,
|
|
2550
2553
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2551
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(
|
|
2554
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(L, { size: 12 })]
|
|
2552
2555
|
})]
|
|
2553
2556
|
}) : /* @__PURE__ */ K("div", {
|
|
2554
2557
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
@@ -2589,7 +2592,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2589
2592
|
onChange: (e) => E("manifestDisplayName", e.target.value),
|
|
2590
2593
|
placeholder: "My Awesome Node"
|
|
2591
2594
|
}),
|
|
2592
|
-
|
|
2595
|
+
R && t.appType !== "WORKFLOW" && /* @__PURE__ */ G(ne, {
|
|
2593
2596
|
label: p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2594
2597
|
value: m.manifestJsonContent,
|
|
2595
2598
|
onChange: (e) => E("manifestJsonContent", e.target.value),
|
|
@@ -2597,7 +2600,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2597
2600
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2598
2601
|
hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2599
2602
|
}),
|
|
2600
|
-
|
|
2603
|
+
R && t.appType === "WORKFLOW" && /* @__PURE__ */ K("p", {
|
|
2601
2604
|
className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
|
|
2602
2605
|
children: [
|
|
2603
2606
|
"The Workflow Definition (JSON) is set per version. Go to the",
|
|
@@ -2635,8 +2638,8 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2635
2638
|
aspectClass: "aspect-square",
|
|
2636
2639
|
upload: j,
|
|
2637
2640
|
uploading: le,
|
|
2638
|
-
progress:
|
|
2639
|
-
error:
|
|
2641
|
+
progress: ue,
|
|
2642
|
+
error: I
|
|
2640
2643
|
})]
|
|
2641
2644
|
}),
|
|
2642
2645
|
/* @__PURE__ */ G(O, {
|
|
@@ -2664,10 +2667,10 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2664
2667
|
/* @__PURE__ */ G(Z, {
|
|
2665
2668
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2666
2669
|
onChange: (e) => E("screenshotsText", e.join("\n")),
|
|
2667
|
-
upload:
|
|
2668
|
-
uploading:
|
|
2669
|
-
progress:
|
|
2670
|
-
error:
|
|
2670
|
+
upload: me,
|
|
2671
|
+
uploading: he,
|
|
2672
|
+
progress: ge,
|
|
2673
|
+
error: _e
|
|
2671
2674
|
})
|
|
2672
2675
|
]
|
|
2673
2676
|
})
|
|
@@ -2724,7 +2727,7 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2724
2727
|
children: [
|
|
2725
2728
|
b === "success" && /* @__PURE__ */ K("div", {
|
|
2726
2729
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2727
|
-
children: [/* @__PURE__ */ G(
|
|
2730
|
+
children: [/* @__PURE__ */ G(de, {
|
|
2728
2731
|
size: 15,
|
|
2729
2732
|
className: "shrink-0"
|
|
2730
2733
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
@@ -2745,10 +2748,10 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2745
2748
|
disabled: g || !D || !w,
|
|
2746
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"),
|
|
2747
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",
|
|
2748
|
-
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2751
|
+
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(z, {
|
|
2749
2752
|
size: 16,
|
|
2750
2753
|
className: "animate-spin"
|
|
2751
|
-
}), 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")] })
|
|
2752
2755
|
}),
|
|
2753
2756
|
!D && /* @__PURE__ */ G("p", {
|
|
2754
2757
|
className: "text-xs text-text-secondary",
|
|
@@ -2758,13 +2761,13 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2758
2761
|
type: "button",
|
|
2759
2762
|
onClick: a,
|
|
2760
2763
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2761
|
-
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(
|
|
2764
|
+
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(fe, { size: 15 })]
|
|
2762
2765
|
}),
|
|
2763
2766
|
(!r || n > 0) && !i && o && /* @__PURE__ */ K("button", {
|
|
2764
2767
|
type: "button",
|
|
2765
2768
|
onClick: o,
|
|
2766
2769
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2767
|
-
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(
|
|
2770
|
+
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(fe, { size: 15 })]
|
|
2768
2771
|
})
|
|
2769
2772
|
]
|
|
2770
2773
|
})
|
|
@@ -2805,185 +2808,258 @@ var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2805
2808
|
target: "_blank",
|
|
2806
2809
|
rel: "noopener noreferrer",
|
|
2807
2810
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2808
|
-
children: [/* @__PURE__ */ G(
|
|
2809
|
-
}), ct =
|
|
2810
|
-
{
|
|
2811
|
-
id: "auth",
|
|
2811
|
+
children: [/* @__PURE__ */ G(L, { size: 14 }), e]
|
|
2812
|
+
}), ct = {
|
|
2813
|
+
auth: {
|
|
2812
2814
|
label: "Authentication",
|
|
2813
2815
|
description: "User identity and session management"
|
|
2814
2816
|
},
|
|
2815
|
-
{
|
|
2816
|
-
id: "billing",
|
|
2817
|
+
billing: {
|
|
2817
2818
|
label: "Billing",
|
|
2818
2819
|
description: "Billing accounts and subscriptions"
|
|
2819
2820
|
},
|
|
2820
|
-
{
|
|
2821
|
-
id: "files",
|
|
2821
|
+
files: {
|
|
2822
2822
|
label: "Files",
|
|
2823
2823
|
description: "File storage and management"
|
|
2824
2824
|
},
|
|
2825
|
-
{
|
|
2826
|
-
id: "tags",
|
|
2825
|
+
tags: {
|
|
2827
2826
|
label: "Tags",
|
|
2828
2827
|
description: "Tags and labels on resources"
|
|
2829
2828
|
},
|
|
2830
|
-
{
|
|
2831
|
-
id: "calendar",
|
|
2829
|
+
calendar: {
|
|
2832
2830
|
label: "Calendar",
|
|
2833
2831
|
description: "Events and scheduling"
|
|
2834
2832
|
},
|
|
2835
|
-
{
|
|
2836
|
-
id: "workflows",
|
|
2833
|
+
workflows: {
|
|
2837
2834
|
label: "Workflows",
|
|
2838
2835
|
description: "Automation workflows"
|
|
2839
2836
|
},
|
|
2840
|
-
{
|
|
2841
|
-
id: "channels",
|
|
2837
|
+
channels: {
|
|
2842
2838
|
label: "Channels",
|
|
2843
2839
|
description: "Messaging channels"
|
|
2844
2840
|
},
|
|
2845
|
-
{
|
|
2846
|
-
id: "notifications",
|
|
2841
|
+
notifications: {
|
|
2847
2842
|
label: "Notifications",
|
|
2848
2843
|
description: "Platform notifications"
|
|
2849
2844
|
},
|
|
2850
|
-
{
|
|
2851
|
-
id: "users",
|
|
2845
|
+
users: {
|
|
2852
2846
|
label: "Users & Members",
|
|
2853
2847
|
description: "Workspace members and profiles"
|
|
2854
2848
|
},
|
|
2855
|
-
{
|
|
2856
|
-
id: "workspaces",
|
|
2849
|
+
workspaces: {
|
|
2857
2850
|
label: "Workspaces",
|
|
2858
2851
|
description: "Workspace settings and metadata"
|
|
2859
2852
|
},
|
|
2860
|
-
{
|
|
2861
|
-
id: "content",
|
|
2853
|
+
content: {
|
|
2862
2854
|
label: "Content",
|
|
2863
2855
|
description: "Pages, documents, and content"
|
|
2864
2856
|
},
|
|
2865
|
-
{
|
|
2866
|
-
id: "analytics",
|
|
2857
|
+
analytics: {
|
|
2867
2858
|
label: "Analytics",
|
|
2868
2859
|
description: "Usage analytics and reporting"
|
|
2869
2860
|
},
|
|
2870
|
-
{
|
|
2871
|
-
id: "webhooks",
|
|
2861
|
+
webhooks: {
|
|
2872
2862
|
label: "Webhooks",
|
|
2873
2863
|
description: "Webhook subscriptions"
|
|
2874
2864
|
},
|
|
2875
|
-
{
|
|
2876
|
-
id: "rbac",
|
|
2865
|
+
rbac: {
|
|
2877
2866
|
label: "Roles & Permissions",
|
|
2878
2867
|
description: "Access control configuration"
|
|
2879
2868
|
}
|
|
2880
|
-
|
|
2881
|
-
function
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
for (let n of e.permissions) n
|
|
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
|
+
});
|
|
2877
|
+
return t;
|
|
2878
|
+
}
|
|
2879
|
+
function dt(e) {
|
|
2880
|
+
let t = [];
|
|
2881
|
+
for (let n of e) {
|
|
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
|
+
});
|
|
2889
|
+
}
|
|
2885
2890
|
return t;
|
|
2886
2891
|
}
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
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));
|
|
2896
|
+
}
|
|
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 ? {
|
|
2890
2908
|
...n,
|
|
2891
|
-
|
|
2892
|
-
}));
|
|
2893
|
-
},
|
|
2894
|
-
|
|
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);
|
|
2895
2921
|
try {
|
|
2896
|
-
|
|
2897
|
-
resource: e,
|
|
2898
|
-
level: t
|
|
2899
|
-
}));
|
|
2900
|
-
await c({ variables: {
|
|
2922
|
+
await h({ variables: {
|
|
2901
2923
|
id: e.id,
|
|
2902
2924
|
input: { manifest: {
|
|
2903
|
-
...
|
|
2904
|
-
permissions: r
|
|
2925
|
+
...n,
|
|
2926
|
+
permissions: r.map(({ resource: e, level: t }) => ({
|
|
2927
|
+
resource: e,
|
|
2928
|
+
level: t
|
|
2929
|
+
}))
|
|
2905
2930
|
} }
|
|
2906
|
-
} }),
|
|
2931
|
+
} }), m(!0);
|
|
2907
2932
|
} finally {
|
|
2908
|
-
|
|
2933
|
+
f(!1);
|
|
2909
2934
|
}
|
|
2910
|
-
}
|
|
2911
|
-
none: "No access",
|
|
2912
|
-
read: "Read",
|
|
2913
|
-
write: "Read & Write"
|
|
2914
|
-
}, f = [
|
|
2915
|
-
"none",
|
|
2916
|
-
"read",
|
|
2917
|
-
"write"
|
|
2918
|
-
];
|
|
2935
|
+
};
|
|
2919
2936
|
return /* @__PURE__ */ G(y, {
|
|
2920
2937
|
title: "Permissions",
|
|
2921
|
-
description: "
|
|
2938
|
+
description: "These are the permissions your app requests from users. Users see exactly this list when authorizing your app.",
|
|
2922
2939
|
children: /* @__PURE__ */ K("div", {
|
|
2923
2940
|
className: "space-y-4",
|
|
2924
2941
|
children: [
|
|
2925
|
-
/* @__PURE__ */
|
|
2926
|
-
className: "
|
|
2927
|
-
children:
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
className: "
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
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", {
|
|
2948
2971
|
className: "text-xs text-text-secondary",
|
|
2949
|
-
children: e.description
|
|
2950
|
-
})
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
type: "radio",
|
|
2955
|
-
name: `perm-${e.id}`,
|
|
2956
|
-
value: t,
|
|
2957
|
-
checked: n[e.id] === t,
|
|
2958
|
-
onChange: () => l(e.id, t),
|
|
2959
|
-
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"
|
|
2960
2977
|
})
|
|
2961
|
-
|
|
2962
|
-
},
|
|
2963
|
-
|
|
2964
|
-
|
|
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"]
|
|
2965
3041
|
}),
|
|
2966
3042
|
/* @__PURE__ */ K("div", {
|
|
2967
3043
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2968
|
-
children: [/* @__PURE__ */ G(
|
|
3044
|
+
children: [/* @__PURE__ */ G(_e, {
|
|
2969
3045
|
size: 14,
|
|
2970
3046
|
className: "flex-shrink-0 mt-0.5"
|
|
2971
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."] })]
|
|
2972
3048
|
}),
|
|
2973
3049
|
/* @__PURE__ */ K("div", {
|
|
2974
3050
|
className: "flex items-center justify-end gap-3",
|
|
2975
|
-
children: [
|
|
3051
|
+
children: [p && /* @__PURE__ */ K("span", {
|
|
2976
3052
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2977
|
-
children: [/* @__PURE__ */ G(
|
|
3053
|
+
children: [/* @__PURE__ */ G(de, { size: 14 }), "Saved"]
|
|
2978
3054
|
}), /* @__PURE__ */ K("button", {
|
|
2979
3055
|
type: "button",
|
|
2980
|
-
onClick: () => void
|
|
2981
|
-
disabled:
|
|
3056
|
+
onClick: () => void x(),
|
|
3057
|
+
disabled: d,
|
|
2982
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",
|
|
2983
|
-
children: [
|
|
3059
|
+
children: [d ? /* @__PURE__ */ G(z, {
|
|
2984
3060
|
size: 14,
|
|
2985
3061
|
className: "animate-spin"
|
|
2986
|
-
}) : /* @__PURE__ */ G(
|
|
3062
|
+
}) : /* @__PURE__ */ G(V, { size: 14 }), "Save Permissions"]
|
|
2987
3063
|
})]
|
|
2988
3064
|
})
|
|
2989
3065
|
]
|