@burdenoff/microfe-billing 2026.1108.1 → 2026.1108.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 (769) hide show
  1. package/dist/billing/BillingAdminRoutes.d.ts +1 -2
  2. package/dist/billing/BillingAdminRoutes.js +11 -12
  3. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  4. package/dist/billing/BillingRoot.d.ts +0 -1
  5. package/dist/billing/BillingRoot.js +10 -9
  6. package/dist/billing/BillingRoot.js.map +1 -1
  7. package/dist/billing/BillingUserRoutes.d.ts +1 -2
  8. package/dist/billing/BillingUserRoutes.js +13 -14
  9. package/dist/billing/BillingUserRoutes.js.map +1 -1
  10. package/dist/billing/hooks/useBillingAccountSelection.d.ts +0 -1
  11. package/dist/billing/hooks/useBillingAccountSelection.js +7 -5
  12. package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
  13. package/dist/billing/hooks/useBillingEventEmitter.d.ts +0 -1
  14. package/dist/billing/hooks/useBillingEventEmitter.js +1 -2
  15. package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
  16. package/dist/billing/hooks/useBillingNavigate.d.ts +0 -1
  17. package/dist/billing/hooks/useBillingNavigate.js +1 -2
  18. package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
  19. package/dist/billing/hooks/useBillingPermissions.d.ts +0 -1
  20. package/dist/billing/hooks/useBillingPermissions.js +2 -3
  21. package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
  22. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +0 -1
  23. package/dist/billing/hooks/useDefaultBillingCurrency.js +1 -2
  24. package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
  25. package/dist/billing/hooks/useProducts.d.ts +0 -1
  26. package/dist/billing/hooks/useProducts.js +1 -2
  27. package/dist/billing/hooks/useProducts.js.map +1 -1
  28. package/dist/billing/index.d.ts +0 -1
  29. package/dist/billing/lib/native-purchases.d.ts +0 -1
  30. package/dist/billing/lib/native-purchases.js +1 -2
  31. package/dist/billing/lib/native-purchases.js.map +1 -1
  32. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +0 -1
  33. package/dist/billing/modules/addons/components/FloatingCartDrawer.js +4 -5
  34. package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
  35. package/dist/billing/modules/addons/hooks/index.d.ts +0 -1
  36. package/dist/billing/modules/addons/hooks/index.js +3 -2
  37. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +0 -1
  38. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js +1 -2
  39. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js.map +1 -1
  40. package/dist/billing/modules/addons/hooks/useAddons.d.ts +0 -1
  41. package/dist/billing/modules/addons/hooks/useAddons.js +1 -2
  42. package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
  43. package/dist/billing/modules/addons/index.d.ts +0 -1
  44. package/dist/billing/modules/addons/index.js +10 -10
  45. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +0 -1
  46. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +15 -16
  47. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  48. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +0 -1
  49. package/dist/billing/modules/addons/pages/AddonCreatePage.js +11 -12
  50. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  51. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +0 -1
  52. package/dist/billing/modules/addons/pages/AddonDetailPage.js +16 -17
  53. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  54. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +0 -1
  55. package/dist/billing/modules/addons/pages/AddonEditPage.js +16 -17
  56. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  57. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +0 -1
  58. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +111 -106
  59. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  60. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +0 -1
  61. package/dist/billing/modules/addons/pages/AddonsListPage.js +105 -100
  62. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  63. package/dist/billing/modules/addons/pages/index.d.ts +0 -1
  64. package/dist/billing/modules/addons/pages/index.js +7 -6
  65. package/dist/billing/modules/addons/store/addonCartStore.d.ts +0 -1
  66. package/dist/billing/modules/addons/store/addonCartStore.js +2 -7
  67. package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
  68. package/dist/billing/modules/affiliate/api.d.ts +0 -1
  69. package/dist/billing/modules/affiliate/api.js +1 -2
  70. package/dist/billing/modules/affiliate/api.js.map +1 -1
  71. package/dist/billing/modules/affiliate/index.d.ts +0 -1
  72. package/dist/billing/modules/affiliate/index.js +1 -2
  73. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +0 -1
  74. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +29 -28
  75. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  76. package/dist/billing/modules/analytics/index.d.ts +0 -1
  77. package/dist/billing/modules/analytics/index.js +1 -2
  78. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +0 -1
  79. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +8 -9
  80. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  81. package/dist/billing/modules/analytics/pages/index.d.ts +0 -1
  82. package/dist/billing/modules/analytics/pages/index.js +1 -1
  83. package/dist/billing/modules/billing/hooks/index.d.ts +0 -1
  84. package/dist/billing/modules/billing/hooks/index.js +5 -4
  85. package/dist/billing/modules/billing/hooks/useInvoices.d.ts +0 -1
  86. package/dist/billing/modules/billing/hooks/useInvoices.js +1 -2
  87. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  88. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +0 -1
  89. package/dist/billing/modules/billing/hooks/useOrderCallbacks.js +1 -2
  90. package/dist/billing/modules/billing/hooks/useOrderCallbacks.js.map +1 -1
  91. package/dist/billing/modules/billing/hooks/usePayments.d.ts +0 -1
  92. package/dist/billing/modules/billing/hooks/useRefunds.d.ts +0 -1
  93. package/dist/billing/modules/billing/hooks/useRefunds.js +1 -2
  94. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
  95. package/dist/billing/modules/billing/hooks/useTransactions.d.ts +0 -1
  96. package/dist/billing/modules/billing/hooks/useTransactions.js +30 -31
  97. package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
  98. package/dist/billing/modules/billing/index.d.ts +0 -1
  99. package/dist/billing/modules/billing/index.js +15 -15
  100. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +0 -1
  101. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +11 -12
  102. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
  103. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +0 -1
  104. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +53 -59
  105. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  106. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +0 -1
  107. package/dist/billing/modules/billing/pages/InvoicesListPage.js +81 -87
  108. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  109. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +0 -1
  110. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +11 -12
  111. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
  112. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +0 -1
  113. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +51 -54
  114. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  115. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +0 -1
  116. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +33 -34
  117. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
  118. package/dist/billing/modules/billing/pages/RefundsPage.d.ts +0 -1
  119. package/dist/billing/modules/billing/pages/RefundsPage.js +92 -93
  120. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  121. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +0 -1
  122. package/dist/billing/modules/billing/pages/TransactionsPage.js +38 -39
  123. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  124. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +0 -1
  125. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -30
  126. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  127. package/dist/billing/modules/billing/pages/index.d.ts +0 -1
  128. package/dist/billing/modules/billing/pages/index.js +10 -9
  129. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +0 -1
  130. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +0 -1
  131. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -2
  132. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
  133. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +0 -1
  134. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +0 -1
  135. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -2
  136. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  137. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +0 -1
  138. package/dist/billing/modules/checkout/components/CreditsAmountInput.js +1 -2
  139. package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
  140. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +0 -1
  141. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +0 -1
  142. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +0 -1
  143. package/dist/billing/modules/checkout/components/NativeCheckoutView.js +1 -2
  144. package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
  145. package/dist/billing/modules/checkout/components/OrderSummary.d.ts +0 -1
  146. package/dist/billing/modules/checkout/components/OrderSummary.js +35 -32
  147. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
  148. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +0 -1
  149. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +0 -1
  150. package/dist/billing/modules/checkout/components/PromoCodeInput.js +1 -2
  151. package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
  152. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +0 -1
  153. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +1 -2
  154. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
  155. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +0 -1
  156. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +0 -1
  157. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +1 -2
  158. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
  159. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +0 -1
  160. package/dist/billing/modules/checkout/components/StoreShippingSection.js +5 -3
  161. package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
  162. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +0 -1
  163. package/dist/billing/modules/checkout/components/StripePaymentForm.js +35 -41
  164. package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
  165. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +0 -1
  166. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -2
  167. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
  168. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +0 -1
  169. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +1 -2
  170. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
  171. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +0 -1
  172. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js +5 -6
  173. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js.map +1 -1
  174. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +0 -1
  175. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +7 -8
  176. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  177. package/dist/billing/modules/checkout/components/index.d.ts +0 -1
  178. package/dist/billing/modules/checkout/components/index.js +12 -11
  179. package/dist/billing/modules/checkout/hooks/index.d.ts +0 -1
  180. package/dist/billing/modules/checkout/hooks/index.js +5 -4
  181. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +0 -1
  182. package/dist/billing/modules/checkout/hooks/useCheckout.js +182 -195
  183. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
  184. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +0 -1
  185. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +33 -32
  186. package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
  187. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +0 -1
  188. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +1 -2
  189. package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
  190. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +0 -1
  191. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +1 -2
  192. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
  193. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +4 -8
  194. package/dist/billing/modules/checkout/hooks/useStoreShipping.js +1 -2
  195. package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
  196. package/dist/billing/modules/checkout/index.d.ts +0 -1
  197. package/dist/billing/modules/checkout/index.js +19 -19
  198. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +0 -1
  199. package/dist/billing/modules/checkout/pages/CheckoutPage.js +730 -732
  200. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  201. package/dist/billing/modules/checkout/pages/index.d.ts +0 -1
  202. package/dist/billing/modules/checkout/pages/index.js +1 -1
  203. package/dist/billing/modules/checkout/types/index.d.ts +0 -1
  204. package/dist/billing/modules/checkout/utils/storeOrder.d.ts +0 -1
  205. package/dist/billing/modules/checkout/utils/storeOrder.js +0 -1
  206. package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
  207. package/dist/billing/modules/coupons/index.d.ts +0 -1
  208. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +0 -1
  209. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +5 -6
  210. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  211. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +0 -1
  212. package/dist/billing/modules/coupons/pages/CouponsListPage.js +15 -13
  213. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  214. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +0 -1
  215. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +12 -10
  216. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  217. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +0 -1
  218. package/dist/billing/modules/coupons/pages/EditCouponPage.js +7 -11
  219. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  220. package/dist/billing/modules/coupons/pages/index.d.ts +0 -1
  221. package/dist/billing/modules/coupons/pages/index.js +5 -4
  222. package/dist/billing/modules/credits/hooks/index.d.ts +0 -1
  223. package/dist/billing/modules/credits/hooks/useCredits.d.ts +0 -1
  224. package/dist/billing/modules/credits/hooks/useCredits.js +20 -21
  225. package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
  226. package/dist/billing/modules/credits/index.d.ts +0 -1
  227. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +0 -1
  228. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -24
  229. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  230. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +0 -1
  231. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +26 -27
  232. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  233. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +0 -1
  234. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +54 -52
  235. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  236. package/dist/billing/modules/credits/pages/CreditsPage.d.ts +0 -1
  237. package/dist/billing/modules/credits/pages/CreditsPage.js +37 -38
  238. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  239. package/dist/billing/modules/credits/pages/index.d.ts +0 -1
  240. package/dist/billing/modules/credits/pages/index.js +5 -4
  241. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +0 -1
  242. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -3
  243. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
  244. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +0 -1
  245. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -43
  246. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  247. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +0 -1
  248. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +1 -2
  249. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
  250. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +0 -1
  251. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1 -2
  252. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  253. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +0 -1
  254. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +2 -5
  255. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
  256. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +0 -1
  257. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -2
  258. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
  259. package/dist/billing/modules/dashboard/components/index.d.ts +0 -1
  260. package/dist/billing/modules/dashboard/components/index.js +7 -6
  261. package/dist/billing/modules/dashboard/hooks/index.d.ts +0 -1
  262. package/dist/billing/modules/dashboard/hooks/index.js +3 -2
  263. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +0 -1
  264. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +2 -3
  265. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
  266. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +0 -1
  267. package/dist/billing/modules/dashboard/hooks/useDashboard.js +2 -3
  268. package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
  269. package/dist/billing/modules/dashboard/index.d.ts +0 -1
  270. package/dist/billing/modules/dashboard/index.js +11 -10
  271. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +0 -1
  272. package/dist/billing/modules/dashboard/pages/OverviewPage.js +266 -264
  273. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  274. package/dist/billing/modules/dashboard/pages/index.d.ts +0 -1
  275. package/dist/billing/modules/dashboard/pages/index.js +1 -1
  276. package/dist/billing/modules/discounts/index.d.ts +0 -1
  277. package/dist/billing/modules/discounts/index.js +1 -2
  278. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +0 -1
  279. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +169 -176
  280. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  281. package/dist/billing/modules/discounts/pages/index.d.ts +0 -1
  282. package/dist/billing/modules/discounts/pages/index.js +1 -1
  283. package/dist/billing/modules/earnings/api.d.ts +0 -1
  284. package/dist/billing/modules/earnings/api.js +66 -67
  285. package/dist/billing/modules/earnings/api.js.map +1 -1
  286. package/dist/billing/modules/earnings/index.d.ts +0 -1
  287. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +0 -1
  288. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +17 -17
  289. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
  290. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +0 -1
  291. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +188 -189
  292. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  293. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +0 -1
  294. package/dist/billing/modules/earnings/pages/EarningsPage.js +111 -111
  295. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  296. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +0 -1
  297. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +29 -30
  298. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  299. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +0 -1
  300. package/dist/billing/modules/earnings/pages/PayoutsPage.js +103 -104
  301. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  302. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +0 -1
  303. package/dist/billing/modules/earnings/payoutAccountStatus.js +1 -2
  304. package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -1
  305. package/dist/billing/modules/plans/constants/enterprise.d.ts +0 -1
  306. package/dist/billing/modules/plans/constants/enterprise.js +1 -2
  307. package/dist/billing/modules/plans/constants/enterprise.js.map +1 -1
  308. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +0 -1
  309. package/dist/billing/modules/plans/constants/featuredQuotas.js +1 -2
  310. package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
  311. package/dist/billing/modules/plans/hooks/index.d.ts +0 -1
  312. package/dist/billing/modules/plans/hooks/index.js +3 -2
  313. package/dist/billing/modules/plans/hooks/usePlans.d.ts +0 -1
  314. package/dist/billing/modules/plans/hooks/usePlans.js +1 -2
  315. package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
  316. package/dist/billing/modules/plans/hooks/useQuotas.d.ts +0 -1
  317. package/dist/billing/modules/plans/hooks/useQuotas.js +1 -2
  318. package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
  319. package/dist/billing/modules/plans/index.d.ts +0 -1
  320. package/dist/billing/modules/plans/index.js +11 -11
  321. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +0 -1
  322. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +12 -15
  323. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  324. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +0 -1
  325. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +38 -39
  326. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  327. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +0 -1
  328. package/dist/billing/modules/plans/pages/PlanCreatePage.js +10 -11
  329. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  330. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +0 -1
  331. package/dist/billing/modules/plans/pages/PlanDetailPage.js +40 -41
  332. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  333. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +0 -1
  334. package/dist/billing/modules/plans/pages/PlanEditPage.js +15 -16
  335. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  336. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +0 -1
  337. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +18 -19
  338. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  339. package/dist/billing/modules/plans/pages/PlansListPage.d.ts +0 -1
  340. package/dist/billing/modules/plans/pages/PlansListPage.js +100 -101
  341. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  342. package/dist/billing/modules/plans/pages/index.d.ts +0 -1
  343. package/dist/billing/modules/plans/pages/index.js +8 -7
  344. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +0 -1
  345. package/dist/billing/modules/plans/utils/currencyPriceOverrides.js +1 -2
  346. package/dist/billing/modules/plans/utils/currencyPriceOverrides.js.map +1 -1
  347. package/dist/billing/modules/plans/utils/planSelector.d.ts +0 -1
  348. package/dist/billing/modules/plans/utils/planSelector.js +1 -2
  349. package/dist/billing/modules/plans/utils/planSelector.js.map +1 -1
  350. package/dist/billing/modules/promotions/index.d.ts +0 -1
  351. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +0 -1
  352. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +5 -6
  353. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  354. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +0 -1
  355. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +5 -6
  356. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  357. package/dist/billing/modules/promotions/pages/index.d.ts +0 -1
  358. package/dist/billing/modules/promotions/pages/index.js +3 -2
  359. package/dist/billing/modules/quota/hooks/index.d.ts +0 -1
  360. package/dist/billing/modules/quota/hooks/index.js +1 -1
  361. package/dist/billing/modules/quota/hooks/useQuota.d.ts +0 -1
  362. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +0 -1
  363. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +1 -2
  364. package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
  365. package/dist/billing/modules/quota/index.d.ts +0 -1
  366. package/dist/billing/modules/quota/index.js +8 -8
  367. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +0 -1
  368. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +12 -15
  369. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
  370. package/dist/billing/modules/quota/pages/QuotaPage.d.ts +0 -1
  371. package/dist/billing/modules/quota/pages/QuotaPage.js +3 -3
  372. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +0 -1
  373. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +13 -14
  374. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  375. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +0 -1
  376. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +9 -10
  377. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  378. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +0 -1
  379. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +12 -13
  380. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  381. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +0 -1
  382. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +16 -17
  383. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  384. package/dist/billing/modules/quota/pages/index.d.ts +0 -1
  385. package/dist/billing/modules/quota/pages/index.js +6 -5
  386. package/dist/billing/modules/quota/utils/quotaSelector.d.ts +0 -1
  387. package/dist/billing/modules/quota/utils/quotaSelector.js +1 -2
  388. package/dist/billing/modules/quota/utils/quotaSelector.js.map +1 -1
  389. package/dist/billing/modules/settings/index.d.ts +0 -1
  390. package/dist/billing/modules/settings/pages/SettingsPage.d.ts +0 -1
  391. package/dist/billing/modules/settings/pages/SettingsPage.js +12 -13
  392. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  393. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +0 -1
  394. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +32 -32
  395. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  396. package/dist/billing/modules/settings/pages/index.d.ts +0 -1
  397. package/dist/billing/modules/settings/pages/index.js +3 -2
  398. package/dist/billing/modules/store/graphql/index.d.ts +0 -1
  399. package/dist/billing/modules/store/index.d.ts +0 -1
  400. package/dist/billing/modules/store/index.js +1 -2
  401. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +0 -1
  402. package/dist/billing/modules/store/pages/StoreCheckoutPage.js +1 -2
  403. package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
  404. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +0 -1
  405. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +9 -11
  406. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  407. package/dist/billing/modules/subscriptions/hooks/index.d.ts +0 -1
  408. package/dist/billing/modules/subscriptions/hooks/index.js +1 -1
  409. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +0 -1
  410. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +1 -2
  411. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
  412. package/dist/billing/modules/subscriptions/index.d.ts +0 -1
  413. package/dist/billing/modules/subscriptions/index.js +6 -6
  414. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +0 -1
  415. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +311 -312
  416. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  417. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +0 -1
  418. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +61 -62
  419. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  420. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +0 -1
  421. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +30 -31
  422. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  423. package/dist/billing/modules/subscriptions/pages/index.d.ts +0 -1
  424. package/dist/billing/modules/subscriptions/pages/index.js +4 -3
  425. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +0 -1
  426. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +17 -18
  427. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
  428. package/dist/billing/modules/usage/hooks/index.d.ts +0 -1
  429. package/dist/billing/modules/usage/hooks/useUsage.d.ts +0 -1
  430. package/dist/billing/modules/usage/hooks/useUsage.js +72 -73
  431. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
  432. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +0 -1
  433. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js +12 -13
  434. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js.map +1 -1
  435. package/dist/billing/modules/usage/index.d.ts +0 -1
  436. package/dist/billing/modules/usage/index.js +1 -2
  437. package/dist/billing/modules/usage/pages/UsagePage.d.ts +0 -1
  438. package/dist/billing/modules/usage/pages/UsagePage.js +229 -227
  439. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  440. package/dist/billing/modules/usage/pages/index.d.ts +0 -1
  441. package/dist/billing/modules/usage/pages/index.js +1 -1
  442. package/dist/billing/modules/usage/utils/aiSpend.d.ts +0 -1
  443. package/dist/billing/modules/usage/utils/aiSpend.js +2 -3
  444. package/dist/billing/modules/usage/utils/aiSpend.js.map +1 -1
  445. package/dist/billing/providers/BillingProvider.d.ts +0 -1
  446. package/dist/billing/providers/BillingProvider.js +3 -4
  447. package/dist/billing/providers/BillingProvider.js.map +1 -1
  448. package/dist/billing/shared/components/AccessDenied.d.ts +0 -1
  449. package/dist/billing/shared/components/AccessDenied.js +1 -2
  450. package/dist/billing/shared/components/AccessDenied.js.map +1 -1
  451. package/dist/billing/shared/components/ActorIdentity.d.ts +0 -1
  452. package/dist/billing/shared/components/ActorIdentity.js +2 -3
  453. package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
  454. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +0 -1
  455. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +1 -2
  456. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
  457. package/dist/billing/shared/components/EmptyState.d.ts +0 -1
  458. package/dist/billing/shared/components/EmptyState.js +1 -2
  459. package/dist/billing/shared/components/EmptyState.js.map +1 -1
  460. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +0 -1
  461. package/dist/billing/shared/components/PageHeader.d.ts +0 -1
  462. package/dist/billing/shared/components/PageHeader.js +1 -2
  463. package/dist/billing/shared/components/PageHeader.js.map +1 -1
  464. package/dist/billing/shared/components/PushPermissionNudge.d.ts +0 -1
  465. package/dist/billing/shared/components/PushPermissionNudge.js +2 -3
  466. package/dist/billing/shared/components/PushPermissionNudge.js.map +1 -1
  467. package/dist/billing/shared/components/ServerError.d.ts +0 -1
  468. package/dist/billing/shared/components/ServerError.js +1 -2
  469. package/dist/billing/shared/components/ServerError.js.map +1 -1
  470. package/dist/billing/shared/components/StatCard.d.ts +0 -1
  471. package/dist/billing/shared/components/StatCard.js +1 -2
  472. package/dist/billing/shared/components/StatCard.js.map +1 -1
  473. package/dist/billing/shared/components/index.d.ts +0 -1
  474. package/dist/billing/shared/components/index.js +8 -7
  475. package/dist/billing/shared/hooks/index.d.ts +0 -1
  476. package/dist/billing/shared/hooks/index.js +1 -1
  477. package/dist/billing/shared/hooks/useActorProfiles.d.ts +0 -1
  478. package/dist/billing/shared/hooks/useActorProfiles.js +4 -8
  479. package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
  480. package/dist/billing/shared/hooks/useTr.d.ts +0 -1
  481. package/dist/billing/shared/hooks/useTr.js +1 -2
  482. package/dist/billing/shared/hooks/useTr.js.map +1 -1
  483. package/dist/billing/shared/index.d.ts +0 -1
  484. package/dist/billing/shared/types/graphql.d.ts +0 -1
  485. package/dist/billing/shared/types/graphql.js +1 -2
  486. package/dist/billing/shared/types/graphql.js.map +1 -1
  487. package/dist/billing/shared/types/index.d.ts +0 -1
  488. package/dist/billing/shared/ui/Card.d.ts +1 -2
  489. package/dist/billing/shared/ui/Card.js +1 -2
  490. package/dist/billing/shared/ui/Card.js.map +1 -1
  491. package/dist/billing/shared/ui/MetricCard.d.ts +1 -2
  492. package/dist/billing/shared/ui/MetricCard.js +1 -2
  493. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  494. package/dist/billing/shared/ui/ProgressBar.d.ts +1 -2
  495. package/dist/billing/shared/ui/ProgressBar.js +1 -2
  496. package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
  497. package/dist/billing/shared/ui/SectionHeader.d.ts +1 -2
  498. package/dist/billing/shared/ui/StatusPill.d.ts +1 -2
  499. package/dist/billing/shared/ui/StatusPill.js +1 -2
  500. package/dist/billing/shared/ui/StatusPill.js.map +1 -1
  501. package/dist/billing/shared/ui/index.d.ts +0 -1
  502. package/dist/billing/shared/ui/index.js +5 -4
  503. package/dist/billing/shared/utils/directActivityGraphql.d.ts +0 -1
  504. package/dist/billing/shared/utils/directBillingGraphql.d.ts +0 -1
  505. package/dist/billing/shared/utils/directBillingGraphql.js +1 -2
  506. package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
  507. package/dist/billing/shared/utils/error.d.ts +0 -1
  508. package/dist/billing/shared/utils/error.js +1 -2
  509. package/dist/billing/shared/utils/error.js.map +1 -1
  510. package/dist/billing/shared/utils/format.d.ts +0 -1
  511. package/dist/billing/shared/utils/format.js +1 -2
  512. package/dist/billing/shared/utils/format.js.map +1 -1
  513. package/dist/billing/shared/utils/gatewayGraphql.d.ts +0 -1
  514. package/dist/billing/shared/utils/gatewayGraphql.js +2 -3
  515. package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
  516. package/dist/billing/shared/utils/index.d.ts +0 -1
  517. package/dist/billing/shared/utils/index.js +9 -8
  518. package/dist/billing/shared/utils/navigation.d.ts +0 -1
  519. package/dist/billing/shared/utils/navigation.js +1 -2
  520. package/dist/billing/shared/utils/navigation.js.map +1 -1
  521. package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
  522. package/dist/billing/shared/utils/paymentTheme.js +2 -3
  523. package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
  524. package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
  525. package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
  526. package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
  527. package/dist/billing/shared/utils/status.d.ts +0 -1
  528. package/dist/billing/shared/utils/status.js +24 -25
  529. package/dist/billing/shared/utils/status.js.map +1 -1
  530. package/dist/billing/shared/utils/tokens.d.ts +0 -1
  531. package/dist/billing/shared/utils/tokens.js +1 -2
  532. package/dist/billing/shared/utils/tokens.js.map +1 -1
  533. package/dist/billing/translations/en.d.ts +0 -1
  534. package/dist/billing/types/index.d.ts +0 -1
  535. package/dist/dev/main.d.ts +0 -1
  536. package/dist/generated/global-operations.d.ts +3252 -3206
  537. package/dist/generated/global-operations.js +445 -422
  538. package/dist/generated/global-operations.js.map +1 -1
  539. package/dist/generated/global-types.d.ts +2 -22
  540. package/dist/generated/global-types.js +1 -2
  541. package/dist/generated/global-types.js.map +1 -1
  542. package/dist/generated/wspace-operations.d.ts +76 -47
  543. package/dist/generated/wspace-operations.js +2 -3
  544. package/dist/generated/wspace-operations.js.map +1 -1
  545. package/dist/generated/wspace-types.d.ts +4 -24
  546. package/dist/index.d.ts +0 -1
  547. package/dist/index.js +1 -2
  548. package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
  549. package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
  550. package/dist/node_modules/sonner/dist/index.js +75 -69
  551. package/dist/node_modules/sonner/dist/index.js.map +1 -1
  552. package/dist/utils/nativeBridge.d.ts +0 -1
  553. package/dist/utils/nativeBridge.js +1 -2
  554. package/package.json +65 -54
  555. package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
  556. package/dist/billing/BillingRoot.d.ts.map +0 -1
  557. package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
  558. package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
  559. package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
  560. package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
  561. package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
  562. package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
  563. package/dist/billing/hooks/useProducts.d.ts.map +0 -1
  564. package/dist/billing/index.d.ts.map +0 -1
  565. package/dist/billing/lib/native-purchases.d.ts.map +0 -1
  566. package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
  567. package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
  568. package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
  569. package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
  570. package/dist/billing/modules/addons/index.d.ts.map +0 -1
  571. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
  572. package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
  573. package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
  574. package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
  575. package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
  576. package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
  577. package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
  578. package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
  579. package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
  580. package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
  581. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
  582. package/dist/billing/modules/analytics/index.d.ts.map +0 -1
  583. package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
  584. package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
  585. package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
  586. package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
  587. package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
  588. package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
  589. package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
  590. package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
  591. package/dist/billing/modules/billing/index.d.ts.map +0 -1
  592. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
  593. package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
  594. package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
  595. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
  596. package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
  597. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
  598. package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
  599. package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
  600. package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
  601. package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
  602. package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
  603. package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
  604. package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
  605. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
  606. package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
  607. package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
  608. package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
  609. package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
  610. package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
  611. package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
  612. package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
  613. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
  614. package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
  615. package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
  616. package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
  617. package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
  618. package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
  619. package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
  620. package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
  621. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
  622. package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
  623. package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
  624. package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
  625. package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
  626. package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
  627. package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
  628. package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
  629. package/dist/billing/modules/checkout/index.d.ts.map +0 -1
  630. package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
  631. package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
  632. package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
  633. package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
  634. package/dist/billing/modules/coupons/index.d.ts.map +0 -1
  635. package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
  636. package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
  637. package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
  638. package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
  639. package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
  640. package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
  641. package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
  642. package/dist/billing/modules/credits/index.d.ts.map +0 -1
  643. package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
  644. package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
  645. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
  646. package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
  647. package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
  648. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
  649. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
  650. package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
  651. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
  652. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
  653. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
  654. package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
  655. package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
  656. package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
  657. package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
  658. package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
  659. package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
  660. package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
  661. package/dist/billing/modules/discounts/index.d.ts.map +0 -1
  662. package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
  663. package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
  664. package/dist/billing/modules/earnings/api.d.ts.map +0 -1
  665. package/dist/billing/modules/earnings/index.d.ts.map +0 -1
  666. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
  667. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
  668. package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
  669. package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
  670. package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
  671. package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
  672. package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
  673. package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
  674. package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
  675. package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
  676. package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
  677. package/dist/billing/modules/plans/index.d.ts.map +0 -1
  678. package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
  679. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
  680. package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
  681. package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
  682. package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
  683. package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
  684. package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
  685. package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
  686. package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
  687. package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
  688. package/dist/billing/modules/promotions/index.d.ts.map +0 -1
  689. package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
  690. package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
  691. package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
  692. package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
  693. package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
  694. package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
  695. package/dist/billing/modules/quota/index.d.ts.map +0 -1
  696. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
  697. package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
  698. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
  699. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
  700. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
  701. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
  702. package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
  703. package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
  704. package/dist/billing/modules/settings/index.d.ts.map +0 -1
  705. package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
  706. package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
  707. package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
  708. package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
  709. package/dist/billing/modules/store/index.d.ts.map +0 -1
  710. package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
  711. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
  712. package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
  713. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
  714. package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
  715. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
  716. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
  717. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
  718. package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
  719. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
  720. package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
  721. package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
  722. package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
  723. package/dist/billing/modules/usage/index.d.ts.map +0 -1
  724. package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
  725. package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
  726. package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
  727. package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
  728. package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
  729. package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
  730. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
  731. package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
  732. package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
  733. package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
  734. package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
  735. package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
  736. package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
  737. package/dist/billing/shared/components/index.d.ts.map +0 -1
  738. package/dist/billing/shared/hooks/index.d.ts.map +0 -1
  739. package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
  740. package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
  741. package/dist/billing/shared/index.d.ts.map +0 -1
  742. package/dist/billing/shared/types/graphql.d.ts.map +0 -1
  743. package/dist/billing/shared/types/index.d.ts.map +0 -1
  744. package/dist/billing/shared/ui/Card.d.ts.map +0 -1
  745. package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
  746. package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
  747. package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
  748. package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
  749. package/dist/billing/shared/ui/index.d.ts.map +0 -1
  750. package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
  751. package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
  752. package/dist/billing/shared/utils/error.d.ts.map +0 -1
  753. package/dist/billing/shared/utils/format.d.ts.map +0 -1
  754. package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
  755. package/dist/billing/shared/utils/index.d.ts.map +0 -1
  756. package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
  757. package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
  758. package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
  759. package/dist/billing/shared/utils/status.d.ts.map +0 -1
  760. package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
  761. package/dist/billing/translations/en.d.ts.map +0 -1
  762. package/dist/billing/types/index.d.ts.map +0 -1
  763. package/dist/dev/main.d.ts.map +0 -1
  764. package/dist/generated/global-operations.d.ts.map +0 -1
  765. package/dist/generated/global-types.d.ts.map +0 -1
  766. package/dist/generated/wspace-operations.d.ts.map +0 -1
  767. package/dist/generated/wspace-types.d.ts.map +0 -1
  768. package/dist/index.d.ts.map +0 -1
  769. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PlanAssignFreePage.js","names":[],"sources":["../../../../../src/billing/modules/plans/pages/PlanAssignFreePage.tsx"],"sourcesContent":["/**\n * Plans Module - Assign Plan Free (Admin only)\n *\n * Internal tool for assigning any plan to a billing account at no charge.\n * Protected by PLAN_ASSIGN_SECRET — only team members who know the secret\n * can use this page. Never expose to end users.\n *\n * Route: /billing/plans/assign-free\n */\n\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport { useMemo, useState, type FC, type FormEvent } from 'react';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n PagePurpose,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useAssignPlanFreeMutation } from '../../../../generated/global-operations';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { AccessDenied, PageHeader } from '../../../shared/components';\nimport { usePlans } from '../hooks';\nimport { filterPlans } from '../utils/planSelector';\n\nexport const PlanAssignFreePage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n\n const navigateTo = useBillingNavigate();\n const permissions = useBillingPermissions();\n\n const [secret, setSecret] = useState('');\n const [billingAccountId, setBillingAccountId] = useState('');\n const [planId, setPlanId] = useState('');\n const [planPickerOpen, setPlanPickerOpen] = useState(false);\n const [planSearch, setPlanSearch] = useState('');\n const [workspaceId, setWorkspaceId] = useState('');\n const [result, setResult] = useState<{ success: boolean; message: string } | null>(null);\n\n // Fetch all plans (including non-purchasable internal ones) for the dropdown\n const { plans, isLoading: isPlansLoading } = usePlans({ includeFree: true });\n const filteredPlans = useMemo(() => filterPlans(plans, planSearch), [plans, planSearch]);\n\n const [assignPlanFree, { loading: isAssigning }] = useAssignPlanFreeMutation();\n\n if (!permissions.canManagePlans) {\n return (\n <AccessDenied\n message={tr(\n 'billing.assignFree.noPermission',\n \"You don't have permission to access this page.\"\n )}\n />\n );\n }\n\n const handleSubmit = async (e: FormEvent) => {\n e.preventDefault();\n setResult(null);\n\n if (!secret.trim() || !billingAccountId.trim() || !planId) {\n setResult({ success: false, message: 'All fields are required.' });\n return;\n }\n\n try {\n const { data } = await assignPlanFree({\n variables: {\n secret: secret.trim(),\n billingAccountId: billingAccountId.trim(),\n planId,\n ...(workspaceId.trim() ? { workspaceId: workspaceId.trim() } : {}),\n },\n });\n\n if (data?.assignPlanFree) {\n const sub = data.assignPlanFree;\n setResult({\n success: true,\n message: `Plan assigned. Subscription ID: ${sub.id} · Status: ${sub.status} · Valid: ${new Date(sub.startDate).toLocaleDateString()} → ${new Date(sub.endDate).toLocaleDateString()}`,\n });\n // Clear sensitive fields\n setSecret('');\n setBillingAccountId('');\n setPlanId('');\n setPlanPickerOpen(false);\n setPlanSearch('');\n setWorkspaceId('');\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Failed to assign plan.';\n setResult({ success: false, message: msg });\n }\n };\n\n const selectedPlan = plans.find((p) => p.id === planId);\n\n const handlePlanSelect = (nextPlanId: string) => {\n setPlanId(nextPlanId);\n setPlanPickerOpen(false);\n setPlanSearch('');\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-2xl\">\n <PageHeader\n title={tr('billing.assignFree.title', 'Assign Plan for Free')}\n description={tr(\n 'billing.assignFree.description',\n 'Internally assign any plan to a billing account at no charge. Requires the team secret.'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"px-3 py-2 text-sm border border-border-subtle rounded-md text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n ← Back to Plans\n </button>\n }\n />\n\n <PagePurpose>\n {tr(\n 'billing.assignFree.purpose',\n 'An internal tool to grant any plan to a billing account at no charge — useful for partners, internal teams or comped accounts. It bypasses payment, so it requires the team secret and should be used deliberately.'\n )}\n </PagePurpose>\n\n {/* Warning banner */}\n <div className=\"flex items-start gap-3 p-4 rounded-lg border border-status-warning-border bg-status-warning-bg/10\">\n <svg\n className=\"size-5 text-status-warning-text shrink-0 mt-0.5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.962-.833-2.732 0L3.072 16.5c-.77.833.192 2.5 1.732 2.5z\"\n />\n </svg>\n <div>\n <p className=\"text-sm font-medium text-status-warning-text\">Internal admin tool</p>\n <p className=\"text-xs text-status-warning-text/80 mt-0.5\">\n This bypasses all payment flows. The plan is assigned immediately with no charge. Use\n only for enterprise deals or internal accounts.\n </p>\n </div>\n </div>\n\n <form\n onSubmit={handleSubmit}\n className=\"border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]\"\n >\n <div className=\"p-4 border-b border-border-subtle bg-bg-sunken/30\">\n <h2 className=\"font-semibold text-text-primary\">Assignment Details</h2>\n </div>\n\n <div className=\"p-4 space-y-4\">\n {/* Secret */}\n <div>\n <label htmlFor=\"secret\" className=\"block text-sm font-medium text-text-primary mb-1\">\n Team Secret <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"secret\"\n type=\"password\"\n value={secret}\n onChange={(e) => setSecret(e.target.value)}\n autoComplete=\"off\"\n className=\"w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono\"\n placeholder=\"Enter PLAN_ASSIGN_SECRET\"\n required\n />\n <p className=\"text-xs text-text-muted mt-1\">\n The secret key shared within the team. Never expose this to users.\n </p>\n </div>\n\n {/* Billing Account ID */}\n <div>\n <label\n htmlFor=\"billingAccountId\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n Billing Account ID <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"billingAccountId\"\n type=\"text\"\n value={billingAccountId}\n onChange={(e) => setBillingAccountId(e.target.value)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono text-sm\"\n placeholder=\"e.g. ba_01jk3n2...\"\n required\n />\n <p className=\"text-xs text-text-muted mt-1\">\n Find this in the user's billing account settings or via the billing accounts list.\n </p>\n </div>\n\n {/* Workspace ID (optional — auto-resolved from org if omitted) */}\n <div>\n <label\n htmlFor=\"workspaceId\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n Workspace ID <span className=\"text-text-secondary font-normal\">(optional)</span>\n </label>\n <input\n id=\"workspaceId\"\n type=\"text\"\n value={workspaceId}\n onChange={(e) => setWorkspaceId(e.target.value)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary font-mono text-sm\"\n placeholder=\"e.g. ws_01jk3n2… (leave blank to auto-resolve)\"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n If blank, the first active workspace for this org is used automatically. Set\n explicitly when the org has multiple workspaces.\n </p>\n </div>\n\n {/* Plan selector */}\n <div>\n <label htmlFor=\"planId\" className=\"block text-sm font-medium text-text-primary mb-1\">\n Plan <span className=\"text-status-error-text\">*</span>\n </label>\n {isPlansLoading ? (\n <div className=\"h-10 bg-bg-sunken animate-pulse rounded-md\" />\n ) : (\n <Popover\n open={planPickerOpen}\n onOpenChange={(open) => {\n setPlanPickerOpen(open);\n if (!open) {\n setPlanSearch('');\n }\n }}\n >\n <PopoverTrigger asChild>\n <button\n id=\"planId\"\n type=\"button\"\n role=\"combobox\"\n aria-expanded={planPickerOpen}\n aria-required=\"true\"\n className=\"w-full flex items-center justify-between gap-2 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-left text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n >\n <span className={selectedPlan ? 'truncate' : 'truncate text-text-muted'}>\n {selectedPlan\n ? `${selectedPlan.name}${selectedPlan.productID ? ` · ${selectedPlan.productID}` : ''}`\n : 'Select a plan…'}\n </span>\n <ChevronsUpDown\n className=\"size-4 shrink-0 text-text-muted\"\n aria-hidden=\"true\"\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <Command shouldFilter={false}>\n <CommandInput\n value={planSearch}\n onValueChange={setPlanSearch}\n placeholder=\"Search plans by name, product, or ID…\"\n />\n <CommandList>\n <CommandEmpty>No matching plans found.</CommandEmpty>\n {filteredPlans.map((plan) => (\n <CommandItem\n key={plan.id}\n value={plan.id}\n onSelect={() => handlePlanSelect(plan.id)}\n >\n <Check\n className={`size-4 shrink-0 ${\n plan.id === planId ? 'opacity-100' : 'opacity-0'\n }`}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">\n {plan.name}\n {!plan.isPurchasable ? ' (internal)' : ''}\n </span>\n <span className=\"ml-auto text-xs text-text-muted\">\n {plan.productID} · {plan.duration}\n </span>\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )}\n {selectedPlan && (\n <p className=\"text-xs text-text-muted mt-1\">\n {selectedPlan.isPurchasable ? 'Public plan' : 'Internal / non-purchasable plan'}\n {selectedPlan.productID ? ` · Product: ${selectedPlan.productID}` : ''}\n </p>\n )}\n </div>\n </div>\n\n {/* Result banner */}\n {result && (\n <div\n className={`mx-4 mb-4 p-3 rounded-lg border text-sm ${\n result.success\n ? 'border-status-success-border bg-status-success-bg/10 text-status-success-text'\n : 'border-status-error-border bg-status-error-bg/10 text-status-error-text'\n }`}\n >\n {result.message}\n </div>\n )}\n\n <div className=\"px-4 pb-4 flex items-center gap-3\">\n <button\n type=\"submit\"\n disabled={isAssigning || !secret || !billingAccountId || !planId}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n {isAssigning ? 'Assigning…' : 'Assign Plan for Free'}\n </button>\n <button\n type=\"button\"\n onClick={() => {\n setSecret('');\n setBillingAccountId('');\n setPlanId('');\n setPlanPickerOpen(false);\n setPlanSearch('');\n setWorkspaceId('');\n setResult(null);\n }}\n className=\"px-4 py-2 text-sm border border-border-subtle rounded-md text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n Clear\n </button>\n </div>\n </form>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,IAAa,UAA+B;CAC1C,IAAM,EAAE,SAAM,EAAQ,GAChB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,CAAG;EACxB,OAAO,MAAe,IAAM,IAAW;CACzC,GAEM,IAAa,EAAmB,GAChC,IAAc,EAAsB,GAEpC,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAkB,KAAuB,EAAS,EAAE,GACrD,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,CAAC,GAAY,KAAiB,EAAS,EAAE,GACzC,CAAC,GAAa,KAAkB,EAAS,EAAE,GAC3C,CAAC,GAAQ,KAAa,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Ae,EAAE,GACjB,EAAU,IAAI;OAChB;OACA,WAAU;iBACX;MAEO,CAAA,CACL;;IACD;;EACH;;AAET"}
