@burdenoff/microfe-devportal 2026.611.2 → 2026.616.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.
Files changed (51) hide show
  1. package/dist/devportal/components/SectionNav.js +105 -41
  2. package/dist/devportal/components/SectionNav.js.map +1 -1
  3. package/dist/devportal/hooks/useGraphQL.js +1 -1
  4. package/dist/devportal/pages/AdminReviewPage.js +36 -36
  5. package/dist/devportal/pages/AnalyticsDashboardPage.js +150 -150
  6. package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
  7. package/dist/devportal/pages/ApiKeysPage.js +184 -172
  8. package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
  9. package/dist/devportal/pages/AppLogsPage.js +9 -9
  10. package/dist/devportal/pages/ApplicationDetailPage.js +414 -414
  11. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  12. package/dist/devportal/pages/ApplicationVersionsPage.js +44 -44
  13. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  14. package/dist/devportal/pages/ApplicationsPage.js +118 -118
  15. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  16. package/dist/devportal/pages/CreateApiKeyPage.js +20 -20
  17. package/dist/devportal/pages/CreateApplicationPage.js +46 -66
  18. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  19. package/dist/devportal/pages/CreateOAuthClientPage.js +20 -20
  20. package/dist/devportal/pages/CreateOrganizationPage.js +125 -442
  21. package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
  22. package/dist/devportal/pages/CreateWebhookPage.js +25 -25
  23. package/dist/devportal/pages/DashboardPage.js +160 -145
  24. package/dist/devportal/pages/DashboardPage.js.map +1 -1
  25. package/dist/devportal/pages/DelegationsPage.js +22 -22
  26. package/dist/devportal/pages/EditApplicationPage.js +297 -317
  27. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  28. package/dist/devportal/pages/ListingPreviewPage.js +9 -9
  29. package/dist/devportal/pages/OAuthClientDetailPage.js +17 -17
  30. package/dist/devportal/pages/OAuthClientsPage.js +16 -16
  31. package/dist/devportal/pages/OrganizationDetailPage.js +78 -78
  32. package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
  33. package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
  34. package/dist/devportal/pages/OrganizationsPage.js +18 -18
  35. package/dist/devportal/pages/PublishPage.js +16 -16
  36. package/dist/devportal/pages/PublisherProfilePage.js +156 -146
  37. package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
  38. package/dist/devportal/pages/RevenueDashboardPage.js +512 -362
  39. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
  40. package/dist/devportal/pages/SettingsPage.js +17 -17
  41. package/dist/devportal/pages/SetupPage.js +99 -99
  42. package/dist/devportal/pages/SetupPage.js.map +1 -1
  43. package/dist/devportal/pages/WebhookDetailPage.js +143 -143
  44. package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
  45. package/dist/devportal/pages/WebhooksPage.js +140 -140
  46. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  47. package/dist/devportal/providers/DevportalProvider.js +46 -33
  48. package/dist/devportal/providers/DevportalProvider.js.map +1 -1
  49. package/dist/generated/global-operations.js +69 -55
  50. package/dist/generated/global-operations.js.map +1 -1
  51. package/package.json +1 -1
@@ -1,87 +1,97 @@
1
- import { EmptyState as e } from "../components/EmptyState.js";
2
- import { PageLayout as t, PageSection as n } from "../components/PageLayout.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";
1
+ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
+ import { cn as t } from "../utils/cn.js";
3
+ import { EmptyState as n } from "../components/EmptyState.js";
4
+ import { useCreateBillingAccountMutation as ee, useGetBillingAccountsByOrgQuery as te, useGetMyOrganizationsQuery as ne, useGetRevenueDashboardDataQuery as re, useLinkDevOrgBillingAccountMutation as ie } from "../../generated/global-operations.js";
5
+ import { getErrorMessage as r } from "../hooks/useGraphQL.js";
6
+ import { PageLayout as i, PageSection as a } from "../components/PageLayout.js";
7
+ import { StatCard as o, StatCardGrid as ae } from "../components/StatCard.js";
8
+ import { StatusBadge as s } from "../components/StatusBadge.js";
9
+ import { DataTable as c } from "../components/DataTable.js";
8
10
  import "../hooks/index.js";
9
11
  import { Tooltip as l } from "../../node_modules/recharts/es6/component/Tooltip.js";
10
12
  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";
13
+ import { Bar as oe } from "../../node_modules/recharts/es6/cartesian/Bar.js";
14
+ import { CartesianGrid as d } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
15
+ import { Line as f } from "../../node_modules/recharts/es6/cartesian/Line.js";
16
+ import { XAxis as p } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
17
+ import { YAxis as m } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
18
+ import { LineChart as se } from "../../node_modules/recharts/es6/chart/LineChart.js";
19
+ import { BarChart as ce } from "../../node_modules/recharts/es6/chart/BarChart.js";
20
+ import { useTr as le } from "../utils/i18n.js";
21
+ import { useMemo as h, useState as g } from "react";
22
+ import { AlertCircle as _, ArrowDownToLine as ue, Building2 as v, Check as y, CreditCard as b, DollarSign as x, Link2 as S, Loader2 as C, Plus as w, Wallet as de } from "lucide-react";
23
+ import { useSearchParams as fe } from "react-router-dom";
24
+ import { Fragment as pe, jsx as T, jsxs as E } from "react/jsx-runtime";
23
25
  //#region src/devportal/pages/RevenueDashboardPage.tsx
