@burdenoff/microfe-devportal 2026.1113.1 → 2026.1113.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/DevportalRoot.js +65 -119
- package/dist/devportal/DevportalRoot.js.map +1 -1
- package/dist/devportal/components/AppCard.js +4 -4
- package/dist/devportal/components/DeveloperSettingsHub.d.ts +6 -0
- package/dist/devportal/components/DeveloperSettingsHub.js +59 -0
- package/dist/devportal/components/DeveloperSettingsHub.js.map +1 -0
- package/dist/devportal/components/SectionNav.d.ts +1 -1
- package/dist/devportal/components/SectionNav.js +60 -36
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/pages/AnalyticsDashboardPage.js +186 -179
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +113 -111
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +80 -84
- package/dist/devportal/pages/AppLogsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +529 -504
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +68 -67
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +163 -166
- package/dist/devportal/pages/CreateApiKeyPage.js.map +1 -1
- package/dist/devportal/pages/CreateOAuthClientPage.js +134 -130
- package/dist/devportal/pages/CreateOAuthClientPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +11 -11
- package/dist/devportal/pages/DocumentationPage.js +100 -94
- package/dist/devportal/pages/DocumentationPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +379 -377
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/InvitationDecisionPage.js +83 -79
- package/dist/devportal/pages/InvitationDecisionPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientDetailPage.js +76 -76
- package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
- package/dist/devportal/pages/OAuthClientsPage.js +126 -124
- package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +19 -19
- package/dist/devportal/pages/OrganizationMembersPage.js +223 -204
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/ResourcesPage.d.ts +6 -0
- package/dist/devportal/pages/ResourcesPage.js +171 -155
- package/dist/devportal/pages/ResourcesPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +13 -13
- package/dist/devportal/pages/SellerItemsPage.js +4 -4
- package/dist/devportal/pages/SettingsPage.js +330 -315
- package/dist/devportal/pages/SettingsPage.js.map +1 -1
- package/dist/devportal/pages/SetupPage.js +5 -5
- package/dist/devportal/pages/WebhookDetailPage.js +6 -6
- package/dist/devportal/pages/WebhooksPage.js +39 -39
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/utils/appDetailTabs.d.ts +73 -0
- package/dist/devportal/utils/appDetailTabs.js +62 -0
- package/dist/devportal/utils/appDetailTabs.js.map +1 -0
- package/dist/devportal/utils/developerNav.d.ts +39 -0
- package/dist/devportal/utils/developerNav.js +304 -0
- package/dist/devportal/utils/developerNav.js.map +1 -0
- package/package.json +2 -2
|
@@ -10,25 +10,27 @@ import { LoadingState as h } from "../components/LoadingState.js";
|
|
|
10
10
|
import { ConfirmDialog as g } from "../components/ConfirmDialog.js";
|
|
11
11
|
import { SelectionCheckbox as _ } from "../components/SelectionCheckbox.js";
|
|
12
12
|
import { GrantDelegationModal as v } from "../components/GrantDelegationModal.js";
|
|
13
|
-
import { useDevportal as y } from "../providers/DevportalProvider.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
13
|
+
import { useDevportal as y, useIsFluidgridsVariant as b } from "../providers/DevportalProvider.js";
|
|
14
|
+
import { useTr as x } from "../utils/i18n.js";
|
|
15
|
+
import { DEACTIVATE_COPY as S, layoutAppDetailTabs as C, resolveTabParam as w, tabHref as T } from "../utils/appDetailTabs.js";
|
|
16
|
+
import { useAssetUpload as E } from "../hooks/usePackageUpload.js";
|
|
17
|
+
import { nativeNotify as D } from "../../utils/nativeBridge.js";
|
|
18
|
+
import { submitForReview as O } from "../utils/submitForReview.js";
|
|
19
|
+
import { DEVPORTAL_PERMISSIONS as ee } from "../constants/permissions.js";
|
|
20
|
+
import { DEVELOPER_LINKS as te } from "../constants/developerLinks.js";
|
|
21
|
+
import { useDevportalPermission as ne } from "../hooks/usePermission.js";
|
|
22
|
+
import { cn as k } from "../utils/cn.js";
|
|
23
|
+
import { APP_TYPE_LABELS as A } from "../utils/constants.js";
|
|
24
|
+
import { useCurrentUserDelegationsQuery as re, useDeactivateApplicationMutation as ie, useGetApplicationAnalyticsQuery as ae, useGetApplicationQuery as oe, useGetApplicationVersionsQuery as se, useGetOrganizationQuery as ce, useGetWebhooksQuery as j, useGetWorkspaceInstallationQuery as le, useInstallApplicationMutation as ue, usePublishApplicationVersionMutation as de, useRevokeDelegationMutation as fe, useRotateAppSecretMutation as pe, useShareWorkflowMutation as me, useSubmitApplicationMutation as he, useUninstallApplicationMutation as ge, useUnshareWorkflowMutation as _e, useUpdateApplicationMutation as ve } from "../../generated/global-operations.js";
|
|
25
|
+
import { useCallback as M, useEffect as ye, useMemo as N, useRef as be, useState as P } from "react";
|
|
26
|
+
import { Markdown as xe } from "@burdenoff/fe-libs/shared/components";
|
|
27
|
+
import { AlertCircle as Se, AppWindow as Ce, BarChart3 as we, Check as F, CheckCircle as Te, ChevronRight as Ee, CircleDollarSign as I, Clock as De, Copy as L, Edit as Oe, ExternalLink as R, FlaskConical as ke, Gift as Ae, Info as je, Key as Me, Link as Ne, Loader2 as z, Lock as Pe, MoreHorizontal as Fe, Package as Ie, Plus as B, Power as Le, RefreshCw as Re, SendHorizontal as ze, Shield as V, Store as Be, TrendingUp as Ve, Upload as He, Users as Ue, Wallet as We, Webhook as Ge, X as Ke, XCircle as qe } from "lucide-react";
|
|
28
|
+
import { useParams as Je, useSearchParams as Ye } from "react-router";
|
|
27
29
|
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
30
|
+
import { CTAOverflowMenu as Xe, EmphasisPanel as Ze, GlassCard as Qe, PageTabs as $e } from "@burdenoff/fe-libs/ui";
|
|
28
31
|
import { useI18n as G } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
29
|
-
import { CTAOverflowMenu as Ue, EmphasisPanel as We, GlassCard as Ge } from "@burdenoff/fe-libs/ui";
|
|
30
32
|
// src/devportal/pages/ApplicationDetailPage.tsx
|
|
31
|
-
function
|
|
33
|
+
function et(e) {
|
|
32
34
|
return e ? {
|
|
33
35
|
id: e.id,
|
|
34
36
|
name: e.name,
|
|
@@ -82,7 +84,7 @@ function Ke(e) {
|
|
|
82
84
|
updatedAt: e.updatedAt
|
|
83
85
|
} : null;
|
|
84
86
|
}
|
|
85
|
-
function
|
|
87
|
+
function K(e) {
|
|
86
88
|
return {
|
|
87
89
|
id: e.id,
|
|
88
90
|
applicationId: e.applicationId,
|
|
@@ -106,7 +108,7 @@ function qe(e) {
|
|
|
106
108
|
updatedAt: e.updatedAt
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
|
-
function
|
|
111
|
+
function tt(e) {
|
|
110
112
|
return {
|
|
111
113
|
id: e.id,
|
|
112
114
|
applicationId: e.applicationId,
|
|
@@ -122,7 +124,7 @@ function Je(e) {
|
|
|
122
124
|
createdAt: e.createdAt
|
|
123
125
|
};
|
|
124
126
|
}
|
|
125
|
-
function
|
|
127
|
+
function nt(e) {
|
|
126
128
|
return {
|
|
127
129
|
id: e.id,
|
|
128
130
|
appId: e.appId,
|
|
@@ -144,165 +146,172 @@ function Ye(e) {
|
|
|
144
146
|
revokedBy: e.revokedBy || void 0
|
|
145
147
|
};
|
|
146
148
|
}
|
|
147
|
-
var
|
|
149
|
+
var rt = [
|
|
148
150
|
{
|
|
149
151
|
id: "overview",
|
|
150
152
|
label: "Overview",
|
|
151
|
-
icon:
|
|
153
|
+
icon: Ce
|
|
152
154
|
},
|
|
153
155
|
{
|
|
154
156
|
id: "analytics",
|
|
155
157
|
label: "Analytics",
|
|
156
|
-
icon:
|
|
158
|
+
icon: we
|
|
157
159
|
},
|
|
158
160
|
{
|
|
159
161
|
id: "store-listing",
|
|
160
162
|
label: "Store Listing",
|
|
161
|
-
icon:
|
|
163
|
+
icon: Be
|
|
162
164
|
},
|
|
163
165
|
{
|
|
164
166
|
id: "versions",
|
|
165
167
|
label: "Versions",
|
|
166
|
-
icon:
|
|
168
|
+
icon: Ie
|
|
167
169
|
},
|
|
168
170
|
{
|
|
169
171
|
id: "pricing",
|
|
170
172
|
label: "Pricing",
|
|
171
|
-
icon:
|
|
173
|
+
icon: I
|
|
172
174
|
},
|
|
173
175
|
{
|
|
174
176
|
id: "permissions",
|
|
175
177
|
label: "Permissions",
|
|
176
|
-
icon:
|
|
178
|
+
icon: V
|
|
177
179
|
},
|
|
178
180
|
{
|
|
179
181
|
id: "webhooks",
|
|
180
182
|
label: "Webhooks",
|
|
181
|
-
icon:
|
|
183
|
+
icon: Ge
|
|
182
184
|
},
|
|
183
185
|
{
|
|
184
186
|
id: "delegations",
|
|
185
187
|
label: "Delegations",
|
|
186
|
-
icon:
|
|
188
|
+
icon: Ue
|
|
187
189
|
},
|
|
188
190
|
{
|
|
189
191
|
id: "playground",
|
|
190
192
|
label: "API Playground",
|
|
191
|
-
icon:
|
|
193
|
+
icon: R
|
|
192
194
|
},
|
|
193
195
|
{
|
|
194
196
|
id: "oauth",
|
|
195
197
|
label: "OAuth",
|
|
196
|
-
icon:
|
|
198
|
+
icon: Pe
|
|
197
199
|
},
|
|
198
200
|
{
|
|
199
201
|
id: "api-keys",
|
|
200
202
|
label: "API Keys",
|
|
201
|
-
icon:
|
|
203
|
+
icon: Me
|
|
202
204
|
}
|
|
203
|
-
],
|
|
205
|
+
], it = {
|
|
204
206
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
205
207
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
206
208
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
207
|
-
},
|
|
209
|
+
}, at = ({ message: e = "Loading..." }) => /* @__PURE__ */ W("div", {
|
|
208
210
|
className: "flex items-center justify-center gap-3 py-12",
|
|
209
|
-
children: [/* @__PURE__ */ U(
|
|
211
|
+
children: [/* @__PURE__ */ U(z, {
|
|
210
212
|
size: 20,
|
|
211
213
|
className: "animate-spin text-text-secondary"
|
|
212
214
|
}), /* @__PURE__ */ U("p", {
|
|
213
215
|
className: "text-sm text-text-secondary",
|
|
214
216
|
children: e
|
|
215
217
|
})]
|
|
216
|
-
}),
|
|
218
|
+
}), ot = ({ message: e }) => /* @__PURE__ */ W("div", {
|
|
217
219
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
218
|
-
children: [/* @__PURE__ */ U(
|
|
220
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
219
221
|
size: 32,
|
|
220
222
|
className: "text-status-error-text"
|
|
221
223
|
}), /* @__PURE__ */ U("p", {
|
|
222
224
|
className: "text-sm text-text-secondary",
|
|
223
225
|
children: e
|
|
224
226
|
})]
|
|
225
|
-
}),
|
|
227
|
+
}), st = () => {
|
|
226
228
|
let { navigate: t, basePath: n, workspaceId: i } = y(), { t: a } = G(), o = (e, t) => {
|
|
227
229
|
let n = a(e);
|
|
228
230
|
return n === e ? t : n;
|
|
229
|
-
}, { allowed: s } =
|
|
231
|
+
}, { allowed: s } = ne(ee.APP_UPDATE), { allowed: d } = ne(ee.APP_DELETE), { appId: f } = Je(), _ = b(), E = x(), [te, re] = Ye(), [ae, se] = P("overview"), j = (e) => {
|
|
232
|
+
if (!_) {
|
|
233
|
+
se(e);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
let t = new URLSearchParams(te);
|
|
237
|
+
t.set("tab", e), re(t);
|
|
238
|
+
}, [fe, me] = P(!1), [_e, ve] = P(!1), [ye, N] = P(null), [be, xe] = P(null), [we, I] = P(!1), { data: L, loading: R, error: Ae, refetch: je } = oe({
|
|
230
239
|
variables: { id: f },
|
|
231
240
|
skip: !f
|
|
232
|
-
}), [
|
|
241
|
+
}), [Me, { loading: Ne }] = pe(), [Pe, { loading: Fe }] = ie(), [Ie, { loading: B }] = he(), [V] = de(), [Ve, { loading: He }] = ue(), [Ue, { loading: We }] = ge(), { data: Ge, refetch: Ke } = le({
|
|
233
242
|
variables: {
|
|
234
243
|
applicationId: f,
|
|
235
244
|
workspaceId: i ?? void 0
|
|
236
245
|
},
|
|
237
246
|
skip: !i || !f,
|
|
238
247
|
fetchPolicy: "cache-and-network"
|
|
239
|
-
}),
|
|
240
|
-
variables: { id:
|
|
241
|
-
skip: !
|
|
248
|
+
}), Ze = Ge?.appInstallations?.edges?.[0]?.node ?? null, { data: Qe } = ce({
|
|
249
|
+
variables: { id: L?.application?.developerOrganizationId ?? "" },
|
|
250
|
+
skip: !L?.application?.developerOrganizationId,
|
|
242
251
|
fetchPolicy: "cache-first"
|
|
243
|
-
}),
|
|
252
|
+
}), K = M((e) => {
|
|
244
253
|
t?.(`${n}${e}`);
|
|
245
|
-
}, [t, n]),
|
|
246
|
-
let e =
|
|
254
|
+
}, [t, n]), tt = M(async () => {
|
|
255
|
+
let e = L?.application?.appId;
|
|
247
256
|
if (e) try {
|
|
248
|
-
let t = (await
|
|
249
|
-
t &&
|
|
257
|
+
let t = (await Me({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
258
|
+
t && N(t), me(!1);
|
|
250
259
|
} catch {}
|
|
251
|
-
}, [
|
|
260
|
+
}, [L?.application?.appId, Me]), nt = M(async () => {
|
|
252
261
|
if (f) try {
|
|
253
|
-
await
|
|
262
|
+
await Pe({ variables: { id: f } }), ve(!1), K("/apps");
|
|
254
263
|
} catch {}
|
|
255
264
|
}, [
|
|
256
265
|
f,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
]),
|
|
266
|
+
Pe,
|
|
267
|
+
K
|
|
268
|
+
]), it = M(async (e) => {
|
|
260
269
|
if (f && i) try {
|
|
261
|
-
await
|
|
270
|
+
await Ve({ variables: { input: {
|
|
262
271
|
applicationId: f,
|
|
263
272
|
scope: "WORKSPACE",
|
|
264
273
|
workspaceId: i,
|
|
265
274
|
autoUpdate: !1,
|
|
266
275
|
...e ? { version: e } : {}
|
|
267
|
-
} } }),
|
|
276
|
+
} } }), Ke(), D("success");
|
|
268
277
|
} catch (e) {
|
|
269
|
-
console.error("[DevPortal] Test in Workspace failed:", e),
|
|
278
|
+
console.error("[DevPortal] Test in Workspace failed:", e), D("error");
|
|
270
279
|
}
|
|
271
280
|
}, [
|
|
272
281
|
f,
|
|
273
282
|
i,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
]), [
|
|
283
|
+
Ve,
|
|
284
|
+
Ke
|
|
285
|
+
]), [at, ot] = P(!1), [st, ut] = P(""), dt = M(async (e) => {
|
|
277
286
|
try {
|
|
278
|
-
await
|
|
287
|
+
await Ue({ variables: { id: e } }), Ke(), D("success");
|
|
279
288
|
} catch {
|
|
280
|
-
|
|
289
|
+
D("error");
|
|
281
290
|
}
|
|
282
|
-
}, [
|
|
291
|
+
}, [Ue, Ke]), ft = M(async () => {
|
|
283
292
|
if (!f) return;
|
|
284
|
-
|
|
285
|
-
let e = await
|
|
286
|
-
publishVersion: (e) =>
|
|
287
|
-
submitApplication: () =>
|
|
293
|
+
xe(null);
|
|
294
|
+
let e = await O((L?.application?.versions?.edges ?? []).map((e) => e.node), {
|
|
295
|
+
publishVersion: (e) => V({ variables: { id: e } }),
|
|
296
|
+
submitApplication: () => Ie({ variables: { id: f } })
|
|
288
297
|
});
|
|
289
|
-
e.ok ?
|
|
298
|
+
e.ok ? D("success") : (xe(e.message), D("error")), je();
|
|
290
299
|
}, [
|
|
291
300
|
f,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
301
|
+
L?.application?.versions?.edges,
|
|
302
|
+
V,
|
|
303
|
+
Ie,
|
|
304
|
+
je
|
|
296
305
|
]);
|
|
297
|
-
if (
|
|
298
|
-
if (
|
|
306
|
+
if (R && !L) return /* @__PURE__ */ U(h, { message: o("devportal.loadingApplication", "Loading application...") });
|
|
307
|
+
if (Ae) return /* @__PURE__ */ U(e, {
|
|
299
308
|
title: o("devportal.error", "Error"),
|
|
300
309
|
backLink: `${n}/apps`,
|
|
301
310
|
backLabel: o("devportal.backToApplications", "Back to Applications"),
|
|
302
311
|
children: /* @__PURE__ */ W("div", {
|
|
303
312
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
304
313
|
children: [
|
|
305
|
-
/* @__PURE__ */ U(
|
|
314
|
+
/* @__PURE__ */ U(Se, {
|
|
306
315
|
size: 48,
|
|
307
316
|
className: "text-status-error-text mb-4"
|
|
308
317
|
}),
|
|
@@ -312,130 +321,133 @@ var Xe = [
|
|
|
312
321
|
}),
|
|
313
322
|
/* @__PURE__ */ U("p", {
|
|
314
323
|
className: "text-sm text-text-secondary",
|
|
315
|
-
children:
|
|
324
|
+
children: Ae.message
|
|
316
325
|
})
|
|
317
326
|
]
|
|
318
327
|
})
|
|
319
328
|
});
|
|
320
|
-
let
|
|
321
|
-
if (!
|
|
329
|
+
let q = et(L?.application);
|
|
330
|
+
if (!q) return /* @__PURE__ */ U(e, {
|
|
322
331
|
title: o("devportal.notFound", "Not Found"),
|
|
323
332
|
backLink: `${n}/apps`,
|
|
324
333
|
backLabel: o("devportal.backToApplications", "Back to Applications"),
|
|
325
334
|
children: /* @__PURE__ */ U(m, {
|
|
326
335
|
illustration: "empty-generic",
|
|
327
|
-
icon: /* @__PURE__ */ U(
|
|
336
|
+
icon: /* @__PURE__ */ U(Ce, { size: 48 }),
|
|
328
337
|
title: o("devportal.applicationNotFound", "Application not found"),
|
|
329
338
|
description: o("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
330
339
|
})
|
|
331
340
|
});
|
|
332
|
-
let
|
|
341
|
+
let J = [
|
|
333
342
|
"NODE",
|
|
334
343
|
"WORKFLOW",
|
|
335
344
|
"PARSER",
|
|
336
345
|
"WIDGET",
|
|
337
346
|
"DASHBOARD"
|
|
338
|
-
].includes(
|
|
339
|
-
|
|
347
|
+
].includes(q.appType), Y = q.appType === "API_INTEGRATION", yt = C(rt.map((e) => e.id), {
|
|
348
|
+
isPackageApp: J,
|
|
349
|
+
isIntegrationApp: Y
|
|
350
|
+
}, _), X = _ ? w(te.get("tab"), yt.ordered) : ae, xt = L?.application?.versions?.totalCount ?? 0, St = q.appType === "NODE", Ct = L?.application?.versions?.edges ?? [], wt = Ct.find((e) => e.node.isLatest)?.node ?? Ct[0]?.node ?? null, Z = (wt?.metadata ?? {}).sandboxBuildStatus, Q = St && Z !== "READY", $ = Q ? Z === "FAILED" || Z === "DISPATCH_FAILED" ? o("devportal.testInWorkspaceBuildFailed", "Test in Workspace (sandbox build failed)") : o("devportal.testInWorkspaceBuilding", "Test in Workspace (building sandbox image…)") : o("devportal.testInWorkspace", "Test in Workspace"), Et = q.pricingType === "PAID", Dt = Qe?.developerOrganization, Ot = Dt?.platformFeeRate ?? .3, kt = !!Dt?.billingAccountId, At = q.pricingDetails ?? {}, Mt = q.pricingType === "FREE" || q.pricingType === "PAID" && typeof At.price == "number" && At.price > 0, Nt = !!q.description?.trim() && !!q.category && !!q.iconUrl && (q.visibility === "PUBLIC" || q.visibility === "UNLISTED") && (!J && !Y || xt > 0) && (!Et || kt) && Mt, Pt = Nt && q.status !== "PUBLISHED" && q.status !== "SUBMITTED" && q.status !== "INACTIVE" && q.status !== "REVOKED", Ft = [
|
|
351
|
+
...J ? [] : [{
|
|
340
352
|
label: o("devportal.rotateSecret", "Rotate Secret"),
|
|
341
|
-
icon: /* @__PURE__ */ U(
|
|
342
|
-
disabled: !
|
|
343
|
-
onSelect: () =>
|
|
353
|
+
icon: /* @__PURE__ */ U(Re, { size: 16 }),
|
|
354
|
+
disabled: !q.appId,
|
|
355
|
+
onSelect: () => me(!0)
|
|
344
356
|
}],
|
|
345
|
-
...!
|
|
357
|
+
...!J || St ? Ze ? [{
|
|
346
358
|
label: o("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
347
|
-
icon: /* @__PURE__ */ U(
|
|
348
|
-
disabled:
|
|
349
|
-
onSelect: () => void Ze
|
|
359
|
+
icon: /* @__PURE__ */ U(qe, { size: 16 }),
|
|
360
|
+
disabled: We || !i,
|
|
361
|
+
onSelect: () => void dt(Ze.id)
|
|
350
362
|
}] : [{
|
|
351
|
-
label:
|
|
352
|
-
icon: /* @__PURE__ */ U(
|
|
353
|
-
disabled:
|
|
363
|
+
label: $,
|
|
364
|
+
icon: /* @__PURE__ */ U(ke, { size: 16 }),
|
|
365
|
+
disabled: He || !i || Q,
|
|
354
366
|
onSelect: () => {
|
|
355
|
-
|
|
367
|
+
Ct.length <= 1 ? it(wt?.version) : (ut(wt?.version ?? ""), ot(!0));
|
|
356
368
|
}
|
|
357
369
|
}] : [],
|
|
358
370
|
{
|
|
359
|
-
label: o("devportal.deactivate", "Deactivate"),
|
|
360
|
-
icon: /* @__PURE__ */ U(
|
|
371
|
+
label: _ ? E(S.action.key, S.action.fallback) : o("devportal.deactivate", "Deactivate"),
|
|
372
|
+
icon: /* @__PURE__ */ U(Le, { size: 16 }),
|
|
361
373
|
intent: "destructive",
|
|
362
374
|
disabled: !d,
|
|
363
|
-
onSelect: () =>
|
|
375
|
+
onSelect: () => ve(!0)
|
|
364
376
|
}
|
|
365
377
|
];
|
|
366
378
|
return /* @__PURE__ */ W(e, {
|
|
367
|
-
title:
|
|
368
|
-
description:
|
|
379
|
+
title: q.name,
|
|
380
|
+
description: q.shortDescription,
|
|
369
381
|
purpose: o("devportal.appDetailPurpose", "Everything about this application in one place — its credentials, the permissions and webhooks it uses, its analytics, and its store listing. Use the tabs to configure each area, then edit or publish when it is ready."),
|
|
370
382
|
backLink: `${n}/apps`,
|
|
371
383
|
backLabel: o("devportal.backToApplications", "Back to Applications"),
|
|
372
384
|
actions: /* @__PURE__ */ W("div", {
|
|
373
385
|
className: "flex items-center gap-2",
|
|
374
|
-
children: [
|
|
386
|
+
children: [q.status === "SUBMITTED" ? /* @__PURE__ */ W("div", {
|
|
375
387
|
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",
|
|
376
|
-
children: [/* @__PURE__ */ U(
|
|
377
|
-
}) :
|
|
388
|
+
children: [/* @__PURE__ */ U(De, { size: 13 }), o("devportal.underReview", "Under Review")]
|
|
389
|
+
}) : q.status !== "PUBLISHED" && q.status !== "INACTIVE" && q.status !== "REVOKED" ? /* @__PURE__ */ U("button", {
|
|
378
390
|
type: "button",
|
|
379
|
-
onClick: () => void
|
|
380
|
-
disabled: !
|
|
381
|
-
title:
|
|
382
|
-
!
|
|
383
|
-
!
|
|
384
|
-
!
|
|
385
|
-
(
|
|
386
|
-
|
|
387
|
-
!
|
|
388
|
-
|
|
391
|
+
onClick: () => void ft(),
|
|
392
|
+
disabled: !Pt || B,
|
|
393
|
+
title: Nt ? void 0 : [
|
|
394
|
+
!q.description?.trim() && "Add full description",
|
|
395
|
+
!q.category && "Select a category",
|
|
396
|
+
!q.iconUrl && "Upload an app icon",
|
|
397
|
+
(q.visibility === "PRIVATE" || q.visibility === "INTERNAL") && "Set visibility to Public (marketplace) or Unlisted (link sharing) — Private and Internal cannot be submitted for review",
|
|
398
|
+
J && xt === 0 && "Upload at least one version",
|
|
399
|
+
!Mt && "Set pricing (choose Free or Paid in the Pricing tab)",
|
|
400
|
+
Et && !kt && "Link a billing account to receive payments"
|
|
389
401
|
].filter(Boolean).join(" · "),
|
|
390
|
-
className:
|
|
391
|
-
children:
|
|
402
|
+
className: k("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", Pt && !B ? "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"),
|
|
403
|
+
children: B ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(z, {
|
|
392
404
|
size: 15,
|
|
393
405
|
className: "animate-spin"
|
|
394
|
-
}), o("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
395
|
-
}) : null, /* @__PURE__ */ U(
|
|
406
|
+
}), o("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(ze, { size: 15 }), o("devportal.submitForReview", "Submit for Review")] })
|
|
407
|
+
}) : null, /* @__PURE__ */ U(Xe, {
|
|
396
408
|
primary: {
|
|
397
409
|
label: o("devportal.editApp", "Edit App"),
|
|
398
|
-
icon: /* @__PURE__ */ U(
|
|
410
|
+
icon: /* @__PURE__ */ U(Oe, { size: 16 }),
|
|
399
411
|
disabled: !s,
|
|
400
|
-
onSelect: () =>
|
|
412
|
+
onSelect: () => K(`/apps/${q.id}/edit`)
|
|
401
413
|
},
|
|
402
|
-
actions:
|
|
414
|
+
actions: Ft
|
|
403
415
|
})]
|
|
404
416
|
}),
|
|
405
417
|
children: [
|
|
406
|
-
|
|
418
|
+
ye && /* @__PURE__ */ U(p, {
|
|
407
419
|
title: o("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
408
|
-
secret:
|
|
420
|
+
secret: ye,
|
|
409
421
|
description: o("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
410
|
-
onDismiss: () =>
|
|
422
|
+
onDismiss: () => N(null)
|
|
411
423
|
}),
|
|
412
424
|
/* @__PURE__ */ W("div", {
|
|
413
425
|
className: "flex flex-wrap items-center gap-2",
|
|
414
426
|
children: [
|
|
415
427
|
/* @__PURE__ */ U(l, {
|
|
416
|
-
status:
|
|
428
|
+
status: q.status,
|
|
417
429
|
type: "app"
|
|
418
430
|
}),
|
|
419
431
|
/* @__PURE__ */ U("span", {
|
|
420
|
-
title:
|
|
432
|
+
title: q.visibility === "PUBLIC" ? "Public — discoverable in the marketplace. Requires review approval before going live." : q.visibility === "UNLISTED" ? "Unlisted — not in the store, but accessible via a direct share link. You can still submit for marketplace review." : q.visibility === "INTERNAL" ? "Internal — visible to all members of your developer organization, but not to anyone outside." : "Private — only you (the creator) can see this. Other org members cannot access it.",
|
|
421
433
|
children: /* @__PURE__ */ U(l, {
|
|
422
|
-
status:
|
|
434
|
+
status: q.visibility,
|
|
423
435
|
type: "app"
|
|
424
436
|
})
|
|
425
437
|
}),
|
|
426
|
-
|
|
427
|
-
|
|
438
|
+
q.isVerified && /* @__PURE__ */ U(u, { verified: !0 }),
|
|
439
|
+
q.isFeatured && /* @__PURE__ */ U(c, {}),
|
|
428
440
|
/* @__PURE__ */ U("span", {
|
|
429
441
|
className: "text-sm text-text-secondary",
|
|
430
|
-
children:
|
|
442
|
+
children: A[q.appType] || q.appType
|
|
431
443
|
})
|
|
432
444
|
]
|
|
433
445
|
}),
|
|
434
|
-
|
|
446
|
+
be && q.status !== "SUBMITTED" && /* @__PURE__ */ W("div", {
|
|
435
447
|
role: "alert",
|
|
436
448
|
"data-testid": "devportal-submit-error",
|
|
437
449
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
438
|
-
children: [/* @__PURE__ */ U(
|
|
450
|
+
children: [/* @__PURE__ */ U(qe, {
|
|
439
451
|
size: 18,
|
|
440
452
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
441
453
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -445,13 +457,13 @@ var Xe = [
|
|
|
445
457
|
children: o("devportal.submitFailed", "Submission failed")
|
|
446
458
|
}), /* @__PURE__ */ U("p", {
|
|
447
459
|
className: "mt-0.5 text-text-secondary",
|
|
448
|
-
children:
|
|
460
|
+
children: be
|
|
449
461
|
})]
|
|
450
462
|
})]
|
|
451
463
|
}),
|
|
452
|
-
|
|
464
|
+
q.status === "SUBMITTED" && /* @__PURE__ */ W("div", {
|
|
453
465
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
454
|
-
children: [/* @__PURE__ */ U(
|
|
466
|
+
children: [/* @__PURE__ */ U(De, {
|
|
455
467
|
size: 18,
|
|
456
468
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
457
469
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -461,20 +473,20 @@ var Xe = [
|
|
|
461
473
|
children: o("devportal.underReview", "Under Review")
|
|
462
474
|
}), /* @__PURE__ */ W("p", {
|
|
463
475
|
className: "mt-0.5 text-text-secondary",
|
|
464
|
-
children: [o("devportal.underReviewDesc", "Your submission is being reviewed by our team. You'll be notified of the outcome."),
|
|
476
|
+
children: [o("devportal.underReviewDesc", "Your submission is being reviewed by our team. You'll be notified of the outcome."), q.submittedAt && /* @__PURE__ */ W("span", {
|
|
465
477
|
className: "ml-1",
|
|
466
478
|
children: [
|
|
467
479
|
"Submitted ",
|
|
468
|
-
new Date(
|
|
480
|
+
new Date(q.submittedAt).toLocaleDateString(),
|
|
469
481
|
"."
|
|
470
482
|
]
|
|
471
483
|
})]
|
|
472
484
|
})]
|
|
473
485
|
})]
|
|
474
486
|
}),
|
|
475
|
-
|
|
487
|
+
q.status === "REJECTED" && /* @__PURE__ */ W("div", {
|
|
476
488
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
477
|
-
children: [/* @__PURE__ */ U(
|
|
489
|
+
children: [/* @__PURE__ */ U(qe, {
|
|
478
490
|
size: 18,
|
|
479
491
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
480
492
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -486,20 +498,20 @@ var Xe = [
|
|
|
486
498
|
}),
|
|
487
499
|
/* @__PURE__ */ U("p", {
|
|
488
500
|
className: "mt-0.5 text-text-secondary",
|
|
489
|
-
children:
|
|
501
|
+
children: q.reviewNotes || o("devportal.reviewRejectedDesc", "Your submission was not approved. Please review the feedback, update your app, and re-submit.")
|
|
490
502
|
}),
|
|
491
503
|
/* @__PURE__ */ U("button", {
|
|
492
504
|
type: "button",
|
|
493
|
-
onClick: () =>
|
|
505
|
+
onClick: () => K(`/apps/${q.id}/edit`),
|
|
494
506
|
className: "mt-2 inline-flex items-center gap-1 text-xs font-medium text-primary underline",
|
|
495
507
|
children: o("devportal.editAndResubmit", "Edit app and re-submit →")
|
|
496
508
|
})
|
|
497
509
|
]
|
|
498
510
|
})]
|
|
499
511
|
}),
|
|
500
|
-
|
|
512
|
+
q.status === "PUBLISHED" && /* @__PURE__ */ W("div", {
|
|
501
513
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
502
|
-
children: [/* @__PURE__ */ U(
|
|
514
|
+
children: [/* @__PURE__ */ U(Te, {
|
|
503
515
|
size: 18,
|
|
504
516
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
505
517
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -513,9 +525,9 @@ var Xe = [
|
|
|
513
525
|
})]
|
|
514
526
|
})]
|
|
515
527
|
}),
|
|
516
|
-
|
|
528
|
+
q.status === "UNLISTED" && /* @__PURE__ */ W("div", {
|
|
517
529
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
518
|
-
children: [/* @__PURE__ */ U(
|
|
530
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
519
531
|
size: 18,
|
|
520
532
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
521
533
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -529,69 +541,69 @@ var Xe = [
|
|
|
529
541
|
className: "mt-0.5 text-text-secondary",
|
|
530
542
|
children: o("devportal.delistedFromStoreDesc", "Your app has been removed from the marketplace and is no longer visible to new users. Existing installs continue to work.")
|
|
531
543
|
}),
|
|
532
|
-
|
|
544
|
+
q.reviewNotes && /* @__PURE__ */ W("p", {
|
|
533
545
|
className: "mt-2 rounded-md bg-status-warning-bg px-3 py-2 font-mono text-xs text-status-warning-text",
|
|
534
546
|
children: [
|
|
535
547
|
o("devportal.delistReason", "Reason"),
|
|
536
548
|
": ",
|
|
537
|
-
|
|
549
|
+
q.reviewNotes
|
|
538
550
|
]
|
|
539
551
|
})
|
|
540
552
|
]
|
|
541
553
|
})]
|
|
542
554
|
}),
|
|
543
|
-
(
|
|
544
|
-
let e = !!
|
|
545
|
-
!
|
|
546
|
-
!
|
|
547
|
-
!
|
|
548
|
-
(
|
|
555
|
+
(q.status === "DRAFT" || q.status === "REJECTED") && !Nt && (() => {
|
|
556
|
+
let e = !!q.description?.trim() && !!q.category && !!q.iconUrl && (q.visibility === "PUBLIC" || q.visibility === "UNLISTED"), t = !J && !Y || xt > 0, n = [
|
|
557
|
+
!q.description?.trim() && "Add a full description",
|
|
558
|
+
!q.category && "Select a category",
|
|
559
|
+
!q.iconUrl && "Upload an app icon",
|
|
560
|
+
(q.visibility === "PRIVATE" || q.visibility === "INTERNAL") && "Set to Public (marketplace) or Unlisted (share via link) — Private and Internal block review submission"
|
|
549
561
|
].filter(Boolean), r = [
|
|
550
562
|
{
|
|
551
563
|
id: "store",
|
|
552
564
|
label: o("devportal.setupStoreListingStep", "Complete Store Listing"),
|
|
553
565
|
hint: e ? o("devportal.done", "Done") : n.join(" · "),
|
|
554
566
|
done: e,
|
|
555
|
-
onClick: () =>
|
|
567
|
+
onClick: () => j("store-listing")
|
|
556
568
|
},
|
|
557
|
-
...
|
|
569
|
+
...J ? [{
|
|
558
570
|
id: "version",
|
|
559
571
|
label: o("devportal.setupVersionStep", "Upload a Version"),
|
|
560
|
-
hint: t ? o("devportal.done", "Done") :
|
|
572
|
+
hint: t ? o("devportal.done", "Done") : q.appType === "NODE" ? o("devportal.uploadVersionHint", "Upload your ZIP bundle and manifest") : o("devportal.uploadManifestVersionHint", "Upload your manifest JSON"),
|
|
561
573
|
done: t,
|
|
562
|
-
onClick: () =>
|
|
574
|
+
onClick: () => j("versions")
|
|
563
575
|
}] : [],
|
|
564
|
-
...
|
|
576
|
+
...Y ? [{
|
|
565
577
|
id: "version",
|
|
566
578
|
label: o("devportal.setupIntegrationVersionStep", "Publish a Version"),
|
|
567
579
|
hint: t ? o("devportal.done", "Done") : o("devportal.integrationVersionHint", "Define required scopes and publish your first API version"),
|
|
568
580
|
done: t,
|
|
569
|
-
onClick: () =>
|
|
581
|
+
onClick: () => j("versions")
|
|
570
582
|
}, {
|
|
571
583
|
id: "webhooks",
|
|
572
584
|
label: o("devportal.setupWebhooksStep", "Configure Webhooks"),
|
|
573
585
|
hint: o("devportal.webhooksOptionalHint", "Set up endpoints to receive platform events (optional)"),
|
|
574
586
|
done: !1,
|
|
575
|
-
onClick: () =>
|
|
587
|
+
onClick: () => j("webhooks")
|
|
576
588
|
}] : [],
|
|
577
589
|
{
|
|
578
590
|
id: "pricing",
|
|
579
591
|
label: o("devportal.setupPricingStep", "Set Pricing"),
|
|
580
|
-
hint:
|
|
581
|
-
done:
|
|
582
|
-
onClick: () =>
|
|
592
|
+
hint: Mt ? o("devportal.done", "Done") : o("devportal.pricingHint", "Choose Free or set a credit price in the Pricing tab"),
|
|
593
|
+
done: Mt,
|
|
594
|
+
onClick: () => j("pricing")
|
|
583
595
|
},
|
|
584
|
-
...
|
|
596
|
+
...Et ? [{
|
|
585
597
|
id: "billing",
|
|
586
598
|
label: o("devportal.setupBillingStep", "Link Billing Account"),
|
|
587
|
-
hint:
|
|
588
|
-
done:
|
|
589
|
-
onClick: () =>
|
|
599
|
+
hint: kt ? o("devportal.done", "Done") : o("devportal.billingAccountHint", "Link a billing account to receive payouts — required for paid apps"),
|
|
600
|
+
done: kt,
|
|
601
|
+
onClick: () => j("pricing")
|
|
590
602
|
}] : [],
|
|
591
603
|
{
|
|
592
604
|
id: "submit",
|
|
593
605
|
label: o("devportal.submitForReview", "Submit for Review"),
|
|
594
|
-
hint:
|
|
606
|
+
hint: Nt ? o("devportal.readyToSubmit", "Ready — click Submit for Review above") : q.description?.trim() ? q.category ? q.iconUrl ? q.visibility === "PRIVATE" || q.visibility === "INTERNAL" ? o("devportal.hintPrivateVisibility", "Set visibility to Public (marketplace) or Unlisted (share via link) — Private and Internal cannot be submitted") : (J || Y) && xt === 0 ? o("devportal.hintMissingVersion", "Upload at least one version") : Mt ? Et && !kt ? o("devportal.hintMissingBilling", "Link a billing account in the Pricing tab to receive payouts") : o("devportal.completeStepsFirst", "Complete the steps above first") : o("devportal.hintMissingPricing", "Choose Free or set a credit price in the Pricing tab") : o("devportal.hintMissingIcon", "Upload an app icon on the Store Listing tab") : o("devportal.hintMissingCategory", "Select a category on the Store Listing tab") : o("devportal.hintMissingDescription", "Add a full description on the Store Listing tab"),
|
|
595
607
|
done: !1,
|
|
596
608
|
onClick: void 0
|
|
597
609
|
}
|
|
@@ -604,7 +616,7 @@ var Xe = [
|
|
|
604
616
|
className: "flex items-center gap-3",
|
|
605
617
|
children: [/* @__PURE__ */ U("div", {
|
|
606
618
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
607
|
-
children: /* @__PURE__ */ U(
|
|
619
|
+
children: /* @__PURE__ */ U(Be, {
|
|
608
620
|
size: 16,
|
|
609
621
|
className: "text-primary"
|
|
610
622
|
})
|
|
@@ -629,23 +641,23 @@ var Xe = [
|
|
|
629
641
|
type: "button",
|
|
630
642
|
onClick: e.onClick,
|
|
631
643
|
disabled: !e.onClick,
|
|
632
|
-
className:
|
|
644
|
+
className: k("w-full flex items-center gap-4 px-5 py-4 text-left transition-colors", e.onClick ? "hover:bg-bg-sunken/40 cursor-pointer" : "cursor-default opacity-60"),
|
|
633
645
|
children: [
|
|
634
646
|
/* @__PURE__ */ U("div", {
|
|
635
|
-
className:
|
|
636
|
-
children: e.done ? /* @__PURE__ */ U(
|
|
647
|
+
className: k("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"),
|
|
648
|
+
children: e.done ? /* @__PURE__ */ U(F, { size: 13 }) : t + 1
|
|
637
649
|
}),
|
|
638
650
|
/* @__PURE__ */ W("div", {
|
|
639
651
|
className: "flex-1 min-w-0",
|
|
640
652
|
children: [/* @__PURE__ */ U("p", {
|
|
641
|
-
className:
|
|
653
|
+
className: k("text-sm font-medium", e.done ? "text-text-secondary line-through" : "text-text-primary"),
|
|
642
654
|
children: e.label
|
|
643
655
|
}), e.hint && !e.done && /* @__PURE__ */ U("p", {
|
|
644
656
|
className: "mt-0.5 text-xs text-text-secondary truncate",
|
|
645
657
|
children: e.hint
|
|
646
658
|
})]
|
|
647
659
|
}),
|
|
648
|
-
e.onClick && !e.done && /* @__PURE__ */ U(
|
|
660
|
+
e.onClick && !e.done && /* @__PURE__ */ U(Ee, {
|
|
649
661
|
size: 16,
|
|
650
662
|
className: "flex-shrink-0 text-text-secondary"
|
|
651
663
|
})
|
|
@@ -654,21 +666,33 @@ var Xe = [
|
|
|
654
666
|
})]
|
|
655
667
|
});
|
|
656
668
|
})(),
|
|
657
|
-
/* @__PURE__ */ U(
|
|
669
|
+
_ ? /* @__PURE__ */ U($e, {
|
|
670
|
+
tabs: yt.ordered.map((e) => {
|
|
671
|
+
let t = rt.find((t) => t.id === e);
|
|
672
|
+
return {
|
|
673
|
+
id: e,
|
|
674
|
+
label: E(`devportal.app.tab.${e}`, t?.label ?? e),
|
|
675
|
+
href: T(e)
|
|
676
|
+
};
|
|
677
|
+
}),
|
|
678
|
+
activeId: X,
|
|
679
|
+
maxVisible: yt.primaryCount,
|
|
680
|
+
ariaLabel: o("devportal.applicationSections", "Application sections")
|
|
681
|
+
}) : /* @__PURE__ */ U("div", {
|
|
658
682
|
className: "border-b",
|
|
659
683
|
children: /* @__PURE__ */ U("nav", {
|
|
660
684
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
661
685
|
role: "tablist",
|
|
662
686
|
"aria-label": o("devportal.applicationSections", "Application sections"),
|
|
663
|
-
children:
|
|
687
|
+
children: yt.ordered.map((e) => rt.find((t) => t.id === e)).filter((e) => e !== void 0).map((e) => {
|
|
664
688
|
let t = e.icon;
|
|
665
689
|
return /* @__PURE__ */ W("button", {
|
|
666
690
|
id: `application-tab-${e.id}`,
|
|
667
691
|
role: "tab",
|
|
668
|
-
"aria-selected":
|
|
692
|
+
"aria-selected": X === e.id,
|
|
669
693
|
"aria-controls": `application-panel-${e.id}`,
|
|
670
|
-
onClick: () =>
|
|
671
|
-
className:
|
|
694
|
+
onClick: () => j(e.id),
|
|
695
|
+
className: k("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", X === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
672
696
|
children: [/* @__PURE__ */ U(t, { size: 16 }), e.label]
|
|
673
697
|
}, e.id);
|
|
674
698
|
})
|
|
@@ -676,120 +700,121 @@ var Xe = [
|
|
|
676
700
|
}),
|
|
677
701
|
/* @__PURE__ */ W("div", {
|
|
678
702
|
className: "mt-6",
|
|
679
|
-
id: `application-panel-${
|
|
703
|
+
id: `application-panel-${X}`,
|
|
680
704
|
role: "tabpanel",
|
|
681
|
-
"aria-labelledby": `application-tab-${
|
|
705
|
+
"aria-labelledby": _ ? void 0 : `application-tab-${X}`,
|
|
706
|
+
"aria-label": _ ? E(`devportal.app.tab.${X}`, rt.find((e) => e.id === X)?.label ?? X) : void 0,
|
|
682
707
|
tabIndex: 0,
|
|
683
708
|
children: [
|
|
684
|
-
|
|
685
|
-
app:
|
|
709
|
+
X === "overview" && /* @__PURE__ */ U(vt, {
|
|
710
|
+
app: q,
|
|
686
711
|
appId: f,
|
|
687
|
-
refetch: () => void
|
|
712
|
+
refetch: () => void je()
|
|
688
713
|
}),
|
|
689
|
-
|
|
690
|
-
app:
|
|
691
|
-
versionScopes:
|
|
692
|
-
locked:
|
|
693
|
-
onNavigateToVersions: () =>
|
|
714
|
+
X === "permissions" && /* @__PURE__ */ U(jt, {
|
|
715
|
+
app: q,
|
|
716
|
+
versionScopes: L?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? [],
|
|
717
|
+
locked: q.status === "PUBLISHED" || q.status === "APPROVED" || q.status === "ACTIVE",
|
|
718
|
+
onNavigateToVersions: () => j("versions")
|
|
694
719
|
}),
|
|
695
|
-
|
|
696
|
-
appId:
|
|
697
|
-
onNavigate:
|
|
720
|
+
X === "webhooks" && /* @__PURE__ */ U(ht, {
|
|
721
|
+
appId: q.id,
|
|
722
|
+
onNavigate: K
|
|
698
723
|
}),
|
|
699
|
-
|
|
700
|
-
authAppId:
|
|
701
|
-
appName:
|
|
702
|
-
onGrantDelegation: () =>
|
|
703
|
-
onNavigate:
|
|
724
|
+
X === "delegations" && /* @__PURE__ */ U(gt, {
|
|
725
|
+
authAppId: q.appId || void 0,
|
|
726
|
+
appName: q.name,
|
|
727
|
+
onGrantDelegation: () => I(!0),
|
|
728
|
+
onNavigate: K
|
|
704
729
|
}),
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
appId:
|
|
709
|
-
onNavigate:
|
|
730
|
+
X === "analytics" && /* @__PURE__ */ U(_t, { appId: q.id }),
|
|
731
|
+
X === "playground" && /* @__PURE__ */ U(bt, { app: q }),
|
|
732
|
+
X === "oauth" && /* @__PURE__ */ U(ct, {
|
|
733
|
+
appId: q.id,
|
|
734
|
+
onNavigate: K
|
|
710
735
|
}),
|
|
711
|
-
|
|
712
|
-
appId:
|
|
713
|
-
onNavigate:
|
|
736
|
+
X === "api-keys" && /* @__PURE__ */ U(lt, {
|
|
737
|
+
appId: q.id,
|
|
738
|
+
onNavigate: K
|
|
714
739
|
}),
|
|
715
|
-
|
|
716
|
-
app:
|
|
717
|
-
versionCount:
|
|
718
|
-
isPackageApp:
|
|
719
|
-
pricingDone:
|
|
720
|
-
onNavigateToVersions:
|
|
721
|
-
onNavigateToPricing: () =>
|
|
722
|
-
onNavigateToSubmission: () =>
|
|
740
|
+
X === "store-listing" && /* @__PURE__ */ U(Tt, {
|
|
741
|
+
app: q,
|
|
742
|
+
versionCount: L?.application?.versions?.totalCount ?? 0,
|
|
743
|
+
isPackageApp: J,
|
|
744
|
+
pricingDone: Mt,
|
|
745
|
+
onNavigateToVersions: J || Y ? () => j("versions") : void 0,
|
|
746
|
+
onNavigateToPricing: () => j("pricing"),
|
|
747
|
+
onNavigateToSubmission: () => K(`/apps/${q.id}/store-submission`)
|
|
723
748
|
}),
|
|
724
|
-
|
|
725
|
-
app:
|
|
726
|
-
platformFeeRate:
|
|
727
|
-
billingAccountLinked:
|
|
728
|
-
onNavigateToRevenue: () =>
|
|
729
|
-
isReadyToSubmit:
|
|
749
|
+
X === "pricing" && /* @__PURE__ */ U(pt, {
|
|
750
|
+
app: q,
|
|
751
|
+
platformFeeRate: Ot,
|
|
752
|
+
billingAccountLinked: kt,
|
|
753
|
+
onNavigateToRevenue: () => K("/revenue"),
|
|
754
|
+
isReadyToSubmit: Nt
|
|
730
755
|
}),
|
|
731
|
-
|
|
732
|
-
appId:
|
|
733
|
-
onNavigate:
|
|
734
|
-
pricingDone:
|
|
735
|
-
onNavigateToPricing: () =>
|
|
756
|
+
X === "versions" && /* @__PURE__ */ U(mt, {
|
|
757
|
+
appId: q.id,
|
|
758
|
+
onNavigate: K,
|
|
759
|
+
pricingDone: Mt,
|
|
760
|
+
onNavigateToPricing: () => j("pricing")
|
|
736
761
|
})
|
|
737
762
|
]
|
|
738
763
|
}),
|
|
739
764
|
/* @__PURE__ */ U(g, {
|
|
740
|
-
open:
|
|
741
|
-
onOpenChange:
|
|
742
|
-
onConfirm:
|
|
765
|
+
open: fe,
|
|
766
|
+
onOpenChange: me,
|
|
767
|
+
onConfirm: tt,
|
|
743
768
|
title: o("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
744
769
|
description: o("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
745
770
|
confirmLabel: o("devportal.rotateSecret", "Rotate Secret"),
|
|
746
771
|
cancelLabel: o("devportal.cancel", "Cancel"),
|
|
747
772
|
variant: "warning",
|
|
748
|
-
loading:
|
|
773
|
+
loading: Ne
|
|
749
774
|
}),
|
|
750
775
|
/* @__PURE__ */ U(g, {
|
|
751
|
-
open:
|
|
752
|
-
onOpenChange:
|
|
753
|
-
onConfirm:
|
|
754
|
-
title: o("devportal.deactivateApplication", "Deactivate Application"),
|
|
755
|
-
description: o("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
756
|
-
confirmLabel: o("devportal.deactivate", "Deactivate"),
|
|
776
|
+
open: _e,
|
|
777
|
+
onOpenChange: ve,
|
|
778
|
+
onConfirm: nt,
|
|
779
|
+
title: _ ? E(S.title.key, S.title.fallback) : o("devportal.deactivateApplication", "Deactivate Application"),
|
|
780
|
+
description: _ ? E(S.description.key, S.description.fallback, { name: q.name }) : o("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
781
|
+
confirmLabel: _ ? E(S.action.key, S.action.fallback) : o("devportal.deactivate", "Deactivate"),
|
|
757
782
|
cancelLabel: o("devportal.cancel", "Cancel"),
|
|
758
783
|
variant: "destructive",
|
|
759
|
-
loading:
|
|
784
|
+
loading: Fe
|
|
760
785
|
}),
|
|
761
786
|
/* @__PURE__ */ U(g, {
|
|
762
|
-
open:
|
|
763
|
-
onOpenChange:
|
|
764
|
-
onConfirm: () =>
|
|
787
|
+
open: at,
|
|
788
|
+
onOpenChange: ot,
|
|
789
|
+
onConfirm: () => it(st || void 0),
|
|
765
790
|
title: o("devportal.testInWorkspaceChooseVersion", "Test a Version"),
|
|
766
791
|
description: o("devportal.testInWorkspaceChooseVersionDescription", "Choose which version to install into your test workspace. This does not affect what other users see — it only installs the selected version for you to try here."),
|
|
767
792
|
confirmLabel: o("devportal.testInWorkspace", "Test in Workspace"),
|
|
768
793
|
cancelLabel: o("devportal.cancel", "Cancel"),
|
|
769
|
-
loading:
|
|
794
|
+
loading: He,
|
|
770
795
|
children: /* @__PURE__ */ U(r, {
|
|
771
796
|
label: o("devportal.version", "Version"),
|
|
772
|
-
value:
|
|
773
|
-
onChange: (e) =>
|
|
774
|
-
options:
|
|
797
|
+
value: st,
|
|
798
|
+
onChange: (e) => ut(e.target.value),
|
|
799
|
+
options: Ct.map((e) => ({
|
|
775
800
|
value: e.node.version,
|
|
776
801
|
label: e.node.isLatest ? `${e.node.version} — ${o("devportal.latest", "latest")} (${e.node.status})` : `${e.node.version} (${e.node.status})`
|
|
777
802
|
}))
|
|
778
803
|
})
|
|
779
804
|
}),
|
|
780
805
|
/* @__PURE__ */ U(v, {
|
|
781
|
-
open:
|
|
782
|
-
onOpenChange:
|
|
783
|
-
appId:
|
|
784
|
-
appName:
|
|
785
|
-
appScopes:
|
|
806
|
+
open: we,
|
|
807
|
+
onOpenChange: I,
|
|
808
|
+
appId: q.appId || "",
|
|
809
|
+
appName: q.name,
|
|
810
|
+
appScopes: q.scopes?.map((e) => e.scope) ?? [],
|
|
786
811
|
onSuccess: () => {
|
|
787
|
-
|
|
812
|
+
I(!1);
|
|
788
813
|
}
|
|
789
814
|
})
|
|
790
815
|
]
|
|
791
816
|
});
|
|
792
|
-
},
|
|
817
|
+
}, ct = ({ onNavigate: e }) => {
|
|
793
818
|
let { t } = G(), n = (e, n) => {
|
|
794
819
|
let r = t(e);
|
|
795
820
|
return r === e ? n : r;
|
|
@@ -797,7 +822,7 @@ var Xe = [
|
|
|
797
822
|
return /* @__PURE__ */ W("div", {
|
|
798
823
|
className: "space-y-4 py-4 text-center",
|
|
799
824
|
children: [
|
|
800
|
-
/* @__PURE__ */ U(
|
|
825
|
+
/* @__PURE__ */ U(V, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
801
826
|
/* @__PURE__ */ U("h3", {
|
|
802
827
|
className: "font-medium",
|
|
803
828
|
children: n("devportal.oauthApps", "OAuth Apps")
|
|
@@ -809,11 +834,11 @@ var Xe = [
|
|
|
809
834
|
/* @__PURE__ */ W("button", {
|
|
810
835
|
onClick: () => e("/oauth"),
|
|
811
836
|
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",
|
|
812
|
-
children: [/* @__PURE__ */ U(
|
|
837
|
+
children: [/* @__PURE__ */ U(R, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
813
838
|
})
|
|
814
839
|
]
|
|
815
840
|
});
|
|
816
|
-
},
|
|
841
|
+
}, lt = ({ onNavigate: e }) => {
|
|
817
842
|
let { t } = G(), n = (e, n) => {
|
|
818
843
|
let r = t(e);
|
|
819
844
|
return r === e ? n : r;
|
|
@@ -821,7 +846,7 @@ var Xe = [
|
|
|
821
846
|
return /* @__PURE__ */ W("div", {
|
|
822
847
|
className: "space-y-4 py-4 text-center",
|
|
823
848
|
children: [
|
|
824
|
-
/* @__PURE__ */ U(
|
|
849
|
+
/* @__PURE__ */ U(Me, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
825
850
|
/* @__PURE__ */ U("h3", {
|
|
826
851
|
className: "font-medium",
|
|
827
852
|
children: n("devportal.apiKeys", "API Keys")
|
|
@@ -833,19 +858,19 @@ var Xe = [
|
|
|
833
858
|
/* @__PURE__ */ W("button", {
|
|
834
859
|
onClick: () => e("/api-keys"),
|
|
835
860
|
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",
|
|
836
|
-
children: [/* @__PURE__ */ U(
|
|
861
|
+
children: [/* @__PURE__ */ U(R, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
837
862
|
})
|
|
838
863
|
]
|
|
839
864
|
});
|
|
840
|
-
},
|
|
865
|
+
}, ut = .01, dt = (e) => e * ut, ft = (e) => Math.round(e / ut), pt = ({ app: e, platformFeeRate: t, billingAccountLinked: n, onNavigateToRevenue: r, isReadyToSubmit: i = !1 }) => {
|
|
841
866
|
let { t: a } = G(), o = (e, t) => {
|
|
842
867
|
let n = a(e);
|
|
843
868
|
return n === e ? t : n;
|
|
844
|
-
}, s = e.pricingDetails ?? {}, [c, l] =
|
|
869
|
+
}, s = e.pricingDetails ?? {}, [c, l] = P({
|
|
845
870
|
pricingType: e.pricingType ?? "FREE",
|
|
846
871
|
price: typeof s.price == "number" ? String(s.price) : ""
|
|
847
|
-
}), [u, d] =
|
|
848
|
-
p.current = e,
|
|
872
|
+
}), [u, d] = P(!1), [f] = ve(), p = be(e);
|
|
873
|
+
p.current = e, ye(() => {
|
|
849
874
|
let e = p.current.pricingDetails ?? {};
|
|
850
875
|
l({
|
|
851
876
|
pricingType: p.current.pricingType ?? "FREE",
|
|
@@ -871,22 +896,22 @@ var Xe = [
|
|
|
871
896
|
pricingType: c.pricingType || null,
|
|
872
897
|
pricingDetails: Object.keys(t).length > 0 ? t : null
|
|
873
898
|
}
|
|
874
|
-
} }),
|
|
899
|
+
} }), D("success");
|
|
875
900
|
} catch {
|
|
876
|
-
|
|
901
|
+
D("error");
|
|
877
902
|
} finally {
|
|
878
903
|
d(!1);
|
|
879
904
|
}
|
|
880
|
-
}, g = c.pricingType !== "FREE", _ = parseInt(c.price, 10), v = g && !isNaN(_) && _ > 0, y = v ?
|
|
905
|
+
}, g = c.pricingType !== "FREE", _ = parseInt(c.price, 10), v = g && !isNaN(_) && _ > 0, y = v ? dt(_) : 0, b = v ? Math.round(_ * t) : 0, x = dt(b), S = v ? _ - b : 0, C = dt(S), w = (e) => "$" + e.toLocaleString("en-US", {
|
|
881
906
|
minimumFractionDigits: 2,
|
|
882
907
|
maximumFractionDigits: 2
|
|
883
|
-
}),
|
|
908
|
+
}), T = (e) => e.toLocaleString("en-US") + " cr";
|
|
884
909
|
return /* @__PURE__ */ W("div", {
|
|
885
910
|
className: "space-y-8",
|
|
886
911
|
children: [
|
|
887
912
|
/* @__PURE__ */ W("div", {
|
|
888
913
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
889
|
-
children: [/* @__PURE__ */ U(
|
|
914
|
+
children: [/* @__PURE__ */ U(I, {
|
|
890
915
|
size: 16,
|
|
891
916
|
className: "mt-0.5 shrink-0 text-primary"
|
|
892
917
|
}), /* @__PURE__ */ W("p", {
|
|
@@ -903,7 +928,7 @@ var Xe = [
|
|
|
903
928
|
className: "font-medium",
|
|
904
929
|
children: [
|
|
905
930
|
"1 credit = ",
|
|
906
|
-
|
|
931
|
+
w(ut),
|
|
907
932
|
" USD."
|
|
908
933
|
]
|
|
909
934
|
}),
|
|
@@ -927,7 +952,7 @@ var Xe = [
|
|
|
927
952
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
928
953
|
children: [/* @__PURE__ */ U("div", {
|
|
929
954
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
|
|
930
|
-
children: /* @__PURE__ */ U(
|
|
955
|
+
children: /* @__PURE__ */ U(Ve, {
|
|
931
956
|
size: 18,
|
|
932
957
|
className: "text-status-success-text"
|
|
933
958
|
})
|
|
@@ -959,7 +984,7 @@ var Xe = [
|
|
|
959
984
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
960
985
|
children: [/* @__PURE__ */ U("div", {
|
|
961
986
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
962
|
-
children: /* @__PURE__ */ U(
|
|
987
|
+
children: /* @__PURE__ */ U(We, {
|
|
963
988
|
size: 18,
|
|
964
989
|
className: "text-primary"
|
|
965
990
|
})
|
|
@@ -988,7 +1013,7 @@ var Xe = [
|
|
|
988
1013
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
989
1014
|
children: [/* @__PURE__ */ U("div", {
|
|
990
1015
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
991
|
-
children: /* @__PURE__ */ U(
|
|
1016
|
+
children: /* @__PURE__ */ U(Ae, {
|
|
992
1017
|
size: 18,
|
|
993
1018
|
className: "text-status-warning-text"
|
|
994
1019
|
})
|
|
@@ -1022,10 +1047,10 @@ var Xe = [
|
|
|
1022
1047
|
})] }),
|
|
1023
1048
|
/* @__PURE__ */ U("div", {
|
|
1024
1049
|
className: "flex flex-wrap gap-2",
|
|
1025
|
-
children:
|
|
1050
|
+
children: xt.map((e) => /* @__PURE__ */ U("button", {
|
|
1026
1051
|
type: "button",
|
|
1027
1052
|
onClick: () => m("pricingType", e.value),
|
|
1028
|
-
className:
|
|
1053
|
+
className: k("rounded-md border px-4 py-2 text-sm font-medium transition-colors", c.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken border-border-subtle"),
|
|
1029
1054
|
children: e.label
|
|
1030
1055
|
}, e.value))
|
|
1031
1056
|
}),
|
|
@@ -1065,10 +1090,10 @@ var Xe = [
|
|
|
1065
1090
|
className: "mt-1.5 text-xs text-text-secondary",
|
|
1066
1091
|
children: [
|
|
1067
1092
|
"≈ ",
|
|
1068
|
-
|
|
1093
|
+
w(y),
|
|
1069
1094
|
" USD at the current credit rate (1 cr =",
|
|
1070
1095
|
" ",
|
|
1071
|
-
|
|
1096
|
+
w(ut),
|
|
1072
1097
|
")"
|
|
1073
1098
|
]
|
|
1074
1099
|
}),
|
|
@@ -1087,13 +1112,13 @@ var Xe = [
|
|
|
1087
1112
|
50
|
|
1088
1113
|
].map((e) => /* @__PURE__ */ W("button", {
|
|
1089
1114
|
type: "button",
|
|
1090
|
-
onClick: () => m("price", String(
|
|
1115
|
+
onClick: () => m("price", String(ft(e))),
|
|
1091
1116
|
className: "rounded border border-border-subtle px-2 py-0.5 hover:bg-bg-sunken transition-colors",
|
|
1092
1117
|
children: [
|
|
1093
1118
|
"$",
|
|
1094
1119
|
e,
|
|
1095
1120
|
" = ",
|
|
1096
|
-
|
|
1121
|
+
ft(e).toLocaleString(),
|
|
1097
1122
|
" cr"
|
|
1098
1123
|
]
|
|
1099
1124
|
}, e))]
|
|
@@ -1116,13 +1141,13 @@ var Xe = [
|
|
|
1116
1141
|
}), /* @__PURE__ */ W("span", {
|
|
1117
1142
|
className: "font-medium tabular-nums",
|
|
1118
1143
|
children: [
|
|
1119
|
-
|
|
1144
|
+
T(_),
|
|
1120
1145
|
" ",
|
|
1121
1146
|
/* @__PURE__ */ W("span", {
|
|
1122
1147
|
className: "text-text-tertiary text-xs",
|
|
1123
1148
|
children: [
|
|
1124
1149
|
"(",
|
|
1125
|
-
|
|
1150
|
+
w(y),
|
|
1126
1151
|
")"
|
|
1127
1152
|
]
|
|
1128
1153
|
})
|
|
@@ -1146,13 +1171,13 @@ var Xe = [
|
|
|
1146
1171
|
className: "tabular-nums",
|
|
1147
1172
|
children: [
|
|
1148
1173
|
"− ",
|
|
1149
|
-
|
|
1174
|
+
T(b),
|
|
1150
1175
|
" ",
|
|
1151
1176
|
/* @__PURE__ */ W("span", {
|
|
1152
1177
|
className: "text-xs opacity-70",
|
|
1153
1178
|
children: [
|
|
1154
1179
|
"(",
|
|
1155
|
-
|
|
1180
|
+
w(x),
|
|
1156
1181
|
")"
|
|
1157
1182
|
]
|
|
1158
1183
|
})
|
|
@@ -1164,11 +1189,11 @@ var Xe = [
|
|
|
1164
1189
|
children: [/* @__PURE__ */ U("span", { children: "You earn" }), /* @__PURE__ */ W("span", {
|
|
1165
1190
|
className: "tabular-nums",
|
|
1166
1191
|
children: [
|
|
1167
|
-
|
|
1192
|
+
T(S),
|
|
1168
1193
|
" ",
|
|
1169
1194
|
/* @__PURE__ */ W("span", {
|
|
1170
1195
|
className: "text-sm font-normal",
|
|
1171
|
-
children: ["≈ ",
|
|
1196
|
+
children: ["≈ ", w(C)]
|
|
1172
1197
|
})
|
|
1173
1198
|
]
|
|
1174
1199
|
})]
|
|
@@ -1183,7 +1208,7 @@ var Xe = [
|
|
|
1183
1208
|
}),
|
|
1184
1209
|
!n && /* @__PURE__ */ W("div", {
|
|
1185
1210
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
1186
|
-
children: [/* @__PURE__ */ U(
|
|
1211
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
1187
1212
|
size: 16,
|
|
1188
1213
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1189
1214
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -1220,14 +1245,14 @@ var Xe = [
|
|
|
1220
1245
|
children: [
|
|
1221
1246
|
/* @__PURE__ */ W("li", {
|
|
1222
1247
|
className: "flex items-start gap-2",
|
|
1223
|
-
children: [/* @__PURE__ */ U(
|
|
1248
|
+
children: [/* @__PURE__ */ U(F, {
|
|
1224
1249
|
size: 14,
|
|
1225
1250
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1226
1251
|
}), /* @__PURE__ */ W("span", { children: [
|
|
1227
1252
|
"By publishing to the marketplace you agree to the",
|
|
1228
1253
|
" ",
|
|
1229
1254
|
/* @__PURE__ */ U("a", {
|
|
1230
|
-
href:
|
|
1255
|
+
href: te.developerAgreement,
|
|
1231
1256
|
target: "_blank",
|
|
1232
1257
|
rel: "noopener noreferrer",
|
|
1233
1258
|
className: "text-primary underline-offset-2 hover:underline",
|
|
@@ -1238,21 +1263,21 @@ var Xe = [
|
|
|
1238
1263
|
}),
|
|
1239
1264
|
/* @__PURE__ */ W("li", {
|
|
1240
1265
|
className: "flex items-start gap-2",
|
|
1241
|
-
children: [/* @__PURE__ */ U(
|
|
1266
|
+
children: [/* @__PURE__ */ U(F, {
|
|
1242
1267
|
size: 14,
|
|
1243
1268
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1244
1269
|
}), /* @__PURE__ */ U("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1245
1270
|
}),
|
|
1246
1271
|
/* @__PURE__ */ W("li", {
|
|
1247
1272
|
className: "flex items-start gap-2",
|
|
1248
|
-
children: [/* @__PURE__ */ U(
|
|
1273
|
+
children: [/* @__PURE__ */ U(F, {
|
|
1249
1274
|
size: 14,
|
|
1250
1275
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1251
1276
|
}), /* @__PURE__ */ U("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1252
1277
|
}),
|
|
1253
1278
|
/* @__PURE__ */ W("li", {
|
|
1254
1279
|
className: "flex items-start gap-2",
|
|
1255
|
-
children: [/* @__PURE__ */ U(
|
|
1280
|
+
children: [/* @__PURE__ */ U(F, {
|
|
1256
1281
|
size: 14,
|
|
1257
1282
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1258
1283
|
}), /* @__PURE__ */ W("span", { children: [
|
|
@@ -1279,13 +1304,13 @@ var Xe = [
|
|
|
1279
1304
|
onClick: () => void h(),
|
|
1280
1305
|
disabled: u,
|
|
1281
1306
|
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",
|
|
1282
|
-
children: u ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
1307
|
+
children: u ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(z, {
|
|
1283
1308
|
size: 16,
|
|
1284
1309
|
className: "animate-spin"
|
|
1285
|
-
}), o("devportal.saving", "Saving…")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
1310
|
+
}), o("devportal.saving", "Saving…")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(I, { size: 16 }), o("devportal.savePricing", "Save Pricing")] })
|
|
1286
1311
|
}), i && /* @__PURE__ */ W("div", {
|
|
1287
1312
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1288
|
-
children: [/* @__PURE__ */ U(
|
|
1313
|
+
children: [/* @__PURE__ */ U(F, {
|
|
1289
1314
|
size: 16,
|
|
1290
1315
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1291
1316
|
}), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
@@ -1299,16 +1324,16 @@ var Xe = [
|
|
|
1299
1324
|
})
|
|
1300
1325
|
]
|
|
1301
1326
|
});
|
|
1302
|
-
},
|
|
1327
|
+
}, mt = ({ appId: e, onNavigate: t, pricingDone: n = !1, onNavigateToPricing: r }) => {
|
|
1303
1328
|
let { t: i } = G(), a = (e, t) => {
|
|
1304
1329
|
let n = i(e);
|
|
1305
1330
|
return n === e ? t : n;
|
|
1306
|
-
}, { data: o, loading: s, error: c } =
|
|
1331
|
+
}, { data: o, loading: s, error: c } = se({
|
|
1307
1332
|
variables: { applicationId: e },
|
|
1308
1333
|
fetchPolicy: "cache-and-network"
|
|
1309
1334
|
});
|
|
1310
|
-
if (s) return /* @__PURE__ */ U(
|
|
1311
|
-
if (c) return /* @__PURE__ */ U(
|
|
1335
|
+
if (s) return /* @__PURE__ */ U(at, { message: a("devportal.loadingVersions", "Loading versions…") });
|
|
1336
|
+
if (c) return /* @__PURE__ */ U(ot, { message: c.message });
|
|
1312
1337
|
let l = (o?.application?.versions?.edges ?? []).map((e) => e.node);
|
|
1313
1338
|
return /* @__PURE__ */ W("div", {
|
|
1314
1339
|
className: "space-y-4",
|
|
@@ -1325,7 +1350,7 @@ var Xe = [
|
|
|
1325
1350
|
}), /* @__PURE__ */ W("button", {
|
|
1326
1351
|
onClick: () => t(`/apps/${e}/versions`),
|
|
1327
1352
|
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",
|
|
1328
|
-
children: [/* @__PURE__ */ U(
|
|
1353
|
+
children: [/* @__PURE__ */ U(He, { size: 16 }), a("devportal.uploadVersion", "Upload Version")]
|
|
1329
1354
|
})]
|
|
1330
1355
|
}),
|
|
1331
1356
|
l.length > 0 ? /* @__PURE__ */ U("div", {
|
|
@@ -1365,7 +1390,7 @@ var Xe = [
|
|
|
1365
1390
|
/* @__PURE__ */ U("td", {
|
|
1366
1391
|
className: "px-4 py-3",
|
|
1367
1392
|
children: /* @__PURE__ */ U("span", {
|
|
1368
|
-
className:
|
|
1393
|
+
className: k("inline-flex rounded-full px-2 py-0.5 text-xs font-medium", e.status === "published" ? "bg-status-success-bg-subtle text-status-success-text" : e.status === "pending_review" ? "bg-status-info-bg-subtle text-status-info-text" : e.status === "rejected" ? "bg-status-error-bg-subtle text-status-error-text" : e.status === "deprecated" ? "bg-bg-sunken text-text-secondary" : "bg-status-warning-bg-subtle text-status-warning-text"),
|
|
1369
1394
|
children: e.status === "pending_review" ? "In Review" : e.status
|
|
1370
1395
|
})
|
|
1371
1396
|
}),
|
|
@@ -1418,19 +1443,19 @@ var Xe = [
|
|
|
1418
1443
|
})
|
|
1419
1444
|
}) : /* @__PURE__ */ U(m, {
|
|
1420
1445
|
illustration: "empty-generic",
|
|
1421
|
-
icon: /* @__PURE__ */ U(
|
|
1446
|
+
icon: /* @__PURE__ */ U(Ie, { size: 32 }),
|
|
1422
1447
|
title: a("devportal.noVersions", "No versions yet"),
|
|
1423
1448
|
description: a("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1424
1449
|
action: /* @__PURE__ */ W("button", {
|
|
1425
1450
|
onClick: () => t(`/apps/${e}/versions`),
|
|
1426
1451
|
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",
|
|
1427
|
-
children: [/* @__PURE__ */ U(
|
|
1452
|
+
children: [/* @__PURE__ */ U(He, { size: 16 }), a("devportal.uploadVersion", "Upload Version")]
|
|
1428
1453
|
})
|
|
1429
1454
|
}),
|
|
1430
1455
|
l.length > 0 && !n && r && /* @__PURE__ */ W("div", {
|
|
1431
1456
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1432
1457
|
children: [
|
|
1433
|
-
/* @__PURE__ */ U(
|
|
1458
|
+
/* @__PURE__ */ U(I, {
|
|
1434
1459
|
size: 16,
|
|
1435
1460
|
className: "shrink-0 text-primary"
|
|
1436
1461
|
}),
|
|
@@ -1442,44 +1467,44 @@ var Xe = [
|
|
|
1442
1467
|
type: "button",
|
|
1443
1468
|
onClick: r,
|
|
1444
1469
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1445
|
-
children: [a("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ U(
|
|
1470
|
+
children: [a("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ U(Ee, { size: 15 })]
|
|
1446
1471
|
})
|
|
1447
1472
|
]
|
|
1448
1473
|
})
|
|
1449
1474
|
]
|
|
1450
1475
|
});
|
|
1451
|
-
},
|
|
1476
|
+
}, ht = ({ appId: e, onNavigate: t }) => {
|
|
1452
1477
|
let { t: n } = G(), r = (e, t) => {
|
|
1453
1478
|
let r = n(e);
|
|
1454
1479
|
return r === e ? t : r;
|
|
1455
|
-
}, { data: i, loading: a, error: o } =
|
|
1456
|
-
if (a) return /* @__PURE__ */ U(
|
|
1457
|
-
if (o) return /* @__PURE__ */ U(
|
|
1458
|
-
let s = (i?.webhooks ?? []).map(
|
|
1459
|
-
return /* @__PURE__ */ U(
|
|
1480
|
+
}, { data: i, loading: a, error: o } = j({ variables: { applicationId: e } });
|
|
1481
|
+
if (a) return /* @__PURE__ */ U(at, { message: r("devportal.loadingWebhooks", "Loading webhooks...") });
|
|
1482
|
+
if (o) return /* @__PURE__ */ U(ot, { message: o.message });
|
|
1483
|
+
let s = (i?.webhooks ?? []).map(K);
|
|
1484
|
+
return /* @__PURE__ */ U(q, {
|
|
1460
1485
|
appId: e,
|
|
1461
1486
|
webhooks: s,
|
|
1462
1487
|
onNavigate: t
|
|
1463
1488
|
});
|
|
1464
|
-
},
|
|
1489
|
+
}, gt = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: r }) => {
|
|
1465
1490
|
let { t: i } = G(), a = (e, t) => {
|
|
1466
1491
|
let n = i(e);
|
|
1467
1492
|
return n === e ? t : n;
|
|
1468
|
-
}, { data: o, loading: s, error: c, refetch: l } =
|
|
1493
|
+
}, { data: o, loading: s, error: c, refetch: l } = re(), [u] = fe(), [d, f] = P([]), [p, h] = P(!1), [_, v] = P(/* @__PURE__ */ new Set()), [y, b] = P(null), x = N(() => o?.currentUserDelegations?.delegations ? o.currentUserDelegations.delegations.filter((t) => t.appId === e).map(nt) : [], [e, o]), S = N(() => x.filter((e) => e.status === "ACTIVE"), [x]), C = N(() => S.filter((e) => _.has(e.id)), [S, _]), w = S.length > 0 && S.every((e) => _.has(e.id)), T = S.some((e) => _.has(e.id)) && !w, E = M((e, t) => {
|
|
1469
1494
|
v((n) => {
|
|
1470
1495
|
let r = new Set(n);
|
|
1471
1496
|
return t ? r.add(e) : r.delete(e), r;
|
|
1472
1497
|
});
|
|
1473
|
-
}, []), D =
|
|
1498
|
+
}, []), D = M((e) => {
|
|
1474
1499
|
v((t) => {
|
|
1475
1500
|
let n = new Set(t);
|
|
1476
1501
|
return S.forEach((t) => {
|
|
1477
1502
|
e ? n.add(t.id) : n.delete(t.id);
|
|
1478
1503
|
}), n;
|
|
1479
1504
|
});
|
|
1480
|
-
}, [S]),
|
|
1505
|
+
}, [S]), O = M(() => {
|
|
1481
1506
|
v(/* @__PURE__ */ new Set());
|
|
1482
|
-
}, []),
|
|
1507
|
+
}, []), ee = M(async (e) => {
|
|
1483
1508
|
h(!0);
|
|
1484
1509
|
try {
|
|
1485
1510
|
let t = await Promise.allSettled(e.map((e) => u({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
@@ -1491,7 +1516,7 @@ var Xe = [
|
|
|
1491
1516
|
h(!1);
|
|
1492
1517
|
}
|
|
1493
1518
|
}, [u, l]);
|
|
1494
|
-
return e ? s ? /* @__PURE__ */ U(
|
|
1519
|
+
return e ? s ? /* @__PURE__ */ U(at, { message: a("devportal.loadingDelegations", "Loading delegations...") }) : c ? /* @__PURE__ */ U(ot, { message: c.message }) : /* @__PURE__ */ W(H, { children: [
|
|
1495
1520
|
y && /* @__PURE__ */ U("div", {
|
|
1496
1521
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1497
1522
|
children: /* @__PURE__ */ W("div", {
|
|
@@ -1503,7 +1528,7 @@ var Xe = [
|
|
|
1503
1528
|
})]
|
|
1504
1529
|
})
|
|
1505
1530
|
}),
|
|
1506
|
-
/* @__PURE__ */ U(
|
|
1531
|
+
/* @__PURE__ */ U(J, {
|
|
1507
1532
|
appName: t,
|
|
1508
1533
|
delegations: x,
|
|
1509
1534
|
onGrantDelegation: n,
|
|
@@ -1511,7 +1536,7 @@ var Xe = [
|
|
|
1511
1536
|
selectedDelegationIds: _,
|
|
1512
1537
|
onToggleSelectDelegation: E,
|
|
1513
1538
|
onToggleAllDelegations: D,
|
|
1514
|
-
onClearSelection:
|
|
1539
|
+
onClearSelection: O,
|
|
1515
1540
|
onRevokeSelected: () => f(C.map((e) => e.id)),
|
|
1516
1541
|
allVisibleSelected: w,
|
|
1517
1542
|
partiallySelected: T
|
|
@@ -1522,7 +1547,7 @@ var Xe = [
|
|
|
1522
1547
|
e || f([]);
|
|
1523
1548
|
},
|
|
1524
1549
|
onConfirm: () => {
|
|
1525
|
-
d.length > 0 &&
|
|
1550
|
+
d.length > 0 && ee(d);
|
|
1526
1551
|
},
|
|
1527
1552
|
title: d.length > 1 ? a("devportal.revokeDelegations", "Revoke Delegations") : a("devportal.revokeDelegation", "Revoke Delegation"),
|
|
1528
1553
|
description: d.length > 1 ? a("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${d.length} selected delegations.`) : a("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
|
|
@@ -1533,37 +1558,37 @@ var Xe = [
|
|
|
1533
1558
|
})
|
|
1534
1559
|
] }) : /* @__PURE__ */ U(m, {
|
|
1535
1560
|
illustration: "empty-generic",
|
|
1536
|
-
icon: /* @__PURE__ */ U(
|
|
1561
|
+
icon: /* @__PURE__ */ U(V, { size: 32 }),
|
|
1537
1562
|
title: a("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1538
1563
|
description: a("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1539
1564
|
action: /* @__PURE__ */ W("button", {
|
|
1540
1565
|
onClick: () => r("/oauth"),
|
|
1541
1566
|
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",
|
|
1542
|
-
children: [/* @__PURE__ */ U(
|
|
1567
|
+
children: [/* @__PURE__ */ U(R, { size: 16 }), a("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1543
1568
|
})
|
|
1544
1569
|
});
|
|
1545
|
-
},
|
|
1570
|
+
}, _t = ({ appId: e }) => {
|
|
1546
1571
|
let { t } = G(), n = (e, n) => {
|
|
1547
1572
|
let r = t(e);
|
|
1548
1573
|
return r === e ? n : r;
|
|
1549
|
-
}, r =
|
|
1574
|
+
}, r = N(() => /* @__PURE__ */ new Date(), []), i = N(() => {
|
|
1550
1575
|
let e = new Date(r);
|
|
1551
1576
|
return e.setDate(e.getDate() - 30), e;
|
|
1552
|
-
}, [r]), { data: a, loading: o, error: s } =
|
|
1577
|
+
}, [r]), { data: a, loading: o, error: s } = ae({ variables: {
|
|
1553
1578
|
applicationId: e,
|
|
1554
1579
|
period: "daily",
|
|
1555
1580
|
startDate: i.toISOString(),
|
|
1556
1581
|
endDate: r.toISOString()
|
|
1557
1582
|
} });
|
|
1558
|
-
if (o) return /* @__PURE__ */ U(
|
|
1559
|
-
if (s) return /* @__PURE__ */ U(
|
|
1560
|
-
let c = (a?.applicationAnalytics ?? []).map(
|
|
1561
|
-
return /* @__PURE__ */ U(
|
|
1562
|
-
},
|
|
1583
|
+
if (o) return /* @__PURE__ */ U(at, { message: n("devportal.loadingAnalytics", "Loading analytics...") });
|
|
1584
|
+
if (s) return /* @__PURE__ */ U(ot, { message: s.message });
|
|
1585
|
+
let c = (a?.applicationAnalytics ?? []).map(tt);
|
|
1586
|
+
return /* @__PURE__ */ U(Y, { analytics: c });
|
|
1587
|
+
}, vt = ({ app: e, appId: n, refetch: r }) => {
|
|
1563
1588
|
let { t: i } = G(), a = (e, t) => {
|
|
1564
1589
|
let n = i(e);
|
|
1565
1590
|
return n === e ? t : n;
|
|
1566
|
-
}, [o, { loading: s }] =
|
|
1591
|
+
}, [o, { loading: s }] = me(), [c, { loading: l }] = _e(), [u, d] = P(!1);
|
|
1567
1592
|
return /* @__PURE__ */ W("div", {
|
|
1568
1593
|
className: "space-y-6",
|
|
1569
1594
|
children: [e.appType === "WORKFLOW" && /* @__PURE__ */ U("div", {
|
|
@@ -1574,7 +1599,7 @@ var Xe = [
|
|
|
1574
1599
|
className: "flex items-start gap-3",
|
|
1575
1600
|
children: [/* @__PURE__ */ U("div", {
|
|
1576
1601
|
className: "mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg-subtle",
|
|
1577
|
-
children: /* @__PURE__ */ U(
|
|
1602
|
+
children: /* @__PURE__ */ U(Ne, {
|
|
1578
1603
|
size: 15,
|
|
1579
1604
|
className: "text-action-primary-text"
|
|
1580
1605
|
})
|
|
@@ -1605,7 +1630,7 @@ var Xe = [
|
|
|
1605
1630
|
d(!0), setTimeout(() => d(!1), 2e3);
|
|
1606
1631
|
});
|
|
1607
1632
|
},
|
|
1608
|
-
children: [U(u ?
|
|
1633
|
+
children: [U(u ? F : L, { size: 12 }), u ? a("devportal.copied", "Copied!") : a("devportal.copyLink", "Copy Link")]
|
|
1609
1634
|
})]
|
|
1610
1635
|
})
|
|
1611
1636
|
] })]
|
|
@@ -1617,7 +1642,7 @@ var Xe = [
|
|
|
1617
1642
|
e.visibility === "UNLISTED" ? c({ variables: { id: n } }).then(() => r()) : o({ variables: { id: n } }).then(() => r());
|
|
1618
1643
|
},
|
|
1619
1644
|
className: `flex-shrink-0 rounded-full px-3 py-1.5 text-xs font-medium transition-colors ${e.visibility === "UNLISTED" ? "border border-status-error-bg text-status-error-text hover:bg-status-error-bg-subtle" : "bg-action-primary-bg text-text-on-action hover:opacity-90 disabled:opacity-50"}`,
|
|
1620
|
-
children: s || l ? /* @__PURE__ */ U(
|
|
1645
|
+
children: s || l ? /* @__PURE__ */ U(z, {
|
|
1621
1646
|
size: 12,
|
|
1622
1647
|
className: "animate-spin"
|
|
1623
1648
|
}) : e.visibility === "UNLISTED" ? a("devportal.shareWorkflow.stopSharing", "Stop Sharing") : a("devportal.shareWorkflow.share", "Share Link")
|
|
@@ -1628,7 +1653,7 @@ var Xe = [
|
|
|
1628
1653
|
children: [/* @__PURE__ */ W("div", {
|
|
1629
1654
|
className: "lg:col-span-2 space-y-6",
|
|
1630
1655
|
children: [
|
|
1631
|
-
/* @__PURE__ */ U(
|
|
1656
|
+
/* @__PURE__ */ U(Ze, { children: /* @__PURE__ */ W("div", {
|
|
1632
1657
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1633
1658
|
children: [
|
|
1634
1659
|
/* @__PURE__ */ U(Z, {
|
|
@@ -1651,7 +1676,7 @@ var Xe = [
|
|
|
1651
1676
|
}) }),
|
|
1652
1677
|
/* @__PURE__ */ U(t, {
|
|
1653
1678
|
title: a("devportal.description", "Description"),
|
|
1654
|
-
children: e.description ? /* @__PURE__ */ U(
|
|
1679
|
+
children: e.description ? /* @__PURE__ */ U(xe, {
|
|
1655
1680
|
className: "prose prose-sm max-w-none",
|
|
1656
1681
|
children: e.description
|
|
1657
1682
|
}) : /* @__PURE__ */ U("p", {
|
|
@@ -1763,7 +1788,7 @@ var Xe = [
|
|
|
1763
1788
|
})]
|
|
1764
1789
|
})]
|
|
1765
1790
|
});
|
|
1766
|
-
},
|
|
1791
|
+
}, q = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
1767
1792
|
let { t: r } = G(), i = (e, t) => {
|
|
1768
1793
|
let n = r(e);
|
|
1769
1794
|
return n === e ? t : n;
|
|
@@ -1784,7 +1809,7 @@ var Xe = [
|
|
|
1784
1809
|
}), /* @__PURE__ */ W("button", {
|
|
1785
1810
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1786
1811
|
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",
|
|
1787
|
-
children: [/* @__PURE__ */ U(
|
|
1812
|
+
children: [/* @__PURE__ */ U(B, { size: 16 }), i("devportal.addWebhook", "Add Webhook")]
|
|
1788
1813
|
})]
|
|
1789
1814
|
}), t.length > 0 ? /* @__PURE__ */ U("div", {
|
|
1790
1815
|
className: "space-y-4",
|
|
@@ -1808,7 +1833,7 @@ var Xe = [
|
|
|
1808
1833
|
})] }), /* @__PURE__ */ U("button", {
|
|
1809
1834
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1810
1835
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1811
|
-
children: /* @__PURE__ */ U(
|
|
1836
|
+
children: /* @__PURE__ */ U(Fe, { size: 20 })
|
|
1812
1837
|
})]
|
|
1813
1838
|
}),
|
|
1814
1839
|
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
@@ -1865,17 +1890,17 @@ var Xe = [
|
|
|
1865
1890
|
}, t.id))
|
|
1866
1891
|
}) : /* @__PURE__ */ U(m, {
|
|
1867
1892
|
illustration: "empty-notifications",
|
|
1868
|
-
icon: /* @__PURE__ */ U(
|
|
1893
|
+
icon: /* @__PURE__ */ U(Ge, { size: 32 }),
|
|
1869
1894
|
title: i("devportal.noWebhooks", "No webhooks"),
|
|
1870
1895
|
description: i("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
1871
1896
|
action: /* @__PURE__ */ W("button", {
|
|
1872
1897
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1873
1898
|
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",
|
|
1874
|
-
children: [/* @__PURE__ */ U(
|
|
1899
|
+
children: [/* @__PURE__ */ U(B, { size: 16 }), i("devportal.addWebhook", "Add Webhook")]
|
|
1875
1900
|
})
|
|
1876
1901
|
})]
|
|
1877
1902
|
});
|
|
1878
|
-
},
|
|
1903
|
+
}, J = ({ appName: e, delegations: t, onGrantDelegation: n, onRevokeDelegation: r, selectedDelegationIds: i, onToggleSelectDelegation: a, onToggleAllDelegations: o, onClearSelection: s, onRevokeSelected: c, allVisibleSelected: l, partiallySelected: u }) => {
|
|
1879
1904
|
let { t: d } = G(), f = (e, t) => {
|
|
1880
1905
|
let n = d(e);
|
|
1881
1906
|
return n === e ? t : n;
|
|
@@ -1911,7 +1936,7 @@ var Xe = [
|
|
|
1911
1936
|
})] }), /* @__PURE__ */ W("button", {
|
|
1912
1937
|
onClick: n,
|
|
1913
1938
|
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",
|
|
1914
|
-
children: [/* @__PURE__ */ U(
|
|
1939
|
+
children: [/* @__PURE__ */ U(B, { size: 16 }), f("devportal.grantDelegation", "Grant Delegation")]
|
|
1915
1940
|
})]
|
|
1916
1941
|
}),
|
|
1917
1942
|
p.length > 0 && /* @__PURE__ */ U("div", {
|
|
@@ -1977,7 +2002,7 @@ var Xe = [
|
|
|
1977
2002
|
className: "font-medium",
|
|
1978
2003
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
1979
2004
|
}), /* @__PURE__ */ U("span", {
|
|
1980
|
-
className:
|
|
2005
|
+
className: k("rounded-full px-2 py-0.5 text-xs font-medium", it[e.status]),
|
|
1981
2006
|
children: e.status
|
|
1982
2007
|
})]
|
|
1983
2008
|
}), /* @__PURE__ */ W("p", {
|
|
@@ -1995,7 +2020,7 @@ var Xe = [
|
|
|
1995
2020
|
}), e.status === "ACTIVE" && /* @__PURE__ */ W("button", {
|
|
1996
2021
|
onClick: () => r(e.id),
|
|
1997
2022
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
1998
|
-
children: [/* @__PURE__ */ U(
|
|
2023
|
+
children: [/* @__PURE__ */ U(qe, { size: 14 }), f("devportal.revoke", "Revoke")]
|
|
1999
2024
|
})]
|
|
2000
2025
|
}),
|
|
2001
2026
|
/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
|
|
@@ -2024,7 +2049,7 @@ var Xe = [
|
|
|
2024
2049
|
e.expiresAt && /* @__PURE__ */ W("span", {
|
|
2025
2050
|
className: "flex items-center gap-1",
|
|
2026
2051
|
children: [
|
|
2027
|
-
/* @__PURE__ */ U(
|
|
2052
|
+
/* @__PURE__ */ U(De, { size: 12 }),
|
|
2028
2053
|
f("devportal.expires", "Expires"),
|
|
2029
2054
|
" ",
|
|
2030
2055
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -2032,7 +2057,7 @@ var Xe = [
|
|
|
2032
2057
|
}),
|
|
2033
2058
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ W("span", {
|
|
2034
2059
|
className: "flex items-center gap-1",
|
|
2035
|
-
children: [/* @__PURE__ */ U(
|
|
2060
|
+
children: [/* @__PURE__ */ U(Te, {
|
|
2036
2061
|
size: 12,
|
|
2037
2062
|
className: "text-status-success-text"
|
|
2038
2063
|
}), f("devportal.noExpiration", "No expiration")]
|
|
@@ -2040,7 +2065,7 @@ var Xe = [
|
|
|
2040
2065
|
e.revokedAt && /* @__PURE__ */ W("span", {
|
|
2041
2066
|
className: "flex items-center gap-1",
|
|
2042
2067
|
children: [
|
|
2043
|
-
/* @__PURE__ */ U(
|
|
2068
|
+
/* @__PURE__ */ U(qe, {
|
|
2044
2069
|
size: 12,
|
|
2045
2070
|
className: "text-status-error-text"
|
|
2046
2071
|
}),
|
|
@@ -2055,18 +2080,18 @@ var Xe = [
|
|
|
2055
2080
|
}, e.id))
|
|
2056
2081
|
}) : /* @__PURE__ */ U(m, {
|
|
2057
2082
|
illustration: "empty-people",
|
|
2058
|
-
icon: /* @__PURE__ */ U(
|
|
2083
|
+
icon: /* @__PURE__ */ U(Ue, { size: 32 }),
|
|
2059
2084
|
title: f("devportal.noDelegations", "No delegations"),
|
|
2060
2085
|
description: f("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
2061
2086
|
action: /* @__PURE__ */ W("button", {
|
|
2062
2087
|
onClick: n,
|
|
2063
2088
|
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",
|
|
2064
|
-
children: [/* @__PURE__ */ U(
|
|
2089
|
+
children: [/* @__PURE__ */ U(B, { size: 16 }), f("devportal.grantDelegation", "Grant Delegation")]
|
|
2065
2090
|
})
|
|
2066
2091
|
})
|
|
2067
2092
|
]
|
|
2068
2093
|
});
|
|
2069
|
-
},
|
|
2094
|
+
}, Y = ({ analytics: e }) => {
|
|
2070
2095
|
let { t: n } = G(), r = (e, t) => {
|
|
2071
2096
|
let r = n(e);
|
|
2072
2097
|
return r === e ? t : r;
|
|
@@ -2141,17 +2166,17 @@ var Xe = [
|
|
|
2141
2166
|
]
|
|
2142
2167
|
}) : /* @__PURE__ */ U(m, {
|
|
2143
2168
|
illustration: "empty-data",
|
|
2144
|
-
icon: /* @__PURE__ */ U(
|
|
2169
|
+
icon: /* @__PURE__ */ U(we, { size: 32 }),
|
|
2145
2170
|
title: r("devportal.noAnalyticsData", "No analytics data"),
|
|
2146
2171
|
description: r("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
2147
2172
|
})
|
|
2148
2173
|
})]
|
|
2149
2174
|
});
|
|
2150
|
-
},
|
|
2175
|
+
}, yt = "# Sample query — replace with your own\n# Note: introspection is disabled on this gateway for security.\n# Use a real query from your app's API schema instead.\nquery GetCurrentUser {\n currentUser {\n id\n email\n }\n}", bt = ({ app: e }) => {
|
|
2151
2176
|
let { apiGatewayUrl: t, workspacesGatewayUrl: n, authToken: r } = y(), { t: i } = G(), a = (e, t) => {
|
|
2152
2177
|
let n = i(e);
|
|
2153
2178
|
return n === e ? t : n;
|
|
2154
|
-
}, [o, s] =
|
|
2179
|
+
}, [o, s] = P(yt), [c, l] = P("{}"), [u, d] = P(""), [f, p] = P(!1), [m, h] = P(`${t || "https://gw-global.local.burdenoff.com"}/global/graphql`), [g, _] = P(r || ""), [v, b] = P(!1), x = M(async () => {
|
|
2155
2180
|
p(!0), d("");
|
|
2156
2181
|
try {
|
|
2157
2182
|
let e = {};
|
|
@@ -2182,7 +2207,7 @@ var Xe = [
|
|
|
2182
2207
|
c,
|
|
2183
2208
|
m,
|
|
2184
2209
|
g
|
|
2185
|
-
]), S =
|
|
2210
|
+
]), S = M(() => {
|
|
2186
2211
|
r && _(r), b(!0);
|
|
2187
2212
|
}, [r]);
|
|
2188
2213
|
return /* @__PURE__ */ W("div", {
|
|
@@ -2211,7 +2236,7 @@ var Xe = [
|
|
|
2211
2236
|
})] }), /* @__PURE__ */ W("button", {
|
|
2212
2237
|
onClick: S,
|
|
2213
2238
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
2214
|
-
children: [/* @__PURE__ */ U(
|
|
2239
|
+
children: [/* @__PURE__ */ U(Me, { size: 14 }), a("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
2215
2240
|
})]
|
|
2216
2241
|
}),
|
|
2217
2242
|
v && /* @__PURE__ */ W("div", {
|
|
@@ -2312,10 +2337,10 @@ var Xe = [
|
|
|
2312
2337
|
onClick: x,
|
|
2313
2338
|
disabled: f,
|
|
2314
2339
|
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",
|
|
2315
|
-
children: [f ? /* @__PURE__ */ U(
|
|
2340
|
+
children: [f ? /* @__PURE__ */ U(z, {
|
|
2316
2341
|
size: 16,
|
|
2317
2342
|
className: "animate-spin"
|
|
2318
|
-
}) : /* @__PURE__ */ U(
|
|
2343
|
+
}) : /* @__PURE__ */ U(R, { size: 16 }), f ? a("devportal.executing", "Executing...") : a("devportal.executeQuery", "Execute Query")]
|
|
2319
2344
|
}),
|
|
2320
2345
|
u && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("label", {
|
|
2321
2346
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2326,13 +2351,13 @@ var Xe = [
|
|
|
2326
2351
|
})] })
|
|
2327
2352
|
]
|
|
2328
2353
|
});
|
|
2329
|
-
},
|
|
2354
|
+
}, X = /* @__PURE__ */ new Set(["workflow", "template"]), xt = [{
|
|
2330
2355
|
value: "FREE",
|
|
2331
2356
|
label: "Free"
|
|
2332
2357
|
}, {
|
|
2333
2358
|
value: "PAID",
|
|
2334
2359
|
label: "Paid"
|
|
2335
|
-
}],
|
|
2360
|
+
}], St = {
|
|
2336
2361
|
NODE: [
|
|
2337
2362
|
{
|
|
2338
2363
|
value: "node",
|
|
@@ -2404,12 +2429,12 @@ var Xe = [
|
|
|
2404
2429
|
label: "Plugin"
|
|
2405
2430
|
}
|
|
2406
2431
|
]
|
|
2407
|
-
},
|
|
2432
|
+
}, Ct = {
|
|
2408
2433
|
NODE: "node",
|
|
2409
2434
|
WORKFLOW: "workflow",
|
|
2410
2435
|
APP: "app"
|
|
2411
2436
|
};
|
|
2412
|
-
function
|
|
2437
|
+
function wt(e) {
|
|
2413
2438
|
let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
|
|
2414
2439
|
return {
|
|
2415
2440
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -2424,7 +2449,7 @@ function X(e) {
|
|
|
2424
2449
|
supportUrl: e.supportUrl ?? "",
|
|
2425
2450
|
privacyPolicyUrl: e.privacyPolicyUrl ?? "",
|
|
2426
2451
|
termsOfServiceUrl: e.termsOfServiceUrl ?? "",
|
|
2427
|
-
manifestItemType: typeof t.itemType == "string" ? t.itemType :
|
|
2452
|
+
manifestItemType: typeof t.itemType == "string" ? t.itemType : Ct[e.appType] ?? "",
|
|
2428
2453
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
|
|
2429
2454
|
manifestVersion: typeof n.version == "string" ? n.version : "",
|
|
2430
2455
|
manifestInstallType: typeof r.type == "string" ? r.type : "zip",
|
|
@@ -2435,90 +2460,90 @@ function X(e) {
|
|
|
2435
2460
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
2436
2461
|
};
|
|
2437
2462
|
}
|
|
2438
|
-
var
|
|
2439
|
-
let { workspacesGatewayUrl: m, authToken: h, workspaceId: g, getWorkspaceToken: _ } = y(), { t: v } = G(),
|
|
2463
|
+
var Tt = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u = !1, onNavigateToVersions: d, onNavigateToPricing: f, onNavigateToSubmission: p }) => {
|
|
2464
|
+
let { workspacesGatewayUrl: m, authToken: h, workspaceId: g, getWorkspaceToken: _ } = y(), { t: v } = G(), b = (e, t) => {
|
|
2440
2465
|
let n = v(e);
|
|
2441
2466
|
return n === e ? t : n;
|
|
2442
|
-
}, [
|
|
2467
|
+
}, [x, S] = P(() => wt(e)), [C, w] = P(!1), [T, O] = P(null), ee = be(wt(e)), te = be(e);
|
|
2443
2468
|
te.current = e;
|
|
2444
|
-
let ne = JSON.stringify(
|
|
2445
|
-
|
|
2446
|
-
let e =
|
|
2447
|
-
|
|
2469
|
+
let ne = JSON.stringify(x) !== JSON.stringify(ee.current), [k] = ve();
|
|
2470
|
+
ye(() => {
|
|
2471
|
+
let e = wt(te.current);
|
|
2472
|
+
S(e), ee.current = e, O(null);
|
|
2448
2473
|
}, [e.id]);
|
|
2449
|
-
let
|
|
2450
|
-
|
|
2474
|
+
let A = (e, t) => {
|
|
2475
|
+
S((n) => ({
|
|
2451
2476
|
...n,
|
|
2452
2477
|
[e]: t
|
|
2453
2478
|
})), O(null);
|
|
2454
|
-
},
|
|
2455
|
-
|
|
2479
|
+
}, re = x.shortDescription.trim().length > 0 && x.privacyPolicyUrl.trim().length > 0 && x.termsOfServiceUrl.trim().length > 0, ie = async () => {
|
|
2480
|
+
w(!0), O(null);
|
|
2456
2481
|
try {
|
|
2457
|
-
let t =
|
|
2482
|
+
let t = x.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = x.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = X.has(x.manifestItemType), i = e.manifest ?? {}, a = {
|
|
2458
2483
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
2459
|
-
itemType:
|
|
2484
|
+
itemType: x.manifestItemType || void 0,
|
|
2460
2485
|
identity: {
|
|
2461
|
-
version:
|
|
2462
|
-
displayName:
|
|
2486
|
+
version: x.manifestVersion || "1.0.0",
|
|
2487
|
+
displayName: x.manifestDisplayName
|
|
2463
2488
|
},
|
|
2464
|
-
...r ? { jsonContent:
|
|
2465
|
-
type:
|
|
2466
|
-
...
|
|
2489
|
+
...r ? { jsonContent: x.manifestJsonContent || void 0 } : { digital: { install: {
|
|
2490
|
+
type: x.manifestInstallType,
|
|
2491
|
+
...x.manifestInstallType === "zip" && x.manifestRegistryUrl ? { url: x.manifestRegistryUrl } : {}
|
|
2467
2492
|
} } },
|
|
2468
2493
|
permissions: n,
|
|
2469
|
-
compatibility: { minPlatformVersion:
|
|
2494
|
+
compatibility: { minPlatformVersion: x.manifestMinPlatformVersion }
|
|
2470
2495
|
};
|
|
2471
|
-
await
|
|
2496
|
+
await k({ variables: {
|
|
2472
2497
|
id: e.id,
|
|
2473
2498
|
input: {
|
|
2474
|
-
iconUrl:
|
|
2475
|
-
bannerUrl:
|
|
2476
|
-
videoUrl:
|
|
2477
|
-
shortDescription:
|
|
2478
|
-
description:
|
|
2499
|
+
iconUrl: x.iconUrl || null,
|
|
2500
|
+
bannerUrl: x.bannerUrl || null,
|
|
2501
|
+
videoUrl: x.videoUrl || null,
|
|
2502
|
+
shortDescription: x.shortDescription || null,
|
|
2503
|
+
description: x.description || null,
|
|
2479
2504
|
screenshots: t.length > 0 ? t : null,
|
|
2480
|
-
websiteUrl:
|
|
2481
|
-
documentationUrl:
|
|
2482
|
-
githubUrl:
|
|
2483
|
-
supportUrl:
|
|
2484
|
-
privacyPolicyUrl:
|
|
2485
|
-
termsOfServiceUrl:
|
|
2505
|
+
websiteUrl: x.websiteUrl || null,
|
|
2506
|
+
documentationUrl: x.documentationUrl || null,
|
|
2507
|
+
githubUrl: x.githubUrl || null,
|
|
2508
|
+
supportUrl: x.supportUrl || null,
|
|
2509
|
+
privacyPolicyUrl: x.privacyPolicyUrl || null,
|
|
2510
|
+
termsOfServiceUrl: x.termsOfServiceUrl || null,
|
|
2486
2511
|
manifest: a
|
|
2487
2512
|
}
|
|
2488
|
-
} }),
|
|
2513
|
+
} }), D("success"), O("success"), ee.current = x;
|
|
2489
2514
|
} catch {
|
|
2490
|
-
|
|
2515
|
+
D("error"), O("error");
|
|
2491
2516
|
} finally {
|
|
2492
|
-
|
|
2517
|
+
w(!1);
|
|
2493
2518
|
}
|
|
2494
|
-
}, { upload: ae, uploading: oe, progress: se, error: ce } =
|
|
2519
|
+
}, { upload: ae, uploading: oe, progress: se, error: ce } = E(m, h, g, _), { upload: j, uploading: le, progress: ue, error: de } = E(m, h, g, _), { upload: fe, uploading: pe, progress: me, error: he } = E(m, h, g, _), ge = X.has(x.manifestItemType), _e = e.status === "SUBMITTED", M = e.status === "PUBLISHED";
|
|
2495
2520
|
return /* @__PURE__ */ W("div", {
|
|
2496
2521
|
className: "space-y-8 max-w-3xl",
|
|
2497
2522
|
children: [
|
|
2498
|
-
|
|
2523
|
+
M ? /* @__PURE__ */ W("div", {
|
|
2499
2524
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2500
|
-
children: [/* @__PURE__ */ U(
|
|
2525
|
+
children: [/* @__PURE__ */ U(Te, {
|
|
2501
2526
|
size: 16,
|
|
2502
2527
|
className: "text-success mt-0.5 shrink-0"
|
|
2503
2528
|
}), /* @__PURE__ */ W("div", {
|
|
2504
2529
|
className: "text-sm",
|
|
2505
2530
|
children: [/* @__PURE__ */ U("span", {
|
|
2506
2531
|
className: "font-medium text-success",
|
|
2507
|
-
children:
|
|
2532
|
+
children: b("devportal.storeListing.published", "Published")
|
|
2508
2533
|
}), e.publishedAt && /* @__PURE__ */ W("span", {
|
|
2509
2534
|
className: "text-text-secondary ml-2",
|
|
2510
2535
|
children: [
|
|
2511
|
-
|
|
2536
|
+
b("devportal.storeListing.since", "since"),
|
|
2512
2537
|
" ",
|
|
2513
2538
|
new Date(e.publishedAt).toLocaleDateString()
|
|
2514
2539
|
]
|
|
2515
2540
|
})]
|
|
2516
2541
|
})]
|
|
2517
|
-
}) :
|
|
2542
|
+
}) : _e ? /* @__PURE__ */ W("div", {
|
|
2518
2543
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2519
2544
|
children: [/* @__PURE__ */ W("div", {
|
|
2520
2545
|
className: "flex items-start gap-3",
|
|
2521
|
-
children: [/* @__PURE__ */ U(
|
|
2546
|
+
children: [/* @__PURE__ */ U(De, {
|
|
2522
2547
|
size: 16,
|
|
2523
2548
|
className: "text-primary mt-0.5 shrink-0"
|
|
2524
2549
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -2526,7 +2551,7 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2526
2551
|
children: [
|
|
2527
2552
|
/* @__PURE__ */ U("span", {
|
|
2528
2553
|
className: "font-medium text-primary",
|
|
2529
|
-
children:
|
|
2554
|
+
children: b("devportal.storeListing.underReview", "Submitted for review")
|
|
2530
2555
|
}),
|
|
2531
2556
|
e.submittedAt && /* @__PURE__ */ U("span", {
|
|
2532
2557
|
className: "text-text-secondary ml-2",
|
|
@@ -2542,164 +2567,164 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2542
2567
|
type: "button",
|
|
2543
2568
|
onClick: p,
|
|
2544
2569
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2545
|
-
children: [
|
|
2570
|
+
children: [b("devportal.viewStatus", "View Status"), /* @__PURE__ */ U(R, { size: 12 })]
|
|
2546
2571
|
})]
|
|
2547
2572
|
}) : /* @__PURE__ */ W("div", {
|
|
2548
2573
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
2549
|
-
children: [/* @__PURE__ */ U(
|
|
2574
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
2550
2575
|
size: 16,
|
|
2551
2576
|
className: "text-warning mt-0.5 shrink-0"
|
|
2552
2577
|
}), /* @__PURE__ */ W("div", {
|
|
2553
2578
|
className: "text-sm",
|
|
2554
2579
|
children: [/* @__PURE__ */ U("span", {
|
|
2555
2580
|
className: "font-medium text-warning",
|
|
2556
|
-
children:
|
|
2581
|
+
children: b("devportal.storeListing.draft", "Draft")
|
|
2557
2582
|
}), /* @__PURE__ */ U("span", {
|
|
2558
2583
|
className: "text-text-secondary ml-2",
|
|
2559
|
-
children:
|
|
2584
|
+
children: b("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
|
|
2560
2585
|
})]
|
|
2561
2586
|
})]
|
|
2562
2587
|
}),
|
|
2563
2588
|
/* @__PURE__ */ U(t, {
|
|
2564
|
-
title:
|
|
2565
|
-
description:
|
|
2589
|
+
title: b("devportal.package", "Package"),
|
|
2590
|
+
description: b("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
|
|
2566
2591
|
children: /* @__PURE__ */ W("div", {
|
|
2567
2592
|
className: "space-y-6",
|
|
2568
2593
|
children: [
|
|
2569
2594
|
/* @__PURE__ */ U(r, {
|
|
2570
|
-
label:
|
|
2571
|
-
value:
|
|
2595
|
+
label: b("devportal.storeItemType", "Item Type"),
|
|
2596
|
+
value: x.manifestItemType,
|
|
2572
2597
|
onChange: (e) => {
|
|
2573
2598
|
let t = e.target.value;
|
|
2574
|
-
|
|
2599
|
+
A("manifestItemType", t), X.has(t) ? A("manifestInstallType", "json") : x.manifestInstallType === "json" && A("manifestInstallType", "zip");
|
|
2575
2600
|
},
|
|
2576
|
-
options:
|
|
2577
|
-
placeholder:
|
|
2578
|
-
hint:
|
|
2601
|
+
options: St[e.appType] ?? St.APP,
|
|
2602
|
+
placeholder: b("devportal.selectItemType", "Select item type…"),
|
|
2603
|
+
hint: b("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
|
|
2579
2604
|
}),
|
|
2580
2605
|
/* @__PURE__ */ U(n, {
|
|
2581
|
-
label:
|
|
2582
|
-
value:
|
|
2583
|
-
onChange: (e) =>
|
|
2606
|
+
label: b("devportal.manifestDisplayName", "Display Name"),
|
|
2607
|
+
value: x.manifestDisplayName,
|
|
2608
|
+
onChange: (e) => A("manifestDisplayName", e.target.value),
|
|
2584
2609
|
placeholder: "My Awesome Node"
|
|
2585
2610
|
}),
|
|
2586
|
-
|
|
2587
|
-
label: e.appType === "WORKFLOW" ?
|
|
2588
|
-
value:
|
|
2589
|
-
onChange: (e) =>
|
|
2611
|
+
ge && /* @__PURE__ */ U(i, {
|
|
2612
|
+
label: e.appType === "WORKFLOW" ? b("devportal.workflowJsonContent", "Workflow Canvas Definition (JSON)") : b("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2613
|
+
value: x.manifestJsonContent,
|
|
2614
|
+
onChange: (e) => A("manifestJsonContent", e.target.value),
|
|
2590
2615
|
rows: 12,
|
|
2591
2616
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2592
|
-
hint: e.appType === "WORKFLOW" ?
|
|
2617
|
+
hint: e.appType === "WORKFLOW" ? b("devportal.workflowJsonContentHint", "Paste the workflow canvas JSON (nodes + edges). This is what recipients receive when they copy your workflow via the share link. Format: { \"nodes\": [...], \"edges\": [...] }") : b("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2593
2618
|
})
|
|
2594
2619
|
]
|
|
2595
2620
|
})
|
|
2596
2621
|
}),
|
|
2597
2622
|
/* @__PURE__ */ U(t, {
|
|
2598
|
-
title:
|
|
2599
|
-
description:
|
|
2623
|
+
title: b("devportal.storePresentation", "Store Presence"),
|
|
2624
|
+
description: b("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
|
|
2600
2625
|
children: /* @__PURE__ */ W("div", {
|
|
2601
2626
|
className: "space-y-5",
|
|
2602
2627
|
children: [
|
|
2603
2628
|
/* @__PURE__ */ W("div", {
|
|
2604
2629
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2605
2630
|
children: [/* @__PURE__ */ U(o, {
|
|
2606
|
-
label:
|
|
2607
|
-
value:
|
|
2608
|
-
onChange: (e) =>
|
|
2609
|
-
hint:
|
|
2631
|
+
label: b("devportal.iconUrl", "Icon"),
|
|
2632
|
+
value: x.iconUrl,
|
|
2633
|
+
onChange: (e) => A("iconUrl", e),
|
|
2634
|
+
hint: b("devportal.iconUrlHint", "Shown in marketplace cards and search — square proportions (1:1)"),
|
|
2610
2635
|
aspectClass: "aspect-square",
|
|
2611
2636
|
upload: ae,
|
|
2612
2637
|
uploading: oe,
|
|
2613
2638
|
progress: se,
|
|
2614
2639
|
error: ce
|
|
2615
2640
|
}), /* @__PURE__ */ U(o, {
|
|
2616
|
-
label:
|
|
2617
|
-
value:
|
|
2618
|
-
onChange: (e) =>
|
|
2619
|
-
hint:
|
|
2641
|
+
label: b("devportal.bannerUrl", "Banner"),
|
|
2642
|
+
value: x.bannerUrl,
|
|
2643
|
+
onChange: (e) => A("bannerUrl", e),
|
|
2644
|
+
hint: b("devportal.bannerUrlHint", "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)"),
|
|
2620
2645
|
aspectClass: "aspect-square",
|
|
2621
|
-
upload:
|
|
2622
|
-
uploading:
|
|
2623
|
-
progress:
|
|
2624
|
-
error:
|
|
2646
|
+
upload: j,
|
|
2647
|
+
uploading: le,
|
|
2648
|
+
progress: ue,
|
|
2649
|
+
error: de
|
|
2625
2650
|
})]
|
|
2626
2651
|
}),
|
|
2627
2652
|
/* @__PURE__ */ U(n, {
|
|
2628
|
-
label:
|
|
2629
|
-
value:
|
|
2630
|
-
onChange: (e) =>
|
|
2653
|
+
label: b("devportal.videoUrl", "Demo Video URL"),
|
|
2654
|
+
value: x.videoUrl,
|
|
2655
|
+
onChange: (e) => A("videoUrl", e.target.value),
|
|
2631
2656
|
placeholder: "https://...",
|
|
2632
|
-
hint:
|
|
2657
|
+
hint: b("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2633
2658
|
}),
|
|
2634
2659
|
/* @__PURE__ */ U(a, {
|
|
2635
|
-
label:
|
|
2636
|
-
value:
|
|
2637
|
-
onChange: (e) =>
|
|
2660
|
+
label: b("devportal.shortDescription", "Short Description"),
|
|
2661
|
+
value: x.shortDescription,
|
|
2662
|
+
onChange: (e) => A("shortDescription", e),
|
|
2638
2663
|
maxLength: 200,
|
|
2639
2664
|
rows: 2,
|
|
2640
|
-
hint: `${
|
|
2665
|
+
hint: `${x.shortDescription.length}/200 · ${b("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2641
2666
|
}),
|
|
2642
2667
|
/* @__PURE__ */ U(a, {
|
|
2643
|
-
label:
|
|
2644
|
-
value:
|
|
2645
|
-
onChange: (e) =>
|
|
2668
|
+
label: b("devportal.longDescription", "Full Description"),
|
|
2669
|
+
value: x.description,
|
|
2670
|
+
onChange: (e) => A("description", e),
|
|
2646
2671
|
rows: 5,
|
|
2647
|
-
hint:
|
|
2672
|
+
hint: b("devportal.fullDescHint", "Markdown supported")
|
|
2648
2673
|
}),
|
|
2649
2674
|
/* @__PURE__ */ U(s, {
|
|
2650
|
-
urls:
|
|
2651
|
-
onChange: (e) =>
|
|
2652
|
-
upload:
|
|
2653
|
-
uploading:
|
|
2654
|
-
progress:
|
|
2655
|
-
error:
|
|
2675
|
+
urls: x.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2676
|
+
onChange: (e) => A("screenshotsText", e.join("\n")),
|
|
2677
|
+
upload: fe,
|
|
2678
|
+
uploading: pe,
|
|
2679
|
+
progress: me,
|
|
2680
|
+
error: he
|
|
2656
2681
|
})
|
|
2657
2682
|
]
|
|
2658
2683
|
})
|
|
2659
2684
|
}),
|
|
2660
2685
|
/* @__PURE__ */ U(t, {
|
|
2661
|
-
title:
|
|
2662
|
-
description:
|
|
2686
|
+
title: b("devportal.linksPolicies", "Links & Policies"),
|
|
2687
|
+
description: b("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
|
|
2663
2688
|
children: /* @__PURE__ */ W("div", {
|
|
2664
2689
|
className: "grid gap-4 sm:grid-cols-2",
|
|
2665
2690
|
children: [
|
|
2666
2691
|
/* @__PURE__ */ U(n, {
|
|
2667
|
-
label:
|
|
2668
|
-
value:
|
|
2669
|
-
onChange: (e) =>
|
|
2692
|
+
label: b("devportal.websiteUrl", "Website"),
|
|
2693
|
+
value: x.websiteUrl,
|
|
2694
|
+
onChange: (e) => A("websiteUrl", e.target.value),
|
|
2670
2695
|
placeholder: "https://..."
|
|
2671
2696
|
}),
|
|
2672
2697
|
/* @__PURE__ */ U(n, {
|
|
2673
|
-
label:
|
|
2674
|
-
value:
|
|
2675
|
-
onChange: (e) =>
|
|
2698
|
+
label: b("devportal.documentationUrl", "Documentation"),
|
|
2699
|
+
value: x.documentationUrl,
|
|
2700
|
+
onChange: (e) => A("documentationUrl", e.target.value),
|
|
2676
2701
|
placeholder: "https://..."
|
|
2677
2702
|
}),
|
|
2678
2703
|
/* @__PURE__ */ U(n, {
|
|
2679
|
-
label:
|
|
2680
|
-
value:
|
|
2681
|
-
onChange: (e) =>
|
|
2704
|
+
label: b("devportal.githubUrl", "GitHub"),
|
|
2705
|
+
value: x.githubUrl,
|
|
2706
|
+
onChange: (e) => A("githubUrl", e.target.value),
|
|
2682
2707
|
placeholder: "https://github.com/..."
|
|
2683
2708
|
}),
|
|
2684
2709
|
/* @__PURE__ */ U(n, {
|
|
2685
|
-
label:
|
|
2686
|
-
value:
|
|
2687
|
-
onChange: (e) =>
|
|
2710
|
+
label: b("devportal.supportUrl", "Support"),
|
|
2711
|
+
value: x.supportUrl,
|
|
2712
|
+
onChange: (e) => A("supportUrl", e.target.value),
|
|
2688
2713
|
placeholder: "https://..."
|
|
2689
2714
|
}),
|
|
2690
2715
|
/* @__PURE__ */ U(n, {
|
|
2691
|
-
label: `${
|
|
2692
|
-
value:
|
|
2693
|
-
onChange: (e) =>
|
|
2716
|
+
label: `${b("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
|
|
2717
|
+
value: x.privacyPolicyUrl,
|
|
2718
|
+
onChange: (e) => A("privacyPolicyUrl", e.target.value),
|
|
2694
2719
|
placeholder: "https://...",
|
|
2695
|
-
hint:
|
|
2720
|
+
hint: b("devportal.requiredForStore", "Required for store submission")
|
|
2696
2721
|
}),
|
|
2697
2722
|
/* @__PURE__ */ U(n, {
|
|
2698
|
-
label: `${
|
|
2699
|
-
value:
|
|
2700
|
-
onChange: (e) =>
|
|
2723
|
+
label: `${b("devportal.termsOfServiceUrl", "Terms of Service")} *`,
|
|
2724
|
+
value: x.termsOfServiceUrl,
|
|
2725
|
+
onChange: (e) => A("termsOfServiceUrl", e.target.value),
|
|
2701
2726
|
placeholder: "https://...",
|
|
2702
|
-
hint:
|
|
2727
|
+
hint: b("devportal.requiredForStore", "Required for store submission")
|
|
2703
2728
|
})
|
|
2704
2729
|
]
|
|
2705
2730
|
})
|
|
@@ -2707,19 +2732,19 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2707
2732
|
/* @__PURE__ */ W("div", {
|
|
2708
2733
|
className: "border-t pt-6 space-y-3",
|
|
2709
2734
|
children: [
|
|
2710
|
-
|
|
2735
|
+
T === "success" && /* @__PURE__ */ W("div", {
|
|
2711
2736
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2712
|
-
children: [/* @__PURE__ */ U(
|
|
2737
|
+
children: [/* @__PURE__ */ U(Te, {
|
|
2713
2738
|
size: 15,
|
|
2714
2739
|
className: "shrink-0"
|
|
2715
|
-
}),
|
|
2740
|
+
}), b("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
2716
2741
|
}),
|
|
2717
|
-
|
|
2742
|
+
T === "error" && /* @__PURE__ */ W("div", {
|
|
2718
2743
|
className: "flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2719
|
-
children: [/* @__PURE__ */ U(
|
|
2744
|
+
children: [/* @__PURE__ */ U(Se, {
|
|
2720
2745
|
size: 15,
|
|
2721
2746
|
className: "shrink-0"
|
|
2722
|
-
}),
|
|
2747
|
+
}), b("devportal.storeListing.savedError", "Failed to save. Please try again.")]
|
|
2723
2748
|
}),
|
|
2724
2749
|
/* @__PURE__ */ W("div", {
|
|
2725
2750
|
className: "flex flex-wrap items-center gap-3",
|
|
@@ -2727,29 +2752,29 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2727
2752
|
/* @__PURE__ */ U("button", {
|
|
2728
2753
|
type: "button",
|
|
2729
2754
|
onClick: ie,
|
|
2730
|
-
disabled:
|
|
2731
|
-
title:
|
|
2755
|
+
disabled: C || !re || !ne,
|
|
2756
|
+
title: re ? ne ? void 0 : b("devportal.storeListing.noChanges", "All changes saved — edit any field to save again") : b("devportal.storeListing.requiredFieldsHint", "Fill in Short Description, Privacy Policy URL, and Terms of Service URL to save"),
|
|
2732
2757
|
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",
|
|
2733
|
-
children:
|
|
2758
|
+
children: C ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(z, {
|
|
2734
2759
|
size: 16,
|
|
2735
2760
|
className: "animate-spin"
|
|
2736
|
-
}),
|
|
2761
|
+
}), b("devportal.saving", "Saving…")] }) : ne ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Be, { size: 16 }), b("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(F, { size: 16 }), b("devportal.saved", "Saved")] })
|
|
2737
2762
|
}),
|
|
2738
|
-
!
|
|
2763
|
+
!re && /* @__PURE__ */ U("p", {
|
|
2739
2764
|
className: "text-xs text-text-secondary",
|
|
2740
|
-
children:
|
|
2765
|
+
children: b("devportal.storeListing.requiredFieldsLabel", "Short Description, Privacy Policy URL, and Terms of Service URL are required")
|
|
2741
2766
|
}),
|
|
2742
2767
|
l && c === 0 && d && /* @__PURE__ */ W("button", {
|
|
2743
2768
|
type: "button",
|
|
2744
2769
|
onClick: d,
|
|
2745
2770
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2746
|
-
children: [
|
|
2771
|
+
children: [b("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ U(Ee, { size: 15 })]
|
|
2747
2772
|
}),
|
|
2748
2773
|
(!l || c > 0) && !u && f && /* @__PURE__ */ W("button", {
|
|
2749
2774
|
type: "button",
|
|
2750
2775
|
onClick: f,
|
|
2751
2776
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2752
|
-
children: [
|
|
2777
|
+
children: [b("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ U(Ee, { size: 15 })]
|
|
2753
2778
|
})
|
|
2754
2779
|
]
|
|
2755
2780
|
})
|
|
@@ -2759,7 +2784,7 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2759
2784
|
});
|
|
2760
2785
|
}, Z = ({ label: e, value: t, trend: n }) => {
|
|
2761
2786
|
let { t: r } = G();
|
|
2762
|
-
return /* @__PURE__ */ W(
|
|
2787
|
+
return /* @__PURE__ */ W(Qe, {
|
|
2763
2788
|
treatment: "metric",
|
|
2764
2789
|
className: "p-4",
|
|
2765
2790
|
children: [
|
|
@@ -2772,7 +2797,7 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2772
2797
|
children: t
|
|
2773
2798
|
}),
|
|
2774
2799
|
n !== void 0 && /* @__PURE__ */ W("p", {
|
|
2775
|
-
className:
|
|
2800
|
+
className: k("text-xs mt-1 tabular-nums", n > 0 ? "text-status-success-text" : n < 0 ? "text-status-error-text" : "text-text-secondary"),
|
|
2776
2801
|
children: [
|
|
2777
2802
|
n > 0 ? "+" : "",
|
|
2778
2803
|
n.toFixed(1),
|
|
@@ -2790,7 +2815,7 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2790
2815
|
target: "_blank",
|
|
2791
2816
|
rel: "noopener noreferrer",
|
|
2792
2817
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2793
|
-
children: [/* @__PURE__ */ U(
|
|
2818
|
+
children: [/* @__PURE__ */ U(R, { size: 14 }), e]
|
|
2794
2819
|
}), $ = {
|
|
2795
2820
|
auth: {
|
|
2796
2821
|
label: "Authentication",
|
|
@@ -2848,8 +2873,8 @@ var _t = ({ app: e, versionCount: c = 0, isPackageApp: l = !1, pricingDone: u =
|
|
|
2848
2873
|
label: "Roles & Permissions",
|
|
2849
2874
|
description: "Access control configuration"
|
|
2850
2875
|
}
|
|
2851
|
-
},
|
|
2852
|
-
function
|
|
2876
|
+
}, Et = Object.keys($);
|
|
2877
|
+
function Dt(e) {
|
|
2853
2878
|
if (!e || !Array.isArray(e.permissions)) return [];
|
|
2854
2879
|
let t = [];
|
|
2855
2880
|
for (let n of e.permissions) n && typeof n == "object" && typeof n.resource == "string" && n.resource && t.push({
|
|
@@ -2858,7 +2883,7 @@ function yt(e) {
|
|
|
2858
2883
|
});
|
|
2859
2884
|
return t;
|
|
2860
2885
|
}
|
|
2861
|
-
function
|
|
2886
|
+
function Ot(e) {
|
|
2862
2887
|
let t = [];
|
|
2863
2888
|
for (let n of e) {
|
|
2864
2889
|
let e = n.indexOf(":");
|
|
@@ -2871,12 +2896,12 @@ function bt(e) {
|
|
|
2871
2896
|
}
|
|
2872
2897
|
return t;
|
|
2873
2898
|
}
|
|
2874
|
-
function
|
|
2899
|
+
function kt(e, t) {
|
|
2875
2900
|
if (e.length > 0) return e;
|
|
2876
2901
|
let n = /* @__PURE__ */ new Set();
|
|
2877
2902
|
return t.filter((e) => !n.has(e.resource) && (n.add(e.resource), !0));
|
|
2878
2903
|
}
|
|
2879
|
-
var
|
|
2904
|
+
var At = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
2880
2905
|
className: "flex items-center gap-0.5 rounded-md border border-border-subtle bg-bg-sunken/50 p-0.5",
|
|
2881
2906
|
children: ["read", "write"].map((n) => /* @__PURE__ */ U("button", {
|
|
2882
2907
|
type: "button",
|
|
@@ -2884,8 +2909,8 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
2884
2909
|
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"}`,
|
|
2885
2910
|
children: n === "read" ? "Read" : "Read & Write"
|
|
2886
2911
|
}, n))
|
|
2887
|
-
}),
|
|
2888
|
-
let a = e.manifest ?? {}, [o, s] =
|
|
2912
|
+
}), jt = ({ app: e, versionScopes: n, locked: r = !1, onNavigateToVersions: i }) => {
|
|
2913
|
+
let a = e.manifest ?? {}, [o, s] = P(() => kt(Dt(a), Ot(n ?? []))), [c, l] = P(!1), [u, d] = P(""), [f, p] = P("read"), [m, h] = P(!1), [g, _] = P(!1), [v] = ve(), y = (e, t) => {
|
|
2889
2914
|
_(!1), s((n) => n.map((n) => n.resource === e ? {
|
|
2890
2915
|
...n,
|
|
2891
2916
|
level: t
|
|
@@ -2937,7 +2962,7 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
2937
2962
|
}), r ? /* @__PURE__ */ U("span", {
|
|
2938
2963
|
className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${e.level === "write" ? "bg-status-warning-bg text-status-warning-text" : "bg-bg-sunken text-text-secondary"}`,
|
|
2939
2964
|
children: e.level === "write" ? "Read & Write" : "Read"
|
|
2940
|
-
}) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(
|
|
2965
|
+
}) : /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(At, {
|
|
2941
2966
|
level: e.level,
|
|
2942
2967
|
onChange: (t) => y(e.resource, t)
|
|
2943
2968
|
}), /* @__PURE__ */ U("button", {
|
|
@@ -2945,7 +2970,7 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
2945
2970
|
onClick: () => b(e.resource),
|
|
2946
2971
|
title: "Remove permission",
|
|
2947
2972
|
className: "p-1.5 rounded text-text-tertiary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
2948
|
-
children: /* @__PURE__ */ U(
|
|
2973
|
+
children: /* @__PURE__ */ U(Ke, { size: 14 })
|
|
2949
2974
|
})] })]
|
|
2950
2975
|
}, e.resource))
|
|
2951
2976
|
});
|
|
@@ -2956,7 +2981,7 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
2956
2981
|
className: "space-y-4",
|
|
2957
2982
|
children: r ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W("div", {
|
|
2958
2983
|
className: "rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-3 flex gap-2 text-sm",
|
|
2959
|
-
children: [/* @__PURE__ */ U(
|
|
2984
|
+
children: [/* @__PURE__ */ U(je, {
|
|
2960
2985
|
size: 15,
|
|
2961
2986
|
className: "flex-shrink-0 mt-0.5 text-status-warning-text"
|
|
2962
2987
|
}), /* @__PURE__ */ W("span", {
|
|
@@ -2980,7 +3005,7 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
2980
3005
|
o.length === 0 ? /* @__PURE__ */ W("div", {
|
|
2981
3006
|
className: "rounded-lg border border-border-subtle border-dashed p-8 flex flex-col items-center gap-2 text-center text-text-secondary",
|
|
2982
3007
|
children: [
|
|
2983
|
-
/* @__PURE__ */ U(
|
|
3008
|
+
/* @__PURE__ */ U(V, {
|
|
2984
3009
|
size: 28,
|
|
2985
3010
|
className: "opacity-25"
|
|
2986
3011
|
}),
|
|
@@ -3011,12 +3036,12 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
3011
3036
|
}),
|
|
3012
3037
|
/* @__PURE__ */ U("datalist", {
|
|
3013
3038
|
id: "perm-resource-suggestions",
|
|
3014
|
-
children:
|
|
3039
|
+
children: Et.filter((e) => !o.some((t) => t.resource === e)).map((e) => /* @__PURE__ */ U("option", {
|
|
3015
3040
|
value: e,
|
|
3016
3041
|
children: $[e].label
|
|
3017
3042
|
}, e))
|
|
3018
3043
|
}),
|
|
3019
|
-
/* @__PURE__ */ U(
|
|
3044
|
+
/* @__PURE__ */ U(At, {
|
|
3020
3045
|
level: f,
|
|
3021
3046
|
onChange: p
|
|
3022
3047
|
}),
|
|
@@ -3033,18 +3058,18 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
3033
3058
|
l(!1), d("");
|
|
3034
3059
|
},
|
|
3035
3060
|
className: "p-1.5 rounded text-text-secondary hover:text-text-primary transition-colors",
|
|
3036
|
-
children: /* @__PURE__ */ U(
|
|
3061
|
+
children: /* @__PURE__ */ U(Ke, { size: 14 })
|
|
3037
3062
|
})
|
|
3038
3063
|
]
|
|
3039
3064
|
}) : /* @__PURE__ */ W("button", {
|
|
3040
3065
|
type: "button",
|
|
3041
3066
|
onClick: () => l(!0),
|
|
3042
3067
|
className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
|
|
3043
|
-
children: [/* @__PURE__ */ U(
|
|
3068
|
+
children: [/* @__PURE__ */ U(B, { size: 14 }), "Add permission"]
|
|
3044
3069
|
}),
|
|
3045
3070
|
/* @__PURE__ */ W("div", {
|
|
3046
3071
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
3047
|
-
children: [/* @__PURE__ */ U(
|
|
3072
|
+
children: [/* @__PURE__ */ U(je, {
|
|
3048
3073
|
size: 14,
|
|
3049
3074
|
className: "flex-shrink-0 mt-0.5"
|
|
3050
3075
|
}), /* @__PURE__ */ W("span", { children: [/* @__PURE__ */ U("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
@@ -3053,22 +3078,22 @@ var St = ({ level: e, onChange: t }) => /* @__PURE__ */ U("div", {
|
|
|
3053
3078
|
className: "flex items-center justify-end gap-3",
|
|
3054
3079
|
children: [g && /* @__PURE__ */ W("span", {
|
|
3055
3080
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
3056
|
-
children: [/* @__PURE__ */ U(
|
|
3081
|
+
children: [/* @__PURE__ */ U(Te, { size: 14 }), "Saved"]
|
|
3057
3082
|
}), /* @__PURE__ */ W("button", {
|
|
3058
3083
|
type: "button",
|
|
3059
3084
|
onClick: () => void S(),
|
|
3060
3085
|
disabled: m,
|
|
3061
3086
|
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",
|
|
3062
|
-
children: [m ? /* @__PURE__ */ U(
|
|
3087
|
+
children: [m ? /* @__PURE__ */ U(z, {
|
|
3063
3088
|
size: 14,
|
|
3064
3089
|
className: "animate-spin"
|
|
3065
|
-
}) : /* @__PURE__ */ U(
|
|
3090
|
+
}) : /* @__PURE__ */ U(V, { size: 14 }), "Save Permissions"]
|
|
3066
3091
|
})]
|
|
3067
3092
|
})
|
|
3068
3093
|
] })
|
|
3069
3094
|
})
|
|
3070
3095
|
});
|
|
3071
3096
|
};
|
|
3072
|
-
export {
|
|
3097
|
+
export { st as ApplicationDetailPage };
|
|
3073
3098
|
|
|
3074
3099
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|