1
+ {"version":3,"file":"PlanAssignFreePage.js","names":["PlanAssignFreePage","useI18n","tr","translated","t","key","fallback","navigateTo","useBillingNavigate","permissions","useBillingPermissions","secret","setSecret","useState","billingAccountId","setBillingAccountId","planId","setPlanId","planPickerOpen","setPlanPickerOpen","planSearch","setPlanSearch","workspaceId","setWorkspaceId","result","setResult","isPlansLoading","usePlans","filteredPlans","useMemo","filterPlans","plans","assignPlanFree","isAssigning","useAssignPlanFreeMutation","AccessDenied","handleSubmit","data","sub","err","msg","selectedPlan","p","handlePlanSelect","nextPlanId","PageHeader","PagePurpose","Popover","open","PopoverTrigger","ChevronsUpDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandItem","plan","Check"],"sources":["../../../../../src/billing/modules/plans/pages/PlanAssignFreePage.tsx"],"sourcesContent":["/**\n * Plans Module - Assign Plan Free (Admin only)\n *\n * Internal tool for assigning any plan to a billing account at no charge.\n * Protected by PLAN_ASSIGN_SECRET — only team members who know the secret\n * can use this page. Never expose to end users.\n *\n * Route: /billing/plans/assign-free\n */\n\nimport { Check, ChevronsUpDown } from 'lucide-react';\nimport { useMemo, useState, type FC, type FormEvent } from 'react';\nimport {\n Command,\n CommandEmpty,\n CommandInput,\n CommandItem,\n CommandList,\n PagePurpose,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useAssignPlanFreeMutation } from '../../../../generated/global-operations';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { AccessDenied, PageHeader } from '../../../shared/components';\nimport { usePlans } from '../hooks';\nimport { filterPlans } from '../utils/planSelector';\n\nexport const PlanAssignFreePage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n\n const navigateTo = useBillingNavigate();\n const permissions = useBillingPermissions();\n\n const [secret, setSecret] = useState('');\n const [billingAccountId, setBillingAccountId] = useState('');\n const [planId, setPlanId] = useState('');\n const [planPickerOpen, setPlanPickerOpen] = useState(false);\n const [planSearch, setPlanSearch] = useState('');\n const [workspaceId, setWorkspaceId] = useState('');\n const [result, setResult] = useState<{ success: boolean; message: string } | null>(null);\n\n // Fetch all plans (including non-purchasable internal ones) for the dropdown\n const { plans, isLoading: isPlansLoading } = usePlans({ includeFree: true });\n const filteredPlans = useMemo(() => filterPlans(plans, planSearch), [plans, planSearch]);\n\n const [assignPlanFree, { loading: isAssigning }] = useAssignPlanFreeMutation();\n\n if (!permissions.canManagePlans) {\n return (\n <AccessDenied\n message={tr(\n 'billing.assignFree.noPermission',\n \"You don't have permission to access this page.\"\n )}\n />\n );\n }\n\n const handleSubmit = async (e: FormEvent) => {\n e.preventDefault();\n setResult(null);\n\n if (!secret.trim() || !billingAccountId.trim() || !planId) {\n setResult({ success: false, message: 'All fields are required.' });\n return;\n }\n\n try {\n const { data } = await assignPlanFree({\n variables: {\n secret: secret.trim(),\n billingAccountId: billingAccountId.trim(),\n planId,\n ...(workspaceId.trim() ? { workspaceId: workspaceId.trim() } : {}),\n },\n });\n\n if (data?.assignPlanFree) {\n const sub = data.assignPlanFree;\n setResult({\n success: true,\n message: `Plan assigned. Subscription ID: ${sub.id} · Status: ${sub.status} · Valid: ${new Date(sub.startDate).toLocaleDateString()} → ${new Date(sub.endDate).toLocaleDateString()}`,\n });\n // Clear sensitive fields\n setSecret('');\n setBillingAccountId('');\n setPlanId('');\n setPlanPickerOpen(false);\n setPlanSearch('');\n setWorkspaceId('');\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Failed to assign plan.';\n setResult({ success: false, message: msg });\n }\n };\n\n const selectedPlan = plans.find((p) => p.id === planId);\n\n const handlePlanSelect = (nextPlanId: string) => {\n setPlanId(nextPlanId);\n setPlanPickerOpen(false);\n setPlanSearch('');\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-2xl\">\n <PageHeader\n title={tr('billing.assignFree.title', 'Assign Plan for Free')}\n description={tr(\n 'billing.assignFree.description',\n 'Internally assign any plan to a billing account at no charge. Requires the team secret.'\n )}\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"px-3 py-2 text-sm border border-border-subtle rounded-md text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n ← Back to Plans\n </button>\n }\n />\n\n <PagePurpose>\n {tr(\n 'billing.assignFree.purpose',\n 'An internal tool to grant any plan to a billing account at no charge — useful for partners, internal teams or comped accounts. It bypasses payment, so it requires the team secret and should be used deliberately.'\n )}\n </PagePurpose>\n\n {/* Warning banner */}\n <div className=\"flex items-start gap-3 p-4 rounded-lg border border-status-warning-border bg-status-warning-bg/10\">\n <svg\n className=\"size-5 text-status-warning-text shrink-0 mt-0.5\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.962-.833-2.732 0L3.072 16.5c-.77.833.192 2.5 1.732 2.5z\"\n />\n </svg>\n <div>\n <p className=\"text-sm font-medium text-status-warning-text\">Internal admin tool</p>\n <p className=\"text-xs text-status-warning-text/80 mt-0.5\">\n This bypasses all payment flows. The plan is assigned immediately with no charge. Use\n only for enterprise deals or internal accounts.\n </p>\n </div>\n </div>\n\n <form\n onSubmit={handleSubmit}\n className=\"border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]\"\n >\n <div className=\"p-4 border-b border-border-subtle bg-bg-sunken/30\">\n <h2 className=\"font-semibold text-text-primary\">Assignment Details</h2>\n </div>\n\n <div className=\"p-4 space-y-4\">\n {/* Secret */}\n <div>\n <label htmlFor=\"secret\" className=\"block text-sm font-medium text-text-primary mb-1\">\n Team Secret <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"secret\"\n type=\"password\"\n value={secret}\n onChange={(e) => setSecret(e.target.value)}\n autoComplete=\"off\"\n className=\"w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono\"\n placeholder=\"Enter PLAN_ASSIGN_SECRET\"\n required\n />\n <p className=\"text-xs text-text-muted mt-1\">\n The secret key shared within the team. Never expose this to users.\n </p>\n </div>\n\n {/* Billing Account ID */}\n <div>\n <label\n htmlFor=\"billingAccountId\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n Billing Account ID <span className=\"text-status-error-text\">*</span>\n </label>\n <input\n id=\"billingAccountId\"\n type=\"text\"\n value={billingAccountId}\n onChange={(e) => setBillingAccountId(e.target.value)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono text-sm\"\n placeholder=\"e.g. ba_01jk3n2...\"\n required\n />\n <p className=\"text-xs text-text-muted mt-1\">\n Find this in the user&apos;s billing account settings or via the billing accounts\n list.\n </p>\n </div>\n\n {/* Workspace ID (optional — auto-resolved from org if omitted) */}\n <div>\n <label\n htmlFor=\"workspaceId\"\n className=\"block text-sm font-medium text-text-primary mb-1\"\n >\n Workspace ID <span className=\"text-text-secondary font-normal\">(optional)</span>\n </label>\n <input\n id=\"workspaceId\"\n type=\"text\"\n value={workspaceId}\n onChange={(e) => setWorkspaceId(e.target.value)}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary font-mono text-sm\"\n placeholder=\"e.g. ws_01jk3n2… (leave blank to auto-resolve)\"\n />\n <p className=\"text-xs text-text-secondary mt-1\">\n If blank, the first active workspace for this org is used automatically. Set\n explicitly when the org has multiple workspaces.\n </p>\n </div>\n\n {/* Plan selector */}\n <div>\n <label htmlFor=\"planId\" className=\"block text-sm font-medium text-text-primary mb-1\">\n Plan <span className=\"text-status-error-text\">*</span>\n </label>\n {isPlansLoading ? (\n <div className=\"h-10 bg-bg-sunken animate-pulse rounded-md\" />\n ) : (\n <Popover\n open={planPickerOpen}\n onOpenChange={(open) => {\n setPlanPickerOpen(open);\n if (!open) {\n setPlanSearch('');\n }\n }}\n >\n <PopoverTrigger asChild>\n <button\n id=\"planId\"\n type=\"button\"\n role=\"combobox\"\n aria-expanded={planPickerOpen}\n aria-required=\"true\"\n className=\"w-full flex items-center justify-between gap-2 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-left text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n >\n <span className={selectedPlan ? 'truncate' : 'truncate text-text-muted'}>\n {selectedPlan\n ? `${selectedPlan.name}${selectedPlan.productID ? ` · ${selectedPlan.productID}` : ''}`\n : 'Select a plan…'}\n </span>\n <ChevronsUpDown\n className=\"size-4 shrink-0 text-text-muted\"\n aria-hidden=\"true\"\n />\n </button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <Command shouldFilter={false}>\n <CommandInput\n value={planSearch}\n onValueChange={setPlanSearch}\n placeholder=\"Search plans by name, product, or ID…\"\n />\n <CommandList>\n <CommandEmpty>No matching plans found.</CommandEmpty>\n {filteredPlans.map((plan) => (\n <CommandItem\n key={plan.id}\n value={plan.id}\n onSelect={() => handlePlanSelect(plan.id)}\n >\n <Check\n className={`size-4 shrink-0 ${\n plan.id === planId ? 'opacity-100' : 'opacity-0'\n }`}\n aria-hidden=\"true\"\n />\n <span className=\"truncate\">\n {plan.name}\n {!plan.isPurchasable ? ' (internal)' : ''}\n </span>\n <span className=\"ml-auto text-xs text-text-muted\">\n {plan.productID} · {plan.duration}\n </span>\n </CommandItem>\n ))}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )}\n {selectedPlan && (\n <p className=\"text-xs text-text-muted mt-1\">\n {selectedPlan.isPurchasable ? 'Public plan' : 'Internal / non-purchasable plan'}\n {selectedPlan.productID ? ` · Product: ${selectedPlan.productID}` : ''}\n </p>\n )}\n </div>\n </div>\n\n {/* Result banner */}\n {result && (\n <div\n className={`mx-4 mb-4 p-3 rounded-lg border text-sm ${\n result.success\n ? 'border-status-success-border bg-status-success-bg/10 text-status-success-text'\n : 'border-status-error-border bg-status-error-bg/10 text-status-error-text'\n }`}\n >\n {result.message}\n </div>\n )}\n\n <div className=\"px-4 pb-4 flex items-center gap-3\">\n <button\n type=\"submit\"\n disabled={isAssigning || !secret || !billingAccountId || !planId}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n {isAssigning ? 'Assigning…' : 'Assign Plan for Free'}\n </button>\n <button\n type=\"button\"\n onClick={() => {\n setSecret('');\n setBillingAccountId('');\n setPlanId('');\n setPlanPickerOpen(false);\n setPlanSearch('');\n setWorkspaceId('');\n setResult(null);\n }}\n className=\"px-4 py-2 text-sm border border-border-subtle rounded-md text-text-primary hover:bg-bg-sunken transition-colors\"\n >\n Clear\n </button>\n </div>\n </form>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,IAAaA,UAA+B;CAC1C,IAAM,EAAE,SAAMC,EAAQ,GAChBC,KAAM,GAAa,MAA6B;EACpD,IAAMC,IAAaC,EAAEC,CAAG;EACxB,OAAOF,MAAeE,IAAMC,IAAWH;CACzC,GAEMI,IAAaC,EAAmB,GAChCC,IAAcC,EAAsB,GAEpC,CAACC,GAAQC,KAAaC,EAAS,EAAE,GACjC,CAACC,GAAkBC,KAAuBF,EAAS,EAAE,GACrD,CAACG,GAAQC,KAAaJ,EAAS,EAAE,GACjC,CAACK,GAAgBC,KAAqB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AAeA,EAAa,cAAc,EACnE;;OAEF,EAAA,CAAA;MACF;;KAGJjB,KACC,kBAAC,OAAD;MACE,WAAW,2CACTA,EAAO,UACH,kFACA;MAGL,UAAAA,EAAO;KACL,CAAA;KAGP,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,UAAD;OACE,MAAK;OACL,UAAUS,KAAe,CAACtB,KAAU,CAACG,KAAoB,CAACE;OAC1D,WAAU;OAET,UAAAiB,IAAc,eAAe;MACxB,CAAA,GACR,kBAAC,UAAD;OACE,MAAK;OACL,eAAe;QAOb,AANArB,EAAU,EAAE,GACZG,EAAoB,EAAE,GACtBE,EAAU,EAAE,GACZE,EAAkB,EAAK,GACvBE,EAAc,EAAE,GAChBE,EAAe,EAAE,GACjBE,EAAU,IAAI;OAChB;OACA,WAAU;OACX,UAAA;MAEO,CAAA,CACL;;IACD;;EACH;;AAET"}
@@ -1,3 +1,2 @@
1
1
  import { FC } from 'react';