24
- var A = {
26
+ var D = {
25
27
  primary: "var(--color-chart-1)",
26
28
  secondary: "var(--color-chart-2)",
27
29
  tertiary: "var(--color-chart-4)"
28
- }, se = {
30
+ }, me = {
29
31
  "30d": 30,
30
32
  "90d": 90,
31
33
  "12m": 365
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({
34
+ }, O = () => {
35
+ let O = le(), { activeOrgId: k, currentUser: he } = e(), [A, ge] = g("90d"), [j, M] = g(!1), [N, P] = g(null), [_e] = ee(), [F] = ie(), [I, L] = g(!1), [R, z] = g(null), [ve] = fe(), B = h(() => /* @__PURE__ */ new Date(), []), { data: ye, loading: V } = te({
36
+ fetchPolicy: "cache-and-network",
37
+ skip: !k
38
+ }), be = h(() => {
39
+ let e = new Date(B);
40
+ return e.setDate(e.getDate() - me[A]), e.toISOString();
41
+ }, [B, A]), { data: H, loading: xe, error: U } = ne({ fetchPolicy: "cache-and-network" }), { data: W, loading: Se, error: G } = re({
37
42
  variables: {
38
- organizationId: N,
43
+ organizationId: k ?? "",
39
44
  period: "monthly",
40
- startDate: W,
41
- endDate: H.toISOString(),
45
+ startDate: be,
46
+ endDate: B.toISOString(),
42
47
  salesLimit: 10,
43
48
  salesOffset: 0,
44
49
  payoutsLimit: 10,
45
50
  payoutsOffset: 0
46
51
  },
47
- skip: !N,
52
+ skip: !k,
48
53
  fetchPolicy: "cache-and-network"
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
- return;
55
- }
56
- X.length === 1 && P(X[0]?.id ?? "");
57
- }
58
- }, [
59
- X,
60
- U,
61
- N
62
- ]);
63
- let Z = X.find((e) => e.id === N), ue = async () => {
64
- if (N) {
65
- I(!0), R(null);
54
+ }), K = h(() => H?.myDeveloperOrganizations?.map((e) => e) ?? [], [H?.myDeveloperOrganizations]).find((e) => e.id === k), q = ye?.getBillingAccountsByOrg ?? [], J = q.find((e) => e.id === K?.billingAccountId) ?? null, Y = () => {
55
+ !V && q.length > 0 ? (z(K?.billingAccountId ?? q.find((e) => e.isDefault)?.id ?? q[0]?.id ?? null), L(!0)) : X();
56
+ }, X = async () => {
57
+ if (k) {
58
+ M(!0), P(null);
66
59
  try {
67
- let e = (await z({ variables: { input: {
68
- name: Z?.name ?? N,
69
- email: ""
60
+ let e = (await _e({ variables: { input: {
61
+ name: K?.name ?? k,
62
+ email: he?.email ?? ""
70
63
  } } })).data?.createBillingAccount?.id;
71
- e && await B({
64
+ e && await F({
72
65
  variables: {
73
- organizationId: N,
66
+ organizationId: k,
74
67
  billingAccountId: e
75
68
  },
76
69
  refetchQueries: ["GetMyOrganizations"]
77
70
  });
78
71
  } catch (e) {
79
- R(e instanceof Error ? e.message : "Failed to link billing account");
72
+ P(e instanceof Error ? e.message : "Failed to link billing account");
80
73
  } finally {
81
- I(!1);
74
+ M(!1), L(!1);
82
75
  }
83
76
  }
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) => ({
77
+ }, Z = async () => {
78
+ if (!(!k || !R)) {
79
+ M(!0), P(null);
80
+ try {
81
+ await F({
82
+ variables: {
83
+ organizationId: k,
84
+ billingAccountId: R
85
+ },
86
+ refetchQueries: ["GetMyOrganizations"]
87
+ }), L(!1);
88
+ } catch (e) {
89
+ P(e instanceof Error ? e.message : "Failed to link billing account");
90
+ } finally {
91
+ M(!1);
92
+ }
93
+ }
94
+ }, Q = W?.developerOrgRevenueSummary, Ce = [...W?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), we = W?.developerOrgSales?.edges?.map((e) => e.node) ?? [], Te = W?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = Ce.map((e) => ({
85
95
  date: new Date(e.date).toLocaleDateString(void 0, {
86
96
  month: "short",
87
97
  day: "numeric"
@@ -92,370 +102,510 @@ var A = {
92
102
  refunds: e.refunds,
93
103
  salesCount: e.salesCount
94
104
  }));
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", {
105
+ return xe && !H ? /* @__PURE__ */ T(i, {
106
+ title: O("devportal.revenue.title", "Revenue"),
107
+ description: O("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
108
+ children: /* @__PURE__ */ T("div", {
99
109
  className: "flex items-center justify-center py-16 text-muted-foreground",
100
- children: /* @__PURE__ */ O(w, { className: "h-8 w-8 animate-spin" })
110
+ children: /* @__PURE__ */ T(C, { className: "h-8 w-8 animate-spin" })
101
111
  })
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, {
112
+ }) : U ? /* @__PURE__ */ T(i, {
113
+ title: O("devportal.revenue.title", "Revenue"),
114
+ description: O("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
115
+ children: /* @__PURE__ */ T(n, {
116
+ icon: /* @__PURE__ */ T(_, {
107
117
  size: 32,
108
118
  className: "text-status-error-text"
109
119
  }),
110
- title: j("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
111
- description: c(K)
120
+ title: O("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
121
+ description: r(U)
112
122
  })
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, {
123
+ }) : k ? G ? /* @__PURE__ */ T(i, {
124
+ title: O("devportal.revenue.title", "Revenue"),
125
+ description: O("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
126
+ children: /* @__PURE__ */ T(n, {
127
+ icon: /* @__PURE__ */ T(_, {
118
128
  size: 32,
119
129
  className: "text-status-error-text"
120
130
  }),
121
- title: j("devportal.revenue.errorLoadData", "Unable to load revenue data"),
122
- description: c(Y)
131
+ title: O("devportal.revenue.errorLoadData", "Unable to load revenue data"),
132
+ description: r(G)
123
133
  })
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", {
134
+ }) : /* @__PURE__ */ E(i, {
135
+ title: O("devportal.revenue.title", "Revenue"),
136
+ description: K ? `${O("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${K.name}` : O("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
137
+ actions: /* @__PURE__ */ T("div", {
128
138
  className: "flex flex-wrap gap-2",
129
- children: [/* @__PURE__ */ O("select", {
130
- value: N,
131
- onChange: (e) => P(e.target.value),
132
- "aria-label": j("devportal.revenue.selectOrgAria", "Select organization"),
133
- className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
134
- children: X.map((e) => /* @__PURE__ */ O("option", {
135
- value: e.id,
136
- children: e.name
137
- }, e.id))
138
- }), /* @__PURE__ */ k("select", {
139
- value: M,
140
- onChange: (e) => ce(e.target.value),
141
- "aria-label": j("devportal.revenue.selectRangeAria", "Select time range"),
139
+ children: /* @__PURE__ */ E("select", {
140
+ value: A,
141
+ onChange: (e) => ge(e.target.value),
142
+ "aria-label": O("devportal.revenue.selectRangeAria", "Select time range"),
142
143
  className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
143
144
  children: [
144
- /* @__PURE__ */ O("option", {
145
+ /* @__PURE__ */ T("option", {
145
146
  value: "30d",
146
- children: j("devportal.revenue.range.30d", "Last 30 days")
147
+ children: O("devportal.revenue.range.30d", "Last 30 days")
147
148
  }),
148
- /* @__PURE__ */ O("option", {
149
+ /* @__PURE__ */ T("option", {
149
150
  value: "90d",
150
- children: j("devportal.revenue.range.90d", "Last 90 days")
151
+ children: O("devportal.revenue.range.90d", "Last 90 days")
151
152
  }),
152
- /* @__PURE__ */ O("option", {
153
+ /* @__PURE__ */ T("option", {
153
154
  value: "12m",
154
- children: j("devportal.revenue.range.12m", "Last 12 months")
155
+ children: O("devportal.revenue.range.12m", "Last 12 months")
155
156
  })
156
157
  ]
157
- })]
158
+ })
158
159
  }),
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",
160
+ children: [
161
+ K && !K.billingAccountId && /* @__PURE__ */ E("div", {
162
+ className: "mb-6 rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 flex flex-col gap-3",
163
+ children: [/* @__PURE__ */ E("div", {
164
+ className: "flex items-start gap-3",
168
165
  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")
166
+ /* @__PURE__ */ T(S, {
167
+ size: 20,
168
+ className: "text-accent-blue flex-shrink-0 mt-0.5"
172
169
  }),
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.")
170
+ /* @__PURE__ */ E("div", {
171
+ className: "flex-1 min-w-0",
172
+ children: [
173
+ /* @__PURE__ */ T("p", {
174
+ className: "text-sm font-medium text-status-info-text",
175
+ children: O("devportal.revenue.billingNotLinkedTitle", "Link a billing account to receive store revenue")
176
+ }),
177
+ /* @__PURE__ */ T("p", {
178
+ className: "mt-1 text-sm text-status-info-text",
179
+ children: O("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.")
180
+ }),
181
+ N && /* @__PURE__ */ T("p", {
182
+ className: "mt-2 text-sm text-status-error-text",
183
+ children: N
184
+ })
185
+ ]
176
186
  }),
177
- L && /* @__PURE__ */ O("p", {
178
- className: "mt-2 text-sm text-status-error-text",
179
- children: L
187
+ /* @__PURE__ */ E("button", {
188
+ type: "button",
189
+ onClick: Y,
190
+ disabled: j || V,
191
+ 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",
192
+ children: [j || V ? /* @__PURE__ */ T(C, {
193
+ size: 14,
194
+ className: "animate-spin"
195
+ }) : /* @__PURE__ */ T(S, { size: 14 }), j ? O("devportal.revenue.linking", "Linking...") : O("devportal.revenue.linkBillingAccount", "Link Billing Account")]
180
196
  })
181
197
  ]
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", {
195
- className: "flex items-center justify-center py-16 text-muted-foreground",
196
- children: /* @__PURE__ */ O(w, { className: "h-8 w-8 animate-spin" })
197
- }) : Q ? /* @__PURE__ */ k(D, { children: [
198
- /* @__PURE__ */ k(ee, {
199
- columns: 4,
200
- children: [
201
- /* @__PURE__ */ O(r, {
202
- title: j("devportal.revenue.grossRevenue", "Gross Revenue"),
203
- value: `$${Q.totalGrossRevenue.toLocaleString()}`,
204
- icon: /* @__PURE__ */ O(S, { size: 20 })
205
- }),
206
- /* @__PURE__ */ O(r, {
207
- title: j("devportal.revenue.netRevenue", "Net Revenue"),
208
- value: `$${Q.totalNetRevenue.toLocaleString()}`,
209
- icon: /* @__PURE__ */ O(T, { size: 20 })
210
- }),
211
- /* @__PURE__ */ O(r, {
212
- title: j("devportal.revenue.pendingBalance", "Pending Balance"),
213
- value: `$${Q.pendingBalance.toLocaleString()}`,
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")
216
- }),
217
- /* @__PURE__ */ O(r, {
218
- title: j("devportal.revenue.platformFees", "Platform Fees"),
219
- value: `$${Q.totalPlatformFees.toLocaleString()}`,
220
- icon: /* @__PURE__ */ O(ae, { size: 20 }),
221
- description: `${Q.totalRefundsCount} ${j("devportal.revenue.refunds", "refunds")}`
222
- })
223
- ]
198
+ }), I && q.length > 0 && /* @__PURE__ */ E("div", {
199
+ className: "rounded-lg border border-border bg-card p-4 ml-8 space-y-3",
200
+ children: [
201
+ /* @__PURE__ */ T("p", {
202
+ className: "text-sm font-medium",
203
+ children: O("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
204
+ }),
205
+ /* @__PURE__ */ E("div", {
206
+ className: "space-y-2",
207
+ children: [q.map((e) => /* @__PURE__ */ E("button", {
208
+ type: "button",
209
+ onClick: () => z(e.id ?? null),
210
+ className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", R === e.id ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
211
+ children: [/* @__PURE__ */ T(y, {
212
+ size: 14,
213
+ className: t("flex-shrink-0", R === e.id ? "opacity-100 text-primary" : "opacity-0")
214
+ }), /* @__PURE__ */ E("div", {
215
+ className: "flex-1 min-w-0",
216
+ children: [/* @__PURE__ */ T("p", {
217
+ className: "font-medium truncate",
218
+ children: e.name
219
+ }), e.isDefault && /* @__PURE__ */ T("p", {
220
+ className: "text-xs text-muted-foreground",
221
+ children: O("devportal.revenue.defaultAccount", "Default")
222
+ })]
223
+ })]
224
+ }, e.id)), /* @__PURE__ */ E("button", {
225
+ type: "button",
226
+ onClick: () => z(null),
227
+ className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", R === null ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
228
+ children: [/* @__PURE__ */ T(y, {
229
+ size: 14,
230
+ className: t("flex-shrink-0", R === null ? "opacity-100 text-primary" : "opacity-0")
231
+ }), /* @__PURE__ */ E("div", {
232
+ className: "flex-1",
233
+ children: [/* @__PURE__ */ E("p", {
234
+ className: "font-medium flex items-center gap-1.5",
235
+ children: [/* @__PURE__ */ T(w, { size: 13 }), O("devportal.revenue.createNewBillingAccount", "Create a new billing account")]
236
+ }), /* @__PURE__ */ T("p", {
237
+ className: "text-xs text-muted-foreground",
238
+ children: O("devportal.revenue.createNewBillingAccountDesc", "A fresh billing account named after this organization")
239
+ })]
240
+ })]
241
+ })]
242
+ }),
243
+ /* @__PURE__ */ E("div", {
244
+ className: "flex items-center justify-end gap-2 pt-1",
245
+ children: [/* @__PURE__ */ T("button", {
246
+ type: "button",
247
+ onClick: () => {
248
+ L(!1), P(null);
249
+ },
250
+ className: "rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent transition-colors",
251
+ children: O("devportal.cancel", "Cancel")
252
+ }), /* @__PURE__ */ E("button", {
253
+ type: "button",
254
+ disabled: j,
255
+ onClick: () => R ? Z() : X(),
256
+ className: "inline-flex items-center gap-1.5 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",
257
+ children: [j ? /* @__PURE__ */ T(C, {
258
+ size: 13,
259
+ className: "animate-spin"
260
+ }) : /* @__PURE__ */ T(S, { size: 13 }), O("devportal.revenue.confirm", "Confirm")]
261
+ })]
262
+ })
263
+ ]
264
+ })]
265
+ }),
266
+ K?.billingAccountId && /* @__PURE__ */ E("div", {
267
+ className: "mb-6 rounded-lg border border-border bg-card p-3 flex flex-col gap-3",
268
+ children: [/* @__PURE__ */ E("div", {
269
+ className: "flex items-center gap-3",
270
+ children: [
271
+ /* @__PURE__ */ T(b, {
272
+ size: 16,
273
+ className: "text-muted-foreground flex-shrink-0"
274
+ }),
275
+ /* @__PURE__ */ E("div", {
276
+ className: "flex-1 min-w-0",
277
+ children: [/* @__PURE__ */ T("p", {
278
+ className: "text-sm font-medium truncate",
279
+ children: J?.name ?? O("devportal.revenue.billingAccount", "Billing account")
280
+ }), /* @__PURE__ */ T("p", {
281
+ className: "text-xs text-muted-foreground truncate",
282
+ children: J ? `${J.currency}${J.email ? ` · ${J.email}` : ""}` : K.billingAccountId
283
+ })]
284
+ }),
285
+ !I && /* @__PURE__ */ T("button", {
286
+ type: "button",
287
+ onClick: Y,
288
+ disabled: V,
289
+ className: "text-xs text-muted-foreground hover:text-foreground transition-colors flex-shrink-0 disabled:opacity-50",
290
+ children: O("devportal.revenue.changeBillingAccount", "Change")
291
+ })
292
+ ]
293
+ }), I && q.length > 0 && /* @__PURE__ */ E("div", {
294
+ className: "rounded-lg border border-border bg-background p-4 space-y-3",
295
+ children: [
296
+ /* @__PURE__ */ T("p", {
297
+ className: "text-sm font-medium",
298
+ children: O("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
299
+ }),
300
+ /* @__PURE__ */ E("div", {
301
+ className: "space-y-2",
302
+ children: [q.map((e) => /* @__PURE__ */ E("button", {
303
+ type: "button",
304
+ onClick: () => z(e.id ?? null),
305
+ className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", R === e.id ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
306
+ children: [/* @__PURE__ */ T(y, {
307
+ size: 14,
308
+ className: t("flex-shrink-0", R === e.id ? "opacity-100 text-primary" : "opacity-0")
309
+ }), /* @__PURE__ */ E("div", {
310
+ className: "flex-1 min-w-0",
311
+ children: [/* @__PURE__ */ T("p", {
312
+ className: "font-medium truncate",
313
+ children: e.name
314
+ }), e.isDefault && /* @__PURE__ */ T("p", {
315
+ className: "text-xs text-muted-foreground",
316
+ children: O("devportal.revenue.defaultAccount", "Default")
317
+ })]
318
+ })]
319
+ }, e.id)), /* @__PURE__ */ E("button", {
320
+ type: "button",
321
+ onClick: () => z(null),
322
+ className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", R === null ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
323
+ children: [/* @__PURE__ */ T(y, {
324
+ size: 14,
325
+ className: t("flex-shrink-0", R === null ? "opacity-100 text-primary" : "opacity-0")
326
+ }), /* @__PURE__ */ E("div", {
327
+ className: "flex-1",
328
+ children: [/* @__PURE__ */ E("p", {
329
+ className: "font-medium flex items-center gap-1.5",
330
+ children: [/* @__PURE__ */ T(w, { size: 13 }), O("devportal.revenue.createNewBillingAccount", "Create a new billing account")]
331
+ }), /* @__PURE__ */ T("p", {
332
+ className: "text-xs text-muted-foreground",
333
+ children: O("devportal.revenue.createNewBillingAccountDesc", "A fresh billing account named after this organization")
334
+ })]
335
+ })]
336
+ })]
337
+ }),
338
+ /* @__PURE__ */ E("div", {
339
+ className: "flex items-center justify-end gap-2 pt-1",
340
+ children: [/* @__PURE__ */ T("button", {
341
+ type: "button",
342
+ onClick: () => {
343
+ L(!1), P(null);
344
+ },
345
+ className: "rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent transition-colors",
346
+ children: O("devportal.cancel", "Cancel")
347
+ }), /* @__PURE__ */ E("button", {
348
+ type: "button",
349
+ disabled: j,
350
+ onClick: () => R ? void Z() : void X(),
351
+ className: "inline-flex items-center gap-1.5 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",
352
+ children: [j ? /* @__PURE__ */ T(C, {
353
+ size: 13,
354
+ className: "animate-spin"
355
+ }) : /* @__PURE__ */ T(S, { size: 13 }), O("devportal.revenue.confirm", "Confirm")]
356
+ })]
357
+ }),
358
+ N && /* @__PURE__ */ T("p", {
359
+ className: "text-xs text-status-error-text",
360
+ children: N
361
+ })
362
+ ]
363
+ })]
224
364
  }),
225
- /* @__PURE__ */ k("div", {
226
- className: "grid gap-6 xl:grid-cols-2",
227
- children: [/* @__PURE__ */ O(n, {
228
- title: j("devportal.revenue.revenueTrend", "Revenue trend"),
229
- children: /* @__PURE__ */ O("div", {
365
+ Se && !Q ? /* @__PURE__ */ T("div", {
366
+ className: "flex items-center justify-center py-16 text-muted-foreground",
367
+ children: /* @__PURE__ */ T(C, { className: "h-8 w-8 animate-spin" })
368
+ }) : Q ? /* @__PURE__ */ E(pe, { children: [
369
+ /* @__PURE__ */ E(ae, {
370
+ columns: 4,
371
+ children: [
372
+ /* @__PURE__ */ T(o, {
373
+ title: O("devportal.revenue.grossRevenue", "Gross Revenue"),
374
+ value: `$${Q.totalGrossRevenue.toLocaleString()}`,
375
+ icon: /* @__PURE__ */ T(x, { size: 20 })
376
+ }),
377
+ /* @__PURE__ */ T(o, {
378
+ title: O("devportal.revenue.netRevenue", "Net Revenue"),
379
+ value: `$${Q.totalNetRevenue.toLocaleString()}`,
380
+ icon: /* @__PURE__ */ T(de, { size: 20 })
381
+ }),
382
+ /* @__PURE__ */ T(o, {
383
+ title: O("devportal.revenue.pendingBalance", "Pending Balance"),
384
+ value: `$${Q.pendingBalance.toLocaleString()}`,
385
+ icon: /* @__PURE__ */ T(b, { size: 20 }),
386
+ description: Q.nextPayoutDate ? `${O("devportal.revenue.nextPayout", "Next payout")} ${new Date(Q.nextPayoutDate).toLocaleDateString()}` : O("devportal.revenue.noPayoutScheduled", "No payout scheduled")
387
+ }),
388
+ /* @__PURE__ */ T(o, {
389
+ title: O("devportal.revenue.platformFees", "Platform Fees"),
390
+ value: `$${Q.totalPlatformFees.toLocaleString()}`,
391
+ icon: /* @__PURE__ */ T(ue, { size: 20 }),
392
+ description: `${Q.totalRefundsCount} ${O("devportal.revenue.refunds", "refunds")}`
393
+ })
394
+ ]
395
+ }),
396
+ /* @__PURE__ */ E("div", {
397
+ className: "grid gap-6 xl:grid-cols-2",
398
+ children: [/* @__PURE__ */ T(a, {
399
+ title: O("devportal.revenue.revenueTrend", "Revenue trend"),
400
+ children: /* @__PURE__ */ T("div", {
401
+ className: "rounded-lg border bg-card p-4",
402
+ children: /* @__PURE__ */ T(u, {
403
+ width: "100%",
404
+ height: 300,
405
+ children: /* @__PURE__ */ E(se, {
406
+ data: $,
407
+ children: [
408
+ /* @__PURE__ */ T(d, {
409
+ strokeDasharray: "3 3",
410
+ stroke: "var(--color-chart-grid)"
411
+ }),
412
+ /* @__PURE__ */ T(p, {
413
+ dataKey: "date",
414
+ stroke: "var(--color-chart-axis)",
415
+ fontSize: 12
416
+ }),
417
+ /* @__PURE__ */ T(m, {
418
+ stroke: "var(--color-chart-axis)",
419
+ fontSize: 12
420
+ }),
421
+ /* @__PURE__ */ T(l, { contentStyle: {
422
+ backgroundColor: "var(--color-card)",
423
+ border: "1px solid var(--color-border-default)",
424
+ borderRadius: 12
425
+ } }),
426
+ /* @__PURE__ */ T(f, {
427
+ type: "monotone",
428
+ dataKey: "grossRevenue",
429
+ stroke: D.primary,
430
+ strokeWidth: 2,
431
+ dot: !1
432
+ }),
433
+ /* @__PURE__ */ T(f, {
434
+ type: "monotone",
435
+ dataKey: "netRevenue",
436
+ stroke: D.secondary,
437
+ strokeWidth: 2,
438
+ dot: !1
439
+ })
440
+ ]
441
+ })
442
+ })
443
+ })
444
+ }), /* @__PURE__ */ T(a, {
445
+ title: O("devportal.revenue.topApps", "Top applications by revenue"),
446
+ children: Q.topApps.length > 0 ? /* @__PURE__ */ T("div", {
447
+ className: "space-y-2",
448
+ children: Q.topApps.map((e) => /* @__PURE__ */ T("div", {
449
+ className: "rounded-lg border bg-card p-4",
450
+ children: /* @__PURE__ */ E("div", {
451
+ className: "flex items-start justify-between gap-3",
452
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
453
+ className: "font-medium",
454
+ children: e.applicationName
455
+ }), /* @__PURE__ */ E("p", {
456
+ className: "text-sm text-muted-foreground",
457
+ children: [
458
+ e.salesCount,
459
+ " ",
460
+ O("devportal.revenue.sales", "sales")
461
+ ]
462
+ })] }), /* @__PURE__ */ E("div", {
463
+ className: "text-right",
464
+ children: [/* @__PURE__ */ E("p", {
465
+ className: "font-semibold",
466
+ children: ["$", e.grossRevenue.toLocaleString()]
467
+ }), /* @__PURE__ */ E("p", {
468
+ className: "text-sm text-muted-foreground",
469
+ children: [
470
+ O("devportal.revenue.net", "Net"),
471
+ " $",
472
+ e.netRevenue.toLocaleString()
473
+ ]
474
+ })]
475
+ })]
476
+ })
477
+ }, e.applicationId))
478
+ }) : /* @__PURE__ */ T(n, {
479
+ icon: /* @__PURE__ */ T(v, { size: 24 }),
480
+ title: O("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
481
+ description: O("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
482
+ })
483
+ })]
484
+ }),
485
+ /* @__PURE__ */ T(a, {
486
+ title: O("devportal.revenue.salesVolume", "Sales volume"),
487
+ children: /* @__PURE__ */ T("div", {
230
488
  className: "rounded-lg border bg-card p-4",
231
- children: /* @__PURE__ */ O(u, {
489
+ children: /* @__PURE__ */ T(u, {
232
490
  width: "100%",
233
- height: 300,
234
- children: /* @__PURE__ */ k(g, {
491
+ height: 280,
492
+ children: /* @__PURE__ */ E(ce, {
235
493
  data: $,
236
494
  children: [
237
- /* @__PURE__ */ O(f, {
495
+ /* @__PURE__ */ T(d, {
238
496
  strokeDasharray: "3 3",
239
497
  stroke: "var(--color-chart-grid)"
240
498
  }),
241
- /* @__PURE__ */ O(m, {
499
+ /* @__PURE__ */ T(p, {
242
500
  dataKey: "date",
243
501
  stroke: "var(--color-chart-axis)",
244
502
  fontSize: 12
245
503
  }),
246
- /* @__PURE__ */ O(h, {
504
+ /* @__PURE__ */ T(m, {
247
505
  stroke: "var(--color-chart-axis)",
248
506
  fontSize: 12
249
507
  }),
250
- /* @__PURE__ */ O(l, { contentStyle: {
508
+ /* @__PURE__ */ T(l, { contentStyle: {
251
509
  backgroundColor: "var(--color-card)",
252
510
  border: "1px solid var(--color-border-default)",
253
511
  borderRadius: 12
254
512
  } }),
255
- /* @__PURE__ */ O(p, {
256
- type: "monotone",
257
- dataKey: "grossRevenue",
258
- stroke: A.primary,
259
- strokeWidth: 2,
260
- dot: !1
261
- }),
262
- /* @__PURE__ */ O(p, {
263
- type: "monotone",
264
- dataKey: "netRevenue",
265
- stroke: A.secondary,
266
- strokeWidth: 2,
267
- dot: !1
513
+ /* @__PURE__ */ T(oe, {
514
+ dataKey: "salesCount",
515
+ fill: D.tertiary,
516
+ radius: [
517
+ 6,
518
+ 6,
519
+ 0,
520
+ 0
521
+ ]
268
522
  })
269
523
  ]
270
524
  })
271
525
  })
272
526
  })
273
- }), /* @__PURE__ */ O(n, {
274
- title: j("devportal.revenue.topApps", "Top applications by revenue"),
275
- children: Q.topApps.length > 0 ? /* @__PURE__ */ O("div", {
276
- className: "space-y-2",
277
- children: Q.topApps.map((e) => /* @__PURE__ */ O("div", {
278
- className: "rounded-lg border bg-card p-4",
279
- children: /* @__PURE__ */ k("div", {
280
- className: "flex items-start justify-between gap-3",
281
- children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
282
- className: "font-medium",
283
- children: e.applicationName
284
- }), /* @__PURE__ */ k("p", {
285
- className: "text-sm text-muted-foreground",
286
- children: [
287
- e.salesCount,
288
- " ",
289
- j("devportal.revenue.sales", "sales")
290
- ]
291
- })] }), /* @__PURE__ */ k("div", {
292
- className: "text-right",
293
- children: [/* @__PURE__ */ k("p", {
294
- className: "font-semibold",
295
- children: ["$", e.grossRevenue.toLocaleString()]
296
- }), /* @__PURE__ */ k("p", {
297
- className: "text-sm text-muted-foreground",
298
- children: [
299
- j("devportal.revenue.net", "Net"),
300
- " $",
301
- e.netRevenue.toLocaleString()
302
- ]
303
- })]
304
- })]
305
- })
306
- }, e.applicationId))
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.")
311
- })
312
- })]
313
- }),
314
- /* @__PURE__ */ O(n, {
315
- title: j("devportal.revenue.salesVolume", "Sales volume"),
316
- children: /* @__PURE__ */ O("div", {
317
- className: "rounded-lg border bg-card p-4",
318
- children: /* @__PURE__ */ O(u, {
319
- width: "100%",
320
- height: 280,
321
- children: /* @__PURE__ */ k(re, {
322
- data: $,
323
- children: [
324
- /* @__PURE__ */ O(f, {
325
- strokeDasharray: "3 3",
326
- stroke: "var(--color-chart-grid)"
327
- }),
328
- /* @__PURE__ */ O(m, {
329
- dataKey: "date",
330
- stroke: "var(--color-chart-axis)",
331
- fontSize: 12
332
- }),
333
- /* @__PURE__ */ O(h, {
334
- stroke: "var(--color-chart-axis)",
335
- fontSize: 12
336
- }),
337
- /* @__PURE__ */ O(l, { contentStyle: {
338
- backgroundColor: "var(--color-card)",
339
- border: "1px solid var(--color-border-default)",
340
- borderRadius: 12
341
- } }),
342
- /* @__PURE__ */ O(d, {
343
- dataKey: "salesCount",
344
- fill: A.tertiary,
345
- radius: [
346
- 6,
347
- 6,
348
- 0,
349
- 0
350
- ]
351
- })
527
+ }),
528
+ /* @__PURE__ */ E("div", {
529
+ className: "grid gap-6 xl:grid-cols-2",
530
+ children: [/* @__PURE__ */ T(a, {
531
+ title: O("devportal.revenue.recentSales", "Recent sales"),
532
+ children: /* @__PURE__ */ T(c, {
533
+ data: we,
534
+ keyField: "id",
535
+ columns: [
536
+ {
537
+ key: "application",
538
+ header: O("devportal.revenue.application", "Application"),
539
+ render: (e) => e.application?.name || e.planName || O("devportal.common.unknown", "Unknown")
540
+ },
541
+ {
542
+ key: "grossAmount",
543
+ header: O("devportal.revenue.gross", "Gross"),
544
+ render: (e) => `$${e.grossAmount.toLocaleString()}`
545
+ },
546
+ {
547
+ key: "netAmount",
548
+ header: O("devportal.revenue.net", "Net"),
549
+ render: (e) => `$${e.netAmount.toLocaleString()}`
550
+ },
551
+ {
552
+ key: "status",
553
+ header: O("devportal.revenue.status", "Status"),
554
+ render: (e) => /* @__PURE__ */ T(s, {
555
+ status: e.status,
556
+ type: "app"
557
+ })
558
+ }
352
559
  ]
353
560
  })
354
- })
561
+ }), /* @__PURE__ */ T(a, {
562
+ title: O("devportal.revenue.payoutHistory", "Payout history"),
563
+ children: /* @__PURE__ */ T(c, {
564
+ data: Te,
565
+ keyField: "id",
566
+ columns: [
567
+ {
568
+ key: "periodLabel",
569
+ header: O("devportal.revenue.period", "Period"),
570
+ render: (e) => e.periodLabel
571
+ },
572
+ {
573
+ key: "netAmount",
574
+ header: O("devportal.revenue.netPayout", "Net payout"),
575
+ render: (e) => `$${e.netAmount.toLocaleString()}`
576
+ },
577
+ {
578
+ key: "status",
579
+ header: O("devportal.revenue.status", "Status"),
580
+ render: (e) => /* @__PURE__ */ T(s, {
581
+ status: e.status,
582
+ type: "app"
583
+ })
584
+ }
585
+ ]
586
+ })
587
+ })]
355
588
  })
356
- }),
357
- /* @__PURE__ */ k("div", {
358
- className: "grid gap-6 xl:grid-cols-2",
359
- children: [/* @__PURE__ */ O(n, {
360
- title: j("devportal.revenue.recentSales", "Recent sales"),
361
- children: /* @__PURE__ */ O(a, {
362
- data: fe,
363
- keyField: "id",
364
- columns: [
365
- {
366
- key: "application",
367
- header: j("devportal.revenue.application", "Application"),
368
- render: (e) => e.application?.name || e.planName || j("devportal.common.unknown", "Unknown")
369
- },
370
- {
371
- key: "grossAmount",
372
- header: j("devportal.revenue.gross", "Gross"),
373
- render: (e) => `$${e.grossAmount.toLocaleString()}`
374
- },
375
- {
376
- key: "netAmount",
377
- header: j("devportal.revenue.net", "Net"),
378
- render: (e) => `$${e.netAmount.toLocaleString()}`
379
- },
380
- {
381
- key: "status",
382
- header: j("devportal.revenue.status", "Status"),
383
- render: (e) => /* @__PURE__ */ O(i, {
384
- status: e.status,
385
- type: "app"
386
- })
387
- }
388
- ]
389
- })
390
- }), /* @__PURE__ */ O(n, {
391
- title: j("devportal.revenue.payoutHistory", "Payout history"),
392
- children: /* @__PURE__ */ O(a, {
393
- data: pe,
394
- keyField: "id",
395
- columns: [
396
- {
397
- key: "periodLabel",
398
- header: j("devportal.revenue.period", "Period"),
399
- render: (e) => e.periodLabel
400
- },
401
- {
402
- key: "netAmount",
403
- header: j("devportal.revenue.netPayout", "Net payout"),
404
- render: (e) => `$${e.netAmount.toLocaleString()}`
405
- },
406
- {
407
- key: "status",
408
- header: j("devportal.revenue.status", "Status"),
409
- render: (e) => /* @__PURE__ */ O(i, {
410
- status: e.status,
411
- type: "app"
412
- })
413
- }
414
- ]
415
- })
416
- })]
589
+ ] }) : /* @__PURE__ */ T(n, {
590
+ icon: /* @__PURE__ */ T(x, { size: 32 }),
591
+ title: O("devportal.revenue.noDataTitle", "No revenue data yet"),
592
+ description: O("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
417
593
  })
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", {
427
- className: "space-y-2",
428
- children: X.map((e) => /* @__PURE__ */ O("button", {
429
- type: "button",
430
- onClick: () => P(e.id),
431
- className: "flex w-full items-start justify-between rounded-lg border bg-card p-4 text-left transition-colors hover:bg-accent",
432
- children: /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
433
- className: "flex items-center gap-2",
434
- children: [/* @__PURE__ */ O(x, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ O("span", {
435
- className: "font-medium",
436
- children: e.name
437
- })]
438
- }), /* @__PURE__ */ k("p", {
439
- className: "mt-1 text-sm text-muted-foreground",
440
- children: [
441
- e.totalApps ?? 0,
442
- " ",
443
- j("devportal.revenue.apps", "apps"),
444
- " · $",
445
- e.totalRevenue?.toLocaleString() ?? 0,
446
- " ",
447
- j("devportal.revenue.revenue", "revenue")
448
- ]
449
- })] })
450
- }, e.id))
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.")
594
+ ]
595
+ }) : /* @__PURE__ */ T(i, {
596
+ title: O("devportal.revenue.title", "Revenue"),
597
+ description: O("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
598
+ children: /* @__PURE__ */ T(n, {
599
+ icon: /* @__PURE__ */ T(v, {
600
+ size: 32,
601
+ className: "text-muted-foreground"
602
+ }),
603
+ title: O("devportal.revenue.selectOrgTitle", "Select an organization"),
604
+ description: O("devportal.revenue.selectOrgHint", "Use the organization switcher in the nav bar above to choose which organization's revenue to view.")
455
605
  })
456
606
  });
457
607
  };
458
608
  //#endregion
459
- export { j as RevenueDashboardPage };
609
+ export { O as RevenueDashboardPage };
460
610
 
461
611
  //# sourceMappingURL=RevenueDashboardPage.js.map