@burdenoff/microfe-billing 2026.821.1 → 2026.825.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/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
- package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
- package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
- package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
- package/dist/billing/modules/affiliate/api.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +107 -107
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +80 -81
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +127 -127
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +412 -395
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/api.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +145 -145
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +133 -133
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +7 -9
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +95 -95
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
- package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +5 -6
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/usage/hooks/useUsage.js +14 -9
- package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +481 -453
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/providers/BillingProvider.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/components/EmptyState.js.map +1 -1
- package/dist/billing/shared/components/PageHeader.js.map +1 -1
- package/dist/billing/shared/components/ServerError.js.map +1 -1
- package/dist/billing/shared/components/StatCard.js.map +1 -1
- package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
- package/dist/billing/shared/types/graphql.js.map +1 -1
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
- package/dist/billing/shared/ui/StatusPill.js.map +1 -1
- package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
- package/dist/billing/shared/utils/error.js.map +1 -1
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
- package/dist/billing/shared/utils/navigation.js.map +1 -1
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/dist/billing/shared/utils/status.js.map +1 -1
- package/dist/billing/shared/utils/tokens.js.map +1 -1
- package/dist/generated/global-operations.js +5 -1
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/generated/wspace-operations.js +1 -1
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/node_modules/@capacitor/core/dist/index.js +1 -1
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
- package/package.json +13 -10
|
@@ -8,13 +8,13 @@ import { isServerError as o } from "../../../shared/utils/error.js";
|
|
|
8
8
|
import "../../../shared/utils/index.js";
|
|
9
9
|
import { useBillingPermissions as s } from "../../../hooks/useBillingPermissions.js";
|
|
10
10
|
import { fetchAdminDeveloperRevenueOrgDetail as c, fetchAdminDeveloperRevenueOrgs as l, retrySaleCreditSync as u } from "../api.js";
|
|
11
|
-
import {
|
|
12
|
-
import { Building2 as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { PagePurpose as
|
|
11
|
+
import { useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
|
|
12
|
+
import { Building2 as h, CreditCard as g, DollarSign as _, Loader2 as v, Receipt as y, Wallet as b } from "lucide-react";
|
|
13
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
14
|
+
import { PagePurpose as w, ResponsiveDialog as T, ResponsiveDialogContent as E, ResponsiveDialogDescription as D, ResponsiveDialogFooter as O, ResponsiveDialogHeader as k, ResponsiveDialogTitle as A } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/billing/modules/earnings/pages/DeveloperRevenueAdminPage.tsx
|
|
16
|
-
function
|
|
17
|
-
let t =
|
|
16
|
+
function j({ orgs: e }) {
|
|
17
|
+
let t = p(() => e.reduce((e, t) => ({
|
|
18
18
|
totalRevenue: e.totalRevenue + t.totalRevenue,
|
|
19
19
|
totalPlatformFees: e.totalPlatformFees + t.totalPlatformFees,
|
|
20
20
|
pendingBalance: e.pendingBalance + t.pendingBalance,
|
|
@@ -25,141 +25,141 @@ function A({ orgs: e }) {
|
|
|
25
25
|
pendingBalance: 0,
|
|
26
26
|
totalPayouts: 0
|
|
27
27
|
}), [e]);
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ C("div", {
|
|
29
29
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ C("div", {
|
|
32
32
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ S("div", {
|
|
34
34
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
35
35
|
children: "Gross revenue"
|
|
36
|
-
}), /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ C("div", {
|
|
37
37
|
className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ S(_, { className: "size-4 text-text-muted" }), i(t.totalRevenue, "USD")]
|
|
39
39
|
})]
|
|
40
40
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ C("div", {
|
|
42
42
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ S("div", {
|
|
44
44
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
45
45
|
children: "Platform fees"
|
|
46
|
-
}), /* @__PURE__ */
|
|
46
|
+
}), /* @__PURE__ */ C("div", {
|
|
47
47
|
className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ S(y, { className: "size-4 text-text-muted" }), i(t.totalPlatformFees, "USD")]
|
|
49
49
|
})]
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ C("div", {
|
|
52
52
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ S("div", {
|
|
54
54
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
55
55
|
children: "Pending earned credits"
|
|
56
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ C("div", {
|
|
57
57
|
className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ S(b, { className: "size-4 text-text-muted" }), i(t.pendingBalance, "USD")]
|
|
59
59
|
})]
|
|
60
60
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ C("div", {
|
|
62
62
|
className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ S("div", {
|
|
64
64
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
65
65
|
children: "Already withdrawn"
|
|
66
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ C("div", {
|
|
67
67
|
className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
|
|
68
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ S(h, { className: "size-4 text-text-muted" }), i(t.totalPayouts, "USD")]
|
|
69
69
|
})]
|
|
70
70
|
})
|
|
71
71
|
]
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
return /* @__PURE__ */
|
|
74
|
+
function M({ org: e, detail: t, loading: n, error: r, retryingSaleId: o, onRetrySale: s, onClose: c }) {
|
|
75
|
+
return /* @__PURE__ */ S(T, {
|
|
76
76
|
open: e !== null,
|
|
77
77
|
onOpenChange: (e) => !e && c(),
|
|
78
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ C(E, {
|
|
79
79
|
className: "sm:max-w-4xl",
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
n ? /* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ C(k, { children: [/* @__PURE__ */ S(A, { children: e ? `${e.name} revenue details` : "Revenue details" }), /* @__PURE__ */ S(D, { children: "Store revenue is credited into the linked billing account as earned credits. Developers withdraw those credits later through the billing withdrawal flow." })] }),
|
|
82
|
+
n ? /* @__PURE__ */ S("div", {
|
|
83
83
|
className: "flex items-center justify-center py-14 text-text-secondary",
|
|
84
|
-
children: /* @__PURE__ */
|
|
85
|
-
}) : r ? /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ S(v, { className: "size-7 animate-spin" })
|
|
85
|
+
}) : r ? /* @__PURE__ */ S("div", {
|
|
86
86
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
|
|
87
87
|
children: r.message
|
|
88
|
-
}) : t && e ? /* @__PURE__ */
|
|
88
|
+
}) : t && e ? /* @__PURE__ */ C("div", {
|
|
89
89
|
className: "space-y-5",
|
|
90
90
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ C("div", {
|
|
92
92
|
className: "grid gap-3 md:grid-cols-4",
|
|
93
93
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ C("div", {
|
|
95
95
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ S("div", {
|
|
98
98
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
99
99
|
children: "Linked billing account"
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ S("div", {
|
|
102
102
|
className: "mt-1 text-sm font-semibold text-text-primary",
|
|
103
103
|
children: e.billingAccountId ? "Connected" : "Not linked"
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ S("div", {
|
|
106
106
|
className: "mt-1 break-all text-xs text-text-muted",
|
|
107
107
|
children: e.billingAccountId ?? "Revenue cannot be credited until a billing account is linked."
|
|
108
108
|
})
|
|
109
109
|
]
|
|
110
110
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ C("div", {
|
|
112
112
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ S("div", {
|
|
114
114
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
115
115
|
children: "Earned credits awaiting withdrawal"
|
|
116
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ S("div", {
|
|
117
117
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
118
118
|
children: i(t.summary?.pendingBalance ?? e.pendingBalance, "USD")
|
|
119
119
|
})]
|
|
120
120
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ C("div", {
|
|
122
122
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ S("div", {
|
|
124
124
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
125
125
|
children: "Unpaid sales"
|
|
126
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ S("div", {
|
|
127
127
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
128
128
|
children: t.unpaidSales.totalCount
|
|
129
129
|
})]
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ C("div", {
|
|
132
132
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ S("div", {
|
|
134
134
|
className: "text-xs uppercase tracking-wide text-text-muted",
|
|
135
135
|
children: "Total sales"
|
|
136
|
-
}), /* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ S("div", {
|
|
137
137
|
className: "mt-1 text-lg font-semibold text-text-primary",
|
|
138
138
|
children: t.summary?.totalSales ?? 0
|
|
139
139
|
})]
|
|
140
140
|
})
|
|
141
141
|
]
|
|
142
142
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ S("div", {
|
|
144
144
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
145
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ C("div", {
|
|
146
146
|
className: "flex items-start gap-3",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ S(g, { className: "mt-0.5 size-5 text-text-muted" }), /* @__PURE__ */ C("div", {
|
|
148
148
|
className: "space-y-1 text-sm",
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ S("p", {
|
|
151
151
|
className: "font-medium text-text-primary",
|
|
152
152
|
children: "Correct payout model"
|
|
153
153
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ C("p", {
|
|
155
155
|
className: "text-text-muted",
|
|
156
156
|
children: [
|
|
157
157
|
"Revenue from Store sales is posted into the developer organization's linked billing account as ",
|
|
158
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ S("strong", { children: "earned credits" }),
|
|
159
159
|
". We do not directly send cash to developer-org payment methods from this page."
|
|
160
160
|
]
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ S("p", {
|
|
163
163
|
className: "text-text-muted",
|
|
164
164
|
children: "If the developer wants to cash out, they use the billing withdrawal flow from their own billing account and payout methods."
|
|
165
165
|
})
|
|
@@ -167,79 +167,79 @@ function j({ org: e, detail: t, loading: n, error: r, retryingSaleId: o, onRetry
|
|
|
167
167
|
})]
|
|
168
168
|
})
|
|
169
169
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ C("section", {
|
|
171
171
|
className: "rounded-card border border-border-seam bg-bg-surface p-4",
|
|
172
172
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ S("h3", {
|
|
174
174
|
className: "text-sm font-semibold text-text-primary",
|
|
175
175
|
children: "Sales currently contributing to earned credits"
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ S("p", {
|
|
178
178
|
className: "mt-1 text-xs text-text-muted",
|
|
179
179
|
children: "These sales represent revenue that should exist as earned credits in the linked billing account until the developer withdraws them."
|
|
180
180
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ S("div", {
|
|
182
182
|
className: "mt-4 overflow-x-auto",
|
|
183
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ C("table", {
|
|
184
184
|
className: "min-w-full text-sm",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ S("thead", {
|
|
186
186
|
className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ C("tr", { children: [
|
|
188
|
+
/* @__PURE__ */ S("th", {
|
|
189
189
|
className: "px-3 py-2",
|
|
190
190
|
children: "Application"
|
|
191
191
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ S("th", {
|
|
193
193
|
className: "px-3 py-2",
|
|
194
194
|
children: "Purchased"
|
|
195
195
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ S("th", {
|
|
197
197
|
className: "px-3 py-2",
|
|
198
198
|
children: "Net revenue"
|
|
199
199
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ S("th", {
|
|
201
201
|
className: "px-3 py-2",
|
|
202
202
|
children: "Credit sync"
|
|
203
203
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ S("th", {
|
|
205
205
|
className: "px-3 py-2",
|
|
206
206
|
children: "Status"
|
|
207
207
|
})
|
|
208
208
|
] })
|
|
209
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ S("tbody", { children: t.unpaidSales.items.length === 0 ? /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
210
210
|
colSpan: 5,
|
|
211
211
|
className: "px-3 py-5 text-center text-sm text-text-muted",
|
|
212
212
|
children: "No outstanding unpaid sales. Revenue has either not started yet or has already been withdrawn through billing."
|
|
213
|
-
}) }) : t.unpaidSales.items.map((t) => /* @__PURE__ */
|
|
213
|
+
}) }) : t.unpaidSales.items.map((t) => /* @__PURE__ */ C("tr", {
|
|
214
214
|
className: "border-t border-border-seam",
|
|
215
215
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ C("td", {
|
|
217
217
|
className: "px-3 py-2",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ S("div", {
|
|
219
219
|
className: "font-medium text-text-primary",
|
|
220
220
|
children: t.application?.name ?? "Unknown app"
|
|
221
|
-
}), /* @__PURE__ */
|
|
221
|
+
}), /* @__PURE__ */ C("div", {
|
|
222
222
|
className: "text-xs text-text-muted",
|
|
223
223
|
children: ["/", t.application?.slug ?? "unknown"]
|
|
224
224
|
})]
|
|
225
225
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ S("td", {
|
|
227
227
|
className: "px-3 py-2 text-text-secondary",
|
|
228
228
|
children: a(t.purchasedAt)
|
|
229
229
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ S("td", {
|
|
231
231
|
className: "px-3 py-2 text-text-primary",
|
|
232
232
|
children: i(t.netAmount, t.currency)
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ C("td", {
|
|
235
235
|
className: "px-3 py-2 text-text-secondary",
|
|
236
236
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
t.billingCreditSyncError && /* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ S("div", { children: t.billingCreditSyncStatus ?? "UNKNOWN" }),
|
|
238
|
+
t.billingCreditSyncError && /* @__PURE__ */ S("div", {
|
|
239
239
|
className: "mt-1 text-xs text-status-error-text",
|
|
240
240
|
children: t.billingCreditSyncError
|
|
241
241
|
}),
|
|
242
|
-
t.billingCreditSyncStatus !== "SYNCED" && e.billingAccountId && /* @__PURE__ */
|
|
242
|
+
t.billingCreditSyncStatus !== "SYNCED" && e.billingAccountId && /* @__PURE__ */ S("button", {
|
|
243
243
|
type: "button",
|
|
244
244
|
onClick: () => s(t.id),
|
|
245
245
|
disabled: o === t.id,
|
|
@@ -248,7 +248,7 @@ function j({ org: e, detail: t, loading: n, error: r, retryingSaleId: o, onRetry
|
|
|
248
248
|
})
|
|
249
249
|
]
|
|
250
250
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ S("td", {
|
|
252
252
|
className: "px-3 py-2 text-text-secondary",
|
|
253
253
|
children: t.status
|
|
254
254
|
})
|
|
@@ -260,7 +260,7 @@ function j({ org: e, detail: t, loading: n, error: r, retryingSaleId: o, onRetry
|
|
|
260
260
|
})
|
|
261
261
|
]
|
|
262
262
|
}) : null,
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ S(O, { children: /* @__PURE__ */ S("button", {
|
|
264
264
|
type: "button",
|
|
265
265
|
onClick: c,
|
|
266
266
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary",
|
|
@@ -270,135 +270,135 @@ function j({ org: e, detail: t, loading: n, error: r, retryingSaleId: o, onRetry
|
|
|
270
270
|
})
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
var
|
|
274
|
-
let a = s(), { apiGatewayUrl:
|
|
275
|
-
apiGatewayUrl:
|
|
276
|
-
authToken:
|
|
277
|
-
orgId:
|
|
273
|
+
var N = () => {
|
|
274
|
+
let a = s(), { apiGatewayUrl: h, authToken: g, orgId: _, navigate: y, basePath: b } = e(), [T, E] = m([]), [D, O] = m(!0), [k, A] = m(null), [N, P] = m(null), [F, I] = m(null), [L, R] = m(!1), [z, B] = m(null), [V, H] = m(null), U = p(() => ({
|
|
275
|
+
apiGatewayUrl: h,
|
|
276
|
+
authToken: g,
|
|
277
|
+
orgId: _
|
|
278
278
|
}), [
|
|
279
|
-
m,
|
|
280
279
|
h,
|
|
281
|
-
g
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
g,
|
|
281
|
+
_
|
|
282
|
+
]), W = d(async () => {
|
|
283
|
+
O(!0), A(null);
|
|
284
284
|
try {
|
|
285
|
-
|
|
285
|
+
E((await l(U)).filter((e) => e.totalRevenue > 0 || e.pendingBalance > 0 || e.totalPayouts > 0));
|
|
286
286
|
} catch (e) {
|
|
287
|
-
|
|
287
|
+
A(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load developer revenue"));
|
|
288
288
|
} finally {
|
|
289
|
-
|
|
289
|
+
O(!1);
|
|
290
290
|
}
|
|
291
|
-
},
|
|
292
|
-
|
|
291
|
+
}, [U]), G = async (e) => {
|
|
292
|
+
P(e), R(!0), B(null);
|
|
293
293
|
try {
|
|
294
|
-
|
|
294
|
+
I(await c(e.id, U));
|
|
295
295
|
} catch (e) {
|
|
296
|
-
|
|
296
|
+
I(null), B(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load revenue detail"));
|
|
297
297
|
} finally {
|
|
298
|
-
|
|
298
|
+
R(!1);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
return
|
|
302
|
-
a.isBillingAdmin &&
|
|
303
|
-
}, [a.isBillingAdmin
|
|
301
|
+
return f(() => {
|
|
302
|
+
a.isBillingAdmin && W();
|
|
303
|
+
}, [W, a.isBillingAdmin]), a.isBillingAdmin ? k && o(k) ? /* @__PURE__ */ S(r, {
|
|
304
304
|
title: "Developer revenue unavailable",
|
|
305
|
-
message:
|
|
305
|
+
message: k.message,
|
|
306
306
|
showRetry: !0,
|
|
307
|
-
onRetry: () => void
|
|
308
|
-
}) : /* @__PURE__ */
|
|
307
|
+
onRetry: () => void W()
|
|
308
|
+
}) : /* @__PURE__ */ C("div", {
|
|
309
309
|
className: "space-y-6 p-6",
|
|
310
310
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ S(n, {
|
|
312
312
|
title: "Developer revenue",
|
|
313
313
|
description: "See store-generated revenue across developer organizations and confirm that the earnings are flowing into linked billing accounts as earned credits.",
|
|
314
|
-
actions: /* @__PURE__ */
|
|
314
|
+
actions: /* @__PURE__ */ S("button", {
|
|
315
315
|
type: "button",
|
|
316
|
-
onClick: () =>
|
|
316
|
+
onClick: () => y?.(`${b}/payouts`),
|
|
317
317
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
318
318
|
children: "Open billing withdrawal queue"
|
|
319
319
|
})
|
|
320
320
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
|
|
321
|
+
/* @__PURE__ */ S(w, { children: "Developer portal revenue does not pay out directly from this page. Each Store sale is credited into the developer organization's linked billing account as earned credits. Developers then withdraw those credits later using the billing withdrawal flow and their own payout methods." }),
|
|
322
|
+
D ? /* @__PURE__ */ S("div", {
|
|
323
323
|
className: "flex items-center justify-center py-16 text-text-secondary",
|
|
324
|
-
children: /* @__PURE__ */
|
|
325
|
-
}) : /* @__PURE__ */
|
|
324
|
+
children: /* @__PURE__ */ S(v, { className: "size-8 animate-spin" })
|
|
325
|
+
}) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(j, { orgs: T }), /* @__PURE__ */ C("div", {
|
|
326
326
|
className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ C("div", {
|
|
328
328
|
className: "border-b border-border-seam px-5 py-4",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
330
330
|
className: "text-base font-semibold text-text-primary",
|
|
331
331
|
children: "Organizations"
|
|
332
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ S("p", {
|
|
333
333
|
className: "mt-1 text-sm text-text-muted",
|
|
334
334
|
children: "Click a row to inspect billing linkage and the unpaid sales behind the current earned-credit balance."
|
|
335
335
|
})]
|
|
336
|
-
}),
|
|
336
|
+
}), T.length === 0 ? /* @__PURE__ */ S("div", {
|
|
337
337
|
className: "px-5 py-12 text-center text-sm text-text-muted",
|
|
338
338
|
children: "No developer revenue has been recorded yet."
|
|
339
|
-
}) : /* @__PURE__ */
|
|
339
|
+
}) : /* @__PURE__ */ S("div", {
|
|
340
340
|
className: "overflow-x-auto",
|
|
341
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ C("table", {
|
|
342
342
|
className: "min-w-full text-sm",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ S("thead", {
|
|
344
344
|
className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
|
|
345
|
-
children: /* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ C("tr", { children: [
|
|
346
|
+
/* @__PURE__ */ S("th", {
|
|
347
347
|
className: "px-4 py-3",
|
|
348
348
|
children: "Organization"
|
|
349
349
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ S("th", {
|
|
351
351
|
className: "px-4 py-3",
|
|
352
352
|
children: "Billing linked"
|
|
353
353
|
}),
|
|
354
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ S("th", {
|
|
355
355
|
className: "px-4 py-3",
|
|
356
356
|
children: "Revenue"
|
|
357
357
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ S("th", {
|
|
359
359
|
className: "px-4 py-3",
|
|
360
360
|
children: "Platform fee"
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ S("th", {
|
|
363
363
|
className: "px-4 py-3",
|
|
364
364
|
children: "Earned credits pending withdrawal"
|
|
365
365
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ S("th", {
|
|
367
367
|
className: "px-4 py-3",
|
|
368
368
|
children: "Already withdrawn"
|
|
369
369
|
})
|
|
370
370
|
] })
|
|
371
|
-
}), /* @__PURE__ */
|
|
371
|
+
}), /* @__PURE__ */ S("tbody", { children: [...T].sort((e, t) => t.pendingBalance - e.pendingBalance).map((e) => /* @__PURE__ */ C("tr", {
|
|
372
372
|
className: "cursor-pointer border-t border-border-seam transition-colors hover:bg-bg-sunken/30",
|
|
373
|
-
onClick: () => void
|
|
373
|
+
onClick: () => void G(e),
|
|
374
374
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ C("td", {
|
|
376
376
|
className: "px-4 py-3",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
377
|
+
children: [/* @__PURE__ */ S("div", {
|
|
378
378
|
className: "font-medium text-text-primary",
|
|
379
379
|
children: e.name
|
|
380
|
-
}), /* @__PURE__ */
|
|
380
|
+
}), /* @__PURE__ */ C("div", {
|
|
381
381
|
className: "text-xs text-text-muted",
|
|
382
382
|
children: ["/", e.slug]
|
|
383
383
|
})]
|
|
384
384
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ S("td", {
|
|
386
386
|
className: "px-4 py-3 text-text-secondary",
|
|
387
387
|
children: e.billingAccountId ? "Yes" : "No"
|
|
388
388
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ S("td", {
|
|
390
390
|
className: "px-4 py-3 text-text-primary",
|
|
391
391
|
children: i(e.totalRevenue, "USD")
|
|
392
392
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ S("td", {
|
|
394
394
|
className: "px-4 py-3 text-text-secondary",
|
|
395
395
|
children: i(e.totalPlatformFees, "USD")
|
|
396
396
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ S("td", {
|
|
398
398
|
className: "px-4 py-3 font-medium text-status-warning-text",
|
|
399
399
|
children: i(e.pendingBalance, "USD")
|
|
400
400
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ S("td", {
|
|
402
402
|
className: "px-4 py-3 text-text-secondary",
|
|
403
403
|
children: i(e.totalPayouts, "USD")
|
|
404
404
|
})
|
|
@@ -407,32 +407,32 @@ var M = () => {
|
|
|
407
407
|
})
|
|
408
408
|
})]
|
|
409
409
|
})] }),
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
org:
|
|
412
|
-
detail:
|
|
413
|
-
loading:
|
|
414
|
-
error:
|
|
415
|
-
retryingSaleId:
|
|
410
|
+
/* @__PURE__ */ S(M, {
|
|
411
|
+
org: N,
|
|
412
|
+
detail: F,
|
|
413
|
+
loading: L,
|
|
414
|
+
error: z,
|
|
415
|
+
retryingSaleId: V,
|
|
416
416
|
onRetrySale: (e) => {
|
|
417
|
-
|
|
418
|
-
|
|
417
|
+
N && (async () => {
|
|
418
|
+
H(e), B(null);
|
|
419
419
|
try {
|
|
420
|
-
await u(e,
|
|
420
|
+
await u(e, U), await G(N);
|
|
421
421
|
} catch (e) {
|
|
422
|
-
|
|
422
|
+
B(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to retry credit sync"));
|
|
423
423
|
} finally {
|
|
424
|
-
|
|
424
|
+
H(null);
|
|
425
425
|
}
|
|
426
426
|
})();
|
|
427
427
|
},
|
|
428
428
|
onClose: () => {
|
|
429
|
-
|
|
429
|
+
P(null), I(null), B(null);
|
|
430
430
|
}
|
|
431
431
|
})
|
|
432
432
|
]
|
|
433
|
-
}) : /* @__PURE__ */
|
|
433
|
+
}) : /* @__PURE__ */ S(t, { message: "You don't have permission to view developer revenue." });
|
|
434
434
|
};
|
|
435
435
|
//#endregion
|
|
436
|
-
export {
|
|
436
|
+
export { N as DeveloperRevenueAdminPage };
|
|
437
437
|
|
|
438
438
|
//# sourceMappingURL=DeveloperRevenueAdminPage.js.map
|