2
2
  export declare const PlanBrowseDetailPage: FC;
3
- //# sourceMappingURL=PlanBrowseDetailPage.d.ts.map
@@ -1,18 +1,18 @@
1
1
  import { ServerError as e } from "../../../shared/components/ServerError.js";
2
+ import { useBillingNavigate as t } from "../../../hooks/useBillingNavigate.js";
3
+ import { formatCurrency as n, formatPlanDuration as r, formatPlanDurationLabel as i, formatQuotaValue as a } from "../../../shared/utils/format.js";
4
+ import { isServerError as o } from "../../../shared/utils/error.js";
5
+ import { getPlanFeatureQuantity as s, getPlanFeatureUnit as c, getQuotaDisplayName as l } from "../../../shared/utils/planFeatureQuantity.js";
6
+ import "../hooks/index.js";
2
7
  import "../../../shared/components/index.js";
3
- import { formatCurrency as t, formatPlanDuration as n, formatPlanDurationLabel as r, formatQuotaValue as i } from "../../../shared/utils/format.js";
4
- import { isServerError as a } from "../../../shared/utils/error.js";
5
- import { getPlanFeatureQuantity as o, getPlanFeatureUnit as s, getQuotaDisplayName as c } from "../../../shared/utils/planFeatureQuantity.js";
6
- import "../../../shared/utils/index.js";
7
- import { useBillingNavigate as l } from "../../../hooks/useBillingNavigate.js";
8
8
  import { usePlan as u } from "../hooks/usePlans.js";
