@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":"StripePaymentForm.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/StripePaymentForm.tsx"],"sourcesContent":["/**\n * Stripe Payment Form Component\n * Integrates with Stripe Elements for card payment\n */\n\nimport { type FC, useState, useCallback, useEffect, useRef } from 'react';\nimport { CreditCard, Lock, Loader2, Check, AlertCircle } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { getStripeCardElementStyle, statusTokens } from '../../../shared/utils';\n\n// Stripe types - local definitions to avoid conflicts with external type declarations\ninterface LocalStripeCardElement {\n mount: (element: HTMLElement) => void;\n unmount: () => void;\n destroy: () => void;\n on: (event: string, handler: (event: LocalStripeCardChangeEvent) => void) => void;\n}\n\ninterface LocalStripeCardChangeEvent {\n complete: boolean;\n error?: { message: string };\n}\n\ninterface LocalStripeElements {\n create: (type: 'card', options?: Record<string, unknown>) => LocalStripeCardElement;\n}\n\ninterface LocalStripePaymentMethod {\n id: string;\n card?: {\n last4: string;\n brand: string;\n };\n}\n\ninterface LocalStripeInstance {\n elements: () => LocalStripeElements;\n createPaymentMethod: (options: {\n type: 'card';\n card: LocalStripeCardElement;\n }) => Promise<{ paymentMethod?: LocalStripePaymentMethod; error?: { message: string } }>;\n confirmCardPayment: (\n clientSecret: string,\n options?: { payment_method: string }\n ) => Promise<{\n paymentIntent?: { id: string; status: string };\n error?: { message: string };\n }>;\n}\n\n// Use type assertion when accessing window.Stripe\ntype StripeFactory = (key: string) => LocalStripeInstance;\n\ninterface StripePaymentFormProps {\n clientSecret: string;\n publishableKey: string;\n amount: number;\n currency: string;\n onSuccess: (paymentIntentId: string) => void;\n onError: (error: string) => void;\n onCancel?: () => void;\n disabled?: boolean;\n isCompletingExistingPayment?: boolean; // True for saved cards that need 3D Secure\n}\n\ntype PaymentState = 'idle' | 'loading' | 'processing' | 'success' | 'error';\n\n/**\n * Load Stripe.js SDK dynamically\n */\nconst loadStripeSDK = (): Promise<void> => {\n return new Promise((resolve, reject) => {\n if (window.Stripe) {\n resolve();\n return;\n }\n\n const existingScript = document.querySelector('script[src=\"https://js.stripe.com/v3/\"]');\n if (existingScript) {\n // Wait for existing script to load\n const checkStripe = setInterval(() => {\n if (window.Stripe) {\n clearInterval(checkStripe);\n resolve();\n }\n }, 100);\n return;\n }\n\n const script = document.createElement('script');\n script.src = 'https://js.stripe.com/v3/';\n script.async = true;\n script.onload = () => resolve();\n script.onerror = () => reject(new Error('Failed to load Stripe SDK'));\n document.body.appendChild(script);\n });\n};\n\nexport const StripePaymentForm: FC<StripePaymentFormProps> = ({\n clientSecret,\n publishableKey,\n amount,\n currency,\n onSuccess,\n onError,\n onCancel,\n disabled = false,\n isCompletingExistingPayment = 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 [paymentState, setPaymentState] = useState<PaymentState>('idle');\n const [error, setError] = useState<string | null>(null);\n const [sdkLoaded, setSdkLoaded] = useState(false);\n const [cardComplete, setCardComplete] = useState(false);\n const [cardError, setCardError] = useState<string | null>(null);\n\n const cardElementRef = useRef<HTMLDivElement>(null);\n const stripeRef = useRef<LocalStripeInstance | null>(null);\n const cardElementInstanceRef = useRef<LocalStripeCardElement | null>(null);\n const isMountedRef = useRef(false);\n\n // Load Stripe SDK\n useEffect(() => {\n loadStripeSDK()\n .then(() => {\n setSdkLoaded(true);\n })\n .catch(() => {\n setError('Failed to load payment gateway');\n });\n }, []);\n\n // Initialize Stripe and mount card element (only for new card payments)\n useEffect(() => {\n // Skip card input for completing existing payments (saved cards with 3D Secure)\n if (isCompletingExistingPayment) {\n return;\n }\n\n const windowStripe = (window as unknown as { Stripe?: StripeFactory }).Stripe;\n if (!sdkLoaded || !publishableKey || !windowStripe || isMountedRef.current) {\n return;\n }\n\n // Initialize Stripe\n const stripeInstance = windowStripe(publishableKey);\n stripeRef.current = stripeInstance;\n\n // Create elements\n const elements = stripeInstance.elements();\n const cardElement = elements.create('card', {\n style: getStripeCardElementStyle(),\n });\n cardElementInstanceRef.current = cardElement;\n\n // Mount card element\n if (cardElementRef.current) {\n cardElement.mount(cardElementRef.current);\n isMountedRef.current = true;\n\n // Listen to card element changes\n cardElement.on('change', (event: LocalStripeCardChangeEvent) => {\n setCardError(event.error ? event.error.message : null);\n setCardComplete(event.complete);\n });\n }\n\n // Cleanup\n return () => {\n if (cardElementInstanceRef.current && isMountedRef.current) {\n try {\n cardElementInstanceRef.current.unmount();\n cardElementInstanceRef.current.destroy();\n } catch {\n // Element might already be destroyed\n }\n cardElementInstanceRef.current = null;\n isMountedRef.current = false;\n }\n };\n }, [sdkLoaded, publishableKey, isCompletingExistingPayment]);\n\n // Auto-confirm payment for saved cards (requires 3D Secure or similar action)\n useEffect(() => {\n if (!isCompletingExistingPayment || !sdkLoaded || !publishableKey || paymentState !== 'idle') {\n return;\n }\n\n const confirmExistingPayment = async () => {\n const windowStripe = (window as unknown as { Stripe?: StripeFactory }).Stripe;\n if (!windowStripe) {\n setError('Payment gateway not loaded');\n return;\n }\n\n // Initialize Stripe if not already done\n if (!stripeRef.current) {\n stripeRef.current = windowStripe(publishableKey);\n }\n\n setPaymentState('processing');\n setError(null);\n\n try {\n // Confirm the payment (payment method already attached by backend)\n // This will show 3D Secure popup if needed\n const { paymentIntent, error: confirmError } =\n await stripeRef.current.confirmCardPayment(clientSecret);\n\n if (confirmError) {\n throw new Error(confirmError.message || 'Payment confirmation failed');\n }\n\n if (paymentIntent?.status === 'succeeded') {\n setPaymentState('success');\n onSuccess(paymentIntent.id);\n } else if (paymentIntent?.status === 'processing') {\n setPaymentState('processing');\n // Keep in processing state - webhook will handle completion\n } else {\n throw new Error('Payment was not successful');\n }\n } catch (err) {\n const errorMessage = err instanceof Error ? err.message : 'Payment confirmation failed';\n setError(errorMessage);\n setPaymentState('error');\n onError(errorMessage);\n }\n };\n\n confirmExistingPayment();\n }, [\n isCompletingExistingPayment,\n sdkLoaded,\n publishableKey,\n clientSecret,\n paymentState,\n onSuccess,\n onError,\n ]);\n\n const handleSubmit = useCallback(\n async (e: React.FormEvent) => {\n e.preventDefault();\n\n const stripe = stripeRef.current;\n const cardElement = cardElementInstanceRef.current;\n\n if (!stripe || !cardElement) {\n setError('Payment form not ready');\n return;\n }\n\n if (!cardComplete) {\n setCardError('Please enter complete card details');\n return;\n }\n\n setPaymentState('processing');\n setError(null);\n setCardError(null);\n\n try {\n // Step 1: Create PaymentMethod\n const { paymentMethod, error: pmError } = await stripe.createPaymentMethod({\n type: 'card',\n card: cardElement,\n });\n\n if (pmError) {\n throw new Error(pmError.message || 'Failed to create payment method');\n }\n\n if (!paymentMethod) {\n throw new Error('No payment method returned');\n }\n\n // Step 2: Confirm the payment with the client secret\n const { paymentIntent, error: confirmError } = await stripe.confirmCardPayment(\n clientSecret,\n { payment_method: paymentMethod.id }\n );\n\n if (confirmError) {\n throw new Error(confirmError.message || 'Payment failed');\n }\n\n if (paymentIntent?.status === 'succeeded') {\n setPaymentState('success');\n onSuccess(paymentIntent.id);\n } else if (paymentIntent?.status === 'processing') {\n setPaymentState('processing');\n } else {\n throw new Error('Payment was not successful');\n }\n } catch (err) {\n const errorMessage = err instanceof Error ? err.message : 'Payment failed';\n setError(errorMessage);\n setPaymentState('error');\n onError(errorMessage);\n }\n },\n [clientSecret, cardComplete, onSuccess, onError]\n );\n\n // Render success state\n if (paymentState === 'success') {\n return (\n <div\n className={`p-6 rounded-lg border ${statusTokens.success.border} ${statusTokens.success.bg}`}\n >\n <div className=\"flex items-center gap-3\">\n <div\n className={`p-2 rounded-full ${statusTokens.success.bg} ${statusTokens.success.icon}`}\n >\n <Check className=\"h-6 w-6\" />\n </div>\n <div>\n <h3 className={`font-semibold ${statusTokens.success.text}`}>Payment Successful!</h3>\n <p className={`text-sm ${statusTokens.success.text}`}>\n Your payment has been processed successfully.\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n // Show loading while SDK loads\n if (!sdkLoaded) {\n return (\n <div className=\"space-y-4\">\n <div className=\"flex items-center gap-2\">\n <CreditCard className=\"h-5 w-5 text-muted-foreground\" />\n <span className=\"font-medium text-foreground\">\n {tr('billing.checkout.cardPayment', 'Card Payment')}\n </span>\n </div>\n <div className=\"p-6 rounded-lg border border-border bg-muted/30 flex items-center justify-center\">\n <Loader2 className=\"h-6 w-6 animate-spin text-muted-foreground\" />\n <span className=\"ml-2 text-muted-foreground\">\n {tr('billing.checkout.loadingPaymentForm', 'Loading payment form...')}\n </span>\n </div>\n </div>\n );\n }\n\n // For saved card payments that need confirmation (3D Secure, etc.)\n if (isCompletingExistingPayment) {\n return (\n <div className=\"space-y-4\">\n <div className=\"flex items-center gap-2\">\n <Lock className=\"h-5 w-5 text-primary\" />\n <span className=\"font-medium text-foreground\">Secure Payment Verification</span>\n </div>\n\n {paymentState === 'processing' && (\n <div className=\"p-6 rounded-lg border border-border bg-muted/30 flex flex-col items-center justify-center space-y-3\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n <p className=\"text-sm text-muted-foreground text-center\">\n Confirming payment with your saved card...\n <br />\n <span className=\"text-xs\">Please complete any security verification if prompted</span>\n </p>\n </div>\n )}\n\n {error && (\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 text-destructive text-sm\">\n <AlertCircle className=\"h-4 w-4 shrink-0\" />\n <div>\n <p className=\"font-medium\">\n {tr('billing.checkout.paymentFailed', 'Payment Failed')}\n </p>\n <p className=\"text-xs\">{error}</p>\n </div>\n </div>\n )}\n\n {(paymentState === 'error' || error) && onCancel && (\n <div className=\"flex gap-3\">\n <button\n type=\"button\"\n onClick={onCancel}\n className=\"flex-1 px-4 py-3 rounded-lg border border-border text-foreground font-medium\n hover:bg-muted transition-colors\"\n >\n Back to Checkout\n </button>\n </div>\n )}\n </div>\n );\n }\n\n return (\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n {/* Header */}\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <CreditCard className=\"h-5 w-5 text-muted-foreground\" />\n <span className=\"font-medium text-foreground\">Card Payment</span>\n </div>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Lock className=\"h-3 w-3\" />\n Secured by Stripe\n </div>\n </div>\n\n {/* Stripe Card Element container - NO conditional rendering inside */}\n <div className=\"space-y-2\">\n <div\n ref={cardElementRef}\n className=\"min-h-[50px] rounded-lg border border-border bg-background p-4\"\n />\n {cardError && <p className=\"text-sm text-destructive\">{cardError}</p>}\n </div>\n\n {/* Error message */}\n {error && (\n <div className=\"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 text-destructive text-sm\">\n <AlertCircle className=\"h-4 w-4 shrink-0\" />\n {error}\n </div>\n )}\n\n {/* Actions */}\n <div className=\"flex gap-3\">\n {onCancel && (\n <button\n type=\"button\"\n onClick={onCancel}\n disabled={paymentState === 'processing' || disabled}\n className=\"flex-1 px-4 py-3 rounded-lg border border-border text-foreground font-medium\n hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors\"\n >\n Cancel\n </button>\n )}\n <button\n type=\"submit\"\n disabled={paymentState === 'processing' || disabled || !cardComplete}\n className=\"flex-1 px-4 py-3 rounded-lg bg-primary text-primary-foreground font-medium\n hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors\n flex items-center justify-center gap-2\"\n >\n {paymentState === 'processing' ? (\n <>\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n Processing...\n </>\n ) : (\n <>\n Pay{' '}\n {new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: currency.toUpperCase(),\n }).format(amount / 100)}\n </>\n )}\n </button>\n </div>\n\n {/* Security note */}\n <p className=\"text-center text-xs text-muted-foreground\">\n Your payment information is encrypted and secure. We never store your full card details.\n </p>\n </form>\n );\n};\n"],"mappings":";;;;;;;;AAsEA,IAAM,UACG,IAAI,SAAS,GAAS,MAAW;AACtC,KAAI,OAAO,QAAQ;AACjB,KAAS;AACT;;AAIF,KADuB,SAAS,cAAc,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
7
|
+
endDate: string;
|
|
8
|
+
plan?: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
productID?: string;
|
|
12
|
+
product?: {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
} | null;
|
|
16
|
+
} | null;
|
|
17
|
+
}
|
|
18
|
+
interface SubscriptionSelectorProps {
|
|
19
|
+
subscriptions: Subscription[];
|
|
20
|
+
selectedSubscriptionId: string | null;
|
|
21
|
+
onSelect: (subscriptionId: string | null) => void;
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const SubscriptionSelector: FC<SubscriptionSelectorProps>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=SubscriptionSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionSelector.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/SubscriptionSelector.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,EAA+B,MAAM,OAAO,CAAC;AAK7D,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE;YACR,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;SACd,GAAG,IAAI,CAAC;KACV,GAAG,IAAI,CAAC;CACV;AAED,UAAU,yBAAyB;IACjC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAuI9D,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { statusTokens as e } from "../../../shared/utils/tokens.js";
|
|
2
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
+
import { AlertCircle as i, Check as a, ChevronDown as o } from "lucide-react";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
5
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
6
|
+
//#region src/billing/modules/checkout/components/SubscriptionSelector.tsx
|
|
7
|
+
var u = ({ subscriptions: u, selectedSubscriptionId: d, onSelect: f, isLoading: p = !1 }) => {
|
|
8
|
+
let { t: m } = l(), h = (e, t) => {
|
|
9
|
+
let n = m(e);
|
|
10
|
+
return n === e ? t : n;
|
|
11
|
+
}, [g, _] = r(!1), v = n(null);
|
|
12
|
+
t(() => {
|
|
13
|
+
let e = (e) => {
|
|
14
|
+
v.current && !v.current.contains(e.target) && _(!1);
|
|
15
|
+
};
|
|
16
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
17
|
+
}, []), t(() => {
|
|
18
|
+
u.length === 1 && !d && f(u[0].id);
|
|
19
|
+
}, [
|
|
20
|
+
u,
|
|
21
|
+
d,
|
|
22
|
+
f
|
|
23
|
+
]);
|
|
24
|
+
let y = u.find((e) => e.id === d), b = (e) => {
|
|
25
|
+
let t = e.plan?.name || "Subscription", n = e.plan?.product?.name;
|
|
26
|
+
return n ? `${n} - ${t}` : t;
|
|
27
|
+
};
|
|
28
|
+
return p ? /* @__PURE__ */ s("div", { className: "h-9 bg-muted animate-pulse rounded-md" }) : u.length === 0 ? /* @__PURE__ */ c("div", {
|
|
29
|
+
className: `flex items-center gap-2 p-2 rounded-md ${e.warning.bg} border ${e.warning.border}`,
|
|
30
|
+
children: [/* @__PURE__ */ s(i, { className: `h-4 w-4 ${e.warning.icon} shrink-0` }), /* @__PURE__ */ s("span", {
|
|
31
|
+
className: `text-sm ${e.warning.text}`,
|
|
32
|
+
children: "No active subscription. Subscribe to a plan first."
|
|
33
|
+
})]
|
|
34
|
+
}) : u.length === 1 ? null : /* @__PURE__ */ c("div", {
|
|
35
|
+
className: "relative",
|
|
36
|
+
ref: v,
|
|
37
|
+
children: [/* @__PURE__ */ c("div", {
|
|
38
|
+
className: "flex items-center gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ s("span", {
|
|
40
|
+
className: "text-sm text-muted-foreground shrink-0",
|
|
41
|
+
children: h("billing.checkout.attachTo", "Attach to:")
|
|
42
|
+
}), /* @__PURE__ */ c("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
onClick: () => _(!g),
|
|
45
|
+
className: `
|
|
46
|
+
flex-1 flex items-center justify-between gap-2 px-3 py-1.5 rounded-md border text-sm
|
|
47
|
+
transition-colors text-left
|
|
48
|
+
${g ? "border-primary ring-1 ring-primary" : d ? "border-border hover:border-primary/50 bg-background" : `${e.warning.border} ${e.warning.bg}`}
|
|
49
|
+
`,
|
|
50
|
+
children: [y ? /* @__PURE__ */ s("span", {
|
|
51
|
+
className: "font-medium text-foreground truncate",
|
|
52
|
+
children: b(y)
|
|
53
|
+
}) : /* @__PURE__ */ s("span", {
|
|
54
|
+
className: e.warning.text,
|
|
55
|
+
children: h("billing.checkout.selectSubscription", "Select subscription")
|
|
56
|
+
}), /* @__PURE__ */ s(o, { className: `h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform ${g ? "rotate-180" : ""}` })]
|
|
57
|
+
})]
|
|
58
|
+
}), g && /* @__PURE__ */ s("div", {
|
|
59
|
+
className: "absolute left-0 right-0 z-50 mt-1 max-h-48 overflow-auto rounded-md border border-border bg-popover shadow-lg",
|
|
60
|
+
children: u.map((e) => {
|
|
61
|
+
let t = e.id === d;
|
|
62
|
+
return /* @__PURE__ */ c("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
onClick: () => {
|
|
65
|
+
f(e.id), _(!1);
|
|
66
|
+
},
|
|
67
|
+
className: `
|
|
68
|
+
w-full flex items-center justify-between gap-2 px-3 py-2 text-sm text-left
|
|
69
|
+
transition-colors
|
|
70
|
+
${t ? "bg-primary/5" : "hover:bg-muted/50"}
|
|
71
|
+
`,
|
|
72
|
+
children: [/* @__PURE__ */ s("span", {
|
|
73
|
+
className: "font-medium text-foreground truncate",
|
|
74
|
+
children: b(e)
|
|
75
|
+
}), t && /* @__PURE__ */ s(a, { className: "h-3.5 w-3.5 text-primary shrink-0" })]
|
|
76
|
+
}, e.id);
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
export { u as SubscriptionSelector };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=SubscriptionSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionSelector.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/SubscriptionSelector.tsx"],"sourcesContent":["/**\n * Subscription Selector Component\n * Compact inline dropdown for choosing subscription when purchasing addons\n * Only shows when multiple subscriptions exist - single subscription auto-selects silently\n */\n\nimport { type FC, useState, useRef, useEffect } from 'react';\nimport { ChevronDown, Check, AlertCircle } from 'lucide-react';\nimport { statusTokens } from '../../../shared/utils/tokens';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ninterface Subscription {\n id: string;\n status: string;\n startDate: string;\n endDate: string;\n plan?: {\n id: string;\n name: string;\n productID?: string;\n product?: {\n id: string;\n name: string;\n } | null;\n } | null;\n}\n\ninterface SubscriptionSelectorProps {\n subscriptions: Subscription[];\n selectedSubscriptionId: string | null;\n onSelect: (subscriptionId: string | null) => void;\n isLoading?: boolean;\n}\n\nexport const SubscriptionSelector: FC<SubscriptionSelectorProps> = ({\n subscriptions,\n selectedSubscriptionId,\n onSelect,\n isLoading = 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 [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 // Auto-select if only one subscription (silently, no UI shown)\n useEffect(() => {\n if (subscriptions.length === 1 && !selectedSubscriptionId) {\n onSelect(subscriptions[0].id);\n }\n }, [subscriptions, selectedSubscriptionId, onSelect]);\n\n const selectedSubscription = subscriptions.find((s) => s.id === selectedSubscriptionId);\n\n // Format subscription display name: \"Product - Plan\" or just \"Plan\"\n const getDisplayName = (subscription: Subscription) => {\n const planName = subscription.plan?.name || 'Subscription';\n const productName = subscription.plan?.product?.name;\n return productName ? `${productName} - ${planName}` : planName;\n };\n\n // Loading state - compact\n if (isLoading) {\n return <div className=\"h-9 bg-muted animate-pulse rounded-md\" />;\n }\n\n // No subscriptions - compact warning\n if (subscriptions.length === 0) {\n return (\n <div\n className={`flex items-center gap-2 p-2 rounded-md ${statusTokens.warning.bg} border ${statusTokens.warning.border}`}\n >\n <AlertCircle className={`h-4 w-4 ${statusTokens.warning.icon} shrink-0`} />\n <span className={`text-sm ${statusTokens.warning.text}`}>\n No active subscription. Subscribe to a plan first.\n </span>\n </div>\n );\n }\n\n // Only one subscription - don't show anything, auto-select happens silently\n if (subscriptions.length === 1) {\n return null;\n }\n\n // Multiple subscriptions - compact dropdown\n return (\n <div className=\"relative\" ref={dropdownRef}>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm text-muted-foreground shrink-0\">\n {tr('billing.checkout.attachTo', 'Attach to:')}\n </span>\n <button\n type=\"button\"\n onClick={() => setIsOpen(!isOpen)}\n className={`\n flex-1 flex items-center justify-between gap-2 px-3 py-1.5 rounded-md border text-sm\n transition-colors text-left\n ${\n isOpen\n ? 'border-primary ring-1 ring-primary'\n : selectedSubscriptionId\n ? 'border-border hover:border-primary/50 bg-background'\n : `${statusTokens.warning.border} ${statusTokens.warning.bg}`\n }\n `}\n >\n {selectedSubscription ? (\n <span className=\"font-medium text-foreground truncate\">\n {getDisplayName(selectedSubscription)}\n </span>\n ) : (\n <span className={statusTokens.warning.text}>\n {tr('billing.checkout.selectSubscription', 'Select subscription')}\n </span>\n )}\n <ChevronDown\n className={`h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform ${\n isOpen ? 'rotate-180' : ''\n }`}\n />\n </button>\n </div>\n\n {/* Dropdown menu */}\n {isOpen && (\n <div className=\"absolute left-0 right-0 z-50 mt-1 max-h-48 overflow-auto rounded-md border border-border bg-popover shadow-lg\">\n {subscriptions.map((subscription) => {\n const isSelected = subscription.id === selectedSubscriptionId;\n return (\n <button\n key={subscription.id}\n type=\"button\"\n onClick={() => {\n onSelect(subscription.id);\n setIsOpen(false);\n }}\n className={`\n w-full flex items-center justify-between gap-2 px-3 py-2 text-sm text-left\n transition-colors\n ${isSelected ? 'bg-primary/5' : 'hover:bg-muted/50'}\n `}\n >\n <span className=\"font-medium text-foreground truncate\">\n {getDisplayName(subscription)}\n </span>\n {isSelected && <Check className=\"h-3.5 w-3.5 text-primary shrink-0\" />}\n </button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAkCA,IAAa,KAAuD,EAClE,kBACA,2BACA,aACA,eAAY,SACR;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,KAA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AW,EAAa,QAAQ;eACnC,EAAG,uCAAuC,sBAAsB;KAC5D,CAAA,EAET,kBAAC,GAAD,EACE,WAAW,mEACT,IAAS,eAAe,MAE1B,CAAA,CACK;MACL;MAGL,KACC,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAc,KAAK,MAAiB;IACnC,IAAM,IAAa,EAAa,OAAO;AACvC,WACE,kBAAC,UAAD;KAEE,MAAK;KACL,eAAe;AAEb,MADA,EAAS,EAAa,GAAG,EACzB,EAAU,GAAM;;KAElB,WAAW;;;oBAGP,IAAa,iBAAiB,oBAAoB;;eAVxD,CAaE,kBAAC,QAAD;MAAM,WAAU;gBACb,EAAe,EAAa;MACxB,CAAA,EACN,KAAc,kBAAC,GAAD,EAAO,WAAU,qCAAsC,CAAA,CAC/D;OAhBF,EAAa,GAgBX;KAEX;GACE,CAAA,CAEJ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SavedPaymentMethod } from '../types';
|
|
3
|
+
|
|
4
|
+
interface UnifiedPaymentMethodSelectorProps {
|
|
5
|
+
savedPaymentMethods: SavedPaymentMethod[];
|
|
6
|
+
selectedPaymentMethodId: string | null;
|
|
7
|
+
onSelectSavedCard: (id: string | null) => void;
|
|
8
|
+
selectedProvider: 'CREDITS' | 'STRIPE' | 'RAZORPAY' | 'AUTO';
|
|
9
|
+
onSelectProvider: (provider: 'CREDITS' | 'STRIPE' | 'RAZORPAY') => void;
|
|
10
|
+
stripeEnabled: boolean;
|
|
11
|
+
razorpayEnabled: boolean;
|
|
12
|
+
canPayWithCredits: boolean;
|
|
13
|
+
availableCredits: number;
|
|
14
|
+
totalAmount: number;
|
|
15
|
+
billingCountry?: string;
|
|
16
|
+
saveCard: boolean;
|
|
17
|
+
onSaveCardChange: (save: boolean) => void;
|
|
18
|
+
autoRenewEnabled?: boolean;
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const UnifiedPaymentMethodSelector: FC<UnifiedPaymentMethodSelectorProps>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=UnifiedPaymentMethodSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnifiedPaymentMethodSelector.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/UnifiedPaymentMethodSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,UAAU,iCAAiC;IAEzC,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAC1C,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAG/C,gBAAgB,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7D,gBAAgB,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,KAAK,IAAI,CAAC;IAGxE,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAG1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAeD,eAAO,MAAM,4BAA4B,EAAE,EAAE,CAAC,iCAAiC,CAkU9E,CAAC"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { useState as e } from "react";
|
|
2
|
+
import { ChevronDown as t, Coins as n, CreditCard as r, Wallet as i } from "lucide-react";
|
|
3
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
|
+
//#region src/billing/modules/checkout/components/UnifiedPaymentMethodSelector.tsx
|
|
6
|
+
var l = (e) => o(e === "WALLET" ? i : r, { className: "h-4 w-4" }), u = (e) => `${e.type === "CREDIT_CARD" ? "Credit Card" : e.type === "DEBIT_CARD" ? "Debit Card" : e.type}${e.last4 ? ` •••• ${e.last4}` : ""}${e.brand ? ` (${e.brand})` : ""}`, d = ({ savedPaymentMethods: i, selectedPaymentMethodId: d, onSelectSavedCard: f, selectedProvider: p, onSelectProvider: m, stripeEnabled: h, razorpayEnabled: g, canPayWithCredits: _, availableCredits: v, totalAmount: y, billingCountry: b, saveCard: x, onSaveCardChange: S, autoRenewEnabled: C = !1, isLoading: w = !1 }) => {
|
|
7
|
+
let { t: T } = c(), E = (e, t) => {
|
|
8
|
+
let n = T(e);
|
|
9
|
+
return n === e ? t : n;
|
|
10
|
+
}, [D, O] = e(!1), k = v >= y, A = b === "IN", j = i.find((e) => e.isDefault) || i[0], M = i.filter((e) => e.id !== j?.id), N = (e, t) => {
|
|
11
|
+
if (e === "saved") {
|
|
12
|
+
let e = i.find((e) => e.id === t);
|
|
13
|
+
e && (f(t), e.razorpayPaymentMethodId ? m("RAZORPAY") : e.stripePaymentMethodId && m("STRIPE"));
|
|
14
|
+
} else f(null), m(t);
|
|
15
|
+
}, P = (e, t) => e === "saved" ? d === t : !d && p === t;
|
|
16
|
+
return /* @__PURE__ */ s("div", {
|
|
17
|
+
className: "space-y-3",
|
|
18
|
+
children: [/* @__PURE__ */ o("h3", {
|
|
19
|
+
className: "text-sm font-medium text-foreground",
|
|
20
|
+
children: E("billing.checkout.paymentMethod", "Payment Method")
|
|
21
|
+
}), w ? /* @__PURE__ */ s("div", {
|
|
22
|
+
className: "space-y-2",
|
|
23
|
+
children: [/* @__PURE__ */ o("div", { className: "h-16 rounded-lg border border-border bg-muted animate-pulse" }), /* @__PURE__ */ o("div", { className: "h-16 rounded-lg border border-border bg-muted animate-pulse" })]
|
|
24
|
+
}) : /* @__PURE__ */ s("div", {
|
|
25
|
+
className: "space-y-2",
|
|
26
|
+
children: [
|
|
27
|
+
_ && /* @__PURE__ */ s("button", {
|
|
28
|
+
type: "button",
|
|
29
|
+
onClick: () => N("new", "CREDITS"),
|
|
30
|
+
disabled: !k,
|
|
31
|
+
className: `
|
|
32
|
+
w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left
|
|
33
|
+
${P("new", "CREDITS") ? "border-primary bg-primary/5 ring-1 ring-primary" : "border-border hover:border-primary/50 hover:bg-muted/50"}
|
|
34
|
+
${!k && "opacity-50 cursor-not-allowed"}
|
|
35
|
+
`,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ o(n, { className: `h-5 w-5 shrink-0 ${P("new", "CREDITS") ? "text-primary" : "text-muted-foreground"}` }),
|
|
38
|
+
/* @__PURE__ */ s("div", {
|
|
39
|
+
className: "flex-1 min-w-0",
|
|
40
|
+
children: [/* @__PURE__ */ o("div", {
|
|
41
|
+
className: "text-sm font-medium text-foreground",
|
|
42
|
+
children: "Pay with Credits"
|
|
43
|
+
}), /* @__PURE__ */ o("div", {
|
|
44
|
+
className: "text-xs text-muted-foreground",
|
|
45
|
+
children: k ? `Available: ${v.toLocaleString()} credits` : `Insufficient credits (need ${y.toLocaleString()})`
|
|
46
|
+
})]
|
|
47
|
+
}),
|
|
48
|
+
k && /* @__PURE__ */ o("span", {
|
|
49
|
+
className: "text-xs px-2 py-0.5 rounded bg-success/10 text-success",
|
|
50
|
+
children: "Instant"
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
i.length > 0 && /* @__PURE__ */ s(a, { children: [
|
|
55
|
+
/* @__PURE__ */ o("div", {
|
|
56
|
+
className: "text-xs font-medium text-muted-foreground uppercase tracking-wide pt-2",
|
|
57
|
+
children: "Saved Cards"
|
|
58
|
+
}),
|
|
59
|
+
j && /* @__PURE__ */ s("button", {
|
|
60
|
+
type: "button",
|
|
61
|
+
onClick: () => N("saved", j.id),
|
|
62
|
+
className: `
|
|
63
|
+
w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left
|
|
64
|
+
${P("saved", j.id) ? "border-primary bg-primary/5 ring-1 ring-primary" : "border-border hover:border-primary/50 hover:bg-muted/50"}
|
|
65
|
+
`,
|
|
66
|
+
children: [
|
|
67
|
+
l(j.type),
|
|
68
|
+
/* @__PURE__ */ s("div", {
|
|
69
|
+
className: "flex-1 min-w-0",
|
|
70
|
+
children: [/* @__PURE__ */ o("div", {
|
|
71
|
+
className: "text-sm font-medium text-foreground",
|
|
72
|
+
children: u(j)
|
|
73
|
+
}), j.expiryMonth && j.expiryYear && /* @__PURE__ */ s("div", {
|
|
74
|
+
className: "text-xs text-muted-foreground",
|
|
75
|
+
children: [
|
|
76
|
+
"Expires ",
|
|
77
|
+
j.expiryMonth.toString().padStart(2, "0"),
|
|
78
|
+
"/",
|
|
79
|
+
j.expiryYear
|
|
80
|
+
]
|
|
81
|
+
})]
|
|
82
|
+
}),
|
|
83
|
+
j.isDefault && /* @__PURE__ */ o("span", {
|
|
84
|
+
className: "text-xs px-2 py-0.5 rounded bg-primary/10 text-primary",
|
|
85
|
+
children: "Default"
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
}),
|
|
89
|
+
M.length > 0 && /* @__PURE__ */ o(a, { children: D ? /* @__PURE__ */ s(a, { children: [M.map((e) => /* @__PURE__ */ s("button", {
|
|
90
|
+
type: "button",
|
|
91
|
+
onClick: () => N("saved", e.id),
|
|
92
|
+
className: `
|
|
93
|
+
w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left
|
|
94
|
+
${P("saved", e.id) ? "border-primary bg-primary/5 ring-1 ring-primary" : "border-border hover:border-primary/50 hover:bg-muted/50"}
|
|
95
|
+
`,
|
|
96
|
+
children: [l(e.type), /* @__PURE__ */ s("div", {
|
|
97
|
+
className: "flex-1 min-w-0",
|
|
98
|
+
children: [/* @__PURE__ */ o("div", {
|
|
99
|
+
className: "text-sm font-medium text-foreground",
|
|
100
|
+
children: u(e)
|
|
101
|
+
}), e.expiryMonth && e.expiryYear && /* @__PURE__ */ s("div", {
|
|
102
|
+
className: "text-xs text-muted-foreground",
|
|
103
|
+
children: [
|
|
104
|
+
"Expires ",
|
|
105
|
+
e.expiryMonth.toString().padStart(2, "0"),
|
|
106
|
+
"/",
|
|
107
|
+
e.expiryYear
|
|
108
|
+
]
|
|
109
|
+
})]
|
|
110
|
+
})]
|
|
111
|
+
}, e.id)), /* @__PURE__ */ s("button", {
|
|
112
|
+
type: "button",
|
|
113
|
+
onClick: () => O(!1),
|
|
114
|
+
className: "text-xs text-primary hover:underline flex items-center gap-1 pl-1",
|
|
115
|
+
children: [/* @__PURE__ */ o(t, { className: "h-3 w-3 rotate-180" }), "Hide other cards"]
|
|
116
|
+
})] }) : /* @__PURE__ */ s("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: () => O(!0),
|
|
119
|
+
className: "text-xs text-primary hover:underline flex items-center gap-1 pl-1",
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ o(t, { className: "h-3 w-3" }),
|
|
122
|
+
"Show ",
|
|
123
|
+
M.length,
|
|
124
|
+
" more card",
|
|
125
|
+
M.length > 1 ? "s" : ""
|
|
126
|
+
]
|
|
127
|
+
}) })
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ o("div", {
|
|
130
|
+
className: "text-xs font-medium text-muted-foreground uppercase tracking-wide pt-2",
|
|
131
|
+
children: i.length > 0 ? "Or use new card" : _ ? "Or pay with card" : "Pay with Card"
|
|
132
|
+
}),
|
|
133
|
+
g && A && /* @__PURE__ */ s("button", {
|
|
134
|
+
type: "button",
|
|
135
|
+
onClick: () => N("new", "RAZORPAY"),
|
|
136
|
+
className: `
|
|
137
|
+
w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left
|
|
138
|
+
${P("new", "RAZORPAY") ? "border-primary bg-primary/5 ring-1 ring-primary" : "border-border hover:border-primary/50 hover:bg-muted/50"}
|
|
139
|
+
`,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ o(r, { className: `h-5 w-5 shrink-0 ${P("new", "RAZORPAY") ? "text-primary" : "text-muted-foreground"}` }),
|
|
142
|
+
/* @__PURE__ */ s("div", {
|
|
143
|
+
className: "flex-1 min-w-0",
|
|
144
|
+
children: [/* @__PURE__ */ o("div", {
|
|
145
|
+
className: "text-sm font-medium text-foreground",
|
|
146
|
+
children: "UPI / Cards / Netbanking"
|
|
147
|
+
}), /* @__PURE__ */ o("div", {
|
|
148
|
+
className: "text-xs text-muted-foreground",
|
|
149
|
+
children: "Razorpay"
|
|
150
|
+
})]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ o("span", {
|
|
153
|
+
className: "text-xs px-2 py-0.5 rounded bg-accent-blue-subtle text-accent-blue",
|
|
154
|
+
children: "Recommended"
|
|
155
|
+
})
|
|
156
|
+
]
|
|
157
|
+
}),
|
|
158
|
+
h && /* @__PURE__ */ s("button", {
|
|
159
|
+
type: "button",
|
|
160
|
+
onClick: () => N("new", "STRIPE"),
|
|
161
|
+
className: `
|
|
162
|
+
w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left
|
|
163
|
+
${P("new", "STRIPE") ? "border-primary bg-primary/5 ring-1 ring-primary" : "border-border hover:border-primary/50 hover:bg-muted/50"}
|
|
164
|
+
`,
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ o(r, { className: `h-5 w-5 shrink-0 ${P("new", "STRIPE") ? "text-primary" : "text-muted-foreground"}` }),
|
|
167
|
+
/* @__PURE__ */ s("div", {
|
|
168
|
+
className: "flex-1 min-w-0",
|
|
169
|
+
children: [/* @__PURE__ */ o("div", {
|
|
170
|
+
className: "text-sm font-medium text-foreground",
|
|
171
|
+
children: "Credit / Debit Cards"
|
|
172
|
+
}), /* @__PURE__ */ o("div", {
|
|
173
|
+
className: "text-xs text-muted-foreground",
|
|
174
|
+
children: "Stripe - Multi-currency"
|
|
175
|
+
})]
|
|
176
|
+
}),
|
|
177
|
+
!A && /* @__PURE__ */ o("span", {
|
|
178
|
+
className: "text-xs px-2 py-0.5 rounded bg-accent-blue-subtle text-accent-blue",
|
|
179
|
+
children: "Recommended"
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
}),
|
|
183
|
+
!d && p !== "CREDITS" && p !== "AUTO" && !C && /* @__PURE__ */ o("div", {
|
|
184
|
+
className: "mt-4 pt-4 border-t border-border",
|
|
185
|
+
children: /* @__PURE__ */ s("label", {
|
|
186
|
+
className: "flex items-start gap-3 cursor-pointer group",
|
|
187
|
+
children: [/* @__PURE__ */ o("input", {
|
|
188
|
+
type: "checkbox",
|
|
189
|
+
checked: x,
|
|
190
|
+
onChange: (e) => S(e.target.checked),
|
|
191
|
+
className: "mt-0.5 h-4 w-4 rounded border-border text-primary focus:ring-primary focus:ring-offset-0"
|
|
192
|
+
}), /* @__PURE__ */ s("div", {
|
|
193
|
+
className: "flex-1",
|
|
194
|
+
children: [/* @__PURE__ */ o("div", {
|
|
195
|
+
className: "text-sm font-medium text-foreground group-hover:text-primary transition-colors",
|
|
196
|
+
children: "Save card for future use"
|
|
197
|
+
}), /* @__PURE__ */ o("div", {
|
|
198
|
+
className: "text-xs text-muted-foreground mt-0.5",
|
|
199
|
+
children: "Securely save this payment method for faster checkout next time"
|
|
200
|
+
})]
|
|
201
|
+
})]
|
|
202
|
+
})
|
|
203
|
+
}),
|
|
204
|
+
!d && p !== "CREDITS" && p !== "AUTO" && C && /* @__PURE__ */ o("div", {
|
|
205
|
+
className: "mt-4 pt-4 border-t border-border",
|
|
206
|
+
children: /* @__PURE__ */ s("div", {
|
|
207
|
+
className: "flex items-start gap-2 text-xs text-muted-foreground bg-muted/50 p-3 rounded-lg",
|
|
208
|
+
children: [/* @__PURE__ */ o("svg", {
|
|
209
|
+
className: "h-4 w-4 mt-0.5 flex-shrink-0",
|
|
210
|
+
fill: "none",
|
|
211
|
+
viewBox: "0 0 24 24",
|
|
212
|
+
stroke: "currentColor",
|
|
213
|
+
children: /* @__PURE__ */ o("path", {
|
|
214
|
+
strokeLinecap: "round",
|
|
215
|
+
strokeLinejoin: "round",
|
|
216
|
+
strokeWidth: 2,
|
|
217
|
+
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
218
|
+
})
|
|
219
|
+
}), /* @__PURE__ */ o("div", { children: "Your payment method will be securely saved for auto-renewal" })]
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
})]
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
//#endregion
|
|
227
|
+
export { d as UnifiedPaymentMethodSelector };
|
|
228
|
+
|
|
229
|
+
//# sourceMappingURL=UnifiedPaymentMethodSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnifiedPaymentMethodSelector.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/UnifiedPaymentMethodSelector.tsx"],"sourcesContent":["/**\n * Unified Payment Method Selector\n * Combines payment providers and saved payment methods into one clear interface\n */\n\nimport { type FC, useState } from 'react';\nimport { Coins, CreditCard, Wallet, ChevronDown } from 'lucide-react';\nimport type { SavedPaymentMethod } from '../types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ninterface UnifiedPaymentMethodSelectorProps {\n // Saved cards\n savedPaymentMethods: SavedPaymentMethod[];\n selectedPaymentMethodId: string | null;\n onSelectSavedCard: (id: string | null) => void;\n\n // Provider selection (for new cards)\n selectedProvider: 'CREDITS' | 'STRIPE' | 'RAZORPAY' | 'AUTO';\n onSelectProvider: (provider: 'CREDITS' | 'STRIPE' | 'RAZORPAY') => void;\n\n // Provider availability\n stripeEnabled: boolean;\n razorpayEnabled: boolean;\n canPayWithCredits: boolean;\n availableCredits: number;\n totalAmount: number;\n billingCountry?: string;\n\n // Save card option\n saveCard: boolean;\n onSaveCardChange: (save: boolean) => void;\n\n // Auto-renewal (when enabled, card must be saved - checkbox hidden)\n autoRenewEnabled?: boolean;\n\n isLoading?: boolean;\n}\n\nconst getCardIcon = (type: string) => {\n if (type === 'WALLET') return <Wallet className=\"h-4 w-4\" />;\n return <CreditCard className=\"h-4 w-4\" />;\n};\n\nconst getCardDisplay = (pm: SavedPaymentMethod): string => {\n const type =\n pm.type === 'CREDIT_CARD' ? 'Credit Card' : pm.type === 'DEBIT_CARD' ? 'Debit Card' : pm.type;\n const last4 = pm.last4 ? ` •••• ${pm.last4}` : '';\n const brand = pm.brand ? ` (${pm.brand})` : '';\n return `${type}${last4}${brand}`;\n};\n\nexport const UnifiedPaymentMethodSelector: FC<UnifiedPaymentMethodSelectorProps> = ({\n savedPaymentMethods,\n selectedPaymentMethodId,\n onSelectSavedCard,\n selectedProvider,\n onSelectProvider,\n stripeEnabled,\n razorpayEnabled,\n canPayWithCredits,\n availableCredits,\n totalAmount,\n billingCountry,\n saveCard,\n onSaveCardChange,\n autoRenewEnabled = false,\n isLoading = 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 [showAllSavedCards, setShowAllSavedCards] = useState(false);\n const hasEnoughCredits = availableCredits >= totalAmount;\n const isIndia = billingCountry === 'IN';\n\n // Get default card or first card for collapsible view\n const defaultSavedCard = savedPaymentMethods.find((pm) => pm.isDefault) || savedPaymentMethods[0];\n const otherSavedCards = savedPaymentMethods.filter((pm) => pm.id !== defaultSavedCard?.id);\n\n const handleSelect = (type: 'saved' | 'new', value: string) => {\n if (type === 'saved') {\n // When selecting saved card, set it and auto-determine provider\n const selectedCard = savedPaymentMethods.find((pm) => pm.id === value);\n if (selectedCard) {\n onSelectSavedCard(value);\n // Auto-set provider based on card type\n if (selectedCard.razorpayPaymentMethodId) {\n onSelectProvider('RAZORPAY');\n } else if (selectedCard.stripePaymentMethodId) {\n onSelectProvider('STRIPE');\n }\n }\n } else {\n // When selecting new card payment, clear saved card selection\n onSelectSavedCard(null);\n onSelectProvider(value as 'CREDITS' | 'STRIPE' | 'RAZORPAY');\n }\n };\n\n const isSelected = (type: 'saved' | 'new', value: string): boolean => {\n if (type === 'saved') {\n return selectedPaymentMethodId === value;\n } else {\n return !selectedPaymentMethodId && selectedProvider === value;\n }\n };\n\n return (\n <div className=\"space-y-3\">\n <h3 className=\"text-sm font-medium text-foreground\">\n {tr('billing.checkout.paymentMethod', 'Payment Method')}\n </h3>\n\n {isLoading ? (\n <div className=\"space-y-2\">\n <div className=\"h-16 rounded-lg border border-border bg-muted animate-pulse\" />\n <div className=\"h-16 rounded-lg border border-border bg-muted animate-pulse\" />\n </div>\n ) : (\n <div className=\"space-y-2\">\n {/* Credits Option */}\n {canPayWithCredits && (\n <button\n type=\"button\"\n onClick={() => handleSelect('new', 'CREDITS')}\n disabled={!hasEnoughCredits}\n className={`\n w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left\n ${\n isSelected('new', 'CREDITS')\n ? 'border-primary bg-primary/5 ring-1 ring-primary'\n : 'border-border hover:border-primary/50 hover:bg-muted/50'\n }\n ${!hasEnoughCredits && 'opacity-50 cursor-not-allowed'}\n `}\n >\n <Coins\n className={`h-5 w-5 shrink-0 ${isSelected('new', 'CREDITS') ? 'text-primary' : 'text-muted-foreground'}`}\n />\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">Pay with Credits</div>\n <div className=\"text-xs text-muted-foreground\">\n {hasEnoughCredits\n ? `Available: ${availableCredits.toLocaleString()} credits`\n : `Insufficient credits (need ${totalAmount.toLocaleString()})`}\n </div>\n </div>\n {hasEnoughCredits && (\n <span className=\"text-xs px-2 py-0.5 rounded bg-success/10 text-success\">\n Instant\n </span>\n )}\n </button>\n )}\n\n {/* Saved Cards Section */}\n {savedPaymentMethods.length > 0 && (\n <>\n <div className=\"text-xs font-medium text-muted-foreground uppercase tracking-wide pt-2\">\n Saved Cards\n </div>\n\n {/* Default/First Card - Always Shown */}\n {defaultSavedCard && (\n <button\n type=\"button\"\n onClick={() => handleSelect('saved', defaultSavedCard.id)}\n className={`\n w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left\n ${\n isSelected('saved', defaultSavedCard.id)\n ? 'border-primary bg-primary/5 ring-1 ring-primary'\n : 'border-border hover:border-primary/50 hover:bg-muted/50'\n }\n `}\n >\n {getCardIcon(defaultSavedCard.type)}\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">\n {getCardDisplay(defaultSavedCard)}\n </div>\n {defaultSavedCard.expiryMonth && defaultSavedCard.expiryYear && (\n <div className=\"text-xs text-muted-foreground\">\n Expires {defaultSavedCard.expiryMonth.toString().padStart(2, '0')}/\n {defaultSavedCard.expiryYear}\n </div>\n )}\n </div>\n {defaultSavedCard.isDefault && (\n <span className=\"text-xs px-2 py-0.5 rounded bg-primary/10 text-primary\">\n Default\n </span>\n )}\n </button>\n )}\n\n {/* Other Cards - Collapsible */}\n {otherSavedCards.length > 0 && (\n <>\n {showAllSavedCards ? (\n <>\n {otherSavedCards.map((pm) => (\n <button\n key={pm.id}\n type=\"button\"\n onClick={() => handleSelect('saved', pm.id)}\n className={`\n w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left\n ${\n isSelected('saved', pm.id)\n ? 'border-primary bg-primary/5 ring-1 ring-primary'\n : 'border-border hover:border-primary/50 hover:bg-muted/50'\n }\n `}\n >\n {getCardIcon(pm.type)}\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">\n {getCardDisplay(pm)}\n </div>\n {pm.expiryMonth && pm.expiryYear && (\n <div className=\"text-xs text-muted-foreground\">\n Expires {pm.expiryMonth.toString().padStart(2, '0')}/{pm.expiryYear}\n </div>\n )}\n </div>\n </button>\n ))}\n <button\n type=\"button\"\n onClick={() => setShowAllSavedCards(false)}\n className=\"text-xs text-primary hover:underline flex items-center gap-1 pl-1\"\n >\n <ChevronDown className=\"h-3 w-3 rotate-180\" />\n Hide other cards\n </button>\n </>\n ) : (\n <button\n type=\"button\"\n onClick={() => setShowAllSavedCards(true)}\n className=\"text-xs text-primary hover:underline flex items-center gap-1 pl-1\"\n >\n <ChevronDown className=\"h-3 w-3\" />\n Show {otherSavedCards.length} more card\n {otherSavedCards.length > 1 ? 's' : ''}\n </button>\n )}\n </>\n )}\n </>\n )}\n\n {/* New Card Options */}\n <div className=\"text-xs font-medium text-muted-foreground uppercase tracking-wide pt-2\">\n {savedPaymentMethods.length > 0\n ? 'Or use new card'\n : canPayWithCredits\n ? 'Or pay with card'\n : 'Pay with Card'}\n </div>\n\n {/* Razorpay (India) */}\n {razorpayEnabled && isIndia && (\n <button\n type=\"button\"\n onClick={() => handleSelect('new', 'RAZORPAY')}\n className={`\n w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left\n ${\n isSelected('new', 'RAZORPAY')\n ? 'border-primary bg-primary/5 ring-1 ring-primary'\n : 'border-border hover:border-primary/50 hover:bg-muted/50'\n }\n `}\n >\n <CreditCard\n className={`h-5 w-5 shrink-0 ${isSelected('new', 'RAZORPAY') ? 'text-primary' : 'text-muted-foreground'}`}\n />\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">UPI / Cards / Netbanking</div>\n <div className=\"text-xs text-muted-foreground\">Razorpay</div>\n </div>\n <span className=\"text-xs px-2 py-0.5 rounded bg-accent-blue-subtle text-accent-blue\">\n Recommended\n </span>\n </button>\n )}\n\n {/* Stripe (International) */}\n {stripeEnabled && (\n <button\n type=\"button\"\n onClick={() => handleSelect('new', 'STRIPE')}\n className={`\n w-full flex items-center gap-3 p-4 rounded-lg border transition-all text-left\n ${\n isSelected('new', 'STRIPE')\n ? 'border-primary bg-primary/5 ring-1 ring-primary'\n : 'border-border hover:border-primary/50 hover:bg-muted/50'\n }\n `}\n >\n <CreditCard\n className={`h-5 w-5 shrink-0 ${isSelected('new', 'STRIPE') ? 'text-primary' : 'text-muted-foreground'}`}\n />\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-sm font-medium text-foreground\">Credit / Debit Cards</div>\n <div className=\"text-xs text-muted-foreground\">Stripe - Multi-currency</div>\n </div>\n {!isIndia && (\n <span className=\"text-xs px-2 py-0.5 rounded bg-accent-blue-subtle text-accent-blue\">\n Recommended\n </span>\n )}\n </button>\n )}\n\n {/* Save Card Checkbox - Only show when using new card (not saved card, not credits) */}\n {!selectedPaymentMethodId &&\n selectedProvider !== 'CREDITS' &&\n selectedProvider !== 'AUTO' &&\n !autoRenewEnabled && (\n <div className=\"mt-4 pt-4 border-t border-border\">\n <label className=\"flex items-start gap-3 cursor-pointer group\">\n <input\n type=\"checkbox\"\n checked={saveCard}\n onChange={(e) => onSaveCardChange(e.target.checked)}\n className=\"mt-0.5 h-4 w-4 rounded border-border text-primary focus:ring-primary focus:ring-offset-0\"\n />\n <div className=\"flex-1\">\n <div className=\"text-sm font-medium text-foreground group-hover:text-primary transition-colors\">\n Save card for future use\n </div>\n <div className=\"text-xs text-muted-foreground mt-0.5\">\n Securely save this payment method for faster checkout next time\n </div>\n </div>\n </label>\n </div>\n )}\n\n {/* Auto-renewal notice - Show when auto-renewal is enabled */}\n {!selectedPaymentMethodId &&\n selectedProvider !== 'CREDITS' &&\n selectedProvider !== 'AUTO' &&\n autoRenewEnabled && (\n <div className=\"mt-4 pt-4 border-t border-border\">\n <div className=\"flex items-start gap-2 text-xs text-muted-foreground bg-muted/50 p-3 rounded-lg\">\n <svg\n className=\"h-4 w-4 mt-0.5 flex-shrink-0\"\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=\"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <div>Your payment method will be securely saved for auto-renewal</div>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;AAsCA,IAAM,KAAe,MACW,EAA1B,MAAS,WAAkB,IACvB,GADsB,EAAQ,WAAU,WAAY,CAAA,EAIxD,KAAkB,MAKf,GAHL,EAAG,SAAS,gBAAgB,gBAAgB,EAAG,SAAS,eAAe,eAAe,EAAG,OAC7E,EAAG,QAAQ,SAAS,EAAG,UAAU,KACjC,EAAG,QAAQ,KAAK,EAAG,MAAM,KAAK,MAIjC,KAAuE,EAClF,wBACA,4BACA,sBACA,qBACA,qBACA,kBACA,oBACA,sBACA,qBACA,gBACA,mBACA,aACA,qBACA,sBAAmB,IACnB,eAAY,SACR;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,EAAI;AACzB,SAAO,MAAe,IAAM,IAAW;IAEnC,CAAC,GAAmB,KAAwB,EAAS,GAAM,EAC3D,IAAmB,KAAoB,GACvC,IAAU,MAAmB,MAG7B,IAAmB,EAAoB,MAAM,MAAO,EAAG,UAAU,IAAI,EAAoB,IACzF,IAAkB,EAAoB,QAAQ,MAAO,EAAG,OAAO,GAAkB,GAAG,EAEpF,KAAgB,GAAuB,MAAkB;AAC7D,MAAI,MAAS,SAAS;GAEpB,IAAM,IAAe,EAAoB,MAAM,MAAO,EAAG,OAAO,EAAM;AACtE,GAAI,MACF,EAAkB,EAAM,EAEpB,EAAa,0BACf,EAAiB,WAAW,GACnB,EAAa,yBACtB,EAAiB,SAAS;QAM9B,CADA,EAAkB,KAAK,EACvB,EAAiB,EAA2C;IAI1D,KAAc,GAAuB,MACrC,MAAS,UACJ,MAA4B,IAE5B,CAAC,KAA2B,MAAqB;AAI5D,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,MAAD;GAAI,WAAU;aACX,EAAG,kCAAkC,iBAAiB;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ACV,MAAK;OACL,SAAQ;OACR,QAAO;iBAEP,kBAAC,QAAD;QACE,eAAc;QACd,gBAAe;QACf,aAAa;QACb,GAAE;QACF,CAAA;OACE,CAAA,EACN,kBAAC,OAAD,EAAA,UAAK,+DAAiE,CAAA,CAClE;;KACF,CAAA;IAEN;KAEJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout Module Components
|
|
3
|
+
*/
|
|
4
|
+
export { BillingAccountSelector } from './BillingAccountSelector';
|
|
5
|
+
export { NativeCheckoutView } from './NativeCheckoutView';
|
|
6
|
+
export { PaymentProviderSelector } from './PaymentProviderSelector';
|
|
7
|
+
export { SavedCardSelector } from './SavedCardSelector';
|
|
8
|
+
export { CurrencySelector } from './CurrencySelector';
|
|
9
|
+
export { OrderSummary } from './OrderSummary';
|
|
10
|
+
export { PromoCodeInput } from './PromoCodeInput';
|
|
11
|
+
export { CreditsPaymentOption } from './CreditsPaymentOption';
|
|
12
|
+
export { CreditsAmountInput } from './CreditsAmountInput';
|
|
13
|
+
export { StripePaymentForm } from './StripePaymentForm';
|
|
14
|
+
export { RazorpayPaymentButton } from './RazorpayPaymentButton';
|
|
15
|
+
export { SubscriptionSelector } from './SubscriptionSelector';
|
|
16
|
+
export { AutoPayToggle } from './AutoPayToggle';
|
|
17
|
+
export { CompactAutoPayToggle } from './CompactAutoPayToggle';
|
|
18
|
+
export { SimpleAutoPayToggle } from './SimpleAutoPayToggle';
|
|
19
|
+
export { UnifiedPaymentMethodSelector } from './UnifiedPaymentMethodSelector';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./NativeCheckoutView.js";
|
|
2
|
+
import "./BillingAccountSelector.js";
|
|
3
|
+
import "./PaymentProviderSelector.js";
|
|
4
|
+
import "./SavedCardSelector.js";
|
|
5
|
+
import "./CurrencySelector.js";
|
|
6
|
+
import "./OrderSummary.js";
|
|
7
|
+
import "./PromoCodeInput.js";
|
|
8
|
+
import "./CreditsPaymentOption.js";
|
|
9
|
+
import "./CreditsAmountInput.js";
|
|
10
|
+
import "./StripePaymentForm.js";
|
|
11
|
+
import "./RazorpayPaymentButton.js";
|
|
12
|
+
import "./SubscriptionSelector.js";
|
|
13
|
+
import "./AutoPayToggle.js";
|
|
14
|
+
import "./CompactAutoPayToggle.js";
|
|
15
|
+
import "./SimpleAutoPayToggle.js";
|
|
16
|
+
import "./UnifiedPaymentMethodSelector.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout Module GraphQL Operations
|
|
3
|
+
* Re-exports typed documents from generated operations
|
|
4
|
+
*/
|
|
5
|
+
export { GetPaymentProviderConfigCheckoutDocument as GET_PAYMENT_PROVIDER_CONFIG, GetBillingAccountsCheckoutDocument as GET_BILLING_ACCOUNTS, GetDefaultBillingAccountCheckoutDocument as GET_DEFAULT_BILLING_ACCOUNT, GetPlanCheckoutDocument as GET_PLAN, GetSelectedAddonCheckoutDocument as GET_ADDON, GetCostOfCreditsCheckoutDocument as GET_COST_OF_CREDITS, ConvertCurrencyDocument as CONVERT_CURRENCY, GetDiscountByCodeDocument as GET_DISCOUNT_BY_CODE, InitiatePaymentCheckoutDocument as INITIATE_PAYMENT, GetPaymentMethodsCheckoutDocument as GET_PAYMENT_METHODS, SpendCreditsCheckoutDocument as SPEND_CREDITS, GetPaymentStatusDocument as GET_PAYMENT_STATUS, GetCreditTransactionStatusDocument as GET_CREDIT_TRANSACTION_STATUS, GetActiveSubscriptionsDocument as GET_ACTIVE_SUBSCRIPTIONS, CalculateTaxDocument as CALCULATE_TAX, GetStoreOrderDocument as GET_STORE_ORDER, } from '../../../../generated/global-operations';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/graphql/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,wCAAwC,IAAI,2BAA2B,EACvE,kCAAkC,IAAI,oBAAoB,EAC1D,wCAAwC,IAAI,2BAA2B,EACvE,uBAAuB,IAAI,QAAQ,EACnC,gCAAgC,IAAI,SAAS,EAC7C,gCAAgC,IAAI,mBAAmB,EACvD,uBAAuB,IAAI,gBAAgB,EAC3C,yBAAyB,IAAI,oBAAoB,EACjD,+BAA+B,IAAI,gBAAgB,EACnD,iCAAiC,IAAI,mBAAmB,EACxD,4BAA4B,IAAI,aAAa,EAC7C,wBAAwB,IAAI,kBAAkB,EAC9C,kCAAkC,IAAI,6BAA6B,EACnE,8BAA8B,IAAI,wBAAwB,EAC1D,oBAAoB,IAAI,aAAa,EACrC,qBAAqB,IAAI,eAAe,GACzC,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout Module Hooks
|
|
3
|
+
*/
|
|
4
|
+
export { useCheckout } from './useCheckout';
|
|
5
|
+
export { useNativeCheckout } from './useNativeCheckout';
|
|
6
|
+
export { usePaymentProviders } from './usePaymentProviders';
|
|
7
|
+
export { usePaymentStatusPolling } from './usePaymentStatusPolling';
|
|
8
|
+
export type { PaymentStatus, CreditTransactionStatus, UnifiedPaymentStatus, PaymentStatusResult, UsePaymentStatusPollingOptions, UsePaymentStatusPollingResult, } from './usePaymentStatusPolling';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EACV,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC"}
|