@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.
@@ -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, PageSection as i } from "../components/PageLayout.js";
5
- import { StatCard as a, StatCardGrid as o } from "../components/StatCard.js";
6
- import { AppListItem as s } from "../components/AppCard.js";
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 l } from "../constants/permissions.js";
8
+ import { DEVPORTAL_PERMISSIONS as o } from "../constants/permissions.js";
10
9
  import "../hooks/index.js";
11
- import { useEffect as u } from "react";
12
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
- import { Activity as f, AppWindow as p, ArrowRight as m, Building2 as h, DollarSign as g, Key as _, Loader2 as v, Plus as y, Store as b, TrendingUp as x, Users as S, Webhook as C } from "lucide-react";
14
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
15
- import { EmphasisPanel as D, GradientText as O, NextSteps as k } from "@burdenoff/fe-libs/ui";
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 A = () => {
18
- let { navigate: A, basePath: N, activeOrgId: P, setActiveOrgId: F } = e(), { t: I } = d(), L = (e, t) => {
19
- let n = I(e);
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: R, loading: z } = n({
20
+ }, { data: D, loading: O } = n({
22
21
  variables: {},
23
22
  fetchPolicy: "cache-and-network"
24
- }), B = R?.myDeveloperOrganizations ?? [], V = (() => {
25
- if (B.length) return P && B.some((e) => e.id === P) ? P : B[0]?.id;
23
+ }), k = D?.myDeveloperOrganizations ?? [], A = (() => {
24
+ if (k.length) return y && k.some((e) => e.id === y) ? y : k[0]?.id;
26
25
  })();
27
- u(() => {
28
- V && V !== P && F(V);
26
+ s(() => {
27
+ A && A !== y && x(A);
29
28
  }, [
30
- V,
31
- P,
32
- F
29
+ A,
30
+ y,
31
+ x
33
32
  ]);
34
- let { data: H, loading: U } = n({
35
- variables: { organizationId: V },
36
- skip: !V,
33
+ let { data: j, loading: M } = n({
34
+ variables: { organizationId: A },
35
+ skip: !A,
37
36
  fetchPolicy: "cache-and-network"
38
- }), W = z || U, G = H ?? R;
39
- u(() => {
40
- if (!(z || !R) && !(B.length > 0)) {
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
- A?.(`${N}/setup`);
45
+ f?.(`${p}/setup`);
47
46
  }
48
47
  }, [
49
- z,
50
- R,
51
- B.length,
52
- A,
53
- N
48
+ O,
49
+ D,
50
+ k.length,
51
+ f,
52
+ p
54
53
  ]);
55
- let K = H?.applications?.edges?.map((e) => e.node) ?? [], q = {
56
- totalApps: G?.applications?.totalCount ?? 0,
57
- totalOrgs: B.length,
58
- totalApiKeys: 0,
59
- totalWebhooks: 0,
60
- totalApiCalls: B.reduce((e, t) => e + parseInt(t.totalApiCalls || "0"), 0),
61
- activeInstalls: B.reduce((e, t) => e + (t.activeInstalls || 0), 0),
62
- monthlyRevenue: B.reduce((e, t) => e + (t.totalRevenue || 0), 0),
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__ */ T(O, { children: L("devportal.portal", "Portal") })
63
+ /* @__PURE__ */ _(b, { children: E("devportal.portal", "Portal") })
75
64
  ] }),
76
- description: L("devportal.buildManageMonitor", "Build, manage, and monitor your applications"),
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: () => J("/apps/new"),
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__ */ T(y, { size: 16 }), L("devportal.createApp", "Create App")]
83
- }) : Y ? null : /* @__PURE__ */ E("button", {
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: () => J("/organizations/new"),
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__ */ T(y, { size: 16 }), L("devportal.createOrganization", "Create Organization")]
74
+ children: [/* @__PURE__ */ _(h, { size: 16 }), E("devportal.createOrganization", "Create Organization")]
88
75
  }),