9
- import "../hooks/index.js";
9
+ import "../../../shared/utils/index.js";
10
10
  import { useMemo as d } from "react";
11
11
  import { useParams as f } from "react-router";
12
12
  import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
13
13
  import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
14
  import { EmphasisPanel as _, PagePurpose as v, ShowMore as y } from "@burdenoff/fe-libs/ui";
15
- //#region src/billing/modules/plans/pages/PlanBrowseDetailPage.tsx
15
+ // src/billing/modules/plans/pages/PlanBrowseDetailPage.tsx
16
16
  var b = ({ when: e, collapsedHeight: t, children: n }) => e ? /* @__PURE__ */ m(y, {
17
17
  collapsedHeight: t,
18
18
  children: n
@@ -21,24 +21,24 @@ function x(e) {
21
21
  let t = /* @__PURE__ */ new Map();
22
22
  for (let n of e) {
23
23
  if (!n.quota) continue;
24
- let e = n.quota.id, r = n.quota.limits?.type ?? "unknown", i = o(n), a = t.get(e);
24
+ let e = n.quota.id, r = n.quota.limits?.type ?? "unknown", i = s(n), a = t.get(e);
25
25
  a ? a.totalValue += i : t.set(e, {
26
26
  quotaId: e,
27
- name: c(n),
27
+ name: l(n),
28
28
  quotaType: n.quota.quotaType ?? "",
29
29
  limitType: r,
30
30
  totalValue: i,
31
- unit: s(n),
31
+ unit: c(n),
32
32
  perWorkspace: n.quota.scope === "WORKSPACE"
33
33
  });
34
34
  }
35
35
  return Array.from(t.values());
36
36
  }
37
37
  var S = () => {
38
- let { t: o } = g(), s = (e, t) => {
39
- let n = o(e);
38
+ let { t: s } = g(), c = (e, t) => {
39
+ let n = s(e);
40
40
  return n === e ? t : n;
41
- }, { planId: c } = f(), p = l(), { plan: y, isLoading: S, error: C, refetch: w } = u(c), T = d(() => x(y?.features || []), [y?.features]);
41
+ }, { planId: l } = f(), p = t(), { plan: y, isLoading: S, error: C, refetch: w } = u(l), T = d(() => x(y?.features || []), [y?.features]);
42
42
  return S ? /* @__PURE__ */ h("div", {
43
43
  className: "space-y-6 px-6 lg:px-8 py-6",
44
44
  children: [/* @__PURE__ */ h("div", {
@@ -57,11 +57,11 @@ var S = () => {
57
57
  children: [/* @__PURE__ */ m("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ m("div", { className: "h-10 w-full bg-bg-sunken animate-pulse rounded" })]
58
58
  })]
59
59
  })]
60
- }) : C && a(C) ? /* @__PURE__ */ m("div", {
60
+ }) : C && o(C) ? /* @__PURE__ */ m("div", {
61
61
  className: "p-6",
62
62
  children: /* @__PURE__ */ m(e, {
63
- title: s("billing.plans.serverUnavailable", "Server Unavailable"),
64
- message: s("billing.plans.unableToLoadPlanDetails", "Unable to load plan details."),
63
+ title: c("billing.plans.serverUnavailable", "Server Unavailable"),
64
+ message: c("billing.plans.unableToLoadPlanDetails", "Unable to load plan details."),
65
65
  onRetry: () => w(),
66
66
  showRetry: !0
67
67
  })
@@ -94,11 +94,11 @@ var S = () => {
94
94
  }),
95
95
  /* @__PURE__ */ h("p", {
96
96
  className: "text-sm text-text-secondary mt-1",
97
- children: [r(y.duration), " billing plan"]
97
+ children: [i(y.duration), " billing plan"]
98
98
  }),
99
99
  /* @__PURE__ */ m(v, {
100
100
  className: "mt-3",
101
- children: s("billing.plans.browseDetailPurpose", "Everything this plan includes — its price, billing period and the full list of features and quotas — so you can confirm it fits before subscribing. Hit Subscribe when you are ready to check out.")
101
+ children: c("billing.plans.browseDetailPurpose", "Everything this plan includes — its price, billing period and the full list of features and quotas — so you can confirm it fits before subscribing. Hit Subscribe when you are ready to check out.")
102
102
  })
103
103
  ] })]
