@burdenoff/microfe-billing 2026.510.114
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/README.md +12 -0
- package/dist/billing/BillingAdminRoutes.d.ts +6 -0
- package/dist/billing/BillingAdminRoutes.d.ts.map +1 -0
- package/dist/billing/BillingAdminRoutes.js +359 -0
- package/dist/billing/BillingAdminRoutes.js.map +1 -0
- package/dist/billing/BillingRoot.d.ts +37 -0
- package/dist/billing/BillingRoot.d.ts.map +1 -0
- package/dist/billing/BillingRoot.js +190 -0
- package/dist/billing/BillingRoot.js.map +1 -0
- package/dist/billing/BillingUserRoutes.d.ts +7 -0
- package/dist/billing/BillingUserRoutes.d.ts.map +1 -0
- package/dist/billing/BillingUserRoutes.js +479 -0
- package/dist/billing/BillingUserRoutes.js.map +1 -0
- package/dist/billing/constants/permissions.d.ts +18 -0
- package/dist/billing/constants/permissions.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingAccountSelection.d.ts +36 -0
- package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingAccountSelection.js +81 -0
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -0
- package/dist/billing/hooks/useBillingEventEmitter.d.ts +8 -0
- package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingEventEmitter.js +15 -0
- package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -0
- package/dist/billing/hooks/useBillingNavigate.d.ts +30 -0
- package/dist/billing/hooks/useBillingNavigate.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingNavigate.js +23 -0
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -0
- package/dist/billing/hooks/useBillingPermissions.d.ts +94 -0
- package/dist/billing/hooks/useBillingPermissions.d.ts.map +1 -0
- package/dist/billing/hooks/useBillingPermissions.js +78 -0
- package/dist/billing/hooks/useBillingPermissions.js.map +1 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +14 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +1 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.js +23 -0
- package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -0
- package/dist/billing/index.d.ts +31 -0
- package/dist/billing/index.d.ts.map +1 -0
- package/dist/billing/lib/native-purchases.d.ts +51 -0
- package/dist/billing/lib/native-purchases.d.ts.map +1 -0
- package/dist/billing/lib/native-purchases.js +44 -0
- package/dist/billing/lib/native-purchases.js.map +1 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +4 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +1 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js +179 -0
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -0
- package/dist/billing/modules/addons/components/index.d.ts +5 -0
- package/dist/billing/modules/addons/components/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/index.d.ts +6 -0
- package/dist/billing/modules/addons/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/index.js +1 -0
- package/dist/billing/modules/addons/hooks/useAddons.d.ts +55 -0
- package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +1 -0
- package/dist/billing/modules/addons/hooks/useAddons.js +77 -0
- package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -0
- package/dist/billing/modules/addons/index.d.ts +7 -0
- package/dist/billing/modules/addons/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/index.js +10 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +266 -0
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +369 -0
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +280 -0
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.js +396 -0
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +582 -0
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +4 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.js +744 -0
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -0
- package/dist/billing/modules/addons/pages/index.d.ts +11 -0
- package/dist/billing/modules/addons/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/addons/pages/index.js +6 -0
- package/dist/billing/modules/addons/store/addonCartStore.d.ts +38 -0
- package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +1 -0
- package/dist/billing/modules/addons/store/addonCartStore.js +74 -0
- package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -0
- package/dist/billing/modules/affiliate/api.d.ts +101 -0
- package/dist/billing/modules/affiliate/api.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/api.js +38 -0
- package/dist/billing/modules/affiliate/api.js.map +1 -0
- package/dist/billing/modules/affiliate/index.d.ts +2 -0
- package/dist/billing/modules/affiliate/index.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/index.js +2 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +4 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +1 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +464 -0
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -0
- package/dist/billing/modules/analytics/index.d.ts +5 -0
- package/dist/billing/modules/analytics/index.d.ts.map +1 -0
- package/dist/billing/modules/analytics/index.js +3 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +4 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +1 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +469 -0
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -0
- package/dist/billing/modules/analytics/pages/index.d.ts +5 -0
- package/dist/billing/modules/analytics/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/analytics/pages/index.js +1 -0
- package/dist/billing/modules/billing/hooks/index.d.ts +10 -0
- package/dist/billing/modules/billing/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/index.js +4 -0
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts +67 -0
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useInvoices.js +87 -0
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -0
- package/dist/billing/modules/billing/hooks/usePayments.d.ts +62 -0
- package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/usePayments.js +3 -0
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts +191 -0
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useRefunds.js +162 -0
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -0
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts +41 -0
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +1 -0
- package/dist/billing/modules/billing/hooks/useTransactions.js +55 -0
- package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -0
- package/dist/billing/modules/billing/index.d.ts +7 -0
- package/dist/billing/modules/billing/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/index.js +11 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +631 -0
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +382 -0
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +147 -0
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/RefundsPage.js +1074 -0
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +4 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.js +587 -0
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -0
- package/dist/billing/modules/billing/pages/index.d.ts +10 -0
- package/dist/billing/modules/billing/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/billing/pages/index.js +5 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +14 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/AutoPayToggle.js +3 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +14 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +151 -0
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +14 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.js +4 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +14 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js +130 -0
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +16 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.js +5 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +19 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/CurrencySelector.js +5 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +14 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js +273 -0
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -0
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts +22 -0
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/OrderSummary.js +293 -0
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +19 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.js +3 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +19 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.js +102 -0
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +25 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +169 -0
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +13 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SavedCardSelector.js +4 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +13 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +78 -0
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +16 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.js +253 -0
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +26 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +84 -0
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +23 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +229 -0
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -0
- package/dist/billing/modules/checkout/components/index.d.ts +20 -0
- package/dist/billing/modules/checkout/components/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/components/index.js +16 -0
- package/dist/billing/modules/checkout/graphql/index.d.ts +6 -0
- package/dist/billing/modules/checkout/graphql/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/index.d.ts +9 -0
- package/dist/billing/modules/checkout/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/index.js +4 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +69 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.js +377 -0
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +26 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +88 -0
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +19 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +16 -0
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +59 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +1 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +107 -0
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -0
- package/dist/billing/modules/checkout/index.d.ts +24 -0
- package/dist/billing/modules/checkout/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/index.js +19 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +4 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +1 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +1248 -0
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -0
- package/dist/billing/modules/checkout/pages/index.d.ts +5 -0
- package/dist/billing/modules/checkout/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/pages/index.js +1 -0
- package/dist/billing/modules/checkout/types/index.d.ts +270 -0
- package/dist/billing/modules/checkout/types/index.d.ts.map +1 -0
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts +20 -0
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +1 -0
- package/dist/billing/modules/checkout/utils/storeOrder.js +27 -0
- package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -0
- package/dist/billing/modules/coupons/index.d.ts +5 -0
- package/dist/billing/modules/coupons/index.d.ts.map +1 -0
- package/dist/billing/modules/coupons/index.js +6 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +489 -0
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +544 -0
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +421 -0
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +4 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +379 -0
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -0
- package/dist/billing/modules/coupons/pages/index.d.ts +8 -0
- package/dist/billing/modules/coupons/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/coupons/pages/index.js +4 -0
- package/dist/billing/modules/credits/hooks/index.d.ts +5 -0
- package/dist/billing/modules/credits/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/credits/hooks/index.js +1 -0
- package/dist/billing/modules/credits/hooks/useCredits.d.ts +75 -0
- package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +1 -0
- package/dist/billing/modules/credits/hooks/useCredits.js +78 -0
- package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -0
- package/dist/billing/modules/credits/index.d.ts +6 -0
- package/dist/billing/modules/credits/index.d.ts.map +1 -0
- package/dist/billing/modules/credits/index.js +8 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +140 -0
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +331 -0
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +770 -0
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts +4 -0
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/CreditsPage.js +324 -0
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -0
- package/dist/billing/modules/credits/pages/index.d.ts +8 -0
- package/dist/billing/modules/credits/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/credits/pages/index.js +4 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +14 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +185 -0
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +111 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +388 -0
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +16 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +146 -0
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +13 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1044 -0
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +15 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +216 -0
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +27 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +193 -0
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -0
- package/dist/billing/modules/dashboard/components/index.d.ts +10 -0
- package/dist/billing/modules/dashboard/components/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/components/index.js +6 -0
- package/dist/billing/modules/dashboard/hooks/index.d.ts +6 -0
- package/dist/billing/modules/dashboard/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/index.js +2 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +17 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +42 -0
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +145 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.js +118 -0
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -0
- package/dist/billing/modules/dashboard/index.d.ts +8 -0
- package/dist/billing/modules/dashboard/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/index.js +12 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +4 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +478 -0
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -0
- package/dist/billing/modules/dashboard/pages/index.d.ts +5 -0
- package/dist/billing/modules/dashboard/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/dashboard/pages/index.js +1 -0
- package/dist/billing/modules/discounts/index.d.ts +6 -0
- package/dist/billing/modules/discounts/index.d.ts.map +1 -0
- package/dist/billing/modules/discounts/index.js +3 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +4 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +1 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +1009 -0
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -0
- package/dist/billing/modules/discounts/pages/index.d.ts +6 -0
- package/dist/billing/modules/discounts/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/discounts/pages/index.js +1 -0
- package/dist/billing/modules/earnings/api.d.ts +131 -0
- package/dist/billing/modules/earnings/api.d.ts.map +1 -0
- package/dist/billing/modules/earnings/api.js +122 -0
- package/dist/billing/modules/earnings/api.js.map +1 -0
- package/dist/billing/modules/earnings/index.d.ts +4 -0
- package/dist/billing/modules/earnings/index.d.ts.map +1 -0
- package/dist/billing/modules/earnings/index.js +4 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +4 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.js +435 -0
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +4 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +273 -0
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +4 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +1 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +480 -0
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -0
- package/dist/billing/modules/plans/hooks/index.d.ts +7 -0
- package/dist/billing/modules/plans/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/index.js +2 -0
- package/dist/billing/modules/plans/hooks/usePlans.d.ts +46 -0
- package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/usePlans.js +77 -0
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -0
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts +27 -0
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +1 -0
- package/dist/billing/modules/plans/hooks/useQuotas.js +21 -0
- package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -0
- package/dist/billing/modules/plans/index.d.ts +7 -0
- package/dist/billing/modules/plans/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/index.js +11 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +264 -0
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +368 -0
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +356 -0
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.js +395 -0
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +314 -0
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -0
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts +4 -0
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/PlansListPage.js +438 -0
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -0
- package/dist/billing/modules/plans/pages/index.d.ts +11 -0
- package/dist/billing/modules/plans/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/plans/pages/index.js +6 -0
- package/dist/billing/modules/quota/hooks/index.d.ts +6 -0
- package/dist/billing/modules/quota/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/index.js +2 -0
- package/dist/billing/modules/quota/hooks/useQuota.d.ts +102 -0
- package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuota.js +63 -0
- package/dist/billing/modules/quota/hooks/useQuota.js.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +39 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +1 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +67 -0
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -0
- package/dist/billing/modules/quota/index.d.ts +6 -0
- package/dist/billing/modules/quota/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/index.js +10 -0
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaPage.js +337 -0
- package/dist/billing/modules/quota/pages/QuotaPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +273 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +272 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +316 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +4 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +401 -0
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -0
- package/dist/billing/modules/quota/pages/index.d.ts +9 -0
- package/dist/billing/modules/quota/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/quota/pages/index.js +5 -0
- package/dist/billing/modules/settings/index.d.ts +5 -0
- package/dist/billing/modules/settings/index.d.ts.map +1 -0
- package/dist/billing/modules/settings/index.js +4 -0
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts +4 -0
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/SettingsPage.js +632 -0
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +4 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +270 -0
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -0
- package/dist/billing/modules/settings/pages/index.d.ts +6 -0
- package/dist/billing/modules/settings/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/settings/pages/index.js +2 -0
- package/dist/billing/modules/store/graphql/index.d.ts +6 -0
- package/dist/billing/modules/store/graphql/index.d.ts.map +1 -0
- package/dist/billing/modules/store/graphql/index.js +1 -0
- package/dist/billing/modules/store/index.d.ts +6 -0
- package/dist/billing/modules/store/index.d.ts.map +1 -0
- package/dist/billing/modules/store/index.js +3 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +11 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +1 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +18 -0
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +12 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +167 -0
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -0
- package/dist/billing/modules/subscriptions/hooks/index.d.ts +6 -0
- package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/hooks/index.js +1 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +92 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +136 -0
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -0
- package/dist/billing/modules/subscriptions/index.d.ts +7 -0
- package/dist/billing/modules/subscriptions/index.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/index.js +7 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +4 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +551 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +4 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +529 -0
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +4 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +430 -0
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -0
- package/dist/billing/modules/subscriptions/pages/index.d.ts +8 -0
- package/dist/billing/modules/subscriptions/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/subscriptions/pages/index.js +3 -0
- package/dist/billing/modules/usage/hooks/index.d.ts +6 -0
- package/dist/billing/modules/usage/hooks/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/hooks/index.js +1 -0
- package/dist/billing/modules/usage/hooks/useUsage.d.ts +203 -0
- package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +1 -0
- package/dist/billing/modules/usage/hooks/useUsage.js +271 -0
- package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -0
- package/dist/billing/modules/usage/index.d.ts +6 -0
- package/dist/billing/modules/usage/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/index.js +5 -0
- package/dist/billing/modules/usage/pages/UsagePage.d.ts +4 -0
- package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +1 -0
- package/dist/billing/modules/usage/pages/UsagePage.js +817 -0
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -0
- package/dist/billing/modules/usage/pages/index.d.ts +5 -0
- package/dist/billing/modules/usage/pages/index.d.ts.map +1 -0
- package/dist/billing/modules/usage/pages/index.js +1 -0
- package/dist/billing/providers/BillingProvider.d.ts +16 -0
- package/dist/billing/providers/BillingProvider.d.ts.map +1 -0
- package/dist/billing/providers/BillingProvider.js +40 -0
- package/dist/billing/providers/BillingProvider.js.map +1 -0
- package/dist/billing/shared/components/AccessDenied.d.ts +8 -0
- package/dist/billing/shared/components/AccessDenied.d.ts.map +1 -0
- package/dist/billing/shared/components/AccessDenied.js +44 -0
- package/dist/billing/shared/components/AccessDenied.js.map +1 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +11 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +1 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +230 -0
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -0
- package/dist/billing/shared/components/EmptyState.d.ts +11 -0
- package/dist/billing/shared/components/EmptyState.d.ts.map +1 -0
- package/dist/billing/shared/components/EmptyState.js +27 -0
- package/dist/billing/shared/components/EmptyState.js.map +1 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +11 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +1 -0
- package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
- package/dist/billing/shared/components/PageHeader.d.ts +11 -0
- package/dist/billing/shared/components/PageHeader.d.ts.map +1 -0
- package/dist/billing/shared/components/PageHeader.js +25 -0
- package/dist/billing/shared/components/PageHeader.js.map +1 -0
- package/dist/billing/shared/components/ServerError.d.ts +11 -0
- package/dist/billing/shared/components/ServerError.d.ts.map +1 -0
- package/dist/billing/shared/components/ServerError.js +75 -0
- package/dist/billing/shared/components/ServerError.js.map +1 -0
- package/dist/billing/shared/components/StatCard.d.ts +15 -0
- package/dist/billing/shared/components/StatCard.d.ts.map +1 -0
- package/dist/billing/shared/components/StatCard.js +37 -0
- package/dist/billing/shared/components/StatCard.js.map +1 -0
- package/dist/billing/shared/components/index.d.ts +11 -0
- package/dist/billing/shared/components/index.d.ts.map +1 -0
- package/dist/billing/shared/components/index.js +7 -0
- package/dist/billing/shared/index.d.ts +8 -0
- package/dist/billing/shared/index.d.ts.map +1 -0
- package/dist/billing/shared/types/graphql.d.ts +926 -0
- package/dist/billing/shared/types/graphql.d.ts.map +1 -0
- package/dist/billing/shared/types/graphql.js +30 -0
- package/dist/billing/shared/types/graphql.js.map +1 -0
- package/dist/billing/shared/types/index.d.ts +96 -0
- package/dist/billing/shared/types/index.d.ts.map +1 -0
- package/dist/billing/shared/utils/directActivityGraphql.d.ts +13 -0
- package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/directActivityGraphql.js +2 -0
- package/dist/billing/shared/utils/directBillingGraphql.d.ts +13 -0
- package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/directBillingGraphql.js +22 -0
- package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -0
- package/dist/billing/shared/utils/error.d.ts +30 -0
- package/dist/billing/shared/utils/error.d.ts.map +1 -0
- package/dist/billing/shared/utils/error.js +16 -0
- package/dist/billing/shared/utils/error.js.map +1 -0
- package/dist/billing/shared/utils/format.d.ts +28 -0
- package/dist/billing/shared/utils/format.d.ts.map +1 -0
- package/dist/billing/shared/utils/format.js +65 -0
- package/dist/billing/shared/utils/format.js.map +1 -0
- package/dist/billing/shared/utils/gatewayGraphql.d.ts +15 -0
- package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +1 -0
- package/dist/billing/shared/utils/gatewayGraphql.js +27 -0
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -0
- package/dist/billing/shared/utils/index.d.ts +13 -0
- package/dist/billing/shared/utils/index.d.ts.map +1 -0
- package/dist/billing/shared/utils/index.js +8 -0
- package/dist/billing/shared/utils/navigation.d.ts +2 -0
- package/dist/billing/shared/utils/navigation.d.ts.map +1 -0
- package/dist/billing/shared/utils/navigation.js +8 -0
- package/dist/billing/shared/utils/navigation.js.map +1 -0
- package/dist/billing/shared/utils/paymentTheme.d.ts +18 -0
- package/dist/billing/shared/utils/paymentTheme.d.ts.map +1 -0
- package/dist/billing/shared/utils/paymentTheme.js +32 -0
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -0
- package/dist/billing/shared/utils/status.d.ts +28 -0
- package/dist/billing/shared/utils/status.d.ts.map +1 -0
- package/dist/billing/shared/utils/status.js +57 -0
- package/dist/billing/shared/utils/status.js.map +1 -0
- package/dist/billing/shared/utils/tokens.d.ts +156 -0
- package/dist/billing/shared/utils/tokens.d.ts.map +1 -0
- package/dist/billing/shared/utils/tokens.js +128 -0
- package/dist/billing/shared/utils/tokens.js.map +1 -0
- package/dist/billing/types/index.d.ts +268 -0
- package/dist/billing/types/index.d.ts.map +1 -0
- package/dist/billing/utils/index.d.ts +128 -0
- package/dist/billing/utils/index.d.ts.map +1 -0
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +9544 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-operations.js +3542 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.d.ts +22208 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/global-types.js +12 -0
- package/dist/generated/global-types.js.map +1 -0
- package/dist/generated/wspace-operations.d.ts +61 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +35 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +48578 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +270 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/package.json +112 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDashboard.js","names":[],"sources":["../../../../../src/billing/modules/dashboard/hooks/useDashboard.ts"],"sourcesContent":["/**\n * Dashboard Module - useDashboard Hook\n * Provides access to dashboard data and mutations for billing overview\n */\n\nimport { useApolloClient } from '@apollo/client/react';\nimport { useCallback, useMemo } from 'react';\nimport {\n useGetPaymentProviderConfigQuery,\n useGetBillingAccountsByOrgQuery,\n useGetDefaultBillingAccountDashboardQuery,\n useGetBillingAccountDashboardQuery,\n useGetActiveSubscriptionsQuery,\n useGetPaymentMethodsDashboardQuery,\n useGetBillingAddressQuery,\n useGetCreditTransactionsSummaryQuery,\n useGetRecommendedAddonsQuery,\n useGetAvailablePlansQuery,\n useCreateBillingAccountMutation,\n useUpdateBillingAccountMutation,\n useSetDefaultBillingAccountMutation,\n useAddPaymentMethodDashboardMutation,\n useUpdatePaymentMethodDashboardMutation,\n useDeletePaymentMethodDashboardMutation,\n useSetBillingAddressMutation,\n useInitiatePaymentMutation,\n useSpendCreditsMutation,\n useVerifyPaymentMethodMutation,\n GetBillingAccountsByOrgDocument,\n GetDefaultBillingAccountDashboardDocument,\n GetBillingAddressDocument,\n GetCreditTransactionsSummaryDocument,\n} from '../../../../generated/global-operations';\nimport type {\n BillingAccount,\n BillingSubscription,\n PaymentMethod,\n BillingAddress,\n CreditTransaction,\n Addon,\n Plan,\n CreateBillingAccountInput,\n UpdateBillingAccountInput,\n CreatePaymentMethodInput,\n SetBillingAddressInput,\n InitiatePaymentInput,\n InitiatePaymentResponse,\n SpendCreditsInput,\n VerifyPaymentMethodInput,\n VerifyPaymentMethodResponse,\n} from '../../../shared/types';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface UseBillingAccountsResult {\n billingAccounts: BillingAccount[];\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseDashboardAccountResult {\n billingAccount: BillingAccount | null;\n paymentMethods: PaymentMethod[];\n billingAddresses: BillingAddress[];\n activeSubscriptions: BillingSubscription[];\n hasActiveSubscription: boolean;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseActiveSubscriptionsResult {\n activeSubscriptions: BillingSubscription[];\n hasActiveSubscription: boolean;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UsePaymentMethodsResult {\n paymentMethods: PaymentMethod[];\n defaultPaymentMethod: PaymentMethod | null;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseCreditTransactionsResult {\n creditTransactions: CreditTransaction[];\n totalCount: number;\n hasMore: boolean;\n isLoading: boolean;\n error: Error | undefined;\n refetch: () => Promise<void>;\n}\n\ninterface UseRecommendedAddonsResult {\n addons: Addon[];\n recommendedAddons: Addon[];\n isLoading: boolean;\n error: Error | undefined;\n}\n\ninterface UseAvailablePlansResult {\n plans: Plan[];\n activePlans: Plan[];\n isLoading: boolean;\n error: Error | undefined;\n}\n\ninterface UseDashboardMutationsResult {\n // Billing account\n createBillingAccount: (input: CreateBillingAccountInput) => Promise<BillingAccount>;\n updateBillingAccount: (input: UpdateBillingAccountInput) => Promise<BillingAccount>;\n setDefaultBillingAccount: (id: string) => Promise<BillingAccount>;\n isCreatingAccount: boolean;\n isUpdatingAccount: boolean;\n isSettingDefaultAccount: boolean;\n\n // Payment methods\n addPaymentMethod: (input: CreatePaymentMethodInput) => Promise<PaymentMethod>;\n setDefaultPaymentMethod: (id: string, billingAccountId: string) => Promise<PaymentMethod>;\n deletePaymentMethod: (id: string, billingAccountId: string) => Promise<boolean>;\n isAddingPaymentMethod: boolean;\n isUpdatingPaymentMethod: boolean;\n isDeletingPaymentMethod: boolean;\n\n // Billing address\n setBillingAddress: (input: SetBillingAddressInput) => Promise<BillingAddress>;\n isSettingAddress: boolean;\n\n // Payments\n initiatePayment: (input: InitiatePaymentInput) => Promise<InitiatePaymentResponse>;\n spendCredits: (input: SpendCreditsInput) => Promise<{ creditTransactionID: string }>;\n verifyPaymentMethod: (input: VerifyPaymentMethodInput) => Promise<VerifyPaymentMethodResponse>;\n isInitiatingPayment: boolean;\n isSpendingCredits: boolean;\n isVerifyingPaymentMethod: boolean;\n}\n\ninterface PaymentProviderConfig {\n stripeEnabled: boolean;\n stripePublishableKey: string | null;\n razorpayEnabled: boolean;\n razorpayKeyId: string | null;\n}\n\ninterface UsePaymentProviderConfigResult {\n config: PaymentProviderConfig | null;\n stripeEnabled: boolean;\n stripePublishableKey: string | null;\n razorpayEnabled: boolean;\n razorpayKeyId: string | null;\n isLoading: boolean;\n error: Error | undefined;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Hook for fetching payment provider configuration from backend\n * @param skip - Skip the query (useful for modals that only need data when open)\n */\nexport function usePaymentProviderConfig(skip = false): UsePaymentProviderConfigResult {\n const { data, loading, error } = useGetPaymentProviderConfigQuery({\n fetchPolicy: 'cache-first', // Cache the config as it rarely changes\n skip,\n });\n\n const config = data?.getPaymentProviderConfig || null;\n\n return {\n config,\n stripeEnabled: config?.stripeEnabled ?? false,\n stripePublishableKey: config?.stripePublishableKey ?? null,\n razorpayEnabled: config?.razorpayEnabled ?? false,\n razorpayKeyId: config?.razorpayKeyId ?? null,\n isLoading: skip ? false : loading,\n error: error as Error | undefined,\n };\n}\n\n/**\n * Hook for fetching all billing accounts for an org\n */\nexport function useBillingAccounts(): UseBillingAccountsResult {\n const { data, loading, error, refetch } = useGetBillingAccountsByOrgQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n billingAccounts: data?.getBillingAccountsByOrg || [],\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching active subscriptions for a billing account (optimized - only active status)\n */\nexport function useActiveSubscriptions(\n billingAccountId: string | undefined\n): UseActiveSubscriptionsResult {\n const { data, loading, error, refetch } = useGetActiveSubscriptionsQuery({\n variables: { billingAccountId: billingAccountId! },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const activeSubscriptions = data?.getActiveSubscriptions || [];\n\n return {\n activeSubscriptions,\n hasActiveSubscription: activeSubscriptions.length > 0,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching default billing account with dashboard details\n * Note: Subscriptions are NOT included - use useActiveSubscriptions separately\n */\nexport function useDefaultDashboardAccount(): Omit<\n UseDashboardAccountResult,\n 'activeSubscriptions' | 'hasActiveSubscription'\n> {\n const { data, loading, error, refetch } = useGetDefaultBillingAccountDashboardQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const billingAccount = data?.getDefaultBillingAccount || null;\n const paymentMethods = (billingAccount?.paymentMethods || []).filter(Boolean) as PaymentMethod[];\n const billingAddresses = (billingAccount?.billingAddresses || []).filter(\n Boolean\n ) as BillingAddress[];\n\n return {\n billingAccount,\n paymentMethods,\n billingAddresses,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching billing account by ID with dashboard details\n * Note: Subscriptions are NOT included - use useActiveSubscriptions separately\n */\nexport function useDashboardAccount(\n id: string | undefined\n): Omit<UseDashboardAccountResult, 'activeSubscriptions' | 'hasActiveSubscription'> {\n const { data, loading, error, refetch } = useGetBillingAccountDashboardQuery({\n variables: { id: id! },\n skip: !id,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const billingAccount = data?.getBillingAccount || null;\n const paymentMethods = (billingAccount?.paymentMethods || []).filter(Boolean) as PaymentMethod[];\n const billingAddresses = (billingAccount?.billingAddresses || []).filter(\n Boolean\n ) as BillingAddress[];\n\n return {\n billingAccount,\n paymentMethods,\n billingAddresses,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching payment methods for a billing account\n */\nexport function usePaymentMethods(billingAccountId: string | undefined): UsePaymentMethodsResult {\n const { data, loading, error, refetch } = useGetPaymentMethodsDashboardQuery({\n variables: { billingAccountId: billingAccountId! },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const paymentMethods = useMemo<PaymentMethod[]>(\n () => data?.getPaymentMethods || [],\n [data?.getPaymentMethods]\n );\n const defaultPaymentMethod = useMemo(() => {\n return paymentMethods.find((pm: PaymentMethod) => pm.isDefault) || null;\n }, [paymentMethods]);\n\n return {\n paymentMethods,\n defaultPaymentMethod,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching billing address\n */\nexport function useBillingAddress(billingAccountId: string | undefined) {\n const { data, loading, error, refetch } = useGetBillingAddressQuery({\n variables: { billingAccountId: billingAccountId! },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n return {\n billingAddress: data?.getBillingAddress || null,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching credit transactions summary\n */\nexport function useCreditTransactionsSummary(\n billingAccountId: string | undefined,\n days = 30,\n page = 1,\n pageSize = 5\n): UseCreditTransactionsResult {\n const { data, loading, error, refetch } = useGetCreditTransactionsSummaryQuery({\n variables: { billingAccountID: billingAccountId!, days, page, pageSize },\n skip: !billingAccountId,\n fetchPolicy: 'cache-and-network',\n });\n\n const handleRefetch = useCallback(async () => {\n await refetch();\n }, [refetch]);\n\n const result = data?.getBillingAccountCreditTransactions || {\n creditTransactions: [],\n totalCount: 0,\n hasMore: false,\n };\n\n return {\n creditTransactions: result.creditTransactions,\n totalCount: result.totalCount,\n hasMore: result.hasMore,\n isLoading: loading,\n error: error as Error | undefined,\n refetch: handleRefetch,\n };\n}\n\n/**\n * Hook for fetching recommended addons (limited to 3 at backend level)\n */\nexport function useRecommendedAddons(): UseRecommendedAddonsResult {\n const { data, loading, error } = useGetRecommendedAddonsQuery({\n variables: { limit: 3 },\n fetchPolicy: 'cache-and-network',\n });\n\n const addons = useMemo<Addon[]>(() => data?.getAllAddOns || [], [data?.getAllAddOns]);\n\n // Filter to only active addons (limit already applied at backend)\n const recommendedAddons = useMemo(() => {\n return addons.filter((a: Addon) => a.isActive);\n }, [addons]);\n\n return {\n addons,\n recommendedAddons,\n isLoading: loading,\n error: error as Error | undefined,\n };\n}\n\n/**\n * Hook for fetching available plans\n */\nexport function useAvailablePlans(): UseAvailablePlansResult {\n const { data, loading, error } = useGetAvailablePlansQuery({\n fetchPolicy: 'cache-and-network',\n });\n\n const plans = useMemo<Plan[]>(() => data?.getAllPlans || [], [data?.getAllPlans]);\n\n const activePlans = useMemo(() => {\n return plans.filter((p: Plan) => p.isActive);\n }, [plans]);\n\n return {\n plans,\n activePlans,\n isLoading: loading,\n error: error as Error | undefined,\n };\n}\n\n/**\n * Hook for dashboard mutations\n */\nexport function useDashboardMutations(): UseDashboardMutationsResult {\n const client = useApolloClient();\n\n // Billing account mutations\n const [createBillingAccountMutation, { loading: isCreatingAccount }] =\n useCreateBillingAccountMutation();\n const [updateBillingAccountMutation, { loading: isUpdatingAccount }] =\n useUpdateBillingAccountMutation();\n const [setDefaultBillingAccountMutation, { loading: isSettingDefaultAccount }] =\n useSetDefaultBillingAccountMutation();\n\n // Payment method mutations\n const [addPaymentMethodMutation, { loading: isAddingPaymentMethod }] =\n useAddPaymentMethodDashboardMutation();\n const [updatePaymentMethodMutation, { loading: isUpdatingPaymentMethod }] =\n useUpdatePaymentMethodDashboardMutation();\n const [deletePaymentMethodMutation, { loading: isDeletingPaymentMethod }] =\n useDeletePaymentMethodDashboardMutation();\n\n // Billing address mutation\n const [setBillingAddressMutation, { loading: isSettingAddress }] = useSetBillingAddressMutation();\n\n // Payment mutations\n const [initiatePaymentMutation, { loading: isInitiatingPayment }] = useInitiatePaymentMutation();\n const [spendCreditsMutation, { loading: isSpendingCredits }] = useSpendCreditsMutation();\n const [verifyPaymentMethodMutation, { loading: isVerifyingPaymentMethod }] =\n useVerifyPaymentMethodMutation();\n\n // Billing account handlers\n const createBillingAccount = useCallback(\n async (input: CreateBillingAccountInput): Promise<BillingAccount> => {\n const { data, error } = await createBillingAccountMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to create billing account');\n }\n if (!data?.createBillingAccount) {\n throw new Error('Failed to create billing account: no data returned');\n }\n await client.refetchQueries({\n include: [GetBillingAccountsByOrgDocument, GetDefaultBillingAccountDashboardDocument],\n });\n return data.createBillingAccount;\n },\n [createBillingAccountMutation, client]\n );\n\n const updateBillingAccount = useCallback(\n async (input: UpdateBillingAccountInput): Promise<BillingAccount> => {\n const { data, error } = await updateBillingAccountMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to update billing account');\n }\n if (!data?.updateBillingAccount) {\n throw new Error('Failed to update billing account: no data returned');\n }\n // Only refetch the default dashboard - component handles selected account refetch\n await client.refetchQueries({\n include: [GetDefaultBillingAccountDashboardDocument],\n });\n return data.updateBillingAccount;\n },\n [updateBillingAccountMutation, client]\n );\n\n const setDefaultBillingAccount = useCallback(\n async (id: string): Promise<BillingAccount> => {\n const { data, error } = await setDefaultBillingAccountMutation({\n variables: { id },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to set default billing account');\n }\n if (!data?.setDefaultBillingAccount) {\n throw new Error('Failed to set default billing account: no data returned');\n }\n // Refetch all billing accounts and default account to update isDefault flags\n await client.refetchQueries({\n include: [GetBillingAccountsByOrgDocument, GetDefaultBillingAccountDashboardDocument],\n });\n return data.setDefaultBillingAccount;\n },\n [setDefaultBillingAccountMutation, client]\n );\n\n // Payment method handlers\n // Note: We don't use client.refetchQueries here because it tries to refetch ALL matching queries\n // including those that were skipped (e.g., GET_BILLING_ACCOUNT_DASHBOARD with no id).\n // The calling component should handle refetching the appropriate queries.\n const addPaymentMethod = useCallback(\n async (input: CreatePaymentMethodInput): Promise<PaymentMethod> => {\n const { data, error } = await addPaymentMethodMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to add payment method');\n }\n if (!data?.addPaymentMethod) {\n throw new Error('Failed to add payment method: no data returned');\n }\n return data.addPaymentMethod;\n },\n [addPaymentMethodMutation]\n );\n\n const setDefaultPaymentMethod = useCallback(\n async (id: string, billingAccountId: string): Promise<PaymentMethod> => {\n const { data, error } = await updatePaymentMethodMutation({\n variables: { id, isDefault: true, billingAccountId },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to update payment method');\n }\n if (!data?.updatePaymentMethod) {\n throw new Error('Failed to update payment method: no data returned');\n }\n return data.updatePaymentMethod;\n },\n [updatePaymentMethodMutation]\n );\n\n const deletePaymentMethod = useCallback(\n async (id: string, billingAccountId: string): Promise<boolean> => {\n const { data, error } = await deletePaymentMethodMutation({\n variables: { id, billingAccountId },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to delete payment method');\n }\n if (!data) {\n throw new Error('Failed to delete payment method: no data returned');\n }\n return data.deletePaymentMethod;\n },\n [deletePaymentMethodMutation]\n );\n\n // Billing address handler\n const setBillingAddress = useCallback(\n async (input: SetBillingAddressInput): Promise<BillingAddress> => {\n const { data, error } = await setBillingAddressMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to set billing address');\n }\n if (!data?.setBillingAddress) {\n throw new Error('Failed to set billing address: no data returned');\n }\n // Only refetch queries that don't have conditional required variables\n await client.refetchQueries({\n include: [GetBillingAddressDocument, GetDefaultBillingAccountDashboardDocument],\n });\n return data.setBillingAddress;\n },\n [setBillingAddressMutation, client]\n );\n\n // Payment handlers\n const initiatePayment = useCallback(\n async (input: InitiatePaymentInput): Promise<InitiatePaymentResponse> => {\n const { data, error } = await initiatePaymentMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to initiate payment');\n }\n if (!data?.initiatePayment) {\n throw new Error('Failed to initiate payment: no data returned');\n }\n return data.initiatePayment;\n },\n [initiatePaymentMutation]\n );\n\n const spendCredits = useCallback(\n async (input: SpendCreditsInput): Promise<{ creditTransactionID: string }> => {\n const { data, error } = await spendCreditsMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to spend credits');\n }\n if (!data?.spendCredits) {\n throw new Error('Failed to spend credits: no data returned');\n }\n // Only refetch queries that don't have conditional required variables\n await client.refetchQueries({\n include: [GetDefaultBillingAccountDashboardDocument, GetCreditTransactionsSummaryDocument],\n });\n return data.spendCredits;\n },\n [spendCreditsMutation, client]\n );\n\n // Verify payment method handler\n const verifyPaymentMethod = useCallback(\n async (input: VerifyPaymentMethodInput): Promise<VerifyPaymentMethodResponse> => {\n const { data, error } = await verifyPaymentMethodMutation({\n variables: { input },\n });\n if (error) {\n throw new Error(error.message ?? 'Failed to verify payment method');\n }\n if (!data?.verifyBillingPaymentMethod) {\n throw new Error('Failed to verify payment method: no data returned');\n }\n return data.verifyBillingPaymentMethod;\n },\n [verifyPaymentMethodMutation]\n );\n\n return {\n // Billing account\n createBillingAccount,\n updateBillingAccount,\n setDefaultBillingAccount,\n isCreatingAccount,\n isUpdatingAccount,\n isSettingDefaultAccount,\n\n // Payment methods\n addPaymentMethod,\n setDefaultPaymentMethod,\n deletePaymentMethod,\n isAddingPaymentMethod,\n isUpdatingPaymentMethod,\n isDeletingPaymentMethod,\n\n // Billing address\n setBillingAddress,\n isSettingAddress,\n\n // Payments\n initiatePayment,\n spendCredits,\n verifyPaymentMethod,\n isInitiatingPayment,\n isSpendingCredits,\n isVerifyingPaymentMethod,\n };\n}\n"],"mappings":";;;;AAwKA,SAAgB,EAAyB,IAAO,IAAuC;CACrF,IAAM,EAAE,SAAM,YAAS,aAAU,EAAiC;EAChE,aAAa;EACb;EACD,CAAC,EAEI,IAAS,GAAM,4BAA4B;AAEjD,QAAO;EACL;EACA,eAAe,GAAQ,iBAAiB;EACxC,sBAAsB,GAAQ,wBAAwB;EACtD,iBAAiB,GAAQ,mBAAmB;EAC5C,eAAe,GAAQ,iBAAiB;EACxC,WAAW,IAAO,KAAQ;EACnB;EACR;;AAsDH,SAAgB,IAGd;CACA,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAA0C,EAClF,aAAa,qBACd,CAAC,EAEI,IAAgB,EAAY,YAAY;AAC5C,QAAM,GAAS;IACd,CAAC,EAAQ,CAAC,EAEP,IAAiB,GAAM,4BAA4B;AAMzD,QAAO;EACL;EACA,iBAPsB,GAAgB,kBAAkB,EAAE,EAAE,OAAO,QAAQ;EAQ3E,mBAPwB,GAAgB,oBAAoB,EAAE,EAAE,OAChE,QACD;EAMC,WAAW;EACJ;EACP,SAAS;EACV;;AA6KH,SAAgB,IAAqD;CACnE,IAAM,IAAS,GAAiB,EAG1B,CAAC,GAA8B,EAAE,SAAS,OAC9C,GAAiC,EAC7B,CAAC,GAA8B,EAAE,SAAS,OAC9C,GAAiC,EAC7B,CAAC,GAAkC,EAAE,SAAS,OAClD,GAAqC,EAGjC,CAAC,GAA0B,EAAE,SAAS,OAC1C,GAAsC,EAClC,CAAC,GAA6B,EAAE,SAAS,OAC7C,GAAyC,EACrC,CAAC,GAA6B,EAAE,SAAS,OAC7C,GAAyC,EAGrC,CAAC,GAA2B,EAAE,SAAS,OAAsB,GAA8B,EAG3F,CAAC,GAAyB,EAAE,SAAS,OAAyB,GAA4B,EAC1F,CAAC,GAAsB,EAAE,SAAS,OAAuB,GAAyB,EAClF,CAAC,GAA6B,EAAE,SAAS,OAC7C,GAAgC;AA6LlC,QAAO;EAEL,sBA5L2B,EAC3B,OAAO,MAA8D;GACnE,IAAM,EAAE,SAAM,aAAU,MAAM,EAA6B,EACzD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,mCAAmC;AAEtE,OAAI,CAAC,GAAM,qBACT,OAAU,MAAM,qDAAqD;AAKvE,UAHA,MAAM,EAAO,eAAe,EAC1B,SAAS,CAAC,GAAiC,EAA0C,EACtF,CAAC,EACK,EAAK;KAEd,CAAC,GAA8B,EAAO,CACvC;EA4KC,sBA1K2B,EAC3B,OAAO,MAA8D;GACnE,IAAM,EAAE,SAAM,aAAU,MAAM,EAA6B,EACzD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,mCAAmC;AAEtE,OAAI,CAAC,GAAM,qBACT,OAAU,MAAM,qDAAqD;AAMvE,UAHA,MAAM,EAAO,eAAe,EAC1B,SAAS,CAAC,EAA0C,EACrD,CAAC,EACK,EAAK;KAEd,CAAC,GAA8B,EAAO,CACvC;EAyJC,0BAvJ+B,EAC/B,OAAO,MAAwC;GAC7C,IAAM,EAAE,SAAM,aAAU,MAAM,EAAiC,EAC7D,WAAW,EAAE,OAAI,EAClB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,wCAAwC;AAE3E,OAAI,CAAC,GAAM,yBACT,OAAU,MAAM,0DAA0D;AAM5E,UAHA,MAAM,EAAO,eAAe,EAC1B,SAAS,CAAC,GAAiC,EAA0C,EACtF,CAAC,EACK,EAAK;KAEd,CAAC,GAAkC,EAAO,CAC3C;EAsIC;EACA;EACA;EAGA,kBArIuB,EACvB,OAAO,MAA4D;GACjE,IAAM,EAAE,SAAM,aAAU,MAAM,EAAyB,EACrD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,+BAA+B;AAElE,OAAI,CAAC,GAAM,iBACT,OAAU,MAAM,iDAAiD;AAEnE,UAAO,EAAK;KAEd,CAAC,EAAyB,CAC3B;EAwHC,yBAtH8B,EAC9B,OAAO,GAAY,MAAqD;GACtE,IAAM,EAAE,SAAM,aAAU,MAAM,EAA4B,EACxD,WAAW;IAAE;IAAI,WAAW;IAAM;IAAkB,EACrD,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,kCAAkC;AAErE,OAAI,CAAC,GAAM,oBACT,OAAU,MAAM,oDAAoD;AAEtE,UAAO,EAAK;KAEd,CAAC,EAA4B,CAC9B;EAyGC,qBAvG0B,EAC1B,OAAO,GAAY,MAA+C;GAChE,IAAM,EAAE,SAAM,aAAU,MAAM,EAA4B,EACxD,WAAW;IAAE;IAAI;IAAkB,EACpC,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,kCAAkC;AAErE,OAAI,CAAC,EACH,OAAU,MAAM,oDAAoD;AAEtE,UAAO,EAAK;KAEd,CAAC,EAA4B,CAC9B;EA0FC;EACA;EACA;EAGA,mBA5FwB,EACxB,OAAO,MAA2D;GAChE,IAAM,EAAE,SAAM,aAAU,MAAM,EAA0B,EACtD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,gCAAgC;AAEnE,OAAI,CAAC,GAAM,kBACT,OAAU,MAAM,kDAAkD;AAMpE,UAHA,MAAM,EAAO,eAAe,EAC1B,SAAS,CAAC,GAA2B,EAA0C,EAChF,CAAC,EACK,EAAK;KAEd,CAAC,GAA2B,EAAO,CACpC;EA2EC;EAGA,iBA3EsB,EACtB,OAAO,MAAkE;GACvE,IAAM,EAAE,SAAM,aAAU,MAAM,EAAwB,EACpD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,6BAA6B;AAEhE,OAAI,CAAC,GAAM,gBACT,OAAU,MAAM,+CAA+C;AAEjE,UAAO,EAAK;KAEd,CAAC,EAAwB,CAC1B;EA8DC,cA5DmB,EACnB,OAAO,MAAuE;GAC5E,IAAM,EAAE,SAAM,aAAU,MAAM,EAAqB,EACjD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,0BAA0B;AAE7D,OAAI,CAAC,GAAM,aACT,OAAU,MAAM,4CAA4C;AAM9D,UAHA,MAAM,EAAO,eAAe,EAC1B,SAAS,CAAC,GAA2C,EAAqC,EAC3F,CAAC,EACK,EAAK;KAEd,CAAC,GAAsB,EAAO,CAC/B;EA2CC,qBAxC0B,EAC1B,OAAO,MAA0E;GAC/E,IAAM,EAAE,SAAM,aAAU,MAAM,EAA4B,EACxD,WAAW,EAAE,UAAO,EACrB,CAAC;AACF,OAAI,EACF,OAAU,MAAM,EAAM,WAAW,kCAAkC;AAErE,OAAI,CAAC,GAAM,2BACT,OAAU,MAAM,oDAAoD;AAEtE,UAAO,EAAK;KAEd,CAAC,EAA4B,CAC9B;EA2BC;EACA;EACA;EACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/billing/modules/dashboard/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./hooks/useDashboard.js";
|
|
2
|
+
import "./hooks/useBillingOverviewData.js";
|
|
3
|
+
import "./hooks/index.js";
|
|
4
|
+
import "./components/BillingAccountCard.js";
|
|
5
|
+
import "./components/PaymentMethodsSection.js";
|
|
6
|
+
import "./components/ActiveSubscriptionCard.js";
|
|
7
|
+
import "./components/RecommendedAddonsSection.js";
|
|
8
|
+
import "./components/CreateBillingAccountModal.js";
|
|
9
|
+
import "./components/AddPaymentMethodModal.js";
|
|
10
|
+
import "./components/index.js";
|
|
11
|
+
import "./pages/OverviewPage.js";
|
|
12
|
+
import "./pages/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverviewPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/dashboard/pages/OverviewPage.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAoC,MAAM,OAAO,CAAC;AAgDlE,eAAO,MAAM,YAAY,EAAE,EA6rB1B,CAAC"}
|
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import { useBilling as e } from "../../../providers/BillingProvider.js";
|
|
2
|
+
import { AccessDenied as t } from "../../../shared/components/AccessDenied.js";
|
|
3
|
+
import { StatCard as n } from "../../../shared/components/StatCard.js";
|
|
4
|
+
import { EmptyState as ee } from "../../../shared/components/EmptyState.js";
|
|
5
|
+
import { ServerError as te } from "../../../shared/components/ServerError.js";
|
|
6
|
+
import { useBillingEventEmitter as ne } from "../../../hooks/useBillingEventEmitter.js";
|
|
7
|
+
import { getStoredBillingAccountId as re, setStoredBillingAccountId as ie } from "../../../hooks/useBillingAccountSelection.js";
|
|
8
|
+
import { isServerError as ae } from "../../../shared/utils/error.js";
|
|
9
|
+
import "../../../shared/utils/index.js";
|
|
10
|
+
import { useBillingPermissions as oe } from "../../../hooks/useBillingPermissions.js";
|
|
11
|
+
import { useDashboardMutations as se } from "../hooks/useDashboard.js";
|
|
12
|
+
import { useBillingOverviewData as ce } from "../hooks/useBillingOverviewData.js";
|
|
13
|
+
import "../hooks/index.js";
|
|
14
|
+
import { BillingAccountCard as le } from "../components/BillingAccountCard.js";
|
|
15
|
+
import { PaymentMethodsSection as ue } from "../components/PaymentMethodsSection.js";
|
|
16
|
+
import { ActiveSubscriptionCard as de } from "../components/ActiveSubscriptionCard.js";
|
|
17
|
+
import { RecommendedAddonsSection as fe } from "../components/RecommendedAddonsSection.js";
|
|
18
|
+
import { CreateBillingAccountModal as r } from "../components/CreateBillingAccountModal.js";
|
|
19
|
+
import { AddPaymentMethodModal as pe } from "../components/AddPaymentMethodModal.js";
|
|
20
|
+
import "../components/index.js";
|
|
21
|
+
import { useAddonCartStore as me } from "../../addons/store/addonCartStore.js";
|
|
22
|
+
import { FloatingCartDrawer as he } from "../../addons/components/FloatingCartDrawer.js";
|
|
23
|
+
import { withBillingAccountId as i } from "../../../shared/utils/navigation.js";
|
|
24
|
+
import { useCallback as a, useEffect as o, useState as s } from "react";
|
|
25
|
+
import { Activity as ge, ArrowRight as _e, Building2 as c, Check as ve, ChevronDown as ye, Coins as be, Crown as l, Loader2 as xe, Plus as u, Receipt as Se, RefreshCw as d, Sparkles as Ce, Wallet as f } from "lucide-react";
|
|
26
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
27
|
+
import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
28
|
+
//#region src/billing/modules/dashboard/pages/OverviewPage.tsx
|
|
29
|
+
var g = () => {
|
|
30
|
+
let { t: g } = we(), _ = (e, t) => {
|
|
31
|
+
let n = g(e);
|
|
32
|
+
return n === e ? t : n;
|
|
33
|
+
}, { navigate: v, basePath: y, orgId: b, productId: Te } = e(), x = oe(), { emit: S } = ne(), [C, Ee] = s(() => re(b)), [w, T] = s(!1), [E, D] = s(null), [O, k] = s(!1), [De, A] = s(!1), [Oe, ke] = s(0), [j, M] = s(!1), { billingAccounts: N, currentAccount: P, paymentMethods: F, activeSubscriptions: I, hasActiveSubscription: L, recommendedAddons: Ae, isLoading: R, error: z, refetchAll: B } = ce(C, Te), V = P?.id, je = R, H = a((e) => {
|
|
34
|
+
Ee(e), ie(b, e);
|
|
35
|
+
}, [b]), { addToCart: U, isInCart: W, getCartItem: G, updateQuantity: K, removeFromCart: q } = me(), { createBillingAccount: J, setBillingAddress: Y, setDefaultPaymentMethod: X, deletePaymentMethod: Me, isCreatingAccount: Ne } = se();
|
|
36
|
+
o(() => {
|
|
37
|
+
ke(0), M(!1);
|
|
38
|
+
}, [V, I.length]), o(() => {
|
|
39
|
+
C && N.length > 0 && (N.some((e) => e.id === C) || H(null));
|
|
40
|
+
}, [
|
|
41
|
+
N,
|
|
42
|
+
C,
|
|
43
|
+
H
|
|
44
|
+
]), o(() => {
|
|
45
|
+
!C && N.length > 0 && H((N.find((e) => e.isDefault) ?? N[0]).id);
|
|
46
|
+
}, [
|
|
47
|
+
N,
|
|
48
|
+
C,
|
|
49
|
+
H
|
|
50
|
+
]);
|
|
51
|
+
let Z = I[Oe] || I[0] || null, Q = a((e) => {
|
|
52
|
+
let t = e;
|
|
53
|
+
y && y !== "/" && (t = `${y.endsWith("/") ? y.slice(0, -1) : y}${e.startsWith("/") ? e : `/${e}`}`), v(t);
|
|
54
|
+
}, [v, y]), Pe = a(async (e, t) => {
|
|
55
|
+
D(null);
|
|
56
|
+
try {
|
|
57
|
+
let n = await J(e);
|
|
58
|
+
t && n.id && await Y({
|
|
59
|
+
billingAccountId: n.id,
|
|
60
|
+
...t
|
|
61
|
+
}), T(!1), H(n.id), S("billing.billing_account.created", {
|
|
62
|
+
route: "/billing/overview",
|
|
63
|
+
entityId: n.id,
|
|
64
|
+
source: "overview"
|
|
65
|
+
}), await B();
|
|
66
|
+
} catch (e) {
|
|
67
|
+
D(e instanceof Error ? e.message : "Failed to create billing account");
|
|
68
|
+
}
|
|
69
|
+
}, [
|
|
70
|
+
J,
|
|
71
|
+
S,
|
|
72
|
+
B,
|
|
73
|
+
Y,
|
|
74
|
+
H
|
|
75
|
+
]), Fe = a(() => {
|
|
76
|
+
A(!0);
|
|
77
|
+
}, []), $ = a(async () => {
|
|
78
|
+
await B();
|
|
79
|
+
}, [B]), Ie = a(async () => {
|
|
80
|
+
S("billing.payment_method.added", {
|
|
81
|
+
route: "/billing/overview",
|
|
82
|
+
entityId: V,
|
|
83
|
+
source: "overview"
|
|
84
|
+
}), await $();
|
|
85
|
+
}, [
|
|
86
|
+
V,
|
|
87
|
+
S,
|
|
88
|
+
$
|
|
89
|
+
]), Le = a(async (e) => {
|
|
90
|
+
V && (await X(e, V), S("billing.payment_method.default_set", {
|
|
91
|
+
route: "/billing/overview",
|
|
92
|
+
entityId: e,
|
|
93
|
+
source: "overview"
|
|
94
|
+
}), await $());
|
|
95
|
+
}, [
|
|
96
|
+
V,
|
|
97
|
+
S,
|
|
98
|
+
X,
|
|
99
|
+
$
|
|
100
|
+
]), Re = a(async (e) => {
|
|
101
|
+
V && (await Me(e, V), S("billing.payment_method.deleted", {
|
|
102
|
+
route: "/billing/overview",
|
|
103
|
+
entityId: e,
|
|
104
|
+
source: "overview"
|
|
105
|
+
}), await $());
|
|
106
|
+
}, [
|
|
107
|
+
V,
|
|
108
|
+
Me,
|
|
109
|
+
S,
|
|
110
|
+
$
|
|
111
|
+
]), ze = a((e) => {
|
|
112
|
+
H(e.id), k(!1);
|
|
113
|
+
}, [H]), Be = a(async () => {
|
|
114
|
+
await B();
|
|
115
|
+
}, [B]), Ve = a((e) => {
|
|
116
|
+
U(e);
|
|
117
|
+
}, [U]), He = a((e) => W(e), [W]), Ue = a((e) => G(e)?.quantity || 0, [G]), We = a((e, t) => {
|
|
118
|
+
t <= 0 ? q(e) : K(e, t);
|
|
119
|
+
}, [K, q]), Ge = a((e) => {
|
|
120
|
+
q(e);
|
|
121
|
+
}, [q]);
|
|
122
|
+
return x.canViewBillingAccount ? z && ae(z) && !R ? /* @__PURE__ */ m("div", {
|
|
123
|
+
className: "p-6",
|
|
124
|
+
children: /* @__PURE__ */ m(te, {
|
|
125
|
+
title: "Server Unavailable",
|
|
126
|
+
message: "Unable to load billing overview. The server might be down or experiencing issues.",
|
|
127
|
+
onRetry: Be,
|
|
128
|
+
showRetry: !0
|
|
129
|
+
})
|
|
130
|
+
}) : R && !P ? /* @__PURE__ */ m("div", {
|
|
131
|
+
className: "flex items-center justify-center min-h-[400px]",
|
|
132
|
+
children: /* @__PURE__ */ h("div", {
|
|
133
|
+
className: "flex flex-col items-center gap-3",
|
|
134
|
+
children: [/* @__PURE__ */ m(xe, { className: "w-8 h-8 animate-spin text-primary" }), /* @__PURE__ */ m("p", {
|
|
135
|
+
className: "text-sm text-muted-foreground",
|
|
136
|
+
children: _("billing.overview.loadingInfo", "Loading billing information...")
|
|
137
|
+
})]
|
|
138
|
+
})
|
|
139
|
+
}) : !R && N.length === 0 ? /* @__PURE__ */ h("div", {
|
|
140
|
+
className: "p-6",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ h("header", {
|
|
143
|
+
className: "mb-8",
|
|
144
|
+
children: [/* @__PURE__ */ m("h1", {
|
|
145
|
+
className: "text-2xl font-bold text-foreground",
|
|
146
|
+
children: _("billing.overview.title", "Billing Overview")
|
|
147
|
+
}), /* @__PURE__ */ m("p", {
|
|
148
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
149
|
+
children: _("billing.overview.emptySetupDescription", "Set up billing to manage subscriptions, payments, and invoices")
|
|
150
|
+
})]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ m(ee, {
|
|
153
|
+
icon: /* @__PURE__ */ m(c, { className: "w-6 h-6 text-muted-foreground" }),
|
|
154
|
+
title: _("billing.overview.emptyTitle", "No billing account"),
|
|
155
|
+
description: _("billing.overview.emptyDescription", "Create a billing account to start managing your subscriptions and payments"),
|
|
156
|
+
action: x.canManageBillingAccount ? /* @__PURE__ */ h("button", {
|
|
157
|
+
onClick: () => T(!0),
|
|
158
|
+
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary-foreground bg-primary rounded-lg hover:bg-primary/90 transition-colors",
|
|
159
|
+
children: [/* @__PURE__ */ m(u, { className: "w-4 h-4" }), _("billing.overview.createBillingAccount", "Create Billing Account")]
|
|
160
|
+
}) : void 0
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ m(r, {
|
|
163
|
+
isOpen: w,
|
|
164
|
+
onClose: () => {
|
|
165
|
+
T(!1), D(null);
|
|
166
|
+
},
|
|
167
|
+
onSubmit: Pe,
|
|
168
|
+
isSubmitting: Ne,
|
|
169
|
+
error: E
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
}) : /* @__PURE__ */ h("div", {
|
|
173
|
+
className: "p-6 space-y-8",
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ h("header", {
|
|
176
|
+
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
|
|
177
|
+
children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
|
|
178
|
+
className: "text-2xl font-bold text-foreground",
|
|
179
|
+
children: _("billing.overview.title", "Billing Overview")
|
|
180
|
+
}), /* @__PURE__ */ m("p", {
|
|
181
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
182
|
+
children: _("billing.overview.description", "Manage your billing accounts, subscriptions, and payment methods")
|
|
183
|
+
})] }), /* @__PURE__ */ h("div", {
|
|
184
|
+
className: "flex items-center gap-2",
|
|
185
|
+
children: [/* @__PURE__ */ m("button", {
|
|
186
|
+
onClick: Be,
|
|
187
|
+
className: "p-2 rounded-lg border border-border hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",
|
|
188
|
+
"aria-label": _("billing.overview.refresh", "Refresh"),
|
|
189
|
+
children: /* @__PURE__ */ m(d, { className: `w-4 h-4 ${R ? "animate-spin" : ""}` })
|
|
190
|
+
}), x.canManageBillingAccount && N.length > 0 && /* @__PURE__ */ h("button", {
|
|
191
|
+
onClick: () => T(!0),
|
|
192
|
+
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary-foreground bg-primary rounded-lg hover:bg-primary/90 transition-colors",
|
|
193
|
+
children: [/* @__PURE__ */ m(u, { className: "w-4 h-4" }), /* @__PURE__ */ m("span", {
|
|
194
|
+
className: "hidden sm:inline",
|
|
195
|
+
children: _("billing.overview.newAccount", "New Account")
|
|
196
|
+
})]
|
|
197
|
+
})]
|
|
198
|
+
})]
|
|
199
|
+
}),
|
|
200
|
+
N.length > 1 && /* @__PURE__ */ h("div", {
|
|
201
|
+
className: "relative",
|
|
202
|
+
children: [/* @__PURE__ */ h("button", {
|
|
203
|
+
onClick: () => k(!O),
|
|
204
|
+
className: "w-full sm:w-auto flex items-center justify-between gap-3 px-4 py-3 border border-border rounded-lg bg-card hover:bg-muted/50 transition-colors",
|
|
205
|
+
children: [/* @__PURE__ */ h("div", {
|
|
206
|
+
className: "flex items-center gap-3",
|
|
207
|
+
children: [/* @__PURE__ */ m("div", {
|
|
208
|
+
className: "w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",
|
|
209
|
+
children: /* @__PURE__ */ m(c, { className: "w-4 h-4 text-primary" })
|
|
210
|
+
}), /* @__PURE__ */ h("div", {
|
|
211
|
+
className: "text-left",
|
|
212
|
+
children: [/* @__PURE__ */ m("p", {
|
|
213
|
+
className: "text-sm font-medium text-foreground",
|
|
214
|
+
children: P?.name || _("billing.overview.selectAccount", "Select Account")
|
|
215
|
+
}), /* @__PURE__ */ m("p", {
|
|
216
|
+
className: "text-xs text-muted-foreground",
|
|
217
|
+
children: P?.email
|
|
218
|
+
})]
|
|
219
|
+
})]
|
|
220
|
+
}), /* @__PURE__ */ m(ye, { className: `w-4 h-4 text-muted-foreground transition-transform ${O ? "rotate-180" : ""}` })]
|
|
221
|
+
}), O && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
222
|
+
className: "fixed inset-0 z-10",
|
|
223
|
+
onClick: () => k(!1)
|
|
224
|
+
}), /* @__PURE__ */ m("div", {
|
|
225
|
+
className: "absolute top-full left-0 right-0 sm:right-auto mt-1 w-full sm:w-80 bg-popover border border-border rounded-lg shadow-lg z-20 py-1 max-h-60 overflow-y-auto",
|
|
226
|
+
children: N.map((e) => /* @__PURE__ */ h("button", {
|
|
227
|
+
onClick: () => ze(e),
|
|
228
|
+
className: "w-full flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted transition-colors",
|
|
229
|
+
children: [/* @__PURE__ */ h("div", {
|
|
230
|
+
className: "flex items-center gap-3 min-w-0",
|
|
231
|
+
children: [/* @__PURE__ */ m("div", {
|
|
232
|
+
className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center flex-shrink-0",
|
|
233
|
+
children: /* @__PURE__ */ m(c, { className: "w-4 h-4 text-muted-foreground" })
|
|
234
|
+
}), /* @__PURE__ */ h("div", {
|
|
235
|
+
className: "text-left min-w-0",
|
|
236
|
+
children: [/* @__PURE__ */ m("p", {
|
|
237
|
+
className: "text-sm font-medium text-foreground truncate",
|
|
238
|
+
children: e.name
|
|
239
|
+
}), /* @__PURE__ */ m("p", {
|
|
240
|
+
className: "text-xs text-muted-foreground truncate",
|
|
241
|
+
children: e.email
|
|
242
|
+
})]
|
|
243
|
+
})]
|
|
244
|
+
}), P?.id === e.id && /* @__PURE__ */ m(ve, { className: "w-4 h-4 text-primary flex-shrink-0" })]
|
|
245
|
+
}, e.id))
|
|
246
|
+
})] })]
|
|
247
|
+
}),
|
|
248
|
+
P && /* @__PURE__ */ h("div", {
|
|
249
|
+
className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ m(n, {
|
|
252
|
+
label: _("billing.overview.stats.creditBalance", "Credit Balance"),
|
|
253
|
+
value: `${(P.creditAmount || 0).toLocaleString()} Credits`,
|
|
254
|
+
icon: /* @__PURE__ */ m(f, { className: "w-5 h-5" })
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ m(n, {
|
|
257
|
+
label: _("billing.overview.stats.activePlans", "Active Plans"),
|
|
258
|
+
value: I.length > 0 ? I.length === 1 ? I[0]?.plan?.name || "1 Plan" : `${I.length} ${_("billing.overview.stats.plansSuffix", "Plans")}` : _("billing.overview.stats.none", "None"),
|
|
259
|
+
icon: /* @__PURE__ */ m(d, { className: "w-5 h-5" })
|
|
260
|
+
}),
|
|
261
|
+
/* @__PURE__ */ m(n, {
|
|
262
|
+
label: _("billing.overview.stats.paymentMethods", "Payment Methods"),
|
|
263
|
+
value: F.length,
|
|
264
|
+
icon: /* @__PURE__ */ m(c, { className: "w-5 h-5" })
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ m(n, {
|
|
267
|
+
label: _("billing.overview.stats.paymentCurrency", "Payment Currency"),
|
|
268
|
+
value: P.currency || "USD",
|
|
269
|
+
icon: /* @__PURE__ */ m(c, { className: "w-5 h-5" })
|
|
270
|
+
})
|
|
271
|
+
]
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ h("div", {
|
|
274
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
275
|
+
children: [/* @__PURE__ */ h("div", {
|
|
276
|
+
className: "lg:col-span-2 space-y-6",
|
|
277
|
+
children: [
|
|
278
|
+
P && /* @__PURE__ */ m(le, {
|
|
279
|
+
account: P,
|
|
280
|
+
isDefault: P.isDefault ?? !1,
|
|
281
|
+
onEdit: () => P && Q(`/settings?billingAccountId=${P.id}`),
|
|
282
|
+
onViewTransactions: () => Q(`/transactions/${P.id}`),
|
|
283
|
+
onViewCreditTransactions: () => Q(`/creditTransactions/${P.id}`)
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ h("div", {
|
|
286
|
+
className: "space-y-3",
|
|
287
|
+
children: [I.length > 1 && /* @__PURE__ */ h("div", {
|
|
288
|
+
className: "relative",
|
|
289
|
+
children: [/* @__PURE__ */ h("button", {
|
|
290
|
+
onClick: () => M(!j),
|
|
291
|
+
className: "w-full sm:w-auto flex items-center justify-between gap-3 px-4 py-3 border border-border rounded-lg bg-card hover:bg-muted/50 transition-colors",
|
|
292
|
+
children: [/* @__PURE__ */ h("div", {
|
|
293
|
+
className: "flex items-center gap-3",
|
|
294
|
+
children: [/* @__PURE__ */ m("div", {
|
|
295
|
+
className: "w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",
|
|
296
|
+
children: /* @__PURE__ */ m(l, { className: "w-4 h-4 text-primary" })
|
|
297
|
+
}), /* @__PURE__ */ h("div", {
|
|
298
|
+
className: "text-left",
|
|
299
|
+
children: [/* @__PURE__ */ h("p", {
|
|
300
|
+
className: "text-sm font-medium text-foreground",
|
|
301
|
+
children: [Z?.plan?.name || _("billing.overview.selectSubscription", "Select Subscription"), Z?.plan?.product?.name && /* @__PURE__ */ h("span", {
|
|
302
|
+
className: "text-muted-foreground font-normal",
|
|
303
|
+
children: [
|
|
304
|
+
" ",
|
|
305
|
+
"· ",
|
|
306
|
+
Z.plan.product.name
|
|
307
|
+
]
|
|
308
|
+
})]
|
|
309
|
+
}), /* @__PURE__ */ h("p", {
|
|
310
|
+
className: "text-xs text-muted-foreground",
|
|
311
|
+
children: [
|
|
312
|
+
I.length,
|
|
313
|
+
" ",
|
|
314
|
+
_("billing.overview.activeSubscriptions", "active subscriptions")
|
|
315
|
+
]
|
|
316
|
+
})]
|
|
317
|
+
})]
|
|
318
|
+
}), /* @__PURE__ */ m(ye, { className: `w-4 h-4 text-muted-foreground transition-transform ${j ? "rotate-180" : ""}` })]
|
|
319
|
+
}), j && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
320
|
+
className: "fixed inset-0 z-10",
|
|
321
|
+
onClick: () => M(!1)
|
|
322
|
+
}), /* @__PURE__ */ m("div", {
|
|
323
|
+
className: "absolute top-full left-0 right-0 sm:right-auto mt-1 w-full sm:w-80 bg-popover border border-border rounded-lg shadow-lg z-20 py-1 max-h-60 overflow-y-auto",
|
|
324
|
+
children: I.map((e, t) => /* @__PURE__ */ h("button", {
|
|
325
|
+
onClick: () => {
|
|
326
|
+
ke(t), M(!1);
|
|
327
|
+
},
|
|
328
|
+
className: "w-full flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted transition-colors",
|
|
329
|
+
children: [/* @__PURE__ */ h("div", {
|
|
330
|
+
className: "flex items-center gap-3 min-w-0",
|
|
331
|
+
children: [/* @__PURE__ */ m("div", {
|
|
332
|
+
className: "w-8 h-8 rounded-lg bg-muted flex items-center justify-center flex-shrink-0",
|
|
333
|
+
children: /* @__PURE__ */ m(l, { className: "w-4 h-4 text-muted-foreground" })
|
|
334
|
+
}), /* @__PURE__ */ h("div", {
|
|
335
|
+
className: "text-left min-w-0",
|
|
336
|
+
children: [/* @__PURE__ */ m("p", {
|
|
337
|
+
className: "text-sm font-medium text-foreground truncate",
|
|
338
|
+
children: e.plan?.name || _("billing.overview.subscription", "Subscription")
|
|
339
|
+
}), /* @__PURE__ */ h("p", {
|
|
340
|
+
className: "text-xs text-muted-foreground truncate",
|
|
341
|
+
children: [
|
|
342
|
+
e.plan?.product?.name || _("billing.overview.unknownProduct", "Unknown Product"),
|
|
343
|
+
" ",
|
|
344
|
+
"· ",
|
|
345
|
+
_("billing.overview.ends", "Ends"),
|
|
346
|
+
" ",
|
|
347
|
+
new Date(e.endDate).toLocaleDateString()
|
|
348
|
+
]
|
|
349
|
+
})]
|
|
350
|
+
})]
|
|
351
|
+
}), Oe === t && /* @__PURE__ */ m(ve, { className: "w-4 h-4 text-primary flex-shrink-0" })]
|
|
352
|
+
}, e.id))
|
|
353
|
+
})] })]
|
|
354
|
+
}), /* @__PURE__ */ m(de, {
|
|
355
|
+
subscription: Z,
|
|
356
|
+
onViewDetails: () => Z && Q(i(`/subscriptions/${Z.id}`, Z.billingAccountId ?? P?.id)),
|
|
357
|
+
onUpgrade: () => Z && Q(i(`/subscriptions/${Z.id}/upgrade`, Z.billingAccountId ?? P?.id)),
|
|
358
|
+
onManage: () => P && Q(`/subscriptions?billingAccountId=${P.id}`),
|
|
359
|
+
onPurchasePlan: () => Q("/plans")
|
|
360
|
+
})]
|
|
361
|
+
}),
|
|
362
|
+
P && /* @__PURE__ */ m(ue, {
|
|
363
|
+
paymentMethods: F,
|
|
364
|
+
billingAccountId: P.id,
|
|
365
|
+
onAddPaymentMethod: Fe,
|
|
366
|
+
onSetDefault: Le,
|
|
367
|
+
onDelete: Re,
|
|
368
|
+
isLoading: R
|
|
369
|
+
})
|
|
370
|
+
]
|
|
371
|
+
}), /* @__PURE__ */ h("div", {
|
|
372
|
+
className: "space-y-6",
|
|
373
|
+
children: [/* @__PURE__ */ h("section", {
|
|
374
|
+
className: "border border-border rounded-lg bg-card p-4",
|
|
375
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
376
|
+
className: "font-semibold text-foreground mb-4",
|
|
377
|
+
children: "Quick Actions"
|
|
378
|
+
}), /* @__PURE__ */ h("div", {
|
|
379
|
+
className: "space-y-2",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ h("button", {
|
|
382
|
+
onClick: () => P && Q(`/transactions/${P.id}`),
|
|
383
|
+
disabled: !P,
|
|
384
|
+
className: "w-full flex items-center gap-3 px-3 py-2.5 text-sm text-left text-foreground hover:bg-muted rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
385
|
+
children: [/* @__PURE__ */ m("div", {
|
|
386
|
+
className: "w-8 h-8 rounded bg-status-info-bg-subtle flex items-center justify-center",
|
|
387
|
+
children: /* @__PURE__ */ m(Se, { className: "w-4 h-4 text-accent-blue" })
|
|
388
|
+
}), "View Transactions"]
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ h("button", {
|
|
391
|
+
onClick: () => P && Q(`/creditTransactions/${P.id}`),
|
|
392
|
+
disabled: !P,
|
|
393
|
+
className: "w-full flex items-center gap-3 px-3 py-2.5 text-sm text-left text-foreground hover:bg-muted rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
394
|
+
children: [/* @__PURE__ */ m("div", {
|
|
395
|
+
className: "w-8 h-8 rounded bg-status-warning-bg-subtle flex items-center justify-center",
|
|
396
|
+
children: /* @__PURE__ */ m(f, { className: "w-4 h-4 text-status-warning-text" })
|
|
397
|
+
}), "Credit History"]
|
|
398
|
+
}),
|
|
399
|
+
/* @__PURE__ */ h("button", {
|
|
400
|
+
onClick: () => Q("/checkout/credits"),
|
|
401
|
+
className: "w-full flex items-center gap-3 px-3 py-2.5 text-sm text-left text-foreground hover:bg-muted rounded-lg transition-colors",
|
|
402
|
+
children: [/* @__PURE__ */ m("div", {
|
|
403
|
+
className: "w-8 h-8 rounded bg-status-success-bg-subtle flex items-center justify-center",
|
|
404
|
+
children: /* @__PURE__ */ m(be, { className: "w-4 h-4 text-status-success-text" })
|
|
405
|
+
}), "Purchase Credits"]
|
|
406
|
+
}),
|
|
407
|
+
/* @__PURE__ */ h("button", {
|
|
408
|
+
onClick: () => P && Q(`/usage?billingAccountId=${P.id}`),
|
|
409
|
+
disabled: !P,
|
|
410
|
+
className: "w-full flex items-center gap-3 px-3 py-2.5 text-sm text-left text-foreground hover:bg-muted rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
411
|
+
children: [/* @__PURE__ */ m("div", {
|
|
412
|
+
className: "w-8 h-8 rounded bg-accent-violet-subtle flex items-center justify-center",
|
|
413
|
+
children: /* @__PURE__ */ m(ge, { className: "w-4 h-4 text-accent-violet" })
|
|
414
|
+
}), "Usage Analytics"]
|
|
415
|
+
})
|
|
416
|
+
]
|
|
417
|
+
})]
|
|
418
|
+
}), !L && /* @__PURE__ */ h("section", {
|
|
419
|
+
className: "border border-border rounded-lg bg-gradient-to-br from-primary/5 to-primary/10 p-4",
|
|
420
|
+
children: [/* @__PURE__ */ h("div", {
|
|
421
|
+
className: "flex items-start gap-3 mb-4",
|
|
422
|
+
children: [/* @__PURE__ */ m("div", {
|
|
423
|
+
className: "w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",
|
|
424
|
+
children: /* @__PURE__ */ m(Ce, { className: "w-5 h-5 text-primary" })
|
|
425
|
+
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
426
|
+
className: "font-semibold text-foreground",
|
|
427
|
+
children: "Get Started"
|
|
428
|
+
}), /* @__PURE__ */ m("p", {
|
|
429
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
430
|
+
children: "Choose a plan that fits your needs to unlock all features"
|
|
431
|
+
})] })]
|
|
432
|
+
}), /* @__PURE__ */ h("button", {
|
|
433
|
+
onClick: () => Q("/plans"),
|
|
434
|
+
className: "w-full flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-medium text-primary-foreground bg-primary rounded-lg hover:bg-primary/90 transition-colors",
|
|
435
|
+
children: ["Browse Plans", /* @__PURE__ */ m(_e, { className: "w-4 h-4" })]
|
|
436
|
+
})]
|
|
437
|
+
})]
|
|
438
|
+
})]
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ m(fe, {
|
|
441
|
+
addons: Ae,
|
|
442
|
+
hasSubscription: L,
|
|
443
|
+
onViewAddon: (e) => Q(`/addons/${e}`),
|
|
444
|
+
onPurchaseAddon: (e) => Q(`/addons/${e}?action=purchase`),
|
|
445
|
+
onViewAllAddons: () => Q("/addons"),
|
|
446
|
+
onAddToCart: Ve,
|
|
447
|
+
isInCart: He,
|
|
448
|
+
getCartQuantity: Ue,
|
|
449
|
+
onUpdateQuantity: We,
|
|
450
|
+
onRemoveFromCart: Ge,
|
|
451
|
+
maxAddons: 3,
|
|
452
|
+
isLoading: je
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ m(he, {}),
|
|
455
|
+
/* @__PURE__ */ m(r, {
|
|
456
|
+
isOpen: w,
|
|
457
|
+
onClose: () => {
|
|
458
|
+
T(!1), D(null);
|
|
459
|
+
},
|
|
460
|
+
onSubmit: Pe,
|
|
461
|
+
isSubmitting: Ne,
|
|
462
|
+
error: E
|
|
463
|
+
}),
|
|
464
|
+
P && /* @__PURE__ */ m(pe, {
|
|
465
|
+
isOpen: De,
|
|
466
|
+
onClose: () => A(!1),
|
|
467
|
+
billingAccountId: P.id,
|
|
468
|
+
currency: P.currency,
|
|
469
|
+
country: P.billingAddresses?.[0]?.country,
|
|
470
|
+
onSuccess: Ie
|
|
471
|
+
})
|
|
472
|
+
]
|
|
473
|
+
}) : /* @__PURE__ */ m(t, { message: "You don't have permission to view billing information." });
|
|
474
|
+
};
|
|
475
|
+
//#endregion
|
|
476
|
+
export { g as OverviewPage };
|
|
477
|
+
|
|
478
|
+
//# sourceMappingURL=OverviewPage.js.map
|