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