104
104
  }), /* @__PURE__ */ m("button", {
@@ -117,7 +117,7 @@ var S = () => {
117
117
  className: "p-6 border-b border-border-seam",
118
118
  children: /* @__PURE__ */ m("h2", {
119
119
  className: "text-lg font-semibold text-text-primary",
120
- children: s("billing.plans.pricing", "Pricing")
120
+ children: c("billing.plans.pricing", "Pricing")
121
121
  })
122
122
  }), /* @__PURE__ */ h("div", {
123
123
  className: "p-6",
@@ -125,17 +125,17 @@ var S = () => {
125
125
  className: "flex items-baseline gap-1",
126
126
  children: [/* @__PURE__ */ m("span", {
127
127
  className: "text-4xl font-bold text-text-primary",
128
- children: t(y.price, y.currency)
128
+ children: n(y.price, y.currency)
129
129
  }), /* @__PURE__ */ h("span", {
130
130
  className: "text-lg text-text-secondary",
131
- children: ["/ ", n(y.duration)]
131
+ children: ["/ ", r(y.duration)]
132
132
  })]
133
133
  }), /* @__PURE__ */ h("p", {
134
134
  className: "text-sm text-text-secondary mt-2",
135
135
  children: [
136
- s("billing.plans.billed", "Billed"),
136
+ c("billing.plans.billed", "Billed"),
137
137
  " ",
138
- y.duration === "monthly" ? s("billing.plans.everyMonth", "every month") : s("billing.plans.annually", "annually")
138
+ y.duration === "monthly" ? c("billing.plans.everyMonth", "every month") : c("billing.plans.annually", "annually")
139
139
  ]
140
140
  })]
141
141
  })]
