@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,293 @@
|
|
|
1
|
+
import { categoryTokens as e, statusTokens as t } from "../../../shared/utils/tokens.js";
|
|
2
|
+
import { formatCurrency as n } from "../../../shared/utils/format.js";
|
|
3
|
+
import { useMemo as r } from "react";
|
|
4
|
+
import { Blocks as i, Check as a, Coins as o, Minus as s, Package as c, Plus as l, Receipt as u, ShoppingCart as d, Trash2 as f } from "lucide-react";
|
|
5
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
6
|
+
import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
|
+
import { Accordion as _, AccordionContent as v, AccordionItem as y, AccordionTrigger as b } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
//#region src/billing/modules/checkout/components/OrderSummary.tsx
|
|
9
|
+
var x = 100, S = ({ items: S, subtotal: C, discountAmount: w, taxAmount: T, taxRate: E, taxType: D, total: O, currency: k, showInCredits: A = !1, isCalculatingTax: j = !1, onUpdateQuantity: M, onRemoveItem: N, isEditable: P = !0 }) => {
|
|
10
|
+
let { t: F } = g(), I = (e, t) => {
|
|
11
|
+
let n = F(e);
|
|
12
|
+
return n === e ? t : n;
|
|
13
|
+
}, L = (e) => {
|
|
14
|
+
switch (e) {
|
|
15
|
+
case "PLAN": return /* @__PURE__ */ m(c, { className: "h-5 w-5" });
|
|
16
|
+
case "ADDON": return /* @__PURE__ */ m(i, { className: "h-5 w-5" });
|
|
17
|
+
case "CREDITS": return /* @__PURE__ */ m(o, { className: "h-5 w-5" });
|
|
18
|
+
case "ORDER": return /* @__PURE__ */ m(d, { className: "h-5 w-5" });
|
|
19
|
+
default: return /* @__PURE__ */ m(c, { className: "h-5 w-5" });
|
|
20
|
+
}
|
|
21
|
+
}, R = (t) => ({
|
|
22
|
+
PLAN: {
|
|
23
|
+
label: "Plan",
|
|
24
|
+
className: `${e.plan.bg} ${e.plan.text}`
|
|
25
|
+
},
|
|
26
|
+
ADDON: {
|
|
27
|
+
label: "Add-on",
|
|
28
|
+
className: `${e.addon.bg} ${e.addon.text}`
|
|
29
|
+
},
|
|
30
|
+
CREDITS: {
|
|
31
|
+
label: "Credits",
|
|
32
|
+
className: `${e.credits.bg} ${e.credits.text}`
|
|
33
|
+
},
|
|
34
|
+
ORDER: {
|
|
35
|
+
label: "Store Order",
|
|
36
|
+
className: "bg-status-success-bg-subtle text-status-success-text"
|
|
37
|
+
}
|
|
38
|
+
})[t], z = (e) => e * x, B = r(() => S.reduce((e, t) => e + (t.priceUSD ?? t.price) * t.quantity, 0), [S]), V = (e, t) => A ? `${z(t?.priceUSD ?? e).toLocaleString(void 0, {
|
|
39
|
+
minimumFractionDigits: 0,
|
|
40
|
+
maximumFractionDigits: 0
|
|
41
|
+
})} Credits` : n(e, k), H = (e, t) => typeof t == "boolean" ? t ? "Included" : "Not included" : typeof t == "number" ? t === -1 || t === Infinity ? "Unlimited" : t.toLocaleString() : String(t), U = (e) => {
|
|
42
|
+
let t = /* @__PURE__ */ new Map();
|
|
43
|
+
for (let n of e) {
|
|
44
|
+
let e = t.get(n.name);
|
|
45
|
+
if (e) {
|
|
46
|
+
let t = { ...e.limits };
|
|
47
|
+
if (n.limits) for (let [e, r] of Object.entries(n.limits)) {
|
|
48
|
+
let n = t[e];
|
|
49
|
+
typeof r == "number" && typeof n == "number" ? n === -1 || r === -1 ? t[e] = -1 : t[e] = n + r : t[e] = r;
|
|
50
|
+
}
|
|
51
|
+
e.limits = t;
|
|
52
|
+
} else t.set(n.name, {
|
|
53
|
+
...n,
|
|
54
|
+
limits: n.limits ? { ...n.limits } : void 0
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return Array.from(t.values());
|
|
58
|
+
}, W = (e) => !e || e.length === 0 ? null : /* @__PURE__ */ m("ul", {
|
|
59
|
+
className: "space-y-2",
|
|
60
|
+
children: U(e).map((e) => /* @__PURE__ */ h("li", {
|
|
61
|
+
className: "flex items-start gap-2",
|
|
62
|
+
children: [/* @__PURE__ */ m(a, { className: `h-4 w-4 ${t.success.icon} shrink-0 mt-0.5` }), /* @__PURE__ */ h("div", {
|
|
63
|
+
className: "flex-1 min-w-0",
|
|
64
|
+
children: [/* @__PURE__ */ m("span", {
|
|
65
|
+
className: "text-sm text-foreground",
|
|
66
|
+
children: e.name
|
|
67
|
+
}), e.limits && Object.keys(e.limits).length > 0 && /* @__PURE__ */ m("div", {
|
|
68
|
+
className: "mt-1 flex flex-wrap gap-1.5",
|
|
69
|
+
children: Object.entries(e.limits).map(([e, t]) => /* @__PURE__ */ h("span", {
|
|
70
|
+
className: "inline-flex items-center text-xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground",
|
|
71
|
+
children: [
|
|
72
|
+
e,
|
|
73
|
+
": ",
|
|
74
|
+
H(e, t)
|
|
75
|
+
]
|
|
76
|
+
}, e))
|
|
77
|
+
})]
|
|
78
|
+
})]
|
|
79
|
+
}, e.id))
|
|
80
|
+
});
|
|
81
|
+
return /* @__PURE__ */ h("div", {
|
|
82
|
+
className: "rounded-lg border border-border bg-card overflow-hidden",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ m("div", {
|
|
85
|
+
className: "px-4 py-3 border-b border-border bg-muted/30",
|
|
86
|
+
children: /* @__PURE__ */ h("div", {
|
|
87
|
+
className: "flex items-center gap-2",
|
|
88
|
+
children: [/* @__PURE__ */ m(u, { className: "h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ m("h3", {
|
|
89
|
+
className: "font-semibold text-foreground",
|
|
90
|
+
children: I("billing.checkout.orderSummary", "Order Summary")
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ m("div", {
|
|
95
|
+
className: "divide-y divide-border",
|
|
96
|
+
children: S.length === 0 ? /* @__PURE__ */ h("div", {
|
|
97
|
+
className: "p-6 text-center",
|
|
98
|
+
children: [/* @__PURE__ */ m(c, { className: "mx-auto h-8 w-8 text-muted-foreground" }), /* @__PURE__ */ m("p", {
|
|
99
|
+
className: "mt-2 text-sm text-muted-foreground",
|
|
100
|
+
children: "No items in checkout"
|
|
101
|
+
})]
|
|
102
|
+
}) : S.map((e) => {
|
|
103
|
+
let t = R(e.type), n = e.features && e.features.length > 0;
|
|
104
|
+
return /* @__PURE__ */ m("div", {
|
|
105
|
+
className: "p-4",
|
|
106
|
+
children: /* @__PURE__ */ h("div", {
|
|
107
|
+
className: "flex items-start gap-3",
|
|
108
|
+
children: [/* @__PURE__ */ m("div", {
|
|
109
|
+
className: "p-2 rounded-lg bg-muted text-muted-foreground shrink-0",
|
|
110
|
+
children: L(e.type)
|
|
111
|
+
}), /* @__PURE__ */ h("div", {
|
|
112
|
+
className: "flex-1 min-w-0",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ h("div", {
|
|
115
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
116
|
+
children: [/* @__PURE__ */ m("span", {
|
|
117
|
+
className: "font-medium text-foreground",
|
|
118
|
+
children: e.name
|
|
119
|
+
}), /* @__PURE__ */ m("span", {
|
|
120
|
+
className: `text-xs px-1.5 py-0.5 rounded ${t.className}`,
|
|
121
|
+
children: t.label
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
e.description && /* @__PURE__ */ m("p", {
|
|
125
|
+
className: "text-sm text-muted-foreground mt-0.5 line-clamp-2",
|
|
126
|
+
children: e.description
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ h("div", {
|
|
129
|
+
className: "flex items-center justify-between mt-3",
|
|
130
|
+
children: [P && e.type !== "PLAN" ? /* @__PURE__ */ h("div", {
|
|
131
|
+
className: "flex items-center gap-2",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ m("button", {
|
|
134
|
+
type: "button",
|
|
135
|
+
onClick: () => M?.(e.id, e.quantity - 1),
|
|
136
|
+
disabled: e.quantity <= 1,
|
|
137
|
+
className: "p-1 rounded border border-border hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed",
|
|
138
|
+
"aria-label": `Decrease ${e.name} quantity`,
|
|
139
|
+
children: /* @__PURE__ */ m(s, { className: "h-3 w-3" })
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ m("span", {
|
|
142
|
+
className: "w-8 text-center text-sm font-medium",
|
|
143
|
+
children: e.quantity
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ m("button", {
|
|
146
|
+
type: "button",
|
|
147
|
+
onClick: () => M?.(e.id, e.quantity + 1),
|
|
148
|
+
className: "p-1 rounded border border-border hover:bg-muted",
|
|
149
|
+
"aria-label": `Increase ${e.name} quantity`,
|
|
150
|
+
children: /* @__PURE__ */ m(l, { className: "h-3 w-3" })
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
}) : /* @__PURE__ */ h("span", {
|
|
154
|
+
className: "text-sm text-muted-foreground",
|
|
155
|
+
children: ["Qty: ", e.quantity]
|
|
156
|
+
}), /* @__PURE__ */ h("div", {
|
|
157
|
+
className: "flex items-center gap-3",
|
|
158
|
+
children: [/* @__PURE__ */ m("span", {
|
|
159
|
+
className: "font-medium text-foreground",
|
|
160
|
+
children: V(e.price * e.quantity, e)
|
|
161
|
+
}), P && N && /* @__PURE__ */ m("button", {
|
|
162
|
+
type: "button",
|
|
163
|
+
onClick: () => N(e.id),
|
|
164
|
+
className: "p-1.5 rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10",
|
|
165
|
+
"aria-label": `Remove ${e.name}`,
|
|
166
|
+
children: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
|
|
167
|
+
})]
|
|
168
|
+
})]
|
|
169
|
+
}),
|
|
170
|
+
n && (() => {
|
|
171
|
+
let t = U(e.features).length;
|
|
172
|
+
return /* @__PURE__ */ m(_, {
|
|
173
|
+
type: "single",
|
|
174
|
+
collapsible: !0,
|
|
175
|
+
className: "mt-3",
|
|
176
|
+
children: /* @__PURE__ */ h(y, {
|
|
177
|
+
value: "features",
|
|
178
|
+
className: "border-0",
|
|
179
|
+
children: [/* @__PURE__ */ m(b, {
|
|
180
|
+
className: "py-2 px-0 text-sm text-muted-foreground hover:text-foreground hover:no-underline",
|
|
181
|
+
children: /* @__PURE__ */ h("span", {
|
|
182
|
+
className: "flex items-center gap-1.5",
|
|
183
|
+
children: [
|
|
184
|
+
/* @__PURE__ */ m(a, { className: "h-3.5 w-3.5" }),
|
|
185
|
+
t,
|
|
186
|
+
" ",
|
|
187
|
+
t === 1 ? "feature" : "features",
|
|
188
|
+
" ",
|
|
189
|
+
"included"
|
|
190
|
+
]
|
|
191
|
+
})
|
|
192
|
+
}), /* @__PURE__ */ m(v, {
|
|
193
|
+
className: "pt-2 pb-0",
|
|
194
|
+
children: W(e.features)
|
|
195
|
+
})]
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
})()
|
|
199
|
+
]
|
|
200
|
+
})]
|
|
201
|
+
})
|
|
202
|
+
}, e.id);
|
|
203
|
+
})
|
|
204
|
+
}),
|
|
205
|
+
S.length > 0 && /* @__PURE__ */ m("div", {
|
|
206
|
+
className: "border-t border-border bg-muted/20",
|
|
207
|
+
children: /* @__PURE__ */ h("div", {
|
|
208
|
+
className: "p-4 space-y-2",
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ h("div", {
|
|
211
|
+
className: "flex items-center justify-between text-sm",
|
|
212
|
+
children: [/* @__PURE__ */ m("span", {
|
|
213
|
+
className: "text-muted-foreground",
|
|
214
|
+
children: I("billing.checkout.subtotal", "Subtotal")
|
|
215
|
+
}), /* @__PURE__ */ m("span", {
|
|
216
|
+
className: "text-foreground",
|
|
217
|
+
children: V(A ? B : C)
|
|
218
|
+
})]
|
|
219
|
+
}),
|
|
220
|
+
w > 0 && /* @__PURE__ */ h("div", {
|
|
221
|
+
className: "flex items-center justify-between text-sm",
|
|
222
|
+
children: [/* @__PURE__ */ m("span", {
|
|
223
|
+
className: t.success.text,
|
|
224
|
+
children: "Discount"
|
|
225
|
+
}), /* @__PURE__ */ h("span", {
|
|
226
|
+
className: t.success.text,
|
|
227
|
+
children: ["-", V(w)]
|
|
228
|
+
})]
|
|
229
|
+
}),
|
|
230
|
+
j ? /* @__PURE__ */ h("div", {
|
|
231
|
+
className: "flex items-center justify-between text-sm",
|
|
232
|
+
children: [/* @__PURE__ */ m("span", {
|
|
233
|
+
className: "text-muted-foreground",
|
|
234
|
+
children: "Tax"
|
|
235
|
+
}), /* @__PURE__ */ m("span", {
|
|
236
|
+
className: "text-muted-foreground animate-pulse",
|
|
237
|
+
children: "Calculating..."
|
|
238
|
+
})]
|
|
239
|
+
}) : T > 0 && E > 0 ? /* @__PURE__ */ h("div", {
|
|
240
|
+
className: "flex items-center justify-between text-sm",
|
|
241
|
+
children: [/* @__PURE__ */ h("span", {
|
|
242
|
+
className: "text-muted-foreground",
|
|
243
|
+
children: [
|
|
244
|
+
D || "Tax",
|
|
245
|
+
" (",
|
|
246
|
+
(E * 100).toFixed(0),
|
|
247
|
+
"%)"
|
|
248
|
+
]
|
|
249
|
+
}), /* @__PURE__ */ m("span", {
|
|
250
|
+
className: "text-foreground",
|
|
251
|
+
children: V(T)
|
|
252
|
+
})]
|
|
253
|
+
}) : null,
|
|
254
|
+
/* @__PURE__ */ m("div", { className: "border-t border-border my-2" }),
|
|
255
|
+
A ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h("div", {
|
|
256
|
+
className: "flex items-center justify-between",
|
|
257
|
+
children: [/* @__PURE__ */ m("span", {
|
|
258
|
+
className: "font-semibold text-foreground",
|
|
259
|
+
children: I("billing.checkout.total", "Total")
|
|
260
|
+
}), /* @__PURE__ */ h("span", {
|
|
261
|
+
className: "text-xl font-bold text-foreground",
|
|
262
|
+
children: [
|
|
263
|
+
z(B).toLocaleString(void 0, {
|
|
264
|
+
minimumFractionDigits: 0,
|
|
265
|
+
maximumFractionDigits: 0
|
|
266
|
+
}),
|
|
267
|
+
" ",
|
|
268
|
+
"Credits"
|
|
269
|
+
]
|
|
270
|
+
})]
|
|
271
|
+
}), /* @__PURE__ */ m("p", {
|
|
272
|
+
className: "text-xs text-center text-muted-foreground pt-2",
|
|
273
|
+
children: "Paying with account credits"
|
|
274
|
+
})] }) : /* @__PURE__ */ m(p, { children: /* @__PURE__ */ h("div", {
|
|
275
|
+
className: "flex items-center justify-between",
|
|
276
|
+
children: [/* @__PURE__ */ h("span", {
|
|
277
|
+
className: "font-semibold text-foreground",
|
|
278
|
+
children: ["Total in ", k]
|
|
279
|
+
}), /* @__PURE__ */ m("span", {
|
|
280
|
+
className: "text-xl font-bold text-foreground",
|
|
281
|
+
children: n(O, k)
|
|
282
|
+
})]
|
|
283
|
+
}) })
|
|
284
|
+
]
|
|
285
|
+
})
|
|
286
|
+
})
|
|
287
|
+
]
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
//#endregion
|
|
291
|
+
export { S as OrderSummary };
|
|
292
|
+
|
|
293
|
+
//# sourceMappingURL=OrderSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderSummary.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/OrderSummary.tsx"],"sourcesContent":["/**\n * Order Summary Component\n * Displays checkout items, discounts, taxes, and total\n */\n\nimport { type FC, useMemo } from 'react';\nimport {\n Package,\n Blocks,\n Coins,\n Minus,\n Plus,\n Trash2,\n Receipt,\n Check,\n ShoppingCart,\n} from 'lucide-react';\nimport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from '@burdenoff/fe-libs/ui';\nimport type { CheckoutItem, Currency, CheckoutFeature } from '../types';\nimport { formatCurrency } from '../../../shared/utils/format';\nimport { categoryTokens, statusTokens } from '../../../shared/utils/tokens';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\n/**\n * Credit conversion rate: How many credits equal 1 USD\n * This should match the backend creditRate.rateUSD (default 0.01 means 100 credits = $1)\n */\nconst CREDITS_PER_USD = 100;\n\ninterface OrderSummaryProps {\n items: CheckoutItem[];\n subtotal: number;\n discountAmount: number;\n taxAmount: number;\n taxRate: number;\n taxType?: string;\n total: number;\n currency: Currency;\n showInCredits?: boolean;\n /** Whether tax is being calculated */\n isCalculatingTax?: boolean;\n onUpdateQuantity?: (itemId: string, quantity: number) => void;\n onRemoveItem?: (itemId: string) => void;\n isEditable?: boolean;\n}\n\nexport const OrderSummary: FC<OrderSummaryProps> = ({\n items,\n subtotal,\n discountAmount,\n taxAmount,\n taxRate,\n taxType,\n total,\n currency,\n showInCredits = false,\n isCalculatingTax = false,\n onUpdateQuantity,\n onRemoveItem,\n isEditable = true,\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 getItemIcon = (type: CheckoutItem['type']) => {\n switch (type) {\n case 'PLAN':\n return <Package className=\"h-5 w-5\" />;\n case 'ADDON':\n return <Blocks className=\"h-5 w-5\" />;\n case 'CREDITS':\n return <Coins className=\"h-5 w-5\" />;\n case 'ORDER':\n return <ShoppingCart className=\"h-5 w-5\" />;\n default:\n return <Package className=\"h-5 w-5\" />;\n }\n };\n\n const getItemTypeBadge = (type: CheckoutItem['type']) => {\n const badges = {\n PLAN: {\n label: 'Plan',\n className: `${categoryTokens.plan.bg} ${categoryTokens.plan.text}`,\n },\n ADDON: {\n label: 'Add-on',\n className: `${categoryTokens.addon.bg} ${categoryTokens.addon.text}`,\n },\n CREDITS: {\n label: 'Credits',\n className: `${categoryTokens.credits.bg} ${categoryTokens.credits.text}`,\n },\n ORDER: {\n label: 'Store Order',\n className: 'bg-status-success-bg-subtle text-status-success-text',\n },\n };\n return badges[type];\n };\n\n // Convert USD amount to credits\n const usdToCredits = (usdAmount: number) => usdAmount * CREDITS_PER_USD;\n\n // Subtotal in USD — used for credit conversion (items may be priced in local currency)\n const subtotalUSD = useMemo(\n () => items.reduce((sum, item) => sum + (item.priceUSD ?? item.price) * item.quantity, 0),\n [items]\n );\n\n // Format amount - show in credits if paying with credits, otherwise in selected currency\n // Items now have their prices stored in the selected currency (from currencyPrices)\n // For credit conversion always use priceUSD (base USD price) — not the localized price.\n const formatAmount = (amount: number, item?: CheckoutItem) => {\n if (showInCredits) {\n const usdAmount = item?.priceUSD ?? amount;\n const creditsAmount = usdToCredits(usdAmount);\n return `${creditsAmount.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 0 })} Credits`;\n }\n // Format in selected currency (items now have localized prices)\n return formatCurrency(amount, currency);\n };\n\n // Format limit value for display\n const formatLimitValue = (_key: string, value: unknown): string => {\n if (typeof value === 'boolean') {\n return value ? 'Included' : 'Not included';\n }\n if (typeof value === 'number') {\n if (value === -1 || value === Infinity) return 'Unlimited';\n return value.toLocaleString();\n }\n return String(value);\n };\n\n // Merge duplicate features by name, combining numeric limits\n const mergeFeatures = (features: CheckoutFeature[]): CheckoutFeature[] => {\n const merged = new Map<string, CheckoutFeature>();\n\n for (const feature of features) {\n const existing = merged.get(feature.name);\n if (existing) {\n // Merge limits - add numeric values together\n const mergedLimits: Record<string, number | string | boolean> = { ...existing.limits };\n if (feature.limits) {\n for (const [key, value] of Object.entries(feature.limits)) {\n const existingValue = mergedLimits[key];\n if (typeof value === 'number' && typeof existingValue === 'number') {\n // Both are numbers - add them (unless unlimited)\n if (existingValue === -1 || value === -1) {\n mergedLimits[key] = -1; // Unlimited stays unlimited\n } else {\n mergedLimits[key] = existingValue + value;\n }\n } else {\n // Non-numeric or first occurrence - just set\n mergedLimits[key] = value;\n }\n }\n }\n existing.limits = mergedLimits;\n } else {\n // Clone the feature to avoid mutating original\n merged.set(feature.name, {\n ...feature,\n limits: feature.limits ? { ...feature.limits } : undefined,\n });\n }\n }\n\n return Array.from(merged.values());\n };\n\n // Render features list\n const renderFeatures = (features: CheckoutFeature[]) => {\n if (!features || features.length === 0) return null;\n\n const mergedFeatures = mergeFeatures(features);\n\n return (\n <ul className=\"space-y-2\">\n {mergedFeatures.map((feature) => (\n <li key={feature.id} className=\"flex items-start gap-2\">\n <Check className={`h-4 w-4 ${statusTokens.success.icon} shrink-0 mt-0.5`} />\n <div className=\"flex-1 min-w-0\">\n <span className=\"text-sm text-foreground\">{feature.name}</span>\n {feature.limits && Object.keys(feature.limits).length > 0 && (\n <div className=\"mt-1 flex flex-wrap gap-1.5\">\n {Object.entries(feature.limits).map(([key, value]) => (\n <span\n key={key}\n className=\"inline-flex items-center text-xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground\"\n >\n {key}: {formatLimitValue(key, value)}\n </span>\n ))}\n </div>\n )}\n </div>\n </li>\n ))}\n </ul>\n );\n };\n\n return (\n <div className=\"rounded-lg border border-border bg-card overflow-hidden\">\n {/* Header */}\n <div className=\"px-4 py-3 border-b border-border bg-muted/30\">\n <div className=\"flex items-center gap-2\">\n <Receipt className=\"h-4 w-4 text-muted-foreground\" />\n <h3 className=\"font-semibold text-foreground\">\n {tr('billing.checkout.orderSummary', 'Order Summary')}\n </h3>\n </div>\n </div>\n\n {/* Items */}\n <div className=\"divide-y divide-border\">\n {items.length === 0 ? (\n <div className=\"p-6 text-center\">\n <Package className=\"mx-auto h-8 w-8 text-muted-foreground\" />\n <p className=\"mt-2 text-sm text-muted-foreground\">No items in checkout</p>\n </div>\n ) : (\n items.map((item) => {\n const badge = getItemTypeBadge(item.type);\n const hasFeatures = item.features && item.features.length > 0;\n\n return (\n <div key={item.id} className=\"p-4\">\n <div className=\"flex items-start gap-3\">\n {/* Icon */}\n <div className=\"p-2 rounded-lg bg-muted text-muted-foreground shrink-0\">\n {getItemIcon(item.type)}\n </div>\n\n {/* Item details */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <span className=\"font-medium text-foreground\">{item.name}</span>\n <span className={`text-xs px-1.5 py-0.5 rounded ${badge.className}`}>\n {badge.label}\n </span>\n </div>\n {item.description && (\n <p className=\"text-sm text-muted-foreground mt-0.5 line-clamp-2\">\n {item.description}\n </p>\n )}\n\n {/* Quantity controls */}\n <div className=\"flex items-center justify-between mt-3\">\n {isEditable && item.type !== 'PLAN' ? (\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => onUpdateQuantity?.(item.id, item.quantity - 1)}\n disabled={item.quantity <= 1}\n className=\"p-1 rounded border border-border hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed\"\n aria-label={`Decrease ${item.name} quantity`}\n >\n <Minus className=\"h-3 w-3\" />\n </button>\n <span className=\"w-8 text-center text-sm font-medium\">\n {item.quantity}\n </span>\n <button\n type=\"button\"\n onClick={() => onUpdateQuantity?.(item.id, item.quantity + 1)}\n className=\"p-1 rounded border border-border hover:bg-muted\"\n aria-label={`Increase ${item.name} quantity`}\n >\n <Plus className=\"h-3 w-3\" />\n </button>\n </div>\n ) : (\n <span className=\"text-sm text-muted-foreground\">Qty: {item.quantity}</span>\n )}\n\n <div className=\"flex items-center gap-3\">\n <span className=\"font-medium text-foreground\">\n {formatAmount(item.price * item.quantity, item)}\n </span>\n {isEditable && onRemoveItem && (\n <button\n type=\"button\"\n onClick={() => onRemoveItem(item.id)}\n className=\"p-1.5 rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10\"\n aria-label={`Remove ${item.name}`}\n >\n <Trash2 className=\"h-4 w-4\" />\n </button>\n )}\n </div>\n </div>\n\n {/* Features - Collapsible */}\n {hasFeatures &&\n (() => {\n const mergedCount = mergeFeatures(item.features!).length;\n return (\n <Accordion type=\"single\" collapsible className=\"mt-3\">\n <AccordionItem value=\"features\" className=\"border-0\">\n <AccordionTrigger className=\"py-2 px-0 text-sm text-muted-foreground hover:text-foreground hover:no-underline\">\n <span className=\"flex items-center gap-1.5\">\n <Check className=\"h-3.5 w-3.5\" />\n {mergedCount} {mergedCount === 1 ? 'feature' : 'features'}{' '}\n included\n </span>\n </AccordionTrigger>\n <AccordionContent className=\"pt-2 pb-0\">\n {renderFeatures(item.features!)}\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n })()}\n </div>\n </div>\n </div>\n );\n })\n )}\n </div>\n\n {/* Totals */}\n {items.length > 0 && (\n <div className=\"border-t border-border bg-muted/20\">\n <div className=\"p-4 space-y-2\">\n {/* Subtotal - already in selected currency (from currencyPrices) */}\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-muted-foreground\">\n {tr('billing.checkout.subtotal', 'Subtotal')}\n </span>\n <span className=\"text-foreground\">\n {showInCredits ? formatAmount(subtotalUSD) : formatAmount(subtotal)}\n </span>\n </div>\n\n {/* Discount */}\n {discountAmount > 0 && (\n <div className=\"flex items-center justify-between text-sm\">\n <span className={statusTokens.success.text}>Discount</span>\n <span className={statusTokens.success.text}>-{formatAmount(discountAmount)}</span>\n </div>\n )}\n\n {/* Tax - calculated on the subtotal in selected currency */}\n {isCalculatingTax ? (\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-muted-foreground\">Tax</span>\n <span className=\"text-muted-foreground animate-pulse\">Calculating...</span>\n </div>\n ) : taxAmount > 0 && taxRate > 0 ? (\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-muted-foreground\">\n {taxType || 'Tax'} ({(taxRate * 100).toFixed(0)}%)\n </span>\n <span className=\"text-foreground\">{formatAmount(taxAmount)}</span>\n </div>\n ) : null}\n\n {/* Divider */}\n <div className=\"border-t border-border my-2\" />\n\n {/* Total - show in credits or selected currency */}\n {showInCredits ? (\n <>\n {/* Credit payment: Show total in credits */}\n <div className=\"flex items-center justify-between\">\n <span className=\"font-semibold text-foreground\">\n {tr('billing.checkout.total', 'Total')}\n </span>\n <span className=\"text-xl font-bold text-foreground\">\n {usdToCredits(subtotalUSD).toLocaleString(undefined, {\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n })}{' '}\n Credits\n </span>\n </div>\n <p className=\"text-xs text-center text-muted-foreground pt-2\">\n Paying with account credits\n </p>\n </>\n ) : (\n <>\n {/* Card payment: Show total in selected currency */}\n {/* Items already have localized prices from currencyPrices - no conversion needed */}\n <div className=\"flex items-center justify-between\">\n <span className=\"font-semibold text-foreground\">Total in {currency}</span>\n <span className=\"text-xl font-bold text-foreground\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ACG,EAAa,EAAY,CAAC,eAAe,KAAA,GAAW;UACnD,uBAAuB;UACvB,uBAAuB;UACxB,CAAC;SAAE;SAAI;SAEH;UACH;UACN,kBAAC,KAAD;OAAG,WAAU;iBAAiD;OAE1D,CAAA,CACH,EAAA,CAAA,GAEH,kBAAA,GAAA,EAAA,UAGE,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,QAAD;QAAM,WAAU;kBAAhB,CAAgD,aAAU,EAAgB;WAC1E,kBAAC,QAAD;QAAM,WAAU;kBACb,EAAe,GAAO,EAAS;QAC3B,CAAA,CACH;UACL,CAAA;MAED;;IACF,CAAA;GAEJ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PaymentProvider, Currency } from '../types';
|
|
3
|
+
|
|
4
|
+
interface PaymentProviderSelectorProps {
|
|
5
|
+
selectedProvider: PaymentProvider;
|
|
6
|
+
onSelect: (provider: PaymentProvider) => void;
|
|
7
|
+
selectedCurrency: Currency;
|
|
8
|
+
stripeEnabled: boolean;
|
|
9
|
+
razorpayEnabled: boolean;
|
|
10
|
+
canPayWithCredits: boolean;
|
|
11
|
+
availableCredits: number;
|
|
12
|
+
totalAmount: number;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
/** Billing address country code (e.g., 'IN', 'US') - used to restrict payment providers */
|
|
15
|
+
billingCountry?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const PaymentProviderSelector: FC<PaymentProviderSelectorProps>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=PaymentProviderSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentProviderSelector.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/PaymentProviderSelector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAS1D,UAAU,4BAA4B;IACpC,gBAAgB,EAAE,eAAe,CAAC;IAClC,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,QAAQ,CAAC;IAC3B,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,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAYD,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA6LpE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface PromoCodeInputProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onValidate: () => Promise<{
|
|
7
|
+
valid: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
}>;
|
|
10
|
+
onClear: () => void;
|
|
11
|
+
isApplied: boolean;
|
|
12
|
+
discountValue?: number;
|
|
13
|
+
discountType?: 'PERCENTAGE' | 'FIXED';
|
|
14
|
+
isValidating?: boolean;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const PromoCodeInput: FC<PromoCodeInputProps>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=PromoCodeInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromoCodeInput.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/PromoCodeInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAyB,MAAM,OAAO,CAAC;AAKvD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4IlD,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { statusTokens as e } from "../../../shared/utils/tokens.js";
|
|
2
|
+
import { useCallback as t, useState as n } from "react";
|
|
3
|
+
import { Check as r, Loader2 as i, Tag as a, X 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/PromoCodeInput.tsx
|
|
7
|
+
var u = ({ value: u, onChange: d, onValidate: f, onClear: p, isApplied: m, discountValue: h, discountType: g, isValidating: _ = !1, error: v }) => {
|
|
8
|
+
let { t: y } = l(), b = (e, t) => {
|
|
9
|
+
let n = y(e);
|
|
10
|
+
return n === e ? t : n;
|
|
11
|
+
}, [x, S] = n(null), C = t(async () => {
|
|
12
|
+
if (!u.trim()) {
|
|
13
|
+
S("Please enter a promo code");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
S(null);
|
|
17
|
+
let e = await f();
|
|
18
|
+
!e.valid && e.error && S(e.error);
|
|
19
|
+
}, [u, f]), w = t(() => {
|
|
20
|
+
S(null), p();
|
|
21
|
+
}, [p]), T = t((e) => {
|
|
22
|
+
e.key === "Enter" && (e.preventDefault(), C());
|
|
23
|
+
}, [C]), E = v || x;
|
|
24
|
+
return m && h ? /* @__PURE__ */ s("div", {
|
|
25
|
+
className: `rounded-lg border ${e.success.border} ${e.success.bg} p-3`,
|
|
26
|
+
children: /* @__PURE__ */ c("div", {
|
|
27
|
+
className: "flex items-center justify-between",
|
|
28
|
+
children: [/* @__PURE__ */ c("div", {
|
|
29
|
+
className: "flex items-center gap-2",
|
|
30
|
+
children: [/* @__PURE__ */ s("div", {
|
|
31
|
+
className: `p-1.5 rounded-full ${e.success.bg} ${e.success.icon}`,
|
|
32
|
+
children: /* @__PURE__ */ s(r, { className: "h-4 w-4" })
|
|
33
|
+
}), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
|
|
34
|
+
className: "flex items-center gap-1.5",
|
|
35
|
+
children: [/* @__PURE__ */ s("span", {
|
|
36
|
+
className: `font-medium ${e.success.text}`,
|
|
37
|
+
children: u.toUpperCase()
|
|
38
|
+
}), /* @__PURE__ */ s("span", {
|
|
39
|
+
className: `text-sm ${e.success.text}`,
|
|
40
|
+
children: "applied"
|
|
41
|
+
})]
|
|
42
|
+
}), /* @__PURE__ */ s("p", {
|
|
43
|
+
className: `text-sm ${e.success.text}`,
|
|
44
|
+
children: /* @__PURE__ */ c("span", {
|
|
45
|
+
className: "flex items-center gap-0.5",
|
|
46
|
+
children: [h.toFixed(2), " off your order"]
|
|
47
|
+
})
|
|
48
|
+
})] })]
|
|
49
|
+
}), /* @__PURE__ */ s("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
onClick: w,
|
|
52
|
+
className: `p-1.5 rounded-full hover:${e.success.bg} ${e.success.icon}`,
|
|
53
|
+
children: /* @__PURE__ */ s(o, { className: "h-4 w-4" })
|
|
54
|
+
})]
|
|
55
|
+
})
|
|
56
|
+
}) : /* @__PURE__ */ c("div", {
|
|
57
|
+
className: "space-y-2",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ s("label", {
|
|
60
|
+
className: "text-sm font-medium text-foreground",
|
|
61
|
+
children: b("billing.checkout.promoCode", "Promo Code")
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ c("div", {
|
|
64
|
+
className: "flex gap-2",
|
|
65
|
+
children: [/* @__PURE__ */ c("div", {
|
|
66
|
+
className: "relative flex-1",
|
|
67
|
+
children: [/* @__PURE__ */ s(a, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ s("input", {
|
|
68
|
+
type: "text",
|
|
69
|
+
value: u,
|
|
70
|
+
onChange: (e) => {
|
|
71
|
+
d(e.target.value.toUpperCase()), S(null);
|
|
72
|
+
},
|
|
73
|
+
onKeyDown: T,
|
|
74
|
+
placeholder: "Enter code",
|
|
75
|
+
disabled: _,
|
|
76
|
+
className: `
|
|
77
|
+
w-full pl-[3.25rem] pr-4 py-2.5 rounded-lg border bg-background text-foreground
|
|
78
|
+
placeholder:text-muted-foreground
|
|
79
|
+
focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary
|
|
80
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
81
|
+
${E ? "border-destructive focus:ring-destructive/20 focus:border-destructive" : "border-border"}
|
|
82
|
+
`
|
|
83
|
+
})]
|
|
84
|
+
}), /* @__PURE__ */ s("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
onClick: C,
|
|
87
|
+
disabled: !u.trim() || _,
|
|
88
|
+
className: "px-4 py-2.5 rounded-lg border border-border bg-muted text-foreground font-medium\n hover:bg-muted/80 disabled:opacity-50 disabled:cursor-not-allowed\n transition-colors duration-200",
|
|
89
|
+
children: _ ? /* @__PURE__ */ s(i, { className: "h-4 w-4 animate-spin" }) : "Apply"
|
|
90
|
+
})]
|
|
91
|
+
}),
|
|
92
|
+
E && /* @__PURE__ */ c("p", {
|
|
93
|
+
className: "text-sm text-destructive flex items-center gap-1.5",
|
|
94
|
+
children: [/* @__PURE__ */ s(o, { className: "h-3.5 w-3.5" }), E]
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { u as PromoCodeInput };
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=PromoCodeInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromoCodeInput.js","names":[],"sources":["../../../../../src/billing/modules/checkout/components/PromoCodeInput.tsx"],"sourcesContent":["/**\n * Promo Code Input Component\n * Input field for entering and validating discount codes\n */\n\nimport { type FC, useState, useCallback } from 'react';\nimport { Tag, Check, X, Loader2 } from 'lucide-react';\nimport { statusTokens } from '../../../shared/utils/tokens';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ninterface PromoCodeInputProps {\n value: string;\n onChange: (value: string) => void;\n onValidate: () => Promise<{ valid: boolean; error?: string }>;\n onClear: () => void;\n isApplied: boolean;\n discountValue?: number;\n discountType?: 'PERCENTAGE' | 'FIXED';\n isValidating?: boolean;\n error?: string;\n}\n\nexport const PromoCodeInput: FC<PromoCodeInputProps> = ({\n value,\n onChange,\n onValidate,\n onClear,\n isApplied,\n discountValue,\n discountType: _discountType,\n isValidating = false,\n error,\n}) => {\n void _discountType;\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 [localError, setLocalError] = useState<string | null>(null);\n\n const handleValidate = useCallback(async () => {\n if (!value.trim()) {\n setLocalError('Please enter a promo code');\n return;\n }\n setLocalError(null);\n const result = await onValidate();\n if (!result.valid && result.error) {\n setLocalError(result.error);\n }\n }, [value, onValidate]);\n\n const handleClear = useCallback(() => {\n setLocalError(null);\n onClear();\n }, [onClear]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n handleValidate();\n }\n },\n [handleValidate]\n );\n\n const displayError = error || localError;\n\n if (isApplied && discountValue) {\n // Show applied discount\n return (\n <div\n className={`rounded-lg border ${statusTokens.success.border} ${statusTokens.success.bg} p-3`}\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <div\n className={`p-1.5 rounded-full ${statusTokens.success.bg} ${statusTokens.success.icon}`}\n >\n <Check className=\"h-4 w-4\" />\n </div>\n <div>\n <div className=\"flex items-center gap-1.5\">\n <span className={`font-medium ${statusTokens.success.text}`}>\n {value.toUpperCase()}\n </span>\n <span className={`text-sm ${statusTokens.success.text}`}>applied</span>\n </div>\n <p className={`text-sm ${statusTokens.success.text}`}>\n {/* discountValue now contains the actual discount amount, not percentage */}\n <span className=\"flex items-center gap-0.5\">\n {discountValue.toFixed(2)} off your order\n </span>\n </p>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={handleClear}\n className={`p-1.5 rounded-full hover:${statusTokens.success.bg} ${statusTokens.success.icon}`}\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-2\">\n <label className=\"text-sm font-medium text-foreground\">\n {tr('billing.checkout.promoCode', 'Promo Code')}\n </label>\n <div className=\"flex gap-2\">\n <div className=\"relative flex-1\">\n <Tag className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground\" />\n <input\n type=\"text\"\n value={value}\n onChange={(e) => {\n onChange(e.target.value.toUpperCase());\n setLocalError(null);\n }}\n onKeyDown={handleKeyDown}\n placeholder=\"Enter code\"\n disabled={isValidating}\n className={`\n w-full pl-[3.25rem] pr-4 py-2.5 rounded-lg border bg-background text-foreground\n placeholder:text-muted-foreground\n focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\n disabled:opacity-50 disabled:cursor-not-allowed\n ${\n displayError\n ? 'border-destructive focus:ring-destructive/20 focus:border-destructive'\n : 'border-border'\n }\n `}\n />\n </div>\n <button\n type=\"button\"\n onClick={handleValidate}\n disabled={!value.trim() || isValidating}\n className=\"px-4 py-2.5 rounded-lg border border-border bg-muted text-foreground font-medium\n hover:bg-muted/80 disabled:opacity-50 disabled:cursor-not-allowed\n transition-colors duration-200\"\n >\n {isValidating ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : 'Apply'}\n </button>\n </div>\n\n {/* Error message */}\n {displayError && (\n <p className=\"text-sm text-destructive flex items-center gap-1.5\">\n <X className=\"h-3.5 w-3.5\" />\n {displayError}\n </p>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAsBA,IAAa,KAA2C,EACtD,UACA,aACA,eACA,YACA,cACA,kBACA,cAAc,GACd,kBAAe,IACf,eACI;CAEJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,EAAI;AACzB,SAAO,MAAe,IAAM,IAAW;IAEnC,CAAC,GAAY,KAAiB,EAAwB,KAAK,EAE3D,IAAiB,EAAY,YAAY;AAC7C,MAAI,CAAC,EAAM,MAAM,EAAE;AACjB,KAAc,4BAA4B;AAC1C;;AAEF,IAAc,KAAK;EACnB,IAAM,IAAS,MAAM,GAAY;AACjC,EAAI,CAAC,EAAO,SAAS,EAAO,SAC1B,EAAc,EAAO,MAAM;IAE5B,CAAC,GAAO,EAAW,CAAC,EAEjB,IAAc,QAAkB;AAEpC,EADA,EAAc,KAAK,EACnB,GAAS;IACR,CAAC,EAAQ,CAAC,EAEP,IAAgB,GACnB,MAA2B;AAC1B,EAAI,EAAE,QAAQ,YACZ,EAAE,gBAAgB,EAClB,GAAgB;IAGpB,CAAC,EAAe,CACjB,EAEK,IAAe,KAAS;AA0C9B,QAxCI,KAAa,IAGb,kBAAC,OAAD;EACE,WAAW,qBAAqB,EAAa,QAAQ,OAAO,GAAG,EAAa,QAAQ,GAAG;YAEvF,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KACE,WAA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GAAG;KACxD,CAAA,CACL;;GAGL,KACC,kBAAC,KAAD;IAAG,WAAU;cAAb,CACE,kBAAC,GAAD,EAAG,WAAU,eAAgB,CAAA,EAC5B,EACC;;GAEF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { RazorpaySuccessResponse } from '../types';
|
|
3
|
+
|
|
4
|
+
interface RazorpayPaymentButtonProps {
|
|
5
|
+
orderId: string;
|
|
6
|
+
keyId: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
customerId?: string;
|
|
12
|
+
prefill?: {
|
|
13
|
+
name?: string;
|
|
14
|
+
email?: string;
|
|
15
|
+
contact?: string;
|
|
16
|
+
};
|
|
17
|
+
notes?: Record<string, string>;
|
|
18
|
+
onSuccess: (response: RazorpaySuccessResponse) => void;
|
|
19
|
+
onError: (error: string) => void;
|
|
20
|
+
onCancel?: () => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const RazorpayPaymentButton: FC<RazorpayPaymentButtonProps>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=RazorpayPaymentButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RazorpayPaymentButton.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/checkout/components/RazorpayPaymentButton.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAoC,MAAM,OAAO,CAAC;AAGlE,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,UAAU,CAAC;AASlB,UAAU,0BAA0B;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,CAAC,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACvD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAID,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA0PhE,CAAC"}
|