89
- children: [
90
- /* @__PURE__ */ T(D, {
91
- "data-tour": "devportal-dashboard-stats-overview",
92
- children: /* @__PURE__ */ E(o, {
93
- columns: 4,
94
- children: [
95
- /* @__PURE__ */ T(a, {
96
- featured: !0,
97
- title: L("devportal.totalApps", "Total Apps"),
98
- value: Y ? /* @__PURE__ */ T(v, { className: "h-5 w-5 animate-spin" }) : q.totalApps,
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__ */ T(a, {
182
- title: L("devportal.errorRate", "Error Rate"),
183
- value: `${q.errorRate}%`,
184
- icon: /* @__PURE__ */ T(x, { size: 20 }),
185
- trend: void 0
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
- /* @__PURE__ */ E("div", {
191
- className: "grid gap-6 lg:grid-cols-2",
192
- children: [/* @__PURE__ */ T(i, {
193
- "data-tour": "devportal-dashboard-recent-apps",
194
- title: L("devportal.recentApplications", "Recent Applications"),
195
- actions: /* @__PURE__ */ E("button", {
196
- onClick: () => J("/apps"),
197
- className: "text-sm text-primary hover:underline flex items-center gap-1",
198
- children: [
199
- L("devportal.viewAll", "View all"),
200
- " ",
201
- /* @__PURE__ */ T(m, { size: 14 })
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: () => J(`/apps/${e.id}`)
109
+ onClick: () => R(`/apps/${e.id}`),
110
+ showActions: !1
212
111
  }, e.id))
213
- }) : /* @__PURE__ */ T(t, {
112
+ }) : /* @__PURE__ */ _(t, {
214
113
  illustration: "empty-generic",
215
- title: L("devportal.noApplicationsYet", "No applications yet"),
216
- description: X ? L("devportal.createFirstApplicationToGetStarted", "Create your first application to get started") : L("devportal.createOrgFirstToPublishApps", "Create an organization first to start publishing apps"),
217
- action: X ? /* @__PURE__ */ E("button", {
218
- onClick: () => J("/apps/new"),
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__ */ T(y, { size: 16 }), L("devportal.createApp", "Create App")]
221
- }) : /* @__PURE__ */ E("button", {
222
- onClick: () => J("/organizations/new"),
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__ */ T(y, { size: 16 }), L("devportal.createOrganization", "Create Organization")]
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
- children: /* @__PURE__ */ T("div", {
286
- className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
287
- children: B.slice(0, 3).map((e) => /* @__PURE__ */ T(M, {
288
- org: e,
289
- onClick: () => J(`/organizations/${e.id}`)
290
- }, e.id))
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
- }) : null
293
- ]
145
+ ]
146
+ })
294
147
  })
295
148
  });
296
- }, j = ({ title: e, description: t, icon: n, onClick: r, primary: i }) => /* @__PURE__ */ E("button", {
297
- onClick: r,
298
- className: ["flex w-full items-center gap-4 rounded-card border p-4 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", i ? "border-primary bg-action-primary-bg/5 hover:bg-action-primary-bg/10" : "border-border-seam bg-bg-surface shadow-[var(--shadow-pop)] hover:bg-accent"].join(" "),
299
- children: [/* @__PURE__ */ T("div", {
300
- className: ["rounded-lg p-2", i ? "bg-action-primary-bg/20 text-primary" : "bg-action-primary-bg/10 text-primary"].join(" "),
301
- children: n
302
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
303
- className: "font-medium",
304
- children: e
305
- }), /* @__PURE__ */ T("p", {
306
- className: "text-sm text-text-secondary",
307
- children: t
308
- })] })]
309
- }), M = ({ org: e, onClick: t }) => {
310
- let { t: n } = d(), r = (e, t) => {
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__ */ E("button", {
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
- className: "w-full rounded-card border border-border-seam bg-bg-surface p-4 text-left shadow-[var(--shadow-pop)] transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
317
- children: [/* @__PURE__ */ E("div", {
318
- className: "flex items-center gap-3",
319
- children: [e.logoUrl ? /* @__PURE__ */ T("img", {
320
- src: e.logoUrl,
321
- alt: e.name,
322
- className: "h-10 w-10 rounded-lg object-cover"
323
- }) : /* @__PURE__ */ T("div", {
324
- className: "flex h-10 w-10 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
325
- children: /* @__PURE__ */ T(h, { size: 20 })
326
- }), /* @__PURE__ */ E("div", {
327
- className: "flex-1 min-w-0",
328
- children: [/* @__PURE__ */ T("p", {
329
- className: "font-medium truncate",
330
- children: e.name
331
- }), /* @__PURE__ */ E("p", {
332
- className: "text-sm text-text-secondary",
333
- children: [
334
- e.publishedApps,
335
- " ",
336
- r("devportal.appsPublished", "apps published")
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 { A as DashboardPage };
249
+ export { x as DashboardPage };
357
250
 
358
251
  //# sourceMappingURL=DashboardPage.js.map