@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.4

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 (118) hide show
  1. package/dist/billing/BillingRoot.js +83 -77
  2. package/dist/billing/BillingRoot.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
  6. package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
  7. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
  8. package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
  9. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
  10. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  11. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
  12. package/dist/billing/modules/billing/hooks/index.js +5 -5
  13. package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
  14. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  15. package/dist/billing/modules/billing/index.js +14 -14
  16. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
  20. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
  22. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
  31. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  32. package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
  33. package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
  34. package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
  35. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
  36. package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
  37. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  38. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
  39. package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
  42. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +187 -164
  43. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  44. package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
  45. package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
  46. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  47. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
  48. package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
  49. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
  51. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  52. package/dist/billing/modules/earnings/components/PayoutDestinationList.d.ts +15 -0
  53. package/dist/billing/modules/earnings/components/PayoutDestinationList.js +66 -0
  54. package/dist/billing/modules/earnings/components/PayoutDestinationList.js.map +1 -0
  55. package/dist/billing/modules/earnings/components/PayoutErrorNotice.d.ts +7 -0
  56. package/dist/billing/modules/earnings/components/PayoutErrorNotice.js +19 -0
  57. package/dist/billing/modules/earnings/components/PayoutErrorNotice.js.map +1 -0
  58. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
  59. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
  60. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  61. package/dist/billing/modules/earnings/pages/EarningsPage.js +123 -110
  62. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  63. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
  64. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  65. package/dist/billing/modules/earnings/pages/PayoutsPage.js +215 -157
  66. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  67. package/dist/billing/modules/earnings/utils/payoutDestination.d.ts +20 -0
  68. package/dist/billing/modules/earnings/utils/payoutDestination.js +27 -0
  69. package/dist/billing/modules/earnings/utils/payoutDestination.js.map +1 -0
  70. package/dist/billing/modules/earnings/utils/plainPayoutError.d.ts +10 -0
  71. package/dist/billing/modules/earnings/utils/plainPayoutError.js +50 -0
  72. package/dist/billing/modules/earnings/utils/plainPayoutError.js.map +1 -0
  73. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
  74. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
  75. package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
  76. package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
  77. package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
  78. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  79. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
  80. package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
  81. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
  82. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
  83. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
  84. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
  85. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
  86. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
  87. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
  88. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
  89. package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
  90. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  91. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
  92. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  93. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
  94. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
  95. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  96. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
  97. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
  98. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  99. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
  100. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
  101. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
  102. package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
  103. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
  104. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
  105. package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
  106. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  107. package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
  108. package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
  109. package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
  110. package/dist/billing/shared/components/EmptyState.js +3 -3
  111. package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
  112. package/dist/billing/shared/ui/MetricCard.js +13 -13
  113. package/dist/billing/shared/utils/format.js +16 -4
  114. package/dist/billing/shared/utils/format.js.map +1 -1
  115. package/dist/billing/shared/utils/index.js +8 -8
  116. package/dist/generated/global-operations.js +294 -286
  117. package/dist/generated/global-operations.js.map +1 -1
  118. package/package.json +2 -2
@@ -5,200 +5,206 @@ import { useTr as r } from "./shared/hooks/useTr.js";
5
5
  import { useEffect as i } from "react";
6
6
  import { ErrorBoundary as a } from "@burdenoff/fe-libs/shared/components";
7
7
  import { FeatureFlagProvider as o } from "@burdenoff/fe-libs/shared/feature-flags";
8
- import { Activity as s, Blocks as c, Coins as l, DollarSign as u, Gauge as d, Gift as f, Landmark as p, LayoutDashboard as m, Package as h, RefreshCw as g, RotateCcw as _, Settings as v, Ticket as y, TicketCheck as b, TrendingUp as x } from "lucide-react";
9
- import { jsx as S } from "react/jsx-runtime";
8
+ import { useHeadingDocumentTitle as s } from "@burdenoff/fe-libs/ui";
9
+ import { Activity as c, Blocks as l, Coins as u, DollarSign as d, Gauge as f, Gift as p, Landmark as m, LayoutDashboard as h, Package as g, RefreshCw as _, RotateCcw as v, Settings as y, Ticket as b, TicketCheck as x, TrendingUp as S } from "lucide-react";
10
+ import { jsx as C } from "react/jsx-runtime";
10
11
  // src/billing/BillingRoot.tsx