@@ -146,7 +146,7 @@ var S = () => {
146
146
  children: /* @__PURE__ */ h("h2", {
147
147
  className: "text-lg font-semibold text-text-primary",
148
148
  children: [
149
- s("billing.plans.featuresAndQuotas", "Features & Quotas"),
149
+ c("billing.plans.featuresAndQuotas", "Features & Quotas"),
150
150
  " (",
151
151
  T.length,
152
152
  ")"
@@ -156,7 +156,7 @@ var S = () => {
156
156
  className: "p-6",
157
157
  children: T.length === 0 ? /* @__PURE__ */ m("p", {
158
158
  className: "text-sm text-text-secondary",
159
- children: s("billing.plans.noFeatures", "No features configured for this plan.")
159
+ children: c("billing.plans.noFeatures", "No features configured for this plan.")
160
160
  }) : /* @__PURE__ */ m(b, {
161
161
  when: T.length > 4,
162
162
  collapsedHeight: 280,
@@ -187,9 +187,9 @@ var S = () => {
187
187
  children: e.name
188
188
  }), /* @__PURE__ */ h("span", {
189
189
  className: "font-semibold text-text-primary",
190
- children: [i(e.totalValue, e.unit), e.perWorkspace && /* @__PURE__ */ h("span", {
190
+ children: [a(e.totalValue, e.unit), e.perWorkspace && /* @__PURE__ */ h("span", {
191
191
  className: "font-normal text-text-secondary",
192
- children: [" ", s("billing.plans.perWorkspace", "per workspace")]
192
+ children: [" ", c("billing.plans.perWorkspace", "per workspace")]
193
193
  })]
194
194
  })]
195
195
  }), /* @__PURE__ */ h("div", {
@@ -216,43 +216,43 @@ var S = () => {
216
216
  className: "p-6 border-b border-border-seam bg-bg-sunken",
217
217
  children: /* @__PURE__ */ m("h2", {
218
218
  className: "text-lg font-semibold text-text-primary",
219
- children: s("billing.plans.subscribeTitle", "Subscribe")
219
+ children: c("billing.plans.subscribeTitle", "Subscribe")
220
220
  })
221
221
  }), /* @__PURE__ */ h("div", {
222
222
  className: "p-6 space-y-4",
223
223
  children: [
224
224
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
225
225
  className: "text-sm text-text-secondary",
226
- children: s("billing.plans.price", "Price")
226
+ children: c("billing.plans.price", "Price")
227
227
  }), /* @__PURE__ */ h("p", {
228
228
  className: "text-sm font-medium text-text-primary mt-0.5",
229
229
  children: [
230
- t(y.price, y.currency),
230
+ n(y.price, y.currency),
231
231
  " / ",
232
- n(y.duration)
232
+ r(y.duration)
233
233
  ]
234
234
  })] }),
235
235
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
236
236
  className: "text-sm text-text-secondary",
237
- children: s("billing.plans.billingPeriod", "Billing Period")
237
+ children: c("billing.plans.billingPeriod", "Billing Period")
238
238
  }), /* @__PURE__ */ m("p", {
239
239
  className: "text-sm text-text-primary mt-0.5",
240
- children: r(y.duration)
240
+ children: i(y.duration)
241
241
  })] }),
242
242
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
243
243
  className: "text-sm text-text-secondary",
244
- children: s("billing.plans.maxWorkspaces", "Max Workspaces")
244
+ children: c("billing.plans.maxWorkspaces", "Max Workspaces")
245
245
  }), /* @__PURE__ */ h("p", {
246
246
  className: "text-sm font-medium text-text-primary mt-0.5",
247
247
  children: [
248
248
  y.maxWorkspaces ?? 1,
249
249
  " ",
250
- (y.maxWorkspaces ?? 1) === 1 ? s("billing.plans.workspaceSingular", "workspace") : s("billing.plans.workspacePlural", "workspaces")
250
+ (y.maxWorkspaces ?? 1) === 1 ? c("billing.plans.workspaceSingular", "workspace") : c("billing.plans.workspacePlural", "workspaces")
251
251
  ]
252
252
  })] }),
253
253
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
254
254
  className: "text-sm text-text-secondary",
