@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,544 @@
|
|
|
1
|
+
import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
|
|
2
|
+
import { PageHeader as t } from "../../../shared/components/PageHeader.js";
|
|
3
|
+
import "../../../shared/components/index.js";
|
|
4
|
+
import { useBillingPermissions as n } from "../../../hooks/useBillingPermissions.js";
|
|
5
|
+
import { useDeactivateCouponMutation as r, useListCouponsQuery as i, useUpdateCouponMutation as a } from "../../../../generated/global-operations.js";
|
|
6
|
+
import { useBillingNavigate as o } from "../../../hooks/useBillingNavigate.js";
|
|
7
|
+
import { CouponStatus as s } from "../../../../generated/global-types.js";
|
|
8
|
+
import { useEffect as ee, useMemo as c, useState as l } from "react";
|
|
9
|
+
import { AlertCircle as u, CheckCircle as d, ChevronLeft as f, ChevronRight as te, DollarSign as p, Download as ne, Edit as m, Eye as h, Package as g, Percent as _, Plus as v, Power as y, PowerOff as b, Search as x, Tag as S, Trash2 as C, TrendingUp as w } from "lucide-react";
|
|
10
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
11
|
+
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
//#region src/billing/modules/coupons/pages/CouponsListPage.tsx
|
|
13
|
+
var O = () => {
|
|
14
|
+
let { t: O } = D(), re = (e, t) => {
|
|
15
|
+
let n = O(e);
|
|
16
|
+
return n === e ? t : n;
|
|
17
|
+
}, k = o(), ie = n(), [A, ae] = l(""), [j, M] = l("ALL"), [N, P] = l("ALL"), [F] = l("ALL"), [I, L] = l(0), [R, z] = l(null), [B, V] = l(null), [H, U] = l(null), { data: W, loading: G, refetch: K } = i({ variables: {
|
|
18
|
+
limit: 20,
|
|
19
|
+
offset: I * 20,
|
|
20
|
+
filter: {
|
|
21
|
+
status: j === "ALL" ? void 0 : j,
|
|
22
|
+
type: N === "ALL" ? void 0 : N,
|
|
23
|
+
scope: F === "ALL" ? void 0 : F,
|
|
24
|
+
search: A || void 0
|
|
25
|
+
}
|
|
26
|
+
} }), q = c(() => W?.listCoupons?.coupons ?? [], [W?.listCoupons?.coupons]), J = W?.listCoupons?.total ?? 0, oe = W?.listCoupons?.hasMore ?? !1, se = Math.ceil(J / 20), [ce, { loading: Y }] = r(), [le] = a(), X = q;
|
|
27
|
+
ee(() => {
|
|
28
|
+
L(0);
|
|
29
|
+
}, [
|
|
30
|
+
A,
|
|
31
|
+
j,
|
|
32
|
+
N,
|
|
33
|
+
F
|
|
34
|
+
]);
|
|
35
|
+
let Z = c(() => ({
|
|
36
|
+
totalCoupons: J,
|
|
37
|
+
activeCoupons: q.filter((e) => e.status === "ACTIVE").length,
|
|
38
|
+
totalUses: q.reduce((e, t) => e + t.currentUses, 0),
|
|
39
|
+
totalDiscountValue: q.reduce((e, t) => t.type === "FIXED_AMOUNT" ? e + t.value * t.currentUses : e, 0)
|
|
40
|
+
}), [q, J]);
|
|
41
|
+
if (!ie.canManageDiscounts) return /* @__PURE__ */ T(e, { message: "You don't have permission to manage coupons." });
|
|
42
|
+
let Q = (e) => new Intl.NumberFormat("en-US", {
|
|
43
|
+
style: "currency",
|
|
44
|
+
currency: "USD"
|
|
45
|
+
}).format(e), $ = (e) => new Date(e).toLocaleDateString("en-US", {
|
|
46
|
+
year: "numeric",
|
|
47
|
+
month: "short",
|
|
48
|
+
day: "numeric"
|
|
49
|
+
}), ue = (e) => {
|
|
50
|
+
switch (e) {
|
|
51
|
+
case "ACTIVE": return "text-status-success-text bg-status-success-bg-subtle";
|
|
52
|
+
case "INACTIVE": return "text-text-secondary bg-bg-canvas";
|
|
53
|
+
case "EXPIRED": return "text-status-error-text bg-status-error-bg-subtle";
|
|
54
|
+
default: return "text-text-secondary bg-bg-canvas";
|
|
55
|
+
}
|
|
56
|
+
}, de = (e) => {
|
|
57
|
+
switch (e) {
|
|
58
|
+
case "PERCENTAGE": return /* @__PURE__ */ T(_, { className: "h-4 w-4" });
|
|
59
|
+
case "FIXED_AMOUNT": return /* @__PURE__ */ T(p, { className: "h-4 w-4" });
|
|
60
|
+
case "FREE_SHIPPING": return /* @__PURE__ */ T(g, { className: "h-4 w-4" });
|
|
61
|
+
default: return /* @__PURE__ */ T(S, { className: "h-4 w-4" });
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ E("div", {
|
|
65
|
+
className: "max-w-7xl mx-auto p-4 sm:p-6 space-y-6",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ E("div", {
|
|
68
|
+
className: "flex items-center justify-between",
|
|
69
|
+
children: [/* @__PURE__ */ T(t, {
|
|
70
|
+
title: re("billing.coupons.title", "Coupons"),
|
|
71
|
+
description: "Manage discount codes and promotional offers",
|
|
72
|
+
icon: /* @__PURE__ */ T(S, { className: "h-6 w-6" })
|
|
73
|
+
}), /* @__PURE__ */ E("button", {
|
|
74
|
+
onClick: () => k("/coupons/create"),
|
|
75
|
+
className: "px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2",
|
|
76
|
+
children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Create Coupon"]
|
|
77
|
+
})]
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ E("div", {
|
|
80
|
+
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ E("div", {
|
|
83
|
+
className: "bg-card border border-border rounded-lg p-4",
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ E("div", {
|
|
86
|
+
className: "flex items-center justify-between mb-2",
|
|
87
|
+
children: [/* @__PURE__ */ T("span", {
|
|
88
|
+
className: "text-sm text-muted-foreground",
|
|
89
|
+
children: "Total Coupons"
|
|
90
|
+
}), /* @__PURE__ */ T(S, { className: "h-4 w-4 text-accent-blue" })]
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ T("p", {
|
|
93
|
+
className: "text-2xl font-bold text-foreground",
|
|
94
|
+
children: Z.totalCoupons
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ E("p", {
|
|
97
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
98
|
+
children: [Z.activeCoupons, " active"]
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ E("div", {
|
|
103
|
+
className: "bg-card border border-border rounded-lg p-4",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ E("div", {
|
|
106
|
+
className: "flex items-center justify-between mb-2",
|
|
107
|
+
children: [/* @__PURE__ */ T("span", {
|
|
108
|
+
className: "text-sm text-muted-foreground",
|
|
109
|
+
children: "Total Uses"
|
|
110
|
+
}), /* @__PURE__ */ T(w, { className: "h-4 w-4 text-status-success-text" })]
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ T("p", {
|
|
113
|
+
className: "text-2xl font-bold text-foreground",
|
|
114
|
+
children: Z.totalUses
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ T("p", {
|
|
117
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
118
|
+
children: "All time"
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ E("div", {
|
|
123
|
+
className: "bg-card border border-border rounded-lg p-4",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ E("div", {
|
|
126
|
+
className: "flex items-center justify-between mb-2",
|
|
127
|
+
children: [/* @__PURE__ */ T("span", {
|
|
128
|
+
className: "text-sm text-muted-foreground",
|
|
129
|
+
children: "Total Discount"
|
|
130
|
+
}), /* @__PURE__ */ T(p, { className: "h-4 w-4 text-accent-purple" })]
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ T("p", {
|
|
133
|
+
className: "text-2xl font-bold text-foreground",
|
|
134
|
+
children: Q(Z.totalDiscountValue)
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ T("p", {
|
|
137
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
138
|
+
children: "Fixed amount only"
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ E("div", {
|
|
143
|
+
className: "bg-card border border-border rounded-lg p-4",
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ E("div", {
|
|
146
|
+
className: "flex items-center justify-between mb-2",
|
|
147
|
+
children: [/* @__PURE__ */ T("span", {
|
|
148
|
+
className: "text-sm text-muted-foreground",
|
|
149
|
+
children: "Active Rate"
|
|
150
|
+
}), /* @__PURE__ */ T(d, { className: "h-4 w-4 text-status-success-text" })]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ E("p", {
|
|
153
|
+
className: "text-2xl font-bold text-foreground",
|
|
154
|
+
children: [Z.totalCoupons > 0 ? Math.round(Z.activeCoupons / Z.totalCoupons * 100) : 0, "%"]
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ T("p", {
|
|
157
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
158
|
+
children: "Of all coupons"
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}),
|
|
164
|
+
H && /* @__PURE__ */ E("div", {
|
|
165
|
+
className: H.tone === "success" ? "flex items-start gap-3 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-4 text-status-success-text" : "flex items-start gap-3 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-status-error-text",
|
|
166
|
+
role: "status",
|
|
167
|
+
"aria-live": "polite",
|
|
168
|
+
children: [H.tone === "success" ? /* @__PURE__ */ T(d, { className: "mt-0.5 h-4 w-4 shrink-0" }) : /* @__PURE__ */ T(u, { className: "mt-0.5 h-4 w-4 shrink-0" }), /* @__PURE__ */ T("p", {
|
|
169
|
+
className: "text-sm font-medium",
|
|
170
|
+
children: H.message
|
|
171
|
+
})]
|
|
172
|
+
}),
|
|
173
|
+
R && /* @__PURE__ */ T("div", {
|
|
174
|
+
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4",
|
|
175
|
+
children: /* @__PURE__ */ E("div", {
|
|
176
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
177
|
+
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("p", {
|
|
178
|
+
className: "font-medium text-status-error-text",
|
|
179
|
+
children: [
|
|
180
|
+
"Deactivate coupon ",
|
|
181
|
+
/* @__PURE__ */ T("span", {
|
|
182
|
+
className: "font-mono",
|
|
183
|
+
children: R.code
|
|
184
|
+
}),
|
|
185
|
+
"?"
|
|
186
|
+
]
|
|
187
|
+
}), /* @__PURE__ */ T("p", {
|
|
188
|
+
className: "mt-1 text-sm text-status-error-text",
|
|
189
|
+
children: "This will prevent new checkouts from applying this coupon."
|
|
190
|
+
})] }), /* @__PURE__ */ E("div", {
|
|
191
|
+
className: "flex gap-2 self-end sm:self-auto",
|
|
192
|
+
children: [/* @__PURE__ */ T("button", {
|
|
193
|
+
type: "button",
|
|
194
|
+
onClick: () => z(null),
|
|
195
|
+
className: "rounded-lg border border-border bg-background px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted",
|
|
196
|
+
children: "Cancel"
|
|
197
|
+
}), /* @__PURE__ */ T("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
onClick: () => fe(R.id),
|
|
200
|
+
disabled: Y,
|
|
201
|
+
className: "rounded-lg bg-destructive px-3 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-destructive/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
202
|
+
children: Y ? "Deactivating…" : "Deactivate"
|
|
203
|
+
})]
|
|
204
|
+
})]
|
|
205
|
+
})
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ T("div", {
|
|
208
|
+
className: "bg-card border border-border rounded-lg p-4",
|
|
209
|
+
children: /* @__PURE__ */ E("div", {
|
|
210
|
+
className: "grid grid-cols-1 md:grid-cols-4 gap-4",
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ T("div", {
|
|
213
|
+
className: "md:col-span-2",
|
|
214
|
+
children: /* @__PURE__ */ E("div", {
|
|
215
|
+
className: "relative",
|
|
216
|
+
children: [/* @__PURE__ */ T(x, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ T("input", {
|
|
217
|
+
type: "text",
|
|
218
|
+
placeholder: "Search coupons...",
|
|
219
|
+
value: A,
|
|
220
|
+
onChange: (e) => ae(e.target.value),
|
|
221
|
+
className: "w-full pl-10 pr-4 py-2 rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
222
|
+
})]
|
|
223
|
+
})
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ E("select", {
|
|
226
|
+
value: j,
|
|
227
|
+
onChange: (e) => {
|
|
228
|
+
M(e.target.value), L(0);
|
|
229
|
+
},
|
|
230
|
+
className: "px-4 py-2 rounded-lg border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ T("option", {
|
|
233
|
+
value: "ALL",
|
|
234
|
+
children: "All Status"
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ T("option", {
|
|
237
|
+
value: "ACTIVE",
|
|
238
|
+
children: "Active"
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ T("option", {
|
|
241
|
+
value: "INACTIVE",
|
|
242
|
+
children: "Inactive"
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ T("option", {
|
|
245
|
+
value: "EXPIRED",
|
|
246
|
+
children: "Expired"
|
|
247
|
+
})
|
|
248
|
+
]
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ E("select", {
|
|
251
|
+
value: N,
|
|
252
|
+
onChange: (e) => {
|
|
253
|
+
P(e.target.value), L(0);
|
|
254
|
+
},
|
|
255
|
+
className: "px-4 py-2 rounded-lg border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ T("option", {
|
|
258
|
+
value: "ALL",
|
|
259
|
+
children: "All Types"
|
|
260
|
+
}),
|
|
261
|
+
/* @__PURE__ */ T("option", {
|
|
262
|
+
value: "PERCENTAGE",
|
|
263
|
+
children: "Percentage"
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ T("option", {
|
|
266
|
+
value: "FIXED_AMOUNT",
|
|
267
|
+
children: "Fixed Amount"
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ T("option", {
|
|
270
|
+
value: "FREE_SHIPPING",
|
|
271
|
+
children: "Free Shipping"
|
|
272
|
+
})
|
|
273
|
+
]
|
|
274
|
+
})
|
|
275
|
+
]
|
|
276
|
+
})
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ T("div", {
|
|
279
|
+
className: "bg-card border border-border rounded-lg overflow-hidden",
|
|
280
|
+
children: /* @__PURE__ */ T("div", {
|
|
281
|
+
className: "overflow-x-auto",
|
|
282
|
+
children: /* @__PURE__ */ E("table", {
|
|
283
|
+
className: "w-full",
|
|
284
|
+
children: [/* @__PURE__ */ T("thead", {
|
|
285
|
+
className: "bg-muted/50 border-b border-border",
|
|
286
|
+
children: /* @__PURE__ */ E("tr", { children: [
|
|
287
|
+
/* @__PURE__ */ T("th", {
|
|
288
|
+
className: "text-left p-4 text-sm font-medium text-foreground",
|
|
289
|
+
children: "Code"
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ T("th", {
|
|
292
|
+
className: "text-left p-4 text-sm font-medium text-foreground",
|
|
293
|
+
children: "Type"
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ T("th", {
|
|
296
|
+
className: "text-left p-4 text-sm font-medium text-foreground",
|
|
297
|
+
children: "Value"
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ T("th", {
|
|
300
|
+
className: "text-left p-4 text-sm font-medium text-foreground",
|
|
301
|
+
children: "Status"
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ T("th", {
|
|
304
|
+
className: "text-left p-4 text-sm font-medium text-foreground",
|
|
305
|
+
children: "Usage"
|
|
306
|
+
}),
|
|
307
|
+
/* @__PURE__ */ T("th", {
|
|
308
|
+
className: "text-left p-4 text-sm font-medium text-foreground",
|
|
309
|
+
children: "Valid Until"
|
|
310
|
+
}),
|
|
311
|
+
/* @__PURE__ */ T("th", {
|
|
312
|
+
className: "text-right p-4 text-sm font-medium text-foreground",
|
|
313
|
+
children: "Actions"
|
|
314
|
+
})
|
|
315
|
+
] })
|
|
316
|
+
}), /* @__PURE__ */ T("tbody", {
|
|
317
|
+
className: "divide-y divide-border",
|
|
318
|
+
children: G ? /* @__PURE__ */ T("tr", { children: /* @__PURE__ */ T("td", {
|
|
319
|
+
colSpan: 7,
|
|
320
|
+
className: "p-8 text-center text-muted-foreground",
|
|
321
|
+
children: "Loading coupons..."
|
|
322
|
+
}) }) : X.length === 0 ? /* @__PURE__ */ T("tr", { children: /* @__PURE__ */ T("td", {
|
|
323
|
+
colSpan: 7,
|
|
324
|
+
className: "p-8 text-center text-muted-foreground",
|
|
325
|
+
children: "No coupons found"
|
|
326
|
+
}) }) : X.map((e) => /* @__PURE__ */ E("tr", {
|
|
327
|
+
className: "hover:bg-muted/50",
|
|
328
|
+
children: [
|
|
329
|
+
/* @__PURE__ */ T("td", {
|
|
330
|
+
className: "p-4",
|
|
331
|
+
children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
332
|
+
className: "font-medium text-foreground font-mono",
|
|
333
|
+
children: e.code
|
|
334
|
+
}), /* @__PURE__ */ T("p", {
|
|
335
|
+
className: "text-sm text-muted-foreground",
|
|
336
|
+
children: e.name
|
|
337
|
+
})] })
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ T("td", {
|
|
340
|
+
className: "p-4",
|
|
341
|
+
children: /* @__PURE__ */ E("div", {
|
|
342
|
+
className: "flex items-center gap-2",
|
|
343
|
+
children: [de(e.type), /* @__PURE__ */ T("span", {
|
|
344
|
+
className: "text-sm text-foreground capitalize",
|
|
345
|
+
children: e.type.replace("_", " ").toLowerCase()
|
|
346
|
+
})]
|
|
347
|
+
})
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ T("td", {
|
|
350
|
+
className: "p-4",
|
|
351
|
+
children: /* @__PURE__ */ T("span", {
|
|
352
|
+
className: "text-sm font-medium text-foreground",
|
|
353
|
+
children: e.type === "PERCENTAGE" ? `${e.value}%` : Q(e.value)
|
|
354
|
+
})
|
|
355
|
+
}),
|
|
356
|
+
/* @__PURE__ */ T("td", {
|
|
357
|
+
className: "p-4",
|
|
358
|
+
children: /* @__PURE__ */ T("span", {
|
|
359
|
+
className: `inline-flex px-2 py-1 rounded-full text-xs font-medium ${ue(e.status)}`,
|
|
360
|
+
children: e.status
|
|
361
|
+
})
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ E("td", {
|
|
364
|
+
className: "p-4",
|
|
365
|
+
children: [/* @__PURE__ */ E("div", {
|
|
366
|
+
className: "text-sm text-foreground",
|
|
367
|
+
children: [/* @__PURE__ */ T("span", {
|
|
368
|
+
className: "font-medium",
|
|
369
|
+
children: e.currentUses
|
|
370
|
+
}), e.maxTotalUses && /* @__PURE__ */ E("span", {
|
|
371
|
+
className: "text-muted-foreground",
|
|
372
|
+
children: [" / ", e.maxTotalUses]
|
|
373
|
+
})]
|
|
374
|
+
}), e.maxTotalUses && /* @__PURE__ */ T("div", {
|
|
375
|
+
className: "w-full bg-muted rounded-full h-1.5 mt-1",
|
|
376
|
+
children: /* @__PURE__ */ T("div", {
|
|
377
|
+
className: "bg-primary h-1.5 rounded-full",
|
|
378
|
+
style: { width: `${Math.min(e.currentUses / e.maxTotalUses * 100, 100)}%` }
|
|
379
|
+
})
|
|
380
|
+
})]
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ T("td", {
|
|
383
|
+
className: "p-4",
|
|
384
|
+
children: /* @__PURE__ */ T("span", {
|
|
385
|
+
className: "text-sm text-muted-foreground",
|
|
386
|
+
children: e.validUntil ? $(e.validUntil) : "No expiry"
|
|
387
|
+
})
|
|
388
|
+
}),
|
|
389
|
+
/* @__PURE__ */ T("td", {
|
|
390
|
+
className: "p-4",
|
|
391
|
+
children: /* @__PURE__ */ E("div", {
|
|
392
|
+
className: "flex items-center justify-end gap-2",
|
|
393
|
+
children: [
|
|
394
|
+
/* @__PURE__ */ T("button", {
|
|
395
|
+
onClick: () => k(`/coupons/${e.id}`),
|
|
396
|
+
className: "p-2 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground",
|
|
397
|
+
title: "View details",
|
|
398
|
+
children: /* @__PURE__ */ T(h, { className: "h-4 w-4" })
|
|
399
|
+
}),
|
|
400
|
+
/* @__PURE__ */ T("button", {
|
|
401
|
+
onClick: () => k(`/coupons/${e.id}/edit`),
|
|
402
|
+
className: "p-2 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground",
|
|
403
|
+
title: "Edit coupon",
|
|
404
|
+
children: /* @__PURE__ */ T(m, { className: "h-4 w-4" })
|
|
405
|
+
}),
|
|
406
|
+
e.status === "ACTIVE" ? /* @__PURE__ */ T("button", {
|
|
407
|
+
onClick: () => z(e),
|
|
408
|
+
disabled: Y || B === e.id,
|
|
409
|
+
className: "p-2 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive disabled:opacity-50 disabled:cursor-not-allowed",
|
|
410
|
+
title: "Deactivate coupon",
|
|
411
|
+
children: /* @__PURE__ */ T(b, { className: "h-4 w-4" })
|
|
412
|
+
}) : e.status === "INACTIVE" ? /* @__PURE__ */ T("button", {
|
|
413
|
+
onClick: () => pe(e.id, s.Active),
|
|
414
|
+
disabled: B === e.id,
|
|
415
|
+
className: "p-2 rounded-lg hover:bg-status-success-bg-subtle text-muted-foreground hover:text-status-success-text disabled:opacity-50 disabled:cursor-not-allowed",
|
|
416
|
+
title: "Activate coupon",
|
|
417
|
+
children: /* @__PURE__ */ T(y, { className: "h-4 w-4" })
|
|
418
|
+
}) : /* @__PURE__ */ T("button", {
|
|
419
|
+
disabled: !0,
|
|
420
|
+
className: "p-2 rounded-lg text-muted-foreground/40 cursor-not-allowed",
|
|
421
|
+
title: `Cannot change status (${e.status.toLowerCase()})`,
|
|
422
|
+
children: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
|
|
423
|
+
})
|
|
424
|
+
]
|
|
425
|
+
})
|
|
426
|
+
})
|
|
427
|
+
]
|
|
428
|
+
}, e.id))
|
|
429
|
+
})]
|
|
430
|
+
})
|
|
431
|
+
})
|
|
432
|
+
}),
|
|
433
|
+
J > 20 && /* @__PURE__ */ E("div", {
|
|
434
|
+
className: "flex items-center justify-between px-2",
|
|
435
|
+
children: [/* @__PURE__ */ E("p", {
|
|
436
|
+
className: "text-sm text-muted-foreground",
|
|
437
|
+
children: [
|
|
438
|
+
"Showing ",
|
|
439
|
+
I * 20 + 1,
|
|
440
|
+
"–",
|
|
441
|
+
Math.min((I + 1) * 20, J),
|
|
442
|
+
" of ",
|
|
443
|
+
J,
|
|
444
|
+
" ",
|
|
445
|
+
"coupons"
|
|
446
|
+
]
|
|
447
|
+
}), /* @__PURE__ */ E("div", {
|
|
448
|
+
className: "flex items-center gap-2",
|
|
449
|
+
children: [
|
|
450
|
+
/* @__PURE__ */ T("button", {
|
|
451
|
+
onClick: () => L((e) => Math.max(0, e - 1)),
|
|
452
|
+
disabled: I === 0,
|
|
453
|
+
className: "p-2 rounded-lg border border-border hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed",
|
|
454
|
+
children: /* @__PURE__ */ T(f, { className: "h-4 w-4" })
|
|
455
|
+
}),
|
|
456
|
+
/* @__PURE__ */ E("span", {
|
|
457
|
+
className: "text-sm text-foreground font-medium",
|
|
458
|
+
children: [
|
|
459
|
+
I + 1,
|
|
460
|
+
" / ",
|
|
461
|
+
se
|
|
462
|
+
]
|
|
463
|
+
}),
|
|
464
|
+
/* @__PURE__ */ T("button", {
|
|
465
|
+
onClick: () => L((e) => e + 1),
|
|
466
|
+
disabled: !oe,
|
|
467
|
+
className: "p-2 rounded-lg border border-border hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed",
|
|
468
|
+
children: /* @__PURE__ */ T(te, { className: "h-4 w-4" })
|
|
469
|
+
})
|
|
470
|
+
]
|
|
471
|
+
})]
|
|
472
|
+
}),
|
|
473
|
+
/* @__PURE__ */ T("div", {
|
|
474
|
+
className: "flex justify-end",
|
|
475
|
+
children: /* @__PURE__ */ E("button", {
|
|
476
|
+
onClick: me,
|
|
477
|
+
className: "px-4 py-2 rounded-lg border border-border text-foreground hover:bg-muted flex items-center gap-2",
|
|
478
|
+
children: [/* @__PURE__ */ T(ne, { className: "h-4 w-4" }), "Export Coupons"]
|
|
479
|
+
})
|
|
480
|
+
})
|
|
481
|
+
]
|
|
482
|
+
});
|
|
483
|
+
async function fe(e) {
|
|
484
|
+
try {
|
|
485
|
+
await ce({ variables: { id: e } }), await K(), z(null), U({
|
|
486
|
+
tone: "success",
|
|
487
|
+
message: "Coupon deactivated successfully."
|
|
488
|
+
});
|
|
489
|
+
} catch (e) {
|
|
490
|
+
console.error("Failed to deactivate coupon:", e), U({
|
|
491
|
+
tone: "error",
|
|
492
|
+
message: `Failed to deactivate coupon: ${e instanceof Error ? e.message : "Unknown error"}`
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
async function pe(e, t) {
|
|
497
|
+
V(e);
|
|
498
|
+
try {
|
|
499
|
+
await le({ variables: {
|
|
500
|
+
id: e,
|
|
501
|
+
input: { status: t }
|
|
502
|
+
} }), await K(), U({
|
|
503
|
+
tone: "success",
|
|
504
|
+
message: `Coupon ${t === s.Active ? "activated" : "deactivated"} successfully.`
|
|
505
|
+
});
|
|
506
|
+
} catch (e) {
|
|
507
|
+
console.error("Failed to update coupon status:", e), U({
|
|
508
|
+
tone: "error",
|
|
509
|
+
message: `Failed to update status: ${e instanceof Error ? e.message : "Unknown error"}`
|
|
510
|
+
});
|
|
511
|
+
} finally {
|
|
512
|
+
V(null);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
function me() {
|
|
516
|
+
let e = X.map((e) => ({
|
|
517
|
+
code: e.code,
|
|
518
|
+
name: e.name,
|
|
519
|
+
description: e.description ?? "",
|
|
520
|
+
status: e.status,
|
|
521
|
+
type: e.type,
|
|
522
|
+
value: e.value,
|
|
523
|
+
currentUses: e.currentUses,
|
|
524
|
+
maxTotalUses: e.maxTotalUses ?? "",
|
|
525
|
+
validUntil: e.validUntil ?? ""
|
|
526
|
+
}));
|
|
527
|
+
if (e.length === 0) {
|
|
528
|
+
U({
|
|
529
|
+
tone: "error",
|
|
530
|
+
message: "There are no coupons to export for the current filters."
|
|
531
|
+
});
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
let t = Object.keys(e[0]).join(","), n = e.map((e) => Object.values(e).map((e) => `"${String(e).replaceAll("\"", "\"\"")}"`).join(",")).join("\n"), r = new Blob([`${t}\n${n}`], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
535
|
+
a.href = i, a.download = "billing-coupons.csv", a.click(), URL.revokeObjectURL(i), U({
|
|
536
|
+
tone: "success",
|
|
537
|
+
message: `Exported ${e.length} coupon${e.length === 1 ? "" : "s"} to CSV.`
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
//#endregion
|
|
542
|
+
export { O as CouponsListPage };
|
|
543
|
+
|
|
544
|
+
//# sourceMappingURL=CouponsListPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CouponsListPage.js","names":[],"sources":["../../../../../src/billing/modules/coupons/pages/CouponsListPage.tsx"],"sourcesContent":["/**\n * Coupons List Page\n *\n * Admin interface for managing coupon codes:\n * - View all coupons\n * - Filter by status, type, scope\n * - Create new coupons\n * - Edit/deactivate existing coupons\n * - View usage analytics\n */\n\nimport { type FC, useState, useMemo, useEffect } from 'react';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport {\n Plus,\n Search,\n Tag,\n TrendingUp,\n CheckCircle,\n AlertCircle,\n Percent,\n DollarSign,\n Package,\n Eye,\n Edit,\n Trash2,\n Download,\n PowerOff,\n Power,\n ChevronLeft,\n ChevronRight,\n} from 'lucide-react';\n\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { AccessDenied, PageHeader } from '../../../shared/components';\nimport {\n useListCouponsQuery,\n useDeactivateCouponMutation,\n useUpdateCouponMutation,\n} from '../../../../generated/global-operations';\nimport { CouponStatus } from '../../../../generated/global-types';\nimport type {\n CouponScope as GQLCouponScope,\n CouponStatus as GQLCouponStatus,\n CouponType as GQLCouponType,\n Coupon as GQLCoupon,\n} from '../../../../generated/global-types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\ntype Coupon = GQLCoupon;\n\ntype CouponStatusFilter = 'ALL' | GQLCouponStatus;\ntype CouponTypeFilter = 'ALL' | GQLCouponType;\ntype CouponScopeFilter = 'ALL' | GQLCouponScope;\n\ninterface CouponExportRow {\n code: string;\n name: string;\n description: string;\n status: string;\n type: string;\n value: number;\n currentUses: number;\n maxTotalUses: number | '';\n validUntil: string;\n}\n\nexport const CouponsListPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const navigateTo = useBillingNavigate();\n const permissions = useBillingPermissions();\n\n const PAGE_SIZE = 20;\n\n // State\n const [searchQuery, setSearchQuery] = useState('');\n const [statusFilter, setStatusFilter] = useState<CouponStatusFilter>('ALL');\n const [typeFilter, setTypeFilter] = useState<CouponTypeFilter>('ALL');\n const [scopeFilter] = useState<CouponScopeFilter>('ALL');\n const [page, setPage] = useState(0);\n const [couponToDeactivate, setCouponToDeactivate] = useState<Coupon | null>(null);\n const [togglingId, setTogglingId] = useState<string | null>(null);\n const [feedback, setFeedback] = useState<{\n tone: 'success' | 'error';\n message: string;\n } | null>(null);\n\n // Fetch coupons from backend (server-side pagination)\n const { data, loading, refetch } = useListCouponsQuery({\n variables: {\n limit: PAGE_SIZE,\n offset: page * PAGE_SIZE,\n filter: {\n status: statusFilter !== 'ALL' ? (statusFilter as GQLCouponStatus) : undefined,\n type: typeFilter !== 'ALL' ? (typeFilter as GQLCouponType) : undefined,\n scope: scopeFilter !== 'ALL' ? (scopeFilter as GQLCouponScope) : undefined,\n search: searchQuery || undefined,\n },\n },\n });\n\n const coupons = useMemo<Coupon[]>(\n () => data?.listCoupons?.coupons ?? [],\n [data?.listCoupons?.coupons]\n );\n const total = data?.listCoupons?.total ?? 0;\n const hasMore = data?.listCoupons?.hasMore ?? false;\n const totalPages = Math.ceil(total / PAGE_SIZE);\n\n // Mutations\n const [deactivateCoupon, { loading: deactivating }] = useDeactivateCouponMutation();\n const [updateCoupon] = useUpdateCouponMutation();\n\n // With server-side filtering, filteredCoupons === coupons\n const filteredCoupons = coupons;\n\n // Reset to first page when filters change\n useEffect(() => {\n setPage(0);\n }, [searchQuery, statusFilter, typeFilter, scopeFilter]);\n\n // Statistics from current page (best effort without a separate aggregation query)\n const stats = useMemo(() => {\n const activeCoupons = coupons.filter((c: Coupon) => c.status === 'ACTIVE').length;\n const totalUses = coupons.reduce((sum: number, c: Coupon) => sum + c.currentUses, 0);\n const totalDiscountValue = coupons.reduce((sum: number, c: Coupon) => {\n if (c.type === 'FIXED_AMOUNT') return sum + c.value * c.currentUses;\n return sum;\n }, 0);\n return { totalCoupons: total, activeCoupons, totalUses, totalDiscountValue };\n }, [coupons, total]);\n\n // Check permissions\n if (!permissions.canManageDiscounts) {\n return <AccessDenied message=\"You don't have permission to manage coupons.\" />;\n }\n\n // Format currency\n const formatCurrency = (amount: number) => {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n }).format(amount);\n };\n\n // Format date\n const formatDate = (dateString: string) => {\n return new Date(dateString).toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n };\n\n // Get status color\n const getStatusColor = (status: string) => {\n switch (status) {\n case 'ACTIVE':\n return 'text-status-success-text bg-status-success-bg-subtle';\n case 'INACTIVE':\n return 'text-text-secondary bg-bg-canvas';\n case 'EXPIRED':\n return 'text-status-error-text bg-status-error-bg-subtle';\n default:\n return 'text-text-secondary bg-bg-canvas';\n }\n };\n\n // Get type icon\n const getTypeIcon = (type: string) => {\n switch (type) {\n case 'PERCENTAGE':\n return <Percent className=\"h-4 w-4\" />;\n case 'FIXED_AMOUNT':\n return <DollarSign className=\"h-4 w-4\" />;\n case 'FREE_SHIPPING':\n return <Package className=\"h-4 w-4\" />;\n default:\n return <Tag className=\"h-4 w-4\" />;\n }\n };\n\n return (\n <div className=\"max-w-7xl mx-auto p-4 sm:p-6 space-y-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between\">\n <PageHeader\n title={tr('billing.coupons.title', 'Coupons')}\n description=\"Manage discount codes and promotional offers\"\n icon={<Tag className=\"h-6 w-6\" />}\n />\n\n <button\n onClick={() => navigateTo('/coupons/create')}\n className=\"px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 flex items-center gap-2\"\n >\n <Plus className=\"h-4 w-4\" />\n Create Coupon\n </button>\n </div>\n\n {/* Statistics Cards */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\">\n <div className=\"bg-card border border-border rounded-lg p-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <span className=\"text-sm text-muted-foreground\">Total Coupons</span>\n <Tag className=\"h-4 w-4 text-accent-blue\" />\n </div>\n <p className=\"text-2xl font-bold text-foreground\">{stats.totalCoupons}</p>\n <p className=\"text-xs text-muted-foreground mt-1\">{stats.activeCoupons} active</p>\n </div>\n\n <div className=\"bg-card border border-border rounded-lg p-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <span className=\"text-sm text-muted-foreground\">Total Uses</span>\n <TrendingUp className=\"h-4 w-4 text-status-success-text\" />\n </div>\n <p className=\"text-2xl font-bold text-foreground\">{stats.totalUses}</p>\n <p className=\"text-xs text-muted-foreground mt-1\">All time</p>\n </div>\n\n <div className=\"bg-card border border-border rounded-lg p-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <span className=\"text-sm text-muted-foreground\">Total Discount</span>\n <DollarSign className=\"h-4 w-4 text-accent-purple\" />\n </div>\n <p className=\"text-2xl font-bold text-foreground\">\n {formatCurrency(stats.totalDiscountValue)}\n </p>\n <p className=\"text-xs text-muted-foreground mt-1\">Fixed amount only</p>\n </div>\n\n <div className=\"bg-card border border-border rounded-lg p-4\">\n <div className=\"flex items-center justify-between mb-2\">\n <span className=\"text-sm text-muted-foreground\">Active Rate</span>\n <CheckCircle className=\"h-4 w-4 text-status-success-text\" />\n </div>\n <p className=\"text-2xl font-bold text-foreground\">\n {stats.totalCoupons > 0\n ? Math.round((stats.activeCoupons / stats.totalCoupons) * 100)\n : 0}\n %\n </p>\n <p className=\"text-xs text-muted-foreground mt-1\">Of all coupons</p>\n </div>\n </div>\n\n {feedback && (\n <div\n className={\n feedback.tone === 'success'\n ? 'flex items-start gap-3 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-4 text-status-success-text'\n : 'flex items-start gap-3 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-status-error-text'\n }\n role=\"status\"\n aria-live=\"polite\"\n >\n {feedback.tone === 'success' ? (\n <CheckCircle className=\"mt-0.5 h-4 w-4 shrink-0\" />\n ) : (\n <AlertCircle className=\"mt-0.5 h-4 w-4 shrink-0\" />\n )}\n <p className=\"text-sm font-medium\">{feedback.message}</p>\n </div>\n )}\n\n {couponToDeactivate && (\n <div className=\"rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <p className=\"font-medium text-status-error-text\">\n Deactivate coupon <span className=\"font-mono\">{couponToDeactivate.code}</span>?\n </p>\n <p className=\"mt-1 text-sm text-status-error-text\">\n This will prevent new checkouts from applying this coupon.\n </p>\n </div>\n <div className=\"flex gap-2 self-end sm:self-auto\">\n <button\n type=\"button\"\n onClick={() => setCouponToDeactivate(null)}\n className=\"rounded-lg border border-border bg-background px-3 py-2 text-sm font-medium text-foreground transition-colors hover:bg-muted\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={() => handleDeactivate(couponToDeactivate.id)}\n disabled={deactivating}\n className=\"rounded-lg bg-destructive px-3 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-destructive/90 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n {deactivating ? 'Deactivating…' : 'Deactivate'}\n </button>\n </div>\n </div>\n </div>\n )}\n\n {/* Filters */}\n <div className=\"bg-card border border-border rounded-lg p-4\">\n <div className=\"grid grid-cols-1 md:grid-cols-4 gap-4\">\n {/* Search */}\n <div className=\"md:col-span-2\">\n <div className=\"relative\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground\" />\n <input\n type=\"text\"\n placeholder=\"Search coupons...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full pl-10 pr-4 py-2 rounded-lg border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/20\"\n />\n </div>\n </div>\n\n {/* Status Filter */}\n <select\n value={statusFilter}\n onChange={(e) => {\n setStatusFilter(e.target.value as CouponStatusFilter);\n setPage(0);\n }}\n className=\"px-4 py-2 rounded-lg border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/20\"\n >\n <option value=\"ALL\">All Status</option>\n <option value=\"ACTIVE\">Active</option>\n <option value=\"INACTIVE\">Inactive</option>\n <option value=\"EXPIRED\">Expired</option>\n </select>\n\n {/* Type Filter */}\n <select\n value={typeFilter}\n onChange={(e) => {\n setTypeFilter(e.target.value as CouponTypeFilter);\n setPage(0);\n }}\n className=\"px-4 py-2 rounded-lg border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/20\"\n >\n <option value=\"ALL\">All Types</option>\n <option value=\"PERCENTAGE\">Percentage</option>\n <option value=\"FIXED_AMOUNT\">Fixed Amount</option>\n <option value=\"FREE_SHIPPING\">Free Shipping</option>\n </select>\n </div>\n </div>\n\n {/* Coupons Table */}\n <div className=\"bg-card border border-border rounded-lg overflow-hidden\">\n <div className=\"overflow-x-auto\">\n <table className=\"w-full\">\n <thead className=\"bg-muted/50 border-b border-border\">\n <tr>\n <th className=\"text-left p-4 text-sm font-medium text-foreground\">Code</th>\n <th className=\"text-left p-4 text-sm font-medium text-foreground\">Type</th>\n <th className=\"text-left p-4 text-sm font-medium text-foreground\">Value</th>\n <th className=\"text-left p-4 text-sm font-medium text-foreground\">Status</th>\n <th className=\"text-left p-4 text-sm font-medium text-foreground\">Usage</th>\n <th className=\"text-left p-4 text-sm font-medium text-foreground\">Valid Until</th>\n <th className=\"text-right p-4 text-sm font-medium text-foreground\">Actions</th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border\">\n {loading ? (\n <tr>\n <td colSpan={7} className=\"p-8 text-center text-muted-foreground\">\n Loading coupons...\n </td>\n </tr>\n ) : filteredCoupons.length === 0 ? (\n <tr>\n <td colSpan={7} className=\"p-8 text-center text-muted-foreground\">\n No coupons found\n </td>\n </tr>\n ) : (\n filteredCoupons.map((coupon: Coupon) => (\n <tr key={coupon.id} className=\"hover:bg-muted/50\">\n <td className=\"p-4\">\n <div>\n <p className=\"font-medium text-foreground font-mono\">{coupon.code}</p>\n <p className=\"text-sm text-muted-foreground\">{coupon.name}</p>\n </div>\n </td>\n <td className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n {getTypeIcon(coupon.type)}\n <span className=\"text-sm text-foreground capitalize\">\n {coupon.type.replace('_', ' ').toLowerCase()}\n </span>\n </div>\n </td>\n <td className=\"p-4\">\n <span className=\"text-sm font-medium text-foreground\">\n {coupon.type === 'PERCENTAGE'\n ? `${coupon.value}%`\n : formatCurrency(coupon.value)}\n </span>\n </td>\n <td className=\"p-4\">\n <span\n className={`inline-flex px-2 py-1 rounded-full text-xs font-medium ${getStatusColor(\n coupon.status\n )}`}\n >\n {coupon.status}\n </span>\n </td>\n <td className=\"p-4\">\n <div className=\"text-sm text-foreground\">\n <span className=\"font-medium\">{coupon.currentUses}</span>\n {coupon.maxTotalUses && (\n <span className=\"text-muted-foreground\"> / {coupon.maxTotalUses}</span>\n )}\n </div>\n {coupon.maxTotalUses && (\n <div className=\"w-full bg-muted rounded-full h-1.5 mt-1\">\n <div\n className=\"bg-primary h-1.5 rounded-full\"\n style={{\n width: `${Math.min(\n (coupon.currentUses / coupon.maxTotalUses) * 100,\n 100\n )}%`,\n }}\n />\n </div>\n )}\n </td>\n <td className=\"p-4\">\n <span className=\"text-sm text-muted-foreground\">\n {coupon.validUntil ? formatDate(coupon.validUntil) : 'No expiry'}\n </span>\n </td>\n <td className=\"p-4\">\n <div className=\"flex items-center justify-end gap-2\">\n <button\n onClick={() => navigateTo(`/coupons/${coupon.id}`)}\n className=\"p-2 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground\"\n title=\"View details\"\n >\n <Eye className=\"h-4 w-4\" />\n </button>\n <button\n onClick={() => navigateTo(`/coupons/${coupon.id}/edit`)}\n className=\"p-2 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground\"\n title=\"Edit coupon\"\n >\n <Edit className=\"h-4 w-4\" />\n </button>\n {coupon.status === 'ACTIVE' ? (\n <button\n onClick={() => setCouponToDeactivate(coupon)}\n disabled={deactivating || togglingId === coupon.id}\n className=\"p-2 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive disabled:opacity-50 disabled:cursor-not-allowed\"\n title=\"Deactivate coupon\"\n >\n <PowerOff className=\"h-4 w-4\" />\n </button>\n ) : coupon.status === 'INACTIVE' ? (\n <button\n onClick={() => handleToggleStatus(coupon.id, CouponStatus.Active)}\n disabled={togglingId === coupon.id}\n className=\"p-2 rounded-lg hover:bg-status-success-bg-subtle text-muted-foreground hover:text-status-success-text disabled:opacity-50 disabled:cursor-not-allowed\"\n title=\"Activate coupon\"\n >\n <Power className=\"h-4 w-4\" />\n </button>\n ) : (\n <button\n disabled\n className=\"p-2 rounded-lg text-muted-foreground/40 cursor-not-allowed\"\n title={`Cannot change status (${coupon.status.toLowerCase()})`}\n >\n <Trash2 className=\"h-4 w-4\" />\n </button>\n )}\n </div>\n </td>\n </tr>\n ))\n )}\n </tbody>\n </table>\n </div>\n </div>\n\n {/* Pagination */}\n {total > PAGE_SIZE && (\n <div className=\"flex items-center justify-between px-2\">\n <p className=\"text-sm text-muted-foreground\">\n Showing {page * PAGE_SIZE + 1}–{Math.min((page + 1) * PAGE_SIZE, total)} of {total}{' '}\n coupons\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n onClick={() => setPage((p) => Math.max(0, p - 1))}\n disabled={page === 0}\n className=\"p-2 rounded-lg border border-border hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </button>\n <span className=\"text-sm text-foreground font-medium\">\n {page + 1} / {totalPages}\n </span>\n <button\n onClick={() => setPage((p) => p + 1)}\n disabled={!hasMore}\n className=\"p-2 rounded-lg border border-border hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n )}\n\n {/* Export Button */}\n <div className=\"flex justify-end\">\n <button\n onClick={handleExport}\n className=\"px-4 py-2 rounded-lg border border-border text-foreground hover:bg-muted flex items-center gap-2\"\n >\n <Download className=\"h-4 w-4\" />\n Export Coupons\n </button>\n </div>\n </div>\n );\n\n async function handleDeactivate(couponId: string) {\n try {\n await deactivateCoupon({ variables: { id: couponId } });\n await refetch();\n setCouponToDeactivate(null);\n setFeedback({ tone: 'success', message: 'Coupon deactivated successfully.' });\n } catch (error) {\n console.error('Failed to deactivate coupon:', error);\n setFeedback({\n tone: 'error',\n message: `Failed to deactivate coupon: ${error instanceof Error ? error.message : 'Unknown error'}`,\n });\n }\n }\n\n async function handleToggleStatus(couponId: string, newStatus: CouponStatus) {\n setTogglingId(couponId);\n try {\n await updateCoupon({ variables: { id: couponId, input: { status: newStatus } } });\n await refetch();\n setFeedback({\n tone: 'success',\n message: `Coupon ${newStatus === CouponStatus.Active ? 'activated' : 'deactivated'} successfully.`,\n });\n } catch (error) {\n console.error('Failed to update coupon status:', error);\n setFeedback({\n tone: 'error',\n message: `Failed to update status: ${error instanceof Error ? error.message : 'Unknown error'}`,\n });\n } finally {\n setTogglingId(null);\n }\n }\n\n function handleExport() {\n const rows: CouponExportRow[] = filteredCoupons.map((coupon: Coupon) => ({\n code: coupon.code,\n name: coupon.name,\n description: coupon.description ?? '',\n status: coupon.status,\n type: coupon.type,\n value: coupon.value,\n currentUses: coupon.currentUses,\n maxTotalUses: coupon.maxTotalUses ?? '',\n validUntil: coupon.validUntil ?? '',\n }));\n\n if (rows.length === 0) {\n setFeedback({\n tone: 'error',\n message: 'There are no coupons to export for the current filters.',\n });\n return;\n }\n\n const csvHeader = Object.keys(rows[0]).join(',');\n const csvBody = rows\n .map((row: CouponExportRow) =>\n Object.values(row)\n .map((value) => `\"${String(value).replaceAll('\"', '\"\"')}\"`)\n .join(',')\n )\n .join('\\n');\n\n const blob = new Blob([`${csvHeader}\\n${csvBody}`], { type: 'text/csv;charset=utf-8' });\n const downloadUrl = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = downloadUrl;\n link.download = 'billing-coupons.csv';\n link.click();\n URL.revokeObjectURL(downloadUrl);\n\n setFeedback({\n tone: 'success',\n message: `Exported ${rows.length} coupon${rows.length === 1 ? '' : 's'} to CSV.`,\n });\n }\n};\n"],"mappings":";;;;;;;;;;;;AAmEA,IAAa,UAA4B;CACvC,IAAM,EAAE,SAAM,GAAS,EACjB,MAAM,GAAa,MAA6B;EACpD,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AAQ,MAAM,mCAAmC,EAAM,EACvD,EAAY;IACV,MAAM;IACN,SAAS,4BAA4B,aAAiB,QAAQ,EAAM,UAAU;IAC/E,CAAC;YACM;AACR,KAAc,KAAK;;;CAIvB,SAAS,KAAe;EACtB,IAAM,IAA0B,EAAgB,KAAK,OAAoB;GACvE,MAAM,EAAO;GACb,MAAM,EAAO;GACb,aAAa,EAAO,eAAe;GACnC,QAAQ,EAAO;GACf,MAAM,EAAO;GACb,OAAO,EAAO;GACd,aAAa,EAAO;GACpB,cAAc,EAAO,gBAAgB;GACrC,YAAY,EAAO,cAAc;GAClC,EAAE;AAEH,MAAI,EAAK,WAAW,GAAG;AACrB,KAAY;IACV,MAAM;IACN,SAAS;IACV,CAAC;AACF;;EAGF,IAAM,IAAY,OAAO,KAAK,EAAK,GAAG,CAAC,KAAK,IAAI,EAC1C,IAAU,EACb,KAAK,MACJ,OAAO,OAAO,EAAI,CACf,KAAK,MAAU,IAAI,OAAO,EAAM,CAAC,WAAW,MAAK,OAAK,CAAC,GAAG,CAC1D,KAAK,IAAI,CACb,CACA,KAAK,KAAK,EAEP,IAAO,IAAI,KAAK,CAAC,GAAG,EAAU,IAAI,IAAU,EAAE,EAAE,MAAM,0BAA0B,CAAC,EACjF,IAAc,IAAI,gBAAgB,EAAK,EACvC,IAAO,SAAS,cAAc,IAAI;AAMxC,EALA,EAAK,OAAO,GACZ,EAAK,WAAW,uBAChB,EAAK,OAAO,EACZ,IAAI,gBAAgB,EAAY,EAEhC,EAAY;GACV,MAAM;GACN,SAAS,YAAY,EAAK,OAAO,SAAS,EAAK,WAAW,IAAI,KAAK,IAAI;GACxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateCouponPage.d.ts","sourceRoot":"","sources":["../../../../../src/billing/modules/coupons/pages/CreateCouponPage.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AA6B1C,eAAO,MAAM,gBAAgB,EAAE,EAof9B,CAAC"}
|