@burdenoff/microfe-devportal 2026.611.1 → 2026.611.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,66 +1,87 @@
1
1
  import { EmptyState as e } from "../components/EmptyState.js";
2
2
  import { PageLayout as t, PageSection as n } from "../components/PageLayout.js";
3
- import { StatCard as r, StatCardGrid as i } from "../components/StatCard.js";
4
- import { StatusBadge as a } from "../components/StatusBadge.js";
5
- import { DataTable as o } from "../components/DataTable.js";
6
- import { useGetMyOrganizationsQuery as s, useGetRevenueDashboardDataQuery as c } from "../../generated/global-operations.js";
7
- import { getErrorMessage as l } from "../hooks/useGraphQL.js";
3
+ import { StatCard as r, StatCardGrid as ee } from "../components/StatCard.js";
4
+ import { StatusBadge as i } from "../components/StatusBadge.js";
5
+ import { DataTable as a } from "../components/DataTable.js";
6
+ import { useCreateBillingAccountMutation as te, useGetMyOrganizationsQuery as ne, useGetRevenueDashboardDataQuery as o, useLinkDevOrgBillingAccountMutation as s } from "../../generated/global-operations.js";
7
+ import { getErrorMessage as c } from "../hooks/useGraphQL.js";
8
8
  import "../hooks/index.js";
9
- import { Tooltip as u } from "../../node_modules/recharts/es6/component/Tooltip.js";
10
- import { ResponsiveContainer as d } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
11
- import { Bar as f } from "../../node_modules/recharts/es6/cartesian/Bar.js";
12
- import { CartesianGrid as p } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
13
- import { Line as m } from "../../node_modules/recharts/es6/cartesian/Line.js";
14
- import { XAxis as h } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
15
- import { YAxis as g } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
16
- import { LineChart as _ } from "../../node_modules/recharts/es6/chart/LineChart.js";
17
- import { BarChart as v } from "../../node_modules/recharts/es6/chart/BarChart.js";
18
- import { useTr as y } from "../utils/i18n.js";
19
- import { useEffect as b, useMemo as x, useState as S } from "react";
20
- import { AlertCircle as C, ArrowDownToLine as w, Building2 as T, CreditCard as E, DollarSign as D, Loader2 as O, Wallet as ee } from "lucide-react";
21
- import { useSearchParams as k } from "react-router-dom";
22
- import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
9
+ import { Tooltip as l } from "../../node_modules/recharts/es6/component/Tooltip.js";
10
+ import { ResponsiveContainer as u } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
11
+ import { Bar as d } from "../../node_modules/recharts/es6/cartesian/Bar.js";
12
+ import { CartesianGrid as f } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
13
+ import { Line as p } from "../../node_modules/recharts/es6/cartesian/Line.js";
14
+ import { XAxis as m } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
15
+ import { YAxis as h } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
16
+ import { LineChart as g } from "../../node_modules/recharts/es6/chart/LineChart.js";
17
+ import { BarChart as re } from "../../node_modules/recharts/es6/chart/BarChart.js";
18
+ import { useTr as ie } from "../utils/i18n.js";
19
+ import { useEffect as _, useMemo as v, useState as y } from "react";
20
+ import { AlertCircle as b, ArrowDownToLine as ae, Building2 as x, CreditCard as oe, DollarSign as S, Link2 as C, Loader2 as w, Wallet as T } from "lucide-react";
21
+ import { useSearchParams as E } from "react-router-dom";
22
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
23
23
  //#region src/devportal/pages/RevenueDashboardPage.tsx
