@burdenoff/microfe-devportal 2026.611.2 → 2026.614.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/components/SectionNav.js +105 -41
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/hooks/useGraphQL.js +1 -1
- package/dist/devportal/pages/AdminReviewPage.js +36 -36
- package/dist/devportal/pages/AnalyticsDashboardPage.js +150 -150
- package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/devportal/pages/ApiKeysPage.js +184 -172
- package/dist/devportal/pages/ApiKeysPage.js.map +1 -1
- package/dist/devportal/pages/AppLogsPage.js +9 -9
- package/dist/devportal/pages/ApplicationDetailPage.js +414 -414
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationVersionsPage.js +44 -44
- package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationsPage.js +118 -118
- package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
- package/dist/devportal/pages/CreateApiKeyPage.js +20 -20
- package/dist/devportal/pages/CreateApplicationPage.js +32 -32
- package/dist/devportal/pages/CreateOAuthClientPage.js +20 -20
- package/dist/devportal/pages/CreateOrganizationPage.js +125 -442
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/CreateWebhookPage.js +25 -25
- package/dist/devportal/pages/DashboardPage.js +160 -145
- package/dist/devportal/pages/DashboardPage.js.map +1 -1
- package/dist/devportal/pages/DelegationsPage.js +22 -22
- package/dist/devportal/pages/EditApplicationPage.js +283 -283
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/ListingPreviewPage.js +9 -9
- package/dist/devportal/pages/OAuthClientDetailPage.js +17 -17
- package/dist/devportal/pages/OAuthClientsPage.js +16 -16
- package/dist/devportal/pages/OrganizationDetailPage.js +78 -78
- package/dist/devportal/pages/OrganizationMembersPage.js +260 -260
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +18 -18
- package/dist/devportal/pages/PublishPage.js +16 -16
- package/dist/devportal/pages/PublisherProfilePage.js +156 -146
- package/dist/devportal/pages/PublisherProfilePage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +512 -362
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SettingsPage.js +17 -17
- package/dist/devportal/pages/SetupPage.js +99 -99
- package/dist/devportal/pages/SetupPage.js.map +1 -1
- package/dist/devportal/pages/WebhookDetailPage.js +143 -143
- package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
- package/dist/devportal/pages/WebhooksPage.js +140 -140
- package/dist/devportal/pages/WebhooksPage.js.map +1 -1
- package/dist/devportal/providers/DevportalProvider.js +46 -33
- package/dist/devportal/providers/DevportalProvider.js.map +1 -1
- package/dist/generated/global-operations.js +69 -55
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,87 +1,97 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
12
|
-
import { CartesianGrid as
|
|
13
|
-
import { Line as
|
|
14
|
-
import { XAxis as
|
|
15
|
-
import { YAxis as
|
|
16
|
-
import { LineChart as
|
|
17
|
-
import { BarChart as
|
|
18
|
-
import { useTr as
|
|
19
|
-
import {
|
|
20
|
-
import { AlertCircle as
|
|
21
|
-
import { useSearchParams as
|
|
22
|
-
import { Fragment as
|
|
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
|
|
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
|
-
},
|
|
30
|
+
}, me = {
|
|
29
31
|
"30d": 30,
|
|
30
32
|
"90d": 90,
|
|
31
33
|
"12m": 365
|
|
32
|
-
},
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
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:
|
|
43
|
+
organizationId: k ?? "",
|
|
39
44
|
period: "monthly",
|
|
40
|
-
startDate:
|
|
41
|
-
endDate:
|
|
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: !
|
|
52
|
+
skip: !k,
|
|
48
53
|
fetchPolicy: "cache-and-network"
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
|
68
|
-
name:
|
|
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
|
|
64
|
+
e && await F({
|
|
72
65
|
variables: {
|
|
73
|
-
organizationId:
|
|
66
|
+
organizationId: k,
|
|
74
67
|
billingAccountId: e
|
|
75
68
|
},
|
|
76
69
|
refetchQueries: ["GetMyOrganizations"]
|
|
77
70
|
});
|
|
78
71
|
} catch (e) {
|
|
79
|
-
|
|
72
|
+
P(e instanceof Error ? e.message : "Failed to link billing account");
|
|
80
73
|
} finally {
|
|
81
|
-
|
|
74
|
+
M(!1), L(!1);
|
|
82
75
|
}
|
|
83
76
|
}
|
|
84
|
-
},
|
|
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
|
|
96
|
-
title:
|
|
97
|
-
description:
|
|
98
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
110
|
+
children: /* @__PURE__ */ T(C, { className: "h-8 w-8 animate-spin" })
|
|
101
111
|
})
|
|
102
|
-
}) :
|
|
103
|
-
title:
|
|
104
|
-
description:
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
111
|
-
description:
|
|
120
|
+
title: O("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
|
|
121
|
+
description: r(U)
|
|
112
122
|
})
|
|
113
|
-
}) :
|
|
114
|
-
title:
|
|
115
|
-
description:
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
icon: /* @__PURE__ */
|
|
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:
|
|
122
|
-
description:
|
|
131
|
+
title: O("devportal.revenue.errorLoadData", "Unable to load revenue data"),
|
|
132
|
+
description: r(G)
|
|
123
133
|
})
|
|
124
|
-
}) : /* @__PURE__ */
|
|
125
|
-
title:
|
|
126
|
-
description:
|
|
127
|
-
actions: /* @__PURE__ */
|
|
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:
|
|
130
|
-
value:
|
|
131
|
-
onChange: (e) =>
|
|
132
|
-
"aria-label":
|
|
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__ */
|
|
145
|
+
/* @__PURE__ */ T("option", {
|
|
145
146
|
value: "30d",
|
|
146
|
-
children:
|
|
147
|
+
children: O("devportal.revenue.range.30d", "Last 30 days")
|
|
147
148
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ T("option", {
|
|
149
150
|
value: "90d",
|
|
150
|
-
children:
|
|
151
|
+
children: O("devportal.revenue.range.90d", "Last 90 days")
|
|
151
152
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ T("option", {
|
|
153
154
|
value: "12m",
|
|
154
|
-
children:
|
|
155
|
+
children: O("devportal.revenue.range.12m", "Last 12 months")
|
|
155
156
|
})
|
|
156
157
|
]
|
|
157
|
-
})
|
|
158
|
+
})
|
|
158
159
|
}),
|
|
159
|
-
children: [
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
|
|
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__ */
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
/* @__PURE__ */ T(S, {
|
|
167
|
+
size: 20,
|
|
168
|
+
className: "text-accent-blue flex-shrink-0 mt-0.5"
|
|
172
169
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
className: "
|
|
175
|
-
children:
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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__ */
|
|
226
|
-
className: "
|
|
227
|
-
children:
|
|
228
|
-
|
|
229
|
-
|
|
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__ */
|
|
489
|
+
children: /* @__PURE__ */ T(u, {
|
|
232
490
|
width: "100%",
|
|
233
|
-
height:
|
|
234
|
-
children: /* @__PURE__ */
|
|
491
|
+
height: 280,
|
|
492
|
+
children: /* @__PURE__ */ E(ce, {
|
|
235
493
|
data: $,
|
|
236
494
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ T(d, {
|
|
238
496
|
strokeDasharray: "3 3",
|
|
239
497
|
stroke: "var(--color-chart-grid)"
|
|
240
498
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ T(p, {
|
|
242
500
|
dataKey: "date",
|
|
243
501
|
stroke: "var(--color-chart-axis)",
|
|
244
502
|
fontSize: 12
|
|
245
503
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ T(m, {
|
|
247
505
|
stroke: "var(--color-chart-axis)",
|
|
248
506
|
fontSize: 12
|
|
249
507
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
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__ */
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
}),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
|
|
358
|
-
|
|
359
|
-
|
|
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
|
-
]
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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 {
|
|
609
|
+
export { O as RevenueDashboardPage };
|
|
460
610
|
|
|
461
611
|
//# sourceMappingURL=RevenueDashboardPage.js.map
|