@burdenoff/microfe-devportal 2026.703.6 → 2026.705.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/ApplicationDetailPage.js +370 -291
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js +17 -28
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +445 -321
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/dist/generated/global-operations.js +200 -185
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,20 +10,20 @@ import { SelectionCheckbox as w } from "../components/SelectionCheckbox.js";
|
|
|
10
10
|
import { nativeNotify as T } from "../../utils/nativeBridge.js";
|
|
11
11
|
import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
|
|
12
12
|
import { DataTable as E, DetailList as D } from "../components/DataTable.js";
|
|
13
|
-
import { InputField as O, SelectField as
|
|
14
|
-
import { ConfirmDialog as
|
|
15
|
-
import { GrantDelegationModal as
|
|
16
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
17
|
-
import { useDevportalPermission as
|
|
18
|
-
import { usePackageUpload as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { AlertCircle as
|
|
22
|
-
import { useParams as
|
|
13
|
+
import { InputField as O, SelectField as te, TextareaField as ne } from "../components/FormField.js";
|
|
14
|
+
import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
|
|
15
|
+
import { GrantDelegationModal as ie } from "../components/GrantDelegationModal.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
|
|
17
|
+
import { useDevportalPermission as oe } from "../hooks/usePermission.js";
|
|
18
|
+
import { usePackageUpload as k } from "../hooks/usePackageUpload.js";
|
|
19
|
+
import { useCallback as A, useEffect as se, useMemo as j, useRef as M, useState as N } from "react";
|
|
20
|
+
import { useI18n as P } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
21
|
+
import { AlertCircle as ce, AppWindow as le, BarChart3 as F, Check as I, CheckCircle as ue, ChevronRight as de, CircleDollarSign as L, Clock as fe, Edit as pe, ExternalLink as R, FlaskConical as me, Gift as he, Info as ge, Key as z, Loader2 as B, Lock as _e, MoreHorizontal as ve, Package as ye, Plus as V, Power as be, RefreshCw as xe, SendHorizontal as Se, Shield as H, Store as Ce, TrendingUp as we, Upload as U, Users as Te, Wallet as Ee, Webhook as De, X as Oe, XCircle as ke } from "lucide-react";
|
|
22
|
+
import { useParams as Ae } from "react-router-dom";
|
|
23
23
|
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
24
|
-
import { CTAOverflowMenu as
|
|
24
|
+
import { CTAOverflowMenu as je, EmphasisPanel as Me, GlassCard as Ne } from "@burdenoff/fe-libs/ui";
|
|
25
25
|
//#region src/devportal/pages/ApplicationDetailPage.tsx
|
|
26
|
-
function
|
|
26
|
+
function Pe(e) {
|
|
27
27
|
return e ? {
|
|
28
28
|
id: e.id,
|
|
29
29
|
name: e.name,
|
|
@@ -76,7 +76,7 @@ function Ne(e) {
|
|
|
76
76
|
updatedAt: e.updatedAt
|
|
77
77
|
} : null;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function q(e) {
|
|
80
80
|
return {
|
|
81
81
|
id: e.id,
|
|
82
82
|
applicationId: e.applicationId,
|
|
@@ -100,7 +100,7 @@ function Pe(e) {
|
|
|
100
100
|
updatedAt: e.updatedAt
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Fe(e) {
|
|
104
104
|
return {
|
|
105
105
|
id: e.id,
|
|
106
106
|
applicationId: e.applicationId,
|
|
@@ -116,7 +116,7 @@ function q(e) {
|
|
|
116
116
|
createdAt: e.createdAt
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ie(e) {
|
|
120
120
|
return {
|
|
121
121
|
id: e.id,
|
|
122
122
|
appId: e.appId,
|
|
@@ -138,152 +138,162 @@ function Fe(e) {
|
|
|
138
138
|
revokedBy: e.revokedBy || void 0
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
var
|
|
141
|
+
var Le = [
|
|
142
142
|
{
|
|
143
143
|
id: "overview",
|
|
144
144
|
label: "Overview",
|
|
145
|
-
icon:
|
|
145
|
+
icon: le
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
id: "analytics",
|
|
149
149
|
label: "Analytics",
|
|
150
|
-
icon:
|
|
150
|
+
icon: F
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
id: "store-listing",
|
|
154
154
|
label: "Store Listing",
|
|
155
|
-
icon:
|
|
155
|
+
icon: Ce
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
id: "versions",
|
|
159
159
|
label: "Versions",
|
|
160
|
-
icon:
|
|
160
|
+
icon: ye
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
id: "pricing",
|
|
164
164
|
label: "Pricing",
|
|
165
|
-
icon:
|
|
165
|
+
icon: L
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
id: "permissions",
|
|
169
169
|
label: "Permissions",
|
|
170
|
-
icon:
|
|
170
|
+
icon: H
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
id: "webhooks",
|
|
174
174
|
label: "Webhooks",
|
|
175
|
-
icon:
|
|
175
|
+
icon: De
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
id: "delegations",
|
|
179
179
|
label: "Delegations",
|
|
180
|
-
icon:
|
|
180
|
+
icon: Te
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
id: "playground",
|
|
184
184
|
label: "API Playground",
|
|
185
|
+
icon: R
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "oauth",
|
|
189
|
+
label: "OAuth",
|
|
190
|
+
icon: _e
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "api-keys",
|
|
194
|
+
label: "API Keys",
|
|
185
195
|
icon: z
|
|
186
196
|
}
|
|
187
|
-
],
|
|
197
|
+
], Re = {
|
|
188
198
|
ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
|
|
189
199
|
REVOKED: "bg-status-error-bg-subtle text-status-error-text",
|
|
190
200
|
EXPIRED: "bg-bg-sunken text-text-secondary"
|
|
191
|
-
},
|
|
201
|
+
}, ze = ({ message: e = "Loading..." }) => /* @__PURE__ */ K("div", {
|
|
192
202
|
className: "flex items-center justify-center gap-3 py-12",
|
|
193
|
-
children: [/* @__PURE__ */ G(
|
|
203
|
+
children: [/* @__PURE__ */ G(B, {
|
|
194
204
|
size: 20,
|
|
195
205
|
className: "animate-spin text-text-secondary"
|
|
196
206
|
}), /* @__PURE__ */ G("p", {
|
|
197
207
|
className: "text-sm text-text-secondary",
|
|
198
208
|
children: e
|
|
199
209
|
})]
|
|
200
|
-
}),
|
|
210
|
+
}), Be = ({ message: e }) => /* @__PURE__ */ K("div", {
|
|
201
211
|
className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
|
|
202
|
-
children: [/* @__PURE__ */ G(
|
|
212
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
203
213
|
size: 32,
|
|
204
214
|
className: "text-status-error-text"
|
|
205
215
|
}), /* @__PURE__ */ G("p", {
|
|
206
216
|
className: "text-sm text-text-secondary",
|
|
207
217
|
children: e
|
|
208
218
|
})]
|
|
209
|
-
}),
|
|
210
|
-
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } =
|
|
219
|
+
}), J = () => {
|
|
220
|
+
let { navigate: i, basePath: o, workspaceId: c } = e(), { t: u } = P(), p = (e, t) => {
|
|
211
221
|
let n = u(e);
|
|
212
222
|
return n === e ? t : n;
|
|
213
|
-
}, { allowed: _ } = ae
|
|
223
|
+
}, { allowed: _ } = oe(ae.APP_UPDATE), { allowed: y } = oe(ae.APP_DELETE), { appId: w } = Ae(), [E, D] = N("overview"), [O, te] = N(!1), [ne, k] = N(!1), [se, j] = N(null), [M, F] = N(!1), { data: L, loading: R, error: he, refetch: ge } = s({
|
|
214
224
|
variables: { id: w },
|
|
215
225
|
skip: !w
|
|
216
|
-
}), [
|
|
226
|
+
}), [z, { loading: _e }] = m(), [ve, { loading: ye }] = a(), [V, { loading: H }] = h(), [we, { loading: U }] = f(), [Te, { loading: Ee }] = g(), { data: De, refetch: Oe } = d({
|
|
217
227
|
variables: {
|
|
218
228
|
applicationId: w,
|
|
219
229
|
workspaceId: c ?? void 0
|
|
220
230
|
},
|
|
221
231
|
skip: !c || !w,
|
|
222
232
|
fetchPolicy: "cache-and-network"
|
|
223
|
-
}), Me = De?.appInstallations?.edges?.[0]?.node ?? null, { data:
|
|
224
|
-
variables: { id:
|
|
225
|
-
skip: !
|
|
233
|
+
}), Me = De?.appInstallations?.edges?.[0]?.node ?? null, { data: Ne } = l({
|
|
234
|
+
variables: { id: L?.application?.developerOrganizationId ?? "" },
|
|
235
|
+
skip: !L?.application?.developerOrganizationId,
|
|
226
236
|
fetchPolicy: "cache-first"
|
|
227
|
-
}), q =
|
|
237
|
+
}), q = A((e) => {
|
|
228
238
|
i?.(`${o}${e}`);
|
|
229
|
-
}, [i, o]), Fe =
|
|
230
|
-
let e =
|
|
239
|
+
}, [i, o]), Fe = A(async () => {
|
|
240
|
+
let e = L?.application?.appId;
|
|
231
241
|
if (e) try {
|
|
232
|
-
let t = (await
|
|
233
|
-
t &&
|
|
242
|
+
let t = (await z({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
|
|
243
|
+
t && j(t), te(!1);
|
|
234
244
|
} catch {}
|
|
235
|
-
}, [
|
|
245
|
+
}, [L?.application?.appId, z]), Ie = A(async () => {
|
|
236
246
|
if (w) try {
|
|
237
|
-
await
|
|
247
|
+
await ve({ variables: { id: w } }), k(!1), q("/apps");
|
|
238
248
|
} catch {}
|
|
239
249
|
}, [
|
|
240
250
|
w,
|
|
241
|
-
|
|
251
|
+
ve,
|
|
242
252
|
q
|
|
243
|
-
]), Re =
|
|
253
|
+
]), Re = A(async () => {
|
|
244
254
|
if (!(!w || !c)) try {
|
|
245
|
-
await
|
|
255
|
+
await we({ variables: { input: {
|
|
246
256
|
applicationId: w,
|
|
247
257
|
scope: "WORKSPACE",
|
|
248
258
|
workspaceId: c,
|
|
249
259
|
autoUpdate: !1
|
|
250
|
-
} } }),
|
|
260
|
+
} } }), Oe(), T("success");
|
|
251
261
|
} catch (e) {
|
|
252
262
|
console.error("[DevPortal] Test in Workspace failed:", e), T("error");
|
|
253
263
|
}
|
|
254
264
|
}, [
|
|
255
265
|
w,
|
|
256
266
|
c,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
]), ze =
|
|
267
|
+
we,
|
|
268
|
+
Oe
|
|
269
|
+
]), ze = A(async (e) => {
|
|
260
270
|
try {
|
|
261
|
-
await Te({ variables: { id: e } }),
|
|
271
|
+
await Te({ variables: { id: e } }), Oe(), T("success");
|
|
262
272
|
} catch {
|
|
263
273
|
T("error");
|
|
264
274
|
}
|
|
265
|
-
}, [Te,
|
|
275
|
+
}, [Te, Oe]), Be = A(async () => {
|
|
266
276
|
if (w) try {
|
|
267
|
-
await
|
|
277
|
+
await V({ variables: { id: w } }), T("success");
|
|
268
278
|
} catch (e) {
|
|
269
279
|
console.error("[DevPortal] Submit failed:", e), T("error");
|
|
270
280
|
} finally {
|
|
271
|
-
|
|
281
|
+
ge();
|
|
272
282
|
}
|
|
273
283
|
}, [
|
|
274
284
|
w,
|
|
275
|
-
|
|
276
|
-
|
|
285
|
+
V,
|
|
286
|
+
ge
|
|
277
287
|
]);
|
|
278
|
-
if (
|
|
279
|
-
if (
|
|
288
|
+
if (R && !L) return /* @__PURE__ */ G(n, { message: p("devportal.loadingApplication", "Loading application...") });
|
|
289
|
+
if (he) return /* @__PURE__ */ G(v, {
|
|
280
290
|
title: p("devportal.error", "Error"),
|
|
281
291
|
backLink: `${o}/apps`,
|
|
282
292
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
283
293
|
children: /* @__PURE__ */ K("div", {
|
|
284
294
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
285
295
|
children: [
|
|
286
|
-
/* @__PURE__ */ G(
|
|
296
|
+
/* @__PURE__ */ G(ce, {
|
|
287
297
|
size: 48,
|
|
288
298
|
className: "text-status-error-text mb-4"
|
|
289
299
|
}),
|
|
@@ -293,47 +303,47 @@ var Ie = [
|
|
|
293
303
|
}),
|
|
294
304
|
/* @__PURE__ */ G("p", {
|
|
295
305
|
className: "text-sm text-text-secondary",
|
|
296
|
-
children:
|
|
306
|
+
children: he.message
|
|
297
307
|
})
|
|
298
308
|
]
|
|
299
309
|
})
|
|
300
310
|
});
|
|
301
|
-
let J =
|
|
311
|
+
let J = Pe(L?.application);
|
|
302
312
|
if (!J) return /* @__PURE__ */ G(v, {
|
|
303
313
|
title: p("devportal.notFound", "Not Found"),
|
|
304
314
|
backLink: `${o}/apps`,
|
|
305
315
|
backLabel: p("devportal.backToApplications", "Back to Applications"),
|
|
306
316
|
children: /* @__PURE__ */ G(r, {
|
|
307
317
|
illustration: "empty-generic",
|
|
308
|
-
icon: /* @__PURE__ */ G(
|
|
318
|
+
icon: /* @__PURE__ */ G(le, { size: 48 }),
|
|
309
319
|
title: p("devportal.applicationNotFound", "Application not found"),
|
|
310
320
|
description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
|
|
311
321
|
})
|
|
312
322
|
});
|
|
313
|
-
let Y = J.appType === "NODE" || J.appType === "WORKFLOW",
|
|
323
|
+
let Y = J.appType === "NODE" || J.appType === "WORKFLOW", X = J.appType === "API_INTEGRATION", Ue = L?.application?.versions?.totalCount ?? 0, Xe = J.pricingType === "PAID", Ze = Ne?.developerOrganization, Qe = Ze?.platformFeeRate ?? .3, $e = !!Ze?.billingAccountId, tt = J.pricingDetails ?? {}, Z = J.pricingType === "FREE" || J.pricingType === "PAID" && typeof tt.price == "number" && tt.price > 0, Q = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED") && (!Y && !X || Ue > 0) && (!Xe || $e) && Z, nt = Q && J.status !== "PUBLISHED" && J.status !== "SUBMITTED", rt = [
|
|
314
324
|
...Y ? [] : [{
|
|
315
325
|
label: p("devportal.rotateSecret", "Rotate Secret"),
|
|
316
|
-
icon: /* @__PURE__ */ G(
|
|
326
|
+
icon: /* @__PURE__ */ G(xe, { size: 16 }),
|
|
317
327
|
disabled: !J.appId,
|
|
318
|
-
onSelect: () =>
|
|
328
|
+
onSelect: () => te(!0)
|
|
319
329
|
}],
|
|
320
330
|
...Y ? [] : Me ? [{
|
|
321
331
|
label: p("devportal.uninstallFromWorkspace", "Uninstall from Workspace"),
|
|
322
|
-
icon: /* @__PURE__ */ G(
|
|
332
|
+
icon: /* @__PURE__ */ G(ke, { size: 16 }),
|
|
323
333
|
disabled: Ee || !c,
|
|
324
334
|
onSelect: () => void ze(Me.id)
|
|
325
335
|
}] : [{
|
|
326
336
|
label: p("devportal.testInWorkspace", "Test in Workspace"),
|
|
327
|
-
icon: /* @__PURE__ */ G(
|
|
328
|
-
disabled:
|
|
337
|
+
icon: /* @__PURE__ */ G(me, { size: 16 }),
|
|
338
|
+
disabled: U || !c,
|
|
329
339
|
onSelect: () => void Re()
|
|
330
340
|
}],
|
|
331
341
|
{
|
|
332
342
|
label: p("devportal.deactivate", "Deactivate"),
|
|
333
|
-
icon: /* @__PURE__ */ G(
|
|
343
|
+
icon: /* @__PURE__ */ G(be, { size: 16 }),
|
|
334
344
|
intent: "destructive",
|
|
335
345
|
disabled: !y,
|
|
336
|
-
onSelect: () =>
|
|
346
|
+
onSelect: () => k(!0)
|
|
337
347
|
}
|
|
338
348
|
];
|
|
339
349
|
return /* @__PURE__ */ K(v, {
|
|
@@ -346,41 +356,41 @@ var Ie = [
|
|
|
346
356
|
className: "flex items-center gap-2",
|
|
347
357
|
children: [J.status === "SUBMITTED" ? /* @__PURE__ */ K("div", {
|
|
348
358
|
className: "flex items-center gap-1.5 rounded-full border border-status-warning-bg bg-status-warning-bg-subtle px-3 py-1.5 text-xs font-medium text-status-warning-text",
|
|
349
|
-
children: [/* @__PURE__ */ G(
|
|
359
|
+
children: [/* @__PURE__ */ G(fe, { size: 13 }), p("devportal.underReview", "Under Review")]
|
|
350
360
|
}) : J.status === "PUBLISHED" ? null : /* @__PURE__ */ G("button", {
|
|
351
361
|
type: "button",
|
|
352
362
|
onClick: () => void Be(),
|
|
353
|
-
disabled: !
|
|
354
|
-
title:
|
|
363
|
+
disabled: !nt || H,
|
|
364
|
+
title: Q ? void 0 : [
|
|
355
365
|
!J.description?.trim() && "Add full description",
|
|
356
366
|
!J.category && "Select a category",
|
|
357
367
|
!J.iconUrl && "Upload an app icon",
|
|
358
368
|
J.visibility === "PRIVATE" && "Set visibility to Public/Unlisted",
|
|
359
|
-
Y &&
|
|
360
|
-
!
|
|
361
|
-
|
|
369
|
+
Y && Ue === 0 && "Upload at least one version",
|
|
370
|
+
!Z && "Set pricing (choose Free or Paid in the Pricing tab)",
|
|
371
|
+
Xe && !$e && "Link a billing account to receive payments"
|
|
362
372
|
].filter(Boolean).join(" · "),
|
|
363
|
-
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors",
|
|
364
|
-
children:
|
|
373
|
+
className: t("inline-flex items-center gap-2 rounded-md px-5 py-2 text-sm font-medium whitespace-nowrap transition-colors", nt && !H ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 cursor-pointer" : "cursor-not-allowed bg-bg-muted text-text-tertiary ring-1 ring-border-subtle"),
|
|
374
|
+
children: H ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
365
375
|
size: 15,
|
|
366
376
|
className: "animate-spin"
|
|
367
|
-
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
368
|
-
}), /* @__PURE__ */ G(
|
|
377
|
+
}), p("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Se, { size: 15 }), p("devportal.submitForReview", "Submit for Review")] })
|
|
378
|
+
}), /* @__PURE__ */ G(je, {
|
|
369
379
|
primary: {
|
|
370
380
|
label: p("devportal.editApp", "Edit App"),
|
|
371
|
-
icon: /* @__PURE__ */ G(
|
|
381
|
+
icon: /* @__PURE__ */ G(pe, { size: 16 }),
|
|
372
382
|
disabled: !_,
|
|
373
383
|
onSelect: () => q(`/apps/${J.id}/edit`)
|
|
374
384
|
},
|
|
375
|
-
actions:
|
|
385
|
+
actions: rt
|
|
376
386
|
})]
|
|
377
387
|
}),
|
|
378
388
|
children: [
|
|
379
|
-
|
|
389
|
+
se && /* @__PURE__ */ G(ee, {
|
|
380
390
|
title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
|
|
381
|
-
secret:
|
|
391
|
+
secret: se,
|
|
382
392
|
description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
|
|
383
|
-
onDismiss: () =>
|
|
393
|
+
onDismiss: () => j(null)
|
|
384
394
|
}),
|
|
385
395
|
/* @__PURE__ */ K("div", {
|
|
386
396
|
className: "flex flex-wrap items-center gap-2",
|
|
@@ -403,7 +413,7 @@ var Ie = [
|
|
|
403
413
|
}),
|
|
404
414
|
J.status === "SUBMITTED" && /* @__PURE__ */ K("div", {
|
|
405
415
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-status-warning-bg-subtle p-4",
|
|
406
|
-
children: [/* @__PURE__ */ G(
|
|
416
|
+
children: [/* @__PURE__ */ G(fe, {
|
|
407
417
|
size: 18,
|
|
408
418
|
className: "text-status-warning-text mt-0.5 flex-shrink-0"
|
|
409
419
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -426,7 +436,7 @@ var Ie = [
|
|
|
426
436
|
}),
|
|
427
437
|
J.status === "REJECTED" && /* @__PURE__ */ K("div", {
|
|
428
438
|
className: "flex items-start gap-3 rounded-lg border border-status-error-bg bg-status-error-bg-subtle p-4",
|
|
429
|
-
children: [/* @__PURE__ */ G(
|
|
439
|
+
children: [/* @__PURE__ */ G(ke, {
|
|
430
440
|
size: 18,
|
|
431
441
|
className: "text-status-error-text mt-0.5 flex-shrink-0"
|
|
432
442
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -451,7 +461,7 @@ var Ie = [
|
|
|
451
461
|
}),
|
|
452
462
|
J.status === "PUBLISHED" && /* @__PURE__ */ K("div", {
|
|
453
463
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle p-4",
|
|
454
|
-
children: [/* @__PURE__ */ G(
|
|
464
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
455
465
|
size: 18,
|
|
456
466
|
className: "text-status-success-text mt-0.5 flex-shrink-0"
|
|
457
467
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -465,8 +475,8 @@ var Ie = [
|
|
|
465
475
|
})]
|
|
466
476
|
})]
|
|
467
477
|
}),
|
|
468
|
-
(J.status === "DRAFT" || J.status === "REJECTED") && !
|
|
469
|
-
let e = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED"), n = !Y ||
|
|
478
|
+
(J.status === "DRAFT" || J.status === "REJECTED") && !Q && (() => {
|
|
479
|
+
let e = !!J.description?.trim() && !!J.category && !!J.iconUrl && (J.visibility === "PUBLIC" || J.visibility === "UNLISTED"), n = !Y && !X || Ue > 0, r = [
|
|
470
480
|
!J.description?.trim() && "Add a full description",
|
|
471
481
|
!J.category && "Select a category",
|
|
472
482
|
!J.iconUrl && "Upload an app icon",
|
|
@@ -486,17 +496,30 @@ var Ie = [
|
|
|
486
496
|
done: n,
|
|
487
497
|
onClick: () => D("versions")
|
|
488
498
|
}] : [],
|
|
499
|
+
...X ? [{
|
|
500
|
+
id: "version",
|
|
501
|
+
label: p("devportal.setupIntegrationVersionStep", "Publish a Version"),
|
|
502
|
+
hint: n ? p("devportal.done", "Done") : p("devportal.integrationVersionHint", "Define required scopes and publish your first API version"),
|
|
503
|
+
done: n,
|
|
504
|
+
onClick: () => D("versions")
|
|
505
|
+
}, {
|
|
506
|
+
id: "webhooks",
|
|
507
|
+
label: p("devportal.setupWebhooksStep", "Configure Webhooks"),
|
|
508
|
+
hint: p("devportal.webhooksOptionalHint", "Set up endpoints to receive platform events (optional)"),
|
|
509
|
+
done: !1,
|
|
510
|
+
onClick: () => D("webhooks")
|
|
511
|
+
}] : [],
|
|
489
512
|
{
|
|
490
513
|
id: "pricing",
|
|
491
514
|
label: p("devportal.setupPricingStep", "Set Pricing"),
|
|
492
|
-
hint:
|
|
493
|
-
done:
|
|
515
|
+
hint: Z ? p("devportal.done", "Done") : p("devportal.pricingHint", "Choose Free or set a credit price in the Pricing tab"),
|
|
516
|
+
done: Z,
|
|
494
517
|
onClick: () => D("pricing")
|
|
495
518
|
},
|
|
496
519
|
{
|
|
497
520
|
id: "submit",
|
|
498
521
|
label: p("devportal.submitForReview", "Submit for Review"),
|
|
499
|
-
hint:
|
|
522
|
+
hint: Q ? p("devportal.readyToSubmit", "Ready — click Submit for Review above") : p("devportal.completeStepsFirst", "Complete the steps above first"),
|
|
500
523
|
done: !1,
|
|
501
524
|
onClick: void 0
|
|
502
525
|
}
|
|
@@ -509,7 +532,7 @@ var Ie = [
|
|
|
509
532
|
className: "flex items-center gap-3",
|
|
510
533
|
children: [/* @__PURE__ */ G("div", {
|
|
511
534
|
className: "flex h-8 w-8 items-center justify-center rounded-full bg-action-primary-bg/10",
|
|
512
|
-
children: /* @__PURE__ */ G(
|
|
535
|
+
children: /* @__PURE__ */ G(Ce, {
|
|
513
536
|
size: 16,
|
|
514
537
|
className: "text-primary"
|
|
515
538
|
})
|
|
@@ -538,7 +561,7 @@ var Ie = [
|
|
|
538
561
|
children: [
|
|
539
562
|
/* @__PURE__ */ G("div", {
|
|
540
563
|
className: t("flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-xs font-bold", e.done ? "bg-status-success-bg text-status-success-text" : "border-2 border-border-subtle bg-bg-sunken text-text-secondary"),
|
|
541
|
-
children: e.done ? /* @__PURE__ */ G(
|
|
564
|
+
children: e.done ? /* @__PURE__ */ G(I, { size: 13 }) : n + 1
|
|
542
565
|
}),
|
|
543
566
|
/* @__PURE__ */ K("div", {
|
|
544
567
|
className: "flex-1 min-w-0",
|
|
@@ -550,7 +573,7 @@ var Ie = [
|
|
|
550
573
|
children: e.hint
|
|
551
574
|
})]
|
|
552
575
|
}),
|
|
553
|
-
e.onClick && !e.done && /* @__PURE__ */ G(
|
|
576
|
+
e.onClick && !e.done && /* @__PURE__ */ G(de, {
|
|
554
577
|
size: 16,
|
|
555
578
|
className: "flex-shrink-0 text-text-secondary"
|
|
556
579
|
})
|
|
@@ -565,7 +588,7 @@ var Ie = [
|
|
|
565
588
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
566
589
|
role: "tablist",
|
|
567
590
|
"aria-label": p("devportal.applicationSections", "Application sections"),
|
|
568
|
-
children:
|
|
591
|
+
children: Le.filter((e) => !(Y && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground" || e.id === "oauth" || e.id === "api-keys") || !Y && !X && e.id === "versions" || !X && (e.id === "oauth" || e.id === "api-keys"))).map((e) => {
|
|
569
592
|
let n = e.icon;
|
|
570
593
|
return /* @__PURE__ */ K("button", {
|
|
571
594
|
id: `application-tab-${e.id}`,
|
|
@@ -586,87 +609,143 @@ var Ie = [
|
|
|
586
609
|
"aria-labelledby": `application-tab-${E}`,
|
|
587
610
|
tabIndex: 0,
|
|
588
611
|
children: [
|
|
589
|
-
E === "overview" && /* @__PURE__ */ G(
|
|
590
|
-
E === "permissions" && /* @__PURE__ */ G(
|
|
591
|
-
E === "webhooks" && /* @__PURE__ */ G(
|
|
612
|
+
E === "overview" && /* @__PURE__ */ G(Ye, { app: J }),
|
|
613
|
+
E === "permissions" && /* @__PURE__ */ G(ut, { app: J }),
|
|
614
|
+
E === "webhooks" && /* @__PURE__ */ G(Ke, {
|
|
592
615
|
appId: J.id,
|
|
593
616
|
onNavigate: q
|
|
594
617
|
}),
|
|
595
|
-
E === "delegations" && /* @__PURE__ */ G(
|
|
618
|
+
E === "delegations" && /* @__PURE__ */ G(qe, {
|
|
596
619
|
authAppId: J.appId || void 0,
|
|
597
620
|
appName: J.name,
|
|
598
|
-
onGrantDelegation: () =>
|
|
621
|
+
onGrantDelegation: () => F(!0),
|
|
622
|
+
onNavigate: q
|
|
623
|
+
}),
|
|
624
|
+
E === "analytics" && /* @__PURE__ */ G(Je, { appId: J.id }),
|
|
625
|
+
E === "playground" && /* @__PURE__ */ G(et, { app: J }),
|
|
626
|
+
E === "oauth" && /* @__PURE__ */ G(Ve, {
|
|
627
|
+
appId: J.id,
|
|
599
628
|
onNavigate: q
|
|
600
629
|
}),
|
|
601
|
-
E === "
|
|
602
|
-
|
|
603
|
-
|
|
630
|
+
E === "api-keys" && /* @__PURE__ */ G(He, {
|
|
631
|
+
appId: J.id,
|
|
632
|
+
onNavigate: q
|
|
633
|
+
}),
|
|
634
|
+
E === "store-listing" && /* @__PURE__ */ G(ot, {
|
|
604
635
|
app: J,
|
|
605
|
-
versionCount:
|
|
636
|
+
versionCount: L?.application?.versions?.totalCount ?? 0,
|
|
606
637
|
isPackageApp: Y,
|
|
607
|
-
pricingDone:
|
|
608
|
-
onNavigateToVersions: Y ? () => D("versions") : void 0,
|
|
638
|
+
pricingDone: Z,
|
|
639
|
+
onNavigateToVersions: Y || X ? () => D("versions") : void 0,
|
|
609
640
|
onNavigateToPricing: () => D("pricing"),
|
|
610
641
|
onNavigateToSubmission: () => q(`/apps/${J.id}/store-submission`)
|
|
611
642
|
}),
|
|
612
|
-
E === "pricing" && /* @__PURE__ */ G(
|
|
643
|
+
E === "pricing" && /* @__PURE__ */ G(We, {
|
|
613
644
|
app: J,
|
|
614
|
-
platformFeeRate:
|
|
615
|
-
billingAccountLinked:
|
|
645
|
+
platformFeeRate: Qe,
|
|
646
|
+
billingAccountLinked: $e,
|
|
616
647
|
onNavigateToRevenue: () => q("/revenue"),
|
|
617
|
-
isReadyToSubmit:
|
|
648
|
+
isReadyToSubmit: Q
|
|
618
649
|
}),
|
|
619
|
-
E === "versions" && /* @__PURE__ */ G(
|
|
650
|
+
E === "versions" && /* @__PURE__ */ G(Ge, {
|
|
620
651
|
appId: J.id,
|
|
621
652
|
onNavigate: q,
|
|
622
|
-
pricingDone:
|
|
653
|
+
pricingDone: Z,
|
|
623
654
|
onNavigateToPricing: () => D("pricing")
|
|
624
655
|
})
|
|
625
656
|
]
|
|
626
657
|
}),
|
|
627
|
-
/* @__PURE__ */ G(
|
|
658
|
+
/* @__PURE__ */ G(re, {
|
|
628
659
|
open: O,
|
|
629
|
-
onOpenChange:
|
|
660
|
+
onOpenChange: te,
|
|
630
661
|
onConfirm: Fe,
|
|
631
662
|
title: p("devportal.rotateAppSecret", "Rotate App Secret"),
|
|
632
663
|
description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
|
|
633
664
|
confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
|
|
634
665
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
635
666
|
variant: "warning",
|
|
636
|
-
loading:
|
|
667
|
+
loading: _e
|
|
637
668
|
}),
|
|
638
|
-
/* @__PURE__ */ G(
|
|
639
|
-
open:
|
|
640
|
-
onOpenChange:
|
|
641
|
-
onConfirm:
|
|
669
|
+
/* @__PURE__ */ G(re, {
|
|
670
|
+
open: ne,
|
|
671
|
+
onOpenChange: k,
|
|
672
|
+
onConfirm: Ie,
|
|
642
673
|
title: p("devportal.deactivateApplication", "Deactivate Application"),
|
|
643
674
|
description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
|
|
644
675
|
confirmLabel: p("devportal.deactivate", "Deactivate"),
|
|
645
676
|
cancelLabel: p("devportal.cancel", "Cancel"),
|
|
646
677
|
variant: "destructive",
|
|
647
|
-
loading:
|
|
678
|
+
loading: ye
|
|
648
679
|
}),
|
|
649
|
-
/* @__PURE__ */ G(
|
|
650
|
-
open:
|
|
651
|
-
onOpenChange:
|
|
680
|
+
/* @__PURE__ */ G(ie, {
|
|
681
|
+
open: M,
|
|
682
|
+
onOpenChange: F,
|
|
652
683
|
appId: J.appId || "",
|
|
653
684
|
appName: J.name,
|
|
654
685
|
appScopes: J.scopes?.map((e) => e.scope) ?? [],
|
|
655
686
|
onSuccess: () => {
|
|
656
|
-
|
|
687
|
+
F(!1);
|
|
657
688
|
}
|
|
658
689
|
})
|
|
659
690
|
]
|
|
660
691
|
});
|
|
661
|
-
},
|
|
662
|
-
let { t
|
|
692
|
+
}, Ve = ({ onNavigate: e }) => {
|
|
693
|
+
let { t } = P(), n = (e, n) => {
|
|
694
|
+
let r = t(e);
|
|
695
|
+
return r === e ? n : r;
|
|
696
|
+
};
|
|
697
|
+
return /* @__PURE__ */ K("div", {
|
|
698
|
+
className: "space-y-4 py-4 text-center",
|
|
699
|
+
children: [
|
|
700
|
+
/* @__PURE__ */ G(H, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
701
|
+
/* @__PURE__ */ G("h3", {
|
|
702
|
+
className: "font-medium",
|
|
703
|
+
children: n("devportal.oauthApps", "OAuth Apps")
|
|
704
|
+
}),
|
|
705
|
+
/* @__PURE__ */ G("p", {
|
|
706
|
+
className: "text-sm text-text-secondary",
|
|
707
|
+
children: n("devportal.oauthAppsManagedCentrally", "OAuth apps are now managed centrally. Visit the OAuth Apps page to create and manage your apps.")
|
|
708
|
+
}),
|
|
709
|
+
/* @__PURE__ */ K("button", {
|
|
710
|
+
onClick: () => e("/oauth"),
|
|
711
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
712
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
713
|
+
})
|
|
714
|
+
]
|
|
715
|
+
});
|
|
716
|
+
}, He = ({ onNavigate: e }) => {
|
|
717
|
+
let { t } = P(), n = (e, n) => {
|
|
718
|
+
let r = t(e);
|
|
719
|
+
return r === e ? n : r;
|
|
720
|
+
};
|
|
721
|
+
return /* @__PURE__ */ K("div", {
|
|
722
|
+
className: "space-y-4 py-4 text-center",
|
|
723
|
+
children: [
|
|
724
|
+
/* @__PURE__ */ G(z, { className: "mx-auto h-10 w-10 text-text-secondary" }),
|
|
725
|
+
/* @__PURE__ */ G("h3", {
|
|
726
|
+
className: "font-medium",
|
|
727
|
+
children: n("devportal.apiKeys", "API Keys")
|
|
728
|
+
}),
|
|
729
|
+
/* @__PURE__ */ G("p", {
|
|
730
|
+
className: "text-sm text-text-secondary",
|
|
731
|
+
children: n("devportal.apiKeysManagedCentrally", "API keys are now managed centrally. Visit the API Keys page to generate and manage your keys.")
|
|
732
|
+
}),
|
|
733
|
+
/* @__PURE__ */ K("button", {
|
|
734
|
+
onClick: () => e("/api-keys"),
|
|
735
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
736
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
|
|
737
|
+
})
|
|
738
|
+
]
|
|
739
|
+
});
|
|
740
|
+
}, Y = .01, X = (e) => e * Y, Ue = (e) => Math.round(e / Y), We = ({ app: e, platformFeeRate: n, billingAccountLinked: r, onNavigateToRevenue: i, isReadyToSubmit: a = !1 }) => {
|
|
741
|
+
let { t: o } = P(), s = (e, t) => {
|
|
663
742
|
let n = o(e);
|
|
664
743
|
return n === e ? t : n;
|
|
665
|
-
}, c = e.pricingDetails ?? {}, [l, u] =
|
|
744
|
+
}, c = e.pricingDetails ?? {}, [l, u] = N({
|
|
666
745
|
pricingType: e.pricingType ?? "FREE",
|
|
667
746
|
price: typeof c.price == "number" ? String(c.price) : ""
|
|
668
|
-
}), [d, f] =
|
|
669
|
-
m.current = e,
|
|
747
|
+
}), [d, f] = N(!1), [p] = _(), m = M(e);
|
|
748
|
+
m.current = e, se(() => {
|
|
670
749
|
let e = m.current.pricingDetails ?? {};
|
|
671
750
|
u({
|
|
672
751
|
pricingType: m.current.pricingType ?? "FREE",
|
|
@@ -698,7 +777,7 @@ var Ie = [
|
|
|
698
777
|
} finally {
|
|
699
778
|
f(!1);
|
|
700
779
|
}
|
|
701
|
-
}, v = l.pricingType !== "FREE", y = parseInt(l.price, 10), b = v && !isNaN(y) && y > 0, x = b ?
|
|
780
|
+
}, v = l.pricingType !== "FREE", y = parseInt(l.price, 10), b = v && !isNaN(y) && y > 0, x = b ? X(y) : 0, S = b ? Math.round(y * n) : 0, C = X(S), w = b ? y - S : 0, ee = X(w), E = (e) => "$" + e.toLocaleString("en-US", {
|
|
702
781
|
minimumFractionDigits: 2,
|
|
703
782
|
maximumFractionDigits: 2
|
|
704
783
|
}), D = (e) => e.toLocaleString("en-US") + " cr";
|
|
@@ -707,7 +786,7 @@ var Ie = [
|
|
|
707
786
|
children: [
|
|
708
787
|
/* @__PURE__ */ K("div", {
|
|
709
788
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
710
|
-
children: [/* @__PURE__ */ G(
|
|
789
|
+
children: [/* @__PURE__ */ G(L, {
|
|
711
790
|
size: 16,
|
|
712
791
|
className: "mt-0.5 shrink-0 text-primary"
|
|
713
792
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -724,7 +803,7 @@ var Ie = [
|
|
|
724
803
|
className: "font-medium",
|
|
725
804
|
children: [
|
|
726
805
|
"1 credit = ",
|
|
727
|
-
E(
|
|
806
|
+
E(Y),
|
|
728
807
|
" USD."
|
|
729
808
|
]
|
|
730
809
|
}),
|
|
@@ -748,7 +827,7 @@ var Ie = [
|
|
|
748
827
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
749
828
|
children: [/* @__PURE__ */ G("div", {
|
|
750
829
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-success-bg-subtle",
|
|
751
|
-
children: /* @__PURE__ */ G(
|
|
830
|
+
children: /* @__PURE__ */ G(we, {
|
|
752
831
|
size: 18,
|
|
753
832
|
className: "text-status-success-text"
|
|
754
833
|
})
|
|
@@ -780,7 +859,7 @@ var Ie = [
|
|
|
780
859
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
781
860
|
children: [/* @__PURE__ */ G("div", {
|
|
782
861
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-action-primary-bg/10",
|
|
783
|
-
children: /* @__PURE__ */ G(
|
|
862
|
+
children: /* @__PURE__ */ G(Ee, {
|
|
784
863
|
size: 18,
|
|
785
864
|
className: "text-primary"
|
|
786
865
|
})
|
|
@@ -809,7 +888,7 @@ var Ie = [
|
|
|
809
888
|
className: "rounded-xl border border-border-subtle bg-bg-surface p-5 space-y-3",
|
|
810
889
|
children: [/* @__PURE__ */ G("div", {
|
|
811
890
|
className: "flex h-9 w-9 items-center justify-center rounded-lg bg-status-warning-bg-subtle",
|
|
812
|
-
children: /* @__PURE__ */ G(
|
|
891
|
+
children: /* @__PURE__ */ G(he, {
|
|
813
892
|
size: 18,
|
|
814
893
|
className: "text-status-warning-text"
|
|
815
894
|
})
|
|
@@ -843,7 +922,7 @@ var Ie = [
|
|
|
843
922
|
})] }),
|
|
844
923
|
/* @__PURE__ */ G("div", {
|
|
845
924
|
className: "flex flex-wrap gap-2",
|
|
846
|
-
children:
|
|
925
|
+
children: nt.map((e) => /* @__PURE__ */ G("button", {
|
|
847
926
|
type: "button",
|
|
848
927
|
onClick: () => h("pricingType", e.value),
|
|
849
928
|
className: t("rounded-md border px-4 py-2 text-sm font-medium transition-colors", l.pricingType === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "hover:bg-bg-sunken border-border-subtle"),
|
|
@@ -889,7 +968,7 @@ var Ie = [
|
|
|
889
968
|
E(x),
|
|
890
969
|
" USD at the current credit rate (1 cr =",
|
|
891
970
|
" ",
|
|
892
|
-
E(
|
|
971
|
+
E(Y),
|
|
893
972
|
")"
|
|
894
973
|
]
|
|
895
974
|
}),
|
|
@@ -908,13 +987,13 @@ var Ie = [
|
|
|
908
987
|
50
|
|
909
988
|
].map((e) => /* @__PURE__ */ K("button", {
|
|
910
989
|
type: "button",
|
|
911
|
-
onClick: () => h("price", String(
|
|
990
|
+
onClick: () => h("price", String(Ue(e))),
|
|
912
991
|
className: "rounded border border-border-subtle px-2 py-0.5 hover:bg-bg-sunken transition-colors",
|
|
913
992
|
children: [
|
|
914
993
|
"$",
|
|
915
994
|
e,
|
|
916
995
|
" = ",
|
|
917
|
-
|
|
996
|
+
Ue(e).toLocaleString(),
|
|
918
997
|
" cr"
|
|
919
998
|
]
|
|
920
999
|
}, e))]
|
|
@@ -1004,7 +1083,7 @@ var Ie = [
|
|
|
1004
1083
|
}),
|
|
1005
1084
|
!r && /* @__PURE__ */ K("div", {
|
|
1006
1085
|
className: "flex items-start gap-3 rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-4",
|
|
1007
|
-
children: [/* @__PURE__ */ G(
|
|
1086
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
1008
1087
|
size: 16,
|
|
1009
1088
|
className: "mt-0.5 shrink-0 text-status-warning-text"
|
|
1010
1089
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -1041,7 +1120,7 @@ var Ie = [
|
|
|
1041
1120
|
children: [
|
|
1042
1121
|
/* @__PURE__ */ K("li", {
|
|
1043
1122
|
className: "flex items-start gap-2",
|
|
1044
|
-
children: [/* @__PURE__ */ G(
|
|
1123
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1045
1124
|
size: 14,
|
|
1046
1125
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1047
1126
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1059,21 +1138,21 @@ var Ie = [
|
|
|
1059
1138
|
}),
|
|
1060
1139
|
/* @__PURE__ */ K("li", {
|
|
1061
1140
|
className: "flex items-start gap-2",
|
|
1062
|
-
children: [/* @__PURE__ */ G(
|
|
1141
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1063
1142
|
size: 14,
|
|
1064
1143
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1065
1144
|
}), /* @__PURE__ */ G("span", { children: "All prices are in platform credits. The USD equivalent is indicative only and may vary with the current credit rate." })]
|
|
1066
1145
|
}),
|
|
1067
1146
|
/* @__PURE__ */ K("li", {
|
|
1068
1147
|
className: "flex items-start gap-2",
|
|
1069
|
-
children: [/* @__PURE__ */ G(
|
|
1148
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1070
1149
|
size: 14,
|
|
1071
1150
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1072
1151
|
}), /* @__PURE__ */ G("span", { children: "Earnings are credited to your billing account per-sale. Cash withdrawals are subject to a minimum threshold and applicable taxes in your jurisdiction." })]
|
|
1073
1152
|
}),
|
|
1074
1153
|
/* @__PURE__ */ K("li", {
|
|
1075
1154
|
className: "flex items-start gap-2",
|
|
1076
|
-
children: [/* @__PURE__ */ G(
|
|
1155
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1077
1156
|
size: 14,
|
|
1078
1157
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1079
1158
|
}), /* @__PURE__ */ K("span", { children: [
|
|
@@ -1100,13 +1179,13 @@ var Ie = [
|
|
|
1100
1179
|
onClick: () => void g(),
|
|
1101
1180
|
disabled: d,
|
|
1102
1181
|
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",
|
|
1103
|
-
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1182
|
+
children: d ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
1104
1183
|
size: 16,
|
|
1105
1184
|
className: "animate-spin"
|
|
1106
|
-
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
1185
|
+
}), s("devportal.saving", "Saving…")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(L, { size: 16 }), s("devportal.savePricing", "Save Pricing")] })
|
|
1107
1186
|
}), a && /* @__PURE__ */ K("div", {
|
|
1108
1187
|
className: "flex items-start gap-3 rounded-lg border border-status-success-bg bg-status-success-bg-subtle px-4 py-3",
|
|
1109
|
-
children: [/* @__PURE__ */ G(
|
|
1188
|
+
children: [/* @__PURE__ */ G(I, {
|
|
1110
1189
|
size: 16,
|
|
1111
1190
|
className: "mt-0.5 shrink-0 text-status-success-text"
|
|
1112
1191
|
}), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1120,16 +1199,16 @@ var Ie = [
|
|
|
1120
1199
|
})
|
|
1121
1200
|
]
|
|
1122
1201
|
});
|
|
1123
|
-
},
|
|
1124
|
-
let { t: o } =
|
|
1202
|
+
}, Ge = ({ appId: e, onNavigate: n, pricingDone: i = !1, onNavigateToPricing: a }) => {
|
|
1203
|
+
let { t: o } = P(), s = (e, t) => {
|
|
1125
1204
|
let n = o(e);
|
|
1126
1205
|
return n === e ? t : n;
|
|
1127
1206
|
}, { data: l, loading: u, error: d } = c({
|
|
1128
1207
|
variables: { applicationId: e },
|
|
1129
1208
|
fetchPolicy: "cache-and-network"
|
|
1130
1209
|
});
|
|
1131
|
-
if (u) return /* @__PURE__ */ G(
|
|
1132
|
-
if (d) return /* @__PURE__ */ G(
|
|
1210
|
+
if (u) return /* @__PURE__ */ G(ze, { message: s("devportal.loadingVersions", "Loading versions…") });
|
|
1211
|
+
if (d) return /* @__PURE__ */ G(Be, { message: d.message });
|
|
1133
1212
|
let f = (l?.application?.versions?.edges ?? []).map((e) => e.node);
|
|
1134
1213
|
return /* @__PURE__ */ K("div", {
|
|
1135
1214
|
className: "space-y-4",
|
|
@@ -1239,7 +1318,7 @@ var Ie = [
|
|
|
1239
1318
|
})
|
|
1240
1319
|
}) : /* @__PURE__ */ G(r, {
|
|
1241
1320
|
illustration: "empty-generic",
|
|
1242
|
-
icon: /* @__PURE__ */ G(
|
|
1321
|
+
icon: /* @__PURE__ */ G(ye, { size: 32 }),
|
|
1243
1322
|
title: s("devportal.noVersions", "No versions yet"),
|
|
1244
1323
|
description: s("devportal.noVersionsDescription", "Upload your first version to make this item available for review and distribution."),
|
|
1245
1324
|
action: /* @__PURE__ */ K("button", {
|
|
@@ -1251,7 +1330,7 @@ var Ie = [
|
|
|
1251
1330
|
f.length > 0 && !i && a && /* @__PURE__ */ K("div", {
|
|
1252
1331
|
className: "mt-4 flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken px-4 py-3",
|
|
1253
1332
|
children: [
|
|
1254
|
-
/* @__PURE__ */ G(
|
|
1333
|
+
/* @__PURE__ */ G(L, {
|
|
1255
1334
|
size: 16,
|
|
1256
1335
|
className: "shrink-0 text-primary"
|
|
1257
1336
|
}),
|
|
@@ -1263,41 +1342,41 @@ var Ie = [
|
|
|
1263
1342
|
type: "button",
|
|
1264
1343
|
onClick: a,
|
|
1265
1344
|
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline underline-offset-2 whitespace-nowrap",
|
|
1266
|
-
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(
|
|
1345
|
+
children: [s("devportal.nextSetPricing", "Set Pricing"), /* @__PURE__ */ G(de, { size: 15 })]
|
|
1267
1346
|
})
|
|
1268
1347
|
]
|
|
1269
1348
|
})
|
|
1270
1349
|
]
|
|
1271
1350
|
});
|
|
1272
|
-
},
|
|
1273
|
-
let { t: n } =
|
|
1351
|
+
}, Ke = ({ appId: e, onNavigate: t }) => {
|
|
1352
|
+
let { t: n } = P(), r = (e, t) => {
|
|
1274
1353
|
let r = n(e);
|
|
1275
1354
|
return r === e ? t : r;
|
|
1276
1355
|
}, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
|
|
1277
|
-
return a ? /* @__PURE__ */ G(
|
|
1356
|
+
return a ? /* @__PURE__ */ G(ze, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ G(Be, { message: o.message }) : /* @__PURE__ */ G(Xe, {
|
|
1278
1357
|
appId: e,
|
|
1279
|
-
webhooks: (i?.webhooks ?? []).map(
|
|
1358
|
+
webhooks: (i?.webhooks ?? []).map(q),
|
|
1280
1359
|
onNavigate: t
|
|
1281
1360
|
});
|
|
1282
|
-
},
|
|
1283
|
-
let { t: o } =
|
|
1361
|
+
}, qe = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
|
|
1362
|
+
let { t: o } = P(), s = (e, t) => {
|
|
1284
1363
|
let n = o(e);
|
|
1285
1364
|
return n === e ? t : n;
|
|
1286
|
-
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] =
|
|
1365
|
+
}, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] = N([]), [g, _] = N(!1), [v, y] = N(/* @__PURE__ */ new Set()), [b, x] = N(null), S = j(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Ie) : [], [e, c]), C = j(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = j(() => C.filter((e) => v.has(e.id)), [C, v]), T = C.length > 0 && C.every((e) => v.has(e.id)), ee = C.some((e) => v.has(e.id)) && !T, E = A((e, t) => {
|
|
1287
1366
|
y((n) => {
|
|
1288
1367
|
let r = new Set(n);
|
|
1289
1368
|
return t ? r.add(e) : r.delete(e), r;
|
|
1290
1369
|
});
|
|
1291
|
-
}, []), D =
|
|
1370
|
+
}, []), D = A((e) => {
|
|
1292
1371
|
y((t) => {
|
|
1293
1372
|
let n = new Set(t);
|
|
1294
1373
|
return C.forEach((t) => {
|
|
1295
1374
|
e ? n.add(t.id) : n.delete(t.id);
|
|
1296
1375
|
}), n;
|
|
1297
1376
|
});
|
|
1298
|
-
}, [C]), O =
|
|
1377
|
+
}, [C]), O = A(() => {
|
|
1299
1378
|
y(/* @__PURE__ */ new Set());
|
|
1300
|
-
}, []),
|
|
1379
|
+
}, []), te = A(async (e) => {
|
|
1301
1380
|
_(!0);
|
|
1302
1381
|
try {
|
|
1303
1382
|
let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
|
|
@@ -1309,7 +1388,7 @@ var Ie = [
|
|
|
1309
1388
|
_(!1);
|
|
1310
1389
|
}
|
|
1311
1390
|
}, [f, d]);
|
|
1312
|
-
return e ? l ? /* @__PURE__ */ G(
|
|
1391
|
+
return e ? l ? /* @__PURE__ */ G(ze, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ G(Be, { message: u.message }) : /* @__PURE__ */ K(W, { children: [
|
|
1313
1392
|
b && /* @__PURE__ */ G("div", {
|
|
1314
1393
|
className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
|
|
1315
1394
|
children: /* @__PURE__ */ K("div", {
|
|
@@ -1321,7 +1400,7 @@ var Ie = [
|
|
|
1321
1400
|
})]
|
|
1322
1401
|
})
|
|
1323
1402
|
}),
|
|
1324
|
-
/* @__PURE__ */ G(
|
|
1403
|
+
/* @__PURE__ */ G(Ze, {
|
|
1325
1404
|
appName: t,
|
|
1326
1405
|
delegations: S,
|
|
1327
1406
|
onGrantDelegation: n,
|
|
@@ -1334,13 +1413,13 @@ var Ie = [
|
|
|
1334
1413
|
allVisibleSelected: T,
|
|
1335
1414
|
partiallySelected: ee
|
|
1336
1415
|
}),
|
|
1337
|
-
/* @__PURE__ */ G(
|
|
1416
|
+
/* @__PURE__ */ G(re, {
|
|
1338
1417
|
open: m.length > 0,
|
|
1339
1418
|
onOpenChange: (e) => {
|
|
1340
1419
|
e || h([]);
|
|
1341
1420
|
},
|
|
1342
1421
|
onConfirm: () => {
|
|
1343
|
-
m.length > 0 &&
|
|
1422
|
+
m.length > 0 && te(m);
|
|
1344
1423
|
},
|
|
1345
1424
|
title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
|
|
1346
1425
|
description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
|
|
@@ -1351,31 +1430,31 @@ var Ie = [
|
|
|
1351
1430
|
})
|
|
1352
1431
|
] }) : /* @__PURE__ */ G(r, {
|
|
1353
1432
|
illustration: "empty-generic",
|
|
1354
|
-
icon: /* @__PURE__ */ G(
|
|
1433
|
+
icon: /* @__PURE__ */ G(H, { size: 32 }),
|
|
1355
1434
|
title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
|
|
1356
1435
|
description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
|
|
1357
1436
|
action: /* @__PURE__ */ K("button", {
|
|
1358
1437
|
onClick: () => a("/oauth"),
|
|
1359
1438
|
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",
|
|
1360
|
-
children: [/* @__PURE__ */ G(
|
|
1439
|
+
children: [/* @__PURE__ */ G(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
|
|
1361
1440
|
})
|
|
1362
1441
|
});
|
|
1363
|
-
},
|
|
1364
|
-
let { t } =
|
|
1442
|
+
}, Je = ({ appId: e }) => {
|
|
1443
|
+
let { t } = P(), n = (e, n) => {
|
|
1365
1444
|
let r = t(e);
|
|
1366
1445
|
return r === e ? n : r;
|
|
1367
|
-
}, r =
|
|
1446
|
+
}, r = j(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
|
|
1368
1447
|
applicationId: e,
|
|
1369
1448
|
period: "daily",
|
|
1370
|
-
startDate:
|
|
1449
|
+
startDate: j(() => {
|
|
1371
1450
|
let e = new Date(r);
|
|
1372
1451
|
return e.setDate(e.getDate() - 30), e;
|
|
1373
1452
|
}, [r]).toISOString(),
|
|
1374
1453
|
endDate: r.toISOString()
|
|
1375
1454
|
} });
|
|
1376
|
-
return a ? /* @__PURE__ */ G(
|
|
1377
|
-
},
|
|
1378
|
-
let { t } =
|
|
1455
|
+
return a ? /* @__PURE__ */ G(ze, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ G(Be, { message: s.message }) : /* @__PURE__ */ G(Qe, { analytics: (i?.applicationAnalytics ?? []).map(Fe) });
|
|
1456
|
+
}, Ye = ({ app: e }) => {
|
|
1457
|
+
let { t } = P(), n = (e, n) => {
|
|
1379
1458
|
let r = t(e);
|
|
1380
1459
|
return r === e ? n : r;
|
|
1381
1460
|
};
|
|
@@ -1384,22 +1463,22 @@ var Ie = [
|
|
|
1384
1463
|
children: [/* @__PURE__ */ K("div", {
|
|
1385
1464
|
className: "lg:col-span-2 space-y-6",
|
|
1386
1465
|
children: [
|
|
1387
|
-
/* @__PURE__ */ G(
|
|
1466
|
+
/* @__PURE__ */ G(Me, { children: /* @__PURE__ */ K("div", {
|
|
1388
1467
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1389
1468
|
children: [
|
|
1390
|
-
/* @__PURE__ */ G(
|
|
1469
|
+
/* @__PURE__ */ G($, {
|
|
1391
1470
|
label: n("devportal.totalInstalls", "Total Installs"),
|
|
1392
1471
|
value: e.installCount.toLocaleString()
|
|
1393
1472
|
}),
|
|
1394
|
-
/* @__PURE__ */ G(
|
|
1473
|
+
/* @__PURE__ */ G($, {
|
|
1395
1474
|
label: n("devportal.activeInstalls", "Active Installs"),
|
|
1396
1475
|
value: e.activeInstallCount.toLocaleString()
|
|
1397
1476
|
}),
|
|
1398
|
-
/* @__PURE__ */ G(
|
|
1477
|
+
/* @__PURE__ */ G($, {
|
|
1399
1478
|
label: n("devportal.averageRating", "Average Rating"),
|
|
1400
1479
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
|
|
1401
1480
|
}),
|
|
1402
|
-
/* @__PURE__ */ G(
|
|
1481
|
+
/* @__PURE__ */ G($, {
|
|
1403
1482
|
label: n("devportal.reviews", "Reviews"),
|
|
1404
1483
|
value: e.reviewCount.toString()
|
|
1405
1484
|
})
|
|
@@ -1489,27 +1568,27 @@ var Ie = [
|
|
|
1489
1568
|
children: /* @__PURE__ */ K("div", {
|
|
1490
1569
|
className: "space-y-2",
|
|
1491
1570
|
children: [
|
|
1492
|
-
e.websiteUrl && /* @__PURE__ */ G(
|
|
1571
|
+
e.websiteUrl && /* @__PURE__ */ G(st, {
|
|
1493
1572
|
label: n("devportal.website", "Website"),
|
|
1494
1573
|
url: e.websiteUrl
|
|
1495
1574
|
}),
|
|
1496
|
-
e.documentationUrl && /* @__PURE__ */ G(
|
|
1575
|
+
e.documentationUrl && /* @__PURE__ */ G(st, {
|
|
1497
1576
|
label: n("devportal.documentation", "Documentation"),
|
|
1498
1577
|
url: e.documentationUrl
|
|
1499
1578
|
}),
|
|
1500
|
-
e.supportUrl && /* @__PURE__ */ G(
|
|
1579
|
+
e.supportUrl && /* @__PURE__ */ G(st, {
|
|
1501
1580
|
label: n("devportal.support", "Support"),
|
|
1502
1581
|
url: e.supportUrl
|
|
1503
1582
|
}),
|
|
1504
|
-
e.githubUrl && /* @__PURE__ */ G(
|
|
1583
|
+
e.githubUrl && /* @__PURE__ */ G(st, {
|
|
1505
1584
|
label: n("devportal.github", "GitHub"),
|
|
1506
1585
|
url: e.githubUrl
|
|
1507
1586
|
}),
|
|
1508
|
-
e.privacyPolicyUrl && /* @__PURE__ */ G(
|
|
1587
|
+
e.privacyPolicyUrl && /* @__PURE__ */ G(st, {
|
|
1509
1588
|
label: n("devportal.privacyPolicy", "Privacy Policy"),
|
|
1510
1589
|
url: e.privacyPolicyUrl
|
|
1511
1590
|
}),
|
|
1512
|
-
e.termsOfServiceUrl && /* @__PURE__ */ G(
|
|
1591
|
+
e.termsOfServiceUrl && /* @__PURE__ */ G(st, {
|
|
1513
1592
|
label: n("devportal.termsOfService", "Terms of Service"),
|
|
1514
1593
|
url: e.termsOfServiceUrl
|
|
1515
1594
|
})
|
|
@@ -1518,8 +1597,8 @@ var Ie = [
|
|
|
1518
1597
|
})]
|
|
1519
1598
|
})]
|
|
1520
1599
|
});
|
|
1521
|
-
},
|
|
1522
|
-
let { t: i } =
|
|
1600
|
+
}, Xe = ({ appId: e, webhooks: t, onNavigate: n }) => {
|
|
1601
|
+
let { t: i } = P(), a = (e, t) => {
|
|
1523
1602
|
let n = i(e);
|
|
1524
1603
|
return n === e ? t : n;
|
|
1525
1604
|
};
|
|
@@ -1539,7 +1618,7 @@ var Ie = [
|
|
|
1539
1618
|
}), /* @__PURE__ */ K("button", {
|
|
1540
1619
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1541
1620
|
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",
|
|
1542
|
-
children: [/* @__PURE__ */ G(
|
|
1621
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1543
1622
|
})]
|
|
1544
1623
|
}), t.length > 0 ? /* @__PURE__ */ G("div", {
|
|
1545
1624
|
className: "space-y-4",
|
|
@@ -1563,7 +1642,7 @@ var Ie = [
|
|
|
1563
1642
|
})] }), /* @__PURE__ */ G("button", {
|
|
1564
1643
|
onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
|
|
1565
1644
|
className: "rounded-md p-1 hover:bg-bg-sunken",
|
|
1566
|
-
children: /* @__PURE__ */ G(
|
|
1645
|
+
children: /* @__PURE__ */ G(ve, { size: 20 })
|
|
1567
1646
|
})]
|
|
1568
1647
|
}),
|
|
1569
1648
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1620,18 +1699,18 @@ var Ie = [
|
|
|
1620
1699
|
}, t.id))
|
|
1621
1700
|
}) : /* @__PURE__ */ G(r, {
|
|
1622
1701
|
illustration: "empty-notifications",
|
|
1623
|
-
icon: /* @__PURE__ */ G(
|
|
1702
|
+
icon: /* @__PURE__ */ G(De, { size: 32 }),
|
|
1624
1703
|
title: a("devportal.noWebhooks", "No webhooks"),
|
|
1625
1704
|
description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
|
|
1626
1705
|
action: /* @__PURE__ */ K("button", {
|
|
1627
1706
|
onClick: () => n(`/apps/${e}/webhooks/new`),
|
|
1628
1707
|
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",
|
|
1629
|
-
children: [/* @__PURE__ */ G(
|
|
1708
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
|
|
1630
1709
|
})
|
|
1631
1710
|
})]
|
|
1632
1711
|
});
|
|
1633
|
-
},
|
|
1634
|
-
let { t: p } =
|
|
1712
|
+
}, Ze = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
|
|
1713
|
+
let { t: p } = P(), m = (e, t) => {
|
|
1635
1714
|
let n = p(e);
|
|
1636
1715
|
return n === e ? t : n;
|
|
1637
1716
|
}, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
|
|
@@ -1666,7 +1745,7 @@ var Ie = [
|
|
|
1666
1745
|
})] }), /* @__PURE__ */ K("button", {
|
|
1667
1746
|
onClick: i,
|
|
1668
1747
|
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",
|
|
1669
|
-
children: [/* @__PURE__ */ G(
|
|
1748
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1670
1749
|
})]
|
|
1671
1750
|
}),
|
|
1672
1751
|
h.length > 0 && /* @__PURE__ */ G("div", {
|
|
@@ -1732,7 +1811,7 @@ var Ie = [
|
|
|
1732
1811
|
className: "font-medium",
|
|
1733
1812
|
children: ["Delegation #", e.id.slice(0, 8)]
|
|
1734
1813
|
}), /* @__PURE__ */ G("span", {
|
|
1735
|
-
className: t("rounded-full px-2 py-0.5 text-xs font-medium",
|
|
1814
|
+
className: t("rounded-full px-2 py-0.5 text-xs font-medium", Re[e.status]),
|
|
1736
1815
|
children: e.status
|
|
1737
1816
|
})]
|
|
1738
1817
|
}), /* @__PURE__ */ K("p", {
|
|
@@ -1750,7 +1829,7 @@ var Ie = [
|
|
|
1750
1829
|
}), e.status === "ACTIVE" && /* @__PURE__ */ K("button", {
|
|
1751
1830
|
onClick: () => a(e.id),
|
|
1752
1831
|
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",
|
|
1753
|
-
children: [/* @__PURE__ */ G(
|
|
1832
|
+
children: [/* @__PURE__ */ G(ke, { size: 14 }), m("devportal.revoke", "Revoke")]
|
|
1754
1833
|
})]
|
|
1755
1834
|
}),
|
|
1756
1835
|
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
|
|
@@ -1779,7 +1858,7 @@ var Ie = [
|
|
|
1779
1858
|
e.expiresAt && /* @__PURE__ */ K("span", {
|
|
1780
1859
|
className: "flex items-center gap-1",
|
|
1781
1860
|
children: [
|
|
1782
|
-
/* @__PURE__ */ G(
|
|
1861
|
+
/* @__PURE__ */ G(fe, { size: 12 }),
|
|
1783
1862
|
m("devportal.expires", "Expires"),
|
|
1784
1863
|
" ",
|
|
1785
1864
|
new Date(e.expiresAt).toLocaleDateString()
|
|
@@ -1787,7 +1866,7 @@ var Ie = [
|
|
|
1787
1866
|
}),
|
|
1788
1867
|
!e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ K("span", {
|
|
1789
1868
|
className: "flex items-center gap-1",
|
|
1790
|
-
children: [/* @__PURE__ */ G(
|
|
1869
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
1791
1870
|
size: 12,
|
|
1792
1871
|
className: "text-status-success-text"
|
|
1793
1872
|
}), m("devportal.noExpiration", "No expiration")]
|
|
@@ -1795,7 +1874,7 @@ var Ie = [
|
|
|
1795
1874
|
e.revokedAt && /* @__PURE__ */ K("span", {
|
|
1796
1875
|
className: "flex items-center gap-1",
|
|
1797
1876
|
children: [
|
|
1798
|
-
/* @__PURE__ */ G(
|
|
1877
|
+
/* @__PURE__ */ G(ke, {
|
|
1799
1878
|
size: 12,
|
|
1800
1879
|
className: "text-status-error-text"
|
|
1801
1880
|
}),
|
|
@@ -1810,19 +1889,19 @@ var Ie = [
|
|
|
1810
1889
|
}, e.id))
|
|
1811
1890
|
}) : /* @__PURE__ */ G(r, {
|
|
1812
1891
|
illustration: "empty-people",
|
|
1813
|
-
icon: /* @__PURE__ */ G(
|
|
1892
|
+
icon: /* @__PURE__ */ G(Te, { size: 32 }),
|
|
1814
1893
|
title: m("devportal.noDelegations", "No delegations"),
|
|
1815
1894
|
description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
|
|
1816
1895
|
action: /* @__PURE__ */ K("button", {
|
|
1817
1896
|
onClick: i,
|
|
1818
1897
|
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",
|
|
1819
|
-
children: [/* @__PURE__ */ G(
|
|
1898
|
+
children: [/* @__PURE__ */ G(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
|
|
1820
1899
|
})
|
|
1821
1900
|
})
|
|
1822
1901
|
]
|
|
1823
1902
|
});
|
|
1824
|
-
},
|
|
1825
|
-
let { t } =
|
|
1903
|
+
}, Qe = ({ analytics: e }) => {
|
|
1904
|
+
let { t } = P(), n = (e, n) => {
|
|
1826
1905
|
let r = t(e);
|
|
1827
1906
|
return r === e ? n : r;
|
|
1828
1907
|
}, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
|
|
@@ -1831,22 +1910,22 @@ var Ie = [
|
|
|
1831
1910
|
children: [/* @__PURE__ */ K("div", {
|
|
1832
1911
|
className: "grid gap-4 sm:grid-cols-4",
|
|
1833
1912
|
children: [
|
|
1834
|
-
/* @__PURE__ */ G(
|
|
1913
|
+
/* @__PURE__ */ G($, {
|
|
1835
1914
|
label: n("devportal.activeUsers", "Active Users"),
|
|
1836
1915
|
value: i?.activeUsers.toLocaleString() || "0",
|
|
1837
1916
|
trend: a ? o(i.activeUsers, a.activeUsers) : void 0
|
|
1838
1917
|
}),
|
|
1839
|
-
/* @__PURE__ */ G(
|
|
1918
|
+
/* @__PURE__ */ G($, {
|
|
1840
1919
|
label: n("devportal.apiCalls", "API Calls"),
|
|
1841
1920
|
value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
|
|
1842
1921
|
trend: a ? o(i.apiCalls, a.apiCalls) : void 0
|
|
1843
1922
|
}),
|
|
1844
|
-
/* @__PURE__ */ G(
|
|
1923
|
+
/* @__PURE__ */ G($, {
|
|
1845
1924
|
label: n("devportal.avgResponseTime", "Avg Response Time"),
|
|
1846
1925
|
value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
|
|
1847
1926
|
trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
|
|
1848
1927
|
}),
|
|
1849
|
-
/* @__PURE__ */ G(
|
|
1928
|
+
/* @__PURE__ */ G($, {
|
|
1850
1929
|
label: n("devportal.errorRate", "Error Rate"),
|
|
1851
1930
|
value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
|
|
1852
1931
|
trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
|
|
@@ -1896,17 +1975,17 @@ var Ie = [
|
|
|
1896
1975
|
]
|
|
1897
1976
|
}) : /* @__PURE__ */ G(r, {
|
|
1898
1977
|
illustration: "empty-data",
|
|
1899
|
-
icon: /* @__PURE__ */ G(
|
|
1978
|
+
icon: /* @__PURE__ */ G(F, { size: 32 }),
|
|
1900
1979
|
title: n("devportal.noAnalyticsData", "No analytics data"),
|
|
1901
1980
|
description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
|
|
1902
1981
|
})
|
|
1903
1982
|
})]
|
|
1904
1983
|
});
|
|
1905
|
-
},
|
|
1906
|
-
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } =
|
|
1984
|
+
}, $e = "# 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}", et = ({ app: t }) => {
|
|
1985
|
+
let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = P(), o = (e, t) => {
|
|
1907
1986
|
let n = a(e);
|
|
1908
1987
|
return n === e ? t : n;
|
|
1909
|
-
}, [s, c] =
|
|
1988
|
+
}, [s, c] = N($e), [l, u] = N("{}"), [d, f] = N(""), [p, m] = N(!1), [h, g] = N(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = N(i || ""), [y, b] = N(!1), x = A(async () => {
|
|
1910
1989
|
m(!0), f("");
|
|
1911
1990
|
try {
|
|
1912
1991
|
let e = {};
|
|
@@ -1937,7 +2016,7 @@ var Ie = [
|
|
|
1937
2016
|
l,
|
|
1938
2017
|
h,
|
|
1939
2018
|
_
|
|
1940
|
-
]), S =
|
|
2019
|
+
]), S = A(() => {
|
|
1941
2020
|
i && v(i), b(!0);
|
|
1942
2021
|
}, [i]);
|
|
1943
2022
|
return /* @__PURE__ */ K("div", {
|
|
@@ -1966,7 +2045,7 @@ var Ie = [
|
|
|
1966
2045
|
})] }), /* @__PURE__ */ K("button", {
|
|
1967
2046
|
onClick: S,
|
|
1968
2047
|
className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
|
|
1969
|
-
children: [/* @__PURE__ */ G(
|
|
2048
|
+
children: [/* @__PURE__ */ G(z, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
|
|
1970
2049
|
})]
|
|
1971
2050
|
}),
|
|
1972
2051
|
y && /* @__PURE__ */ K("div", {
|
|
@@ -2067,10 +2146,10 @@ var Ie = [
|
|
|
2067
2146
|
onClick: x,
|
|
2068
2147
|
disabled: p,
|
|
2069
2148
|
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",
|
|
2070
|
-
children: [p ? /* @__PURE__ */ G(
|
|
2149
|
+
children: [p ? /* @__PURE__ */ G(B, {
|
|
2071
2150
|
size: 16,
|
|
2072
2151
|
className: "animate-spin"
|
|
2073
|
-
}) : /* @__PURE__ */ G(
|
|
2152
|
+
}) : /* @__PURE__ */ G(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
|
|
2074
2153
|
}),
|
|
2075
2154
|
d && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
|
|
2076
2155
|
className: "block text-sm font-medium mb-1",
|
|
@@ -2081,10 +2160,10 @@ var Ie = [
|
|
|
2081
2160
|
})] })
|
|
2082
2161
|
]
|
|
2083
2162
|
});
|
|
2084
|
-
},
|
|
2085
|
-
let d =
|
|
2163
|
+
}, tt = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
|
|
2164
|
+
let d = M(null), [f, p] = N(!1), m = M(n);
|
|
2086
2165
|
m.current !== n && (m.current = n, f && p(!1));
|
|
2087
|
-
let h =
|
|
2166
|
+
let h = A(async (e) => {
|
|
2088
2167
|
try {
|
|
2089
2168
|
r((await s(e)).downloadUrl);
|
|
2090
2169
|
} catch {}
|
|
@@ -2110,7 +2189,7 @@ var Ie = [
|
|
|
2110
2189
|
className: "text-text-secondary opacity-40"
|
|
2111
2190
|
}), c && /* @__PURE__ */ K("div", {
|
|
2112
2191
|
className: "absolute inset-0 bg-bg-overlay flex flex-col items-center justify-center gap-1",
|
|
2113
|
-
children: [/* @__PURE__ */ G(
|
|
2192
|
+
children: [/* @__PURE__ */ G(B, {
|
|
2114
2193
|
size: 14,
|
|
2115
2194
|
className: "animate-spin text-white"
|
|
2116
2195
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2158,8 +2237,8 @@ var Ie = [
|
|
|
2158
2237
|
})
|
|
2159
2238
|
]
|
|
2160
2239
|
});
|
|
2161
|
-
},
|
|
2162
|
-
let s =
|
|
2240
|
+
}, Z = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
|
|
2241
|
+
let s = M(null), [c, l] = N(""), u = A(async (t) => {
|
|
2163
2242
|
try {
|
|
2164
2243
|
let i = await r(t);
|
|
2165
2244
|
n([...e, i.downloadUrl]);
|
|
@@ -2199,14 +2278,14 @@ var Ie = [
|
|
|
2199
2278
|
type: "button",
|
|
2200
2279
|
onClick: () => f(t),
|
|
2201
2280
|
className: "absolute top-1 right-1 rounded-full bg-bg-overlay text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2202
|
-
children: /* @__PURE__ */ G(
|
|
2281
|
+
children: /* @__PURE__ */ G(Oe, { size: 12 })
|
|
2203
2282
|
})]
|
|
2204
2283
|
}, t)), /* @__PURE__ */ G("button", {
|
|
2205
2284
|
type: "button",
|
|
2206
2285
|
disabled: i,
|
|
2207
2286
|
onClick: () => s.current?.click(),
|
|
2208
2287
|
className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border-subtle flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
|
|
2209
|
-
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2288
|
+
children: i ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
2210
2289
|
size: 18,
|
|
2211
2290
|
className: "animate-spin text-primary"
|
|
2212
2291
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -2253,13 +2332,13 @@ var Ie = [
|
|
|
2253
2332
|
})
|
|
2254
2333
|
]
|
|
2255
2334
|
});
|
|
2256
|
-
},
|
|
2335
|
+
}, Q = new Set(["workflow", "template"]), nt = [{
|
|
2257
2336
|
value: "FREE",
|
|
2258
2337
|
label: "Free"
|
|
2259
2338
|
}, {
|
|
2260
2339
|
value: "PAID",
|
|
2261
2340
|
label: "Paid"
|
|
2262
|
-
}],
|
|
2341
|
+
}], rt = {
|
|
2263
2342
|
NODE: [
|
|
2264
2343
|
{
|
|
2265
2344
|
value: "node",
|
|
@@ -2331,12 +2410,12 @@ var Ie = [
|
|
|
2331
2410
|
label: "Plugin"
|
|
2332
2411
|
}
|
|
2333
2412
|
]
|
|
2334
|
-
},
|
|
2413
|
+
}, it = {
|
|
2335
2414
|
NODE: "node",
|
|
2336
2415
|
WORKFLOW: "workflow",
|
|
2337
2416
|
APP: "app"
|
|
2338
2417
|
};
|
|
2339
|
-
function
|
|
2418
|
+
function at(e) {
|
|
2340
2419
|
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") : "";
|
|
2341
2420
|
return {
|
|
2342
2421
|
iconUrl: e.iconUrl ?? "",
|
|
@@ -2351,7 +2430,7 @@ function rt(e) {
|
|
|
2351
2430
|
supportUrl: e.supportUrl ?? "",
|
|
2352
2431
|
privacyPolicyUrl: e.privacyPolicyUrl ?? "",
|
|
2353
2432
|
termsOfServiceUrl: e.termsOfServiceUrl ?? "",
|
|
2354
|
-
manifestItemType: typeof t.itemType == "string" ? t.itemType :
|
|
2433
|
+
manifestItemType: typeof t.itemType == "string" ? t.itemType : it[e.appType] ?? "",
|
|
2355
2434
|
manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.name ?? "",
|
|
2356
2435
|
manifestVersion: typeof n.version == "string" ? n.version : "",
|
|
2357
2436
|
manifestInstallType: typeof r.type == "string" ? r.type : "zip",
|
|
@@ -2362,15 +2441,15 @@ function rt(e) {
|
|
|
2362
2441
|
manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
|
|
2363
2442
|
};
|
|
2364
2443
|
}
|
|
2365
|
-
var
|
|
2366
|
-
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } =
|
|
2444
|
+
var ot = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i = !1, onNavigateToVersions: a, onNavigateToPricing: o, onNavigateToSubmission: s }) => {
|
|
2445
|
+
let { workspacesGatewayUrl: c, authToken: l, workspaceId: u, getWorkspaceToken: d } = e(), { t: f } = P(), p = (e, t) => {
|
|
2367
2446
|
let n = f(e);
|
|
2368
2447
|
return n === e ? t : n;
|
|
2369
|
-
}, [m, h] =
|
|
2448
|
+
}, [m, h] = N(() => at(t)), [g, v] = N(!1), [b, x] = N(null), S = M(at(t)), C = M(t);
|
|
2370
2449
|
C.current = t;
|
|
2371
2450
|
let w = JSON.stringify(m) !== JSON.stringify(S.current), [ee] = _();
|
|
2372
|
-
|
|
2373
|
-
let e =
|
|
2451
|
+
se(() => {
|
|
2452
|
+
let e = at(C.current);
|
|
2374
2453
|
h(e), S.current = e, x(null);
|
|
2375
2454
|
}, [t.id]);
|
|
2376
2455
|
let E = (e, t) => {
|
|
@@ -2378,10 +2457,10 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2378
2457
|
...n,
|
|
2379
2458
|
[e]: t
|
|
2380
2459
|
})), x(null);
|
|
2381
|
-
}, D = m.shortDescription.trim().length > 0 && m.privacyPolicyUrl.trim().length > 0 && m.termsOfServiceUrl.trim().length > 0,
|
|
2460
|
+
}, D = m.shortDescription.trim().length > 0 && m.privacyPolicyUrl.trim().length > 0 && m.termsOfServiceUrl.trim().length > 0, re = async () => {
|
|
2382
2461
|
v(!0), x(null);
|
|
2383
2462
|
try {
|
|
2384
|
-
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r =
|
|
2463
|
+
let e = m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = m.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Q.has(m.manifestItemType), i = t.manifest ?? {}, a = {
|
|
2385
2464
|
manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
|
|
2386
2465
|
itemType: m.manifestItemType || void 0,
|
|
2387
2466
|
identity: {
|
|
@@ -2418,13 +2497,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2418
2497
|
} finally {
|
|
2419
2498
|
v(!1);
|
|
2420
2499
|
}
|
|
2421
|
-
}, { upload:
|
|
2500
|
+
}, { upload: ie, uploading: ae, progress: oe, error: A } = k(c, l, u, d, "/DevPortal/Assets"), { upload: j, uploading: le, progress: F, error: L } = k(c, l, u, d, "/DevPortal/Assets"), { upload: pe, uploading: me, progress: he, error: ge } = k(c, l, u, d, "/DevPortal/Assets"), z = Q.has(m.manifestItemType), _e = t.status === "SUBMITTED";
|
|
2422
2501
|
return /* @__PURE__ */ K("div", {
|
|
2423
2502
|
className: "space-y-8 max-w-3xl",
|
|
2424
2503
|
children: [
|
|
2425
2504
|
t.status === "PUBLISHED" ? /* @__PURE__ */ K("div", {
|
|
2426
2505
|
className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
|
|
2427
|
-
children: [/* @__PURE__ */ G(
|
|
2506
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
2428
2507
|
size: 16,
|
|
2429
2508
|
className: "text-success mt-0.5 shrink-0"
|
|
2430
2509
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2441,11 +2520,11 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2441
2520
|
]
|
|
2442
2521
|
})]
|
|
2443
2522
|
})]
|
|
2444
|
-
}) :
|
|
2523
|
+
}) : _e ? /* @__PURE__ */ K("div", {
|
|
2445
2524
|
className: "flex items-center justify-between gap-3 rounded-lg border border-primary/30 bg-action-primary-bg/5 px-4 py-3",
|
|
2446
2525
|
children: [/* @__PURE__ */ K("div", {
|
|
2447
2526
|
className: "flex items-start gap-3",
|
|
2448
|
-
children: [/* @__PURE__ */ G(
|
|
2527
|
+
children: [/* @__PURE__ */ G(fe, {
|
|
2449
2528
|
size: 16,
|
|
2450
2529
|
className: "text-primary mt-0.5 shrink-0"
|
|
2451
2530
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2469,11 +2548,11 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2469
2548
|
type: "button",
|
|
2470
2549
|
onClick: s,
|
|
2471
2550
|
className: "shrink-0 text-xs text-primary hover:underline font-medium flex items-center gap-1",
|
|
2472
|
-
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(
|
|
2551
|
+
children: [p("devportal.viewStatus", "View Status"), /* @__PURE__ */ G(R, { size: 12 })]
|
|
2473
2552
|
})]
|
|
2474
2553
|
}) : /* @__PURE__ */ K("div", {
|
|
2475
2554
|
className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
|
|
2476
|
-
children: [/* @__PURE__ */ G(
|
|
2555
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
2477
2556
|
size: 16,
|
|
2478
2557
|
className: "text-warning mt-0.5 shrink-0"
|
|
2479
2558
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -2493,14 +2572,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2493
2572
|
children: /* @__PURE__ */ K("div", {
|
|
2494
2573
|
className: "space-y-6",
|
|
2495
2574
|
children: [
|
|
2496
|
-
/* @__PURE__ */ G(
|
|
2575
|
+
/* @__PURE__ */ G(te, {
|
|
2497
2576
|
label: p("devportal.storeItemType", "Item Type"),
|
|
2498
2577
|
value: m.manifestItemType,
|
|
2499
2578
|
onChange: (e) => {
|
|
2500
2579
|
let t = e.target.value;
|
|
2501
|
-
E("manifestItemType", t),
|
|
2580
|
+
E("manifestItemType", t), Q.has(t) ? E("manifestInstallType", "json") : m.manifestInstallType === "json" && E("manifestInstallType", "zip");
|
|
2502
2581
|
},
|
|
2503
|
-
options:
|
|
2582
|
+
options: rt[t.appType] ?? rt.APP,
|
|
2504
2583
|
placeholder: p("devportal.selectItemType", "Select item type…"),
|
|
2505
2584
|
hint: p("devportal.storeItemTypeHint", "Sub-category shown in the marketplace (e.g. Node vs Agent vs Parser)")
|
|
2506
2585
|
}),
|
|
@@ -2510,7 +2589,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2510
2589
|
onChange: (e) => E("manifestDisplayName", e.target.value),
|
|
2511
2590
|
placeholder: "My Awesome Node"
|
|
2512
2591
|
}),
|
|
2513
|
-
|
|
2592
|
+
z && t.appType !== "WORKFLOW" && /* @__PURE__ */ G(ne, {
|
|
2514
2593
|
label: p("devportal.jsonContent", "Template Definition (JSON)"),
|
|
2515
2594
|
value: m.manifestJsonContent,
|
|
2516
2595
|
onChange: (e) => E("manifestJsonContent", e.target.value),
|
|
@@ -2518,7 +2597,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2518
2597
|
placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
|
|
2519
2598
|
hint: p("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
|
|
2520
2599
|
}),
|
|
2521
|
-
|
|
2600
|
+
z && t.appType === "WORKFLOW" && /* @__PURE__ */ K("p", {
|
|
2522
2601
|
className: "text-sm text-text-secondary rounded-md bg-bg-sunken px-3 py-2",
|
|
2523
2602
|
children: [
|
|
2524
2603
|
"The Workflow Definition (JSON) is set per version. Go to the",
|
|
@@ -2538,26 +2617,26 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2538
2617
|
children: [
|
|
2539
2618
|
/* @__PURE__ */ K("div", {
|
|
2540
2619
|
className: "grid gap-5 sm:grid-cols-2",
|
|
2541
|
-
children: [/* @__PURE__ */ G(
|
|
2620
|
+
children: [/* @__PURE__ */ G(tt, {
|
|
2542
2621
|
label: p("devportal.iconUrl", "Icon"),
|
|
2543
2622
|
value: m.iconUrl,
|
|
2544
2623
|
onChange: (e) => E("iconUrl", e),
|
|
2545
2624
|
hint: p("devportal.iconUrlHint", "Shown in marketplace cards and search — square proportions (1:1)"),
|
|
2546
2625
|
aspectClass: "aspect-square",
|
|
2547
|
-
upload:
|
|
2548
|
-
uploading:
|
|
2549
|
-
progress:
|
|
2550
|
-
error:
|
|
2551
|
-
}), /* @__PURE__ */ G(
|
|
2626
|
+
upload: ie,
|
|
2627
|
+
uploading: ae,
|
|
2628
|
+
progress: oe,
|
|
2629
|
+
error: A
|
|
2630
|
+
}), /* @__PURE__ */ G(tt, {
|
|
2552
2631
|
label: p("devportal.bannerUrl", "Banner"),
|
|
2553
2632
|
value: m.bannerUrl,
|
|
2554
2633
|
onChange: (e) => E("bannerUrl", e),
|
|
2555
2634
|
hint: p("devportal.bannerUrlHint", "Fills the right panel on the product page — square or portrait works best on all screen sizes (1:1)"),
|
|
2556
2635
|
aspectClass: "aspect-square",
|
|
2557
|
-
upload:
|
|
2558
|
-
uploading:
|
|
2559
|
-
progress:
|
|
2560
|
-
error:
|
|
2636
|
+
upload: j,
|
|
2637
|
+
uploading: le,
|
|
2638
|
+
progress: F,
|
|
2639
|
+
error: L
|
|
2561
2640
|
})]
|
|
2562
2641
|
}),
|
|
2563
2642
|
/* @__PURE__ */ G(O, {
|
|
@@ -2567,7 +2646,7 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2567
2646
|
placeholder: "https://...",
|
|
2568
2647
|
hint: p("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
|
|
2569
2648
|
}),
|
|
2570
|
-
/* @__PURE__ */ G(
|
|
2649
|
+
/* @__PURE__ */ G(ne, {
|
|
2571
2650
|
label: p("devportal.shortDescription", "Short Description"),
|
|
2572
2651
|
value: m.shortDescription,
|
|
2573
2652
|
onChange: (e) => E("shortDescription", e.target.value),
|
|
@@ -2575,20 +2654,20 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2575
2654
|
rows: 2,
|
|
2576
2655
|
hint: `${m.shortDescription.length}/200 · ${p("devportal.shortDescHint", "Shown in search results and cards")}`
|
|
2577
2656
|
}),
|
|
2578
|
-
/* @__PURE__ */ G(
|
|
2657
|
+
/* @__PURE__ */ G(ne, {
|
|
2579
2658
|
label: p("devportal.longDescription", "Full Description"),
|
|
2580
2659
|
value: m.description,
|
|
2581
2660
|
onChange: (e) => E("description", e.target.value),
|
|
2582
2661
|
rows: 5,
|
|
2583
2662
|
hint: p("devportal.fullDescHint", "Markdown supported")
|
|
2584
2663
|
}),
|
|
2585
|
-
/* @__PURE__ */ G(
|
|
2664
|
+
/* @__PURE__ */ G(Z, {
|
|
2586
2665
|
urls: m.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
|
|
2587
2666
|
onChange: (e) => E("screenshotsText", e.join("\n")),
|
|
2588
|
-
upload:
|
|
2589
|
-
uploading:
|
|
2590
|
-
progress:
|
|
2591
|
-
error:
|
|
2667
|
+
upload: pe,
|
|
2668
|
+
uploading: me,
|
|
2669
|
+
progress: he,
|
|
2670
|
+
error: ge
|
|
2592
2671
|
})
|
|
2593
2672
|
]
|
|
2594
2673
|
})
|
|
@@ -2645,14 +2724,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2645
2724
|
children: [
|
|
2646
2725
|
b === "success" && /* @__PURE__ */ K("div", {
|
|
2647
2726
|
className: "flex items-center gap-2 rounded-md border border-success/30 bg-success/10 px-3 py-2 text-sm text-success",
|
|
2648
|
-
children: [/* @__PURE__ */ G(
|
|
2727
|
+
children: [/* @__PURE__ */ G(ue, {
|
|
2649
2728
|
size: 15,
|
|
2650
2729
|
className: "shrink-0"
|
|
2651
2730
|
}), p("devportal.storeListing.savedSuccess", "Store listing saved successfully.")]
|
|
2652
2731
|
}),
|
|
2653
2732
|
b === "error" && /* @__PURE__ */ K("div", {
|
|
2654
2733
|
className: "flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
2655
|
-
children: [/* @__PURE__ */ G(
|
|
2734
|
+
children: [/* @__PURE__ */ G(ce, {
|
|
2656
2735
|
size: 15,
|
|
2657
2736
|
className: "shrink-0"
|
|
2658
2737
|
}), p("devportal.storeListing.savedError", "Failed to save. Please try again.")]
|
|
@@ -2662,14 +2741,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2662
2741
|
children: [
|
|
2663
2742
|
/* @__PURE__ */ G("button", {
|
|
2664
2743
|
type: "button",
|
|
2665
|
-
onClick:
|
|
2744
|
+
onClick: re,
|
|
2666
2745
|
disabled: g || !D || !w,
|
|
2667
2746
|
title: D ? w ? void 0 : p("devportal.storeListing.noChanges", "All changes saved — edit any field to save again") : p("devportal.storeListing.requiredFieldsHint", "Fill in Short Description, Privacy Policy URL, and Terms of Service URL to save"),
|
|
2668
2747
|
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",
|
|
2669
|
-
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2748
|
+
children: g ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(B, {
|
|
2670
2749
|
size: 16,
|
|
2671
2750
|
className: "animate-spin"
|
|
2672
|
-
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(
|
|
2751
|
+
}), p("devportal.saving", "Saving…")] }) : w ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(Ce, { size: 16 }), p("devportal.saveStoreListing", "Save Store Listing")] }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(I, { size: 16 }), p("devportal.saved", "Saved")] })
|
|
2673
2752
|
}),
|
|
2674
2753
|
!D && /* @__PURE__ */ G("p", {
|
|
2675
2754
|
className: "text-xs text-text-secondary",
|
|
@@ -2679,13 +2758,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2679
2758
|
type: "button",
|
|
2680
2759
|
onClick: a,
|
|
2681
2760
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2682
|
-
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(
|
|
2761
|
+
children: [p("devportal.nextUploadVersion", "Next: Upload a Version"), /* @__PURE__ */ G(de, { size: 15 })]
|
|
2683
2762
|
}),
|
|
2684
2763
|
(!r || n > 0) && !i && o && /* @__PURE__ */ K("button", {
|
|
2685
2764
|
type: "button",
|
|
2686
2765
|
onClick: o,
|
|
2687
2766
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline underline-offset-2",
|
|
2688
|
-
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(
|
|
2767
|
+
children: [p("devportal.nextSetPricing", "Next: Set Pricing"), /* @__PURE__ */ G(de, { size: 15 })]
|
|
2689
2768
|
})
|
|
2690
2769
|
]
|
|
2691
2770
|
})
|
|
@@ -2693,9 +2772,9 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2693
2772
|
})
|
|
2694
2773
|
]
|
|
2695
2774
|
});
|
|
2696
|
-
},
|
|
2697
|
-
let { t: i } =
|
|
2698
|
-
return /* @__PURE__ */ K(
|
|
2775
|
+
}, $ = ({ label: e, value: n, trend: r }) => {
|
|
2776
|
+
let { t: i } = P();
|
|
2777
|
+
return /* @__PURE__ */ K(Ne, {
|
|
2699
2778
|
treatment: "metric",
|
|
2700
2779
|
className: "p-4",
|
|
2701
2780
|
children: [
|
|
@@ -2721,13 +2800,13 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2721
2800
|
})
|
|
2722
2801
|
]
|
|
2723
2802
|
});
|
|
2724
|
-
},
|
|
2803
|
+
}, st = ({ label: e, url: t }) => /* @__PURE__ */ K("a", {
|
|
2725
2804
|
href: t,
|
|
2726
2805
|
target: "_blank",
|
|
2727
2806
|
rel: "noopener noreferrer",
|
|
2728
2807
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
2729
|
-
children: [/* @__PURE__ */ G(
|
|
2730
|
-
}),
|
|
2808
|
+
children: [/* @__PURE__ */ G(R, { size: 14 }), e]
|
|
2809
|
+
}), ct = [
|
|
2731
2810
|
{
|
|
2732
2811
|
id: "auth",
|
|
2733
2812
|
label: "Authentication",
|
|
@@ -2799,14 +2878,14 @@ var it = ({ app: t, versionCount: n = 0, isPackageApp: r = !1, pricingDone: i =
|
|
|
2799
2878
|
description: "Access control configuration"
|
|
2800
2879
|
}
|
|
2801
2880
|
];
|
|
2802
|
-
function
|
|
2803
|
-
let t = Object.fromEntries(
|
|
2881
|
+
function lt(e) {
|
|
2882
|
+
let t = Object.fromEntries(ct.map((e) => [e.id, "none"]));
|
|
2804
2883
|
if (!e || !Array.isArray(e.permissions)) return t;
|
|
2805
2884
|
for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
|
|
2806
2885
|
return t;
|
|
2807
2886
|
}
|
|
2808
|
-
var
|
|
2809
|
-
let t = e.manifest ?? {}, [n, r] =
|
|
2887
|
+
var ut = ({ app: e }) => {
|
|
2888
|
+
let t = e.manifest ?? {}, [n, r] = N(() => lt(t)), [i, a] = N(!1), [o, s] = N(!1), [c] = _(), l = (e, t) => {
|
|
2810
2889
|
s(!1), r((n) => ({
|
|
2811
2890
|
...n,
|
|
2812
2891
|
[e]: t
|
|
@@ -2858,7 +2937,7 @@ var st = ({ app: e }) => {
|
|
|
2858
2937
|
}, e))]
|
|
2859
2938
|
}) }), /* @__PURE__ */ G("tbody", {
|
|
2860
2939
|
className: "divide-y divide-border",
|
|
2861
|
-
children:
|
|
2940
|
+
children: ct.map((e) => /* @__PURE__ */ K("tr", {
|
|
2862
2941
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
2863
2942
|
children: [/* @__PURE__ */ K("td", {
|
|
2864
2943
|
className: "px-4 py-3",
|
|
@@ -2886,7 +2965,7 @@ var st = ({ app: e }) => {
|
|
|
2886
2965
|
}),
|
|
2887
2966
|
/* @__PURE__ */ K("div", {
|
|
2888
2967
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-3 flex gap-2 text-xs text-text-secondary",
|
|
2889
|
-
children: [/* @__PURE__ */ G(
|
|
2968
|
+
children: [/* @__PURE__ */ G(ge, {
|
|
2890
2969
|
size: 14,
|
|
2891
2970
|
className: "flex-shrink-0 mt-0.5"
|
|
2892
2971
|
}), /* @__PURE__ */ K("span", { children: [/* @__PURE__ */ G("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
|
|
@@ -2895,16 +2974,16 @@ var st = ({ app: e }) => {
|
|
|
2895
2974
|
className: "flex items-center justify-end gap-3",
|
|
2896
2975
|
children: [o && /* @__PURE__ */ K("span", {
|
|
2897
2976
|
className: "flex items-center gap-1.5 text-sm text-status-success-text",
|
|
2898
|
-
children: [/* @__PURE__ */ G(
|
|
2977
|
+
children: [/* @__PURE__ */ G(ue, { size: 14 }), "Saved"]
|
|
2899
2978
|
}), /* @__PURE__ */ K("button", {
|
|
2900
2979
|
type: "button",
|
|
2901
2980
|
onClick: () => void u(),
|
|
2902
2981
|
disabled: i,
|
|
2903
2982
|
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",
|
|
2904
|
-
children: [i ? /* @__PURE__ */ G(
|
|
2983
|
+
children: [i ? /* @__PURE__ */ G(B, {
|
|
2905
2984
|
size: 14,
|
|
2906
2985
|
className: "animate-spin"
|
|
2907
|
-
}) : /* @__PURE__ */ G(
|
|
2986
|
+
}) : /* @__PURE__ */ G(H, { size: 14 }), "Save Permissions"]
|
|
2908
2987
|
})]
|
|
2909
2988
|
})
|
|
2910
2989
|
]
|
|
@@ -2912,6 +2991,6 @@ var st = ({ app: e }) => {
|
|
|
2912
2991
|
});
|
|
2913
2992
|
};
|
|
2914
2993
|
//#endregion
|
|
2915
|
-
export {
|
|
2994
|
+
export { J as ApplicationDetailPage };
|
|
2916
2995
|
|
|
2917
2996
|
//# sourceMappingURL=ApplicationDetailPage.js.map
|