255
- children: s("billing.plans.quotasIncluded", "Quotas Included")
255
+ children: c("billing.plans.quotasIncluded", "Quotas Included")
256
256
  }), /* @__PURE__ */ m("p", {
257
257
  className: "text-sm font-medium text-text-primary mt-0.5",
258
258
  children: T.length
@@ -280,11 +280,11 @@ var S = () => {
280
280
  children: [
281
281
  /* @__PURE__ */ m("h2", {
282
282
  className: "text-lg font-semibold text-text-primary",
283
- children: s("billing.plans.planNotFound", "Plan not found")
283
+ children: c("billing.plans.planNotFound", "Plan not found")
284
284
  }),
285
285
  /* @__PURE__ */ m("p", {
286
286
  className: "text-sm text-text-secondary",
287
- children: C?.message || s("billing.plans.planNotFoundMessage", "The plan you are looking for does not exist.")
287
+ children: C?.message || c("billing.plans.planNotFoundMessage", "The plan you are looking for does not exist.")
288
288
  }),
289
289
  /* @__PURE__ */ m("button", {
290
290
  type: "button",
@@ -296,7 +296,6 @@ var S = () => {
296
296
  })
297
297
  });
298
298
  };
299
- //#endregion
300
299
  export { S as PlanBrowseDetailPage };
301
300
 
302
301
  //# sourceMappingURL=PlanBrowseDetailPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlanBrowseDetailPage.js","names":[],"sources":["../../../../../src/billing/modules/plans/pages/PlanBrowseDetailPage.tsx"],"sourcesContent":["/**\n * Plans Module - Plan Browse Detail Page (User-facing)\n * View plan details and subscribe. No edit/toggle actions.\n */\n\nimport { type FC, useMemo } from 'react';\nimport { useParams } from 'react-router';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { usePlan } from '../hooks';\nimport { ServerError } from '../../../shared/components';\nimport {\n formatCurrency,\n formatPlanDuration,\n formatPlanDurationLabel,\n formatQuotaValue,\n getPlanFeatureQuantity,\n getPlanFeatureUnit,\n getQuotaDisplayName,\n isServerError,\n} from '../../../shared/utils';\nimport type { PlanFeature } from '../../../shared/types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ShowMore, PagePurpose, EmphasisPanel } from '@burdenoff/fe-libs/ui';\nimport type { ReactNode } from 'react';\n\n/** Wraps children in a ShowMore progressive-disclosure region only when `when` is true. */\nconst ShowMoreIf: FC<{ when: boolean; collapsedHeight?: number; children: ReactNode }> = ({\n when,\n collapsedHeight,\n children,\n}) => (when ? <ShowMore collapsedHeight={collapsedHeight}>{children}</ShowMore> : <>{children}</>);\n\ninterface CombinedQuota {\n quotaId: string;\n name: string;\n quotaType: string;\n limitType: string;\n totalValue: number;\n unit?: string;\n /** True for WORKSPACE-scoped quotas — the full amount applies to EACH\n * activated workspace, not divided across them (see plan.maxWorkspaces). */\n perWorkspace: boolean;\n}\n\nfunction combineQuotas(features: PlanFeature[]): CombinedQuota[] {\n const quotaMap = new Map<string, CombinedQuota>();\n for (const feature of features) {\n if (!feature.quota) continue;\n const quotaId = feature.quota.id;\n const limits = feature.quota.limits as { type?: string; value?: number } | null;\n const limitType = limits?.type ?? 'unknown';\n const limitValue = getPlanFeatureQuantity(feature);\n const existing = quotaMap.get(quotaId);\n if (existing) {\n existing.totalValue += limitValue;\n } else {\n quotaMap.set(quotaId, {\n quotaId,\n name: getQuotaDisplayName(feature),\n quotaType: feature.quota.quotaType ?? '',\n limitType,\n totalValue: limitValue,\n unit: getPlanFeatureUnit(feature),\n perWorkspace: feature.quota.scope === 'WORKSPACE',\n });\n }\n }\n return Array.from(quotaMap.values());\n}\n\nexport const PlanBrowseDetailPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const { planId } = useParams<{ planId: string }>();\n const navigateTo = useBillingNavigate();\n const { plan, isLoading, error, refetch } = usePlan(planId);\n\n const combinedQuotas = useMemo(() => combineQuotas(plan?.features || []), [plan?.features]);\n\n if (isLoading) {\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-10 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-8 w-48 bg-bg-sunken animate-pulse rounded\" />\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-32 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-full bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-24 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-10 w-full bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n </div>\n );\n }\n\n if (error && isServerError(error)) {\n return (\n <div className=\"p-6\">\n <ServerError\n title={tr('billing.plans.serverUnavailable', 'Server Unavailable')}\n message={tr('billing.plans.unableToLoadPlanDetails', 'Unable to load plan details.')}\n onRetry={() => refetch()}\n showRetry\n />\n </div>\n );\n }\n\n if (!plan) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.planNotFound', 'Plan not found')}\n </h2>\n <p className=\"text-sm text-text-secondary\">\n {error?.message ||\n tr(\n 'billing.plans.planNotFoundMessage',\n 'The plan you are looking for does not exist.'\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Back to Plans\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-start gap-4\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors\"\n >\n <svg className=\"size-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n {plan.name}\n </h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {formatPlanDurationLabel(plan.duration)} billing plan\n </p>\n <PagePurpose className=\"mt-3\">\n {tr(\n 'billing.plans.browseDetailPurpose',\n 'Everything this plan includes — its price, billing period and the full list of features and quotas — so you can confirm it fits before subscribing. Hit Subscribe when you are ready to check out.'\n )}\n </PagePurpose>\n </div>\n </div>\n\n <button\n type=\"button\"\n onClick={() => navigateTo(`/checkout/${plan.id}`)}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Subscribe to Plan\n </button>\n </div>\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Content */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Pricing Card — primary emphasis zone */}\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"p-6 border-b border-border-seam\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.pricing', 'Pricing')}\n </h2>\n </div>\n <div className=\"p-6\">\n <div className=\"flex items-baseline gap-1\">\n <span className=\"text-4xl font-bold text-text-primary\">\n {formatCurrency(plan.price, plan.currency)}\n </span>\n <span className=\"text-lg text-text-secondary\">\n / {formatPlanDuration(plan.duration)}\n </span>\n </div>\n <p className=\"text-sm text-text-secondary mt-2\">\n {tr('billing.plans.billed', 'Billed')}{' '}\n {plan.duration === 'monthly'\n ? tr('billing.plans.everyMonth', 'every month')\n : tr('billing.plans.annually', 'annually')}\n </p>\n </div>\n </EmphasisPanel>\n\n {/* Features Card */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-seam bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.featuresAndQuotas', 'Features & Quotas')} (\n {combinedQuotas.length})\n </h2>\n </div>\n <div className=\"p-6\">\n {combinedQuotas.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.noFeatures', 'No features configured for this plan.')}\n </p>\n ) : (\n <ShowMoreIf when={combinedQuotas.length > 4} collapsedHeight={280}>\n <ul className=\"space-y-3\">\n {combinedQuotas.map((quota) => (\n <li\n key={quota.quotaId}\n className=\"flex items-start gap-3 p-3 rounded-lg bg-bg-sunken\"\n >\n <div className=\"size-8 rounded-full bg-status-success-bg-subtle flex items-center justify-center shrink-0\">\n <svg\n className=\"size-4 text-status-success-text\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n </div>\n <div className=\"flex-1\">\n <div className=\"flex items-center justify-between\">\n <p className=\"font-medium text-text-primary\">{quota.name}</p>\n <span className=\"font-semibold text-text-primary\">\n {formatQuotaValue(quota.totalValue, quota.unit)}\n {quota.perWorkspace && (\n <span className=\"font-normal text-text-secondary\">\n {' '}\n {tr('billing.plans.perWorkspace', 'per workspace')}\n </span>\n )}\n </span>\n </div>\n <div className=\"flex items-center gap-2 mt-1\">\n <span className=\"text-sm text-text-secondary capitalize\">\n Type: {quota.limitType}\n </span>\n {quota.quotaType && (\n <span className=\"px-2 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary rounded\">\n {quota.quotaType}\n </span>\n )}\n </div>\n </div>\n </li>\n ))}\n </ul>\n </ShowMoreIf>\n )}\n </div>\n </div>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6 lg:sticky lg:top-6 lg:self-start\">\n {/* Subscribe Card — primary emphasis zone */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface bg-accent-wash shadow-[var(--shadow-pop)] overflow-hidden\">\n <div className=\"p-6 border-b border-border-seam bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.subscribeTitle', 'Subscribe')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">{tr('billing.plans.price', 'Price')}</p>\n <p className=\"text-sm font-medium text-text-primary mt-0.5\">\n {formatCurrency(plan.price, plan.currency)} / {formatPlanDuration(plan.duration)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.billingPeriod', 'Billing Period')}\n </p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatPlanDurationLabel(plan.duration)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.maxWorkspaces', 'Max Workspaces')}\n </p>\n <p className=\"text-sm font-medium text-text-primary mt-0.5\">\n {plan.maxWorkspaces ?? 1}{' '}\n {(plan.maxWorkspaces ?? 1) === 1\n ? tr('billing.plans.workspaceSingular', 'workspace')\n : tr('billing.plans.workspacePlural', 'workspaces')}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.quotasIncluded', 'Quotas Included')}\n </p>\n <p className=\"text-sm font-medium text-text-primary mt-0.5\">\n {combinedQuotas.length}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/checkout/${plan.id}`)}\n className=\"w-full px-4 py-2.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Subscribe to Plan\n </button>\n </div>\n </div>\n\n {/* Back */}\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"w-full px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Back to Plans\n </button>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAM,KAAoF,EACxF,SACA,oBACA,kBACK,IAAO,kBAAC,GAAD;CAA2B;CAAkB;AAAmB,CAAA,IAAI,kBAAA,GAAA,EAAG,YAAW,CAAA;AAchG,SAAS,EAAc,GAA0C;CAC/D,IAAM,oBAAW,IAAI,IAA2B;CAChD,KAAK,IAAM,KAAW,GAAU;EAC9B,IAAI,CAAC,EAAQ,OAAO;EACpB,IAAM,IAAU,EAAQ,MAAM,IAExB,IADS,EAAQ,MAAM,QACH,QAAQ,WAC5B,IAAa,EAAuB,CAAO,GAC3C,IAAW,EAAS,IAAI,CAAO;EACrC,AAAI,IACF,EAAS,cAAc,IAEvB,EAAS,IAAI,GAAS;GACpB;GACA,MAAM,EAAoB,CAAO;GACjC,WAAW,EAAQ,MAAM,aAAa;GACtC;GACA,YAAY;GACZ,MAAM,EAAmB,CAAO;GAChC,cAAc,EAAQ,MAAM,UAAU;EACxC,CAAC;CAEL;CACA,OAAO,MAAM,KAAK,EAAS,OAAO,CAAC;AACrC;AAEA,IAAa,UAAiC;CAC5C,IAAM,EAAE,SAAM,EAAQ,GAChB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,CAAG;EACxB,OAAO,MAAe,IAAM,IAAW;CACzC,GACM,EAAE,cAAW,EAA8B,GAC3C,IAAa,EAAmB,GAChC,EAAE,SAAM,cAAW,UAAO,eAAY,EAAQ,CAAM,GAEpD,IAAiB,QAAc,EAAc,GA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":"PlanBrowseDetailPage.js","names":["_Fragment","Fragment$1","ShowMoreIf","when","ShowMore","combineQuotas","quotaMap","feature","features","quotaId","limitType","limitValue","getPlanFeatureQuantity","existing","getQuotaDisplayName","getPlanFeatureUnit","PlanBrowseDetailPage","useI18n","tr","translated","t","key","fallback","useParams","navigateTo","useBillingNavigate","usePlan","planId","combinedQuotas","useMemo","plan","isLoading","error","isServerError","ServerError","refetch","formatPlanDurationLabel","PagePurpose","EmphasisPanel","formatCurrency","formatPlanDuration","quota","formatQuotaValue"],"sources":["../../../../../src/billing/modules/plans/pages/PlanBrowseDetailPage.tsx"],"sourcesContent":["/**\n * Plans Module - Plan Browse Detail Page (User-facing)\n * View plan details and subscribe. No edit/toggle actions.\n */\n\nimport { type FC, useMemo } from 'react';\nimport { useParams } from 'react-router';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { usePlan } from '../hooks';\nimport { ServerError } from '../../../shared/components';\nimport {\n formatCurrency,\n formatPlanDuration,\n formatPlanDurationLabel,\n formatQuotaValue,\n getPlanFeatureQuantity,\n getPlanFeatureUnit,\n getQuotaDisplayName,\n isServerError,\n} from '../../../shared/utils';\nimport type { PlanFeature } from '../../../shared/types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ShowMore, PagePurpose, EmphasisPanel } from '@burdenoff/fe-libs/ui';\nimport type { ReactNode } from 'react';\n\n/** Wraps children in a ShowMore progressive-disclosure region only when `when` is true. */\nconst ShowMoreIf: FC<{ when: boolean; collapsedHeight?: number; children: ReactNode }> = ({\n when,\n collapsedHeight,\n children,\n}) => (when ? <ShowMore collapsedHeight={collapsedHeight}>{children}</ShowMore> : <>{children}</>);\n\ninterface CombinedQuota {\n quotaId: string;\n name: string;\n quotaType: string;\n limitType: string;\n totalValue: number;\n unit?: string;\n /** True for WORKSPACE-scoped quotas — the full amount applies to EACH\n * activated workspace, not divided across them (see plan.maxWorkspaces). */\n perWorkspace: boolean;\n}\n\nfunction combineQuotas(features: PlanFeature[]): CombinedQuota[] {\n const quotaMap = new Map<string, CombinedQuota>();\n for (const feature of features) {\n if (!feature.quota) continue;\n const quotaId = feature.quota.id;\n const limits = feature.quota.limits as { type?: string; value?: number } | null;\n const limitType = limits?.type ?? 'unknown';\n const limitValue = getPlanFeatureQuantity(feature);\n const existing = quotaMap.get(quotaId);\n if (existing) {\n existing.totalValue += limitValue;\n } else {\n quotaMap.set(quotaId, {\n quotaId,\n name: getQuotaDisplayName(feature),\n quotaType: feature.quota.quotaType ?? '',\n limitType,\n totalValue: limitValue,\n unit: getPlanFeatureUnit(feature),\n perWorkspace: feature.quota.scope === 'WORKSPACE',\n });\n }\n }\n return Array.from(quotaMap.values());\n}\n\nexport const PlanBrowseDetailPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const { planId } = useParams<{ planId: string }>();\n const navigateTo = useBillingNavigate();\n const { plan, isLoading, error, refetch } = usePlan(planId);\n\n const combinedQuotas = useMemo(() => combineQuotas(plan?.features || []), [plan?.features]);\n\n if (isLoading) {\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-10 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-8 w-48 bg-bg-sunken animate-pulse rounded\" />\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-32 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-full bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-24 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-10 w-full bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n </div>\n );\n }\n\n if (error && isServerError(error)) {\n return (\n <div className=\"p-6\">\n <ServerError\n title={tr('billing.plans.serverUnavailable', 'Server Unavailable')}\n message={tr('billing.plans.unableToLoadPlanDetails', 'Unable to load plan details.')}\n onRetry={() => refetch()}\n showRetry\n />\n </div>\n );\n }\n\n if (!plan) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.planNotFound', 'Plan not found')}\n </h2>\n <p className=\"text-sm text-text-secondary\">\n {error?.message ||\n tr(\n 'billing.plans.planNotFoundMessage',\n 'The plan you are looking for does not exist.'\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Back to Plans\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-start gap-4\">\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors\"\n >\n <svg className=\"size-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n {plan.name}\n </h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {formatPlanDurationLabel(plan.duration)} billing plan\n </p>\n <PagePurpose className=\"mt-3\">\n {tr(\n 'billing.plans.browseDetailPurpose',\n 'Everything this plan includes — its price, billing period and the full list of features and quotas — so you can confirm it fits before subscribing. Hit Subscribe when you are ready to check out.'\n )}\n </PagePurpose>\n </div>\n </div>\n\n <button\n type=\"button\"\n onClick={() => navigateTo(`/checkout/${plan.id}`)}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Subscribe to Plan\n </button>\n </div>\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Content */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Pricing Card — primary emphasis zone */}\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"p-6 border-b border-border-seam\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.pricing', 'Pricing')}\n </h2>\n </div>\n <div className=\"p-6\">\n <div className=\"flex items-baseline gap-1\">\n <span className=\"text-4xl font-bold text-text-primary\">\n {formatCurrency(plan.price, plan.currency)}\n </span>\n <span className=\"text-lg text-text-secondary\">\n / {formatPlanDuration(plan.duration)}\n </span>\n </div>\n <p className=\"text-sm text-text-secondary mt-2\">\n {tr('billing.plans.billed', 'Billed')}{' '}\n {plan.duration === 'monthly'\n ? tr('billing.plans.everyMonth', 'every month')\n : tr('billing.plans.annually', 'annually')}\n </p>\n </div>\n </EmphasisPanel>\n\n {/* Features Card */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-seam bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.featuresAndQuotas', 'Features & Quotas')} (\n {combinedQuotas.length})\n </h2>\n </div>\n <div className=\"p-6\">\n {combinedQuotas.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.noFeatures', 'No features configured for this plan.')}\n </p>\n ) : (\n <ShowMoreIf when={combinedQuotas.length > 4} collapsedHeight={280}>\n <ul className=\"space-y-3\">\n {combinedQuotas.map((quota) => (\n <li\n key={quota.quotaId}\n className=\"flex items-start gap-3 p-3 rounded-lg bg-bg-sunken\"\n >\n <div className=\"size-8 rounded-full bg-status-success-bg-subtle flex items-center justify-center shrink-0\">\n <svg\n className=\"size-4 text-status-success-text\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n </div>\n <div className=\"flex-1\">\n <div className=\"flex items-center justify-between\">\n <p className=\"font-medium text-text-primary\">{quota.name}</p>\n <span className=\"font-semibold text-text-primary\">\n {formatQuotaValue(quota.totalValue, quota.unit)}\n {quota.perWorkspace && (\n <span className=\"font-normal text-text-secondary\">\n {' '}\n {tr('billing.plans.perWorkspace', 'per workspace')}\n </span>\n )}\n </span>\n </div>\n <div className=\"flex items-center gap-2 mt-1\">\n <span className=\"text-sm text-text-secondary capitalize\">\n Type: {quota.limitType}\n </span>\n {quota.quotaType && (\n <span className=\"px-2 py-0.5 text-xs font-medium bg-bg-sunken text-text-secondary rounded\">\n {quota.quotaType}\n </span>\n )}\n </div>\n </div>\n </li>\n ))}\n </ul>\n </ShowMoreIf>\n )}\n </div>\n </div>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6 lg:sticky lg:top-6 lg:self-start\">\n {/* Subscribe Card — primary emphasis zone */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface bg-accent-wash shadow-[var(--shadow-pop)] overflow-hidden\">\n <div className=\"p-6 border-b border-border-seam bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.plans.subscribeTitle', 'Subscribe')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">{tr('billing.plans.price', 'Price')}</p>\n <p className=\"text-sm font-medium text-text-primary mt-0.5\">\n {formatCurrency(plan.price, plan.currency)} / {formatPlanDuration(plan.duration)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.billingPeriod', 'Billing Period')}\n </p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatPlanDurationLabel(plan.duration)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.maxWorkspaces', 'Max Workspaces')}\n </p>\n <p className=\"text-sm font-medium text-text-primary mt-0.5\">\n {plan.maxWorkspaces ?? 1}{' '}\n {(plan.maxWorkspaces ?? 1) === 1\n ? tr('billing.plans.workspaceSingular', 'workspace')\n : tr('billing.plans.workspacePlural', 'workspaces')}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.plans.quotasIncluded', 'Quotas Included')}\n </p>\n <p className=\"text-sm font-medium text-text-primary mt-0.5\">\n {combinedQuotas.length}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/checkout/${plan.id}`)}\n className=\"w-full px-4 py-2.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Subscribe to Plan\n </button>\n </div>\n </div>\n\n {/* Back */}\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"w-full px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Back to Plans\n </button>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,IAAME,KAAoF,EACxF,SACA,oBACA,kBACKC,IAAO,kBAACC,GAAD;CAA2B;CAAkB;AAAmB,CAAA,IAAI,kBAAAJ,GAAA,EAAG,YAAW,CAAA;AAchG,SAASK,EAAc,GAA0C;CAC/D,IAAMC,oBAAW,IAAI,IAA2B;CAChD,KAAK,IAAMC,KAAWC,GAAU;EAC9B,IAAI,CAACD,EAAQ,OAAO;EACpB,IAAME,IAAUF,EAAQ,MAAM,IAExBG,IADSH,EAAQ,MAAM,QACH,QAAQ,WAC5BI,IAAaC,EAAuBL,CAAO,GAC3CM,IAAWP,EAAS,IAAIG,CAAO;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AA;IAEO,CAAA;GACL;;CACF,CAAA;AAkNX"}
@@ -1,3 +1,2 @@
1
1
  import { FC } from 'react';
2
2
  export declare const PlanCreatePage: FC;
3
- //# sourceMappingURL=PlanCreatePage.d.ts.map
@@ -1,23 +1,23 @@
1
1
  import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
2
2
  import { PageHeader as t } from "../../../shared/components/PageHeader.js";
3
3
  import { CurrencyPriceOverridesEditor as n } from "../../../shared/components/CurrencyPriceOverridesEditor.js";
4
- import "../../../shared/components/index.js";
5
- import { PlanDuration as r } from "../../../shared/types/graphql.js";
6
- import { useBillingPermissions as i } from "../../../hooks/useBillingPermissions.js";
7
- import { useBillingNavigate as a } from "../../../hooks/useBillingNavigate.js";
8
- import { usePlanMutations as o } from "../hooks/usePlans.js";
9
- import { useQuotas as s } from "../hooks/useQuotas.js";
4
+ import { useBillingNavigate as r } from "../../../hooks/useBillingNavigate.js";
10
5
  import "../hooks/index.js";
6
+ import { useBillingPermissions as i } from "../../../hooks/useBillingPermissions.js";
7
+ import "../../../shared/components/index.js";
8
+ import { usePlanMutations as a } from "../hooks/usePlans.js";
9
+ import { useQuotas as o } from "../hooks/useQuotas.js";
10
+ import { PlanDuration as s } from "../../../shared/types/graphql.js";
11
11
  import { useState as c } from "react";
12
12
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
13
13
  import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
14
  import { PagePurpose as p } from "@burdenoff/fe-libs/ui";
15
- //#region src/billing/modules/plans/pages/PlanCreatePage.tsx
15
+ // src/billing/modules/plans/pages/PlanCreatePage.tsx
16
16
  var m = () => {
17
17
  let { t: m } = f(), h = (e, t) => {
18
18
  let n = m(e);
19
19
  return n === e ? t : n;
20
- }, g = a(), _ = i(), { quotas: v, isLoading: y } = s({ onlyActive: !0 }), { createPlan: b, isCreating: x } = o(), [S, C] = c(""), [w, T] = c(""), [E, D] = c("USD"), [O, k] = c(r.MONTHLY), [A, j] = c(""), [M, N] = c(!0), [P, F] = c([]), [I, L] = c([]), [R, z] = c(null), [B, V] = c(!1);
20
+ }, g = r(), _ = i(), { quotas: v, isLoading: y } = o({ onlyActive: !0 }), { createPlan: b, isCreating: x } = a(), [S, C] = c(""), [w, T] = c(""), [E, D] = c("USD"), [O, k] = c(s.MONTHLY), [A, j] = c(""), [M, N] = c(!0), [P, F] = c([]), [I, L] = c([]), [R, z] = c(null), [B, V] = c(!1);
21
21
  if (!_.canManagePlans) return /* @__PURE__ */ u(e, { message: h("billing.plans.noCreatePermission", "You don't have permission to create plans.") });
22
22
  if (y) return /* @__PURE__ */ d("div", {
23
23
  className: "space-y-6 p-6",
@@ -225,10 +225,10 @@ var m = () => {
225
225
  onChange: (e) => k(e.target.value),
226
226
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
227
227
  children: [/* @__PURE__ */ u("option", {
228
- value: r.MONTHLY,
228
+ value: s.MONTHLY,
229
229
  children: "Monthly"
230
230
  }), /* @__PURE__ */ u("option", {
231
- value: r.YEARLY,
231
+ value: s.YEARLY,
232
232
  children: "Yearly"
233
233
  })]
234
234
  })] }),
@@ -356,7 +356,6 @@ var m = () => {
356
356
  ]
357
357
  });
358
358
  };
359
- //#endregion
360
359
  export { m as PlanCreatePage };
361
360
 
362
361
  //# sourceMappingURL=PlanCreatePage.js.map