@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.
Files changed (145) hide show
  1. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  2. package/dist/billing/BillingRoot.js.map +1 -1
  3. package/dist/billing/BillingUserRoutes.js.map +1 -1
  4. package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
  5. package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
  6. package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
  7. package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
  8. package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
  9. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
  10. package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
  11. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  12. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  13. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  14. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  15. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  16. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  17. package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
  18. package/dist/billing/modules/affiliate/api.js.map +1 -1
  19. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +107 -107
  20. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  21. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +80 -81
  22. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  23. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  24. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
  25. package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
  26. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/InvoicesListPage.js +1 -1
  28. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  29. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  30. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  31. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  32. package/dist/billing/modules/billing/pages/UserRefundsPage.js +127 -127
  33. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  34. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
  35. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  36. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
  37. package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
  38. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
  39. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
  40. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
  41. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
  42. package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
  43. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
  44. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
  45. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
  46. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  47. package/dist/billing/modules/checkout/hooks/useCheckout.js +0 -1
  48. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
  49. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
  50. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
  51. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
  52. package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
  53. package/dist/billing/modules/checkout/pages/CheckoutPage.js +412 -395
  54. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  55. package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
  56. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  57. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  58. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  59. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  60. package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
  61. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  62. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  63. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  64. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  65. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
  66. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  67. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
  68. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  69. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
  70. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
  71. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
  72. package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
  73. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  74. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  75. package/dist/billing/modules/earnings/api.js.map +1 -1
  76. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +145 -145
  77. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
  78. package/dist/billing/modules/earnings/pages/EarningsPage.js +133 -133
  79. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  80. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +7 -9
  81. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  82. package/dist/billing/modules/earnings/pages/PayoutsPage.js +95 -95
  83. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  84. package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
  85. package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
  86. package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
  87. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  88. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  89. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  90. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  91. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  92. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  93. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  94. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  95. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  96. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
  97. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
  98. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  99. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  100. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  101. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  102. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  103. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  104. package/dist/billing/modules/store/pages/StoreCheckoutPage.js +5 -6
  105. package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
  106. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  107. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
  108. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  109. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  110. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  111. package/dist/billing/modules/usage/hooks/useUsage.js +14 -9
  112. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
  113. package/dist/billing/modules/usage/pages/UsagePage.js +481 -453
  114. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  115. package/dist/billing/providers/BillingProvider.js.map +1 -1
  116. package/dist/billing/shared/components/AccessDenied.js.map +1 -1
  117. package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
  118. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
  119. package/dist/billing/shared/components/EmptyState.js.map +1 -1
  120. package/dist/billing/shared/components/PageHeader.js.map +1 -1
  121. package/dist/billing/shared/components/ServerError.js.map +1 -1
  122. package/dist/billing/shared/components/StatCard.js.map +1 -1
  123. package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
  124. package/dist/billing/shared/types/graphql.js.map +1 -1
  125. package/dist/billing/shared/ui/Card.js.map +1 -1
  126. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  127. package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
  128. package/dist/billing/shared/ui/StatusPill.js.map +1 -1
  129. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
  130. package/dist/billing/shared/utils/error.js.map +1 -1
  131. package/dist/billing/shared/utils/format.js.map +1 -1
  132. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
  133. package/dist/billing/shared/utils/navigation.js.map +1 -1
  134. package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
  135. package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
  136. package/dist/billing/shared/utils/status.js.map +1 -1
  137. package/dist/billing/shared/utils/tokens.js.map +1 -1
  138. package/dist/generated/global-operations.js +5 -1
  139. package/dist/generated/global-operations.js.map +1 -1
  140. package/dist/generated/global-types.js.map +1 -1
  141. package/dist/generated/wspace-operations.js +1 -1
  142. package/dist/generated/wspace-operations.js.map +1 -1
  143. package/dist/node_modules/@capacitor/core/dist/index.js +1 -1
  144. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
  145. 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 { useEffect as d, useMemo as f, useState as p } from "react";
