@burdenoff/microfe-devportal 2026.611.1 → 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 +109 -422
- 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 +528 -322
- 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/devportal/types/index.js.map +1 -1
- package/dist/generated/global-operations.js +99 -59
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,66 +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
|
-
import { Tooltip as
|
|
10
|
-
import { ResponsiveContainer as
|
|
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
|
|
11
|
+
import { Tooltip as l } from "../../node_modules/recharts/es6/component/Tooltip.js";
|
|
12
|
+
import { ResponsiveContainer as u } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
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
|
-
|
|
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);
|
|
59
|
+
try {
|
|
60
|
+
let e = (await _e({ variables: { input: {
|
|
61
|
+
name: K?.name ?? k,
|
|
62
|
+
email: he?.email ?? ""
|
|
63
|
+
} } })).data?.createBillingAccount?.id;
|
|
64
|
+
e && await F({
|
|
65
|
+
variables: {
|
|
66
|
+
organizationId: k,
|
|
67
|
+
billingAccountId: e
|
|
68
|
+
},
|
|
69
|
+
refetchQueries: ["GetMyOrganizations"]
|
|
70
|
+
});
|
|
71
|
+
} catch (e) {
|
|
72
|
+
P(e instanceof Error ? e.message : "Failed to link billing account");
|
|
73
|
+
} finally {
|
|
74
|
+
M(!1), L(!1);
|
|
55
75
|
}
|
|
56
|
-
X.length === 1 && z(X[0]?.id ?? "");
|
|
57
76
|
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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) => ({
|
|
64
95
|
date: new Date(e.date).toLocaleDateString(void 0, {
|
|
65
96
|
month: "short",
|
|
66
97
|
day: "numeric"
|
|
@@ -71,335 +102,510 @@ var N = {
|
|
|
71
102
|
refunds: e.refunds,
|
|
72
103
|
salesCount: e.salesCount
|
|
73
104
|
}));
|
|
74
|
-
return
|
|
75
|
-
title:
|
|
76
|
-
description:
|
|
77
|
-
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", {
|
|
78
109
|
className: "flex items-center justify-center py-16 text-muted-foreground",
|
|
79
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ T(C, { className: "h-8 w-8 animate-spin" })
|
|
80
111
|
})
|
|
81
|
-
}) :
|
|
82
|
-
title:
|
|
83
|
-
description:
|
|
84
|
-
children: /* @__PURE__ */
|
|
85
|
-
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(_, {
|
|
86
117
|
size: 32,
|
|
87
118
|
className: "text-status-error-text"
|
|
88
119
|
}),
|
|
89
|
-
title:
|
|
90
|
-
description:
|
|
120
|
+
title: O("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
|
|
121
|
+
description: r(U)
|
|
91
122
|
})
|
|
92
|
-
}) :
|
|
93
|
-
title:
|
|
94
|
-
description:
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
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(_, {
|
|
97
128
|
size: 32,
|
|
98
129
|
className: "text-status-error-text"
|
|
99
130
|
}),
|
|
100
|
-
title:
|
|
101
|
-
description:
|
|
131
|
+
title: O("devportal.revenue.errorLoadData", "Unable to load revenue data"),
|
|
132
|
+
description: r(G)
|
|
102
133
|
})
|
|
103
|
-
}) : /* @__PURE__ */
|
|
104
|
-
title:
|
|
105
|
-
description:
|
|
106
|
-
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", {
|
|
107
138
|
className: "flex flex-wrap gap-2",
|
|
108
|
-
children:
|
|
109
|
-
value:
|
|
110
|
-
onChange: (e) =>
|
|
111
|
-
"aria-label":
|
|
112
|
-
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", {
|
|
114
|
-
value: e.id,
|
|
115
|
-
children: e.name
|
|
116
|
-
}, 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"),
|
|
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"),
|
|
121
143
|
className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
|
|
122
144
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ T("option", {
|
|
124
146
|
value: "30d",
|
|
125
|
-
children:
|
|
147
|
+
children: O("devportal.revenue.range.30d", "Last 30 days")
|
|
126
148
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ T("option", {
|
|
128
150
|
value: "90d",
|
|
129
|
-
children:
|
|
151
|
+
children: O("devportal.revenue.range.90d", "Last 90 days")
|
|
130
152
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ T("option", {
|
|
132
154
|
value: "12m",
|
|
133
|
-
children:
|
|
155
|
+
children: O("devportal.revenue.range.12m", "Last 12 months")
|
|
134
156
|
})
|
|
135
157
|
]
|
|
136
|
-
})
|
|
158
|
+
})
|
|
137
159
|
}),
|
|
138
|
-
children:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ T(S, {
|
|
167
|
+
size: 20,
|
|
168
|
+
className: "text-accent-blue flex-shrink-0 mt-0.5"
|
|
169
|
+
}),
|
|
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
|
+
]
|
|
186
|
+
}),
|
|
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")]
|
|
196
|
+
})
|
|
197
|
+
]
|
|
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
|
+
})]
|
|
168
265
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
className: "
|
|
171
|
-
children: [/* @__PURE__ */
|
|
172
|
-
|
|
173
|
-
children:
|
|
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
|
+
})]
|
|
364
|
+
}),
|
|
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", {
|
|
174
488
|
className: "rounded-lg border bg-card p-4",
|
|
175
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ T(u, {
|
|
176
490
|
width: "100%",
|
|
177
|
-
height:
|
|
178
|
-
children: /* @__PURE__ */
|
|
491
|
+
height: 280,
|
|
492
|
+
children: /* @__PURE__ */ E(ce, {
|
|
179
493
|
data: $,
|
|
180
494
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ T(d, {
|
|
182
496
|
strokeDasharray: "3 3",
|
|
183
497
|
stroke: "var(--color-chart-grid)"
|
|
184
498
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ T(p, {
|
|
186
500
|
dataKey: "date",
|
|
187
501
|
stroke: "var(--color-chart-axis)",
|
|
188
502
|
fontSize: 12
|
|
189
503
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ T(m, {
|
|
191
505
|
stroke: "var(--color-chart-axis)",
|
|
192
506
|
fontSize: 12
|
|
193
507
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ T(l, { contentStyle: {
|
|
195
509
|
backgroundColor: "var(--color-card)",
|
|
196
510
|
border: "1px solid var(--color-border-default)",
|
|
197
511
|
borderRadius: 12
|
|
198
512
|
} }),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
dataKey: "netRevenue",
|
|
209
|
-
stroke: N.secondary,
|
|
210
|
-
strokeWidth: 2,
|
|
211
|
-
dot: !1
|
|
513
|
+
/* @__PURE__ */ T(oe, {
|
|
514
|
+
dataKey: "salesCount",
|
|
515
|
+
fill: D.tertiary,
|
|
516
|
+
radius: [
|
|
517
|
+
6,
|
|
518
|
+
6,
|
|
519
|
+
0,
|
|
520
|
+
0
|
|
521
|
+
]
|
|
212
522
|
})
|
|
213
523
|
]
|
|
214
524
|
})
|
|
215
525
|
})
|
|
216
526
|
})
|
|
217
|
-
}),
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
})
|
|
248
|
-
}
|
|
249
|
-
})
|
|
250
|
-
}, 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.")
|
|
255
|
-
})
|
|
256
|
-
})]
|
|
257
|
-
}),
|
|
258
|
-
/* @__PURE__ */ j(n, {
|
|
259
|
-
title: F("devportal.revenue.salesVolume", "Sales volume"),
|
|
260
|
-
children: /* @__PURE__ */ j("div", {
|
|
261
|
-
className: "rounded-lg border bg-card p-4",
|
|
262
|
-
children: /* @__PURE__ */ j(d, {
|
|
263
|
-
width: "100%",
|
|
264
|
-
height: 280,
|
|
265
|
-
children: /* @__PURE__ */ M(v, {
|
|
266
|
-
data: $,
|
|
267
|
-
children: [
|
|
268
|
-
/* @__PURE__ */ j(p, {
|
|
269
|
-
strokeDasharray: "3 3",
|
|
270
|
-
stroke: "var(--color-chart-grid)"
|
|
271
|
-
}),
|
|
272
|
-
/* @__PURE__ */ j(h, {
|
|
273
|
-
dataKey: "date",
|
|
274
|
-
stroke: "var(--color-chart-axis)",
|
|
275
|
-
fontSize: 12
|
|
276
|
-
}),
|
|
277
|
-
/* @__PURE__ */ j(g, {
|
|
278
|
-
stroke: "var(--color-chart-axis)",
|
|
279
|
-
fontSize: 12
|
|
280
|
-
}),
|
|
281
|
-
/* @__PURE__ */ j(u, { contentStyle: {
|
|
282
|
-
backgroundColor: "var(--color-card)",
|
|
283
|
-
border: "1px solid var(--color-border-default)",
|
|
284
|
-
borderRadius: 12
|
|
285
|
-
} }),
|
|
286
|
-
/* @__PURE__ */ j(f, {
|
|
287
|
-
dataKey: "salesCount",
|
|
288
|
-
fill: N.tertiary,
|
|
289
|
-
radius: [
|
|
290
|
-
6,
|
|
291
|
-
6,
|
|
292
|
-
0,
|
|
293
|
-
0
|
|
294
|
-
]
|
|
295
|
-
})
|
|
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
|
+
}
|
|
296
559
|
]
|
|
297
560
|
})
|
|
298
|
-
})
|
|
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
|
+
})]
|
|
299
588
|
})
|
|
300
|
-
}),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
title: F("devportal.revenue.recentSales", "Recent sales"),
|
|
305
|
-
children: /* @__PURE__ */ j(o, {
|
|
306
|
-
data: ne,
|
|
307
|
-
keyField: "id",
|
|
308
|
-
columns: [
|
|
309
|
-
{
|
|
310
|
-
key: "application",
|
|
311
|
-
header: F("devportal.revenue.application", "Application"),
|
|
312
|
-
render: (e) => e.application?.name || e.planName || F("devportal.common.unknown", "Unknown")
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
key: "grossAmount",
|
|
316
|
-
header: F("devportal.revenue.gross", "Gross"),
|
|
317
|
-
render: (e) => `$${e.grossAmount.toLocaleString()}`
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
key: "netAmount",
|
|
321
|
-
header: F("devportal.revenue.net", "Net"),
|
|
322
|
-
render: (e) => `$${e.netAmount.toLocaleString()}`
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
key: "status",
|
|
326
|
-
header: F("devportal.revenue.status", "Status"),
|
|
327
|
-
render: (e) => /* @__PURE__ */ j(a, {
|
|
328
|
-
status: e.status,
|
|
329
|
-
type: "app"
|
|
330
|
-
})
|
|
331
|
-
}
|
|
332
|
-
]
|
|
333
|
-
})
|
|
334
|
-
}), /* @__PURE__ */ j(n, {
|
|
335
|
-
title: F("devportal.revenue.payoutHistory", "Payout history"),
|
|
336
|
-
children: /* @__PURE__ */ j(o, {
|
|
337
|
-
data: re,
|
|
338
|
-
keyField: "id",
|
|
339
|
-
columns: [
|
|
340
|
-
{
|
|
341
|
-
key: "periodLabel",
|
|
342
|
-
header: F("devportal.revenue.period", "Period"),
|
|
343
|
-
render: (e) => e.periodLabel
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
key: "netAmount",
|
|
347
|
-
header: F("devportal.revenue.netPayout", "Net payout"),
|
|
348
|
-
render: (e) => `$${e.netAmount.toLocaleString()}`
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
key: "status",
|
|
352
|
-
header: F("devportal.revenue.status", "Status"),
|
|
353
|
-
render: (e) => /* @__PURE__ */ j(a, {
|
|
354
|
-
status: e.status,
|
|
355
|
-
type: "app"
|
|
356
|
-
})
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
})
|
|
360
|
-
})]
|
|
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.")
|
|
361
593
|
})
|
|
362
|
-
]
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
type: "button",
|
|
374
|
-
onClick: () => z(e.id),
|
|
375
|
-
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", {
|
|
377
|
-
className: "flex items-center gap-2",
|
|
378
|
-
children: [/* @__PURE__ */ j(T, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ j("span", {
|
|
379
|
-
className: "font-medium",
|
|
380
|
-
children: e.name
|
|
381
|
-
})]
|
|
382
|
-
}), /* @__PURE__ */ M("p", {
|
|
383
|
-
className: "mt-1 text-sm text-muted-foreground",
|
|
384
|
-
children: [
|
|
385
|
-
e.totalApps ?? 0,
|
|
386
|
-
" ",
|
|
387
|
-
F("devportal.revenue.apps", "apps"),
|
|
388
|
-
" · $",
|
|
389
|
-
e.totalRevenue?.toLocaleString() ?? 0,
|
|
390
|
-
" ",
|
|
391
|
-
F("devportal.revenue.revenue", "revenue")
|
|
392
|
-
]
|
|
393
|
-
})] })
|
|
394
|
-
}, 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.")
|
|
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.")
|
|
399
605
|
})
|
|
400
606
|
});
|
|
401
607
|
};
|
|
402
608
|
//#endregion
|
|
403
|
-
export {
|
|
609
|
+
export { O as RevenueDashboardPage };
|
|
404
610
|
|
|
405
611
|
//# sourceMappingURL=RevenueDashboardPage.js.map
|