@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":"TransactionsPage.js","names":[],"sources":["../../../../../src/billing/modules/billing/pages/TransactionsPage.tsx"],"sourcesContent":["/**\n * Billing Module - Transactions Page\n * Displays all billing transactions for a specific billing account\n */\n\nimport { useState, useRef, useEffect, type FC } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n MoreHorizontal,\n Eye,\n FileText,\n X,\n CreditCard,\n Mail,\n Wallet,\n ChevronLeft,\n ChevronRight,\n Calendar,\n CheckCircle,\n XCircle,\n} from 'lucide-react';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useTransactions } from '../hooks';\nimport { nativeImpact, nativeOpenUrl } from '../../../../utils/nativeBridge';\nimport { AccessDenied, PageHeader, EmptyState, ServerError } from '../../../shared/components';\nimport { formatCurrency, formatDateTime, isServerError } from '../../../shared/utils';\nimport { getTransactionStatusColor, getStatusBadgeClasses } from '../../../shared/utils/status';\nimport type { Transaction, TransactionType } from '../../../shared/types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ntype FilterType = 'all' | TransactionType;\n\nconst TYPE_LABELS: Record<TransactionType, string> = {\n payment: 'Payment',\n refund: 'Refund',\n adjustment: 'Adjustment',\n};\n\n// Helper to get label for transaction type (case-insensitive)\nconst getTypeLabel = (type: string): string => {\n const normalized = type.toLowerCase() as TransactionType;\n return TYPE_LABELS[normalized] ?? type;\n};\n\n// Transaction Actions Dropdown Component\ninterface TransactionActionsDropdownProps {\n transaction: Transaction;\n onViewDetails: () => void;\n onViewInvoice: () => void;\n hasInvoiceUrl: boolean;\n}\n\nconst TransactionActionsDropdown: FC<TransactionActionsDropdownProps> = ({\n transaction,\n onViewDetails,\n onViewInvoice,\n hasInvoiceUrl,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n return (\n <div className=\"relative overflow-visible\" ref={dropdownRef}>\n <button\n onClick={() => setIsOpen(!isOpen)}\n className=\"p-1.5 rounded-md hover:bg-muted/50 transition-colors\"\n aria-label=\"Transaction actions\"\n >\n <MoreHorizontal className=\"w-4 h-4 text-muted-foreground\" />\n </button>\n\n {isOpen && (\n <div className=\"absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-popover border border-border rounded-md shadow-lg py-1\">\n <button\n onClick={() => {\n onViewDetails();\n setIsOpen(false);\n }}\n className=\"w-full flex items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-muted/50 transition-colors whitespace-nowrap\"\n >\n <Eye className=\"w-4 h-4\" />\n View Details\n </button>\n {transaction.type === 'payment' && hasInvoiceUrl && (\n <button\n onClick={() => {\n onViewInvoice();\n setIsOpen(false);\n }}\n className=\"w-full flex items-center gap-2 px-3 py-2 text-sm text-foreground hover:bg-muted/50 transition-colors whitespace-nowrap\"\n >\n <FileText className=\"w-4 h-4\" />\n View Invoice\n </button>\n )}\n </div>\n )}\n </div>\n );\n};\n\n// Transaction Details Modal Component\ninterface TransactionDetailsModalProps {\n transaction: Transaction | null;\n onClose: () => void;\n onViewInvoice?: (transaction: Transaction) => void;\n invoiceUrl?: string | null;\n invoiceProvider?: string | null;\n}\n\nconst TransactionDetailsModal: FC<TransactionDetailsModalProps> = ({\n transaction,\n onClose,\n onViewInvoice,\n invoiceUrl,\n invoiceProvider,\n}) => {\n if (!transaction) return null;\n\n // Extract tax information from metadata\n const metadata = transaction.metadata as Record<string, unknown> | null;\n const subtotal = metadata?.subtotal as number | undefined;\n const taxAmount = metadata?.taxAmount as number | undefined;\n const taxRate = metadata?.taxRate as number | undefined;\n const taxType = metadata?.taxType as string | undefined;\n const total = metadata?.total as number | undefined;\n const invoiceNumber = metadata?.invoiceNumber as string | undefined;\n const invoiceStatus = metadata?.invoiceStatus as string | undefined;\n\n // Extract refund-specific information\n const isRefund = transaction.type === 'refund';\n const refundRecordId = metadata?.refundRecordId as string | undefined;\n const originalTransactionId = metadata?.originalTransactionId as string | undefined;\n const creditNoteId = metadata?.creditNoteId as string | undefined;\n const creditNoteNumber = metadata?.creditNoteNumber as string | undefined;\n const creditNotePdfUrl = metadata?.creditNotePdfUrl as string | undefined;\n const refundReason = metadata?.reason as string | undefined;\n const purchaseType = metadata?.purchaseType as string | undefined;\n const purchaseDetail = metadata?.purchaseDetail as string | undefined;\n\n // Determine if we should show tax breakdown\n const showTaxBreakdown = total && taxAmount !== undefined && taxAmount > 0;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <div className=\"absolute inset-0 bg-overlay-scrim\" onClick={onClose} />\n <div\n className=\"relative bg-background border border-border rounded-lg shadow-xl max-w-md w-full mx-4 max-h-[90vh] overflow-auto\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"transaction-details-title\"\n >\n <div className=\"flex items-center justify-between p-4 border-b border-border\">\n <h2 id=\"transaction-details-title\" className=\"text-lg font-semibold\">\n Transaction Details\n </h2>\n <button\n onClick={onClose}\n className=\"p-1 rounded-md hover:bg-muted/50 transition-colors\"\n aria-label=\"Close transaction details\"\n >\n <X className=\"w-5 h-5\" />\n </button>\n </div>\n\n <div className=\"p-4 space-y-4\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Transaction ID</p>\n <p className=\"text-sm font-mono break-all\">{transaction.id}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Type</p>\n <p className=\"text-sm capitalize\">{getTypeLabel(transaction.type)}</p>\n </div>\n </div>\n\n {/* Amount Section with Tax Breakdown */}\n <div className=\"space-y-2\">\n {showTaxBreakdown ? (\n <>\n <div className=\"flex justify-between text-sm\">\n <span className=\"text-muted-foreground\">Subtotal</span>\n <span>\n {formatCurrency(subtotal || transaction.amount, transaction.currency)}\n </span>\n </div>\n {taxAmount > 0 && (\n <div className=\"flex justify-between text-sm\">\n <span className=\"text-muted-foreground\">\n {taxType || 'Tax'} {taxRate ? `(${(taxRate * 100).toFixed(0)}%)` : ''}\n </span>\n <span>{formatCurrency(taxAmount, transaction.currency)}</span>\n </div>\n )}\n <div className=\"flex justify-between text-sm font-semibold border-t border-border pt-2\">\n <span>Total</span>\n <span className={transaction.type === 'refund' ? 'text-status-error-text' : ''}>\n {transaction.type === 'refund' ? '-' : ''}\n {formatCurrency(total, transaction.currency)}\n </span>\n </div>\n </>\n ) : (\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Amount</p>\n <p\n className={`text-sm font-medium ${transaction.type === 'refund' ? 'text-status-error-text' : ''}`}\n >\n {transaction.type === 'refund' ? '-' : ''}\n {formatCurrency(total || transaction.amount, transaction.currency)}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Status</p>\n <span\n className={`px-2 py-0.5 text-xs font-medium rounded ${getStatusBadgeClasses(\n getTransactionStatusColor(transaction.status)\n )}`}\n >\n {transaction.status}\n </span>\n </div>\n </div>\n )}\n </div>\n\n {/* Status (if tax breakdown shown) */}\n {showTaxBreakdown && (\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Status</p>\n <span\n className={`px-2 py-0.5 text-xs font-medium rounded ${getStatusBadgeClasses(\n getTransactionStatusColor(transaction.status)\n )}`}\n >\n {transaction.status}\n </span>\n </div>\n )}\n\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Date & Time</p>\n <p className=\"text-sm\">{formatDateTime(transaction.createdAt)}</p>\n </div>\n\n {transaction.description && (\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Description</p>\n <p className=\"text-sm\">{transaction.description}</p>\n </div>\n )}\n\n {/* Invoice Information */}\n {invoiceNumber && (\n <div className=\"p-3 bg-muted/50 rounded-lg space-y-2\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Invoice</p>\n <p className=\"text-sm font-mono\">{invoiceNumber}</p>\n </div>\n {invoiceStatus && (\n <span\n className={`px-2 py-0.5 text-xs font-medium rounded ${\n invoiceStatus === 'PAID'\n ? 'bg-status-success-bg-subtle text-status-success-text'\n : 'bg-status-warning-bg-subtle text-status-warning-text'\n }`}\n >\n {invoiceStatus}\n </span>\n )}\n </div>\n {invoiceProvider && (\n <p className=\"text-xs text-muted-foreground\">Provider: {invoiceProvider}</p>\n )}\n {invoiceUrl && onViewInvoice && (\n <button\n onClick={() => onViewInvoice(transaction)}\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <FileText className=\"w-4 h-4\" />\n View Invoice\n </button>\n )}\n </div>\n )}\n\n {/* Fallback invoice button if no invoice number but URL exists */}\n {!invoiceNumber && invoiceUrl && onViewInvoice && (\n <div className=\"p-3 bg-muted/50 rounded-lg\">\n <button\n onClick={() => onViewInvoice(transaction)}\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <FileText className=\"w-4 h-4\" />\n View Invoice {invoiceProvider && `(${invoiceProvider})`}\n </button>\n </div>\n )}\n\n {/* Refund-Specific Information */}\n {isRefund && (creditNoteId || refundReason || purchaseType) && (\n <div className=\"p-3 bg-status-error-bg-subtle/20 border border-border-subtle rounded-lg space-y-3\">\n <div className=\"flex items-center gap-2\">\n <div className=\"w-1.5 h-1.5 rounded-full bg-status-error-bg\" />\n <p className=\"text-sm font-semibold text-status-error-text\">Refund Information</p>\n </div>\n\n {/* Credit Note Section */}\n {creditNoteNumber && (\n <div className=\"space-y-2\">\n <div>\n <p className=\"text-xs text-status-error-text mb-1\">Credit Note</p>\n <p className=\"text-sm font-mono text-status-error-text\">{creditNoteNumber}</p>\n </div>\n {creditNotePdfUrl && (\n <button\n onClick={() => {\n void nativeImpact('light');\n void nativeOpenUrl(creditNotePdfUrl);\n }}\n className=\"flex items-center gap-2 text-sm text-status-error-text hover:underline\"\n >\n <FileText className=\"w-4 h-4\" />\n Download Credit Note PDF\n </button>\n )}\n </div>\n )}\n\n {/* Purchase Type & Detail */}\n {purchaseType && (\n <div>\n <p className=\"text-xs text-status-error-text mb-1\">Purchase Type</p>\n <p className=\"text-sm text-status-error-text\">\n {purchaseType}\n {purchaseDetail && ` - ${purchaseDetail}`}\n </p>\n </div>\n )}\n\n {/* Refund Reason */}\n {refundReason && (\n <div>\n <p className=\"text-xs text-status-error-text mb-1\">Reason</p>\n <p className=\"text-sm text-status-error-text\">{refundReason}</p>\n </div>\n )}\n\n {/* Original Transaction Reference */}\n {originalTransactionId && (\n <div>\n <p className=\"text-xs text-status-error-text mb-1\">Original Transaction</p>\n <p className=\"text-sm font-mono text-status-error-text break-all\">\n {originalTransactionId}\n </p>\n </div>\n )}\n\n {/* Refund Record ID */}\n {refundRecordId && (\n <div>\n <p className=\"text-xs text-status-error-text mb-1\">Refund Record ID</p>\n <p className=\"text-sm font-mono text-status-error-text break-all\">\n {refundRecordId}\n </p>\n </div>\n )}\n </div>\n )}\n\n {transaction.stripePaymentId && (\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Stripe Payment ID</p>\n <p className=\"text-sm font-mono break-all\">{transaction.stripePaymentId}</p>\n </div>\n )}\n\n {transaction.razorpayPaymentId && (\n <div>\n <p className=\"text-xs text-muted-foreground mb-1\">Razorpay Payment ID</p>\n <p className=\"text-sm font-mono break-all\">{transaction.razorpayPaymentId}</p>\n </div>\n )}\n </div>\n\n <div className=\"p-4 border-t border-border\">\n <button\n onClick={onClose}\n className=\"w-full py-2 px-4 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors\"\n >\n Close\n </button>\n </div>\n </div>\n </div>\n );\n};\n\nexport const TransactionsPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const { billingAccountId } = useParams<{ billingAccountId: string }>();\n const permissions = useBillingPermissions();\n const navigateTo = useBillingNavigate();\n const {\n billingAccount,\n transactions,\n pagination,\n isLoading,\n error,\n refetch,\n goToNextPage,\n goToPreviousPage,\n } = useTransactions(billingAccountId);\n const [filterType, setFilterType] = useState<FilterType>('all');\n const [selectedTransaction, setSelectedTransaction] = useState<Transaction | null>(null);\n\n // Get invoice URL from transaction metadata (supports both Zoho and Stripe)\n const getInvoiceUrl = (transaction: Transaction): string | null => {\n const metadata = transaction.metadata as Record<string, unknown> | null;\n // Check for Zoho Books invoice first (INR payments)\n if (metadata?.zohoBooksInvoiceUrl) {\n return metadata.zohoBooksInvoiceUrl as string;\n }\n // Check for Stripe invoice (international payments)\n if (metadata?.invoiceUrl) {\n return metadata.invoiceUrl as string;\n }\n // Check for Stripe PDF (fallback)\n if (metadata?.invoicePdf) {\n return metadata.invoicePdf as string;\n }\n return null;\n };\n\n // Get total amount (with tax) from metadata if available\n const getTotalAmount = (transaction: Transaction): number => {\n const metadata = transaction.metadata as Record<string, unknown> | null;\n // Check for total in metadata (includes tax)\n if (metadata?.total && typeof metadata.total === 'number') {\n return metadata.total;\n }\n // Fallback to transaction amount\n return transaction.amount;\n };\n\n // Get invoice provider name for display\n const getInvoiceProvider = (transaction: Transaction): string | null => {\n const metadata = transaction.metadata as Record<string, unknown> | null;\n if (metadata?.zohoBooksInvoiceUrl) return 'Zoho Books';\n if (metadata?.invoiceUrl || metadata?.invoicePdf) return 'Stripe';\n return null;\n };\n\n const handleViewInvoice = (transaction: Transaction) => {\n const invoiceUrl = getInvoiceUrl(transaction);\n if (invoiceUrl) {\n void nativeImpact('light');\n void nativeOpenUrl(invoiceUrl);\n } else {\n // Fallback to invoices page if no invoice URL\n navigateTo('/invoices');\n }\n };\n\n if (!permissions.canViewPayments) {\n return (\n <AccessDenied\n message={tr(\n 'billing.transactions.noPermission',\n \"You don't have permission to view transaction history.\"\n )}\n />\n );\n }\n\n // Show error if no billing account ID provided\n if (!billingAccountId) {\n return (\n <div className=\"p-6\">\n <EmptyState\n icon={\n <svg\n className=\"w-6 h-6 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n }\n title={tr('billing.transactions.noAccountSelected', 'No billing account selected')}\n description={tr(\n 'billing.transactions.noAccountSelectedDesc',\n 'Please select a billing account from the overview page to view transactions.'\n )}\n />\n </div>\n );\n }\n\n // Show server error if backend is down\n if (error && isServerError(error)) {\n return (\n <div className=\"p-6\">\n <ServerError\n title={tr('billing.transactions.serverUnavailable', 'Server Unavailable')}\n message={tr(\n 'billing.transactions.serverUnavailableMessage',\n 'Unable to load transactions. The server might be down or experiencing issues.'\n )}\n onRetry={() => refetch()}\n showRetry\n />\n </div>\n );\n }\n const filteredTransactions =\n filterType === 'all' ? transactions : transactions.filter((t) => t.type === filterType);\n\n if (isLoading) {\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"h-8 w-48 bg-muted animate-pulse rounded\" />\n <div className=\"space-y-2\">\n {[1, 2, 3, 4, 5].map((i) => (\n <div key={i} className=\"h-16 bg-muted animate-pulse rounded\" />\n ))}\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6\">\n {/* Back Button */}\n <button\n onClick={() => navigateTo('/overview')}\n className=\"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors\"\n >\n <ArrowLeft className=\"w-4 h-4\" />\n Back to Overview\n </button>\n\n <PageHeader\n title={tr('billing.transactions.title', 'Transaction History')}\n description={\n billingAccount\n ? `Transactions for ${billingAccount.name}`\n : 'View all your billing transactions'\n }\n />\n\n {/* Billing Account Info Card */}\n {billingAccount && (\n <div className=\"border border-border rounded-lg p-4 bg-card\">\n <div className=\"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4\">\n {/* Account Name & Status */}\n <div className=\"flex items-start gap-2\">\n <CreditCard className=\"w-4 h-4 text-muted-foreground mt-0.5\" />\n <div>\n <p className=\"text-xs text-muted-foreground mb-0.5\">Account</p>\n <p className=\"text-sm font-medium\">{billingAccount.name}</p>\n {billingAccount.isActive ? (\n <span className=\"inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 text-xs font-medium rounded bg-status-success-bg-subtle text-status-success-text\">\n <CheckCircle className=\"w-3 h-3\" />\n Active\n </span>\n ) : (\n <span className=\"inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 text-xs font-medium rounded bg-status-error-bg-subtle text-status-error-text\">\n <XCircle className=\"w-3 h-3\" />\n Inactive\n </span>\n )}\n </div>\n </div>\n\n {/* Email */}\n <div className=\"flex items-start gap-2\">\n <Mail className=\"w-4 h-4 text-muted-foreground mt-0.5\" />\n <div>\n <p className=\"text-xs text-muted-foreground mb-0.5\">Email</p>\n <p className=\"text-sm font-medium break-all\">\n {billingAccount.billingEmail || billingAccount.email}\n </p>\n </div>\n </div>\n\n {/* Credit Balance */}\n <div className=\"flex items-start gap-2\">\n <Wallet className=\"w-4 h-4 text-muted-foreground mt-0.5\" />\n <div>\n <p className=\"text-xs text-muted-foreground mb-0.5\">Credits Balance</p>\n <p className=\"text-sm font-semibold text-foreground\">\n {(billingAccount.creditAmount || 0).toLocaleString()} Credits\n </p>\n </div>\n </div>\n\n {/* Tax ID */}\n <div className=\"flex items-start gap-2\">\n <FileText className=\"w-4 h-4 text-muted-foreground mt-0.5\" />\n <div>\n <p className=\"text-xs text-muted-foreground mb-0.5\">Tax ID</p>\n <p className=\"text-sm font-medium\">{billingAccount.taxId || '-'}</p>\n </div>\n </div>\n\n {/* Account Created */}\n <div className=\"flex items-start gap-2\">\n <Calendar className=\"w-4 h-4 text-muted-foreground mt-0.5\" />\n <div>\n <p className=\"text-xs text-muted-foreground mb-0.5\">Member Since</p>\n <p className=\"text-sm font-medium\">\n {billingAccount.createdAt ? formatDateTime(billingAccount.createdAt) : '-'}\n </p>\n </div>\n </div>\n </div>\n </div>\n )}\n\n {/* Filters */}\n <div className=\"flex items-center gap-4\">\n <div className=\"inline-flex rounded-lg border border-border p-1 bg-muted/50\">\n {(['all', 'payment', 'refund', 'adjustment'] as FilterType[]).map((type) => (\n <button\n key={type}\n onClick={() => setFilterType(type)}\n className={`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${\n filterType === type\n ? 'bg-background text-foreground shadow-sm'\n : 'text-muted-foreground hover:text-foreground'\n }`}\n >\n {type === 'all' ? 'All' : TYPE_LABELS[type as TransactionType]}\n </button>\n ))}\n </div>\n </div>\n\n {/* Transactions List */}\n {filteredTransactions.length === 0 ? (\n <EmptyState\n icon={\n <svg\n className=\"w-6 h-6 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\n />\n </svg>\n }\n title={tr('billing.transactions.noTransactionsFound', 'No transactions found')}\n description={\n filterType !== 'all'\n ? tr(\n 'billing.transactions.noTransactionsFiltered',\n 'No transactions match your filter.'\n )\n : tr(\n 'billing.transactions.noTransactionsYet',\n 'Your transaction history will appear here.'\n )\n }\n />\n ) : (\n <div className=\"border border-border rounded-lg overflow-visible\">\n <table className=\"w-full\">\n <thead className=\"bg-muted/50\">\n <tr>\n <th className=\"text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap\">\n Date\n </th>\n <th className=\"text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap\">\n Type\n </th>\n <th className=\"text-left text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap\">\n Description\n </th>\n <th className=\"text-right text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap\">\n Amount\n </th>\n <th className=\"text-center text-sm font-medium text-muted-foreground px-3 py-2 whitespace-nowrap\">\n Status\n </th>\n <th className=\"px-2 py-2 w-10\"></th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border\">\n {filteredTransactions.map((transaction) => (\n <tr key={transaction.id} className=\"hover:bg-muted/30 transition-colors\">\n <td className=\"px-3 py-2 text-sm text-foreground whitespace-nowrap\">\n {formatDateTime(transaction.createdAt)}\n </td>\n <td className=\"px-3 py-2 text-sm text-foreground capitalize whitespace-nowrap\">\n {getTypeLabel(transaction.type)}\n </td>\n <td className=\"px-3 py-2 text-sm text-muted-foreground\">\n {transaction.description ?? '-'}\n </td>\n <td\n className={`px-3 py-2 text-sm text-right font-medium whitespace-nowrap ${\n transaction.type === 'refund' ? 'text-status-error-text' : 'text-foreground'\n }`}\n >\n {transaction.type === 'refund' ? '-' : ''}\n {formatCurrency(getTotalAmount(transaction), transaction.currency)}\n </td>\n <td className=\"px-3 py-2 text-center whitespace-nowrap\">\n <span\n className={`px-1.5 py-0.5 text-xs font-medium rounded ${getStatusBadgeClasses(\n getTransactionStatusColor(transaction.status)\n )}`}\n >\n {transaction.status}\n </span>\n </td>\n <td className=\"px-2 py-2 text-center\">\n <TransactionActionsDropdown\n transaction={transaction}\n onViewDetails={() => setSelectedTransaction(transaction)}\n onViewInvoice={() => handleViewInvoice(transaction)}\n hasInvoiceUrl={!!getInvoiceUrl(transaction)}\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n\n {/* Pagination Controls */}\n {pagination.totalCount > 0 && (\n <div className=\"flex items-center justify-between border-t border-border pt-4\">\n <p className=\"text-sm text-muted-foreground\">\n Showing {pagination.page * pagination.pageSize + 1} to{' '}\n {Math.min((pagination.page + 1) * pagination.pageSize, pagination.totalCount)} of{' '}\n {pagination.totalCount} transactions\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n onClick={goToPreviousPage}\n disabled={!pagination.hasPrevious}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n <ChevronLeft className=\"w-4 h-4\" />\n Previous\n </button>\n <span className=\"text-sm text-muted-foreground px-2\">\n Page {pagination.page + 1} of {Math.ceil(pagination.totalCount / pagination.pageSize)}\n </span>\n <button\n onClick={goToNextPage}\n disabled={!pagination.hasMore}\n className=\"inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-muted/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n Next\n <ChevronRight className=\"w-4 h-4\" />\n </button>\n </div>\n </div>\n )}\n\n {/* Transaction Details Modal */}\n <TransactionDetailsModal\n transaction={selectedTransaction}\n onClose={() => setSelectedTransaction(null)}\n onViewInvoice={handleViewInvoice}\n invoiceUrl={selectedTransaction ? getInvoiceUrl(selectedTransaction) : null}\n invoiceProvider={selectedTransaction ? getInvoiceProvider(selectedTransaction) : null}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,IAA+C;CACnD,SAAS;CACT,QAAQ;CACR,YAAY;CACb,EAGK,KAAgB,MAEb,EADY,EAAK,aAAa,KACH,GAW9B,KAAmE,EACvE,gBACA,kBACA,kBACA,uBACI;CACJ,IAAM,CAAC,GAAQ,KAAa,EAAS,GAAM,EACrC,IAAc,EAAuB,KAAK;AAYhD,QAVA,QAAgB;EACd,IAAM,KAAsB,MAAsB;AAChD,GAAI,EAAY,WAAW,CAAC,EAAY,QAAQ,SAAS,EAAM,OAAe,IAC5E,EAAU,GAAM;;AAIpB,SADA,SAAS,iBAAiB,aAAa,EAAmB,QAC7C,SAAS,oBAAoB,aAAa,EAAmB;IACzE,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
|
3
|
+
* Re-exports all page components
|
|
4
|
+
*/
|
|
5
|
+
export { InvoicesListPage } from './InvoicesListPage';
|
|
6
|
+
export { InvoiceDetailPage } from './InvoiceDetailPage';
|
|
7
|
+
export { TransactionsPage } from './TransactionsPage';
|
|
8
|
+
export { PaymentMethodsPage } from './PaymentMethodsPage';
|
|
9
|
+
export { RefundsPage } from './RefundsPage';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/billing/pages/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SavedPaymentMethod } from '../types';
|
|
3
|
+
|
|
4
|
+
interface AutoPayToggleProps {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
onToggle: (enabled: boolean) => void;
|
|
7
|
+
selectedPaymentMethodId: string | null;
|
|
8
|
+
savedPaymentMethods: SavedPaymentMethod[];
|
|
9
|
+
onSelectPaymentMethod: (paymentMethodId: string) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const AutoPayToggle: FC<AutoPayToggleProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=AutoPayToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPayToggle.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/AutoPayToggle.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAC1C,qBAAqB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAyIhD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CheckoutBillingAccount } from '../types';
|
|
3
|
+
|
|
4
|
+
interface BillingAccountSelectorProps {
|
|
5
|
+
accounts: CheckoutBillingAccount[];
|
|
6
|
+
selectedAccountId: string | null;
|
|
7
|
+
onSelect: (account: CheckoutBillingAccount) => void;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
disabledMessage?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const BillingAccountSelector: FC<BillingAccountSelectorProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=BillingAccountSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingAccountSelector.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/BillingAccountSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIvD,UAAU,2BAA2B;IACnC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA4LlE,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { formatCurrency as e } from "../../../shared/utils/format.js";
|
|
2
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
+
import { Building2 as i, Check as a, ChevronDown as o, CreditCard as s, Lock as c } from "lucide-react";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
6
|
+
//#region src/billing/modules/checkout/components/BillingAccountSelector.tsx
|
|
7
|
+
var f = ({ accounts: f, selectedAccountId: p, onSelect: m, isLoading: h = !1, disabled: g = !1, disabledMessage: _ }) => {
|
|
8
|
+
let { t: v } = d(), y = (e, t) => {
|
|
9
|
+
let n = v(e);
|
|
10
|
+
return n === e ? t : n;
|
|
11
|
+
}, [b, x] = r(!1), S = n(null);
|
|
12
|
+
t(() => {
|
|
13
|
+
let e = (e) => {
|
|
14
|
+
S.current && !S.current.contains(e.target) && x(!1);
|
|
15
|
+
};
|
|
16
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
17
|
+
}, []), t(() => {
|
|
18
|
+
let e = (e) => {
|
|
19
|
+
e.key === "Escape" && x(!1);
|
|
20
|
+
};
|
|
21
|
+
if (b) return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
22
|
+
}, [b]);
|
|
23
|
+
let C = f.find((e) => e.id === p);
|
|
24
|
+
return h ? /* @__PURE__ */ u("div", {
|
|
25
|
+
className: "space-y-2",
|
|
26
|
+
children: [/* @__PURE__ */ l("div", { className: "h-4 w-28 bg-muted animate-pulse rounded" }), /* @__PURE__ */ l("div", { className: "h-12 bg-muted animate-pulse rounded-lg" })]
|
|
27
|
+
}) : f.length === 0 ? /* @__PURE__ */ u("div", {
|
|
28
|
+
className: "rounded-lg border border-dashed border-border p-4 text-center",
|
|
29
|
+
children: [/* @__PURE__ */ l(i, { className: "mx-auto h-6 w-6 text-muted-foreground" }), /* @__PURE__ */ l("p", {
|
|
30
|
+
className: "mt-2 text-sm text-muted-foreground",
|
|
31
|
+
children: "No billing accounts found"
|
|
32
|
+
})]
|
|
33
|
+
}) : /* @__PURE__ */ u("div", {
|
|
34
|
+
className: "space-y-2 relative",
|
|
35
|
+
ref: S,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ u("div", {
|
|
38
|
+
className: "flex items-center justify-between",
|
|
39
|
+
children: [/* @__PURE__ */ l("label", {
|
|
40
|
+
className: "text-sm font-medium text-foreground",
|
|
41
|
+
children: y("billing.checkout.billingAccount", "Billing Account")
|
|
42
|
+
}), g && /* @__PURE__ */ u("span", {
|
|
43
|
+
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
44
|
+
children: [/* @__PURE__ */ l(c, { className: "h-3 w-3" }), "Locked"]
|
|
45
|
+
})]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ u("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: () => !g && x(!b),
|
|
50
|
+
disabled: g,
|
|
51
|
+
className: `
|
|
52
|
+
w-full flex items-center justify-between gap-3 p-3 rounded-lg border
|
|
53
|
+
transition-colors text-left
|
|
54
|
+
${g ? "border-border bg-muted/30 cursor-not-allowed opacity-80" : b ? "border-primary ring-1 ring-primary" : "border-border hover:border-primary/50"}
|
|
55
|
+
`,
|
|
56
|
+
children: [C ? /* @__PURE__ */ u("div", {
|
|
57
|
+
className: "flex items-center gap-3 min-w-0 flex-1",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ l("div", {
|
|
60
|
+
className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-full ${g ? "bg-muted text-muted-foreground" : "bg-primary/10 text-primary"}`,
|
|
61
|
+
children: /* @__PURE__ */ l(i, { className: "h-4 w-4" })
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ u("div", {
|
|
64
|
+
className: "min-w-0 flex-1",
|
|
65
|
+
children: [/* @__PURE__ */ u("div", {
|
|
66
|
+
className: "flex items-center gap-2",
|
|
67
|
+
children: [/* @__PURE__ */ l("span", {
|
|
68
|
+
className: "font-medium text-foreground truncate",
|
|
69
|
+
children: C.name
|
|
70
|
+
}), !C.isActive && /* @__PURE__ */ l("span", {
|
|
71
|
+
className: "text-xs px-1.5 py-0.5 rounded bg-destructive/10 text-destructive shrink-0",
|
|
72
|
+
children: "Inactive"
|
|
73
|
+
})]
|
|
74
|
+
}), /* @__PURE__ */ l("p", {
|
|
75
|
+
className: "text-sm text-muted-foreground truncate",
|
|
76
|
+
children: C.email
|
|
77
|
+
})]
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ l("div", {
|
|
80
|
+
className: "shrink-0 text-right",
|
|
81
|
+
children: /* @__PURE__ */ u("div", {
|
|
82
|
+
className: "flex items-center gap-1 text-sm font-medium text-foreground",
|
|
83
|
+
children: [/* @__PURE__ */ l(s, { className: "h-3.5 w-3.5 text-muted-foreground" }), e(C.creditAmount, "CREDITS")]
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}) : /* @__PURE__ */ l("span", {
|
|
88
|
+
className: "text-muted-foreground",
|
|
89
|
+
children: "Select billing account"
|
|
90
|
+
}), g ? /* @__PURE__ */ l(c, { className: "h-4 w-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ l(o, { className: `h-4 w-4 shrink-0 text-muted-foreground transition-transform ${b ? "rotate-180" : ""}` })]
|
|
91
|
+
}),
|
|
92
|
+
g && _ && /* @__PURE__ */ l("p", {
|
|
93
|
+
className: "text-xs text-muted-foreground",
|
|
94
|
+
children: _
|
|
95
|
+
}),
|
|
96
|
+
b && !g && /* @__PURE__ */ l("div", {
|
|
97
|
+
className: "absolute left-0 right-0 z-50 mt-1 max-h-64 overflow-auto rounded-lg border border-border bg-popover shadow-lg",
|
|
98
|
+
children: f.map((t) => {
|
|
99
|
+
let n = t.id === p;
|
|
100
|
+
return /* @__PURE__ */ u("button", {
|
|
101
|
+
type: "button",
|
|
102
|
+
onClick: () => {
|
|
103
|
+
m(t), x(!1);
|
|
104
|
+
},
|
|
105
|
+
className: `
|
|
106
|
+
w-full flex items-center gap-3 p-3 text-left
|
|
107
|
+
transition-colors
|
|
108
|
+
${n ? "bg-primary/5" : "hover:bg-muted/50"}
|
|
109
|
+
`,
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ l("div", {
|
|
112
|
+
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",
|
|
113
|
+
children: /* @__PURE__ */ l(i, { className: "h-4 w-4" })
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ u("div", {
|
|
116
|
+
className: "min-w-0 flex-1",
|
|
117
|
+
children: [/* @__PURE__ */ u("div", {
|
|
118
|
+
className: "flex items-center gap-2",
|
|
119
|
+
children: [/* @__PURE__ */ l("span", {
|
|
120
|
+
className: "font-medium text-foreground truncate",
|
|
121
|
+
children: t.name
|
|
122
|
+
}), !t.isActive && /* @__PURE__ */ l("span", {
|
|
123
|
+
className: "text-xs px-1.5 py-0.5 rounded bg-destructive/10 text-destructive shrink-0",
|
|
124
|
+
children: "Inactive"
|
|
125
|
+
})]
|
|
126
|
+
}), /* @__PURE__ */ l("p", {
|
|
127
|
+
className: "text-sm text-muted-foreground truncate",
|
|
128
|
+
children: t.email
|
|
129
|
+
})]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ u("div", {
|
|
132
|
+
className: "shrink-0 flex items-center gap-2",
|
|
133
|
+
children: [/* @__PURE__ */ l("div", {
|
|
134
|
+
className: "text-right",
|
|
135
|
+
children: /* @__PURE__ */ u("div", {
|
|
136
|
+
className: "flex items-center gap-1 text-sm font-medium text-foreground",
|
|
137
|
+
children: [/* @__PURE__ */ l(s, { className: "h-3.5 w-3.5 text-muted-foreground" }), e(t.creditAmount, "CREDITS")]
|
|
138
|
+
})
|
|
139
|
+
}), n && /* @__PURE__ */ l(a, { className: "h-4 w-4 text-primary" })]
|
|
140
|
+
})
|
|
141
|
+
]
|
|
142
|
+
}, t.id);
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
//#endregion
|
|
149
|
+
export { f as BillingAccountSelector };
|
|
150
|
+
|
|
151
|
+
//# sourceMappingURL=BillingAccountSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BillingAccountSelector.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/BillingAccountSelector.tsx"],"sourcesContent":["/**\n * Billing Account Selector Component\n * Dropdown selector for choosing billing account in checkout\n */\n\nimport { type FC, useState, useRef, useEffect } from 'react';\nimport { Building2, CreditCard, ChevronDown, Check, Lock } from 'lucide-react';\nimport type { CheckoutBillingAccount } from '../types';\nimport { formatCurrency } from '../../../shared/utils/format';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ninterface BillingAccountSelectorProps {\n accounts: CheckoutBillingAccount[];\n selectedAccountId: string | null;\n onSelect: (account: CheckoutBillingAccount) => void;\n isLoading?: boolean;\n disabled?: boolean;\n disabledMessage?: string;\n}\n\nexport const BillingAccountSelector: FC<BillingAccountSelectorProps> = ({\n accounts,\n selectedAccountId,\n onSelect,\n isLoading = false,\n disabled = false,\n disabledMessage,\n}) => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const [isOpen, setIsOpen] = useState(false);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n // Close dropdown when clicking outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n // Close on escape key\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n if (isOpen) {\n document.addEventListener('keydown', handleEscape);\n return () => document.removeEventListener('keydown', handleEscape);\n }\n }, [isOpen]);\n\n const selectedAccount = accounts.find((a) => a.id === selectedAccountId);\n\n if (isLoading) {\n return (\n <div className=\"space-y-2\">\n <div className=\"h-4 w-28 bg-muted animate-pulse rounded\" />\n <div className=\"h-12 bg-muted animate-pulse rounded-lg\" />\n </div>\n );\n }\n\n if (accounts.length === 0) {\n return (\n <div className=\"rounded-lg border border-dashed border-border p-4 text-center\">\n <Building2 className=\"mx-auto h-6 w-6 text-muted-foreground\" />\n <p className=\"mt-2 text-sm text-muted-foreground\">No billing accounts found</p>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-2 relative\" ref={dropdownRef}>\n <div className=\"flex items-center justify-between\">\n <label className=\"text-sm font-medium text-foreground\">\n {tr('billing.checkout.billingAccount', 'Billing Account')}\n </label>\n {disabled && (\n <span className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Lock className=\"h-3 w-3\" />\n Locked\n </span>\n )}\n </div>\n\n {/* Dropdown trigger */}\n <button\n type=\"button\"\n onClick={() => !disabled && setIsOpen(!isOpen)}\n disabled={disabled}\n className={`\n w-full flex items-center justify-between gap-3 p-3 rounded-lg border\n transition-colors text-left\n ${\n disabled\n ? 'border-border bg-muted/30 cursor-not-allowed opacity-80'\n : isOpen\n ? 'border-primary ring-1 ring-primary'\n : 'border-border hover:border-primary/50'\n }\n `}\n >\n {selectedAccount ? (\n <div className=\"flex items-center gap-3 min-w-0 flex-1\">\n <div\n className={`flex h-8 w-8 shrink-0 items-center justify-center rounded-full ${\n disabled ? 'bg-muted text-muted-foreground' : 'bg-primary/10 text-primary'\n }`}\n >\n <Building2 className=\"h-4 w-4\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium text-foreground truncate\">{selectedAccount.name}</span>\n {!selectedAccount.isActive && (\n <span className=\"text-xs px-1.5 py-0.5 rounded bg-destructive/10 text-destructive shrink-0\">\n Inactive\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground truncate\">{selectedAccount.email}</p>\n </div>\n <div className=\"shrink-0 text-right\">\n <div className=\"flex items-center gap-1 text-sm font-medium text-foreground\">\n <CreditCard className=\"h-3.5 w-3.5 text-muted-foreground\" />\n {formatCurrency(selectedAccount.creditAmount, 'CREDITS')}\n </div>\n </div>\n </div>\n ) : (\n <span className=\"text-muted-foreground\">Select billing account</span>\n )}\n {disabled ? (\n <Lock className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n ) : (\n <ChevronDown\n className={`h-4 w-4 shrink-0 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n )}\n </button>\n\n {/* Disabled message */}\n {disabled && disabledMessage && (\n <p className=\"text-xs text-muted-foreground\">{disabledMessage}</p>\n )}\n\n {/* Dropdown menu */}\n {isOpen && !disabled && (\n <div className=\"absolute left-0 right-0 z-50 mt-1 max-h-64 overflow-auto rounded-lg border border-border bg-popover shadow-lg\">\n {accounts.map((account) => {\n const isSelected = account.id === selectedAccountId;\n return (\n <button\n key={account.id}\n type=\"button\"\n onClick={() => {\n onSelect(account);\n setIsOpen(false);\n }}\n className={`\n w-full flex items-center gap-3 p-3 text-left\n transition-colors\n ${isSelected ? 'bg-primary/5' : 'hover:bg-muted/50'}\n `}\n >\n <div className=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary\">\n <Building2 className=\"h-4 w-4\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium text-foreground truncate\">{account.name}</span>\n {!account.isActive && (\n <span className=\"text-xs px-1.5 py-0.5 rounded bg-destructive/10 text-destructive shrink-0\">\n Inactive\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground truncate\">{account.email}</p>\n </div>\n <div className=\"shrink-0 flex items-center gap-2\">\n <div className=\"text-right\">\n <div className=\"flex items-center gap-1 text-sm font-medium text-foreground\">\n <CreditCard className=\"h-3.5 w-3.5 text-muted-foreground\" />\n {formatCurrency(account.creditAmount, 'CREDITS')}\n </div>\n </div>\n {isSelected && <Check className=\"h-4 w-4 text-primary\" />}\n </div>\n </button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAoBA,IAAa,KAA2D,EACtE,aACA,sBACA,aACA,eAAY,IACZ,cAAW,IACX,yBACI;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,EAAI;AACzB,SAAO,MAAe,IAAM,IAAW;IAEnC,CAAC,GAAQ,KAAa,EAAS,GAAM,EACrC,IAAc,EAAuB,KAAK;AAehD,CAZA,QAAgB;EACd,IAAM,KAAsB,MAAsB;AAChD,GAAI,EAAY,WAAW,CAAC,EAAY,QAAQ,SAAS,EAAM,OAAe,IAC5E,EAAU,GAAM;;AAKpB,SADA,SAAS,iBAAiB,aAAa,EAAmB,QAC7C,SAAS,oBAAoB,aAAa,EAAmB;IACzE,EAAE,CAAC,EAGN,QAAgB;EACd,IAAM,KAAgB,MAAyB;AAC7C,GAAI,EAAM,QAAQ,YAChB,EAAU,GAAM;;AAIpB,MAAI,EAEF,QADA,SAAS,iBAAiB,WAAW,EAAa,QACrC,SAAS,oBAAoB,WAAW,EAAa;IAEnE,CAAC,EAAO,CAAC;CAEZ,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nCF,EAAQ,GAmCN;MAEX;IACE,CAAA;GAEJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SavedPaymentMethod } from '../types';
|
|
3
|
+
|
|
4
|
+
interface CompactAutoPayToggleProps {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
onToggle: (enabled: boolean) => void;
|
|
7
|
+
selectedPaymentMethodId: string | null;
|
|
8
|
+
savedPaymentMethods: SavedPaymentMethod[];
|
|
9
|
+
onSelectPaymentMethod: (paymentMethodId: string) => void;
|
|
10
|
+
onSelectForCurrentPayment?: (paymentMethodId: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const CompactAutoPayToggle: FC<CompactAutoPayToggleProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=CompactAutoPayToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompactAutoPayToggle.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/CompactAutoPayToggle.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAoC,MAAM,OAAO,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAC1C,qBAAqB,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzD,yBAAyB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D;AAQD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAwM9D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CreditsAmountInputProps {
|
|
4
|
+
value: number;
|
|
5
|
+
onChange: (value: number) => void;
|
|
6
|
+
minAmount?: number;
|
|
7
|
+
maxAmount?: number;
|
|
8
|
+
costPerCredit?: number;
|
|
9
|
+
currency?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const CreditsAmountInput: FC<CreditsAmountInputProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=CreditsAmountInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditsAmountInput.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/CreditsAmountInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAyB,MAAM,OAAO,CAAC;AAKvD,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAID,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAwJ1D,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { formatCurrency as e } from "../../../shared/utils/format.js";
|
|
2
|
+
import { useCallback as t, useState as n } from "react";
|
|
3
|
+
import { Coins as r, Minus as i, Plus as a } from "lucide-react";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
6
|
+
//#region src/billing/modules/checkout/components/CreditsAmountInput.tsx
|
|
7
|
+
var l = [
|
|
8
|
+
100,
|
|
9
|
+
500,
|
|
10
|
+
1e3,
|
|
11
|
+
5e3
|
|
12
|
+
], u = ({ value: u, onChange: d, minAmount: f = 1, maxAmount: p = 1e5, costPerCredit: m = .01, currency: h = "USD", disabled: g = !1 }) => {
|
|
13
|
+
let { t: _ } = c(), v = (e, t) => {
|
|
14
|
+
let n = _(e);
|
|
15
|
+
return n === e ? t : n;
|
|
16
|
+
}, [y, b] = n(u.toString()), x = t((e) => {
|
|
17
|
+
let t = e.target.value.replace(/[^0-9]/g, "");
|
|
18
|
+
b(t);
|
|
19
|
+
let n = parseInt(t, 10);
|
|
20
|
+
!isNaN(n) && n >= f && n <= p && d(n);
|
|
21
|
+
}, [
|
|
22
|
+
d,
|
|
23
|
+
f,
|
|
24
|
+
p
|
|
25
|
+
]), S = t(() => {
|
|
26
|
+
let e = parseInt(y, 10);
|
|
27
|
+
isNaN(e) || e < f ? e = f : e > p && (e = p), b(e.toString()), d(e);
|
|
28
|
+
}, [
|
|
29
|
+
y,
|
|
30
|
+
d,
|
|
31
|
+
f,
|
|
32
|
+
p
|
|
33
|
+
]), C = t((e) => {
|
|
34
|
+
let t = Math.min(u + e, p);
|
|
35
|
+
b(t.toString()), d(t);
|
|
36
|
+
}, [
|
|
37
|
+
u,
|
|
38
|
+
d,
|
|
39
|
+
p
|
|
40
|
+
]), w = t((e) => {
|
|
41
|
+
let t = Math.max(u - e, f);
|
|
42
|
+
b(t.toString()), d(t);
|
|
43
|
+
}, [
|
|
44
|
+
u,
|
|
45
|
+
d,
|
|
46
|
+
f
|
|
47
|
+
]), T = t((e) => {
|
|
48
|
+
b(e.toString()), d(e);
|
|
49
|
+
}, [d]), E = u * m;
|
|
50
|
+
return /* @__PURE__ */ s("div", {
|
|
51
|
+
className: "space-y-3",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ s("div", {
|
|
54
|
+
className: "flex items-center justify-between",
|
|
55
|
+
children: [/* @__PURE__ */ s("div", {
|
|
56
|
+
className: "flex items-center gap-2",
|
|
57
|
+
children: [/* @__PURE__ */ o(r, { className: "h-4 w-4 text-status-warning-text" }), /* @__PURE__ */ o("span", {
|
|
58
|
+
className: "font-medium text-foreground",
|
|
59
|
+
children: v("billing.checkout.creditAmount", "Credit Amount")
|
|
60
|
+
})]
|
|
61
|
+
}), /* @__PURE__ */ s("span", {
|
|
62
|
+
className: "text-sm text-muted-foreground",
|
|
63
|
+
children: [e(m, h), "/credit"]
|
|
64
|
+
})]
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ s("div", {
|
|
67
|
+
className: "flex items-center gap-2",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ o("button", {
|
|
70
|
+
type: "button",
|
|
71
|
+
onClick: () => w(100),
|
|
72
|
+
disabled: g || u <= f,
|
|
73
|
+
className: "p-2 rounded-md border border-border hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",
|
|
74
|
+
"aria-label": "Decrease by 100",
|
|
75
|
+
children: /* @__PURE__ */ o(i, { className: "h-4 w-4" })
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ o("div", {
|
|
78
|
+
className: "relative flex-1",
|
|
79
|
+
children: /* @__PURE__ */ o("input", {
|
|
80
|
+
type: "text",
|
|
81
|
+
inputMode: "numeric",
|
|
82
|
+
"aria-label": v("billing.checkout.creditAmountInput", "Credit amount"),
|
|
83
|
+
value: y,
|
|
84
|
+
onChange: x,
|
|
85
|
+
onBlur: S,
|
|
86
|
+
disabled: g,
|
|
87
|
+
className: "w-full px-4 py-2 text-center text-lg font-semibold\n rounded-md border border-border bg-background text-foreground\n focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\n disabled:opacity-50 disabled:cursor-not-allowed"
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ o("button", {
|
|
91
|
+
type: "button",
|
|
92
|
+
onClick: () => C(100),
|
|
93
|
+
disabled: g || u >= p,
|
|
94
|
+
className: "p-2 rounded-md border border-border hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",
|
|
95
|
+
"aria-label": "Increase by 100",
|
|
96
|
+
children: /* @__PURE__ */ o(a, { className: "h-4 w-4" })
|
|
97
|
+
})
|
|
98
|
+
]
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ o("div", {
|
|
101
|
+
className: "flex gap-2",
|
|
102
|
+
children: l.map((e) => /* @__PURE__ */ o("button", {
|
|
103
|
+
type: "button",
|
|
104
|
+
onClick: () => T(e),
|
|
105
|
+
disabled: g,
|
|
106
|
+
className: `
|
|
107
|
+
flex-1 px-2 py-1.5 rounded-md border text-sm font-medium transition-colors
|
|
108
|
+
${u === e ? "border-primary bg-primary/10 text-primary" : "border-border hover:border-primary/50 hover:bg-muted text-foreground"}
|
|
109
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
110
|
+
`,
|
|
111
|
+
children: e.toLocaleString()
|
|
112
|
+
}, e))
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ s("div", {
|
|
115
|
+
className: "flex items-center justify-between p-3 rounded-md bg-status-warning-bg-subtle border border-border-subtle",
|
|
116
|
+
children: [/* @__PURE__ */ s("span", {
|
|
117
|
+
className: "text-sm text-status-warning-text",
|
|
118
|
+
children: [u.toLocaleString(), " credits"]
|
|
119
|
+
}), /* @__PURE__ */ o("span", {
|
|
120
|
+
className: "font-semibold text-foreground",
|
|
121
|
+
children: e(E, h)
|
|
122
|
+
})]
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { u as CreditsAmountInput };
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=CreditsAmountInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditsAmountInput.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/CreditsAmountInput.tsx"],"sourcesContent":["/**\n * Credits Amount Input Component\n * Compact input for specifying how many credits to purchase\n */\n\nimport { type FC, useState, useCallback } from 'react';\nimport { Coins, Minus, Plus } from 'lucide-react';\nimport { formatCurrency } from '../../../shared/utils/format';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ninterface CreditsAmountInputProps {\n value: number;\n onChange: (value: number) => void;\n minAmount?: number;\n maxAmount?: number;\n costPerCredit?: number;\n currency?: string;\n disabled?: boolean;\n}\n\nconst QUICK_AMOUNTS = [100, 500, 1000, 5000];\n\nexport const CreditsAmountInput: FC<CreditsAmountInputProps> = ({\n value,\n onChange,\n minAmount = 1,\n maxAmount = 100000,\n costPerCredit = 0.01,\n currency = 'USD',\n disabled = false,\n}) => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const [inputValue, setInputValue] = useState(value.toString());\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const raw = e.target.value.replace(/[^0-9]/g, '');\n setInputValue(raw);\n\n const parsed = parseInt(raw, 10);\n if (!isNaN(parsed) && parsed >= minAmount && parsed <= maxAmount) {\n onChange(parsed);\n }\n },\n [onChange, minAmount, maxAmount]\n );\n\n const handleBlur = useCallback(() => {\n let parsed = parseInt(inputValue, 10);\n if (isNaN(parsed) || parsed < minAmount) {\n parsed = minAmount;\n } else if (parsed > maxAmount) {\n parsed = maxAmount;\n }\n setInputValue(parsed.toString());\n onChange(parsed);\n }, [inputValue, onChange, minAmount, maxAmount]);\n\n const handleIncrement = useCallback(\n (amount: number) => {\n const newValue = Math.min(value + amount, maxAmount);\n setInputValue(newValue.toString());\n onChange(newValue);\n },\n [value, onChange, maxAmount]\n );\n\n const handleDecrement = useCallback(\n (amount: number) => {\n const newValue = Math.max(value - amount, minAmount);\n setInputValue(newValue.toString());\n onChange(newValue);\n },\n [value, onChange, minAmount]\n );\n\n const handleQuickAmount = useCallback(\n (amount: number) => {\n setInputValue(amount.toString());\n onChange(amount);\n },\n [onChange]\n );\n\n const totalCost = value * costPerCredit;\n\n return (\n <div className=\"space-y-3\">\n {/* Header - compact */}\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <Coins className=\"h-4 w-4 text-status-warning-text\" />\n <span className=\"font-medium text-foreground\">\n {tr('billing.checkout.creditAmount', 'Credit Amount')}\n </span>\n </div>\n <span className=\"text-sm text-muted-foreground\">\n {formatCurrency(costPerCredit, currency)}/credit\n </span>\n </div>\n\n {/* Input row - compact */}\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => handleDecrement(100)}\n disabled={disabled || value <= minAmount}\n className=\"p-2 rounded-md border border-border hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label=\"Decrease by 100\"\n >\n <Minus className=\"h-4 w-4\" />\n </button>\n\n <div className=\"relative flex-1\">\n <input\n type=\"text\"\n inputMode=\"numeric\"\n aria-label={tr('billing.checkout.creditAmountInput', 'Credit amount')}\n value={inputValue}\n onChange={handleInputChange}\n onBlur={handleBlur}\n disabled={disabled}\n className=\"w-full px-4 py-2 text-center text-lg font-semibold\n rounded-md border border-border bg-background text-foreground\n focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\n disabled:opacity-50 disabled:cursor-not-allowed\"\n />\n </div>\n\n <button\n type=\"button\"\n onClick={() => handleIncrement(100)}\n disabled={disabled || value >= maxAmount}\n className=\"p-2 rounded-md border border-border hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label=\"Increase by 100\"\n >\n <Plus className=\"h-4 w-4\" />\n </button>\n </div>\n\n {/* Quick amount buttons - compact row */}\n <div className=\"flex gap-2\">\n {QUICK_AMOUNTS.map((amount) => (\n <button\n key={amount}\n type=\"button\"\n onClick={() => handleQuickAmount(amount)}\n disabled={disabled}\n className={`\n flex-1 px-2 py-1.5 rounded-md border text-sm font-medium transition-colors\n ${\n value === amount\n ? 'border-primary bg-primary/10 text-primary'\n : 'border-border hover:border-primary/50 hover:bg-muted text-foreground'\n }\n disabled:opacity-50 disabled:cursor-not-allowed\n `}\n >\n {amount.toLocaleString()}\n </button>\n ))}\n </div>\n\n {/* Cost summary - compact inline */}\n <div className=\"flex items-center justify-between p-3 rounded-md bg-status-warning-bg-subtle border border-border-subtle\">\n <span className=\"text-sm text-status-warning-text\">{value.toLocaleString()} credits</span>\n <span className=\"font-semibold text-foreground\">{formatCurrency(totalCost, currency)}</span>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;AAoBA,IAAM,IAAgB;CAAC;CAAK;CAAK;CAAM;CAAK,EAE/B,KAAmD,EAC9D,UACA,aACA,eAAY,GACZ,eAAY,KACZ,mBAAgB,KAChB,cAAW,OACX,cAAW,SACP;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,EAAI;AACzB,SAAO,MAAe,IAAM,IAAW;IAEnC,CAAC,GAAY,KAAiB,EAAS,EAAM,UAAU,CAAC,EAExD,IAAoB,GACvB,MAA2C;EAC1C,IAAM,IAAM,EAAE,OAAO,MAAM,QAAQ,WAAW,GAAG;AACjD,IAAc,EAAI;EAElB,IAAM,IAAS,SAAS,GAAK,GAAG;AAChC,EAAI,CAAC,MAAM,EAAO,IAAI,KAAU,KAAa,KAAU,KACrD,EAAS,EAAO;IAGpB;EAAC;EAAU;EAAW;EAAU,CACjC,EAEK,IAAa,QAAkB;EACnC,IAAI,IAAS,SAAS,GAAY,GAAG;AAOrC,EANI,MAAM,EAAO,IAAI,IAAS,IAC5B,IAAS,IACA,IAAS,MAClB,IAAS,IAEX,EAAc,EAAO,UAAU,CAAC,EAChC,EAAS,EAAO;IACf;EAAC;EAAY;EAAU;EAAW;EAAU,CAAC,EAE1C,IAAkB,GACrB,MAAmB;EAClB,IAAM,IAAW,KAAK,IAAI,IAAQ,GAAQ,EAAU;AAEpD,EADA,EAAc,EAAS,UAAU,CAAC,EAClC,EAAS,EAA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AK,MAClB,kBAAC,UAAD;KAEE,MAAK;KACL,eAAe,EAAkB,EAAO;KAC9B;KACV,WAAW;;gBAGP,MAAU,IACN,8CACA,uEACL;;;eAIF,EAAO,gBAAgB;KACjB,EAfF,EAeE,CACT;IACE,CAAA;GAGN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,QAAD;KAAM,WAAU;eAAhB,CAAoD,EAAM,gBAAgB,EAAC,WAAe;QAC1F,kBAAC,QAAD;KAAM,WAAU;eAAiC,EAAe,GAAW,EAAS;KAAQ,CAAA,CACxF;;GACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CreditsPaymentOptionProps {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
onToggle: (enabled: boolean) => void;
|
|
6
|
+
creditsToUse: number;
|
|
7
|
+
onCreditsChange: (amount: number) => void;
|
|
8
|
+
availableCredits: number;
|
|
9
|
+
maxCreditsUsable: number;
|
|
10
|
+
totalAmount: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
disabledReason?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const CreditsPaymentOption: FC<CreditsPaymentOptionProps>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=CreditsPaymentOption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditsPaymentOption.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/CreditsPaymentOption.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAe,MAAM,OAAO,CAAC;AAM7C,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA+N9D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Currency, PaymentProvider } from '../types';
|
|
3
|
+
|
|
4
|
+
interface CurrencySelectorProps {
|
|
5
|
+
selectedCurrency: Currency;
|
|
6
|
+
onSelect: (currency: Currency) => void;
|
|
7
|
+
selectedProvider: PaymentProvider;
|
|
8
|
+
baseAmount: number;
|
|
9
|
+
convertedAmount: number | null;
|
|
10
|
+
conversionRate: number;
|
|
11
|
+
isConverting?: boolean;
|
|
12
|
+
/** Billing address country code (e.g., 'IN', 'US') - used to restrict currencies */
|
|
13
|
+
billingCountry?: string;
|
|
14
|
+
/** Billing account's default currency - used for auto-selection */
|
|
15
|
+
billingAccountCurrency?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const CurrencySelector: FC<CurrencySelectorProps>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=CurrencySelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrencySelector.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/CurrencySelector.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI1D,UAAU,qBAAqB;IAC7B,gBAAgB,EAAE,QAAQ,CAAC;IAC3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,eAAe,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAsED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA2PtD,CAAC"}
|