12
- import { Building2 as m, CreditCard as h, DollarSign as g, Loader2 as _, Receipt as v, Wallet as y } from "lucide-react";
13
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
14
- import { PagePurpose as C, ResponsiveDialog as w, ResponsiveDialogContent as T, ResponsiveDialogDescription as E, ResponsiveDialogFooter as D, ResponsiveDialogHeader as O, ResponsiveDialogTitle as k } from "@burdenoff/fe-libs/ui";
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 A({ orgs: e }) {
17
- let t = f(() => e.reduce((e, 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__ */ S("div", {
28
+ return /* @__PURE__ */ C("div", {
29
29
  className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
30
30
  children: [
31
- /* @__PURE__ */ S("div", {
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__ */ x("div", {
33
+ children: [/* @__PURE__ */ S("div", {
34
34
  className: "text-xs uppercase tracking-wide text-text-muted",
35
35
  children: "Gross revenue"
36
- }), /* @__PURE__ */ S("div", {
36
+ }), /* @__PURE__ */ C("div", {
37
37
  className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
38
- children: [/* @__PURE__ */ x(g, { className: "size-4 text-text-muted" }), i(t.totalRevenue, "USD")]
38
+ children: [/* @__PURE__ */ S(_, { className: "size-4 text-text-muted" }), i(t.totalRevenue, "USD")]
39
39
  })]
40
40
  }),
41
- /* @__PURE__ */ S("div", {
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__ */ x("div", {
43
+ children: [/* @__PURE__ */ S("div", {
44
44
  className: "text-xs uppercase tracking-wide text-text-muted",
45
45
  children: "Platform fees"
46
- }), /* @__PURE__ */ S("div", {
46
+ }), /* @__PURE__ */ C("div", {
47
47
  className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
48
- children: [/* @__PURE__ */ x(v, { className: "size-4 text-text-muted" }), i(t.totalPlatformFees, "USD")]
48
+ children: [/* @__PURE__ */ S(y, { className: "size-4 text-text-muted" }), i(t.totalPlatformFees, "USD")]
49
49
  })]
50
50
  }),
51
- /* @__PURE__ */ S("div", {
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__ */ x("div", {
53
+ children: [/* @__PURE__ */ S("div", {
54
54
  className: "text-xs uppercase tracking-wide text-text-muted",
55
55
  children: "Pending earned credits"
56
- }), /* @__PURE__ */ S("div", {
56
+ }), /* @__PURE__ */ C("div", {
57
57
  className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
58
- children: [/* @__PURE__ */ x(y, { className: "size-4 text-text-muted" }), i(t.pendingBalance, "USD")]
58
+ children: [/* @__PURE__ */ S(b, { className: "size-4 text-text-muted" }), i(t.pendingBalance, "USD")]
59
59
  })]
60
60
  }),
61
- /* @__PURE__ */ S("div", {
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__ */ x("div", {
63
+ children: [/* @__PURE__ */ S("div", {
64
64
  className: "text-xs uppercase tracking-wide text-text-muted",
65
65
  children: "Already withdrawn"
66
- }), /* @__PURE__ */ S("div", {
66
+ }), /* @__PURE__ */ C("div", {
67
67
  className: "mt-1 flex items-center gap-2 text-lg font-semibold text-text-primary",
68
- children: [/* @__PURE__ */ x(m, { className: "size-4 text-text-muted" }), i(t.totalPayouts, "USD")]
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 j({ org: e, detail: t, loading: n, error: r, retryingSaleId: o, onRetrySale: s, onClose: c }) {
75
- return /* @__PURE__ */ x(w, {
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__ */ S(T, {
78
+ children: /* @__PURE__ */ C(E, {
79
79
  className: "sm:max-w-4xl",
80
80
  children: [
81
- /* @__PURE__ */ S(O, { children: [/* @__PURE__ */ x(k, { children: e ? `${e.name} revenue details` : "Revenue details" }), /* @__PURE__ */ x(E, { 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__ */ x("div", {
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__ */ x(_, { className: "size-7 animate-spin" })
85
- }) : r ? /* @__PURE__ */ x("div", {
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__ */ S("div", {
88
+ }) : t && e ? /* @__PURE__ */ C("div", {
89
89
  className: "space-y-5",
90
90
  children: [
91
- /* @__PURE__ */ S("div", {
91
+ /* @__PURE__ */ C("div", {
92
92
  className: "grid gap-3 md:grid-cols-4",
93
93
  children: [
94
- /* @__PURE__ */ S("div", {
94
+ /* @__PURE__ */ C("div", {
95
95
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
96
96
  children: [
97
- /* @__PURE__ */ x("div", {
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__ */ x("div", {
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__ */ x("div", {
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__ */ S("div", {
111
+ /* @__PURE__ */ C("div", {
112
112
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
113
- children: [/* @__PURE__ */ x("div", {
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__ */ x("div", {
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__ */ S("div", {
121
+ /* @__PURE__ */ C("div", {
122
122
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
123
- children: [/* @__PURE__ */ x("div", {
123
+ children: [/* @__PURE__ */ S("div", {
124
124
  className: "text-xs uppercase tracking-wide text-text-muted",
125
125
  children: "Unpaid sales"
126
- }), /* @__PURE__ */ x("div", {
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__ */ S("div", {
131
+ /* @__PURE__ */ C("div", {
132
132
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
133
- children: [/* @__PURE__ */ x("div", {
133
+ children: [/* @__PURE__ */ S("div", {
134
134
  className: "text-xs uppercase tracking-wide text-text-muted",
135
135
  children: "Total sales"
136
- }), /* @__PURE__ */ x("div", {
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__ */ x("div", {
143
+ /* @__PURE__ */ S("div", {
144
144
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
145
- children: /* @__PURE__ */ S("div", {
145
+ children: /* @__PURE__ */ C("div", {
146
146
  className: "flex items-start gap-3",
147
- children: [/* @__PURE__ */ x(h, { className: "mt-0.5 size-5 text-text-muted" }), /* @__PURE__ */ S("div", {
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__ */ x("p", {
150
+ /* @__PURE__ */ S("p", {
151
151
  className: "font-medium text-text-primary",
152
152
  children: "Correct payout model"
153
153
  }),
154
- /* @__PURE__ */ S("p", {
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__ */ x("strong", { children: "earned credits" }),
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__ */ x("p", {
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__ */ S("section", {
170
+ /* @__PURE__ */ C("section", {
171
171
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
172
172
  children: [
173
- /* @__PURE__ */ x("h3", {
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__ */ x("p", {
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__ */ x("div", {
181
+ /* @__PURE__ */ S("div", {
182
182
  className: "mt-4 overflow-x-auto",
183
- children: /* @__PURE__ */ S("table", {
183
+ children: /* @__PURE__ */ C("table", {
184
184
  className: "min-w-full text-sm",
185
- children: [/* @__PURE__ */ x("thead", {
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__ */ S("tr", { children: [
188
- /* @__PURE__ */ x("th", {
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__ */ x("th", {
192
+ /* @__PURE__ */ S("th", {
193
193
  className: "px-3 py-2",
194
194
  children: "Purchased"
195
195
  }),
196
- /* @__PURE__ */ x("th", {
196
+ /* @__PURE__ */ S("th", {
197
197
  className: "px-3 py-2",
198
198
  children: "Net revenue"
199
199
  }),
200
- /* @__PURE__ */ x("th", {
200
+ /* @__PURE__ */ S("th", {
201
201
  className: "px-3 py-2",
202
202
  children: "Credit sync"
203
203
  }),
204
- /* @__PURE__ */ x("th", {
204
+ /* @__PURE__ */ S("th", {
205
205
  className: "px-3 py-2",
206
206
  children: "Status"
207
207
  })
208
208
  ] })
209
- }), /* @__PURE__ */ x("tbody", { children: t.unpaidSales.items.length === 0 ? /* @__PURE__ */ x("tr", { children: /* @__PURE__ */ x("td", {
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__ */ S("tr", {
213
+ }) }) : t.unpaidSales.items.map((t) => /* @__PURE__ */ C("tr", {
214
214
  className: "border-t border-border-seam",
215
215
  children: [
216
- /* @__PURE__ */ S("td", {
216
+ /* @__PURE__ */ C("td", {
217
217
  className: "px-3 py-2",
218
- children: [/* @__PURE__ */ x("div", {
218
+ children: [/* @__PURE__ */ S("div", {
219
219
  className: "font-medium text-text-primary",
220
220
  children: t.application?.name ?? "Unknown app"
221
- }), /* @__PURE__ */ S("div", {
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__ */ x("td", {
226
+ /* @__PURE__ */ S("td", {
227
227
  className: "px-3 py-2 text-text-secondary",
228
228
  children: a(t.purchasedAt)
229
229
  }),
230
- /* @__PURE__ */ x("td", {
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__ */ S("td", {
234
+ /* @__PURE__ */ C("td", {
235
235
  className: "px-3 py-2 text-text-secondary",
236
236
  children: [
237
- /* @__PURE__ */ x("div", { children: t.billingCreditSyncStatus ?? "UNKNOWN" }),
238
- t.billingCreditSyncError && /* @__PURE__ */ x("div", {
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__ */ x("button", {
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__ */ x("td", {
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__ */ x(D, { children: /* @__PURE__ */ x("button", {
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 M = () => {
274
- let a = s(), { apiGatewayUrl: m, authToken: h, orgId: g, navigate: v, basePath: y } = e(), [w, T] = p([]), [E, D] = p(!0), [O, k] = p(null), [M, N] = p(null), [P, F] = p(null), [I, L] = p(!1), [R, z] = p(null), [B, V] = p(null), H = f(() => ({
275
- apiGatewayUrl: m,
276
- authToken: h,
277
- orgId: g
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
- ]), U = async () => {
283
- D(!0), k(null);
280
+ g,
281
+ _
282
+ ]), W = d(async () => {
283
+ O(!0), A(null);
284
284
  try {
285
- T((await l(H)).filter((e) => e.totalRevenue > 0 || e.pendingBalance > 0 || e.totalPayouts > 0));
285
+ E((await l(U)).filter((e) => e.totalRevenue > 0 || e.pendingBalance > 0 || e.totalPayouts > 0));
286
286
  } catch (e) {
287
- k(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load developer revenue"));
287
+ A(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load developer revenue"));
288
288
  } finally {
289
- D(!1);
289
+ O(!1);
290
290
  }
291
- }, W = async (e) => {
292
- N(e), L(!0), z(null);
291
+ }, [U]), G = async (e) => {
292
+ P(e), R(!0), B(null);
293
293
  try {
294
- F(await c(e.id, H));
294
+ I(await c(e.id, U));
295
295
  } catch (e) {
296
- F(null), z(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load revenue detail"));
296
+ I(null), B(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load revenue detail"));
297
297
  } finally {
298
- L(!1);
298
+ R(!1);
299
299
  }
300
300
  };
301
- return d(() => {
302
- a.isBillingAdmin && U();
303
- }, [a.isBillingAdmin, H]), a.isBillingAdmin ? O && o(O) ? /* @__PURE__ */ x(r, {
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: O.message,
305
+ message: k.message,
306
306
  showRetry: !0,
307
- onRetry: () => void U()
308
- }) : /* @__PURE__ */ S("div", {
307
+ onRetry: () => void W()
308
+ }) : /* @__PURE__ */ C("div", {
309
309
  className: "space-y-6 p-6",
310
310
  children: [
311
- /* @__PURE__ */ x(n, {
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__ */ x("button", {
314
+ actions: /* @__PURE__ */ S("button", {
315
315
  type: "button",
316
- onClick: () => v?.(`${y}/payouts`),
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__ */ x(C, { 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
- E ? /* @__PURE__ */ x("div", {
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__ */ x(_, { className: "size-8 animate-spin" })
325
- }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(A, { orgs: w }), /* @__PURE__ */ S("div", {
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__ */ S("div", {
327
+ children: [/* @__PURE__ */ C("div", {
328
328
  className: "border-b border-border-seam px-5 py-4",
329
- children: [/* @__PURE__ */ x("h2", {
329
+ children: [/* @__PURE__ */ S("h2", {
330
330
  className: "text-base font-semibold text-text-primary",
331
331
  children: "Organizations"
332
- }), /* @__PURE__ */ x("p", {
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
- }), w.length === 0 ? /* @__PURE__ */ x("div", {
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__ */ x("div", {
339
+ }) : /* @__PURE__ */ S("div", {
340
340
  className: "overflow-x-auto",
341
- children: /* @__PURE__ */ S("table", {
341
+ children: /* @__PURE__ */ C("table", {
342
342
  className: "min-w-full text-sm",
343
- children: [/* @__PURE__ */ x("thead", {
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__ */ S("tr", { children: [
346
- /* @__PURE__ */ x("th", {
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__ */ x("th", {
350
+ /* @__PURE__ */ S("th", {
351
351
  className: "px-4 py-3",
352
352
  children: "Billing linked"
353
353
  }),
354
- /* @__PURE__ */ x("th", {
354
+ /* @__PURE__ */ S("th", {
355
355
  className: "px-4 py-3",
356
356
  children: "Revenue"
357
357
  }),
358
- /* @__PURE__ */ x("th", {
358
+ /* @__PURE__ */ S("th", {
359
359
  className: "px-4 py-3",
360
360
  children: "Platform fee"
361
361
  }),
362
- /* @__PURE__ */ x("th", {
362
+ /* @__PURE__ */ S("th", {
363
363
  className: "px-4 py-3",
364
364
  children: "Earned credits pending withdrawal"
365
365
  }),
366
- /* @__PURE__ */ x("th", {
366
+ /* @__PURE__ */ S("th", {
367
367
  className: "px-4 py-3",
368
368
  children: "Already withdrawn"
369
369
  })
370
370
  ] })
371
- }), /* @__PURE__ */ x("tbody", { children: [...w].sort((e, t) => t.pendingBalance - e.pendingBalance).map((e) => /* @__PURE__ */ S("tr", {
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 W(e),
373
+ onClick: () => void G(e),
374
374
  children: [
375
- /* @__PURE__ */ S("td", {
375
+ /* @__PURE__ */ C("td", {
376
376
  className: "px-4 py-3",
377
- children: [/* @__PURE__ */ x("div", {
377
+ children: [/* @__PURE__ */ S("div", {
378
378
  className: "font-medium text-text-primary",
379
379
  children: e.name
380
- }), /* @__PURE__ */ S("div", {
380
+ }), /* @__PURE__ */ C("div", {
381
381
  className: "text-xs text-text-muted",
382
382
  children: ["/", e.slug]
383
383
  })]
384
384
  }),
385
- /* @__PURE__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x(j, {
411
- org: M,
412
- detail: P,
413
- loading: I,
414
- error: R,
415
- retryingSaleId: B,
410
+ /* @__PURE__ */ S(M, {
411
+ org: N,
412
+ detail: F,
413
+ loading: L,
414
+ error: z,
415
+ retryingSaleId: V,
416
416
  onRetrySale: (e) => {
417
- M && (async () => {
418
- V(e), z(null);
417
+ N && (async () => {
418
+ H(e), B(null);
419
419
  try {
420
- await u(e, H), await W(M);
420
+ await u(e, U), await G(N);
421
421
  } catch (e) {
422
- z(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to retry credit sync"));
422
+ B(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to retry credit sync"));
423
423
  } finally {
424
- V(null);
424
+ H(null);
425
425
  }
426
426
  })();
427
427
  },
428
428
  onClose: () => {
429
- N(null), F(null), z(null);
429
+ P(null), I(null), B(null);
430
430
  }
431
431
  })
432
432
  ]
433
- }) : /* @__PURE__ */ x(t, { message: "You don't have permission to view developer revenue." });
433
+ }) : /* @__PURE__ */ S(t, { message: "You don't have permission to view developer revenue." });
434
434
  };
435
435
  //#endregion
436
- export { M as DeveloperRevenueAdminPage };
436
+ export { N as DeveloperRevenueAdminPage };
437
437
 
438
438
  //# sourceMappingURL=DeveloperRevenueAdminPage.js.map