@burdenoff/microfe-billing 2026.1113.1 → 2026.1113.3
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/billing/BillingRoot.js +83 -77
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
- package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
- package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
- package/dist/billing/modules/billing/hooks/index.js +5 -5
- package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/index.js +14 -14
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
- package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
- package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
- package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
- package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
- package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +143 -143
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
- package/dist/billing/modules/plans/utils/planAction.d.ts +9 -0
- package/dist/billing/modules/plans/utils/planAction.js +4 -1
- package/dist/billing/modules/plans/utils/planAction.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
- package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
- package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
- package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
- package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
- package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
- package/dist/billing/shared/components/EmptyState.js +3 -3
- package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
- package/dist/billing/shared/ui/MetricCard.js +13 -13
- package/dist/billing/shared/utils/format.js +16 -4
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/index.js +8 -8
- package/dist/generated/global-operations.js +294 -286
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +2 -2
|
@@ -11,10 +11,10 @@ import "../../../shared/components/index.js";
|
|
|
11
11
|
import "../../../shared/utils/index.js";
|
|
12
12
|
import { fetchAdminDeveloperRevenueOrg as u, fetchAdminDeveloperRevenueOrgDetail as d, fetchAdminDeveloperRevenueOrgMonthly as te, fetchAdminPayoutRequests as f, fetchBillingAccountCreditBalance as p, fetchCreditCost as m, retrySaleCreditSync as ne } from "../api.js";
|
|
13
13
|
import { useCallback as h, useEffect as re, useMemo as g, useState as _ } from "react";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
14
|
+
import { PagePurpose as ie } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { ArrowLeft as ae, BadgeCheck as oe, CreditCard as se, Loader2 as v, TrendingDown as y, TrendingUp as b, Wallet as ce } from "lucide-react";
|
|
16
|
+
import { useParams as le } from "react-router";
|
|
17
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
18
18
|
// src/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.tsx
|
|
19
19
|
var w = "all", T = {
|
|
20
20
|
REQUESTED: "Requested",
|
|
@@ -34,7 +34,7 @@ var w = "all", T = {
|
|
|
34
34
|
CANCELED: "bg-bg-sunken text-text-muted"
|
|
35
35
|
};
|
|
36
36
|
function D({ status: e }) {
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ S("span", {
|
|
38
38
|
className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${E[e] ?? "bg-bg-sunken text-text-muted"}`,
|
|
39
39
|
children: T[e] ?? e
|
|
40
40
|
});
|
|
@@ -54,75 +54,75 @@ function ue(e) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
function de({ points: e }) {
|
|
57
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
57
|
+
return e.length === 0 ? /* @__PURE__ */ S("div", {
|
|
58
58
|
className: "px-5 py-10 text-center text-sm text-text-muted",
|
|
59
59
|
children: "No sales recorded yet — the revenue trend will appear once the first sale comes in."
|
|
60
|
-
}) : /* @__PURE__ */
|
|
60
|
+
}) : /* @__PURE__ */ S("div", {
|
|
61
61
|
className: "overflow-x-auto",
|
|
62
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ C("table", {
|
|
63
63
|
className: "min-w-full text-sm",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ S("thead", {
|
|
65
65
|
className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ C("tr", { children: [
|
|
67
|
+
/* @__PURE__ */ S("th", {
|
|
68
68
|
className: "px-4 py-3",
|
|
69
69
|
children: "Month"
|
|
70
70
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ S("th", {
|
|
72
72
|
className: "px-4 py-3",
|
|
73
73
|
children: "Gross revenue"
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ S("th", {
|
|
76
76
|
className: "px-4 py-3",
|
|
77
77
|
children: "Platform fee"
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ S("th", {
|
|
80
80
|
className: "px-4 py-3",
|
|
81
81
|
children: "Net revenue"
|
|
82
82
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ S("th", {
|
|
84
84
|
className: "px-4 py-3",
|
|
85
85
|
children: "Sales"
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ S("th", {
|
|
88
88
|
className: "px-4 py-3",
|
|
89
89
|
children: "Growth (MoM)"
|
|
90
90
|
})
|
|
91
91
|
] })
|
|
92
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ S("tbody", { children: e.map((t, n) => {
|
|
93
93
|
let r = n > 0 ? e[n - 1] : null, i = r && r.grossRevenue > 0 ? (t.grossRevenue - r.grossRevenue) / r.grossRevenue * 100 : null;
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ C("tr", {
|
|
95
95
|
className: "border-t border-border-seam",
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ S("td", {
|
|
98
98
|
className: "px-4 py-3 font-medium text-text-primary",
|
|
99
99
|
children: O(t.month)
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ S("td", {
|
|
102
102
|
className: "px-4 py-3 text-text-primary",
|
|
103
103
|
children: s(t.grossRevenue, "USD")
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ S("td", {
|
|
106
106
|
className: "px-4 py-3 text-text-secondary",
|
|
107
107
|
children: s(t.platformFees, "USD")
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ S("td", {
|
|
110
110
|
className: "px-4 py-3 text-text-secondary",
|
|
111
111
|
children: s(t.netRevenue, "USD")
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ S("td", {
|
|
114
114
|
className: "px-4 py-3 text-text-secondary",
|
|
115
115
|
children: t.salesCount
|
|
116
116
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ S("td", {
|
|
118
118
|
className: "px-4 py-3",
|
|
119
|
-
children: i === null ? /* @__PURE__ */
|
|
119
|
+
children: i === null ? /* @__PURE__ */ S("span", {
|
|
120
120
|
className: "text-text-muted",
|
|
121
121
|
children: "—"
|
|
122
|
-
}) : /* @__PURE__ */
|
|
122
|
+
}) : /* @__PURE__ */ C("span", {
|
|
123
123
|
className: `inline-flex items-center gap-1 font-medium ${i >= 0 ? "text-status-success-text" : "text-status-error-text"}`,
|
|
124
124
|
children: [
|
|
125
|
-
|
|
125
|
+
S(i >= 0 ? b : y, { className: "size-3.5" }),
|
|
126
126
|
i >= 0 ? "+" : "",
|
|
127
127
|
i.toFixed(1),
|
|
128
128
|
"%"
|
|
@@ -136,65 +136,65 @@ function de({ points: e }) {
|
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
function fe({ requests: e }) {
|
|
139
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
139
|
+
return e.length === 0 ? /* @__PURE__ */ S("div", {
|
|
140
140
|
className: "px-5 py-10 text-center text-sm text-text-muted",
|
|
141
141
|
children: "No withdrawal requests in this period."
|
|
142
|
-
}) : /* @__PURE__ */
|
|
142
|
+
}) : /* @__PURE__ */ S("div", {
|
|
143
143
|
className: "overflow-x-auto",
|
|
144
|
-
children: /* @__PURE__ */
|
|
144
|
+
children: /* @__PURE__ */ C("table", {
|
|
145
145
|
className: "min-w-full text-sm",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ S("thead", {
|
|
147
147
|
className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ C("tr", { children: [
|
|
149
|
+
/* @__PURE__ */ S("th", {
|
|
150
150
|
className: "px-4 py-3",
|
|
151
151
|
children: "Requested"
|
|
152
152
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ S("th", {
|
|
154
154
|
className: "px-4 py-3",
|
|
155
155
|
children: "Kind"
|
|
156
156
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ S("th", {
|
|
158
158
|
className: "px-4 py-3",
|
|
159
159
|
children: "Amount"
|
|
160
160
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ S("th", {
|
|
162
162
|
className: "px-4 py-3",
|
|
163
163
|
children: "Status"
|
|
164
164
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ S("th", {
|
|
166
166
|
className: "px-4 py-3",
|
|
167
167
|
children: "Paid"
|
|
168
168
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ S("th", {
|
|
170
170
|
className: "px-4 py-3",
|
|
171
171
|
children: "Notes"
|
|
172
172
|
})
|
|
173
173
|
] })
|
|
174
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ S("tbody", { children: e.map((e) => /* @__PURE__ */ C("tr", {
|
|
175
175
|
className: "border-t border-border-seam",
|
|
176
176
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ S("td", {
|
|
178
178
|
className: "px-4 py-3 text-text-secondary",
|
|
179
179
|
children: c(e.createdAt)
|
|
180
180
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ S("td", {
|
|
182
182
|
className: "px-4 py-3 text-text-secondary",
|
|
183
183
|
children: e.requestKind === "CREDIT_CONVERSION" ? "Revenue-share credits" : "Cash payout"
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ S("td", {
|
|
186
186
|
className: "px-4 py-3 font-medium text-text-primary",
|
|
187
187
|
children: s(e.requestedAmount, e.currency)
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ S("td", {
|
|
190
190
|
className: "px-4 py-3",
|
|
191
|
-
children: /* @__PURE__ */
|
|
191
|
+
children: /* @__PURE__ */ S(D, { status: e.status })
|
|
192
192
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ S("td", {
|
|
194
194
|
className: "px-4 py-3 text-text-secondary",
|
|
195
195
|
children: e.paidAt ? c(e.paidAt) : "—"
|
|
196
196
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ S("td", {
|
|
198
198
|
className: "px-4 py-3 text-text-muted",
|
|
199
199
|
children: e.failureReason || e.userNotes || "—"
|
|
200
200
|
})
|
|
@@ -204,7 +204,7 @@ function fe({ requests: e }) {
|
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
var k = () => {
|
|
207
|
-
let { organizationId: y } =
|
|
207
|
+
let { organizationId: y } = le(), T = ee(), { apiGatewayUrl: E, authToken: D, orgId: k } = e(), pe = a(), [A, j] = _(null), [M, N] = _([]), [P, F] = _(null), [I, L] = _(null), [R, z] = _([]), [B, me] = _(null), [he, ge] = _([]), [V, H] = _(w), [_e, U] = _(!0), [W, G] = _(!1), [K, q] = _(null), [J, Y] = _(null), X = g(() => ({
|
|
208
208
|
apiGatewayUrl: E,
|
|
209
209
|
authToken: D,
|
|
210
210
|
orgId: k
|
|
@@ -265,160 +265,160 @@ var k = () => {
|
|
|
265
265
|
q(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load period data"));
|
|
266
266
|
}).finally(() => G(!1)));
|
|
267
267
|
};
|
|
268
|
-
if (!T.isBillingAdmin) return /* @__PURE__ */
|
|
269
|
-
if (K && l(K)) return /* @__PURE__ */
|
|
268
|
+
if (!T.isBillingAdmin) return /* @__PURE__ */ S(t, { message: "You don't have permission to view developer revenue." });
|
|
269
|
+
if (K && l(K)) return /* @__PURE__ */ S(i, {
|
|
270
270
|
title: "Developer revenue unavailable",
|
|
271
271
|
message: K.message,
|
|
272
272
|
showRetry: !0,
|
|
273
273
|
onRetry: () => void Q()
|
|
274
274
|
});
|
|
275
|
-
if (_e || !A) return /* @__PURE__ */
|
|
275
|
+
if (_e || !A) return /* @__PURE__ */ S("div", {
|
|
276
276
|
className: "flex items-center justify-center py-20 text-text-secondary",
|
|
277
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ S(v, { className: "size-8 animate-spin" })
|
|
278
278
|
});
|
|
279
279
|
let ye = R.filter((e) => e.status === "PAID").reduce((e, t) => e + (t.approvedAmount ?? t.requestedAmount), 0), $ = R.filter((e) => [
|
|
280
280
|
"REQUESTED",
|
|
281
281
|
"APPROVED",
|
|
282
282
|
"PROCESSING"
|
|
283
283
|
].includes(e.status)).reduce((e, t) => e + t.requestedAmount, 0), be = [...M].reverse();
|
|
284
|
-
return /* @__PURE__ */
|
|
284
|
+
return /* @__PURE__ */ C("div", {
|
|
285
285
|
className: "space-y-6 p-6",
|
|
286
286
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ S(n, {
|
|
288
288
|
title: A.name,
|
|
289
289
|
description: `/${A.slug}${A.isVerified ? " · Verified developer organization" : ""}`,
|
|
290
|
-
actions: /* @__PURE__ */
|
|
290
|
+
actions: /* @__PURE__ */ C("button", {
|
|
291
291
|
type: "button",
|
|
292
292
|
onClick: () => pe("/developer-revenue"),
|
|
293
293
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ S(ae, { className: "size-4" }), "Back to developer revenue"]
|
|
295
295
|
})
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ S(ie, { children: "Store revenue for this org is credited into its linked billing account as earned credits. The developer withdraws those credits later through their own billing withdrawal flow — this page is a read-and-verify view of that whole loop, from sale to payout." }),
|
|
298
|
+
/* @__PURE__ */ C("div", {
|
|
299
299
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
300
300
|
children: [
|
|
301
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ S(r, {
|
|
302
302
|
label: "Gross revenue (all time)",
|
|
303
303
|
value: s(A.totalRevenue, "USD"),
|
|
304
|
-
icon: /* @__PURE__ */
|
|
304
|
+
icon: /* @__PURE__ */ S(b, { className: "size-4" })
|
|
305
305
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ S(r, {
|
|
307
307
|
label: "Platform fees (all time)",
|
|
308
308
|
value: s(A.totalPlatformFees, "USD"),
|
|
309
|
-
icon: /* @__PURE__ */
|
|
309
|
+
icon: /* @__PURE__ */ S(se, { className: "size-4" })
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ S(r, {
|
|
312
312
|
label: "Pending earned credits",
|
|
313
313
|
value: s(B?.summary?.pendingBalance ?? A.pendingBalance, "USD"),
|
|
314
|
-
icon: /* @__PURE__ */
|
|
314
|
+
icon: /* @__PURE__ */ S(ce, { className: "size-4" })
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ S(r, {
|
|
317
317
|
label: "Already withdrawn (all time)",
|
|
318
318
|
value: s(ye, "USD"),
|
|
319
|
-
icon: /* @__PURE__ */
|
|
319
|
+
icon: /* @__PURE__ */ S(oe, { className: "size-4" })
|
|
320
320
|
})
|
|
321
321
|
]
|
|
322
322
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ C("section", {
|
|
324
324
|
className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
|
|
325
325
|
children: [
|
|
326
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ C("div", {
|
|
327
327
|
className: "border-b border-border-seam px-5 py-4",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
329
329
|
className: "text-base font-semibold text-text-primary",
|
|
330
330
|
children: "Billing account balance"
|
|
331
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ S("p", {
|
|
332
332
|
className: "mt-1 text-sm text-text-muted",
|
|
333
333
|
children: "The current credit ledger on the org's linked billing account, right now. These are credit units, not currency — 1 credit is worth a small fraction of $1 at the platform's current credit rate."
|
|
334
334
|
})]
|
|
335
335
|
}),
|
|
336
|
-
A.billingAccountId ? P ? /* @__PURE__ */
|
|
336
|
+
A.billingAccountId ? P ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
337
337
|
className: "grid gap-3 p-5 md:grid-cols-3 xl:grid-cols-5",
|
|
338
338
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ S(r, {
|
|
340
340
|
label: "Earned",
|
|
341
341
|
value: o(P.earned)
|
|
342
342
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ S(r, {
|
|
344
344
|
label: "Purchased",
|
|
345
345
|
value: o(P.purchased)
|
|
346
346
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ S(r, {
|
|
348
348
|
label: "Granted",
|
|
349
349
|
value: o(P.granted)
|
|
350
350
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ S(r, {
|
|
352
352
|
label: "Withdrawable",
|
|
353
353
|
value: o(P.withdrawable)
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ S(r, {
|
|
356
356
|
label: "Total balance",
|
|
357
357
|
value: o(P.total)
|
|
358
358
|
})
|
|
359
359
|
]
|
|
360
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ S("div", {
|
|
361
361
|
className: "px-5 pb-4 text-xs text-text-muted",
|
|
362
362
|
children: I === null ? "Estimated cash value could not be loaded." : `≈ ${s(I, "USD")} total at the current credit rate.`
|
|
363
|
-
})] }) : /* @__PURE__ */
|
|
363
|
+
})] }) : /* @__PURE__ */ S("div", {
|
|
364
364
|
className: "px-5 py-8 text-center text-sm text-text-muted",
|
|
365
365
|
children: "Credit balance could not be loaded."
|
|
366
|
-
}) : /* @__PURE__ */
|
|
366
|
+
}) : /* @__PURE__ */ S("div", {
|
|
367
367
|
className: "px-5 py-8 text-center text-sm text-text-muted",
|
|
368
368
|
children: "No billing account is linked yet — revenue cannot be credited until this org links one."
|
|
369
369
|
}),
|
|
370
|
-
$ > 0 && /* @__PURE__ */
|
|
370
|
+
$ > 0 && /* @__PURE__ */ C("div", {
|
|
371
371
|
className: "border-t border-border-seam bg-status-warning-bg-subtle px-5 py-3 text-xs text-status-warning-text",
|
|
372
372
|
children: [s($, "USD"), " is currently tied up in a pending or approved withdrawal request — it has already left the withdrawable balance above."]
|
|
373
373
|
})
|
|
374
374
|
]
|
|
375
375
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ C("section", {
|
|
377
377
|
className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ C("div", {
|
|
379
379
|
className: "border-b border-border-seam px-5 py-4",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
381
381
|
className: "text-base font-semibold text-text-primary",
|
|
382
382
|
children: "Monthly revenue trend"
|
|
383
|
-
}), /* @__PURE__ */
|
|
383
|
+
}), /* @__PURE__ */ S("p", {
|
|
384
384
|
className: "mt-1 text-sm text-text-muted",
|
|
385
385
|
children: "Last 12 months of gross/net revenue for this org, computed from completed sales."
|
|
386
386
|
})]
|
|
387
|
-
}), /* @__PURE__ */
|
|
387
|
+
}), /* @__PURE__ */ S(de, { points: M })]
|
|
388
388
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ C("div", {
|
|
390
390
|
className: "flex flex-wrap items-center justify-between gap-3 rounded-card border border-border-seam bg-bg-surface px-5 py-4 shadow-[var(--shadow-elevation-1)]",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h2", {
|
|
392
392
|
className: "text-sm font-semibold text-text-primary",
|
|
393
393
|
children: "Viewing activity for"
|
|
394
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ S("p", {
|
|
395
395
|
className: "mt-1 text-xs text-text-muted",
|
|
396
396
|
children: "Scopes both the withdrawal history and sales tables below — pick a single month to keep long-running orgs easy to review, or switch to all time."
|
|
397
|
-
})] }), /* @__PURE__ */
|
|
397
|
+
})] }), /* @__PURE__ */ C("div", {
|
|
398
398
|
className: "flex items-center gap-2",
|
|
399
|
-
children: [W && /* @__PURE__ */
|
|
399
|
+
children: [W && /* @__PURE__ */ S(v, { className: "size-4 animate-spin text-text-muted" }), /* @__PURE__ */ C("select", {
|
|
400
400
|
value: V,
|
|
401
401
|
onChange: (e) => ve(e.target.value),
|
|
402
402
|
disabled: W,
|
|
403
403
|
className: "rounded-md border border-border-subtle bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary px-3 py-2 text-sm text-text-primary disabled:opacity-50",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ S("option", {
|
|
405
405
|
value: w,
|
|
406
406
|
children: "All time"
|
|
407
|
-
}), be.map((e) => /* @__PURE__ */
|
|
407
|
+
}), be.map((e) => /* @__PURE__ */ S("option", {
|
|
408
408
|
value: e.month,
|
|
409
409
|
children: O(e.month)
|
|
410
410
|
}, e.month))]
|
|
411
411
|
})]
|
|
412
412
|
})]
|
|
413
413
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ C("section", {
|
|
415
415
|
className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ C("div", {
|
|
417
417
|
className: "border-b border-border-seam px-5 py-4",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
419
419
|
className: "text-base font-semibold text-text-primary",
|
|
420
420
|
children: "Withdrawal history"
|
|
421
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ C("p", {
|
|
422
422
|
className: "mt-1 text-sm text-text-muted",
|
|
423
423
|
children: [
|
|
424
424
|
"Payout requests this org made in",
|
|
@@ -427,19 +427,19 @@ var k = () => {
|
|
|
427
427
|
" — both revenue-share credit conversions and cash payouts — with current status."
|
|
428
428
|
]
|
|
429
429
|
})]
|
|
430
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ S("div", {
|
|
431
431
|
className: W ? "pointer-events-none opacity-50" : void 0,
|
|
432
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ S(fe, { requests: he })
|
|
433
433
|
})]
|
|
434
434
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ C("section", {
|
|
436
436
|
className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
437
|
+
children: [/* @__PURE__ */ C("div", {
|
|
438
438
|
className: "border-b border-border-seam px-5 py-4",
|
|
439
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
440
440
|
className: "text-base font-semibold text-text-primary",
|
|
441
441
|
children: "Sales currently contributing to earned credits"
|
|
442
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ C("p", {
|
|
443
443
|
className: "mt-1 text-xs text-text-muted",
|
|
444
444
|
children: [
|
|
445
445
|
"Unpaid sales purchased in",
|
|
@@ -448,68 +448,68 @@ var k = () => {
|
|
|
448
448
|
" that should exist as earned credits in the linked billing account until the developer withdraws them."
|
|
449
449
|
]
|
|
450
450
|
})]
|
|
451
|
-
}), /* @__PURE__ */
|
|
451
|
+
}), /* @__PURE__ */ S("div", {
|
|
452
452
|
className: `overflow-x-auto ${W ? "pointer-events-none opacity-50" : ""}`,
|
|
453
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ C("table", {
|
|
454
454
|
className: "min-w-full text-sm",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ S("thead", {
|
|
456
456
|
className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
|
|
457
|
-
children: /* @__PURE__ */
|
|
458
|
-
/* @__PURE__ */
|
|
457
|
+
children: /* @__PURE__ */ C("tr", { children: [
|
|
458
|
+
/* @__PURE__ */ S("th", {
|
|
459
459
|
className: "px-4 py-3",
|
|
460
460
|
children: "Application"
|
|
461
461
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ S("th", {
|
|
463
463
|
className: "px-4 py-3",
|
|
464
464
|
children: "Purchased"
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ S("th", {
|
|
467
467
|
className: "px-4 py-3",
|
|
468
468
|
children: "Net revenue"
|
|
469
469
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ S("th", {
|
|
471
471
|
className: "px-4 py-3",
|
|
472
472
|
children: "Credit sync"
|
|
473
473
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ S("th", {
|
|
475
475
|
className: "px-4 py-3",
|
|
476
476
|
children: "Status"
|
|
477
477
|
})
|
|
478
478
|
] })
|
|
479
|
-
}), /* @__PURE__ */
|
|
479
|
+
}), /* @__PURE__ */ S("tbody", { children: !B || B.unpaidSales.items.length === 0 ? /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
480
480
|
colSpan: 5,
|
|
481
481
|
className: "px-4 py-8 text-center text-sm text-text-muted",
|
|
482
482
|
children: "No outstanding unpaid sales in this period."
|
|
483
|
-
}) }) : B.unpaidSales.items.map((e) => /* @__PURE__ */
|
|
483
|
+
}) }) : B.unpaidSales.items.map((e) => /* @__PURE__ */ C("tr", {
|
|
484
484
|
className: "border-t border-border-seam",
|
|
485
485
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ C("td", {
|
|
487
487
|
className: "px-4 py-3",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
488
|
+
children: [/* @__PURE__ */ S("div", {
|
|
489
489
|
className: "font-medium text-text-primary",
|
|
490
490
|
children: e.application?.name ?? "Unknown app"
|
|
491
|
-
}), /* @__PURE__ */
|
|
491
|
+
}), /* @__PURE__ */ C("div", {
|
|
492
492
|
className: "text-xs text-text-muted",
|
|
493
493
|
children: ["/", e.application?.slug ?? "unknown"]
|
|
494
494
|
})]
|
|
495
495
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ S("td", {
|
|
497
497
|
className: "px-4 py-3 text-text-secondary",
|
|
498
498
|
children: c(e.purchasedAt)
|
|
499
499
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ S("td", {
|
|
501
501
|
className: "px-4 py-3 text-text-primary",
|
|
502
502
|
children: s(e.netAmount, e.currency)
|
|
503
503
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ C("td", {
|
|
505
505
|
className: "px-4 py-3 text-text-secondary",
|
|
506
506
|
children: [
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
e.billingCreditSyncError && /* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ S("div", { children: e.billingCreditSyncStatus ?? "UNKNOWN" }),
|
|
508
|
+
e.billingCreditSyncError && /* @__PURE__ */ S("div", {
|
|
509
509
|
className: "mt-1 text-xs text-status-error-text",
|
|
510
510
|
children: e.billingCreditSyncError
|
|
511
511
|
}),
|
|
512
|
-
e.billingCreditSyncStatus !== "SYNCED" && A.billingAccountId && /* @__PURE__ */
|
|
512
|
+
e.billingCreditSyncStatus !== "SYNCED" && A.billingAccountId && /* @__PURE__ */ S("button", {
|
|
513
513
|
type: "button",
|
|
514
514
|
onClick: () => {
|
|
515
515
|
y && (async () => {
|
|
@@ -527,7 +527,7 @@ var k = () => {
|
|
|
527
527
|
})
|
|
528
528
|
]
|
|
529
529
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ S("td", {
|
|
531
531
|
className: "px-4 py-3 text-text-secondary",
|
|
532
532
|
children: e.status
|
|
533
533
|
})
|