@burdenoff/microfe-devportal 2026.915.12 → 2026.916.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/DevportalRoutes.d.ts.map +1 -1
- package/dist/devportal/DevportalRoutes.js +131 -126
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +516 -527
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +79 -93
- package/dist/devportal/pages/OrganizationsPage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +196 -203
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +120 -96
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.js +100 -106
- package/dist/devportal/pages/SellerOrdersPage.js.map +1 -1
- package/dist/devportal/utils/currency.d.ts +2 -0
- package/dist/devportal/utils/currency.d.ts.map +1 -0
- package/dist/devportal/utils/currency.js +12 -0
- package/dist/devportal/utils/currency.js.map +1 -0
- package/dist/generated/global-operations.js +51 -44
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,14 +19,15 @@ import { XAxis as pe } from "../../node_modules/recharts/es6/cartesian/XAxis.js"
|
|
|
19
19
|
import { YAxis as me } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
20
20
|
import { LineChart as he } from "../../node_modules/recharts/es6/chart/LineChart.js";
|
|
21
21
|
import { BarChart as ge } from "../../node_modules/recharts/es6/chart/BarChart.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
22
|
+
import { formatCurrency as d } from "../utils/currency.js";
|
|
23
|
+
import { DevPortalPaymentMethodType as f } from "../../generated/global-types.js";
|
|
24
|
+
import { useMemo as p, useState as m } from "react";
|
|
25
|
+
import { AlertCircle as _e, ArrowDownToLine as ve, Banknote as ye, Building2 as be, Check as h, CreditCard as xe, DollarSign as Se, Link2 as g, Loader2 as _, Send as Ce, Wallet as we } from "lucide-react";
|
|
25
26
|
import { useSearchParams as Te } from "react-router";
|
|
26
|
-
import { Fragment as Ee, jsx as
|
|
27
|
-
import { EmphasisPanel as De, GlassCard as
|
|
27
|
+
import { Fragment as Ee, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
28
|
+
import { EmphasisPanel as De, GlassCard as b } from "@burdenoff/fe-libs/ui";
|
|
28
29
|
//#region src/devportal/pages/RevenueDashboardPage.tsx
|
|
29
|
-
var
|
|
30
|
+
var x = 100, S = {
|
|
30
31
|
primary: "var(--color-chart-1)",
|
|
31
32
|
secondary: "var(--color-chart-2)",
|
|
32
33
|
tertiary: "var(--color-chart-4)"
|
|
@@ -34,23 +35,15 @@ var b = 100, x = {
|
|
|
34
35
|
"30d": 30,
|
|
35
36
|
"90d": 90,
|
|
36
37
|
"12m": 365
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return new Intl.NumberFormat("en-US", {
|
|
40
|
-
style: "currency",
|
|
41
|
-
currency: t || "USD",
|
|
42
|
-
minimumFractionDigits: 2
|
|
43
|
-
}).format(e);
|
|
44
|
-
}
|
|
45
|
-
var C = () => {
|
|
46
|
-
let C = t(), { activeOrgId: ke, activePhysicalOrgId: Ae, tenantId: je } = e(), w = ee() ? Ae : ke, [T, Me] = p("90d"), [E, Ne] = p(!1), [D, O] = p(null), [Pe] = oe(), [k, A] = p(!1), [j, M] = p(null), [Fe] = Te(), N = f(() => /* @__PURE__ */ new Date(), []), [Ie, P] = p(!1), [Le, F] = p(null), [I, L] = p(null), [Re, R] = p(!1), [z, ze] = p(d.BankAccount), [Be, Ve] = p(""), [B, He] = p(""), [Ue, We] = p(""), [V, Ge] = p(""), [Ke, H] = p(null), { data: qe, loading: Je } = ie({
|
|
38
|
+
}, C = () => {
|
|
39
|
+
let C = t(), { activeOrgId: ke, activePhysicalOrgId: Ae, tenantId: je } = e(), w = ee() ? Ae : ke, [T, Me] = m("90d"), [E, Ne] = m(!1), [D, O] = m(null), [Pe] = oe(), [k, A] = m(!1), [j, M] = m(null), [Fe] = Te(), N = p(() => /* @__PURE__ */ new Date(), []), [Ie, P] = m(!1), [Le, F] = m(null), [I, L] = m(null), [Re, R] = m(!1), [z, ze] = m(f.BankAccount), [Be, Ve] = m(""), [B, He] = m(""), [Ue, We] = m(""), [V, Ge] = m(""), [Ke, H] = m(null), { data: qe, loading: Je } = ie({
|
|
47
40
|
variables: { organizationId: w ?? "" },
|
|
48
41
|
skip: !w,
|
|
49
42
|
fetchPolicy: "cache-and-network"
|
|
50
43
|
}), [Ye, { loading: Xe }] = te(), [Ze, { loading: Qe }] = se(), { data: $e, loading: U } = ne({
|
|
51
44
|
fetchPolicy: "cache-and-network",
|
|
52
45
|
context: { headers: { "x-org-id": je ?? "" } }
|
|
53
|
-
}), et =
|
|
46
|
+
}), et = p(() => {
|
|
54
47
|
let e = new Date(N);
|
|
55
48
|
return e.setDate(e.getDate() - Oe[T]), e.toISOString();
|
|
56
49
|
}, [N, T]), { data: W, loading: tt, error: nt } = re({ fetchPolicy: "cache-and-network" }), { data: G, loading: rt, error: it } = ae({
|
|
@@ -66,7 +59,7 @@ var C = () => {
|
|
|
66
59
|
},
|
|
67
60
|
skip: !w,
|
|
68
61
|
fetchPolicy: "cache-and-network"
|
|
69
|
-
}), K =
|
|
62
|
+
}), K = p(() => W?.myDeveloperOrganizations?.map((e) => e) ?? [], [W?.myDeveloperOrganizations]).find((e) => e.id === w), q = $e?.getBillingAccountsByOrg ?? [], J = q.find((e) => e.id === K?.billingAccountId) ?? null, at = () => {
|
|
70
63
|
M(K?.billingAccountId ?? q.find((e) => e.isDefault)?.id ?? q[0]?.id ?? null), A(!0);
|
|
71
64
|
}, Y = async () => {
|
|
72
65
|
if (!(!w || !j)) {
|
|
@@ -90,7 +83,7 @@ var C = () => {
|
|
|
90
83
|
}, st = async () => {
|
|
91
84
|
if (!w) return;
|
|
92
85
|
H(null);
|
|
93
|
-
let e = z ===
|
|
86
|
+
let e = z === f.Paypal, t = e ? { email: V } : {
|
|
94
87
|
accountNumber: B,
|
|
95
88
|
routingNumber: Ue
|
|
96
89
|
};
|
|
@@ -126,7 +119,7 @@ var C = () => {
|
|
|
126
119
|
F(e instanceof Error ? e.message : "Failed to request withdrawal");
|
|
127
120
|
}
|
|
128
121
|
}
|
|
129
|
-
}, Z = G?.developerOrgRevenueSummary, Q = (Z?.pendingBalance ?? 0) >=
|
|
122
|
+
}, Z = G?.developerOrgRevenueSummary, Q = (Z?.pendingBalance ?? 0) >= x, lt = [...G?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), ut = G?.developerOrgSales?.edges?.map((e) => e.node) ?? [], dt = G?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = lt.map((e) => ({
|
|
130
123
|
date: new Date(e.date).toLocaleDateString(void 0, {
|
|
131
124
|
month: "short",
|
|
132
125
|
day: "numeric"
|
|
@@ -137,56 +130,56 @@ var C = () => {
|
|
|
137
130
|
refunds: e.refunds,
|
|
138
131
|
salesCount: e.salesCount
|
|
139
132
|
}));
|
|
140
|
-
return tt && !W ? /* @__PURE__ */
|
|
133
|
+
return tt && !W ? /* @__PURE__ */ v(i, {
|
|
141
134
|
title: C("devportal.revenue.title", "Revenue"),
|
|
142
135
|
description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
143
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ v("div", {
|
|
144
137
|
className: "flex items-center justify-center py-16 text-text-secondary",
|
|
145
|
-
children: /* @__PURE__ */ _
|
|
138
|
+
children: /* @__PURE__ */ v(_, { className: "h-8 w-8 animate-spin" })
|
|
146
139
|
})
|
|
147
|
-
}) : nt ? /* @__PURE__ */
|
|
140
|
+
}) : nt ? /* @__PURE__ */ v(i, {
|
|
148
141
|
title: C("devportal.revenue.title", "Revenue"),
|
|
149
142
|
description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
icon: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ v(r, {
|
|
144
|
+
icon: /* @__PURE__ */ v(_e, {
|
|
152
145
|
size: 32,
|
|
153
146
|
className: "text-status-error-text"
|
|
154
147
|
}),
|
|
155
148
|
title: C("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
|
|
156
149
|
description: ce(nt)
|
|
157
150
|
})
|
|
158
|
-
}) : w ? it ? /* @__PURE__ */
|
|
151
|
+
}) : w ? it ? /* @__PURE__ */ v(i, {
|
|
159
152
|
title: C("devportal.revenue.title", "Revenue"),
|
|
160
153
|
description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
161
|
-
children: /* @__PURE__ */
|
|
162
|
-
icon: /* @__PURE__ */
|
|
154
|
+
children: /* @__PURE__ */ v(r, {
|
|
155
|
+
icon: /* @__PURE__ */ v(_e, {
|
|
163
156
|
size: 32,
|
|
164
157
|
className: "text-status-error-text"
|
|
165
158
|
}),
|
|
166
159
|
title: C("devportal.revenue.errorLoadData", "Unable to load revenue data"),
|
|
167
160
|
description: ce(it)
|
|
168
161
|
})
|
|
169
|
-
}) : /* @__PURE__ */
|
|
162
|
+
}) : /* @__PURE__ */ y(i, {
|
|
170
163
|
title: C("devportal.revenue.title", "Revenue"),
|
|
171
164
|
description: K ? `${C("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${K.name}` : C("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
|
|
172
165
|
purpose: C("devportal.revenue.purpose", "Revenue tracks the money your paid apps earn — gross sales, platform fees, and what gets paid out to your organization. Link a billing account, then use this to reconcile payouts and watch growth across time ranges."),
|
|
173
|
-
actions: /* @__PURE__ */
|
|
166
|
+
actions: /* @__PURE__ */ v("div", {
|
|
174
167
|
className: "flex flex-wrap gap-2",
|
|
175
|
-
children: /* @__PURE__ */
|
|
168
|
+
children: /* @__PURE__ */ y("select", {
|
|
176
169
|
value: T,
|
|
177
170
|
onChange: (e) => Me(e.target.value),
|
|
178
171
|
"aria-label": C("devportal.revenue.selectRangeAria", "Select time range"),
|
|
179
172
|
className: "rounded-md border bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
|
|
180
173
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ v("option", {
|
|
182
175
|
value: "30d",
|
|
183
176
|
children: C("devportal.revenue.range.30d", "Last 30 days")
|
|
184
177
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ v("option", {
|
|
186
179
|
value: "90d",
|
|
187
180
|
children: C("devportal.revenue.range.90d", "Last 90 days")
|
|
188
181
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ v("option", {
|
|
190
183
|
value: "12m",
|
|
191
184
|
children: C("devportal.revenue.range.12m", "Last 12 months")
|
|
192
185
|
})
|
|
@@ -194,121 +187,121 @@ var C = () => {
|
|
|
194
187
|
})
|
|
195
188
|
}),
|
|
196
189
|
children: [
|
|
197
|
-
K && !K.billingAccountId && /* @__PURE__ */
|
|
190
|
+
K && !K.billingAccountId && /* @__PURE__ */ y("div", {
|
|
198
191
|
className: "mb-6 rounded-card border border-border-seam bg-status-info-bg-subtle p-4 flex flex-col gap-3",
|
|
199
192
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ y("div", {
|
|
201
194
|
className: "flex items-start gap-3",
|
|
202
195
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ v(g, {
|
|
204
197
|
size: 20,
|
|
205
198
|
className: "text-accent-blue flex-shrink-0 mt-0.5"
|
|
206
199
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ y("div", {
|
|
208
201
|
className: "flex-1 min-w-0",
|
|
209
202
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ v("p", {
|
|
211
204
|
className: "text-sm font-medium text-status-info-text",
|
|
212
205
|
children: C("devportal.revenue.billingNotLinkedTitle", "Link a billing account to receive store revenue")
|
|
213
206
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ v("p", {
|
|
215
208
|
className: "mt-1 text-sm text-status-info-text",
|
|
216
209
|
children: C("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.")
|
|
217
210
|
}),
|
|
218
|
-
D && /* @__PURE__ */
|
|
211
|
+
D && /* @__PURE__ */ v("p", {
|
|
219
212
|
className: "mt-2 text-sm text-status-error-text",
|
|
220
213
|
children: D
|
|
221
214
|
})
|
|
222
215
|
]
|
|
223
216
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ y("button", {
|
|
225
218
|
type: "button",
|
|
226
219
|
onClick: at,
|
|
227
220
|
disabled: E || U,
|
|
228
221
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex-shrink-0",
|
|
229
|
-
children: [E || U ? /* @__PURE__ */ _
|
|
222
|
+
children: [E || U ? /* @__PURE__ */ v(_, {
|
|
230
223
|
size: 14,
|
|
231
224
|
className: "animate-spin"
|
|
232
|
-
}) : /* @__PURE__ */
|
|
225
|
+
}) : /* @__PURE__ */ v(g, { size: 14 }), E ? C("devportal.revenue.linking", "Linking...") : C("devportal.revenue.linkBillingAccount", "Link Billing Account")]
|
|
233
226
|
})
|
|
234
227
|
]
|
|
235
228
|
}),
|
|
236
|
-
k && q.length === 0 && /* @__PURE__ */
|
|
229
|
+
k && q.length === 0 && /* @__PURE__ */ v("div", {
|
|
237
230
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 ml-8 text-sm text-text-secondary",
|
|
238
231
|
children: C("devportal.revenue.noBillingAccounts", "You don't have any billing accounts yet. Create one from your account billing settings first.")
|
|
239
232
|
}),
|
|
240
|
-
k && q.length > 0 && /* @__PURE__ */
|
|
233
|
+
k && q.length > 0 && /* @__PURE__ */ y("div", {
|
|
241
234
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 ml-8 space-y-3",
|
|
242
235
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ v("p", {
|
|
244
237
|
className: "text-sm font-medium",
|
|
245
238
|
children: C("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
|
|
246
239
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ v("div", {
|
|
248
241
|
className: "space-y-2",
|
|
249
|
-
children: q.map((e) => /* @__PURE__ */
|
|
242
|
+
children: q.map((e) => /* @__PURE__ */ y("button", {
|
|
250
243
|
type: "button",
|
|
251
244
|
onClick: () => M(e.id ?? null),
|
|
252
245
|
className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", j === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
|
|
253
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ v(h, {
|
|
254
247
|
size: 14,
|
|
255
248
|
className: n("flex-shrink-0", j === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
256
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ y("div", {
|
|
257
250
|
className: "flex-1 min-w-0",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ v("p", {
|
|
259
252
|
className: "font-medium truncate",
|
|
260
253
|
children: e.name
|
|
261
|
-
}), e.isDefault && /* @__PURE__ */
|
|
254
|
+
}), e.isDefault && /* @__PURE__ */ v("p", {
|
|
262
255
|
className: "text-xs text-text-secondary",
|
|
263
256
|
children: C("devportal.revenue.defaultAccount", "Default")
|
|
264
257
|
})]
|
|
265
258
|
})]
|
|
266
259
|
}, e.id))
|
|
267
260
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ y("div", {
|
|
269
262
|
className: "flex items-center justify-end gap-2 pt-1",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ v("button", {
|
|
271
264
|
type: "button",
|
|
272
265
|
onClick: () => {
|
|
273
266
|
A(!1), O(null);
|
|
274
267
|
},
|
|
275
268
|
className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
|
|
276
269
|
children: C("devportal.cancel", "Cancel")
|
|
277
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ y("button", {
|
|
278
271
|
type: "button",
|
|
279
272
|
disabled: E || !j,
|
|
280
273
|
onClick: () => void Y(),
|
|
281
274
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
282
|
-
children: [E ? /* @__PURE__ */ _
|
|
275
|
+
children: [E ? /* @__PURE__ */ v(_, {
|
|
283
276
|
size: 13,
|
|
284
277
|
className: "animate-spin"
|
|
285
|
-
}) : /* @__PURE__ */
|
|
278
|
+
}) : /* @__PURE__ */ v(g, { size: 13 }), C("devportal.revenue.confirm", "Confirm")]
|
|
286
279
|
})]
|
|
287
280
|
})
|
|
288
281
|
]
|
|
289
282
|
})
|
|
290
283
|
]
|
|
291
284
|
}),
|
|
292
|
-
K?.billingAccountId && /* @__PURE__ */
|
|
285
|
+
K?.billingAccountId && /* @__PURE__ */ y("div", {
|
|
293
286
|
className: "mb-6 rounded-lg border border-border-subtle bg-bg-surface p-3 flex flex-col gap-3",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ y("div", {
|
|
295
288
|
className: "flex items-center gap-3",
|
|
296
289
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ v(xe, {
|
|
298
291
|
size: 16,
|
|
299
292
|
className: "text-text-secondary flex-shrink-0"
|
|
300
293
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ y("div", {
|
|
302
295
|
className: "flex-1 min-w-0",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ v("p", {
|
|
304
297
|
className: "text-sm font-medium truncate",
|
|
305
298
|
children: J?.name ?? C("devportal.revenue.billingAccount", "Billing account")
|
|
306
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ v("p", {
|
|
307
300
|
className: "text-xs text-text-secondary truncate",
|
|
308
301
|
children: J ? `${J.currency}${J.email ? ` · ${J.email}` : ""}` : K.billingAccountId
|
|
309
302
|
})]
|
|
310
303
|
}),
|
|
311
|
-
!k && /* @__PURE__ */
|
|
304
|
+
!k && /* @__PURE__ */ v("button", {
|
|
312
305
|
type: "button",
|
|
313
306
|
onClick: at,
|
|
314
307
|
disabled: U,
|
|
@@ -316,194 +309,194 @@ var C = () => {
|
|
|
316
309
|
children: C("devportal.revenue.changeBillingAccount", "Change")
|
|
317
310
|
})
|
|
318
311
|
]
|
|
319
|
-
}), k && q.length > 0 && /* @__PURE__ */
|
|
312
|
+
}), k && q.length > 0 && /* @__PURE__ */ y("div", {
|
|
320
313
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 space-y-3",
|
|
321
314
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ v("p", {
|
|
323
316
|
className: "text-sm font-medium",
|
|
324
317
|
children: C("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
|
|
325
318
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ v("div", {
|
|
327
320
|
className: "space-y-2",
|
|
328
|
-
children: q.map((e) => /* @__PURE__ */
|
|
321
|
+
children: q.map((e) => /* @__PURE__ */ y("button", {
|
|
329
322
|
type: "button",
|
|
330
323
|
onClick: () => M(e.id ?? null),
|
|
331
324
|
className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", j === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
|
|
332
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ v(h, {
|
|
333
326
|
size: 14,
|
|
334
327
|
className: n("flex-shrink-0", j === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
335
|
-
}), /* @__PURE__ */
|
|
328
|
+
}), /* @__PURE__ */ y("div", {
|
|
336
329
|
className: "flex-1 min-w-0",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ v("p", {
|
|
338
331
|
className: "font-medium truncate",
|
|
339
332
|
children: e.name
|
|
340
|
-
}), e.isDefault && /* @__PURE__ */
|
|
333
|
+
}), e.isDefault && /* @__PURE__ */ v("p", {
|
|
341
334
|
className: "text-xs text-text-secondary",
|
|
342
335
|
children: C("devportal.revenue.defaultAccount", "Default")
|
|
343
336
|
})]
|
|
344
337
|
})]
|
|
345
338
|
}, e.id))
|
|
346
339
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ y("div", {
|
|
348
341
|
className: "flex items-center justify-end gap-2 pt-1",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ v("button", {
|
|
350
343
|
type: "button",
|
|
351
344
|
onClick: () => {
|
|
352
345
|
A(!1), O(null);
|
|
353
346
|
},
|
|
354
347
|
className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
|
|
355
348
|
children: C("devportal.cancel", "Cancel")
|
|
356
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ y("button", {
|
|
357
350
|
type: "button",
|
|
358
351
|
disabled: E || !j,
|
|
359
352
|
onClick: () => void Y(),
|
|
360
353
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
361
|
-
children: [E ? /* @__PURE__ */ _
|
|
354
|
+
children: [E ? /* @__PURE__ */ v(_, {
|
|
362
355
|
size: 13,
|
|
363
356
|
className: "animate-spin"
|
|
364
|
-
}) : /* @__PURE__ */
|
|
357
|
+
}) : /* @__PURE__ */ v(g, { size: 13 }), C("devportal.revenue.confirm", "Confirm")]
|
|
365
358
|
})]
|
|
366
359
|
}),
|
|
367
|
-
D && /* @__PURE__ */
|
|
360
|
+
D && /* @__PURE__ */ v("p", {
|
|
368
361
|
className: "text-xs text-status-error-text",
|
|
369
362
|
children: D
|
|
370
363
|
})
|
|
371
364
|
]
|
|
372
365
|
})]
|
|
373
366
|
}),
|
|
374
|
-
K?.billingAccountId && Z && /* @__PURE__ */
|
|
367
|
+
K?.billingAccountId && Z && /* @__PURE__ */ y("div", {
|
|
375
368
|
className: "mb-6 rounded-lg border border-border-subtle bg-bg-surface p-3 flex flex-col gap-3",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ y("div", {
|
|
377
370
|
className: "flex items-center gap-3",
|
|
378
371
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ v(ye, {
|
|
380
373
|
size: 16,
|
|
381
374
|
className: "text-text-secondary flex-shrink-0"
|
|
382
375
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ y("div", {
|
|
384
377
|
className: "flex-1 min-w-0",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ v("p", {
|
|
386
379
|
className: "text-sm font-medium",
|
|
387
380
|
children: C("devportal.revenue.withdrawTitle", "Withdraw earned credits")
|
|
388
|
-
}), /* @__PURE__ */
|
|
381
|
+
}), /* @__PURE__ */ v("p", {
|
|
389
382
|
className: "text-xs text-text-secondary",
|
|
390
|
-
children: Q ? `${C("devportal.revenue.available", "Available")}: ${
|
|
383
|
+
children: Q ? `${C("devportal.revenue.available", "Available")}: ${d(Z.pendingBalance, Z.currency)}` : `${C("devportal.revenue.belowMinimum", "Minimum payout is")} $${x} — ${C("devportal.revenue.youHave", "you have")} ${d(Z.pendingBalance, Z.currency)} ${C("devportal.revenue.pending", "pending")}.`
|
|
391
384
|
})]
|
|
392
385
|
}),
|
|
393
|
-
!Ie && /* @__PURE__ */
|
|
386
|
+
!Ie && /* @__PURE__ */ y("button", {
|
|
394
387
|
type: "button",
|
|
395
388
|
onClick: ot,
|
|
396
389
|
disabled: !Q,
|
|
397
|
-
title: Q ? void 0 : C("devportal.revenue.belowMinimumHint", `Payouts require a pending balance of at least $${
|
|
390
|
+
title: Q ? void 0 : C("devportal.revenue.belowMinimumHint", `Payouts require a pending balance of at least $${x}.`),
|
|
398
391
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ v(Ce, { size: 14 }), C("devportal.revenue.requestWithdrawal", "Request Withdrawal")]
|
|
400
393
|
})
|
|
401
394
|
]
|
|
402
|
-
}), Ie && /* @__PURE__ */
|
|
395
|
+
}), Ie && /* @__PURE__ */ v("div", {
|
|
403
396
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 ml-8 space-y-3",
|
|
404
|
-
children: Je ? /* @__PURE__ */
|
|
397
|
+
children: Je ? /* @__PURE__ */ y("div", {
|
|
405
398
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
406
|
-
children: [/* @__PURE__ */ _
|
|
399
|
+
children: [/* @__PURE__ */ v(_, {
|
|
407
400
|
size: 14,
|
|
408
401
|
className: "animate-spin"
|
|
409
402
|
}), C("devportal.revenue.loadingMethods", "Loading payout methods...")]
|
|
410
|
-
}) : Re ? /* @__PURE__ */
|
|
403
|
+
}) : Re ? /* @__PURE__ */ y("div", {
|
|
411
404
|
className: "space-y-3",
|
|
412
405
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ v("p", {
|
|
414
407
|
className: "text-sm font-medium",
|
|
415
408
|
children: C("devportal.revenue.addPayoutMethod", "Add a payout method")
|
|
416
409
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ y("div", {
|
|
418
411
|
className: "grid grid-cols-2 gap-2",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ v("button", {
|
|
420
413
|
type: "button",
|
|
421
|
-
onClick: () => ze(
|
|
422
|
-
className: n("rounded-md border px-3 py-2 text-sm text-left transition-colors", z ===
|
|
414
|
+
onClick: () => ze(f.BankAccount),
|
|
415
|
+
className: n("rounded-md border px-3 py-2 text-sm text-left transition-colors", z === f.BankAccount ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-accent"),
|
|
423
416
|
children: C("devportal.revenue.bankAccount", "Bank Account")
|
|
424
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ v("button", {
|
|
425
418
|
type: "button",
|
|
426
|
-
onClick: () => ze(
|
|
427
|
-
className: n("rounded-md border px-3 py-2 text-sm text-left transition-colors", z ===
|
|
419
|
+
onClick: () => ze(f.Paypal),
|
|
420
|
+
className: n("rounded-md border px-3 py-2 text-sm text-left transition-colors", z === f.Paypal ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-accent"),
|
|
428
421
|
children: C("devportal.revenue.paypal", "PayPal")
|
|
429
422
|
})]
|
|
430
423
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ v("input", {
|
|
432
425
|
type: "text",
|
|
433
426
|
value: Be,
|
|
434
427
|
onChange: (e) => Ve(e.target.value),
|
|
435
428
|
placeholder: C("devportal.revenue.methodNamePlaceholder", "Label (e.g. \"Primary account\")"),
|
|
436
429
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
437
430
|
}),
|
|
438
|
-
z ===
|
|
431
|
+
z === f.Paypal ? /* @__PURE__ */ v("input", {
|
|
439
432
|
type: "email",
|
|
440
433
|
value: V,
|
|
441
434
|
onChange: (e) => Ge(e.target.value),
|
|
442
435
|
placeholder: C("devportal.revenue.paypalEmailPlaceholder", "PayPal email"),
|
|
443
436
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
444
|
-
}) : /* @__PURE__ */
|
|
437
|
+
}) : /* @__PURE__ */ y(Ee, { children: [/* @__PURE__ */ v("input", {
|
|
445
438
|
type: "text",
|
|
446
439
|
value: B,
|
|
447
440
|
onChange: (e) => He(e.target.value),
|
|
448
441
|
placeholder: C("devportal.revenue.accountNumberPlaceholder", "Account number"),
|
|
449
442
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
450
|
-
}), /* @__PURE__ */
|
|
443
|
+
}), /* @__PURE__ */ v("input", {
|
|
451
444
|
type: "text",
|
|
452
445
|
value: Ue,
|
|
453
446
|
onChange: (e) => We(e.target.value),
|
|
454
447
|
placeholder: C("devportal.revenue.routingNumberPlaceholder", "Routing number"),
|
|
455
448
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
456
449
|
})] }),
|
|
457
|
-
Ke && /* @__PURE__ */
|
|
450
|
+
Ke && /* @__PURE__ */ v("p", {
|
|
458
451
|
className: "text-xs text-status-error-text",
|
|
459
452
|
children: Ke
|
|
460
453
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ y("div", {
|
|
462
455
|
className: "flex items-center justify-end gap-2 pt-1",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
456
|
+
children: [/* @__PURE__ */ v("button", {
|
|
464
457
|
type: "button",
|
|
465
458
|
onClick: () => P(!1),
|
|
466
459
|
className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
|
|
467
460
|
children: C("devportal.cancel", "Cancel")
|
|
468
|
-
}), /* @__PURE__ */
|
|
461
|
+
}), /* @__PURE__ */ y("button", {
|
|
469
462
|
type: "button",
|
|
470
|
-
disabled: Xe || (z ===
|
|
463
|
+
disabled: Xe || (z === f.Paypal ? !V : !B),
|
|
471
464
|
onClick: () => void st(),
|
|
472
465
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
473
|
-
children: [Xe ? /* @__PURE__ */ _
|
|
466
|
+
children: [Xe ? /* @__PURE__ */ v(_, {
|
|
474
467
|
size: 13,
|
|
475
468
|
className: "animate-spin"
|
|
476
|
-
}) : /* @__PURE__ */
|
|
469
|
+
}) : /* @__PURE__ */ v(h, { size: 13 }), C("devportal.revenue.saveMethod", "Save method")]
|
|
477
470
|
})]
|
|
478
471
|
})
|
|
479
472
|
]
|
|
480
|
-
}) : /* @__PURE__ */
|
|
473
|
+
}) : /* @__PURE__ */ y("div", {
|
|
481
474
|
className: "space-y-3",
|
|
482
475
|
children: [
|
|
483
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ v("p", {
|
|
484
477
|
className: "text-sm font-medium",
|
|
485
478
|
children: C("devportal.revenue.chooseMethod", "Choose where to send this payout")
|
|
486
479
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ y("div", {
|
|
488
481
|
className: "space-y-2",
|
|
489
|
-
children: [X.map((e) => /* @__PURE__ */
|
|
482
|
+
children: [X.map((e) => /* @__PURE__ */ y("button", {
|
|
490
483
|
type: "button",
|
|
491
484
|
onClick: () => L(e.id),
|
|
492
485
|
className: n("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", I === e.id ? "border-primary bg-action-primary-bg/5 text-text-primary" : "border-border-subtle hover:bg-accent text-text-primary"),
|
|
493
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ v(h, {
|
|
494
487
|
size: 14,
|
|
495
488
|
className: n("flex-shrink-0", I === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
496
|
-
}), /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ y("div", {
|
|
497
490
|
className: "flex-1 min-w-0",
|
|
498
|
-
children: [/* @__PURE__ */
|
|
491
|
+
children: [/* @__PURE__ */ v("p", {
|
|
499
492
|
className: "font-medium truncate",
|
|
500
493
|
children: e.displayName ?? e.name
|
|
501
|
-
}), e.isDefault && /* @__PURE__ */
|
|
494
|
+
}), e.isDefault && /* @__PURE__ */ v("p", {
|
|
502
495
|
className: "text-xs text-text-secondary",
|
|
503
496
|
children: C("devportal.revenue.defaultAccount", "Default")
|
|
504
497
|
})]
|
|
505
498
|
})]
|
|
506
|
-
}, e.id)), /* @__PURE__ */
|
|
499
|
+
}, e.id)), /* @__PURE__ */ y("button", {
|
|
507
500
|
type: "button",
|
|
508
501
|
onClick: () => R(!0),
|
|
509
502
|
className: "w-full rounded-md border border-dashed border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-accent transition-colors",
|
|
@@ -514,30 +507,30 @@ var C = () => {
|
|
|
514
507
|
]
|
|
515
508
|
})]
|
|
516
509
|
}),
|
|
517
|
-
Le && /* @__PURE__ */
|
|
510
|
+
Le && /* @__PURE__ */ v("p", {
|
|
518
511
|
className: "text-xs text-status-error-text",
|
|
519
512
|
children: Le
|
|
520
513
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ y("div", {
|
|
522
515
|
className: "flex items-center justify-end gap-2 pt-1",
|
|
523
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ v("button", {
|
|
524
517
|
type: "button",
|
|
525
518
|
onClick: () => P(!1),
|
|
526
519
|
className: "rounded-md px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-accent transition-colors",
|
|
527
520
|
children: C("devportal.cancel", "Cancel")
|
|
528
|
-
}), /* @__PURE__ */
|
|
521
|
+
}), /* @__PURE__ */ y("button", {
|
|
529
522
|
type: "button",
|
|
530
523
|
disabled: Qe || !I,
|
|
531
524
|
onClick: () => void ct(),
|
|
532
525
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
533
526
|
children: [
|
|
534
|
-
Qe ? /* @__PURE__ */ _
|
|
527
|
+
Qe ? /* @__PURE__ */ v(_, {
|
|
535
528
|
size: 13,
|
|
536
529
|
className: "animate-spin"
|
|
537
|
-
}) : /* @__PURE__ */
|
|
530
|
+
}) : /* @__PURE__ */ v(Ce, { size: 13 }),
|
|
538
531
|
C("devportal.revenue.confirmWithdrawal", "Request"),
|
|
539
532
|
" ",
|
|
540
|
-
|
|
533
|
+
d(Z.pendingBalance, Z.currency)
|
|
541
534
|
]
|
|
542
535
|
})]
|
|
543
536
|
})
|
|
@@ -545,173 +538,173 @@ var C = () => {
|
|
|
545
538
|
})
|
|
546
539
|
})]
|
|
547
540
|
}),
|
|
548
|
-
rt && !Z ? /* @__PURE__ */
|
|
541
|
+
rt && !Z ? /* @__PURE__ */ v("div", {
|
|
549
542
|
className: "flex items-center justify-center py-16 text-text-secondary",
|
|
550
|
-
children: /* @__PURE__ */ _
|
|
551
|
-
}) : Z ? /* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ v(_, { className: "h-8 w-8 animate-spin" })
|
|
544
|
+
}) : Z ? /* @__PURE__ */ y(Ee, { children: [
|
|
545
|
+
/* @__PURE__ */ v(De, {
|
|
553
546
|
className: "mb-6",
|
|
554
|
-
children: /* @__PURE__ */
|
|
547
|
+
children: /* @__PURE__ */ y(ue, {
|
|
555
548
|
columns: 4,
|
|
556
549
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ v(o, {
|
|
558
551
|
title: C("devportal.revenue.grossRevenue", "Gross Revenue"),
|
|
559
|
-
value:
|
|
560
|
-
icon: /* @__PURE__ */
|
|
552
|
+
value: d(Z.totalGrossRevenue, Z.currency),
|
|
553
|
+
icon: /* @__PURE__ */ v(Se, { size: 20 })
|
|
561
554
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ v(o, {
|
|
563
556
|
title: C("devportal.revenue.netRevenue", "Net Revenue"),
|
|
564
|
-
value:
|
|
565
|
-
icon: /* @__PURE__ */
|
|
557
|
+
value: d(Z.totalNetRevenue, Z.currency),
|
|
558
|
+
icon: /* @__PURE__ */ v(we, { size: 20 })
|
|
566
559
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ v(o, {
|
|
568
561
|
title: C("devportal.revenue.pendingBalance", "Pending Balance"),
|
|
569
|
-
value:
|
|
570
|
-
icon: /* @__PURE__ */
|
|
562
|
+
value: d(Z.pendingBalance, Z.currency),
|
|
563
|
+
icon: /* @__PURE__ */ v(xe, { size: 20 }),
|
|
571
564
|
description: Z.nextPayoutDate ? `${C("devportal.revenue.nextPayout", "Next payout")} ${new Date(Z.nextPayoutDate).toLocaleDateString()}` : C("devportal.revenue.noPayoutScheduled", "No payout scheduled")
|
|
572
565
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ v(o, {
|
|
574
567
|
title: C("devportal.revenue.platformFees", "Platform Fees"),
|
|
575
|
-
value:
|
|
576
|
-
icon: /* @__PURE__ */
|
|
568
|
+
value: d(Z.totalPlatformFees, Z.currency),
|
|
569
|
+
icon: /* @__PURE__ */ v(ve, { size: 20 }),
|
|
577
570
|
description: `${Z.totalRefundsCount} ${C("devportal.revenue.refunds", "refunds")}`
|
|
578
571
|
})
|
|
579
572
|
]
|
|
580
573
|
})
|
|
581
574
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ y("div", {
|
|
583
576
|
className: "grid gap-6 xl:grid-cols-2",
|
|
584
|
-
children: [/* @__PURE__ */
|
|
577
|
+
children: [/* @__PURE__ */ v(a, {
|
|
585
578
|
title: C("devportal.revenue.revenueTrend", "Revenue trend"),
|
|
586
|
-
children: /* @__PURE__ */
|
|
579
|
+
children: /* @__PURE__ */ v(b, {
|
|
587
580
|
treatment: "insight",
|
|
588
581
|
className: "p-4",
|
|
589
|
-
children: $.length > 0 ? /* @__PURE__ */
|
|
582
|
+
children: $.length > 0 ? /* @__PURE__ */ v(l, {
|
|
590
583
|
width: "100%",
|
|
591
584
|
height: 300,
|
|
592
|
-
children: /* @__PURE__ */
|
|
585
|
+
children: /* @__PURE__ */ y(he, {
|
|
593
586
|
data: $,
|
|
594
587
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ v(u, {
|
|
596
589
|
strokeDasharray: "3 3",
|
|
597
590
|
stroke: "var(--color-chart-grid)"
|
|
598
591
|
}),
|
|
599
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ v(pe, {
|
|
600
593
|
dataKey: "date",
|
|
601
594
|
stroke: "var(--color-chart-axis)",
|
|
602
595
|
fontSize: 12
|
|
603
596
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ v(me, {
|
|
605
598
|
stroke: "var(--color-chart-axis)",
|
|
606
599
|
fontSize: 12
|
|
607
600
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ v(c, { contentStyle: {
|
|
609
602
|
backgroundColor: "var(--color-card)",
|
|
610
603
|
border: "1px solid var(--color-border-default)",
|
|
611
604
|
borderRadius: 12
|
|
612
605
|
} }),
|
|
613
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ v(fe, {
|
|
614
607
|
type: "monotone",
|
|
615
608
|
dataKey: "grossRevenue",
|
|
616
|
-
stroke:
|
|
609
|
+
stroke: S.primary,
|
|
617
610
|
strokeWidth: 2,
|
|
618
611
|
dot: !1
|
|
619
612
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ v(fe, {
|
|
621
614
|
type: "monotone",
|
|
622
615
|
dataKey: "netRevenue",
|
|
623
|
-
stroke:
|
|
616
|
+
stroke: S.secondary,
|
|
624
617
|
strokeWidth: 2,
|
|
625
618
|
dot: !1
|
|
626
619
|
})
|
|
627
620
|
]
|
|
628
621
|
})
|
|
629
|
-
}) : /* @__PURE__ */
|
|
622
|
+
}) : /* @__PURE__ */ y("div", {
|
|
630
623
|
className: "flex h-[300px] flex-col items-center justify-center gap-2 text-text-secondary",
|
|
631
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ v("p", {
|
|
632
625
|
className: "text-sm font-medium",
|
|
633
626
|
children: C("devportal.revenue.noTrendData", "No trend data yet")
|
|
634
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ v("p", {
|
|
635
628
|
className: "text-xs text-text-tertiary",
|
|
636
629
|
children: C("devportal.revenue.noTrendDataHint", "Revenue trend appears once daily analytics have been aggregated.")
|
|
637
630
|
})]
|
|
638
631
|
})
|
|
639
632
|
})
|
|
640
|
-
}), /* @__PURE__ */
|
|
633
|
+
}), /* @__PURE__ */ v(a, {
|
|
641
634
|
title: C("devportal.revenue.topApps", "Top applications by revenue"),
|
|
642
|
-
children: Z.topApps.length > 0 ? /* @__PURE__ */
|
|
635
|
+
children: Z.topApps.length > 0 ? /* @__PURE__ */ v("div", {
|
|
643
636
|
className: "space-y-2",
|
|
644
|
-
children: Z.topApps.map((e) => /* @__PURE__ */
|
|
637
|
+
children: Z.topApps.map((e) => /* @__PURE__ */ v(b, {
|
|
645
638
|
treatment: "insight",
|
|
646
639
|
className: "border-border-seam p-4",
|
|
647
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ y("div", {
|
|
648
641
|
className: "flex items-start justify-between gap-3",
|
|
649
|
-
children: [/* @__PURE__ */
|
|
642
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
650
643
|
className: "font-medium",
|
|
651
644
|
children: e.applicationName
|
|
652
|
-
}), /* @__PURE__ */
|
|
645
|
+
}), /* @__PURE__ */ y("p", {
|
|
653
646
|
className: "text-sm text-text-secondary",
|
|
654
647
|
children: [
|
|
655
648
|
e.salesCount,
|
|
656
649
|
" ",
|
|
657
650
|
C("devportal.revenue.sales", "sales")
|
|
658
651
|
]
|
|
659
|
-
})] }), /* @__PURE__ */
|
|
652
|
+
})] }), /* @__PURE__ */ y("div", {
|
|
660
653
|
className: "text-right",
|
|
661
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ v("p", {
|
|
662
655
|
className: "font-semibold",
|
|
663
|
-
children:
|
|
664
|
-
}), /* @__PURE__ */
|
|
656
|
+
children: d(e.grossRevenue, e.currency)
|
|
657
|
+
}), /* @__PURE__ */ y("p", {
|
|
665
658
|
className: "text-sm text-text-secondary",
|
|
666
659
|
children: [
|
|
667
660
|
C("devportal.revenue.net", "Net"),
|
|
668
661
|
" ",
|
|
669
|
-
|
|
662
|
+
d(e.netRevenue, e.currency)
|
|
670
663
|
]
|
|
671
664
|
})]
|
|
672
665
|
})]
|
|
673
666
|
})
|
|
674
667
|
}, e.applicationId))
|
|
675
|
-
}) : /* @__PURE__ */
|
|
668
|
+
}) : /* @__PURE__ */ v(r, {
|
|
676
669
|
illustration: "empty-data",
|
|
677
|
-
icon: /* @__PURE__ */
|
|
670
|
+
icon: /* @__PURE__ */ v(be, { size: 24 }),
|
|
678
671
|
title: C("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
|
|
679
672
|
description: C("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
|
|
680
673
|
})
|
|
681
674
|
})]
|
|
682
675
|
}),
|
|
683
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ v(a, {
|
|
684
677
|
title: C("devportal.revenue.salesVolume", "Sales volume"),
|
|
685
|
-
children: /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ v(b, {
|
|
686
679
|
treatment: "insight",
|
|
687
680
|
className: "p-4",
|
|
688
|
-
children: $.length > 0 ? /* @__PURE__ */
|
|
681
|
+
children: $.length > 0 ? /* @__PURE__ */ v(l, {
|
|
689
682
|
width: "100%",
|
|
690
683
|
height: 280,
|
|
691
|
-
children: /* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ y(ge, {
|
|
692
685
|
data: $,
|
|
693
686
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ v(u, {
|
|
695
688
|
strokeDasharray: "3 3",
|
|
696
689
|
stroke: "var(--color-chart-grid)"
|
|
697
690
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
691
|
+
/* @__PURE__ */ v(pe, {
|
|
699
692
|
dataKey: "date",
|
|
700
693
|
stroke: "var(--color-chart-axis)",
|
|
701
694
|
fontSize: 12
|
|
702
695
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ v(me, {
|
|
704
697
|
stroke: "var(--color-chart-axis)",
|
|
705
698
|
fontSize: 12
|
|
706
699
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ v(c, { contentStyle: {
|
|
708
701
|
backgroundColor: "var(--color-card)",
|
|
709
702
|
border: "1px solid var(--color-border-default)",
|
|
710
703
|
borderRadius: 12
|
|
711
704
|
} }),
|
|
712
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ v(de, {
|
|
713
706
|
dataKey: "salesCount",
|
|
714
|
-
fill:
|
|
707
|
+
fill: S.tertiary,
|
|
715
708
|
radius: [
|
|
716
709
|
6,
|
|
717
710
|
6,
|
|
@@ -721,23 +714,23 @@ var C = () => {
|
|
|
721
714
|
})
|
|
722
715
|
]
|
|
723
716
|
})
|
|
724
|
-
}) : /* @__PURE__ */
|
|
717
|
+
}) : /* @__PURE__ */ y("div", {
|
|
725
718
|
className: "flex h-[280px] flex-col items-center justify-center gap-2 text-text-secondary",
|
|
726
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ v("p", {
|
|
727
720
|
className: "text-sm font-medium",
|
|
728
721
|
children: C("devportal.revenue.noVolumeData", "No sales volume data yet")
|
|
729
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ v("p", {
|
|
730
723
|
className: "text-xs text-text-tertiary",
|
|
731
724
|
children: C("devportal.revenue.noVolumeDataHint", "Sales volume by period appears once analytics have been aggregated.")
|
|
732
725
|
})]
|
|
733
726
|
})
|
|
734
727
|
})
|
|
735
728
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ y("div", {
|
|
737
730
|
className: "grid gap-6 xl:grid-cols-2",
|
|
738
|
-
children: [/* @__PURE__ */
|
|
731
|
+
children: [/* @__PURE__ */ v(a, {
|
|
739
732
|
title: C("devportal.revenue.recentSales", "Recent sales"),
|
|
740
|
-
children: /* @__PURE__ */
|
|
733
|
+
children: /* @__PURE__ */ v(s, {
|
|
741
734
|
data: ut,
|
|
742
735
|
keyField: "id",
|
|
743
736
|
columns: [
|
|
@@ -749,26 +742,26 @@ var C = () => {
|
|
|
749
742
|
{
|
|
750
743
|
key: "grossAmount",
|
|
751
744
|
header: C("devportal.revenue.gross", "Gross"),
|
|
752
|
-
render: (e) =>
|
|
745
|
+
render: (e) => d(e.grossAmount, e.currency)
|
|
753
746
|
},
|
|
754
747
|
{
|
|
755
748
|
key: "netAmount",
|
|
756
749
|
header: C("devportal.revenue.net", "Net"),
|
|
757
|
-
render: (e) =>
|
|
750
|
+
render: (e) => d(e.netAmount, e.currency)
|
|
758
751
|
},
|
|
759
752
|
{
|
|
760
753
|
key: "status",
|
|
761
754
|
header: C("devportal.revenue.status", "Status"),
|
|
762
|
-
render: (e) => /* @__PURE__ */
|
|
755
|
+
render: (e) => /* @__PURE__ */ v(le, {
|
|
763
756
|
status: e.status,
|
|
764
757
|
type: "app"
|
|
765
758
|
})
|
|
766
759
|
}
|
|
767
760
|
]
|
|
768
761
|
})
|
|
769
|
-
}), /* @__PURE__ */
|
|
762
|
+
}), /* @__PURE__ */ v(a, {
|
|
770
763
|
title: C("devportal.revenue.payoutHistory", "Payout history"),
|
|
771
|
-
children: /* @__PURE__ */
|
|
764
|
+
children: /* @__PURE__ */ v(s, {
|
|
772
765
|
data: dt,
|
|
773
766
|
keyField: "id",
|
|
774
767
|
columns: [
|
|
@@ -780,12 +773,12 @@ var C = () => {
|
|
|
780
773
|
{
|
|
781
774
|
key: "netAmount",
|
|
782
775
|
header: C("devportal.revenue.netPayout", "Net payout"),
|
|
783
|
-
render: (e) =>
|
|
776
|
+
render: (e) => d(e.netAmount, e.currency)
|
|
784
777
|
},
|
|
785
778
|
{
|
|
786
779
|
key: "status",
|
|
787
780
|
header: C("devportal.revenue.status", "Status"),
|
|
788
|
-
render: (e) => /* @__PURE__ */
|
|
781
|
+
render: (e) => /* @__PURE__ */ v(le, {
|
|
789
782
|
status: e.status,
|
|
790
783
|
type: "app"
|
|
791
784
|
})
|
|
@@ -794,19 +787,19 @@ var C = () => {
|
|
|
794
787
|
})
|
|
795
788
|
})]
|
|
796
789
|
})
|
|
797
|
-
] }) : /* @__PURE__ */
|
|
790
|
+
] }) : /* @__PURE__ */ v(r, {
|
|
798
791
|
illustration: "empty-data",
|
|
799
|
-
icon: /* @__PURE__ */
|
|
792
|
+
icon: /* @__PURE__ */ v(Se, { size: 32 }),
|
|
800
793
|
title: C("devportal.revenue.noDataTitle", "No revenue data yet"),
|
|
801
794
|
description: C("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
|
|
802
795
|
})
|
|
803
796
|
]
|
|
804
|
-
}) : /* @__PURE__ */
|
|
797
|
+
}) : /* @__PURE__ */ v(i, {
|
|
805
798
|
title: C("devportal.revenue.title", "Revenue"),
|
|
806
799
|
description: C("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
807
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ v(r, {
|
|
808
801
|
illustration: "empty-people",
|
|
809
|
-
icon: /* @__PURE__ */
|
|
802
|
+
icon: /* @__PURE__ */ v(be, {
|
|
810
803
|
size: 32,
|
|
811
804
|
className: "text-text-secondary"
|
|
812
805
|
}),
|