@burdenoff/microfe-devportal 2026.701.1 → 2026.702.2
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/components/index.js +1 -1
- package/dist/devportal/pages/AnalyticsDashboardPage.js +46 -46
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +1418 -712
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +378 -295
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApplicationPage.js +281 -228
- package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
- package/dist/devportal/pages/DashboardPage.js +200 -307
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +380 -284
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +12 -12
- package/dist/devportal/pages/RevenueDashboardPage.js +8 -8
- package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
- package/dist/devportal/pages/WebhookDetailPage.js +146 -146
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/generated/global-operations.js +185 -156
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,358 +1,251 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { EmptyState as t } from "../components/EmptyState.js";
|
|
3
3
|
import { useGetDevportalDashboardBootstrapQuery as n } from "../../generated/global-operations.js";
|
|
4
|
-
import { PageLayout as r
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { PermissionGuard as c } from "../components/PermissionGuard.js";
|
|
4
|
+
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
|
+
import { AppCard as i } from "../components/AppCard.js";
|
|
6
|
+
import { PermissionGuard as a } from "../components/PermissionGuard.js";
|
|
8
7
|
import "../components/index.js";
|
|
9
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
8
|
+
import { DEVPORTAL_PERMISSIONS as o } from "../constants/permissions.js";
|
|
10
9
|
import "../hooks/index.js";
|
|
11
|
-
import { useEffect as
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import {
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import {
|
|
10
|
+
import { useEffect as s } from "react";
|
|
11
|
+
import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { AppWindow as l, ArrowRight as u, Building2 as d, DollarSign as f, Download as p, Loader2 as m, Plus as h } from "lucide-react";
|
|
13
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
14
|
+
import { GlassCard as y, GradientText as b } from "@burdenoff/fe-libs/ui";
|
|
16
15
|
//#region src/devportal/pages/DashboardPage.tsx
|
|
17
|
-
var
|
|
18
|
-
let { navigate:
|
|
19
|
-
let n =
|
|
16
|
+
var x = () => {
|
|
17
|
+
let { navigate: f, basePath: p, activeOrgId: y, setActiveOrgId: x } = e(), { t: T } = c(), E = (e, t) => {
|
|
18
|
+
let n = T(e);
|
|
20
19
|
return n === e ? t : n;
|
|
21
|
-
}, { data:
|
|
20
|
+
}, { data: D, loading: O } = n({
|
|
22
21
|
variables: {},
|
|
23
22
|
fetchPolicy: "cache-and-network"
|
|
24
|
-
}),
|
|
25
|
-
if (
|
|
23
|
+
}), k = D?.myDeveloperOrganizations ?? [], A = (() => {
|
|
24
|
+
if (k.length) return y && k.some((e) => e.id === y) ? y : k[0]?.id;
|
|
26
25
|
})();
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
s(() => {
|
|
27
|
+
A && A !== y && x(A);
|
|
29
28
|
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
A,
|
|
30
|
+
y,
|
|
31
|
+
x
|
|
33
32
|
]);
|
|
34
|
-
let { data:
|
|
35
|
-
variables: { organizationId:
|
|
36
|
-
skip: !
|
|
33
|
+
let { data: j, loading: M } = n({
|
|
34
|
+
variables: { organizationId: A },
|
|
35
|
+
skip: !A,
|
|
37
36
|
fetchPolicy: "cache-and-network"
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
if (!(
|
|
37
|
+
}), N = O || M, P = j ?? D;
|
|
38
|
+
s(() => {
|
|
39
|
+
if (!(O || !D) && !(k.length > 0)) {
|
|
41
40
|
try {
|
|
42
41
|
if (localStorage.getItem("devportal_setup_dismissed")) return;
|
|
43
42
|
} catch {
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
f?.(`${p}/setup`);
|
|
47
46
|
}
|
|
48
47
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
O,
|
|
49
|
+
D,
|
|
50
|
+
k.length,
|
|
51
|
+
f,
|
|
52
|
+
p
|
|
54
53
|
]);
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
errorRate: 0
|
|
64
|
-
}, J = (e) => {
|
|
65
|
-
A?.(`${N}${e}`);
|
|
66
|
-
}, Y = W, X = !Y && B.length > 0;
|
|
67
|
-
return /* @__PURE__ */ T(c, {
|
|
68
|
-
permission: l.APP_READ,
|
|
69
|
-
children: /* @__PURE__ */ E(r, {
|
|
70
|
-
heroBackdrop: !0,
|
|
71
|
-
title: /* @__PURE__ */ E(w, { children: [
|
|
72
|
-
L("devportal.developer", "Developer"),
|
|
54
|
+
let F = j?.applications?.edges?.map((e) => e.node) ?? [], I = P?.applications?.totalCount ?? 0, L = k.length, R = (e) => {
|
|
55
|
+
f?.(`${p}${e}`);
|
|
56
|
+
}, z = N, B = !z && k.length > 0;
|
|
57
|
+
return /* @__PURE__ */ _(a, {
|
|
58
|
+
permission: o.APP_READ,
|
|
59
|
+
children: /* @__PURE__ */ _(r, {
|
|
60
|
+
title: /* @__PURE__ */ v(g, { children: [
|
|
61
|
+
E("devportal.developer", "Developer"),
|
|
73
62
|
" ",
|
|
74
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ _(b, { children: E("devportal.portal", "Portal") })
|
|
75
64
|
] }),
|
|
76
|
-
|
|
77
|
-
purpose: L("devportal.dashboardPurpose", "This is your developer home base — a single view of the apps you ship, the organizations behind them, and how they are performing (installs, API usage, revenue). Start an organization, then create and publish apps from here."),
|
|
78
|
-
actions: X ? /* @__PURE__ */ E("button", {
|
|
65
|
+
actions: B ? /* @__PURE__ */ v("button", {
|
|
79
66
|
"data-tour": "devportal-dashboard-create-app-button",
|
|
80
|
-
onClick: () =>
|
|
67
|
+
onClick: () => R("/apps/new"),
|
|
81
68
|
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",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
}) :
|
|
69
|
+
children: [/* @__PURE__ */ _(h, { size: 16 }), E("devportal.createApp", "Create App")]
|
|
70
|
+
}) : z ? null : /* @__PURE__ */ v("button", {
|
|
84
71
|
"data-tour": "devportal-dashboard-create-org-button",
|
|
85
|
-
onClick: () =>
|
|
72
|
+
onClick: () => R("/organizations/new"),
|
|
86
73
|
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",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ _(h, { size: 16 }), E("devportal.createOrganization", "Create Organization")]
|
|
88
75
|
}),
|
|
89
|
-
children:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
icon: /* @__PURE__ */ T(p, { size: 20 }),
|
|
100
|
-
trend: void 0
|
|
101
|
-
}),
|
|
102
|
-
/* @__PURE__ */ T(a, {
|
|
103
|
-
title: L("devportal.organizations", "Organizations"),
|
|
104
|
-
value: Y ? /* @__PURE__ */ T(v, { className: "h-5 w-5 animate-spin" }) : q.totalOrgs,
|
|
105
|
-
icon: /* @__PURE__ */ T(h, { size: 20 })
|
|
106
|
-
}),
|
|
107
|
-
/* @__PURE__ */ T(a, {
|
|
108
|
-
title: L("devportal.apiKeys", "API Keys"),
|
|
109
|
-
value: q.totalApiKeys,
|
|
110
|
-
icon: /* @__PURE__ */ T(_, { size: 20 }),
|
|
111
|
-
description: L("devportal.activeKeys", "Active keys")
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ T(a, {
|
|
114
|
-
title: L("devportal.webhooks", "Webhooks"),
|
|
115
|
-
value: q.totalWebhooks,
|
|
116
|
-
icon: /* @__PURE__ */ T(C, { size: 20 }),
|
|
117
|
-
description: L("devportal.configured", "Configured")
|
|
118
|
-
})
|
|
119
|
-
]
|
|
120
|
-
})
|
|
121
|
-
}),
|
|
122
|
-
!Y && /* @__PURE__ */ T(k, {
|
|
123
|
-
storageKey: "devportal-dashboard",
|
|
124
|
-
steps: [
|
|
125
|
-
{
|
|
126
|
-
id: "create-org",
|
|
127
|
-
label: L("devportal.createOrganization", "Create Organization"),
|
|
128
|
-
description: L("devportal.setUpATeamToCollaborate", "Set up a team to collaborate"),
|
|
129
|
-
icon: /* @__PURE__ */ T(h, { size: 16 }),
|
|
130
|
-
onClick: () => J("/organizations/new"),
|
|
131
|
-
done: X
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
id: "create-app",
|
|
135
|
-
label: L("devportal.createApp", "Create App"),
|
|
136
|
-
description: L("devportal.startBuildingANewApplication", "Start building a new application"),
|
|
137
|
-
icon: /* @__PURE__ */ T(p, { size: 16 }),
|
|
138
|
-
onClick: () => J("/apps/new"),
|
|
139
|
-
done: q.totalApps > 0
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: "api-key",
|
|
143
|
-
label: L("devportal.generateApiKey", "Generate API Key"),
|
|
144
|
-
description: L("devportal.createCredentialsForYourApps", "Create credentials for your apps"),
|
|
145
|
-
icon: /* @__PURE__ */ T(_, { size: 16 }),
|
|
146
|
-
onClick: () => J("/api-keys")
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
id: "webhooks",
|
|
150
|
-
label: L("devportal.configureWebhooks", "Configure Webhooks"),
|
|
151
|
-
description: L("devportal.setUpEventNotifications", "Set up event notifications"),
|
|
152
|
-
icon: /* @__PURE__ */ T(C, { size: 16 }),
|
|
153
|
-
onClick: () => J("/webhooks")
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}),
|
|
157
|
-
/* @__PURE__ */ T(i, {
|
|
158
|
-
title: L("devportal.usageOverview", "Usage Overview"),
|
|
159
|
-
"data-tour": "devportal-dashboard-usage-overview",
|
|
160
|
-
children: /* @__PURE__ */ E(o, {
|
|
161
|
-
columns: 4,
|
|
162
|
-
children: [
|
|
163
|
-
/* @__PURE__ */ T(a, {
|
|
164
|
-
title: L("devportal.apiCalls", "API Calls"),
|
|
165
|
-
value: Y ? /* @__PURE__ */ T(v, { className: "h-5 w-5 animate-spin" }) : q.totalApiCalls > 1e6 ? `${(q.totalApiCalls / 1e6).toFixed(1)}M` : q.totalApiCalls > 1e3 ? `${(q.totalApiCalls / 1e3).toFixed(1)}K` : q.totalApiCalls.toString(),
|
|
166
|
-
icon: /* @__PURE__ */ T(f, { size: 20 }),
|
|
167
|
-
trend: void 0
|
|
168
|
-
}),
|
|
169
|
-
/* @__PURE__ */ T(a, {
|
|
170
|
-
title: L("devportal.activeInstalls", "Active Installs"),
|
|
171
|
-
value: Y ? /* @__PURE__ */ T(v, { className: "h-5 w-5 animate-spin" }) : q.activeInstalls > 1e3 ? `${(q.activeInstalls / 1e3).toFixed(1)}K` : q.activeInstalls.toString(),
|
|
172
|
-
icon: /* @__PURE__ */ T(S, { size: 20 }),
|
|
173
|
-
trend: void 0
|
|
174
|
-
}),
|
|
175
|
-
/* @__PURE__ */ T(a, {
|
|
176
|
-
title: L("devportal.monthlyRevenue", "Monthly Revenue"),
|
|
177
|
-
value: Y ? /* @__PURE__ */ T(v, { className: "h-5 w-5 animate-spin" }) : `$${q.monthlyRevenue.toLocaleString()}`,
|
|
178
|
-
icon: /* @__PURE__ */ T(g, { size: 20 }),
|
|
179
|
-
trend: void 0
|
|
76
|
+
children: /* @__PURE__ */ v("div", {
|
|
77
|
+
className: "flex flex-col gap-8",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ _("div", {
|
|
80
|
+
className: "flex items-center gap-6 border-b border-border-seam pb-6",
|
|
81
|
+
children: z ? /* @__PURE__ */ _(m, { className: "h-4 w-4 animate-spin text-text-secondary" }) : /* @__PURE__ */ v(g, { children: [
|
|
82
|
+
/* @__PURE__ */ _(S, {
|
|
83
|
+
icon: /* @__PURE__ */ _(l, { size: 14 }),
|
|
84
|
+
value: I,
|
|
85
|
+
label: E("devportal.apps", "Apps")
|
|
180
86
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
87
|
+
/* @__PURE__ */ _("div", { className: "h-4 w-px bg-border-seam" }),
|
|
88
|
+
/* @__PURE__ */ _(S, {
|
|
89
|
+
icon: /* @__PURE__ */ _(d, { size: 14 }),
|
|
90
|
+
value: L,
|
|
91
|
+
label: E("devportal.organizations", "Organizations")
|
|
186
92
|
})
|
|
187
|
-
]
|
|
188
|
-
})
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
className: "
|
|
198
|
-
children:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
]
|
|
203
|
-
}),
|
|
204
|
-
children: Y ? /* @__PURE__ */ T("div", {
|
|
205
|
-
className: "flex items-center justify-center py-8",
|
|
206
|
-
children: /* @__PURE__ */ T(v, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
207
|
-
}) : K.length > 0 ? /* @__PURE__ */ T("div", {
|
|
208
|
-
className: "space-y-2",
|
|
209
|
-
children: K.slice(0, 3).map((e) => /* @__PURE__ */ T(s, {
|
|
93
|
+
] })
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ _(C, {
|
|
96
|
+
title: E("devportal.recentApplications", "Recent Applications"),
|
|
97
|
+
action: F.length > 0 ? /* @__PURE__ */ v("button", {
|
|
98
|
+
onClick: () => R("/apps"),
|
|
99
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
100
|
+
children: [E("devportal.viewAll", "View all"), /* @__PURE__ */ _(u, { size: 14 })]
|
|
101
|
+
}) : void 0,
|
|
102
|
+
children: z ? /* @__PURE__ */ _("div", {
|
|
103
|
+
className: "flex items-center justify-center py-12",
|
|
104
|
+
children: /* @__PURE__ */ _(m, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
105
|
+
}) : F.length > 0 ? /* @__PURE__ */ _("div", {
|
|
106
|
+
className: "grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
107
|
+
children: F.slice(0, 3).map((e) => /* @__PURE__ */ _(i, {
|
|
210
108
|
app: e,
|
|
211
|
-
onClick: () =>
|
|
109
|
+
onClick: () => R(`/apps/${e.id}`),
|
|
110
|
+
showActions: !1
|
|
212
111
|
}, e.id))
|
|
213
|
-
}) : /* @__PURE__ */
|
|
112
|
+
}) : /* @__PURE__ */ _(t, {
|
|
214
113
|
illustration: "empty-generic",
|
|
215
|
-
title:
|
|
216
|
-
description:
|
|
217
|
-
action:
|
|
218
|
-
onClick: () =>
|
|
114
|
+
title: E("devportal.noApplicationsYet", "No applications yet"),
|
|
115
|
+
description: B ? E("devportal.createFirstApplicationToGetStarted", "Create your first application to get started") : E("devportal.createOrgFirstToPublishApps", "Create an organization first to start publishing apps"),
|
|
116
|
+
action: B ? /* @__PURE__ */ v("button", {
|
|
117
|
+
onClick: () => R("/apps/new"),
|
|
219
118
|
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",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
-
}) : /* @__PURE__ */
|
|
222
|
-
onClick: () =>
|
|
119
|
+
children: [/* @__PURE__ */ _(h, { size: 16 }), E("devportal.createApp", "Create App")]
|
|
120
|
+
}) : /* @__PURE__ */ v("button", {
|
|
121
|
+
onClick: () => R("/organizations/new"),
|
|
223
122
|
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",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ _(h, { size: 16 }), E("devportal.createOrganization", "Create Organization")]
|
|
225
124
|
})
|
|
226
125
|
})
|
|
227
|
-
}), /* @__PURE__ */ T(i, {
|
|
228
|
-
title: L("devportal.quickActions", "Quick Actions"),
|
|
229
|
-
"data-tour": "devportal-dashboard-quick-actions",
|
|
230
|
-
children: /* @__PURE__ */ E("div", {
|
|
231
|
-
className: "grid gap-3",
|
|
232
|
-
children: [
|
|
233
|
-
X ? /* @__PURE__ */ T(j, {
|
|
234
|
-
title: L("devportal.createNewApp", "Create New App"),
|
|
235
|
-
description: L("devportal.startBuildingANewApplication", "Start building a new application"),
|
|
236
|
-
icon: /* @__PURE__ */ T(p, { size: 20 }),
|
|
237
|
-
onClick: () => J("/apps/new")
|
|
238
|
-
}) : /* @__PURE__ */ T(j, {
|
|
239
|
-
title: L("devportal.createOrganization", "Create Organization"),
|
|
240
|
-
description: L("devportal.setUpATeamToCollaborate", "Set up a team to collaborate"),
|
|
241
|
-
icon: /* @__PURE__ */ T(h, { size: 20 }),
|
|
242
|
-
onClick: () => J("/organizations/new"),
|
|
243
|
-
primary: !0
|
|
244
|
-
}),
|
|
245
|
-
X && /* @__PURE__ */ T(j, {
|
|
246
|
-
title: L("devportal.publisherProfile", "Publisher Profile"),
|
|
247
|
-
description: L("devportal.manageYourStorePresence", "Manage your store publisher presence"),
|
|
248
|
-
icon: /* @__PURE__ */ T(b, { size: 20 }),
|
|
249
|
-
onClick: () => J("/publisher/profile")
|
|
250
|
-
}),
|
|
251
|
-
/* @__PURE__ */ T(j, {
|
|
252
|
-
title: L("devportal.generateApiKey", "Generate API Key"),
|
|
253
|
-
description: L("devportal.createCredentialsForYourApps", "Create credentials for your apps"),
|
|
254
|
-
icon: /* @__PURE__ */ T(_, { size: 20 }),
|
|
255
|
-
onClick: () => J("/api-keys")
|
|
256
|
-
}),
|
|
257
|
-
/* @__PURE__ */ T(j, {
|
|
258
|
-
title: L("devportal.configureWebhooks", "Configure Webhooks"),
|
|
259
|
-
description: L("devportal.setUpEventNotifications", "Set up event notifications"),
|
|
260
|
-
icon: /* @__PURE__ */ T(C, { size: 20 }),
|
|
261
|
-
onClick: () => J("/webhooks")
|
|
262
|
-
})
|
|
263
|
-
]
|
|
264
|
-
})
|
|
265
|
-
})]
|
|
266
|
-
}),
|
|
267
|
-
Y ? /* @__PURE__ */ T(i, {
|
|
268
|
-
"data-tour": "devportal-dashboard-organizations",
|
|
269
|
-
title: L("devportal.yourOrganizations", "Your Organizations"),
|
|
270
|
-
children: /* @__PURE__ */ T("div", {
|
|
271
|
-
className: "flex items-center justify-center py-8",
|
|
272
|
-
children: /* @__PURE__ */ T(v, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
273
|
-
})
|
|
274
|
-
}) : B.length > 0 ? /* @__PURE__ */ T(i, {
|
|
275
|
-
title: L("devportal.yourOrganizations", "Your Organizations"),
|
|
276
|
-
actions: /* @__PURE__ */ E("button", {
|
|
277
|
-
onClick: () => J("/organizations"),
|
|
278
|
-
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
279
|
-
children: [
|
|
280
|
-
L("devportal.viewAll", "View all"),
|
|
281
|
-
" ",
|
|
282
|
-
/* @__PURE__ */ T(m, { size: 14 })
|
|
283
|
-
]
|
|
284
126
|
}),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
127
|
+
(z || k.length > 0) && /* @__PURE__ */ _(C, {
|
|
128
|
+
title: E("devportal.yourOrganizations", "Your Organizations"),
|
|
129
|
+
action: k.length > 0 ? /* @__PURE__ */ v("button", {
|
|
130
|
+
onClick: () => R("/organizations"),
|
|
131
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline",
|
|
132
|
+
children: [E("devportal.viewAll", "View all"), /* @__PURE__ */ _(u, { size: 14 })]
|
|
133
|
+
}) : void 0,
|
|
134
|
+
children: z ? /* @__PURE__ */ _("div", {
|
|
135
|
+
className: "flex items-center justify-center py-12",
|
|
136
|
+
children: /* @__PURE__ */ _(m, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
137
|
+
}) : /* @__PURE__ */ _("div", {
|
|
138
|
+
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
139
|
+
children: k.slice(0, 3).map((e) => /* @__PURE__ */ _(w, {
|
|
140
|
+
org: e,
|
|
141
|
+
onClick: () => R(`/organizations/${e.id}`)
|
|
142
|
+
}, e.id))
|
|
143
|
+
})
|
|
291
144
|
})
|
|
292
|
-
|
|
293
|
-
|
|
145
|
+
]
|
|
146
|
+
})
|
|
294
147
|
})
|
|
295
148
|
});
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
149
|
+
}, S = ({ icon: e, value: t, label: n }) => /* @__PURE__ */ v("div", {
|
|
150
|
+
className: "flex items-center gap-1.5",
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ _("span", {
|
|
153
|
+
className: "text-text-muted",
|
|
154
|
+
children: e
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ _("span", {
|
|
157
|
+
className: "text-sm font-semibold tabular-nums",
|
|
158
|
+
children: t
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ _("span", {
|
|
161
|
+
className: "text-sm text-text-secondary",
|
|
162
|
+
children: n
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
}), C = ({ title: e, action: t, children: n }) => /* @__PURE__ */ v("section", {
|
|
166
|
+
className: "flex flex-col gap-4",
|
|
167
|
+
children: [/* @__PURE__ */ v("div", {
|
|
168
|
+
className: "flex items-center justify-between",
|
|
169
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
170
|
+
className: "text-sm font-semibold uppercase tracking-wider text-text-secondary",
|
|
171
|
+
children: e
|
|
172
|
+
}), t]
|
|
173
|
+
}), n]
|
|
174
|
+
}), w = ({ org: e, onClick: t }) => {
|
|
175
|
+
let { t: n } = c(), r = (e, t) => {
|
|
311
176
|
let r = n(e);
|
|
312
177
|
return r === e ? t : r;
|
|
313
|
-
};
|
|
314
|
-
return /* @__PURE__ */
|
|
178
|
+
}, i = e.name.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase();
|
|
179
|
+
return /* @__PURE__ */ v(y, {
|
|
180
|
+
treatment: "insight",
|
|
181
|
+
role: "button",
|
|
182
|
+
tabIndex: 0,
|
|
183
|
+
className: "cursor-pointer p-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
315
184
|
onClick: t,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
e.
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
185
|
+
onKeyDown: (e) => {
|
|
186
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
187
|
+
},
|
|
188
|
+
children: [/* @__PURE__ */ v("div", {
|
|
189
|
+
className: "flex items-center gap-3 mb-4",
|
|
190
|
+
children: [
|
|
191
|
+
e.logoUrl ? /* @__PURE__ */ _("img", {
|
|
192
|
+
src: e.logoUrl,
|
|
193
|
+
alt: e.name,
|
|
194
|
+
className: "h-10 w-10 rounded-xl object-cover"
|
|
195
|
+
}) : /* @__PURE__ */ _("div", {
|
|
196
|
+
className: "flex h-10 w-10 items-center justify-center rounded-xl bg-action-primary-bg/15 text-primary text-sm font-bold",
|
|
197
|
+
children: i
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ v("div", {
|
|
200
|
+
className: "min-w-0 flex-1",
|
|
201
|
+
children: [/* @__PURE__ */ _("p", {
|
|
202
|
+
className: "font-semibold truncate text-text-primary",
|
|
203
|
+
children: e.name
|
|
204
|
+
}), /* @__PURE__ */ v("p", {
|
|
205
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
206
|
+
children: [
|
|
207
|
+
e.publishedApps ?? 0,
|
|
208
|
+
" ",
|
|
209
|
+
r("devportal.appsPublished", "apps published")
|
|
210
|
+
]
|
|
211
|
+
})]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ _(u, {
|
|
214
|
+
size: 15,
|
|
215
|
+
className: "text-text-muted shrink-0"
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
}), /* @__PURE__ */ v("div", {
|
|
219
|
+
className: "grid grid-cols-2 gap-3",
|
|
220
|
+
children: [/* @__PURE__ */ v("div", {
|
|
221
|
+
className: "flex items-center gap-2 rounded-lg bg-bg-muted px-3 py-2",
|
|
222
|
+
children: [/* @__PURE__ */ _(p, {
|
|
223
|
+
size: 12,
|
|
224
|
+
className: "text-text-muted shrink-0"
|
|
225
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
226
|
+
className: "text-[11px] text-text-secondary leading-none mb-0.5",
|
|
227
|
+
children: r("devportal.installs", "Installs")
|
|
228
|
+
}), /* @__PURE__ */ _("p", {
|
|
229
|
+
className: "text-sm font-semibold tabular-nums",
|
|
230
|
+
children: (e.totalInstalls || 0).toLocaleString()
|
|
231
|
+
})] })]
|
|
232
|
+
}), /* @__PURE__ */ v("div", {
|
|
233
|
+
className: "flex items-center gap-2 rounded-lg bg-bg-muted px-3 py-2",
|
|
234
|
+
children: [/* @__PURE__ */ _(f, {
|
|
235
|
+
size: 12,
|
|
236
|
+
className: "text-text-muted shrink-0"
|
|
237
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
238
|
+
className: "text-[11px] text-text-secondary leading-none mb-0.5",
|
|
239
|
+
children: r("devportal.revenue", "Revenue")
|
|
240
|
+
}), /* @__PURE__ */ v("p", {
|
|
241
|
+
className: "text-sm font-semibold tabular-nums",
|
|
242
|
+
children: ["$", (e.totalRevenue || 0).toLocaleString()]
|
|
243
|
+
})] })]
|
|
339
244
|
})]
|
|
340
|
-
}), /* @__PURE__ */ E("div", {
|
|
341
|
-
className: "mt-3 flex gap-4 text-sm text-text-secondary",
|
|
342
|
-
children: [/* @__PURE__ */ E("span", { children: [
|
|
343
|
-
(e.totalInstalls || 0).toLocaleString(),
|
|
344
|
-
" ",
|
|
345
|
-
r("devportal.installs", "installs")
|
|
346
|
-
] }), /* @__PURE__ */ E("span", { children: [
|
|
347
|
-
"$",
|
|
348
|
-
(e.totalRevenue || 0).toLocaleString(),
|
|
349
|
-
" ",
|
|
350
|
-
r("devportal.revenue", "revenue")
|
|
351
|
-
] })]
|
|
352
245
|
})]
|
|
353
246
|
});
|
|
354
247
|
};
|
|
355
248
|
//#endregion
|
|
356
|
-
export {
|
|
249
|
+
export { x as DashboardPage };
|
|
357
250
|
|
|
358
251
|
//# sourceMappingURL=DashboardPage.js.map
|