24
- var N = {
24
+ var A = {
25
25
  primary: "var(--color-chart-1)",
26
26
  secondary: "var(--color-chart-2)",
27
27
  tertiary: "var(--color-chart-4)"
28
- }, P = {
28
+ }, se = {
29
29
  "30d": 30,
30
30
  "90d": 90,
31
31
  "12m": 365
32
- }, F = () => {
33
- let F = y(), [I, L] = S("90d"), [R, z] = S(""), [B] = k(), V = x(() => /* @__PURE__ */ new Date(), []), H = B.get("org"), U = x(() => {
34
- let e = new Date(V);
35
- return e.setDate(e.getDate() - P[I]), e.toISOString();
36
- }, [V, I]), { data: W, loading: G, error: K } = s({ fetchPolicy: "cache-and-network" }), { data: q, loading: J, error: Y } = c({
32
+ }, j = () => {
33
+ let j = ie(), [M, ce] = y("90d"), [N, P] = y(""), [F, I] = y(!1), [L, R] = y(null), [z] = te(), [B] = s(), [V] = E(), H = v(() => /* @__PURE__ */ new Date(), []), U = V.get("org"), W = v(() => {
34
+ let e = new Date(H);
35
+ return e.setDate(e.getDate() - se[M]), e.toISOString();
36
+ }, [H, M]), { data: G, loading: le, error: K } = ne({ fetchPolicy: "cache-and-network" }), { data: q, loading: J, error: Y } = o({
37
37
  variables: {
38
- organizationId: R,
38
+ organizationId: N,
39
39
  period: "monthly",
40
- startDate: U,
41
- endDate: V.toISOString(),
40
+ startDate: W,
41
+ endDate: H.toISOString(),
42
42
  salesLimit: 10,
43
43
  salesOffset: 0,
44
44
  payoutsLimit: 10,
45
45
  payoutsOffset: 0
46
46
  },
47
- skip: !R,
47
+ skip: !N,
48
48
  fetchPolicy: "cache-and-network"
49
- }), X = x(() => W?.myDeveloperOrganizations?.map((e) => e) ?? [], [W?.myDeveloperOrganizations]);
50
- b(() => {
51
- if (!R) {
52
- if (H && X.some((e) => e.id === H)) {
53
- z(H);
49
+ }), X = v(() => G?.myDeveloperOrganizations?.map((e) => e) ?? [], [G?.myDeveloperOrganizations]);
50
+ _(() => {
51
+ if (!N) {
52
+ if (U && X.some((e) => e.id === U)) {
53
+ P(U);
54
54
  return;
55
55
  }
56
- X.length === 1 && z(X[0]?.id ?? "");
56
+ X.length === 1 && P(X[0]?.id ?? "");
57
57
  }
58
58
  }, [
59
59
  X,
60
- H,
61
- R
60
+ U,
61
+ N
62
62
  ]);
63
- let Z = X.find((e) => e.id === R), Q = q?.developerOrgRevenueSummary, te = [...q?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), ne = q?.developerOrgSales?.edges?.map((e) => e.node) ?? [], re = q?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = te.map((e) => ({
63
+ let Z = X.find((e) => e.id === N), ue = async () => {
64
+ if (N) {
65
+ I(!0), R(null);
66
+ try {
67
+ let e = (await z({ variables: { input: {
68
+ name: Z?.name ?? N,
69
+ email: ""
70
+ } } })).data?.createBillingAccount?.id;
71
+ e && await B({
72
+ variables: {
73
+ organizationId: N,
74
+ billingAccountId: e
75
+ },
76
+ refetchQueries: ["GetMyOrganizations"]
77
+ });
78
+ } catch (e) {
79
+ R(e instanceof Error ? e.message : "Failed to link billing account");
80
+ } finally {
81
+ I(!1);
82
+ }
83
+ }
84
+ }, Q = q?.developerOrgRevenueSummary, de = [...q?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), fe = q?.developerOrgSales?.edges?.map((e) => e.node) ?? [], pe = q?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = de.map((e) => ({
64
85
  date: new Date(e.date).toLocaleDateString(void 0, {
65
86
  month: "short",
66
87
  day: "numeric"
@@ -71,142 +92,177 @@ var N = {
71
92
  refunds: e.refunds,
72
93
  salesCount: e.salesCount
73
94
  }));
74
- return G && !W ? /* @__PURE__ */ j(t, {
75
- title: F("devportal.revenue.title", "Revenue"),
76
- description: F("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
77
- children: /* @__PURE__ */ j("div", {
95
+ return le && !G ? /* @__PURE__ */ O(t, {
96
+ title: j("devportal.revenue.title", "Revenue"),
97
+ description: j("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
98
+ children: /* @__PURE__ */ O("div", {
78
99
  className: "flex items-center justify-center py-16 text-muted-foreground",
79
- children: /* @__PURE__ */ j(O, { className: "h-8 w-8 animate-spin" })
100
+ children: /* @__PURE__ */ O(w, { className: "h-8 w-8 animate-spin" })
80
101
  })
81
- }) : K ? /* @__PURE__ */ j(t, {
82
- title: F("devportal.revenue.title", "Revenue"),
83
- description: F("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
84
- children: /* @__PURE__ */ j(e, {
85
- icon: /* @__PURE__ */ j(C, {
102
+ }) : K ? /* @__PURE__ */ O(t, {
103
+ title: j("devportal.revenue.title", "Revenue"),
104
+ description: j("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
105
+ children: /* @__PURE__ */ O(e, {
106
+ icon: /* @__PURE__ */ O(b, {
86
107
  size: 32,
87
108
  className: "text-status-error-text"
88
109
  }),
89
- title: F("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
90
- description: l(K)
110
+ title: j("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
111
+ description: c(K)
91
112
  })
92
- }) : R ? Y ? /* @__PURE__ */ j(t, {
93
- title: F("devportal.revenue.title", "Revenue"),
94
- description: F("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
95
- children: /* @__PURE__ */ j(e, {
96
- icon: /* @__PURE__ */ j(C, {
113
+ }) : N ? Y ? /* @__PURE__ */ O(t, {
114
+ title: j("devportal.revenue.title", "Revenue"),
115
+ description: j("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
116
+ children: /* @__PURE__ */ O(e, {
117
+ icon: /* @__PURE__ */ O(b, {
97
118
  size: 32,
98
119
  className: "text-status-error-text"
99
120
  }),
100
- title: F("devportal.revenue.errorLoadData", "Unable to load revenue data"),
101
- description: l(Y)
121
+ title: j("devportal.revenue.errorLoadData", "Unable to load revenue data"),
122
+ description: c(Y)
102
123
  })
103
- }) : /* @__PURE__ */ j(t, {
104
- title: F("devportal.revenue.title", "Revenue"),
105
- description: Z ? `${F("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${Z.name}` : F("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
106
- actions: /* @__PURE__ */ M("div", {
124
+ }) : /* @__PURE__ */ k(t, {
125
+ title: j("devportal.revenue.title", "Revenue"),
126
+ description: Z ? `${j("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${Z.name}` : j("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
127
+ actions: /* @__PURE__ */ k("div", {
107
128
  className: "flex flex-wrap gap-2",
108
- children: [/* @__PURE__ */ j("select", {
109
- value: R,
110
- onChange: (e) => z(e.target.value),
111
- "aria-label": F("devportal.revenue.selectOrgAria", "Select organization"),
129
+ children: [/* @__PURE__ */ O("select", {
130
+ value: N,
131
+ onChange: (e) => P(e.target.value),
132
+ "aria-label": j("devportal.revenue.selectOrgAria", "Select organization"),
112
133
  className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
113
- children: X.map((e) => /* @__PURE__ */ j("option", {
134
+ children: X.map((e) => /* @__PURE__ */ O("option", {
114
135
  value: e.id,
115
136
  children: e.name
116
137
  }, e.id))
117
- }), /* @__PURE__ */ M("select", {
118
- value: I,
119
- onChange: (e) => L(e.target.value),
120
- "aria-label": F("devportal.revenue.selectRangeAria", "Select time range"),
138
+ }), /* @__PURE__ */ k("select", {
139
+ value: M,
140
+ onChange: (e) => ce(e.target.value),
141
+ "aria-label": j("devportal.revenue.selectRangeAria", "Select time range"),
121
142
  className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
122
143
  children: [
123
- /* @__PURE__ */ j("option", {
144
+ /* @__PURE__ */ O("option", {
124
145
  value: "30d",
125
- children: F("devportal.revenue.range.30d", "Last 30 days")
146
+ children: j("devportal.revenue.range.30d", "Last 30 days")
126
147
  }),
127
- /* @__PURE__ */ j("option", {
148
+ /* @__PURE__ */ O("option", {
128
149
  value: "90d",
129
- children: F("devportal.revenue.range.90d", "Last 90 days")
150
+ children: j("devportal.revenue.range.90d", "Last 90 days")
130
151
  }),
131
- /* @__PURE__ */ j("option", {
152
+ /* @__PURE__ */ O("option", {
132
153
  value: "12m",
133
- children: F("devportal.revenue.range.12m", "Last 12 months")
154
+ children: j("devportal.revenue.range.12m", "Last 12 months")
134
155
  })
135
156
  ]
136
157
  })]
137
158
  }),
138
- children: J && !Q ? /* @__PURE__ */ j("div", {
159
+ children: [Z && !Z.billingAccountId && /* @__PURE__ */ k("div", {
160
+ className: "mb-6 rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 flex items-start gap-3",
161
+ children: [
162
+ /* @__PURE__ */ O(C, {
163
+ size: 20,
164
+ className: "text-accent-blue flex-shrink-0 mt-0.5"
165
+ }),
166
+ /* @__PURE__ */ k("div", {
167
+ className: "flex-1 min-w-0",
168
+ children: [
169
+ /* @__PURE__ */ O("p", {
170
+ className: "text-sm font-medium text-status-info-text",
171
+ children: j("devportal.revenue.billingNotLinkedTitle", "Link a billing account to receive store revenue")
172
+ }),
173
+ /* @__PURE__ */ O("p", {
174
+ className: "mt-1 text-sm text-status-info-text",
175
+ children: j("devportal.revenue.billingNotLinkedDesc", "Once linked, net earnings from app sales will appear in your billing credits — you can spend them on platform services or withdraw to your bank.")
176
+ }),
177
+ L && /* @__PURE__ */ O("p", {
178
+ className: "mt-2 text-sm text-status-error-text",
179
+ children: L
180
+ })
181
+ ]
182
+ }),
183
+ /* @__PURE__ */ k("button", {
184
+ type: "button",
185
+ onClick: ue,
186
+ disabled: F,
187
+ className: "inline-flex items-center gap-2 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50 flex-shrink-0",
188
+ children: [F ? /* @__PURE__ */ O(w, {
189
+ size: 14,
190
+ className: "animate-spin"
191
+ }) : /* @__PURE__ */ O(C, { size: 14 }), F ? j("devportal.revenue.linking", "Linking...") : j("devportal.revenue.linkBillingAccount", "Link Billing Account")]
192
+ })
193
+ ]
194
+ }), J && !Q ? /* @__PURE__ */ O("div", {
139
195
  className: "flex items-center justify-center py-16 text-muted-foreground",
140
- children: /* @__PURE__ */ j(O, { className: "h-8 w-8 animate-spin" })
141
- }) : Q ? /* @__PURE__ */ M(A, { children: [
142
- /* @__PURE__ */ M(i, {
196
+ children: /* @__PURE__ */ O(w, { className: "h-8 w-8 animate-spin" })
197
+ }) : Q ? /* @__PURE__ */ k(D, { children: [
198
+ /* @__PURE__ */ k(ee, {
143
199
  columns: 4,
144
200
  children: [
145
- /* @__PURE__ */ j(r, {
146
- title: F("devportal.revenue.grossRevenue", "Gross Revenue"),
201
+ /* @__PURE__ */ O(r, {
202
+ title: j("devportal.revenue.grossRevenue", "Gross Revenue"),
147
203
  value: `$${Q.totalGrossRevenue.toLocaleString()}`,
148
- icon: /* @__PURE__ */ j(D, { size: 20 })
204
+ icon: /* @__PURE__ */ O(S, { size: 20 })
149
205
  }),
150
- /* @__PURE__ */ j(r, {
151
- title: F("devportal.revenue.netRevenue", "Net Revenue"),
206
+ /* @__PURE__ */ O(r, {
207
+ title: j("devportal.revenue.netRevenue", "Net Revenue"),
152
208
  value: `$${Q.totalNetRevenue.toLocaleString()}`,
153
- icon: /* @__PURE__ */ j(ee, { size: 20 })
209
+ icon: /* @__PURE__ */ O(T, { size: 20 })
154
210
  }),
155
- /* @__PURE__ */ j(r, {
156
- title: F("devportal.revenue.pendingBalance", "Pending Balance"),
211
+ /* @__PURE__ */ O(r, {
212
+ title: j("devportal.revenue.pendingBalance", "Pending Balance"),
157
213
  value: `$${Q.pendingBalance.toLocaleString()}`,
158
- icon: /* @__PURE__ */ j(E, { size: 20 }),
159
- description: Q.nextPayoutDate ? `${F("devportal.revenue.nextPayout", "Next payout")} ${new Date(Q.nextPayoutDate).toLocaleDateString()}` : F("devportal.revenue.noPayoutScheduled", "No payout scheduled")
214
+ icon: /* @__PURE__ */ O(oe, { size: 20 }),
215
+ description: Q.nextPayoutDate ? `${j("devportal.revenue.nextPayout", "Next payout")} ${new Date(Q.nextPayoutDate).toLocaleDateString()}` : j("devportal.revenue.noPayoutScheduled", "No payout scheduled")
160
216
  }),
161
- /* @__PURE__ */ j(r, {
162
- title: F("devportal.revenue.platformFees", "Platform Fees"),
217
+ /* @__PURE__ */ O(r, {
218
+ title: j("devportal.revenue.platformFees", "Platform Fees"),
163
219
  value: `$${Q.totalPlatformFees.toLocaleString()}`,
164
- icon: /* @__PURE__ */ j(w, { size: 20 }),
165
- description: `${Q.totalRefundsCount} ${F("devportal.revenue.refunds", "refunds")}`
220
+ icon: /* @__PURE__ */ O(ae, { size: 20 }),
221
+ description: `${Q.totalRefundsCount} ${j("devportal.revenue.refunds", "refunds")}`
166
222
  })
167
223
  ]
168
224
  }),
169
- /* @__PURE__ */ M("div", {
225
+ /* @__PURE__ */ k("div", {
170
226
  className: "grid gap-6 xl:grid-cols-2",
171
- children: [/* @__PURE__ */ j(n, {
172
- title: F("devportal.revenue.revenueTrend", "Revenue trend"),
173
- children: /* @__PURE__ */ j("div", {
227
+ children: [/* @__PURE__ */ O(n, {
228
+ title: j("devportal.revenue.revenueTrend", "Revenue trend"),
229
+ children: /* @__PURE__ */ O("div", {
174
230
  className: "rounded-lg border bg-card p-4",
175
- children: /* @__PURE__ */ j(d, {
231
+ children: /* @__PURE__ */ O(u, {
176
232
  width: "100%",
177
233
  height: 300,
178
- children: /* @__PURE__ */ M(_, {
234
+ children: /* @__PURE__ */ k(g, {
179
235
  data: $,
180
236
  children: [
181
- /* @__PURE__ */ j(p, {
237
+ /* @__PURE__ */ O(f, {
182
238
  strokeDasharray: "3 3",
183
239
  stroke: "var(--color-chart-grid)"
184
240
  }),
185
- /* @__PURE__ */ j(h, {
241
+ /* @__PURE__ */ O(m, {
186
242
  dataKey: "date",
187
243
  stroke: "var(--color-chart-axis)",
188
244
  fontSize: 12
189
245
  }),
190
- /* @__PURE__ */ j(g, {
246
+ /* @__PURE__ */ O(h, {
191
247
  stroke: "var(--color-chart-axis)",
192
248
  fontSize: 12
193
249
  }),
194
- /* @__PURE__ */ j(u, { contentStyle: {
250
+ /* @__PURE__ */ O(l, { contentStyle: {
195
251
  backgroundColor: "var(--color-card)",
196
252
  border: "1px solid var(--color-border-default)",
197
253
  borderRadius: 12
198
254
  } }),
199
- /* @__PURE__ */ j(m, {
255
+ /* @__PURE__ */ O(p, {
200
256
  type: "monotone",
201
257
  dataKey: "grossRevenue",
202
- stroke: N.primary,
258
+ stroke: A.primary,
203
259
  strokeWidth: 2,
204
260
  dot: !1
205
261
  }),
206
- /* @__PURE__ */ j(m, {
262
+ /* @__PURE__ */ O(p, {
207
263
  type: "monotone",
208
264
  dataKey: "netRevenue",
209
- stroke: N.secondary,
265
+ stroke: A.secondary,
210
266
  strokeWidth: 2,
211
267
  dot: !1
212
268
  })
@@ -214,33 +270,33 @@ var N = {
214
270
  })
215
271
  })
216
272
  })
217
- }), /* @__PURE__ */ j(n, {
218
- title: F("devportal.revenue.topApps", "Top applications by revenue"),
219
- children: Q.topApps.length > 0 ? /* @__PURE__ */ j("div", {
273
+ }), /* @__PURE__ */ O(n, {
274
+ title: j("devportal.revenue.topApps", "Top applications by revenue"),
275
+ children: Q.topApps.length > 0 ? /* @__PURE__ */ O("div", {
220
276
  className: "space-y-2",
221
- children: Q.topApps.map((e) => /* @__PURE__ */ j("div", {
277
+ children: Q.topApps.map((e) => /* @__PURE__ */ O("div", {
222
278
  className: "rounded-lg border bg-card p-4",
223
- children: /* @__PURE__ */ M("div", {
279
+ children: /* @__PURE__ */ k("div", {
224
280
  className: "flex items-start justify-between gap-3",
225
- children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("p", {
281
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
226
282
  className: "font-medium",
227
283
  children: e.applicationName
228
- }), /* @__PURE__ */ M("p", {
284
+ }), /* @__PURE__ */ k("p", {
229
285
  className: "text-sm text-muted-foreground",
230
286
  children: [
231
287
  e.salesCount,
232
288
  " ",
233
- F("devportal.revenue.sales", "sales")
289
+ j("devportal.revenue.sales", "sales")
234
290
  ]
235
- })] }), /* @__PURE__ */ M("div", {
291
+ })] }), /* @__PURE__ */ k("div", {
236
292
  className: "text-right",
237
- children: [/* @__PURE__ */ M("p", {
293
+ children: [/* @__PURE__ */ k("p", {
238
294
  className: "font-semibold",
239
295
  children: ["$", e.grossRevenue.toLocaleString()]
240
- }), /* @__PURE__ */ M("p", {
296
+ }), /* @__PURE__ */ k("p", {
241
297
  className: "text-sm text-muted-foreground",
242
298
  children: [
243
- F("devportal.revenue.net", "Net"),
299
+ j("devportal.revenue.net", "Net"),
244
300
  " $",
245
301
  e.netRevenue.toLocaleString()
246
302
  ]
@@ -248,44 +304,44 @@ var N = {
248
304
  })]
249
305
  })
250
306
  }, e.applicationId))
251
- }) : /* @__PURE__ */ j(e, {
252
- icon: /* @__PURE__ */ j(T, { size: 24 }),
253
- title: F("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
254
- description: F("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
307
+ }) : /* @__PURE__ */ O(e, {
308
+ icon: /* @__PURE__ */ O(x, { size: 24 }),
309
+ title: j("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
310
+ description: j("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
255
311
  })
256
312
  })]
257
313
  }),
258
- /* @__PURE__ */ j(n, {
259
- title: F("devportal.revenue.salesVolume", "Sales volume"),
260
- children: /* @__PURE__ */ j("div", {
314
+ /* @__PURE__ */ O(n, {
315
+ title: j("devportal.revenue.salesVolume", "Sales volume"),
316
+ children: /* @__PURE__ */ O("div", {
261
317
  className: "rounded-lg border bg-card p-4",
262
- children: /* @__PURE__ */ j(d, {
318
+ children: /* @__PURE__ */ O(u, {
263
319
  width: "100%",
264
320
  height: 280,
265
- children: /* @__PURE__ */ M(v, {
321
+ children: /* @__PURE__ */ k(re, {
266
322
  data: $,
267
323
  children: [
268
- /* @__PURE__ */ j(p, {
324
+ /* @__PURE__ */ O(f, {
269
325
  strokeDasharray: "3 3",
270
326
  stroke: "var(--color-chart-grid)"
271
327
  }),
272
- /* @__PURE__ */ j(h, {
328
+ /* @__PURE__ */ O(m, {
273
329
  dataKey: "date",
274
330
  stroke: "var(--color-chart-axis)",
275
331
  fontSize: 12
276
332
  }),
277
- /* @__PURE__ */ j(g, {
333
+ /* @__PURE__ */ O(h, {
278
334
  stroke: "var(--color-chart-axis)",
279
335
  fontSize: 12
280
336
  }),
281
- /* @__PURE__ */ j(u, { contentStyle: {
337
+ /* @__PURE__ */ O(l, { contentStyle: {
282
338
  backgroundColor: "var(--color-card)",
283
339
  border: "1px solid var(--color-border-default)",
284
340
  borderRadius: 12
285
341
  } }),
286
- /* @__PURE__ */ j(f, {
342
+ /* @__PURE__ */ O(d, {
287
343
  dataKey: "salesCount",
288
- fill: N.tertiary,
344
+ fill: A.tertiary,
289
345
  radius: [
290
346
  6,
291
347
  6,
@@ -298,59 +354,59 @@ var N = {
298
354
  })
299
355
  })
300
356
  }),
301
- /* @__PURE__ */ M("div", {
357
+ /* @__PURE__ */ k("div", {
302
358
  className: "grid gap-6 xl:grid-cols-2",
303
- children: [/* @__PURE__ */ j(n, {
304
- title: F("devportal.revenue.recentSales", "Recent sales"),
305
- children: /* @__PURE__ */ j(o, {
306
- data: ne,
359
+ children: [/* @__PURE__ */ O(n, {
360
+ title: j("devportal.revenue.recentSales", "Recent sales"),
361
+ children: /* @__PURE__ */ O(a, {
362
+ data: fe,
307
363
  keyField: "id",
308
364
  columns: [
309
365
  {
310
366
  key: "application",
311
- header: F("devportal.revenue.application", "Application"),
312
- render: (e) => e.application?.name || e.planName || F("devportal.common.unknown", "Unknown")
367
+ header: j("devportal.revenue.application", "Application"),
368
+ render: (e) => e.application?.name || e.planName || j("devportal.common.unknown", "Unknown")
313
369
  },
314
370
  {
315
371
  key: "grossAmount",
316
- header: F("devportal.revenue.gross", "Gross"),
372
+ header: j("devportal.revenue.gross", "Gross"),
317
373
  render: (e) => `$${e.grossAmount.toLocaleString()}`
318
374
  },
319
375
  {
320
376
  key: "netAmount",
321
- header: F("devportal.revenue.net", "Net"),
377
+ header: j("devportal.revenue.net", "Net"),
322
378
  render: (e) => `$${e.netAmount.toLocaleString()}`
323
379
  },
324
380
  {
325
381
  key: "status",
326
- header: F("devportal.revenue.status", "Status"),
327
- render: (e) => /* @__PURE__ */ j(a, {
382
+ header: j("devportal.revenue.status", "Status"),
383
+ render: (e) => /* @__PURE__ */ O(i, {
328
384
  status: e.status,
329
385
  type: "app"
330
386
  })
331
387
  }
332
388
  ]
333
389
  })
334
- }), /* @__PURE__ */ j(n, {
335
- title: F("devportal.revenue.payoutHistory", "Payout history"),
336
- children: /* @__PURE__ */ j(o, {
337
- data: re,
390
+ }), /* @__PURE__ */ O(n, {
391
+ title: j("devportal.revenue.payoutHistory", "Payout history"),
392
+ children: /* @__PURE__ */ O(a, {
393
+ data: pe,
338
394
  keyField: "id",
339
395
  columns: [
340
396
  {
341
397
  key: "periodLabel",
342
- header: F("devportal.revenue.period", "Period"),
398
+ header: j("devportal.revenue.period", "Period"),
343
399
  render: (e) => e.periodLabel
344
400
  },
345
401
  {
346
402
  key: "netAmount",
347
- header: F("devportal.revenue.netPayout", "Net payout"),
403
+ header: j("devportal.revenue.netPayout", "Net payout"),
348
404
  render: (e) => `$${e.netAmount.toLocaleString()}`
349
405
  },
350
406
  {
351
407
  key: "status",
352
- header: F("devportal.revenue.status", "Status"),
353
- render: (e) => /* @__PURE__ */ j(a, {
408
+ header: j("devportal.revenue.status", "Status"),
409
+ render: (e) => /* @__PURE__ */ O(i, {
354
410
  status: e.status,
355
411
  type: "app"
356
412
  })
@@ -359,47 +415,47 @@ var N = {
359
415
  })
360
416
  })]
361
417
  })
362
- ] }) : /* @__PURE__ */ j(e, {
363
- icon: /* @__PURE__ */ j(D, { size: 32 }),
364
- title: F("devportal.revenue.noDataTitle", "No revenue data yet"),
365
- description: F("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
366
- })
367
- }) : /* @__PURE__ */ j(t, {
368
- title: F("devportal.revenue.title", "Revenue"),
369
- description: F("devportal.revenue.selectOrgDescription", "Select an organization to review real sales and payout data through the public gateway"),
370
- children: X.length > 0 ? /* @__PURE__ */ j("div", {
418
+ ] }) : /* @__PURE__ */ O(e, {
419
+ icon: /* @__PURE__ */ O(S, { size: 32 }),
420
+ title: j("devportal.revenue.noDataTitle", "No revenue data yet"),
421
+ description: j("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
422
+ })]
423
+ }) : /* @__PURE__ */ O(t, {
424
+ title: j("devportal.revenue.title", "Revenue"),
425
+ description: j("devportal.revenue.selectOrgDescription", "Select an organization to review real sales and payout data through the public gateway"),
426
+ children: X.length > 0 ? /* @__PURE__ */ O("div", {
371
427
  className: "space-y-2",
372
- children: X.map((e) => /* @__PURE__ */ j("button", {
428
+ children: X.map((e) => /* @__PURE__ */ O("button", {
373
429
  type: "button",
374
- onClick: () => z(e.id),
430
+ onClick: () => P(e.id),
375
431
  className: "flex w-full items-start justify-between rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent",
376
- children: /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("div", {
432
+ children: /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
377
433
  className: "flex items-center gap-2",
378
- children: [/* @__PURE__ */ j(T, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ j("span", {
434
+ children: [/* @__PURE__ */ O(x, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ O("span", {
379
435
  className: "font-medium",
380
436
  children: e.name
381
437
  })]
382
- }), /* @__PURE__ */ M("p", {
438
+ }), /* @__PURE__ */ k("p", {
383
439
  className: "mt-1 text-sm text-muted-foreground",
384
440
  children: [
385
441
  e.totalApps ?? 0,
386
442
  " ",
387
- F("devportal.revenue.apps", "apps"),
443
+ j("devportal.revenue.apps", "apps"),
388
444
  " · $",
389
445
  e.totalRevenue?.toLocaleString() ?? 0,
390
446
  " ",
391
- F("devportal.revenue.revenue", "revenue")
447
+ j("devportal.revenue.revenue", "revenue")
392
448
  ]
393
449
  })] })
394
450
  }, e.id))
395
- }) : /* @__PURE__ */ j(e, {
396
- icon: /* @__PURE__ */ j(D, { size: 32 }),
397
- title: F("devportal.revenue.noOrgsTitle", "No organizations available"),
398
- description: F("devportal.revenue.noOrgsDescription", "Create a developer organization before reviewing revenue data.")
451
+ }) : /* @__PURE__ */ O(e, {
452
+ icon: /* @__PURE__ */ O(S, { size: 32 }),
453
+ title: j("devportal.revenue.noOrgsTitle", "No organizations available"),
454
+ description: j("devportal.revenue.noOrgsDescription", "Create a developer organization before reviewing revenue data.")
399
455
  })
400
456
  });
401
457
  };
402
458
  //#endregion
403
- export { F as RevenueDashboardPage };
459
+ export { j as RevenueDashboardPage };
404
460
 
405
461
  //# sourceMappingURL=RevenueDashboardPage.js.map