@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.
- package/dist/billing/BillingAdminRoutes.d.ts +1 -2
- package/dist/billing/BillingAdminRoutes.js +11 -12
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/BillingRoot.d.ts +0 -1
- package/dist/billing/BillingRoot.js +10 -9
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/BillingUserRoutes.d.ts +1 -2
- package/dist/billing/BillingUserRoutes.js +13 -14
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/hooks/useBillingAccountSelection.d.ts +0 -1
- package/dist/billing/hooks/useBillingAccountSelection.js +7 -5
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
- package/dist/billing/hooks/useBillingEventEmitter.d.ts +0 -1
- package/dist/billing/hooks/useBillingEventEmitter.js +1 -2
- package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
- package/dist/billing/hooks/useBillingNavigate.d.ts +0 -1
- package/dist/billing/hooks/useBillingNavigate.js +1 -2
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
- package/dist/billing/hooks/useBillingPermissions.d.ts +0 -1
- package/dist/billing/hooks/useBillingPermissions.js +2 -3
- package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +0 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.js +1 -2
- package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
- package/dist/billing/hooks/useProducts.d.ts +0 -1
- package/dist/billing/hooks/useProducts.js +1 -2
- package/dist/billing/hooks/useProducts.js.map +1 -1
- package/dist/billing/index.d.ts +0 -1
- package/dist/billing/lib/native-purchases.d.ts +0 -1
- package/dist/billing/lib/native-purchases.js +1 -2
- package/dist/billing/lib/native-purchases.js.map +1 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +0 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js +4 -5
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
- package/dist/billing/modules/addons/hooks/index.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/index.js +3 -2
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js +1 -2
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js.map +1 -1
- package/dist/billing/modules/addons/hooks/useAddons.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/useAddons.js +1 -2
- package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
- package/dist/billing/modules/addons/index.d.ts +0 -1
- package/dist/billing/modules/addons/index.js +10 -10
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +15 -16
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +11 -12
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +16 -17
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +16 -17
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +111 -106
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +105 -100
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/index.d.ts +0 -1
- package/dist/billing/modules/addons/pages/index.js +7 -6
- package/dist/billing/modules/addons/store/addonCartStore.d.ts +0 -1
- package/dist/billing/modules/addons/store/addonCartStore.js +2 -7
- package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
- package/dist/billing/modules/affiliate/api.d.ts +0 -1
- package/dist/billing/modules/affiliate/api.js +1 -2
- package/dist/billing/modules/affiliate/api.js.map +1 -1
- package/dist/billing/modules/affiliate/index.d.ts +0 -1
- package/dist/billing/modules/affiliate/index.js +1 -2
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +0 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +29 -28
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/index.d.ts +0 -1
- package/dist/billing/modules/analytics/index.js +1 -2
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +0 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +8 -9
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/index.d.ts +0 -1
- package/dist/billing/modules/analytics/pages/index.js +1 -1
- package/dist/billing/modules/billing/hooks/index.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/index.js +5 -4
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useInvoices.js +1 -2
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.js +1 -2
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.js.map +1 -1
- package/dist/billing/modules/billing/hooks/usePayments.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js +1 -2
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useTransactions.js +30 -31
- package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
- package/dist/billing/modules/billing/index.d.ts +0 -1
- package/dist/billing/modules/billing/index.js +15 -15
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +11 -12
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +53 -59
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +81 -87
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +11 -12
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +51 -54
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +33 -34
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +92 -93
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +38 -39
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -30
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/index.d.ts +0 -1
- package/dist/billing/modules/billing/pages/index.js +10 -9
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -2
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -2
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js +1 -2
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js +1 -2
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts +0 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +35 -32
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.js +1 -2
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +0 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +1 -2
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +1 -2
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +0 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.js +5 -3
- package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +0 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.js +35 -41
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -2
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +1 -2
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +0 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js +5 -6
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +0 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +7 -8
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/index.d.ts +0 -1
- package/dist/billing/modules/checkout/components/index.js +12 -11
- package/dist/billing/modules/checkout/hooks/index.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/index.js +5 -4
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js +182 -195
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +33 -32
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +1 -2
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +1 -2
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +4 -8
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js +1 -2
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
- package/dist/billing/modules/checkout/index.d.ts +0 -1
- package/dist/billing/modules/checkout/index.js +19 -19
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +0 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +730 -732
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/pages/index.d.ts +0 -1
- package/dist/billing/modules/checkout/pages/index.js +1 -1
- package/dist/billing/modules/checkout/types/index.d.ts +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
- package/dist/billing/modules/coupons/index.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +5 -6
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +15 -13
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +12 -10
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +7 -11
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/index.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/index.js +5 -4
- package/dist/billing/modules/credits/hooks/index.d.ts +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.d.ts +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.js +20 -21
- package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
- package/dist/billing/modules/credits/index.d.ts +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -24
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +26 -27
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +54 -52
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +37 -38
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/index.d.ts +0 -1
- package/dist/billing/modules/credits/pages/index.js +5 -4
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -3
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -43
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +1 -2
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1 -2
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +2 -5
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -2
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/index.js +7 -6
- package/dist/billing/modules/dashboard/hooks/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/index.js +3 -2
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +2 -3
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.js +2 -3
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
- package/dist/billing/modules/dashboard/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/index.js +11 -10
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +0 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +266 -264
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/pages/index.js +1 -1
- package/dist/billing/modules/discounts/index.d.ts +0 -1
- package/dist/billing/modules/discounts/index.js +1 -2
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +0 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +169 -176
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/index.d.ts +0 -1
- package/dist/billing/modules/discounts/pages/index.js +1 -1
- package/dist/billing/modules/earnings/api.d.ts +0 -1
- package/dist/billing/modules/earnings/api.js +66 -67
- package/dist/billing/modules/earnings/api.js.map +1 -1
- package/dist/billing/modules/earnings/index.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +17 -17
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +188 -189
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +111 -111
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +29 -30
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +103 -104
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +0 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.js +1 -2
- package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -1
- package/dist/billing/modules/plans/constants/enterprise.d.ts +0 -1
- package/dist/billing/modules/plans/constants/enterprise.js +1 -2
- package/dist/billing/modules/plans/constants/enterprise.js.map +1 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +0 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.js +1 -2
- package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
- package/dist/billing/modules/plans/hooks/index.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/index.js +3 -2
- package/dist/billing/modules/plans/hooks/usePlans.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/usePlans.js +1 -2
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/useQuotas.js +1 -2
- package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
- package/dist/billing/modules/plans/index.d.ts +0 -1
- package/dist/billing/modules/plans/index.js +11 -11
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +12 -15
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +38 -39
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +10 -11
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +40 -41
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +15 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +18 -19
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +100 -101
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/index.d.ts +0 -1
- package/dist/billing/modules/plans/pages/index.js +8 -7
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +0 -1
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.js +1 -2
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.js.map +1 -1
- package/dist/billing/modules/plans/utils/planSelector.d.ts +0 -1
- package/dist/billing/modules/plans/utils/planSelector.js +1 -2
- package/dist/billing/modules/plans/utils/planSelector.js.map +1 -1
- package/dist/billing/modules/promotions/index.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +5 -6
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +5 -6
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/index.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/index.js +3 -2
- package/dist/billing/modules/quota/hooks/index.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/index.js +1 -1
- package/dist/billing/modules/quota/hooks/useQuota.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +1 -2
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
- package/dist/billing/modules/quota/index.d.ts +0 -1
- package/dist/billing/modules/quota/index.js +8 -8
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +12 -15
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaPage.js +3 -3
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +13 -14
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +9 -10
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +12 -13
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +16 -17
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/index.d.ts +0 -1
- package/dist/billing/modules/quota/pages/index.js +6 -5
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts +0 -1
- package/dist/billing/modules/quota/utils/quotaSelector.js +1 -2
- package/dist/billing/modules/quota/utils/quotaSelector.js.map +1 -1
- package/dist/billing/modules/settings/index.d.ts +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +12 -13
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +0 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +32 -32
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/index.d.ts +0 -1
- package/dist/billing/modules/settings/pages/index.js +3 -2
- package/dist/billing/modules/store/graphql/index.d.ts +0 -1
- package/dist/billing/modules/store/index.d.ts +0 -1
- package/dist/billing/modules/store/index.js +1 -2
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +0 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +1 -2
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +0 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +9 -11
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/modules/subscriptions/hooks/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/hooks/index.js +1 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +0 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +1 -2
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
- package/dist/billing/modules/subscriptions/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/index.js +6 -6
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +311 -312
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +61 -62
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +30 -31
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/index.js +4 -3
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +0 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +17 -18
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
- package/dist/billing/modules/usage/hooks/index.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.js +72 -73
- package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js +12 -13
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js.map +1 -1
- package/dist/billing/modules/usage/index.d.ts +0 -1
- package/dist/billing/modules/usage/index.js +1 -2
- package/dist/billing/modules/usage/pages/UsagePage.d.ts +0 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +229 -227
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/pages/index.d.ts +0 -1
- package/dist/billing/modules/usage/pages/index.js +1 -1
- package/dist/billing/modules/usage/utils/aiSpend.d.ts +0 -1
- package/dist/billing/modules/usage/utils/aiSpend.js +2 -3
- package/dist/billing/modules/usage/utils/aiSpend.js.map +1 -1
- package/dist/billing/providers/BillingProvider.d.ts +0 -1
- package/dist/billing/providers/BillingProvider.js +3 -4
- package/dist/billing/providers/BillingProvider.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.d.ts +0 -1
- package/dist/billing/shared/components/AccessDenied.js +1 -2
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.d.ts +0 -1
- package/dist/billing/shared/components/ActorIdentity.js +2 -3
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +0 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +1 -2
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/components/EmptyState.d.ts +0 -1
- package/dist/billing/shared/components/EmptyState.js +1 -2
- package/dist/billing/shared/components/EmptyState.js.map +1 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +0 -1
- package/dist/billing/shared/components/PageHeader.d.ts +0 -1
- package/dist/billing/shared/components/PageHeader.js +1 -2
- package/dist/billing/shared/components/PageHeader.js.map +1 -1
- package/dist/billing/shared/components/PushPermissionNudge.d.ts +0 -1
- package/dist/billing/shared/components/PushPermissionNudge.js +2 -3
- package/dist/billing/shared/components/PushPermissionNudge.js.map +1 -1
- package/dist/billing/shared/components/ServerError.d.ts +0 -1
- package/dist/billing/shared/components/ServerError.js +1 -2
- package/dist/billing/shared/components/ServerError.js.map +1 -1
- package/dist/billing/shared/components/StatCard.d.ts +0 -1
- package/dist/billing/shared/components/StatCard.js +1 -2
- package/dist/billing/shared/components/StatCard.js.map +1 -1
- package/dist/billing/shared/components/index.d.ts +0 -1
- package/dist/billing/shared/components/index.js +8 -7
- package/dist/billing/shared/hooks/index.d.ts +0 -1
- package/dist/billing/shared/hooks/index.js +1 -1
- package/dist/billing/shared/hooks/useActorProfiles.d.ts +0 -1
- package/dist/billing/shared/hooks/useActorProfiles.js +4 -8
- package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
- package/dist/billing/shared/hooks/useTr.d.ts +0 -1
- package/dist/billing/shared/hooks/useTr.js +1 -2
- package/dist/billing/shared/hooks/useTr.js.map +1 -1
- package/dist/billing/shared/index.d.ts +0 -1
- package/dist/billing/shared/types/graphql.d.ts +0 -1
- package/dist/billing/shared/types/graphql.js +1 -2
- package/dist/billing/shared/types/graphql.js.map +1 -1
- package/dist/billing/shared/types/index.d.ts +0 -1
- package/dist/billing/shared/ui/Card.d.ts +1 -2
- package/dist/billing/shared/ui/Card.js +1 -2
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.d.ts +1 -2
- package/dist/billing/shared/ui/MetricCard.js +1 -2
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/dist/billing/shared/ui/ProgressBar.d.ts +1 -2
- package/dist/billing/shared/ui/ProgressBar.js +1 -2
- package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
- package/dist/billing/shared/ui/SectionHeader.d.ts +1 -2
- package/dist/billing/shared/ui/StatusPill.d.ts +1 -2
- package/dist/billing/shared/ui/StatusPill.js +1 -2
- package/dist/billing/shared/ui/StatusPill.js.map +1 -1
- package/dist/billing/shared/ui/index.d.ts +0 -1
- package/dist/billing/shared/ui/index.js +5 -4
- package/dist/billing/shared/utils/directActivityGraphql.d.ts +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.d.ts +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.js +1 -2
- package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
- package/dist/billing/shared/utils/error.d.ts +0 -1
- package/dist/billing/shared/utils/error.js +1 -2
- package/dist/billing/shared/utils/error.js.map +1 -1
- package/dist/billing/shared/utils/format.d.ts +0 -1
- package/dist/billing/shared/utils/format.js +1 -2
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/gatewayGraphql.d.ts +0 -1
- package/dist/billing/shared/utils/gatewayGraphql.js +2 -3
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
- package/dist/billing/shared/utils/index.d.ts +0 -1
- package/dist/billing/shared/utils/index.js +9 -8
- package/dist/billing/shared/utils/navigation.d.ts +0 -1
- package/dist/billing/shared/utils/navigation.js +1 -2
- package/dist/billing/shared/utils/navigation.js.map +1 -1
- package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
- package/dist/billing/shared/utils/paymentTheme.js +2 -3
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/dist/billing/shared/utils/status.d.ts +0 -1
- package/dist/billing/shared/utils/status.js +24 -25
- package/dist/billing/shared/utils/status.js.map +1 -1
- package/dist/billing/shared/utils/tokens.d.ts +0 -1
- package/dist/billing/shared/utils/tokens.js +1 -2
- package/dist/billing/shared/utils/tokens.js.map +1 -1
- package/dist/billing/translations/en.d.ts +0 -1
- package/dist/billing/types/index.d.ts +0 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/global-operations.d.ts +3252 -3206
- package/dist/generated/global-operations.js +445 -422
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/global-types.js +1 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +76 -47
- package/dist/generated/wspace-operations.js +2 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +75 -69
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +65 -54
- package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
- package/dist/billing/BillingRoot.d.ts.map +0 -1
- package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
- package/dist/billing/hooks/useProducts.d.ts.map +0 -1
- package/dist/billing/index.d.ts.map +0 -1
- package/dist/billing/lib/native-purchases.d.ts.map +0 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
- package/dist/billing/modules/addons/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
- package/dist/billing/modules/analytics/index.d.ts.map +0 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
- package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
- package/dist/billing/modules/billing/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
- package/dist/billing/modules/checkout/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
- package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
- package/dist/billing/modules/coupons/index.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
- package/dist/billing/modules/credits/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/discounts/index.d.ts.map +0 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
- package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/earnings/api.d.ts.map +0 -1
- package/dist/billing/modules/earnings/index.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
- package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
- package/dist/billing/modules/plans/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
- package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
- package/dist/billing/modules/promotions/index.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
- package/dist/billing/modules/quota/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
- package/dist/billing/modules/settings/index.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
- package/dist/billing/modules/store/index.d.ts.map +0 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
- package/dist/billing/modules/usage/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
- package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
- package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
- package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
- package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
- package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
- package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
- package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
- package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
- package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
- package/dist/billing/shared/components/index.d.ts.map +0 -1
- package/dist/billing/shared/hooks/index.d.ts.map +0 -1
- package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
- package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/billing/shared/index.d.ts.map +0 -1
- package/dist/billing/shared/types/graphql.d.ts.map +0 -1
- package/dist/billing/shared/types/index.d.ts.map +0 -1
- package/dist/billing/shared/ui/Card.d.ts.map +0 -1
- package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
- package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
- package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
- package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
- package/dist/billing/shared/ui/index.d.ts.map +0 -1
- package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/error.d.ts.map +0 -1
- package/dist/billing/shared/utils/format.d.ts.map +0 -1
- package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/index.d.ts.map +0 -1
- package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
- package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
- package/dist/billing/shared/utils/status.d.ts.map +0 -1
- package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
- package/dist/billing/translations/en.d.ts.map +0 -1
- package/dist/billing/types/index.d.ts.map +0 -1
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -2,5 +2,4 @@
|
|
|
2
2
|
* Admin-only billing routes.
|
|
3
3
|
* Includes plans/addons/quota-templates CRUD, coupons, discounts, refunds, and analytics.
|
|
4
4
|
*/
|
|
5
|
-
export declare function BillingAdminRoutes(): import(
|
|
6
|
-
//# sourceMappingURL=BillingAdminRoutes.d.ts.map
|
|
5
|
+
export declare function BillingAdminRoutes(): import('react').JSX.Element;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useBillingEventEmitter as e } from "./hooks/useBillingEventEmitter.js";
|
|
2
2
|
import { AccessDenied as t } from "./shared/components/AccessDenied.js";
|
|
3
|
+
import { useBillingPermissions as n } from "./hooks/useBillingPermissions.js";
|
|
4
|
+
import { useBilling as r } from "./providers/BillingProvider.js";
|
|
3
5
|
import "./shared/components/index.js";
|
|
4
|
-
import { useBillingEventEmitter as n } from "./hooks/useBillingEventEmitter.js";
|
|
5
|
-
import { useBillingPermissions as r } from "./hooks/useBillingPermissions.js";
|
|
6
6
|
import { Suspense as i, lazy as a, useEffect as o } from "react";
|
|
7
7
|
import { FeatureGate as s } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
8
|
import { Navigate as c, Route as l, Routes as u, useNavigate as d } from "react-router";
|
|
9
9
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/billing/BillingAdminRoutes.tsx
|
|
11
11
|
var m = a(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlansListPage }))), h = a(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlanDetailPage }))), g = a(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlanEditPage }))), _ = a(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlanCreatePage }))), v = a(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlanAssignFreePage }))), y = a(() => import("./modules/addons/index.js").then((e) => ({ default: e.AddonsListPage }))), b = a(() => import("./modules/addons/index.js").then((e) => ({ default: e.AddonDetailPage }))), x = a(() => import("./modules/addons/index.js").then((e) => ({ default: e.AddonEditPage }))), S = a(() => import("./modules/addons/index.js").then((e) => ({ default: e.AddonCreatePage }))), C = a(() => import("./modules/quota/index.js").then((e) => ({ default: e.QuotaTemplatesListPage }))), w = a(() => import("./modules/quota/index.js").then((e) => ({ default: e.QuotaTemplateDetailPage }))), T = a(() => import("./modules/quota/index.js").then((e) => ({ default: e.QuotaTemplateCreatePage }))), E = a(() => import("./modules/quota/index.js").then((e) => ({ default: e.QuotaTemplateEditPage }))), D = a(() => import("./modules/quota/index.js").then((e) => ({ default: e.QuotaAssignFreePage }))), O = a(() => import("./modules/coupons/index.js").then((e) => ({ default: e.CouponsListPage }))), k = a(() => import("./modules/coupons/index.js").then((e) => ({ default: e.CreateCouponPage }))), A = a(() => import("./modules/coupons/index.js").then((e) => ({ default: e.EditCouponPage }))), j = a(() => import("./modules/coupons/index.js").then((e) => ({ default: e.CouponDetailPage }))), M = a(() => import("./modules/promotions/index.js").then((e) => ({ default: e.PromotionsListPage }))), N = a(() => import("./modules/promotions/index.js").then((e) => ({ default: e.CreatePromotionPage }))), P = a(() => import("./modules/discounts/index.js").then((e) => ({ default: e.DiscountsListPage }))), F = a(() => import("./modules/billing/index.js").then((e) => ({ default: e.RefundsPage }))), I = a(() => import("./modules/billing/index.js").then((e) => ({ default: e.RefundIssueLogsPage }))), L = a(() => import("./modules/billing/index.js").then((e) => ({ default: e.BillingWebhookLogsPage }))), R = a(() => import("./modules/billing/index.js").then((e) => ({ default: e.OrderCallbackLogsPage }))), z = a(() => import("./modules/credits/index.js").then((e) => ({ default: e.AdminCreditsPage }))), B = a(() => import("./modules/analytics/index.js").then((e) => ({ default: e.AnalyticsPage }))), V = a(() => import("./modules/earnings/index.js").then((e) => ({ default: e.DeveloperRevenueAdminPage }))), H = a(() => import("./modules/earnings/index.js").then((e) => ({ default: e.DeveloperRevenueOrgDetailPage }))), U = a(() => import("./modules/earnings/index.js").then((e) => ({ default: e.PayoutAdminPage })));
|
|
12
12
|
function W() {
|
|
13
|
-
let { basePath:
|
|
13
|
+
let { basePath: e } = r(), t = d(), n = e && e !== "/" ? e.replace(/\/$/, "") : "";
|
|
14
14
|
return o(() => {
|
|
15
|
-
|
|
16
|
-
}, [
|
|
15
|
+
t(`${n}/plans`, { replace: !0 });
|
|
16
|
+
}, [n, t]), null;
|
|
17
17
|
}
|
|
18
18
|
function G() {
|
|
19
19
|
return /* @__PURE__ */ f("div", {
|
|
@@ -45,8 +45,8 @@ function K({ title: e, featureFlag: t }) {
|
|
|
45
45
|
})
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function q({ title:
|
|
49
|
-
let u =
|
|
48
|
+
function q({ title: r, featureFlag: i, permission: a, eventName: c, children: l }) {
|
|
49
|
+
let u = n(), { emit: d } = e(), p = !!u[a];
|
|
50
50
|
return o(() => {
|
|
51
51
|
p && d(c, { source: "BillingAdminRoutes" });
|
|
52
52
|
}, [
|
|
@@ -57,10 +57,10 @@ function q({ title: e, featureFlag: i, permission: a, eventName: c, children: l
|
|
|
57
57
|
flag: i,
|
|
58
58
|
defaultValue: !0,
|
|
59
59
|
fallback: /* @__PURE__ */ f(K, {
|
|
60
|
-
title:
|
|
60
|
+
title: r,
|
|
61
61
|
featureFlag: i
|
|
62
62
|
}),
|
|
63
|
-
children: p ? l : /* @__PURE__ */ f(t, { message: `You don't have permission to access ${
|
|
63
|
+
children: p ? l : /* @__PURE__ */ f(t, { message: `You don't have permission to access ${r}.` })
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function J(e) {
|
|
@@ -471,7 +471,6 @@ function Y() {
|
|
|
471
471
|
})
|
|
472
472
|
] });
|
|
473
473
|
}
|
|
474
|
-
//#endregion
|
|
475
474
|
export { Y as BillingAdminRoutes };
|
|
476
475
|
|
|
477
476
|
//# sourceMappingURL=BillingAdminRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingAdminRoutes.js","names":[],"sources":["../../src/billing/BillingAdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useEffect, type ReactNode } from 'react';\nimport { Navigate, Route, Routes, useNavigate } from 'react-router';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useBillingEventEmitter, type BillingDomainEvent } from './hooks/useBillingEventEmitter';\nimport { useBillingPermissions } from './hooks/useBillingPermissions';\nimport { useBilling } from './providers/BillingProvider';\nimport { AccessDenied } from './shared/components';\n\n// Lazy loaded pages - Plans (full CRUD)\nconst PlansListPage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlansListPage }))\n);\nconst PlanDetailPage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanDetailPage }))\n);\nconst PlanEditPage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanEditPage }))\n);\nconst PlanCreatePage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanCreatePage }))\n);\nconst PlanAssignFreePage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanAssignFreePage }))\n);\n\n// Lazy loaded pages - Addons (full CRUD)\nconst AddonsListPage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonsListPage }))\n);\nconst AddonDetailPage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonDetailPage }))\n);\nconst AddonEditPage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonEditPage }))\n);\nconst AddonCreatePage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonCreatePage }))\n);\n\n// Lazy loaded pages - Quota Templates (full CRUD)\nconst QuotaTemplatesListPage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplatesListPage }))\n);\nconst QuotaTemplateDetailPage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplateDetailPage }))\n);\nconst QuotaTemplateCreatePage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplateCreatePage }))\n);\nconst QuotaTemplateEditPage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplateEditPage }))\n);\nconst QuotaAssignFreePage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaAssignFreePage }))\n);\n\n// Lazy loaded pages - Coupons\nconst CouponsListPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.CouponsListPage }))\n);\nconst CreateCouponPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.CreateCouponPage }))\n);\nconst EditCouponPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.EditCouponPage }))\n);\nconst CouponDetailPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.CouponDetailPage }))\n);\n\n// Lazy loaded pages - Promotions\nconst PromotionsListPage = lazy(() =>\n import('./modules/promotions').then((m) => ({ default: m.PromotionsListPage }))\n);\nconst CreatePromotionPage = lazy(() =>\n import('./modules/promotions').then((m) => ({ default: m.CreatePromotionPage }))\n);\n\n// Lazy loaded pages - Discounts\nconst DiscountsListPage = lazy(() =>\n import('./modules/discounts').then((m) => ({ default: m.DiscountsListPage }))\n);\n\n// Lazy loaded pages - Refunds\nconst RefundsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.RefundsPage }))\n);\nconst RefundIssueLogsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.RefundIssueLogsPage }))\n);\n\n// Lazy loaded pages - Billing webhook logs\nconst BillingWebhookLogsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.BillingWebhookLogsPage }))\n);\n\n// Lazy loaded pages - Order callback logs\nconst OrderCallbackLogsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.OrderCallbackLogsPage }))\n);\n\n// Lazy loaded pages - Credits admin\nconst AdminCreditsPage = lazy(() =>\n import('./modules/credits').then((m) => ({ default: m.AdminCreditsPage }))\n);\n\n// Lazy loaded pages - Analytics\nconst AnalyticsPage = lazy(() =>\n import('./modules/analytics').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst DeveloperRevenueAdminPage = lazy(() =>\n import('./modules/earnings').then((m) => ({ default: m.DeveloperRevenueAdminPage }))\n);\nconst DeveloperRevenueOrgDetailPage = lazy(() =>\n import('./modules/earnings').then((m) => ({ default: m.DeveloperRevenueOrgDetailPage }))\n);\nconst PayoutAdminPage = lazy(() =>\n import('./modules/earnings').then((m) => ({ default: m.PayoutAdminPage }))\n);\n\nfunction DefaultRedirect() {\n const { basePath } = useBilling();\n const routerNavigate = useNavigate();\n const base = basePath && basePath !== '/' ? basePath.replace(/\\/$/, '') : '';\n useEffect(() => {\n routerNavigate(`${base}/plans`, { replace: true });\n }, [base, routerNavigate]);\n return null;\n}\n\nfunction PageLoader() {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"size-8 animate-spin rounded-full border-4 border-action-primary-bg border-t-transparent\" />\n </div>\n );\n}\n\ntype BillingPermissions = ReturnType<typeof useBillingPermissions>;\ntype BillingPermissionKey = Exclude<\n {\n [K in keyof BillingPermissions]: BillingPermissions[K] extends boolean ? K : never;\n }[keyof BillingPermissions],\n 'isLoading'\n>;\n\ninterface BillingAdminRouteGateProps {\n title: string;\n featureFlag: string;\n permission: BillingPermissionKey;\n eventName: BillingDomainEvent;\n children: ReactNode;\n}\n\nfunction FeatureDisabled({ title, featureFlag }: { title: string; featureFlag: string }) {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center p-6\">\n <div className=\"max-w-md rounded-card border border-border-seam bg-bg-surface p-6 text-center shadow-[var(--shadow-elevation-1)]\">\n <h2 className=\"text-base font-semibold text-text-primary\">{title} is not enabled</h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n Ask an administrator to enable the{' '}\n <span className=\"font-mono text-xs text-text-secondary bg-bg-sunken/60 rounded px-1.5 py-0.5\">\n {featureFlag}\n </span>{' '}\n feature flag for this organization.\n </p>\n </div>\n </div>\n );\n}\n\nfunction BillingAdminRouteGate({\n title,\n featureFlag,\n permission,\n eventName,\n children,\n}: BillingAdminRouteGateProps) {\n const permissions = useBillingPermissions();\n const { emit } = useBillingEventEmitter();\n const hasPermission = Boolean(permissions[permission]);\n\n useEffect(() => {\n if (hasPermission) {\n emit(eventName, { source: 'BillingAdminRoutes' });\n }\n }, [emit, eventName, hasPermission]);\n\n if (permissions.isLoading) {\n return <PageLoader />;\n }\n\n return (\n <FeatureGate\n flag={featureFlag}\n defaultValue\n fallback={<FeatureDisabled title={title} featureFlag={featureFlag} />}\n >\n {hasPermission ? (\n children\n ) : (\n <AccessDenied message={`You don't have permission to access ${title}.`} />\n )}\n </FeatureGate>\n );\n}\n\nfunction adminPage(props: BillingAdminRouteGateProps): ReactNode {\n return <BillingAdminRouteGate {...props} />;\n}\n\n/**\n * Admin-only billing routes.\n * Includes plans/addons/quota-templates CRUD, coupons, discounts, refunds, and analytics.\n */\nexport function BillingAdminRoutes() {\n return (\n <Routes>\n <Route index element={<Navigate to=\"plans\" replace />} />\n\n {/* Plans - full CRUD */}\n <Route\n path=\"plans\"\n element={adminPage({\n title: 'Plans',\n featureFlag: 'billing.plans',\n permission: 'canViewPlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlansListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/new\"\n element={adminPage({\n title: 'Create plan',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanCreatePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/assign-free\"\n element={adminPage({\n title: 'Assign plan for free',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanAssignFreePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/:planId\"\n element={adminPage({\n title: 'Plan details',\n featureFlag: 'billing.plans',\n permission: 'canViewPlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/:planId/edit\"\n element={adminPage({\n title: 'Edit plan',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanEditPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Addons - full CRUD */}\n <Route\n path=\"addons\"\n element={adminPage({\n title: 'Addons',\n featureFlag: 'billing.addons',\n permission: 'canViewAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonsListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"addons/new\"\n element={adminPage({\n title: 'Create addon',\n featureFlag: 'billing.addons.manage',\n permission: 'canManageAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonCreatePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"addons/:addonId\"\n element={adminPage({\n title: 'Addon details',\n featureFlag: 'billing.addons',\n permission: 'canViewAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"addons/:addonId/edit\"\n element={adminPage({\n title: 'Edit addon',\n featureFlag: 'billing.addons.manage',\n permission: 'canManageAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonEditPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Quota Templates - full CRUD */}\n <Route\n path=\"quotas\"\n element={adminPage({\n title: 'Quota templates',\n featureFlag: 'billing.quotas',\n permission: 'canViewQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplatesListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/new\"\n element={adminPage({\n title: 'Create quota template',\n featureFlag: 'billing.quotas.manage',\n permission: 'canManageQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplateCreatePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/:quotaId\"\n element={adminPage({\n title: 'Quota template details',\n featureFlag: 'billing.quotas',\n permission: 'canViewQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplateDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/:quotaId/edit\"\n element={adminPage({\n title: 'Edit quota template',\n featureFlag: 'billing.quotas.manage',\n permission: 'canManageQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplateEditPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/assign-free\"\n element={adminPage({\n title: 'Assign quota for free',\n featureFlag: 'billing.quotas.manage',\n permission: 'canManageQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaAssignFreePage />\n </Suspense>\n ),\n })}\n />\n\n {/* Coupons */}\n <Route\n path=\"coupons\"\n element={adminPage({\n title: 'Coupons',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CouponsListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"coupons/create\"\n element={adminPage({\n title: 'Create coupon',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CreateCouponPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"coupons/:id\"\n element={adminPage({\n title: 'Coupon details',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CouponDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"coupons/:id/edit\"\n element={adminPage({\n title: 'Edit coupon',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <EditCouponPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Promotions */}\n <Route\n path=\"promotions\"\n element={adminPage({\n title: 'Promotions',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PromotionsListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"promotions/create\"\n element={adminPage({\n title: 'Create Promotion',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CreatePromotionPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Discounts */}\n <Route\n path=\"discounts\"\n element={adminPage({\n title: 'Discounts',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <DiscountsListPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Credit grants */}\n <Route\n path=\"credits\"\n element={adminPage({\n title: 'Credit grants',\n featureFlag: 'billing.credits.grants',\n permission: 'canGrantCredits',\n eventName: 'billing.credit.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AdminCreditsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Refunds */}\n <Route\n path=\"refunds\"\n element={adminPage({\n title: 'Refunds',\n featureFlag: 'billing.refunds',\n permission: 'canProcessRefund',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <RefundsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Refund issue log — refunds that completed at the gateway but left an\n unresolved accounting/reconciliation issue (BOFF-7192) */}\n <Route\n path=\"refunds/logs\"\n element={adminPage({\n title: 'Refund Issue Log',\n featureFlag: 'billing.refunds',\n permission: 'canProcessRefund',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <RefundIssueLogsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Billing webhook logs */}\n <Route\n path=\"webhook-logs\"\n element={adminPage({\n title: 'Billing webhook logs',\n featureFlag: 'billing.webhook-logs',\n permission: 'isBillingAdmin',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <BillingWebhookLogsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Order callback logs */}\n <Route\n path=\"order-callback-logs\"\n element={adminPage({\n title: 'Order callback logs',\n featureFlag: 'billing.order-callback-logs',\n permission: 'isBillingAdmin',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <OrderCallbackLogsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Analytics */}\n <Route\n path=\"analytics\"\n element={adminPage({\n title: 'Billing analytics',\n featureFlag: 'billing.analytics',\n permission: 'canViewAnalytics',\n eventName: 'billing.usage.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AnalyticsPage />\n </Suspense>\n ),\n })}\n />\n\n <Route\n path=\"developer-revenue\"\n element={adminPage({\n title: 'Developer revenue',\n featureFlag: 'billing.payouts.admin',\n permission: 'isBillingAdmin',\n eventName: 'billing.payout.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <DeveloperRevenueAdminPage />\n </Suspense>\n ),\n })}\n />\n\n <Route\n path=\"developer-revenue/:organizationId\"\n element={adminPage({\n title: 'Developer revenue detail',\n featureFlag: 'billing.payouts.admin',\n permission: 'isBillingAdmin',\n eventName: 'billing.payout.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <DeveloperRevenueOrgDetailPage />\n </Suspense>\n ),\n })}\n />\n\n <Route\n path=\"payouts\"\n element={adminPage({\n title: 'Payout administration',\n featureFlag: 'billing.payouts.admin',\n permission: 'isBillingAdmin',\n eventName: 'billing.payout.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PayoutAdminPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Catch-all — uses absolute path to avoid relative-navigation loop */}\n <Route path=\"*\" element={<DefaultRedirect />} />\n </Routes>\n );\n}\n"],"mappings":";;;;;;;;;;AASA,IAAM,IAAgB,QACpB,OAAO,4BAAmB,MAAM,OAAO,EAAE,SAAS,E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AY;IACZ,WAAW;IACX,UACE,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,CAAa,CAAA;eAC/B,kBAAC,GAAD,CAA4B,CAAA;IACpB,CAAA;GAEd,CAAC;EACF,CAAA;EAED,kBAAC,GAAD;GACE,MAAK;GACL,SAAS,EAAU;IACjB,OAAO;IACP,aAAa;IACb,YAAY;IACZ,WAAW;IACX,UACE,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,CAAa,CAAA;eAC/B,kBAAC,GAAD,CAAgC,CAAA;IACxB,CAAA;GAEd,CAAC;EACF,CAAA;EAED,kBAAC,GAAD;GACE,MAAK;GACL,SAAS,EAAU;IACjB,OAAO;IACP,aAAa;IACb,YAAY;IACZ,WAAW;IACX,UACE,kBAAC,GAAD;KAAU,UAAU,kBAAC,GAAD,CAAa,CAAA;eAC/B,kBAAC,GAAD,CAAkB,CAAA;IACV,CAAA;GAEd,CAAC;EACF,CAAA;EAGD,kBAAC,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC,GAAD,CAAkB,CAAA;EAAI,CAAA;CACzC,EAAA,CAAA;AAEZ"}
|
|
1
|
+
{"version":3,"file":"BillingAdminRoutes.js","names":["PlansListPage","lazy","m","PlanDetailPage","PlanEditPage","PlanCreatePage","PlanAssignFreePage","AddonsListPage","AddonDetailPage","AddonEditPage","AddonCreatePage","QuotaTemplatesListPage","QuotaTemplateDetailPage","QuotaTemplateCreatePage","QuotaTemplateEditPage","QuotaAssignFreePage","CouponsListPage","CreateCouponPage","EditCouponPage","CouponDetailPage","PromotionsListPage","CreatePromotionPage","DiscountsListPage","RefundsPage","RefundIssueLogsPage","BillingWebhookLogsPage","OrderCallbackLogsPage","AdminCreditsPage","AnalyticsPage","DeveloperRevenueAdminPage","DeveloperRevenueOrgDetailPage","PayoutAdminPage","DefaultRedirect","useBilling","routerNavigate","useNavigate","base","basePath","useEffect","PageLoader","FeatureDisabled","title","featureFlag","BillingAdminRouteGate","permissions","useBillingPermissions","useBillingEventEmitter","hasPermission","permission","emit","eventName","FeatureGate","children","AccessDenied","adminPage","props","BillingAdminRoutes","Routes","Route","Navigate","Suspense"],"sources":["../../src/billing/BillingAdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useEffect, type ReactNode } from 'react';\nimport { Navigate, Route, Routes, useNavigate } from 'react-router';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useBillingEventEmitter, type BillingDomainEvent } from './hooks/useBillingEventEmitter';\nimport { useBillingPermissions } from './hooks/useBillingPermissions';\nimport { useBilling } from './providers/BillingProvider';\nimport { AccessDenied } from './shared/components';\n\n// Lazy loaded pages - Plans (full CRUD)\nconst PlansListPage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlansListPage }))\n);\nconst PlanDetailPage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanDetailPage }))\n);\nconst PlanEditPage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanEditPage }))\n);\nconst PlanCreatePage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanCreatePage }))\n);\nconst PlanAssignFreePage = lazy(() =>\n import('./modules/plans').then((m) => ({ default: m.PlanAssignFreePage }))\n);\n\n// Lazy loaded pages - Addons (full CRUD)\nconst AddonsListPage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonsListPage }))\n);\nconst AddonDetailPage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonDetailPage }))\n);\nconst AddonEditPage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonEditPage }))\n);\nconst AddonCreatePage = lazy(() =>\n import('./modules/addons').then((m) => ({ default: m.AddonCreatePage }))\n);\n\n// Lazy loaded pages - Quota Templates (full CRUD)\nconst QuotaTemplatesListPage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplatesListPage }))\n);\nconst QuotaTemplateDetailPage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplateDetailPage }))\n);\nconst QuotaTemplateCreatePage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplateCreatePage }))\n);\nconst QuotaTemplateEditPage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaTemplateEditPage }))\n);\nconst QuotaAssignFreePage = lazy(() =>\n import('./modules/quota').then((m) => ({ default: m.QuotaAssignFreePage }))\n);\n\n// Lazy loaded pages - Coupons\nconst CouponsListPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.CouponsListPage }))\n);\nconst CreateCouponPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.CreateCouponPage }))\n);\nconst EditCouponPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.EditCouponPage }))\n);\nconst CouponDetailPage = lazy(() =>\n import('./modules/coupons').then((m) => ({ default: m.CouponDetailPage }))\n);\n\n// Lazy loaded pages - Promotions\nconst PromotionsListPage = lazy(() =>\n import('./modules/promotions').then((m) => ({ default: m.PromotionsListPage }))\n);\nconst CreatePromotionPage = lazy(() =>\n import('./modules/promotions').then((m) => ({ default: m.CreatePromotionPage }))\n);\n\n// Lazy loaded pages - Discounts\nconst DiscountsListPage = lazy(() =>\n import('./modules/discounts').then((m) => ({ default: m.DiscountsListPage }))\n);\n\n// Lazy loaded pages - Refunds\nconst RefundsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.RefundsPage }))\n);\nconst RefundIssueLogsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.RefundIssueLogsPage }))\n);\n\n// Lazy loaded pages - Billing webhook logs\nconst BillingWebhookLogsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.BillingWebhookLogsPage }))\n);\n\n// Lazy loaded pages - Order callback logs\nconst OrderCallbackLogsPage = lazy(() =>\n import('./modules/billing').then((m) => ({ default: m.OrderCallbackLogsPage }))\n);\n\n// Lazy loaded pages - Credits admin\nconst AdminCreditsPage = lazy(() =>\n import('./modules/credits').then((m) => ({ default: m.AdminCreditsPage }))\n);\n\n// Lazy loaded pages - Analytics\nconst AnalyticsPage = lazy(() =>\n import('./modules/analytics').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst DeveloperRevenueAdminPage = lazy(() =>\n import('./modules/earnings').then((m) => ({ default: m.DeveloperRevenueAdminPage }))\n);\nconst DeveloperRevenueOrgDetailPage = lazy(() =>\n import('./modules/earnings').then((m) => ({ default: m.DeveloperRevenueOrgDetailPage }))\n);\nconst PayoutAdminPage = lazy(() =>\n import('./modules/earnings').then((m) => ({ default: m.PayoutAdminPage }))\n);\n\nfunction DefaultRedirect() {\n const { basePath } = useBilling();\n const routerNavigate = useNavigate();\n const base = basePath && basePath !== '/' ? basePath.replace(/\\/$/, '') : '';\n useEffect(() => {\n routerNavigate(`${base}/plans`, { replace: true });\n }, [base, routerNavigate]);\n return null;\n}\n\nfunction PageLoader() {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"size-8 animate-spin rounded-full border-4 border-action-primary-bg border-t-transparent\" />\n </div>\n );\n}\n\ntype BillingPermissions = ReturnType<typeof useBillingPermissions>;\ntype BillingPermissionKey = Exclude<\n {\n [K in keyof BillingPermissions]: BillingPermissions[K] extends boolean ? K : never;\n }[keyof BillingPermissions],\n 'isLoading'\n>;\n\ninterface BillingAdminRouteGateProps {\n title: string;\n featureFlag: string;\n permission: BillingPermissionKey;\n eventName: BillingDomainEvent;\n children: ReactNode;\n}\n\nfunction FeatureDisabled({ title, featureFlag }: { title: string; featureFlag: string }) {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center p-6\">\n <div className=\"max-w-md rounded-card border border-border-seam bg-bg-surface p-6 text-center shadow-[var(--shadow-elevation-1)]\">\n <h2 className=\"text-base font-semibold text-text-primary\">{title} is not enabled</h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n Ask an administrator to enable the{' '}\n <span className=\"font-mono text-xs text-text-secondary bg-bg-sunken/60 rounded px-1.5 py-0.5\">\n {featureFlag}\n </span>{' '}\n feature flag for this organization.\n </p>\n </div>\n </div>\n );\n}\n\nfunction BillingAdminRouteGate({\n title,\n featureFlag,\n permission,\n eventName,\n children,\n}: BillingAdminRouteGateProps) {\n const permissions = useBillingPermissions();\n const { emit } = useBillingEventEmitter();\n const hasPermission = Boolean(permissions[permission]);\n\n useEffect(() => {\n if (hasPermission) {\n emit(eventName, { source: 'BillingAdminRoutes' });\n }\n }, [emit, eventName, hasPermission]);\n\n if (permissions.isLoading) {\n return <PageLoader />;\n }\n\n return (\n <FeatureGate\n flag={featureFlag}\n defaultValue\n fallback={<FeatureDisabled title={title} featureFlag={featureFlag} />}\n >\n {hasPermission ? (\n children\n ) : (\n <AccessDenied message={`You don't have permission to access ${title}.`} />\n )}\n </FeatureGate>\n );\n}\n\nfunction adminPage(props: BillingAdminRouteGateProps): ReactNode {\n return <BillingAdminRouteGate {...props} />;\n}\n\n/**\n * Admin-only billing routes.\n * Includes plans/addons/quota-templates CRUD, coupons, discounts, refunds, and analytics.\n */\nexport function BillingAdminRoutes() {\n return (\n <Routes>\n <Route index element={<Navigate to=\"plans\" replace />} />\n\n {/* Plans - full CRUD */}\n <Route\n path=\"plans\"\n element={adminPage({\n title: 'Plans',\n featureFlag: 'billing.plans',\n permission: 'canViewPlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlansListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/new\"\n element={adminPage({\n title: 'Create plan',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanCreatePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/assign-free\"\n element={adminPage({\n title: 'Assign plan for free',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanAssignFreePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/:planId\"\n element={adminPage({\n title: 'Plan details',\n featureFlag: 'billing.plans',\n permission: 'canViewPlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"plans/:planId/edit\"\n element={adminPage({\n title: 'Edit plan',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PlanEditPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Addons - full CRUD */}\n <Route\n path=\"addons\"\n element={adminPage({\n title: 'Addons',\n featureFlag: 'billing.addons',\n permission: 'canViewAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonsListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"addons/new\"\n element={adminPage({\n title: 'Create addon',\n featureFlag: 'billing.addons.manage',\n permission: 'canManageAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonCreatePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"addons/:addonId\"\n element={adminPage({\n title: 'Addon details',\n featureFlag: 'billing.addons',\n permission: 'canViewAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"addons/:addonId/edit\"\n element={adminPage({\n title: 'Edit addon',\n featureFlag: 'billing.addons.manage',\n permission: 'canManageAddons',\n eventName: 'billing.addon.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AddonEditPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Quota Templates - full CRUD */}\n <Route\n path=\"quotas\"\n element={adminPage({\n title: 'Quota templates',\n featureFlag: 'billing.quotas',\n permission: 'canViewQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplatesListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/new\"\n element={adminPage({\n title: 'Create quota template',\n featureFlag: 'billing.quotas.manage',\n permission: 'canManageQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplateCreatePage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/:quotaId\"\n element={adminPage({\n title: 'Quota template details',\n featureFlag: 'billing.quotas',\n permission: 'canViewQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplateDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/:quotaId/edit\"\n element={adminPage({\n title: 'Edit quota template',\n featureFlag: 'billing.quotas.manage',\n permission: 'canManageQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaTemplateEditPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"quotas/assign-free\"\n element={adminPage({\n title: 'Assign quota for free',\n featureFlag: 'billing.quotas.manage',\n permission: 'canManageQuotas',\n eventName: 'billing.quota.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <QuotaAssignFreePage />\n </Suspense>\n ),\n })}\n />\n\n {/* Coupons */}\n <Route\n path=\"coupons\"\n element={adminPage({\n title: 'Coupons',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CouponsListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"coupons/create\"\n element={adminPage({\n title: 'Create coupon',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CreateCouponPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"coupons/:id\"\n element={adminPage({\n title: 'Coupon details',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CouponDetailPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"coupons/:id/edit\"\n element={adminPage({\n title: 'Edit coupon',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <EditCouponPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Promotions */}\n <Route\n path=\"promotions\"\n element={adminPage({\n title: 'Promotions',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PromotionsListPage />\n </Suspense>\n ),\n })}\n />\n <Route\n path=\"promotions/create\"\n element={adminPage({\n title: 'Create Promotion',\n featureFlag: 'billing.plans.manage',\n permission: 'canManagePlans',\n eventName: 'billing.plan.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <CreatePromotionPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Discounts */}\n <Route\n path=\"discounts\"\n element={adminPage({\n title: 'Discounts',\n featureFlag: 'billing.discounts',\n permission: 'canManageDiscounts',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <DiscountsListPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Credit grants */}\n <Route\n path=\"credits\"\n element={adminPage({\n title: 'Credit grants',\n featureFlag: 'billing.credits.grants',\n permission: 'canGrantCredits',\n eventName: 'billing.credit.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AdminCreditsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Refunds */}\n <Route\n path=\"refunds\"\n element={adminPage({\n title: 'Refunds',\n featureFlag: 'billing.refunds',\n permission: 'canProcessRefund',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <RefundsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Refund issue log — refunds that completed at the gateway but left an\n unresolved accounting/reconciliation issue (BOFF-7192) */}\n <Route\n path=\"refunds/logs\"\n element={adminPage({\n title: 'Refund Issue Log',\n featureFlag: 'billing.refunds',\n permission: 'canProcessRefund',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <RefundIssueLogsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Billing webhook logs */}\n <Route\n path=\"webhook-logs\"\n element={adminPage({\n title: 'Billing webhook logs',\n featureFlag: 'billing.webhook-logs',\n permission: 'isBillingAdmin',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <BillingWebhookLogsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Order callback logs */}\n <Route\n path=\"order-callback-logs\"\n element={adminPage({\n title: 'Order callback logs',\n featureFlag: 'billing.order-callback-logs',\n permission: 'isBillingAdmin',\n eventName: 'billing.transaction.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <OrderCallbackLogsPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Analytics */}\n <Route\n path=\"analytics\"\n element={adminPage({\n title: 'Billing analytics',\n featureFlag: 'billing.analytics',\n permission: 'canViewAnalytics',\n eventName: 'billing.usage.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <AnalyticsPage />\n </Suspense>\n ),\n })}\n />\n\n <Route\n path=\"developer-revenue\"\n element={adminPage({\n title: 'Developer revenue',\n featureFlag: 'billing.payouts.admin',\n permission: 'isBillingAdmin',\n eventName: 'billing.payout.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <DeveloperRevenueAdminPage />\n </Suspense>\n ),\n })}\n />\n\n <Route\n path=\"developer-revenue/:organizationId\"\n element={adminPage({\n title: 'Developer revenue detail',\n featureFlag: 'billing.payouts.admin',\n permission: 'isBillingAdmin',\n eventName: 'billing.payout.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <DeveloperRevenueOrgDetailPage />\n </Suspense>\n ),\n })}\n />\n\n <Route\n path=\"payouts\"\n element={adminPage({\n title: 'Payout administration',\n featureFlag: 'billing.payouts.admin',\n permission: 'isBillingAdmin',\n eventName: 'billing.payout.viewed',\n children: (\n <Suspense fallback={<PageLoader />}>\n <PayoutAdminPage />\n </Suspense>\n ),\n })}\n />\n\n {/* Catch-all — uses absolute path to avoid relative-navigation loop */}\n <Route path=\"*\" element={<DefaultRedirect />} />\n </Routes>\n );\n}\n"],"mappings":";;;;;;;;;;AASA,IAAMA,IAAgBC,QACpB,OAAO,2BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,cAAc,EAAE,CACtE,GACMC,IAAiBF,QACrB,OAAO,2BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,eAAe,EAAE,CACvE,GACME,IAAeH,QACnB,OAAO,2BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,aAAa,EAAE,CACrE,GACMG,IAAiBJ,QACrB,OAAO,2BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,eAAe,EAAE,CACvE,GACMI,IAAqBL,QACzB,OAAO,2BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,mBAAmB,EAAE,CAC3E,GAGMK,IAAiBN,QACrB,OAAO,4BAAmB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,eAAe,EAAE,CACxE,GACMM,IAAkBP,QACtB,OAAO,4BAAmB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,gBAAgB,EAAE,CACzE,GACMO,IAAgBR,QACpB,OAAO,4BAAmB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,cAAc,EAAE,CACvE,GACMQ,IAAkBT,QACtB,OAAO,4BAAmB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,gBAAgB,EAAE,CACzE,GAGMS,IAAyBV,QAC7B,OAAO,2BAAkB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,uBAAuB,EAAE,CAC/E,GACMU,IAA0BX,QAC9B,OAAO,2BAAkB,CAAC,MAAM,OAAO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jB,OAAO;IACP,aAAa;IACb,YAAY;IACZ,WAAW;IACX,UACE,kBAACM,GAAD;KAAU,UAAU,kBAACrB,GAAD,CAAa,CAAA;KAC/B,UAAA,kBAACT,GAAD,CAAgC,CAAA;IACxB,CAAA;GAEd,CAAC;EACF,CAAA;EAED,kBAAC4B,GAAD;GACE,MAAK;GACL,SAASJ,EAAU;IACjB,OAAO;IACP,aAAa;IACb,YAAY;IACZ,WAAW;IACX,UACE,kBAACM,GAAD;KAAU,UAAU,kBAACrB,GAAD,CAAa,CAAA;KAC/B,UAAA,kBAACR,GAAD,CAAkB,CAAA;IACV,CAAA;GAEd,CAAC;EACF,CAAA;EAGD,kBAAC2B,GAAD;GAAO,MAAK;GAAI,SAAS,kBAAC1B,GAAD,CAAkB,CAAA;EAAI,CAAA;CACzC,EAAA,CAAA;AAEZ"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BillingProvider as e } from "./providers/BillingProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { BillingUserRoutes as t } from "./BillingUserRoutes.js";
|
|
3
|
+
import { BillingAdminRoutes as n } from "./BillingAdminRoutes.js";
|
|
4
|
+
import { useTr as r } from "./shared/hooks/useTr.js";
|
|
5
5
|
import { useEffect as i } from "react";
|
|
6
6
|
import { ErrorBoundary as a } from "@burdenoff/fe-libs/shared/components";
|
|
7
7
|
import { FeatureFlagProvider as o } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
8
|
import { Activity as s, Blocks as c, Coins as l, DollarSign as u, Gauge as d, Gift as f, Landmark as p, LayoutDashboard as m, Package as h, RefreshCw as g, RotateCcw as _, Settings as v, Ticket as y, TicketCheck as b, TrendingUp as x } from "lucide-react";
|
|
9
9
|
import { jsx as S } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/billing/BillingRoot.tsx
|
|
11
11
|
var C = (C) => {
|
|
12
|
-
let w =
|
|
12
|
+
let w = r(), { registerNavItems: T, registerFooterItems: E, basePath: D = "/", mode: O = "user" } = C, k = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
13
13
|
return i(() => {
|
|
14
14
|
if (!T) return;
|
|
15
15
|
let e = [
|
|
@@ -174,13 +174,15 @@ var C = (C) => {
|
|
|
174
174
|
O,
|
|
175
175
|
w
|
|
176
176
|
]), i(() => {
|
|
177
|
-
if (E) return
|
|
177
|
+
if (!E) return;
|
|
178
|
+
let e = [{
|
|
178
179
|
id: "billing-status",
|
|
179
180
|
label: w("billing.nav.billingReady", "Billing Ready"),
|
|
180
181
|
type: "status",
|
|
181
182
|
order: 10,
|
|
182
183
|
section: "left"
|
|
183
|
-
}]
|
|
184
|
+
}];
|
|
185
|
+
return E(e);
|
|
184
186
|
}, [E, w]), /* @__PURE__ */ S(a, {
|
|
185
187
|
fallback: /* @__PURE__ */ S("div", {
|
|
186
188
|
className: "flex min-h-[240px] items-center justify-center px-6 py-10 text-center text-sm text-text-secondary",
|
|
@@ -192,12 +194,11 @@ var C = (C) => {
|
|
|
192
194
|
defaultEnabled: !0,
|
|
193
195
|
children: /* @__PURE__ */ S(e, {
|
|
194
196
|
...C,
|
|
195
|
-
children: S(O === "admin" ?
|
|
197
|
+
children: S(O === "admin" ? n : t, {})
|
|
196
198
|
})
|
|
197
199
|
})
|
|
198
200
|
});
|
|
199
201
|
};
|
|
200
|
-
//#endregion
|
|
201
202
|
export { C as BillingRoot };
|
|
202
203
|
|
|
203
204
|
//# sourceMappingURL=BillingRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingRoot.js","names":[],"sources":["../../src/billing/BillingRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n RefreshCw,\n Package,\n Blocks,\n Gauge,\n RotateCcw,\n Activity,\n TrendingUp,\n Settings,\n Ticket,\n Coins,\n TicketCheck,\n Landmark,\n Gift,\n DollarSign,\n} from 'lucide-react';\nimport { BillingProvider } from './providers/BillingProvider';\nimport type { NavItem, BillingRootProps } from './types';\nimport { BillingUserRoutes } from './BillingUserRoutes';\nimport { BillingAdminRoutes } from './BillingAdminRoutes';\nimport { useTr } from './shared/hooks/useTr';\n\n/**\n * Root component for the Billing microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { BillingRoot, type BillingRootProps } from '@burdenoff/microfe-billing';\n *\n * function App() {\n * const props: BillingRootProps = {\n * basePath: '/billing',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * orgId: 'org-123',\n * apiGatewayUrl: 'https://api.example.com/tenant/graphql',\n * authToken: 'token',\n * stripePublishableKey: 'pk_test_...',\n * razorpayKey: 'rzp_test_...',\n * onSubscriptionCreate: (subscription) => console.log('Subscription created:', subscription),\n * onSubscriptionUpdate: (subscription) => console.log('Subscription updated:', subscription),\n * onPaymentProcess: (payment) => console.log('Payment processed:', payment),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <BillingRoot {...props} />;\n * }\n * ```\n */\nexport const BillingRoot: FC<BillingRootProps> = (props) => {\n const tr = useTr();\n const { registerNavItems, registerFooterItems, basePath = '/', mode = 'user' } = props;\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell based on mode\n useEffect(() => {\n if (!registerNavItems) return;\n\n const userNavItems: NavItem[] = [\n {\n id: 'billing-overview',\n label: tr('billing.nav.billing', 'Billing'),\n path: basePath === '/' ? '/' : joinPath(basePath, 'overview'),\n icon: <LayoutDashboard size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-subscriptions',\n label: tr('billing.nav.subscriptions', 'Subscriptions'),\n path: joinPath(basePath, 'subscriptions'),\n icon: <RefreshCw size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-usage',\n label: tr('billing.nav.usage', 'Usage'),\n path: joinPath(basePath, 'usage'),\n icon: <Activity size={20} />,\n order: 180,\n group: 'billing',\n },\n {\n id: 'billing-affiliate',\n label: tr('billing.nav.affiliate', 'Affiliate'),\n path: joinPath(basePath, 'affiliate'),\n icon: <TicketCheck size={20} />,\n order: 190,\n group: 'billing',\n },\n {\n id: 'billing-earnings',\n label: tr('billing.nav.earnings', 'Earnings'),\n path: joinPath(basePath, 'earnings'),\n icon: <Coins size={20} />,\n order: 200,\n group: 'billing',\n },\n {\n id: 'billing-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 205,\n group: 'billing',\n },\n {\n id: 'billing-settings',\n label: tr('billing.nav.settings', 'Settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 210,\n group: 'billing',\n },\n ];\n\n const adminNavItems: NavItem[] = [\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-quotas',\n label: tr('billing.nav.quotas', 'Quotas'),\n path: joinPath(basePath, 'quotas'),\n icon: <Gauge size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-coupons',\n label: tr('billing.nav.coupons', 'Coupons'),\n path: joinPath(basePath, 'coupons'),\n icon: <Ticket size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-promotions',\n label: tr('billing.nav.promotions', 'Promotions'),\n path: joinPath(basePath, 'promotions'),\n icon: <Gift size={20} />,\n order: 135,\n group: 'billing',\n },\n\n {\n id: 'billing-credits-admin',\n label: tr('billing.nav.creditGrants', 'Credit Grants'),\n path: joinPath(basePath, 'credits'),\n icon: <Coins size={20} />,\n order: 150,\n group: 'billing',\n },\n {\n id: 'billing-refunds',\n label: tr('billing.nav.refunds', 'Refunds'),\n path: joinPath(basePath, 'refunds'),\n icon: <RotateCcw size={20} />,\n order: 160,\n group: 'billing',\n },\n {\n id: 'billing-admin-developer-revenue',\n label: tr('billing.nav.developerRevenue', 'Developer Revenue'),\n path: joinPath(basePath, 'developer-revenue'),\n icon: <DollarSign size={20} />,\n order: 164,\n group: 'billing',\n },\n {\n id: 'billing-admin-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 165,\n group: 'billing',\n },\n {\n id: 'billing-analytics',\n label: tr('billing.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <TrendingUp size={20} />,\n order: 170,\n group: 'billing',\n },\n ];\n\n const navItems = mode === 'admin' ? adminNavItems : userNavItems;\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, mode, tr]);\n\n // Register footer items (example: billing status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'billing-status',\n label: tr('billing.nav.billingReady', 'Billing Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"flex min-h-[240px] items-center justify-center px-6 py-10 text-center text-sm text-text-secondary\">\n {tr(\n 'billing.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BillingProvider {...props}>\n {mode === 'admin' ? <BillingAdminRoutes /> : <BillingUserRoutes />}\n </BillingProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AA2DA,IAAa,KAAqC,MAAU;CAC1D,IAAM,IAAK,EAAM,GACX,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,UAAO,WAAW,GAG3E,KAAY,GAAc,OACZ,EAAK,SAAS,GAAG,IAAI,EAAK,MAAM,GAAG,EAAE,IAAI,MACzC,EAAK,WAAW,GAAG,IAAI,IAAO,IAAI;CA8LtD,OAzLA,QAAgB;EACd,IAAI,CAAC,GAAkB;EAEvB,IAAM,IAA0B;GAC9B;IACE,IAAI;IACJ,OAAO,EAAG,uBAAuB,SAAS;IAC1C,MAAM,MAAa,MAAM,MAAM,EAAS,GAAU,UAAU;IAC5D,MAAM,kBAAC,GAAD,EAAiB,MAAM,GAAK,CAAA;IAClC,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,6BAA6B,eAAe;IACtD,MAAM,EAAS,GAAU,eAAe;IACxC,MAAM,kBAAC,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,qBAAqB,OAAO;IACtC,MAAM,EAAS,GAAU,OAAO;IAChC,MAAM,kBAAC,GAAD,EAAS,MAAM,GAAK,CAAA;IAC1B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IAC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C,GAAD,EAAY,MAAM,GAAK,CAAA;IAC7B,OAAO;IACP,OAAO;GACT;EACF;EAIA,OADgB,EADC,MAAS,UAAU,IAAgB,CAE7C;CACT,GAAG;EAAC;EAAkB;EAAU;EAAM;CAAE,CAAC,GAGzC,QAAgB;EACT,OAaL,OADgB,EAAoB,CATlC;GACE,IAAI;GACJ,OAAO,EAAG,4BAA4B,eAAe;GACrD,MAAM;GACN,OAAO;GACP,SAAS;EACX,CAGkC,CAC7B;CACT,GAAG,CAAC,GAAqB,CAAE,CAAC,GAG1B,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aACZ,EACC,iCACA,oEACF;EACG,CAAA;YAGP,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aACvE,kBAAC,GAAD;IAAiB,GAAI;cACC,EAAnB,MAAS,UAAW,IAAyB,GAA1B,CAAqB,CAAwB;GAClD,CAAA;EACE,CAAA;CACR,CAAA;AAEnB"}
|
|
1
|
+
{"version":3,"file":"BillingRoot.js","names":["BillingRoot","tr","useTr","props","joinPath","base","path","useEffect","registerNavItems","userNavItems","basePath","LayoutDashboard","RefreshCw","Package","Blocks","Activity","TicketCheck","Coins","Landmark","Settings","adminNavItems","Gauge","Ticket","Gift","RotateCcw","DollarSign","TrendingUp","mode","registerFooterItems","footerItems","ErrorBoundary","FeatureFlagProvider","BillingProvider","jsx","BillingAdminRoutes","BillingUserRoutes"],"sources":["../../src/billing/BillingRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n RefreshCw,\n Package,\n Blocks,\n Gauge,\n RotateCcw,\n Activity,\n TrendingUp,\n Settings,\n Ticket,\n Coins,\n TicketCheck,\n Landmark,\n Gift,\n DollarSign,\n} from 'lucide-react';\nimport { BillingProvider } from './providers/BillingProvider';\nimport type { NavItem, BillingRootProps } from './types';\nimport { BillingUserRoutes } from './BillingUserRoutes';\nimport { BillingAdminRoutes } from './BillingAdminRoutes';\nimport { useTr } from './shared/hooks/useTr';\n\n/**\n * Root component for the Billing microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { BillingRoot, type BillingRootProps } from '@burdenoff/microfe-billing';\n *\n * function App() {\n * const props: BillingRootProps = {\n * basePath: '/billing',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * orgId: 'org-123',\n * apiGatewayUrl: 'https://api.example.com/tenant/graphql',\n * authToken: 'token',\n * stripePublishableKey: 'pk_test_...',\n * razorpayKey: 'rzp_test_...',\n * onSubscriptionCreate: (subscription) => console.log('Subscription created:', subscription),\n * onSubscriptionUpdate: (subscription) => console.log('Subscription updated:', subscription),\n * onPaymentProcess: (payment) => console.log('Payment processed:', payment),\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <BillingRoot {...props} />;\n * }\n * ```\n */\nexport const BillingRoot: FC<BillingRootProps> = (props) => {\n const tr = useTr();\n const { registerNavItems, registerFooterItems, basePath = '/', mode = 'user' } = props;\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell based on mode\n useEffect(() => {\n if (!registerNavItems) return;\n\n const userNavItems: NavItem[] = [\n {\n id: 'billing-overview',\n label: tr('billing.nav.billing', 'Billing'),\n path: basePath === '/' ? '/' : joinPath(basePath, 'overview'),\n icon: <LayoutDashboard size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-subscriptions',\n label: tr('billing.nav.subscriptions', 'Subscriptions'),\n path: joinPath(basePath, 'subscriptions'),\n icon: <RefreshCw size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-usage',\n label: tr('billing.nav.usage', 'Usage'),\n path: joinPath(basePath, 'usage'),\n icon: <Activity size={20} />,\n order: 180,\n group: 'billing',\n },\n {\n id: 'billing-affiliate',\n label: tr('billing.nav.affiliate', 'Affiliate'),\n path: joinPath(basePath, 'affiliate'),\n icon: <TicketCheck size={20} />,\n order: 190,\n group: 'billing',\n },\n {\n id: 'billing-earnings',\n label: tr('billing.nav.earnings', 'Earnings'),\n path: joinPath(basePath, 'earnings'),\n icon: <Coins size={20} />,\n order: 200,\n group: 'billing',\n },\n {\n id: 'billing-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 205,\n group: 'billing',\n },\n {\n id: 'billing-settings',\n label: tr('billing.nav.settings', 'Settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 210,\n group: 'billing',\n },\n ];\n\n const adminNavItems: NavItem[] = [\n {\n id: 'billing-plans',\n label: tr('billing.nav.plans', 'Plans'),\n path: joinPath(basePath, 'plans'),\n icon: <Package size={20} />,\n order: 100,\n group: 'billing',\n },\n {\n id: 'billing-addons',\n label: tr('billing.nav.addons', 'Addons'),\n path: joinPath(basePath, 'addons'),\n icon: <Blocks size={20} />,\n order: 110,\n group: 'billing',\n },\n {\n id: 'billing-quotas',\n label: tr('billing.nav.quotas', 'Quotas'),\n path: joinPath(basePath, 'quotas'),\n icon: <Gauge size={20} />,\n order: 120,\n group: 'billing',\n },\n {\n id: 'billing-coupons',\n label: tr('billing.nav.coupons', 'Coupons'),\n path: joinPath(basePath, 'coupons'),\n icon: <Ticket size={20} />,\n order: 130,\n group: 'billing',\n },\n {\n id: 'billing-promotions',\n label: tr('billing.nav.promotions', 'Promotions'),\n path: joinPath(basePath, 'promotions'),\n icon: <Gift size={20} />,\n order: 135,\n group: 'billing',\n },\n\n {\n id: 'billing-credits-admin',\n label: tr('billing.nav.creditGrants', 'Credit Grants'),\n path: joinPath(basePath, 'credits'),\n icon: <Coins size={20} />,\n order: 150,\n group: 'billing',\n },\n {\n id: 'billing-refunds',\n label: tr('billing.nav.refunds', 'Refunds'),\n path: joinPath(basePath, 'refunds'),\n icon: <RotateCcw size={20} />,\n order: 160,\n group: 'billing',\n },\n {\n id: 'billing-admin-developer-revenue',\n label: tr('billing.nav.developerRevenue', 'Developer Revenue'),\n path: joinPath(basePath, 'developer-revenue'),\n icon: <DollarSign size={20} />,\n order: 164,\n group: 'billing',\n },\n {\n id: 'billing-admin-payouts',\n label: tr('billing.nav.payouts', 'Payouts'),\n path: joinPath(basePath, 'payouts'),\n icon: <Landmark size={20} />,\n order: 165,\n group: 'billing',\n },\n {\n id: 'billing-analytics',\n label: tr('billing.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <TrendingUp size={20} />,\n order: 170,\n group: 'billing',\n },\n ];\n\n const navItems = mode === 'admin' ? adminNavItems : userNavItems;\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, mode, tr]);\n\n // Register footer items (example: billing status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'billing-status',\n label: tr('billing.nav.billingReady', 'Billing Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"flex min-h-[240px] items-center justify-center px-6 py-10 text-center text-sm text-text-secondary\">\n {tr(\n 'billing.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <BillingProvider {...props}>\n {mode === 'admin' ? <BillingAdminRoutes /> : <BillingUserRoutes />}\n </BillingProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AA2DA,IAAaA,KAAqC,MAAU;CAC1D,IAAMC,IAAKC,EAAM,GACX,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,UAAO,WAAWC,GAG3EC,KAAY,GAAc,OACZC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;CA8LtD,OAzLAC,QAAgB;EACd,IAAI,CAACC,GAAkB;EAEvB,IAAMC,IAA0B;GAC9B;IACE,IAAI;IACJ,OAAOR,EAAG,uBAAuB,SAAS;IAC1C,MAAMS,MAAa,MAAM,MAAMN,EAASM,GAAU,UAAU;IAC5D,MAAM,kBAACC,GAAD,EAAiB,MAAM,GAAK,CAAA;IAClC,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOV,EAAG,6BAA6B,eAAe;IACtD,MAAMG,EAASM,GAAU,eAAe;IACxC,MAAM,kBAACE,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOX,EAAG,qBAAqB,OAAO;IACtC,MAAMG,EAASM,GAAU,OAAO;IAChC,MAAM,kBAACG,GAAD,EAAS,MAAM,GAAK,CAAA;IAC1B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOZ,EAAG,sBAAsB,QAAQ;IACxC,MAAMG,EAASM,GAAU,QAAQ;IACjC,MAAM,kBAACI,GAAD,EAAQ,MAAM,GAAK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AAO;GACT;EACF;EAIA,OADgBlB,EADCmB,MAAS,UAAUP,IAAgBX,CAE7C;CACT,GAAG;EAACD;EAAkBE;EAAUiB;EAAM1B;CAAE,CAAC,GAGzCM,QAAgB;EACd,IAAI,CAACqB,GAAqB;EAE1B,IAAMC,IAAc,CAClB;GACE,IAAI;GACJ,OAAO5B,EAAG,4BAA4B,eAAe;GACrD,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAGA,OADgB2B,EAAoBC,CAC7B;CACT,GAAG,CAACD,GAAqB3B,CAAE,CAAC,GAG1B,kBAAC6B,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA7B,EACC,iCACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAAC8B,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;GACvE,UAAA,kBAACC,GAAD;IAAiB,GAAI7B;IAClB,UAAmB8B,EAAnBN,MAAS,UAAWO,IAAyBC,GAA1B,CAAqB,CAAwB;GAClD,CAAA;EACE,CAAA;CACR,CAAA;AAEnB"}
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
* Includes overview, subscriptions, plan/addon browsing (read-only),
|
|
4
4
|
* invoices, payments, credits, quota usage, checkout, and settings.
|
|
5
5
|
*/
|
|
6
|
-
export declare function BillingUserRoutes(): import(
|
|
7
|
-
//# sourceMappingURL=BillingUserRoutes.d.ts.map
|
|
6
|
+
export declare function BillingUserRoutes(): import('react').JSX.Element;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useBilling as e } from "./providers/BillingProvider.js";
|
|
2
|
-
import { AccessDenied as t } from "./shared/components/AccessDenied.js";
|
|
3
1
|
import "./shared/components/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { AccessDenied as e } from "./shared/components/AccessDenied.js";
|
|
3
|
+
import { useBillingEventEmitter as t } from "./hooks/useBillingEventEmitter.js";
|
|
4
|
+
import { useBillingPermissions as n } from "./hooks/useBillingPermissions.js";
|
|
5
|
+
import { useBilling as r } from "./providers/BillingProvider.js";
|
|
6
6
|
import { OverviewPage as i } from "./modules/dashboard/pages/OverviewPage.js";
|
|
7
7
|
import "./modules/dashboard/index.js";
|
|
8
8
|
import { Suspense as a, lazy as o, useEffect as s } from "react";
|
|
9
9
|
import { FeatureGate as c } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
10
10
|
import { Navigate as l, Route as u, Routes as d, useLocation as f, useNavigate as p } from "react-router";
|
|
11
11
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
|
-
|
|
12
|
+
// src/billing/BillingUserRoutes.tsx
|
|
13
13
|
var g = o(() => import("./modules/subscriptions/index.js").then((e) => ({ default: e.SubscriptionsListPage }))), _ = o(() => import("./modules/subscriptions/index.js").then((e) => ({ default: e.SubscriptionDetailPage }))), v = o(() => import("./modules/subscriptions/index.js").then((e) => ({ default: e.UpgradeSubscriptionPage }))), y = o(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlansBrowsePage }))), b = o(() => import("./modules/plans/index.js").then((e) => ({ default: e.PlanBrowseDetailPage }))), x = o(() => import("./modules/addons/index.js").then((e) => ({ default: e.AddonsBrowsePage }))), S = o(() => import("./modules/addons/index.js").then((e) => ({ default: e.AddonBrowseDetailPage }))), C = o(() => import("./modules/billing/index.js").then((e) => ({ default: e.InvoicesListPage }))), w = o(() => import("./modules/billing/index.js").then((e) => ({ default: e.InvoiceDetailPage }))), T = o(() => import("./modules/billing/index.js").then((e) => ({ default: e.TransactionsPage }))), E = o(() => import("./modules/billing/index.js").then((e) => ({ default: e.UserRefundsPage }))), D = o(() => import("./modules/billing/index.js").then((e) => ({ default: e.PaymentMethodsPage }))), O = o(() => import("./modules/credits/index.js").then((e) => ({ default: e.CreditsPage }))), k = o(() => import("./modules/credits/index.js").then((e) => ({ default: e.CreditTransactionsPage }))), A = o(() => import("./modules/credits/index.js").then((e) => ({ default: e.CreditWithdrawalPage }))), j = o(() => import("./modules/usage/index.js").then((e) => ({ default: e.UsagePage }))), M = o(() => import("./modules/checkout/index.js").then((e) => ({ default: e.CheckoutPage }))), N = o(() => import("./modules/store/index.js").then((e) => ({ default: e.StoreCheckoutPage }))), P = o(() => import("./modules/settings/index.js").then((e) => ({ default: e.SettingsPage }))), F = o(() => import("./modules/settings/index.js").then((e) => ({ default: e.TeamPermissionsPage }))), I = o(() => import("./modules/affiliate/index.js").then((e) => ({ default: e.AffiliateDashboardPage }))), L = o(() => import("./modules/earnings/index.js").then((e) => ({ default: e.EarningsPage }))), R = o(() => import("./modules/earnings/index.js").then((e) => ({ default: e.PayoutsPage })));
|
|
14
14
|
function z() {
|
|
15
15
|
return /* @__PURE__ */ m("div", {
|
|
@@ -18,13 +18,13 @@ function z() {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function B() {
|
|
21
|
-
let { basePath:
|
|
21
|
+
let { basePath: e } = r(), { search: t } = f(), n = p(), i = e && e !== "/" ? e.replace(/\/$/, "") : "";
|
|
22
22
|
return s(() => {
|
|
23
|
-
|
|
23
|
+
n(`${i}/overview${t}`, { replace: !0 });
|
|
24
24
|
}, [
|
|
25
25
|
i,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
n,
|
|
27
|
+
t
|
|
28
28
|
]), null;
|
|
29
29
|
}
|
|
30
30
|
function V({ title: e, featureFlag: t }) {
|
|
@@ -50,8 +50,8 @@ function V({ title: e, featureFlag: t }) {
|
|
|
50
50
|
})
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function H({ title:
|
|
54
|
-
let u =
|
|
53
|
+
function H({ title: r, featureFlag: i, permission: a, eventName: o, children: l }) {
|
|
54
|
+
let u = n(), { emit: d } = t(), f = !!u[a];
|
|
55
55
|
return s(() => {
|
|
56
56
|
f && d(o, { source: "BillingUserRoutes" });
|
|
57
57
|
}, [
|
|
@@ -62,10 +62,10 @@ function H({ title: e, featureFlag: i, permission: a, eventName: o, children: l
|
|
|
62
62
|
flag: i,
|
|
63
63
|
defaultValue: !0,
|
|
64
64
|
fallback: /* @__PURE__ */ m(V, {
|
|
65
|
-
title:
|
|
65
|
+
title: r,
|
|
66
66
|
featureFlag: i
|
|
67
67
|
}),
|
|
68
|
-
children: f ? l : /* @__PURE__ */ m(
|
|
68
|
+
children: f ? l : /* @__PURE__ */ m(e, { message: `You don't have permission to access ${r}.` })
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
function U(e) {
|
|
@@ -473,7 +473,6 @@ function W() {
|
|
|
473
473
|
})
|
|
474
474
|
] });
|
|
475
475
|
}
|
|
476
|
-
//#endregion
|
|
477
476
|
export { W as BillingUserRoutes };
|
|
478
477
|
|
|
479
478
|
//# sourceMappingURL=BillingUserRoutes.js.map
|