11
- var C = (C) => {
12
- let w = r(), { registerNavItems: T, registerFooterItems: E, basePath: D = "/", mode: O = "user" } = C, k = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
12
+ var w = (w) => {
13
+ let T = r(), { registerNavItems: E, registerFooterItems: D, basePath: O = "/", mode: k = "user" } = w;
14
+ s({
15
+ enabled: w.variant === "fluidgrids",
16
+ suffix: "FluidGrids"
17
+ });
18
+ let A = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
13
19
  return i(() => {
14
- if (!T) return;
20
+ if (!E) return;
15
21
  let e = [
16
22
  {
17
23
  id: "billing-overview",
18
- label: w("billing.nav.billing", "Billing"),
19
- path: D === "/" ? "/" : k(D, "overview"),
20
- icon: /* @__PURE__ */ S(m, { size: 20 }),
24
+ label: T("billing.nav.billing", "Billing"),
25
+ path: O === "/" ? "/" : A(O, "overview"),
26
+ icon: /* @__PURE__ */ C(h, { size: 20 }),
21
27
  order: 100,
22
28
  group: "billing"
23
29
  },
24
30
  {
25
31
  id: "billing-subscriptions",
26
- label: w("billing.nav.subscriptions", "Subscriptions"),
27
- path: k(D, "subscriptions"),
28
- icon: /* @__PURE__ */ S(g, { size: 20 }),
32
+ label: T("billing.nav.subscriptions", "Subscriptions"),
33
+ path: A(O, "subscriptions"),
34
+ icon: /* @__PURE__ */ C(_, { size: 20 }),
29
35
  order: 110,
30
36
  group: "billing"
31
37
  },
32
38
  {
33
39
  id: "billing-plans",
34
- label: w("billing.nav.plans", "Plans"),
35
- path: k(D, "plans"),
36
- icon: /* @__PURE__ */ S(h, { size: 20 }),
40
+ label: T("billing.nav.plans", "Plans"),
41
+ path: A(O, "plans"),
42
+ icon: /* @__PURE__ */ C(g, { size: 20 }),
37
43
  order: 120,
38
44
  group: "billing"
39
45
  },
40
46
  {
41
47
  id: "billing-addons",
42
- label: w("billing.nav.addons", "Addons"),
43
- path: k(D, "addons"),
44
- icon: /* @__PURE__ */ S(c, { size: 20 }),
48
+ label: T("billing.nav.addons", "Addons"),
49
+ path: A(O, "addons"),
50
+ icon: /* @__PURE__ */ C(l, { size: 20 }),
45
51
  order: 130,
46
52
  group: "billing"
47
53
  },
48
54
  {
49
55
  id: "billing-usage",
50
- label: w("billing.nav.usage", "Usage"),
51
- path: k(D, "usage"),
52
- icon: /* @__PURE__ */ S(s, { size: 20 }),
56
+ label: T("billing.nav.usage", "Usage"),
57
+ path: A(O, "usage"),
58
+ icon: /* @__PURE__ */ C(c, { size: 20 }),
53
59
  order: 180,
54
60
  group: "billing"
55
61
  },
56
62
  {
57
63
  id: "billing-affiliate",
58
- label: w("billing.nav.affiliate", "Affiliate"),
59
- path: k(D, "affiliate"),
60
- icon: /* @__PURE__ */ S(b, { size: 20 }),
64
+ label: T("billing.nav.affiliate", "Affiliate"),
65
+ path: A(O, "affiliate"),
66
+ icon: /* @__PURE__ */ C(x, { size: 20 }),
61
67
  order: 190,
62
68
  group: "billing"
63
69
  },
64
70
  {
65
71
  id: "billing-earnings",
66
- label: w("billing.nav.earnings", "Earnings"),
67
- path: k(D, "earnings"),
68
- icon: /* @__PURE__ */ S(l, { size: 20 }),
72
+ label: T("billing.nav.earnings", "Earnings"),
73
+ path: A(O, "earnings"),
74
+ icon: /* @__PURE__ */ C(u, { size: 20 }),
69
75
  order: 200,
70
76
  group: "billing"
71
77
  },
72
78
  {
73
79
  id: "billing-payouts",
74
- label: w("billing.nav.payouts", "Payouts"),
75
- path: k(D, "payouts"),
76
- icon: /* @__PURE__ */ S(p, { size: 20 }),
80
+ label: T("billing.nav.payouts", "Payouts"),
81
+ path: A(O, "payouts"),
82
+ icon: /* @__PURE__ */ C(m, { size: 20 }),
77
83
  order: 205,
78
84
  group: "billing"
79
85
  },
80
86
  {
81
87
  id: "billing-settings",
82
- label: w("billing.nav.settings", "Settings"),
83
- path: k(D, "settings"),
84
- icon: /* @__PURE__ */ S(v, { size: 20 }),
88
+ label: T("billing.nav.settings", "Settings"),
89
+ path: A(O, "settings"),
90
+ icon: /* @__PURE__ */ C(y, { size: 20 }),
85
91
  order: 210,
86
92
  group: "billing"
87
93
  }
88
94
  ], t = [
89
95
  {
90
96
  id: "billing-plans",
91
- label: w("billing.nav.plans", "Plans"),
92
- path: k(D, "plans"),
93
- icon: /* @__PURE__ */ S(h, { size: 20 }),
97
+ label: T("billing.nav.plans", "Plans"),
98
+ path: A(O, "plans"),
99
+ icon: /* @__PURE__ */ C(g, { size: 20 }),
94
100
  order: 100,
95
101
  group: "billing"
96
102
  },
97
103
  {
98
104
  id: "billing-addons",
99
- label: w("billing.nav.addons", "Addons"),
100
- path: k(D, "addons"),
101
- icon: /* @__PURE__ */ S(c, { size: 20 }),
105
+ label: T("billing.nav.addons", "Addons"),
106
+ path: A(O, "addons"),
107
+ icon: /* @__PURE__ */ C(l, { size: 20 }),
102
108
  order: 110,
103
109
  group: "billing"
104
110
  },
105
111
  {
106
112
  id: "billing-quotas",
107
- label: w("billing.nav.quotas", "Quotas"),
108
- path: k(D, "quotas"),
109
- icon: /* @__PURE__ */ S(d, { size: 20 }),
113
+ label: T("billing.nav.quotas", "Quotas"),
114
+ path: A(O, "quotas"),
115
+ icon: /* @__PURE__ */ C(f, { size: 20 }),
110
116
  order: 120,
111
117
  group: "billing"
112
118
  },
113
119
  {
114
120
  id: "billing-coupons",
115
- label: w("billing.nav.coupons", "Coupons"),
116
- path: k(D, "coupons"),
117
- icon: /* @__PURE__ */ S(y, { size: 20 }),
121
+ label: T("billing.nav.coupons", "Coupons"),
122
+ path: A(O, "coupons"),
123
+ icon: /* @__PURE__ */ C(b, { size: 20 }),
118
124
  order: 130,
119
125
  group: "billing"
120
126
  },
121
127
  {
122
128
  id: "billing-promotions",
123
- label: w("billing.nav.promotions", "Promotions"),
124
- path: k(D, "promotions"),
125
- icon: /* @__PURE__ */ S(f, { size: 20 }),
129
+ label: T("billing.nav.promotions", "Promotions"),
130
+ path: A(O, "promotions"),
131
+ icon: /* @__PURE__ */ C(p, { size: 20 }),
126
132
  order: 135,
127
133
  group: "billing"
128
134
  },
129
135
  {
130
136
  id: "billing-credits-admin",
131
- label: w("billing.nav.creditGrants", "Credit Grants"),
132
- path: k(D, "credits"),
133
- icon: /* @__PURE__ */ S(l, { size: 20 }),
137
+ label: T("billing.nav.creditGrants", "Credit Grants"),
138
+ path: A(O, "credits"),
139
+ icon: /* @__PURE__ */ C(u, { size: 20 }),
134
140
  order: 150,
135
141
  group: "billing"
136
142
  },
137
143
  {
138
144
  id: "billing-refunds",
139
- label: w("billing.nav.refunds", "Refunds"),
140
- path: k(D, "refunds"),
141
- icon: /* @__PURE__ */ S(_, { size: 20 }),
145
+ label: T("billing.nav.refunds", "Refunds"),
146
+ path: A(O, "refunds"),
147
+ icon: /* @__PURE__ */ C(v, { size: 20 }),
142
148
  order: 160,
143
149
  group: "billing"
144
150
  },
145
151
  {
146
152
  id: "billing-admin-developer-revenue",
147
- label: w("billing.nav.developerRevenue", "Developer Revenue"),
148
- path: k(D, "developer-revenue"),
149
- icon: /* @__PURE__ */ S(u, { size: 20 }),
153
+ label: T("billing.nav.developerRevenue", "Developer Revenue"),
154
+ path: A(O, "developer-revenue"),
155
+ icon: /* @__PURE__ */ C(d, { size: 20 }),
150
156
  order: 164,
151
157
  group: "billing"
152
158
  },
153
159
  {
154
160
  id: "billing-admin-payouts",
155
- label: w("billing.nav.payouts", "Payouts"),
156
- path: k(D, "payouts"),
157
- icon: /* @__PURE__ */ S(p, { size: 20 }),
161
+ label: T("billing.nav.payouts", "Payouts"),
162
+ path: A(O, "payouts"),
163
+ icon: /* @__PURE__ */ C(m, { size: 20 }),
158
164
  order: 165,
159
165
  group: "billing"
160
166
  },
161
167
  {
162
168
  id: "billing-analytics",
163
- label: w("billing.nav.analytics", "Analytics"),
164
- path: k(D, "analytics"),
165
- icon: /* @__PURE__ */ S(x, { size: 20 }),
169
+ label: T("billing.nav.analytics", "Analytics"),
170
+ path: A(O, "analytics"),
171
+ icon: /* @__PURE__ */ C(S, { size: 20 }),
166
172
  order: 170,
167
173
  group: "billing"
168
174
  }
169
175
  ];
170
- return T(O === "admin" ? t : e);
176
+ return E(k === "admin" ? t : e);
171
177
  }, [
172
- T,
173
- D,
178
+ E,
174
179
  O,
175
- w
180
+ k,
181
+ T
176
182
  ]), i(() => {
177
- if (!E) return;
183
+ if (!D) return;
178
184
  let e = [{
179
185
  id: "billing-status",
180
- label: w("billing.nav.billingReady", "Billing Ready"),
186
+ label: T("billing.nav.billingReady", "Billing Ready"),
181
187
  type: "status",
182
188
  order: 10,
183
189
  section: "left"
184
190
  }];
185
- return E(e);
186
- }, [E, w]), /* @__PURE__ */ S(a, {
187
- fallback: /* @__PURE__ */ S("div", {
191
+ return D(e);
192
+ }, [D, T]), /* @__PURE__ */ C(a, {
193
+ fallback: /* @__PURE__ */ C("div", {
188
194
  className: "flex min-h-[240px] items-center justify-center px-6 py-10 text-center text-sm text-text-secondary",
189
- children: w("billing.errorBoundary.message", "Something went wrong loading this module. Please refresh the page.")
195
+ children: T("billing.errorBoundary.message", "Something went wrong loading this module. Please refresh the page.")
190
196
  }),
191
- children: /* @__PURE__ */ S(o, {
197
+ children: /* @__PURE__ */ C(o, {
192
198
  workspaceId: null,
193
199
  gateway: "global",
194
200
  defaultEnabled: !0,
195
- children: /* @__PURE__ */ S(e, {
196
- ...C,
197
- children: S(O === "admin" ? n : t, {})
201
+ children: /* @__PURE__ */ C(e, {
202
+ ...w,
203
+ children: C(k === "admin" ? n : t, {})
198
204
  })
199
205
  })
200
206
  });
201
207
  };
202
- export { C as BillingRoot };
208
+ export { w as BillingRoot };
203
209
 
204
210
  //# sourceMappingURL=BillingRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BillingRoot.js","names":["BillingRoot","tr","useTr","props","joinPath","base","path","useEffect","registerNavItems","userNavItems","basePath","LayoutDashboard","RefreshCw","Package","Blocks","Activity","TicketCheck","Coins","Landmark","Settings","adminNavItems","Gauge","Ticket","Gift","RotateCcw","DollarSign","TrendingUp","mode","registerFooterItems","footerItems","ErrorBoundary","FeatureFlagProvider","BillingProvider","jsx","BillingAdminRoutes","BillingUserRoutes"],"sources":["../../src/billing/BillingRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n RefreshCw,\n Package,\n Blocks,\n Gauge,\n RotateCcw,\n Activity,\n TrendingUp,\n Settings,\n Ticket,\n Coins,\n TicketCheck,\n Landmark,\n Gift,\n DollarSign,\n} from 'lucide-react';\nimport { BillingProvider } from './providers/BillingProvider';\nimport type { NavItem, BillingRootProps } from './types';\nimport { BillingUserRoutes } from './BillingUserRoutes';\nimport { BillingAdminRoutes } from './BillingAdminRoutes';\nimport { useTr } from './shared/hooks/useTr';\n\n/**\n * Root component for the Billing microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { BillingRoot, type BillingRootProps } from '@burdenoff/microfe-billing';\n *\n * function App() {\n * const props: BillingRootProps = {\n * basePath: '/billing',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * orgId: 'org-123',\n * apiGatewayUrl: 'https://api.example.com/tenant/graphql',\n * authToken: 'token',\n * stripePublishableKey: 'pk_test_...',\n * razorpayKey: 'rzp_test_...',\n * onSubscriptionCreate: (subscription) => console.log('Subscription created:', subscription),\n * onSubscriptionUpdate: (subscription) => console.log('Subscription updated:', subscription),\n * onPaymentProcess: (payment) => console.log('Payment processed:', payment),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <BillingRoot {...props} />;\n * }\n * ```\n */\nexport const BillingRoot: FC<BillingRootProps> = (props) => {\n const tr = useTr();\n const { registerNavItems, registerFooterItems, basePath = '/', mode = 'user' } = props;\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell based on mode\n useEffect(() => {\n if (!registerNavItems) return;\n\n const userNavItems: NavItem[] = [\n {\n id: 'billing-overview',\n label: tr('billing.nav.billing', 'Billing'),\n path: basePath === '/' ? '/' : joinPath(basePath, 'overview'),\n icon: <LayoutDashboard size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-subscriptions',\n label: tr('billing.nav.subscriptions', 'Subscriptions'),\n path: joinPath(basePath, 'subscriptions'),\n icon: <RefreshCw size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-usage',\n label: tr('billing.nav.usage', 'Usage'),\n path: joinPath(basePath, 'usage'),\n icon: <Activity size={20} />,\n order: 180,\n group: 'billing',\n },\n {\n id: 'billing-affiliate',\n label: tr('billing.nav.affiliate', 'Affiliate'),\n path: joinPath(basePath, 'affiliate'),\n icon: <TicketCheck size={20} />,\n order: 190,\n group: 'billing',\n },\n {\n id: 'billing-earnings',\n label: tr('billing.nav.earnings', 'Earnings'),\n path: joinPath(basePath, 'earnings'),\n icon: <Coins size={20} />,\n order: 200,\n group: 'billing',\n },\n {\n id: 'billing-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 205,\n group: 'billing',\n },\n {\n id: 'billing-settings',\n label: tr('billing.nav.settings', 'Settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 210,\n group: 'billing',\n },\n ];\n\n const adminNavItems: NavItem[] = [\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-quotas',\n label: tr('billing.nav.quotas', 'Quotas'),\n path: joinPath(basePath, 'quotas'),\n icon: <Gauge size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-coupons',\n label: tr('billing.nav.coupons', 'Coupons'),\n path: joinPath(basePath, 'coupons'),\n icon: <Ticket size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-promotions',\n label: tr('billing.nav.promotions', 'Promotions'),\n path: joinPath(basePath, 'promotions'),\n icon: <Gift size={20} />,\n order: 135,\n group: 'billing',\n },\n\n {\n id: 'billing-credits-admin',\n label: tr('billing.nav.creditGrants', 'Credit Grants'),\n path: joinPath(basePath, 'credits'),\n icon: <Coins size={20} />,\n order: 150,\n group: 'billing',\n },\n {\n id: 'billing-refunds',\n label: tr('billing.nav.refunds', 'Refunds'),\n path: joinPath(basePath, 'refunds'),\n icon: <RotateCcw size={20} />,\n order: 160,\n group: 'billing',\n },\n {\n id: 'billing-admin-developer-revenue',\n label: tr('billing.nav.developerRevenue', 'Developer Revenue'),\n path: joinPath(basePath, 'developer-revenue'),\n icon: <DollarSign size={20} />,\n order: 164,\n group: 'billing',\n },\n {\n id: 'billing-admin-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 165,\n group: 'billing',\n },\n {\n id: 'billing-analytics',\n label: tr('billing.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <TrendingUp size={20} />,\n order: 170,\n group: 'billing',\n },\n ];\n\n const navItems = mode === 'admin' ? adminNavItems : userNavItems;\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, mode, tr]);\n\n // Register footer items (example: billing status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'billing-status',\n label: tr('billing.nav.billingReady', 'Billing Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"flex min-h-[240px] items-center justify-center px-6 py-10 text-center text-sm text-text-secondary\">\n {tr(\n 'billing.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BillingProvider {...props}>\n {mode === 'admin' ? <BillingAdminRoutes /> : <BillingUserRoutes />}\n </BillingProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AA2DA,IAAaA,KAAqC,MAAU;CAC1D,IAAMC,IAAKC,EAAM,GACX,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,UAAO,WAAWC,GAG3EC,KAAY,GAAc,OACZC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;CA8LtD,OAzLAC,QAAgB;EACd,IAAI,CAACC,GAAkB;EAEvB,IAAMC,IAA0B;GAC9B;IACE,IAAI;IACJ,OAAOR,EAAG,uBAAuB,SAAS;IAC1C,MAAMS,MAAa,MAAM,MAAMN,EAASM,GAAU,UAAU;IAC5D,MAAM,kBAACC,GAAD,EAAiB,MAAM,GAAK,CAAA;IAClC,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOV,EAAG,6BAA6B,eAAe;IACtD,MAAMG,EAASM,GAAU,eAAe;IACxC,MAAM,kBAACE,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOX,EAAG,qBAAqB,OAAO;I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AS;IAClC,MAAM,kBAACQ,GAAD,EAAU,MAAM,GAAK,CAAA;IAC3B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOjB,EAAG,yBAAyB,WAAW;IAC9C,MAAMG,EAASM,GAAU,WAAW;IACpC,MAAM,kBAACgB,GAAD,EAAY,MAAM,GAAK,CAAA;IAC7B,OAAO;IACP,OAAO;GACT;EACF;EAIA,OADgBlB,EADCmB,MAAS,UAAUP,IAAgBX,CAE7C;CACT,GAAG;EAACD;EAAkBE;EAAUiB;EAAM1B;CAAE,CAAC,GAGzCM,QAAgB;EACd,IAAI,CAACqB,GAAqB;EAE1B,IAAMC,IAAc,CAClB;GACE,IAAI;GACJ,OAAO5B,EAAG,4BAA4B,eAAe;GACrD,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAGA,OADgB2B,EAAoBC,CAC7B;CACT,GAAG,CAACD,GAAqB3B,CAAE,CAAC,GAG1B,kBAAC6B,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA7B,EACC,iCACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAAC8B,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;GACvE,UAAA,kBAACC,GAAD;IAAiB,GAAI7B;IAClB,UAAmB8B,EAAnBN,MAAS,UAAWO,IAAyBC,GAA1B,CAAqB,CAAwB;GAClD,CAAA;EACE,CAAA;CACR,CAAA;AAEnB"}
1
+ {"version":3,"file":"BillingRoot.js","names":["BillingRoot","tr","useTr","props","joinPath","base","path","useEffect","registerNavItems","userNavItems","basePath","LayoutDashboard","RefreshCw","Package","Blocks","Activity","TicketCheck","Coins","Landmark","Settings","adminNavItems","Gauge","Ticket","Gift","RotateCcw","DollarSign","TrendingUp","mode","registerFooterItems","footerItems","ErrorBoundary","FeatureFlagProvider","BillingProvider","jsx","BillingAdminRoutes","BillingUserRoutes"],"sources":["../../src/billing/BillingRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useHeadingDocumentTitle } from '@burdenoff/fe-libs/ui';\nimport {\n LayoutDashboard,\n RefreshCw,\n Package,\n Blocks,\n Gauge,\n RotateCcw,\n Activity,\n TrendingUp,\n Settings,\n Ticket,\n Coins,\n TicketCheck,\n Landmark,\n Gift,\n DollarSign,\n} from 'lucide-react';\nimport { BillingProvider } from './providers/BillingProvider';\nimport type { NavItem, BillingRootProps } from './types';\nimport { BillingUserRoutes } from './BillingUserRoutes';\nimport { BillingAdminRoutes } from './BillingAdminRoutes';\nimport { useTr } from './shared/hooks/useTr';\n\n/**\n * Root component for the Billing microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { BillingRoot, type BillingRootProps } from '@burdenoff/microfe-billing';\n *\n * function App() {\n * const props: BillingRootProps = {\n * basePath: '/billing',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * orgId: 'org-123',\n * apiGatewayUrl: 'https://api.example.com/tenant/graphql',\n * authToken: 'token',\n * stripePublishableKey: 'pk_test_...',\n * razorpayKey: 'rzp_test_...',\n * onSubscriptionCreate: (subscription) => console.log('Subscription created:', subscription),\n * onSubscriptionUpdate: (subscription) => console.log('Subscription updated:', subscription),\n * onPaymentProcess: (payment) => console.log('Payment processed:', payment),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <BillingRoot {...props} />;\n * }\n * ```\n */\nexport const BillingRoot: FC<BillingRootProps> = (props) => {\n const tr = useTr();\n const { registerNavItems, registerFooterItems, basePath = '/', mode = 'user' } = props;\n\n // FluidGrids only (BOFF-11860): each page's browser tab title follows its main heading.\n useHeadingDocumentTitle({ enabled: props.variant === 'fluidgrids', suffix: 'FluidGrids' });\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell based on mode\n useEffect(() => {\n if (!registerNavItems) return;\n\n const userNavItems: NavItem[] = [\n {\n id: 'billing-overview',\n label: tr('billing.nav.billing', 'Billing'),\n path: basePath === '/' ? '/' : joinPath(basePath, 'overview'),\n icon: <LayoutDashboard size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-subscriptions',\n label: tr('billing.nav.subscriptions', 'Subscriptions'),\n path: joinPath(basePath, 'subscriptions'),\n icon: <RefreshCw size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-usage',\n label: tr('billing.nav.usage', 'Usage'),\n path: joinPath(basePath, 'usage'),\n icon: <Activity size={20} />,\n order: 180,\n group: 'billing',\n },\n {\n id: 'billing-affiliate',\n label: tr('billing.nav.affiliate', 'Affiliate'),\n path: joinPath(basePath, 'affiliate'),\n icon: <TicketCheck size={20} />,\n order: 190,\n group: 'billing',\n },\n {\n id: 'billing-earnings',\n label: tr('billing.nav.earnings', 'Earnings'),\n path: joinPath(basePath, 'earnings'),\n icon: <Coins size={20} />,\n order: 200,\n group: 'billing',\n },\n {\n id: 'billing-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 205,\n group: 'billing',\n },\n {\n id: 'billing-settings',\n label: tr('billing.nav.settings', 'Settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 210,\n group: 'billing',\n },\n ];\n\n const adminNavItems: NavItem[] = [\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-quotas',\n label: tr('billing.nav.quotas', 'Quotas'),\n path: joinPath(basePath, 'quotas'),\n icon: <Gauge size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-coupons',\n label: tr('billing.nav.coupons', 'Coupons'),\n path: joinPath(basePath, 'coupons'),\n icon: <Ticket size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-promotions',\n label: tr('billing.nav.promotions', 'Promotions'),\n path: joinPath(basePath, 'promotions'),\n icon: <Gift size={20} />,\n order: 135,\n group: 'billing',\n },\n\n {\n id: 'billing-credits-admin',\n label: tr('billing.nav.creditGrants', 'Credit Grants'),\n path: joinPath(basePath, 'credits'),\n icon: <Coins size={20} />,\n order: 150,\n group: 'billing',\n },\n {\n id: 'billing-refunds',\n label: tr('billing.nav.refunds', 'Refunds'),\n path: joinPath(basePath, 'refunds'),\n icon: <RotateCcw size={20} />,\n order: 160,\n group: 'billing',\n },\n {\n id: 'billing-admin-developer-revenue',\n label: tr('billing.nav.developerRevenue', 'Developer Revenue'),\n path: joinPath(basePath, 'developer-revenue'),\n icon: <DollarSign size={20} />,\n order: 164,\n group: 'billing',\n },\n {\n id: 'billing-admin-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 165,\n group: 'billing',\n },\n {\n id: 'billing-analytics',\n label: tr('billing.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <TrendingUp size={20} />,\n order: 170,\n group: 'billing',\n },\n ];\n\n const navItems = mode === 'admin' ? adminNavItems : userNavItems;\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, mode, tr]);\n\n // Register footer items (example: billing status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'billing-status',\n label: tr('billing.nav.billingReady', 'Billing Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"flex min-h-[240px] items-center justify-center px-6 py-10 text-center text-sm text-text-secondary\">\n {tr(\n 'billing.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BillingProvider {...props}>\n {mode === 'admin' ? <BillingAdminRoutes /> : <BillingUserRoutes />}\n </BillingProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;;AA4DA,IAAaA,KAAqC,MAAU;CAC1D,IAAMC,IAAKC,EAAM,GACX,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,UAAO,WAAWC;CAGjF,EAAwB;EAAE,SAASA,EAAM,YAAY;EAAc,QAAQ;CAAa,CAAC;CAGzF,IAAMC,KAAY,GAAc,OACZC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;CA8LtD,OAzLAC,QAAgB;EACd,IAAI,CAACC,GAAkB;EAEvB,IAAMC,IAA0B;GAC9B;IACE,IAAI;IACJ,OAAOR,EAAG,uBAAuB,SAAS;IAC1C,MAAMS,MAAa,MAAM,MAAMN,EAASM,GAAU,UAAU;IAC5D,MAAM,kBAACC,GAAD,EA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