@burdenoff/microfe-billing 2026.1108.1 → 2026.1108.2
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/dist/billing/BillingAdminRoutes.d.ts +1 -2
- package/dist/billing/BillingAdminRoutes.js +11 -12
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/BillingRoot.d.ts +0 -1
- package/dist/billing/BillingRoot.js +10 -9
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/BillingUserRoutes.d.ts +1 -2
- package/dist/billing/BillingUserRoutes.js +13 -14
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/hooks/useBillingAccountSelection.d.ts +0 -1
- package/dist/billing/hooks/useBillingAccountSelection.js +7 -5
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
- package/dist/billing/hooks/useBillingEventEmitter.d.ts +0 -1
- package/dist/billing/hooks/useBillingEventEmitter.js +1 -2
- package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
- package/dist/billing/hooks/useBillingNavigate.d.ts +0 -1
- package/dist/billing/hooks/useBillingNavigate.js +1 -2
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
- package/dist/billing/hooks/useBillingPermissions.d.ts +0 -1
- package/dist/billing/hooks/useBillingPermissions.js +2 -3
- package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +0 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.js +1 -2
- package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
- package/dist/billing/hooks/useProducts.d.ts +0 -1
- package/dist/billing/hooks/useProducts.js +1 -2
- package/dist/billing/hooks/useProducts.js.map +1 -1
- package/dist/billing/index.d.ts +0 -1
- package/dist/billing/lib/native-purchases.d.ts +0 -1
- package/dist/billing/lib/native-purchases.js +1 -2
- package/dist/billing/lib/native-purchases.js.map +1 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +0 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js +4 -5
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
- package/dist/billing/modules/addons/hooks/index.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/index.js +3 -2
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js +1 -2
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js.map +1 -1
- package/dist/billing/modules/addons/hooks/useAddons.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/useAddons.js +1 -2
- package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
- package/dist/billing/modules/addons/index.d.ts +0 -1
- package/dist/billing/modules/addons/index.js +10 -10
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +15 -16
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +11 -12
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +16 -17
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +16 -17
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +111 -106
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +105 -100
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/index.d.ts +0 -1
- package/dist/billing/modules/addons/pages/index.js +7 -6
- package/dist/billing/modules/addons/store/addonCartStore.d.ts +0 -1
- package/dist/billing/modules/addons/store/addonCartStore.js +2 -7
- package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
- package/dist/billing/modules/affiliate/api.d.ts +0 -1
- package/dist/billing/modules/affiliate/api.js +1 -2
- package/dist/billing/modules/affiliate/api.js.map +1 -1
- package/dist/billing/modules/affiliate/index.d.ts +0 -1
- package/dist/billing/modules/affiliate/index.js +1 -2
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +0 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +29 -28
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/index.d.ts +0 -1
- package/dist/billing/modules/analytics/index.js +1 -2
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +0 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +8 -9
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/index.d.ts +0 -1
- package/dist/billing/modules/analytics/pages/index.js +1 -1
- package/dist/billing/modules/billing/hooks/index.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/index.js +5 -4
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useInvoices.js +1 -2
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.js +1 -2
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.js.map +1 -1
- package/dist/billing/modules/billing/hooks/usePayments.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js +1 -2
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useTransactions.js +30 -31
- package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
- package/dist/billing/modules/billing/index.d.ts +0 -1
- package/dist/billing/modules/billing/index.js +15 -15
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +11 -12
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +53 -59
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +81 -87
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +11 -12
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +51 -54
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +33 -34
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +92 -93
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +38 -39
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -30
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/index.d.ts +0 -1
- package/dist/billing/modules/billing/pages/index.js +10 -9
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -2
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -2
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js +1 -2
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js +1 -2
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts +0 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +35 -32
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.js +1 -2
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +0 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +1 -2
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +1 -2
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +0 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.js +5 -3
- package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +0 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.js +35 -41
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -2
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +1 -2
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +0 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js +5 -6
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +0 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +7 -8
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/index.d.ts +0 -1
- package/dist/billing/modules/checkout/components/index.js +12 -11
- package/dist/billing/modules/checkout/hooks/index.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/index.js +5 -4
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js +182 -195
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +33 -32
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +1 -2
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +1 -2
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +4 -8
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js +1 -2
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
- package/dist/billing/modules/checkout/index.d.ts +0 -1
- package/dist/billing/modules/checkout/index.js +19 -19
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +0 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +730 -732
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/pages/index.d.ts +0 -1
- package/dist/billing/modules/checkout/pages/index.js +1 -1
- package/dist/billing/modules/checkout/types/index.d.ts +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
- package/dist/billing/modules/coupons/index.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +5 -6
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +15 -13
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +12 -10
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +7 -11
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/index.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/index.js +5 -4
- package/dist/billing/modules/credits/hooks/index.d.ts +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.d.ts +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.js +20 -21
- package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
- package/dist/billing/modules/credits/index.d.ts +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -24
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +26 -27
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +54 -52
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +37 -38
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/index.d.ts +0 -1
- package/dist/billing/modules/credits/pages/index.js +5 -4
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -3
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -43
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +1 -2
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1 -2
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +2 -5
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -2
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/index.js +7 -6
- package/dist/billing/modules/dashboard/hooks/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/index.js +3 -2
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +2 -3
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.js +2 -3
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
- package/dist/billing/modules/dashboard/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/index.js +11 -10
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +0 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +266 -264
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/pages/index.js +1 -1
- package/dist/billing/modules/discounts/index.d.ts +0 -1
- package/dist/billing/modules/discounts/index.js +1 -2
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +0 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +169 -176
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/index.d.ts +0 -1
- package/dist/billing/modules/discounts/pages/index.js +1 -1
- package/dist/billing/modules/earnings/api.d.ts +0 -1
- package/dist/billing/modules/earnings/api.js +66 -67
- package/dist/billing/modules/earnings/api.js.map +1 -1
- package/dist/billing/modules/earnings/index.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +17 -17
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +188 -189
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +111 -111
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +29 -30
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +103 -104
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +0 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.js +1 -2
- package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -1
- package/dist/billing/modules/plans/constants/enterprise.d.ts +0 -1
- package/dist/billing/modules/plans/constants/enterprise.js +1 -2
- package/dist/billing/modules/plans/constants/enterprise.js.map +1 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +0 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.js +1 -2
- package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
- package/dist/billing/modules/plans/hooks/index.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/index.js +3 -2
- package/dist/billing/modules/plans/hooks/usePlans.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/usePlans.js +1 -2
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/useQuotas.js +1 -2
- package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
- package/dist/billing/modules/plans/index.d.ts +0 -1
- package/dist/billing/modules/plans/index.js +11 -11
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +12 -15
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +38 -39
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +10 -11
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +40 -41
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +15 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +18 -19
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +100 -101
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/index.d.ts +0 -1
- package/dist/billing/modules/plans/pages/index.js +8 -7
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +0 -1
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.js +1 -2
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.js.map +1 -1
- package/dist/billing/modules/plans/utils/planSelector.d.ts +0 -1
- package/dist/billing/modules/plans/utils/planSelector.js +1 -2
- package/dist/billing/modules/plans/utils/planSelector.js.map +1 -1
- package/dist/billing/modules/promotions/index.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +5 -6
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +5 -6
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/index.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/index.js +3 -2
- package/dist/billing/modules/quota/hooks/index.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/index.js +1 -1
- package/dist/billing/modules/quota/hooks/useQuota.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +1 -2
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
- package/dist/billing/modules/quota/index.d.ts +0 -1
- package/dist/billing/modules/quota/index.js +8 -8
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +12 -15
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaPage.js +3 -3
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +13 -14
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +9 -10
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +12 -13
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +16 -17
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/index.d.ts +0 -1
- package/dist/billing/modules/quota/pages/index.js +6 -5
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts +0 -1
- package/dist/billing/modules/quota/utils/quotaSelector.js +1 -2
- package/dist/billing/modules/quota/utils/quotaSelector.js.map +1 -1
- package/dist/billing/modules/settings/index.d.ts +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +12 -13
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +0 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +32 -32
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/index.d.ts +0 -1
- package/dist/billing/modules/settings/pages/index.js +3 -2
- package/dist/billing/modules/store/graphql/index.d.ts +0 -1
- package/dist/billing/modules/store/index.d.ts +0 -1
- package/dist/billing/modules/store/index.js +1 -2
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +0 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +1 -2
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +0 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +9 -11
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/modules/subscriptions/hooks/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/hooks/index.js +1 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +0 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +1 -2
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
- package/dist/billing/modules/subscriptions/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/index.js +6 -6
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +311 -312
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +61 -62
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +30 -31
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/index.js +4 -3
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +0 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +17 -18
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
- package/dist/billing/modules/usage/hooks/index.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.js +72 -73
- package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js +12 -13
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js.map +1 -1
- package/dist/billing/modules/usage/index.d.ts +0 -1
- package/dist/billing/modules/usage/index.js +1 -2
- package/dist/billing/modules/usage/pages/UsagePage.d.ts +0 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +229 -227
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/pages/index.d.ts +0 -1
- package/dist/billing/modules/usage/pages/index.js +1 -1
- package/dist/billing/modules/usage/utils/aiSpend.d.ts +0 -1
- package/dist/billing/modules/usage/utils/aiSpend.js +2 -3
- package/dist/billing/modules/usage/utils/aiSpend.js.map +1 -1
- package/dist/billing/providers/BillingProvider.d.ts +0 -1
- package/dist/billing/providers/BillingProvider.js +3 -4
- package/dist/billing/providers/BillingProvider.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.d.ts +0 -1
- package/dist/billing/shared/components/AccessDenied.js +1 -2
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.d.ts +0 -1
- package/dist/billing/shared/components/ActorIdentity.js +2 -3
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +0 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +1 -2
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/components/EmptyState.d.ts +0 -1
- package/dist/billing/shared/components/EmptyState.js +1 -2
- package/dist/billing/shared/components/EmptyState.js.map +1 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +0 -1
- package/dist/billing/shared/components/PageHeader.d.ts +0 -1
- package/dist/billing/shared/components/PageHeader.js +1 -2
- package/dist/billing/shared/components/PageHeader.js.map +1 -1
- package/dist/billing/shared/components/PushPermissionNudge.d.ts +0 -1
- package/dist/billing/shared/components/PushPermissionNudge.js +2 -3
- package/dist/billing/shared/components/PushPermissionNudge.js.map +1 -1
- package/dist/billing/shared/components/ServerError.d.ts +0 -1
- package/dist/billing/shared/components/ServerError.js +1 -2
- package/dist/billing/shared/components/ServerError.js.map +1 -1
- package/dist/billing/shared/components/StatCard.d.ts +0 -1
- package/dist/billing/shared/components/StatCard.js +1 -2
- package/dist/billing/shared/components/StatCard.js.map +1 -1
- package/dist/billing/shared/components/index.d.ts +0 -1
- package/dist/billing/shared/components/index.js +8 -7
- package/dist/billing/shared/hooks/index.d.ts +0 -1
- package/dist/billing/shared/hooks/index.js +1 -1
- package/dist/billing/shared/hooks/useActorProfiles.d.ts +0 -1
- package/dist/billing/shared/hooks/useActorProfiles.js +4 -8
- package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
- package/dist/billing/shared/hooks/useTr.d.ts +0 -1
- package/dist/billing/shared/hooks/useTr.js +1 -2
- package/dist/billing/shared/hooks/useTr.js.map +1 -1
- package/dist/billing/shared/index.d.ts +0 -1
- package/dist/billing/shared/types/graphql.d.ts +0 -1
- package/dist/billing/shared/types/graphql.js +1 -2
- package/dist/billing/shared/types/graphql.js.map +1 -1
- package/dist/billing/shared/types/index.d.ts +0 -1
- package/dist/billing/shared/ui/Card.d.ts +1 -2
- package/dist/billing/shared/ui/Card.js +1 -2
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.d.ts +1 -2
- package/dist/billing/shared/ui/MetricCard.js +1 -2
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/dist/billing/shared/ui/ProgressBar.d.ts +1 -2
- package/dist/billing/shared/ui/ProgressBar.js +1 -2
- package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
- package/dist/billing/shared/ui/SectionHeader.d.ts +1 -2
- package/dist/billing/shared/ui/StatusPill.d.ts +1 -2
- package/dist/billing/shared/ui/StatusPill.js +1 -2
- package/dist/billing/shared/ui/StatusPill.js.map +1 -1
- package/dist/billing/shared/ui/index.d.ts +0 -1
- package/dist/billing/shared/ui/index.js +5 -4
- package/dist/billing/shared/utils/directActivityGraphql.d.ts +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.d.ts +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.js +1 -2
- package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
- package/dist/billing/shared/utils/error.d.ts +0 -1
- package/dist/billing/shared/utils/error.js +1 -2
- package/dist/billing/shared/utils/error.js.map +1 -1
- package/dist/billing/shared/utils/format.d.ts +0 -1
- package/dist/billing/shared/utils/format.js +1 -2
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/gatewayGraphql.d.ts +0 -1
- package/dist/billing/shared/utils/gatewayGraphql.js +2 -3
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
- package/dist/billing/shared/utils/index.d.ts +0 -1
- package/dist/billing/shared/utils/index.js +9 -8
- package/dist/billing/shared/utils/navigation.d.ts +0 -1
- package/dist/billing/shared/utils/navigation.js +1 -2
- package/dist/billing/shared/utils/navigation.js.map +1 -1
- package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
- package/dist/billing/shared/utils/paymentTheme.js +2 -3
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/dist/billing/shared/utils/status.d.ts +0 -1
- package/dist/billing/shared/utils/status.js +24 -25
- package/dist/billing/shared/utils/status.js.map +1 -1
- package/dist/billing/shared/utils/tokens.d.ts +0 -1
- package/dist/billing/shared/utils/tokens.js +1 -2
- package/dist/billing/shared/utils/tokens.js.map +1 -1
- package/dist/billing/translations/en.d.ts +0 -1
- package/dist/billing/types/index.d.ts +0 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/global-operations.d.ts +3252 -3206
- package/dist/generated/global-operations.js +445 -422
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/global-types.js +1 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +76 -47
- package/dist/generated/wspace-operations.js +2 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +75 -69
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +65 -54
- package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
- package/dist/billing/BillingRoot.d.ts.map +0 -1
- package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
- package/dist/billing/hooks/useProducts.d.ts.map +0 -1
- package/dist/billing/index.d.ts.map +0 -1
- package/dist/billing/lib/native-purchases.d.ts.map +0 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
- package/dist/billing/modules/addons/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
- package/dist/billing/modules/analytics/index.d.ts.map +0 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
- package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
- package/dist/billing/modules/billing/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
- package/dist/billing/modules/checkout/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
- package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
- package/dist/billing/modules/coupons/index.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
- package/dist/billing/modules/credits/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/discounts/index.d.ts.map +0 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
- package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/earnings/api.d.ts.map +0 -1
- package/dist/billing/modules/earnings/index.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
- package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
- package/dist/billing/modules/plans/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
- package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
- package/dist/billing/modules/promotions/index.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
- package/dist/billing/modules/quota/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
- package/dist/billing/modules/settings/index.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
- package/dist/billing/modules/store/index.d.ts.map +0 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
- package/dist/billing/modules/usage/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
- package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
- package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
- package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
- package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
- package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
- package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
- package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
- package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
- package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
- package/dist/billing/shared/components/index.d.ts.map +0 -1
- package/dist/billing/shared/hooks/index.d.ts.map +0 -1
- package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
- package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/billing/shared/index.d.ts.map +0 -1
- package/dist/billing/shared/types/graphql.d.ts.map +0 -1
- package/dist/billing/shared/types/index.d.ts.map +0 -1
- package/dist/billing/shared/ui/Card.d.ts.map +0 -1
- package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
- package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
- package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
- package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
- package/dist/billing/shared/ui/index.d.ts.map +0 -1
- package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/error.d.ts.map +0 -1
- package/dist/billing/shared/utils/format.d.ts.map +0 -1
- package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/index.d.ts.map +0 -1
- package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
- package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
- package/dist/billing/shared/utils/status.d.ts.map +0 -1
- package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
- package/dist/billing/translations/en.d.ts.map +0 -1
- package/dist/billing/types/index.d.ts.map +0 -1
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useTr as t } from "../../../shared/hooks/useTr.js";
|
|
3
|
-
import { StatusPill as n } from "../../../shared/ui/StatusPill.js";
|
|
4
|
-
import "../../../shared/ui/index.js";
|
|
5
|
-
import { useBillingAccountSelection as r } from "../../../hooks/useBillingAccountSelection.js";
|
|
6
|
-
import { formatCurrency as i, formatDate as a, formatPlanDuration as o, formatSubscriptionStatus as s } from "../../../shared/utils/format.js";
|
|
7
|
-
import { getSubscriptionStatusColor as c } from "../../../shared/utils/status.js";
|
|
8
|
-
import { useBillingPermissions as l } from "../../../hooks/useBillingPermissions.js";
|
|
9
|
-
import { useBillingNavigate as u } from "../../../hooks/useBillingNavigate.js";
|
|
10
|
-
import { withBillingAccountId as d } from "../../../shared/utils/navigation.js";
|
|
11
|
-
import { useBillingAccounts as f, usePaginatedSubscriptions as p } from "../hooks/useSubscriptions.js";
|
|
1
|
+
import { useBillingNavigate as e } from "../../../hooks/useBillingNavigate.js";
|
|
12
2
|
import "../hooks/index.js";
|
|
3
|
+
import { StatusPill as t } from "../../../shared/ui/StatusPill.js";
|
|
4
|
+
import { useBillingPermissions as n } from "../../../hooks/useBillingPermissions.js";
|
|
5
|
+
import { useBilling as r } from "../../../providers/BillingProvider.js";
|
|
6
|
+
import { useBillingAccountSelection as i } from "../../../hooks/useBillingAccountSelection.js";
|
|
7
|
+
import { withBillingAccountId as a } from "../../../shared/utils/navigation.js";
|
|
8
|
+
import { formatCurrency as o, formatDate as s, formatPlanDuration as c, formatSubscriptionStatus as l } from "../../../shared/utils/format.js";
|
|
9
|
+
import { getSubscriptionStatusColor as u } from "../../../shared/utils/status.js";
|
|
10
|
+
import "../../../shared/ui/index.js";
|
|
11
|
+
import { useBillingAccounts as d, usePaginatedSubscriptions as f } from "../hooks/useSubscriptions.js";
|
|
12
|
+
import { useTr as p } from "../../../shared/hooks/useTr.js";
|
|
13
13
|
import { useEffect as m, useRef as h, useState as g } from "react";
|
|
14
14
|
import { useSearchParams as _ } from "react-router";
|
|
15
15
|
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
16
16
|
import { EmphasisPanel as x, IllustratedEmptyState as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
17
|
-
|
|
17
|
+
// src/billing/modules/subscriptions/pages/SubscriptionsListPage.tsx
|
|
18
18
|
var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
19
|
-
let
|
|
20
|
-
orgId:
|
|
19
|
+
let t = p(), o = e(), s = n(), { orgId: c } = r(), [l, u] = _(), { billingAccounts: E, isLoading: O } = d(), { selectedAccountId: k, setSelectedAccountId: A } = i({
|
|
20
|
+
orgId: c,
|
|
21
21
|
billingAccounts: E,
|
|
22
22
|
syncFromUrl: !0,
|
|
23
23
|
urlParamName: "billingAccountId"
|
|
@@ -25,14 +25,14 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
25
25
|
m(() => (clearTimeout(V.current), V.current = setTimeout(() => {
|
|
26
26
|
R(F), B(1);
|
|
27
27
|
}, 400), () => clearTimeout(V.current)), [F]);
|
|
28
|
-
let { subscriptions: H, activeSubscriptions: U, totalCount: W, totalPages: G, isLoading: K, error: q, refetch: J } =
|
|
28
|
+
let { subscriptions: H, activeSubscriptions: U, totalCount: W, totalPages: G, isLoading: K, error: q, refetch: J } = f(k ?? void 0, z, T, L || void 0), Y = E.find((e) => e.id === k), X = (e) => {
|
|
29
29
|
A(e.id);
|
|
30
|
-
let t = new URLSearchParams(
|
|
31
|
-
t.set("billingAccountId", e.id),
|
|
30
|
+
let t = new URLSearchParams(l);
|
|
31
|
+
t.set("billingAccountId", e.id), u(t, { replace: !0 }), M(!1), B(1);
|
|
32
32
|
}, Z = (e) => {
|
|
33
33
|
B(e);
|
|
34
34
|
}, Q = H.filter((e) => N === "all" ? !0 : N === "inactive" ? w.includes(e.status) : e.status === N), $ = O || K;
|
|
35
|
-
return
|
|
35
|
+
return s.canViewSubscriptions ? $ && !Y ? /* @__PURE__ */ b("div", {
|
|
36
36
|
className: "space-y-6 p-6",
|
|
37
37
|
children: [/* @__PURE__ */ y("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ y("div", {
|
|
38
38
|
className: "space-y-4",
|
|
@@ -73,7 +73,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
73
73
|
}),
|
|
74
74
|
/* @__PURE__ */ y("h2", {
|
|
75
75
|
className: "text-lg font-semibold text-text-primary",
|
|
76
|
-
children:
|
|
76
|
+
children: t("billing.subscriptions.failedToLoad", "Failed to load subscriptions")
|
|
77
77
|
}),
|
|
78
78
|
/* @__PURE__ */ y("p", {
|
|
79
79
|
className: "text-sm text-text-secondary",
|
|
@@ -83,7 +83,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
83
83
|
type: "button",
|
|
84
84
|
onClick: () => J(),
|
|
85
85
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
|
|
86
|
-
children:
|
|
86
|
+
children: t("billing.common.tryAgain", "Try Again")
|
|
87
87
|
})
|
|
88
88
|
]
|
|
89
89
|
})
|
|
@@ -95,19 +95,19 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
95
95
|
children: [/* @__PURE__ */ b("div", { children: [
|
|
96
96
|
/* @__PURE__ */ y("h1", {
|
|
97
97
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
98
|
-
children:
|
|
98
|
+
children: t("billing.subscriptions.title", "Subscriptions")
|
|
99
99
|
}),
|
|
100
100
|
/* @__PURE__ */ y("p", {
|
|
101
101
|
className: "text-sm text-text-secondary mt-1",
|
|
102
|
-
children:
|
|
102
|
+
children: t("billing.subscriptions.subtitle", "Manage your active and past subscriptions")
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ y(C, {
|
|
105
105
|
className: "mt-3",
|
|
106
|
-
children:
|
|
106
|
+
children: t("billing.subscriptions.purpose", "See every plan a billing account is subscribed to — active, canceled and expired — in one place. Use it to review what you are paying for, when each plan renews or ends, upgrade or cancel a subscription, and start a new one by browsing plans.")
|
|
107
107
|
})
|
|
108
|
-
] }),
|
|
108
|
+
] }), s.canCreateSubscription && /* @__PURE__ */ b("button", {
|
|
109
109
|
type: "button",
|
|
110
|
-
onClick: () =>
|
|
110
|
+
onClick: () => o("/plans"),
|
|
111
111
|
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
|
|
112
112
|
children: [/* @__PURE__ */ y("svg", {
|
|
113
113
|
className: "size-4",
|
|
@@ -120,7 +120,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
120
120
|
strokeWidth: 2,
|
|
121
121
|
d: "M12 4v16m8-8H4"
|
|
122
122
|
})
|
|
123
|
-
}),
|
|
123
|
+
}), t("billing.subscriptions.newSubscription", "New Subscription")]
|
|
124
124
|
})]
|
|
125
125
|
}),
|
|
126
126
|
E.length > 1 && /* @__PURE__ */ b("div", {
|
|
@@ -149,7 +149,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
149
149
|
className: "text-left",
|
|
150
150
|
children: [/* @__PURE__ */ y("p", {
|
|
151
151
|
className: "text-sm font-medium text-text-primary",
|
|
152
|
-
children: Y?.name ||
|
|
152
|
+
children: Y?.name || t("billing.subscriptions.selectAccount", "Select Account")
|
|
153
153
|
}), /* @__PURE__ */ y("p", {
|
|
154
154
|
className: "text-xs text-text-secondary",
|
|
155
155
|
children: Y?.email
|
|
@@ -224,27 +224,27 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
224
224
|
children: [
|
|
225
225
|
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
226
226
|
className: "text-sm text-text-secondary",
|
|
227
|
-
children:
|
|
227
|
+
children: t("billing.subscriptions.account", "Account")
|
|
228
228
|
}), /* @__PURE__ */ y("p", {
|
|
229
229
|
className: "text-lg font-semibold text-text-primary mt-1",
|
|
230
230
|
children: Y.name
|
|
231
231
|
})] }),
|
|
232
232
|
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
233
233
|
className: "text-sm text-text-secondary",
|
|
234
|
-
children:
|
|
234
|
+
children: t("billing.subscriptions.activeSubscriptions", "Active Subscriptions")
|
|
235
235
|
}), /* @__PURE__ */ y("p", {
|
|
236
236
|
className: "text-lg font-semibold tabular-nums text-status-success-text mt-1",
|
|
237
237
|
children: U.length
|
|
238
238
|
})] }),
|
|
239
239
|
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
240
240
|
className: "text-sm text-text-secondary",
|
|
241
|
-
children:
|
|
241
|
+
children: t("billing.subscriptions.creditBalance", "Credit Balance")
|
|
242
242
|
}), /* @__PURE__ */ b("p", {
|
|
243
243
|
className: "text-lg font-semibold tabular-nums text-text-primary mt-1",
|
|
244
244
|
children: [
|
|
245
245
|
(Y.creditAmount || 0).toLocaleString(),
|
|
246
246
|
" ",
|
|
247
|
-
|
|
247
|
+
t("billing.common.credits", "Credits")
|
|
248
248
|
]
|
|
249
249
|
})] })
|
|
250
250
|
]
|
|
@@ -264,7 +264,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
264
264
|
type: "button",
|
|
265
265
|
onClick: () => P(e),
|
|
266
266
|
className: `px-3 py-1.5 text-sm font-medium rounded-button transition-colors capitalize ${N === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
|
|
267
|
-
children: e === "all" ?
|
|
267
|
+
children: e === "all" ? t("billing.subscriptions.statusAll", "All") : e === "active" ? t("billing.subscriptions.statusActive", "Active") : e === "canceled" ? t("billing.subscriptions.statusCanceled", "Canceled") : t("billing.subscriptions.statusInactive", "Inactive")
|
|
268
268
|
}, e))
|
|
269
269
|
}),
|
|
270
270
|
/* @__PURE__ */ b("div", {
|
|
@@ -282,7 +282,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
282
282
|
})
|
|
283
283
|
}), /* @__PURE__ */ y("input", {
|
|
284
284
|
type: "text",
|
|
285
|
-
placeholder:
|
|
285
|
+
placeholder: t("billing.subscriptions.searchPlaceholder", "Search subscriptions..."),
|
|
286
286
|
value: F,
|
|
287
287
|
onChange: (e) => I(e.target.value),
|
|
288
288
|
className: "w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border-subtle rounded-button bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent"
|
|
@@ -290,7 +290,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
290
290
|
}),
|
|
291
291
|
/* @__PURE__ */ y("div", {
|
|
292
292
|
className: "text-sm text-text-secondary",
|
|
293
|
-
children:
|
|
293
|
+
children: t("billing.subscriptions.totalCount", "{{count}} subscription{{plural}} total", {
|
|
294
294
|
count: W,
|
|
295
295
|
plural: W === 1 ? "" : "s"
|
|
296
296
|
})
|
|
@@ -299,20 +299,20 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
299
299
|
}),
|
|
300
300
|
Q.length === 0 ? /* @__PURE__ */ y(S, {
|
|
301
301
|
illustration: N !== "all" || L ? "empty-search" : "empty-data",
|
|
302
|
-
title:
|
|
303
|
-
description: N !== "all" || L ?
|
|
304
|
-
action:
|
|
302
|
+
title: t("billing.subscriptions.noSubscriptionsFound", "No subscriptions found"),
|
|
303
|
+
description: N !== "all" || L ? t("billing.subscriptions.noSubscriptionsMatchFilters", "No subscriptions match your filters.") : t("billing.subscriptions.noSubscriptionsYet", "You don't have any subscriptions yet."),
|
|
304
|
+
action: s.canCreateSubscription && N === "all" && !L ? /* @__PURE__ */ y("button", {
|
|
305
305
|
type: "button",
|
|
306
|
-
onClick: () =>
|
|
306
|
+
onClick: () => o("/plans"),
|
|
307
307
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
|
|
308
|
-
children:
|
|
308
|
+
children: t("billing.subscriptions.browsePlans", "Browse Plans")
|
|
309
309
|
}) : void 0
|
|
310
310
|
}) : /* @__PURE__ */ y("div", {
|
|
311
311
|
className: "space-y-4",
|
|
312
312
|
children: Q.map((e) => /* @__PURE__ */ y(D, {
|
|
313
313
|
subscription: e,
|
|
314
|
-
onView: () =>
|
|
315
|
-
canCancel:
|
|
314
|
+
onView: () => o(a(`/subscriptions/${e.id}`, e.billingAccountId)),
|
|
315
|
+
canCancel: s.canCancelSubscription
|
|
316
316
|
}, e.id))
|
|
317
317
|
}),
|
|
318
318
|
G > 1 && /* @__PURE__ */ b("div", {
|
|
@@ -394,20 +394,20 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
394
394
|
}),
|
|
395
395
|
/* @__PURE__ */ y("h2", {
|
|
396
396
|
className: "text-lg font-semibold text-text-primary",
|
|
397
|
-
children:
|
|
397
|
+
children: t("billing.accessDenied.title", "Access Denied")
|
|
398
398
|
}),
|
|
399
399
|
/* @__PURE__ */ y("p", {
|
|
400
400
|
className: "text-sm text-text-secondary max-w-sm",
|
|
401
|
-
children:
|
|
401
|
+
children: t("billing.subscriptions.noViewPermission", "You don't have permission to view subscriptions.")
|
|
402
402
|
})
|
|
403
403
|
]
|
|
404
404
|
})
|
|
405
405
|
});
|
|
406
|
-
}, D = ({ subscription: e, onView:
|
|
407
|
-
let
|
|
406
|
+
}, D = ({ subscription: e, onView: n, canCancel: r }) => {
|
|
407
|
+
let i = p(), a = e.plan, d = u(e.status), f = e.status === "active", m = new Date(e.endDate), h = /* @__PURE__ */ new Date(), g = Math.max(0, Math.ceil((m.getTime() - h.getTime()) / 864e5));
|
|
408
408
|
return /* @__PURE__ */ y("div", {
|
|
409
409
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 hover:border-border-strong hover:shadow-elevation-2 transition-all duration-200 cursor-pointer",
|
|
410
|
-
onClick:
|
|
410
|
+
onClick: n,
|
|
411
411
|
children: /* @__PURE__ */ b("div", {
|
|
412
412
|
className: "p-5",
|
|
413
413
|
children: [
|
|
@@ -435,21 +435,21 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
435
435
|
className: "flex items-center gap-2 flex-wrap",
|
|
436
436
|
children: [/* @__PURE__ */ y("h3", {
|
|
437
437
|
className: "font-semibold text-text-primary",
|
|
438
|
-
children:
|
|
439
|
-
}), /* @__PURE__ */ y(
|
|
440
|
-
status:
|
|
438
|
+
children: a?.name || i("billing.common.unknownPlan", "Unknown Plan")
|
|
439
|
+
}), /* @__PURE__ */ y(t, {
|
|
440
|
+
status: d,
|
|
441
441
|
dot: !0,
|
|
442
|
-
pulse:
|
|
443
|
-
children:
|
|
442
|
+
pulse: f,
|
|
443
|
+
children: l(e.status)
|
|
444
444
|
})]
|
|
445
445
|
}), /* @__PURE__ */ b("div", {
|
|
446
446
|
className: "flex items-center gap-4 mt-1 text-sm text-text-secondary",
|
|
447
447
|
children: [
|
|
448
448
|
/* @__PURE__ */ b("span", { children: [
|
|
449
|
-
|
|
449
|
+
a ? o(a.price, a.currency) : "—",
|
|
450
450
|
" /",
|
|
451
451
|
" ",
|
|
452
|
-
|
|
452
|
+
a ? c(a.duration) : "—"
|
|
453
453
|
] }),
|
|
454
454
|
/* @__PURE__ */ y("span", {
|
|
455
455
|
className: "hidden sm:inline",
|
|
@@ -457,29 +457,29 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
457
457
|
}),
|
|
458
458
|
/* @__PURE__ */ y("span", {
|
|
459
459
|
className: "hidden sm:inline",
|
|
460
|
-
children:
|
|
460
|
+
children: i("billing.subscriptions.started", "Started {{date}}", { date: s(e.startDate, "short") })
|
|
461
461
|
})
|
|
462
462
|
]
|
|
463
463
|
})]
|
|
464
464
|
}),
|
|
465
465
|
/* @__PURE__ */ b("div", {
|
|
466
466
|
className: "flex items-center gap-4",
|
|
467
|
-
children: [
|
|
467
|
+
children: [f && /* @__PURE__ */ b("div", {
|
|
468
468
|
className: "text-right",
|
|
469
469
|
children: [/* @__PURE__ */ y("p", {
|
|
470
470
|
className: "text-sm font-medium text-text-primary",
|
|
471
|
-
children:
|
|
471
|
+
children: i("billing.subscriptions.daysRemaining", "{{count}} days", { count: g })
|
|
472
472
|
}), /* @__PURE__ */ y("p", {
|
|
473
473
|
className: "text-xs text-text-secondary",
|
|
474
|
-
children:
|
|
474
|
+
children: i("billing.subscriptions.remaining", "remaining")
|
|
475
475
|
})]
|
|
476
476
|
}), /* @__PURE__ */ y("button", {
|
|
477
477
|
type: "button",
|
|
478
478
|
onClick: (e) => {
|
|
479
|
-
e.stopPropagation(),
|
|
479
|
+
e.stopPropagation(), n();
|
|
480
480
|
},
|
|
481
481
|
className: "px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
|
|
482
|
-
children:
|
|
482
|
+
children: i("billing.common.view", "View")
|
|
483
483
|
})]
|
|
484
484
|
})
|
|
485
485
|
]
|
|
@@ -488,7 +488,7 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
488
488
|
className: "mt-4 pt-4 border-t border-border-subtle",
|
|
489
489
|
children: /* @__PURE__ */ y("p", {
|
|
490
490
|
className: "text-sm text-text-secondary",
|
|
491
|
-
children:
|
|
491
|
+
children: i("billing.subscriptions.addonsAttached", "{{count}} addon{{plural}} attached", {
|
|
492
492
|
count: e.addonSubscriptions.length,
|
|
493
493
|
plural: e.addonSubscriptions.length === 1 ? "" : "s"
|
|
494
494
|
})
|
|
@@ -498,14 +498,13 @@ var w = ["expired", "upgraded"], T = 10, E = () => {
|
|
|
498
498
|
className: "mt-4 pt-4 border-t border-border-subtle",
|
|
499
499
|
children: /* @__PURE__ */ b("p", {
|
|
500
500
|
className: "text-sm text-text-secondary",
|
|
501
|
-
children: [
|
|
501
|
+
children: [i("billing.subscriptions.canceledOn", "Canceled on {{date}}", { date: s(e.canceledAt) }), e.cancellationReason && /* @__PURE__ */ b("span", { children: [": ", e.cancellationReason] })]
|
|
502
502
|
})
|
|
503
503
|
})
|
|
504
504
|
]
|
|
505
505
|
})
|
|
506
506
|
});
|
|
507
507
|
};
|
|
508
|
-
//#endregion
|
|
509
508
|
export { E as SubscriptionsListPage };
|
|
510
509
|
|
|
511
510
|
//# sourceMappingURL=SubscriptionsListPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionsListPage.js","names":[],"sources":["../../../../../src/billing/modules/subscriptions/pages/SubscriptionsListPage.tsx"],"sourcesContent":["/**\n * Subscriptions Module - Subscriptions List Page\n * Displays paginated subscriptions for the selected billing account\n */\n\nimport { useState, useEffect, useRef, type FC } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useBillingAccounts, usePaginatedSubscriptions } from '../hooks';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useBilling } from '../../../providers/BillingProvider';\nimport { BillingSubscription, SubscriptionStatus, BillingAccount } from '../../../shared/types';\nimport { useBillingAccountSelection } from '../../../hooks/useBillingAccountSelection';\nimport { withBillingAccountId } from '../../../shared/utils/navigation';\nimport {\n formatCurrency,\n formatDate,\n formatPlanDuration,\n formatSubscriptionStatus,\n} from '../../../shared/utils/format';\nimport { getSubscriptionStatusColor } from '../../../shared/utils/status';\nimport { StatusPill } from '../../../shared/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { PagePurpose, EmphasisPanel, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\n\ntype FilterStatus = 'all' | 'active' | 'canceled' | 'inactive';\n\n// Statuses that count as \"inactive\" (historical/past subscriptions)\nconst INACTIVE_STATUSES = ['expired', 'upgraded'] as const;\n\nconst PAGE_SIZE = 10;\n\nexport const SubscriptionsListPage: FC = () => {\n const tr = useTr();\n const navigateTo = useBillingNavigate();\n const permissions = useBillingPermissions();\n const { orgId } = useBilling();\n const [searchParams, setSearchParams] = useSearchParams();\n\n // Fetch all billing accounts for the selector\n const { billingAccounts, isLoading: isLoadingAccounts } = useBillingAccounts();\n\n // State\n const {\n selectedAccountId: selectedBillingAccountId,\n setSelectedAccountId: setSelectedBillingAccountId,\n } = useBillingAccountSelection({\n orgId,\n billingAccounts,\n syncFromUrl: true,\n urlParamName: 'billingAccountId',\n });\n\n const [isAccountSelectorOpen, setIsAccountSelectorOpen] = useState(false);\n const [filterStatus, setFilterStatus] = useState<FilterStatus>('all');\n const [searchQuery, setSearchQuery] = useState('');\n const [debouncedSearch, setDebouncedSearch] = useState('');\n const [currentPage, setCurrentPage] = useState(1);\n const debounceTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n useEffect(() => {\n clearTimeout(debounceTimer.current);\n debounceTimer.current = setTimeout(() => {\n setDebouncedSearch(searchQuery);\n setCurrentPage(1);\n }, 400);\n return () => clearTimeout(debounceTimer.current);\n }, [searchQuery]);\n\n // Fetch paginated subscriptions for selected billing account\n const {\n subscriptions,\n activeSubscriptions,\n totalCount,\n totalPages,\n isLoading: isLoadingSubscriptions,\n error,\n refetch,\n } = usePaginatedSubscriptions(\n selectedBillingAccountId ?? undefined,\n currentPage,\n PAGE_SIZE,\n debouncedSearch || undefined\n );\n\n // Get selected billing account info from the list\n const selectedBillingAccount = billingAccounts.find((a) => a.id === selectedBillingAccountId);\n\n // Handle account selection\n const handleSelectAccount = (account: BillingAccount) => {\n setSelectedBillingAccountId(account.id);\n // This page reads its selection from the `billingAccountId` URL param on every\n // navigation (syncFromUrl: true in useBillingAccountSelection). Without updating\n // it here too, that same sync effect immediately overwrites the new selection\n // with the still-stale URL value, snapping the picker back to the old account.\n const nextParams = new URLSearchParams(searchParams);\n nextParams.set('billingAccountId', account.id);\n setSearchParams(nextParams, { replace: true });\n setIsAccountSelectorOpen(false);\n setCurrentPage(1); // Reset to first page when switching accounts\n };\n\n // Handle page change\n const handlePageChange = (newPage: number) => {\n setCurrentPage(newPage);\n };\n\n // Client-side status filter only; search is handled by the backend\n const filteredSubscriptions = subscriptions.filter((subscription) => {\n if (filterStatus === 'all') return true;\n if (filterStatus === 'inactive') {\n return INACTIVE_STATUSES.includes(subscription.status as (typeof INACTIVE_STATUSES)[number]);\n }\n return subscription.status === filterStatus;\n });\n\n const isLoading = isLoadingAccounts || isLoadingSubscriptions;\n\n // Permission check\n if (!permissions.canViewSubscriptions) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <div className=\"size-12 mx-auto rounded-full bg-bg-sunken flex items-center justify-center\">\n <svg\n className=\"size-6 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary max-w-sm\">\n {tr(\n 'billing.subscriptions.noViewPermission',\n \"You don't have permission to view subscriptions.\"\n )}\n </p>\n </div>\n </div>\n );\n }\n\n // Loading state\n if (isLoading && !selectedBillingAccount) {\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"h-8 w-48 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"space-y-4\">\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"border border-border-subtle rounded-lg p-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-12 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-5 w-32 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-48 bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <div className=\"size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center\">\n <svg\n className=\"size-6 text-status-error-text\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.subscriptions.failedToLoad', 'Failed to load subscriptions')}\n </h2>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n {tr('billing.common.tryAgain', 'Try Again')}\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n {tr('billing.subscriptions.title', 'Subscriptions')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {tr('billing.subscriptions.subtitle', 'Manage your active and past subscriptions')}\n </p>\n <PagePurpose className=\"mt-3\">\n {tr(\n 'billing.subscriptions.purpose',\n 'See every plan a billing account is subscribed to — active, canceled and expired — in one place. Use it to review what you are paying for, when each plan renews or ends, upgrade or cancel a subscription, and start a new one by browsing plans.'\n )}\n </PagePurpose>\n </div>\n\n {permissions.canCreateSubscription && (\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200\"\n >\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 4v16m8-8H4\"\n />\n </svg>\n {tr('billing.subscriptions.newSubscription', 'New Subscription')}\n </button>\n )}\n </div>\n\n {/* Account Selector (if multiple accounts) */}\n {billingAccounts.length > 1 && (\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={() => setIsAccountSelectorOpen(!isAccountSelectorOpen)}\n className=\"w-full sm:w-auto flex items-center justify-between gap-3 px-4 py-3 border border-border-seam rounded-card bg-bg-surface hover:bg-bg-sunken hover:border-border-strong transition-all duration-200\"\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"size-9 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center\">\n <svg\n className=\"size-4 text-text-link\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4\"\n />\n </svg>\n </div>\n <div className=\"text-left\">\n <p className=\"text-sm font-medium text-text-primary\">\n {selectedBillingAccount?.name ||\n tr('billing.subscriptions.selectAccount', 'Select Account')}\n </p>\n <p className=\"text-xs text-text-secondary\">{selectedBillingAccount?.email}</p>\n </div>\n </div>\n <svg\n className={`size-4 text-text-secondary transition-transform ${isAccountSelectorOpen ? 'rotate-180' : ''}`}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 9l-7 7-7-7\"\n />\n </svg>\n </button>\n\n {isAccountSelectorOpen && (\n <>\n <div className=\"fixed inset-0 z-10\" onClick={() => setIsAccountSelectorOpen(false)} />\n <div className=\"absolute top-full left-0 right-0 sm:right-auto mt-1 w-full sm:w-80 bg-bg-elevated border border-border-seam rounded-card shadow-elevation-3 z-20 py-1 max-h-60 overflow-y-auto\">\n {billingAccounts.map((account) => (\n <button\n type=\"button\"\n key={account.id}\n onClick={() => handleSelectAccount(account)}\n className=\"w-full flex items-center justify-between gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors\"\n >\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"size-9 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0\">\n <svg\n className=\"size-4 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4\"\n />\n </svg>\n </div>\n <div className=\"text-left min-w-0\">\n <p className=\"text-sm font-medium text-text-primary truncate\">\n {account.name}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{account.email}</p>\n </div>\n </div>\n {selectedBillingAccount?.id === account.id && (\n <svg\n className=\"size-4 text-text-link flex-shrink-0\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n )}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n )}\n\n {/* Account Summary — primary emphasis zone */}\n {selectedBillingAccount && (\n <EmphasisPanel className=\"p-5\">\n <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.account', 'Account')}\n </p>\n <p className=\"text-lg font-semibold text-text-primary mt-1\">\n {selectedBillingAccount.name}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.activeSubscriptions', 'Active Subscriptions')}\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-status-success-text mt-1\">\n {activeSubscriptions.length}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.creditBalance', 'Credit Balance')}\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-text-primary mt-1\">\n {(selectedBillingAccount.creditAmount || 0).toLocaleString()}{' '}\n {tr('billing.common.credits', 'Credits')}\n </p>\n </div>\n </div>\n </EmphasisPanel>\n )}\n\n {/* Filters */}\n <div className=\"flex flex-col sm:flex-row flex-wrap items-stretch sm:items-center gap-3 sm:gap-4 pb-4 border-b border-border-subtle\">\n {/* Status Filter */}\n <div className=\"inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken flex-wrap\">\n {(['all', 'active', 'canceled', 'inactive'] as FilterStatus[]).map((status) => (\n <button\n type=\"button\"\n key={status}\n onClick={() => setFilterStatus(status)}\n className={`px-3 py-1.5 text-sm font-medium rounded-button transition-colors capitalize ${\n filterStatus === status\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n }`}\n >\n {status === 'all'\n ? tr('billing.subscriptions.statusAll', 'All')\n : status === 'active'\n ? tr('billing.subscriptions.statusActive', 'Active')\n : status === 'canceled'\n ? tr('billing.subscriptions.statusCanceled', 'Canceled')\n : tr('billing.subscriptions.statusInactive', 'Inactive')}\n </button>\n ))}\n </div>\n\n {/* Search */}\n <div className=\"relative flex-1 min-w-0 w-full sm:max-w-md\">\n <svg\n className=\"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder={tr('billing.subscriptions.searchPlaceholder', 'Search subscriptions...')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border-subtle rounded-button bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent\"\n />\n </div>\n\n {/* Total Count */}\n <div className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.totalCount', '{{count}} subscription{{plural}} total', {\n count: totalCount,\n plural: totalCount !== 1 ? 's' : '',\n })}\n </div>\n </div>\n\n {/* Subscriptions List */}\n {filteredSubscriptions.length === 0 ? (\n <IllustratedEmptyState\n illustration={filterStatus !== 'all' || debouncedSearch ? 'empty-search' : 'empty-data'}\n title={tr('billing.subscriptions.noSubscriptionsFound', 'No subscriptions found')}\n description={\n filterStatus !== 'all' || debouncedSearch\n ? tr(\n 'billing.subscriptions.noSubscriptionsMatchFilters',\n 'No subscriptions match your filters.'\n )\n : tr(\n 'billing.subscriptions.noSubscriptionsYet',\n \"You don't have any subscriptions yet.\"\n )\n }\n action={\n permissions.canCreateSubscription && filterStatus === 'all' && !debouncedSearch ? (\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200\"\n >\n {tr('billing.subscriptions.browsePlans', 'Browse Plans')}\n </button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"space-y-4\">\n {filteredSubscriptions.map((subscription) => (\n <SubscriptionCard\n key={subscription.id}\n subscription={subscription}\n onView={() =>\n navigateTo(\n withBillingAccountId(\n `/subscriptions/${subscription.id}`,\n subscription.billingAccountId\n )\n )\n }\n canCancel={permissions.canCancelSubscription}\n />\n ))}\n </div>\n )}\n\n {/* Pagination */}\n {totalPages > 1 && (\n <div className=\"flex items-center justify-center gap-2 pt-4\">\n <button\n type=\"button\"\n onClick={() => handlePageChange(currentPage - 1)}\n disabled={currentPage === 1}\n className=\"px-3 py-1.5 text-sm border border-border-subtle rounded-button disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors\"\n >\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n\n <div className=\"flex items-center gap-1\">\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => {\n // Show first, last, current, and adjacent pages\n const showPage =\n page === 1 || page === totalPages || Math.abs(page - currentPage) <= 1;\n\n // Show ellipsis\n const showEllipsisBefore = page === currentPage - 2 && currentPage > 3;\n const showEllipsisAfter = page === currentPage + 2 && currentPage < totalPages - 2;\n\n if (showEllipsisBefore || showEllipsisAfter) {\n return (\n <span key={page} className=\"px-2 text-text-secondary\">\n ...\n </span>\n );\n }\n\n if (!showPage) return null;\n\n return (\n <button\n type=\"button\"\n key={page}\n onClick={() => handlePageChange(page)}\n className={`px-3 py-1.5 text-sm rounded-button transition-colors ${\n page === currentPage\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'border border-border-subtle hover:bg-bg-sunken'\n }`}\n >\n {page}\n </button>\n );\n })}\n </div>\n\n <button\n type=\"button\"\n onClick={() => handlePageChange(currentPage + 1)}\n disabled={currentPage === totalPages}\n className=\"px-3 py-1.5 text-sm border border-border-subtle rounded-button disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors\"\n >\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n )}\n </div>\n );\n};\n\n// ============================================================================\n// Subscription Card Component\n// ============================================================================\n\ninterface SubscriptionCardProps {\n subscription: BillingSubscription;\n onView: () => void;\n canCancel: boolean;\n}\n\nconst SubscriptionCard: FC<SubscriptionCardProps> = ({\n subscription,\n onView,\n canCancel: _canCancel,\n}) => {\n const tr = useTr();\n const plan = subscription.plan;\n const statusColor = getSubscriptionStatusColor(subscription.status);\n const isActive = subscription.status === ('active' as SubscriptionStatus);\n\n // Calculate days remaining\n const endDate = new Date(subscription.endDate);\n const now = new Date();\n const daysRemaining = Math.max(\n 0,\n Math.ceil((endDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24))\n );\n\n return (\n <div\n className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 hover:border-border-strong hover:shadow-elevation-2 transition-all duration-200 cursor-pointer\"\n onClick={onView}\n >\n <div className=\"p-5\">\n <div className=\"flex flex-col sm:flex-row sm:items-center gap-4\">\n {/* Plan Icon */}\n <div className=\"size-12 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center shrink-0\">\n <svg\n className=\"size-6 text-text-link\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\n />\n </svg>\n </div>\n\n {/* Subscription Info */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"font-semibold text-text-primary\">\n {plan?.name || tr('billing.common.unknownPlan', 'Unknown Plan')}\n </h3>\n <StatusPill status={statusColor} dot pulse={isActive}>\n {formatSubscriptionStatus(subscription.status)}\n </StatusPill>\n </div>\n <div className=\"flex items-center gap-4 mt-1 text-sm text-text-secondary\">\n <span>\n {plan ? formatCurrency(plan.price, plan.currency) : '—'} /{' '}\n {plan ? formatPlanDuration(plan.duration) : '—'}\n </span>\n <span className=\"hidden sm:inline\">•</span>\n <span className=\"hidden sm:inline\">\n {tr('billing.subscriptions.started', 'Started {{date}}', {\n date: formatDate(subscription.startDate, 'short'),\n })}\n </span>\n </div>\n </div>\n\n {/* Right Side Info */}\n <div className=\"flex items-center gap-4\">\n {isActive && (\n <div className=\"text-right\">\n <p className=\"text-sm font-medium text-text-primary\">\n {tr('billing.subscriptions.daysRemaining', '{{count}} days', {\n count: daysRemaining,\n })}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tr('billing.subscriptions.remaining', 'remaining')}\n </p>\n </div>\n )}\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onView();\n }}\n className=\"px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200\"\n >\n {tr('billing.common.view', 'View')}\n </button>\n </div>\n </div>\n\n {/* Additional Info */}\n {subscription.addonSubscriptions && subscription.addonSubscriptions.length > 0 && (\n <div className=\"mt-4 pt-4 border-t border-border-subtle\">\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.addonsAttached', '{{count}} addon{{plural}} attached', {\n count: subscription.addonSubscriptions.length,\n plural: subscription.addonSubscriptions.length !== 1 ? 's' : '',\n })}\n </p>\n </div>\n )}\n\n {/* Cancellation Info */}\n {subscription.canceledAt && (\n <div className=\"mt-4 pt-4 border-t border-border-subtle\">\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.canceledOn', 'Canceled on {{date}}', {\n date: formatDate(subscription.canceledAt),\n })}\n {subscription.cancellationReason && <span>: {subscription.cancellationReason}</span>}\n </p>\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,IAAM,IAAoB,CAAC,WAAW,UAAU,GAE1C,IAAY,IAEL,UAAkC;CAC7C,IAAM,IAAK,EAAM,GACX,IAAa,EAAmB,GAChC,IAAc,EAAsB,GACpC,EAAE,aAAU,EAAW,GACvB,C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ACb,kBAAC,KAAD;MAAG,WAAU;gBAAb,CACG,EAAG,oCAAoC,wBAAwB,EAC9D,MAAM,EAAW,EAAa,UAAU,EAC1C,CAAC,GACA,EAAa,sBAAsB,kBAAC,QAAD,EAAA,UAAA,CAAM,MAAG,EAAa,kBAAyB,EAAA,CAAA,CAClF;;IACA,CAAA;GAEJ;;CACF,CAAA;AAET"}
|
|
1
|
+
{"version":3,"file":"SubscriptionsListPage.js","names":["_Fragment","Fragment$1","INACTIVE_STATUSES","PAGE_SIZE","SubscriptionsListPage","tr","useTr","navigateTo","useBillingNavigate","permissions","useBillingPermissions","useBilling","searchParams","setSearchParams","useSearchParams","isLoadingAccounts","useBillingAccounts","selectedBillingAccountId","setSelectedBillingAccountId","useBillingAccountSelection","isAccountSelectorOpen","setIsAccountSelectorOpen","useState","filterStatus","setFilterStatus","searchQuery","setSearchQuery","debouncedSearch","setDebouncedSearch","currentPage","setCurrentPage","debounceTimer","useRef","isLoadingSubscriptions","usePaginatedSubscriptions","selectedBillingAccount","billingAccounts","a","handleSelectAccount","account","nextParams","handlePageChange","newPage","filteredSubscriptions","subscriptions","subscription","isLoading","i","error","refetch","PagePurpose","EmphasisPanel","activeSubscriptions","status","totalCount","IllustratedEmptyState","SubscriptionCard","withBillingAccountId","totalPages","showPage","page","showEllipsisBefore","showEllipsisAfter","_canCancel","plan","statusColor","getSubscriptionStatusColor","isActive","endDate","now","daysRemaining","onView","StatusPill","formatSubscriptionStatus","formatCurrency","formatPlanDuration","formatDate"],"sources":["../../../../../src/billing/modules/subscriptions/pages/SubscriptionsListPage.tsx"],"sourcesContent":["/**\n * Subscriptions Module - Subscriptions List Page\n * Displays paginated subscriptions for the selected billing account\n */\n\nimport { useState, useEffect, useRef, type FC } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useBillingAccounts, usePaginatedSubscriptions } from '../hooks';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useBilling } from '../../../providers/BillingProvider';\nimport { BillingSubscription, SubscriptionStatus, BillingAccount } from '../../../shared/types';\nimport { useBillingAccountSelection } from '../../../hooks/useBillingAccountSelection';\nimport { withBillingAccountId } from '../../../shared/utils/navigation';\nimport {\n formatCurrency,\n formatDate,\n formatPlanDuration,\n formatSubscriptionStatus,\n} from '../../../shared/utils/format';\nimport { getSubscriptionStatusColor } from '../../../shared/utils/status';\nimport { StatusPill } from '../../../shared/ui';\nimport { useTr } from '../../../shared/hooks/useTr';\nimport { PagePurpose, EmphasisPanel, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\n\ntype FilterStatus = 'all' | 'active' | 'canceled' | 'inactive';\n\n// Statuses that count as \"inactive\" (historical/past subscriptions)\nconst INACTIVE_STATUSES = ['expired', 'upgraded'] as const;\n\nconst PAGE_SIZE = 10;\n\nexport const SubscriptionsListPage: FC = () => {\n const tr = useTr();\n const navigateTo = useBillingNavigate();\n const permissions = useBillingPermissions();\n const { orgId } = useBilling();\n const [searchParams, setSearchParams] = useSearchParams();\n\n // Fetch all billing accounts for the selector\n const { billingAccounts, isLoading: isLoadingAccounts } = useBillingAccounts();\n\n // State\n const {\n selectedAccountId: selectedBillingAccountId,\n setSelectedAccountId: setSelectedBillingAccountId,\n } = useBillingAccountSelection({\n orgId,\n billingAccounts,\n syncFromUrl: true,\n urlParamName: 'billingAccountId',\n });\n\n const [isAccountSelectorOpen, setIsAccountSelectorOpen] = useState(false);\n const [filterStatus, setFilterStatus] = useState<FilterStatus>('all');\n const [searchQuery, setSearchQuery] = useState('');\n const [debouncedSearch, setDebouncedSearch] = useState('');\n const [currentPage, setCurrentPage] = useState(1);\n const debounceTimer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n useEffect(() => {\n clearTimeout(debounceTimer.current);\n debounceTimer.current = setTimeout(() => {\n setDebouncedSearch(searchQuery);\n setCurrentPage(1);\n }, 400);\n return () => clearTimeout(debounceTimer.current);\n }, [searchQuery]);\n\n // Fetch paginated subscriptions for selected billing account\n const {\n subscriptions,\n activeSubscriptions,\n totalCount,\n totalPages,\n isLoading: isLoadingSubscriptions,\n error,\n refetch,\n } = usePaginatedSubscriptions(\n selectedBillingAccountId ?? undefined,\n currentPage,\n PAGE_SIZE,\n debouncedSearch || undefined\n );\n\n // Get selected billing account info from the list\n const selectedBillingAccount = billingAccounts.find((a) => a.id === selectedBillingAccountId);\n\n // Handle account selection\n const handleSelectAccount = (account: BillingAccount) => {\n setSelectedBillingAccountId(account.id);\n // This page reads its selection from the `billingAccountId` URL param on every\n // navigation (syncFromUrl: true in useBillingAccountSelection). Without updating\n // it here too, that same sync effect immediately overwrites the new selection\n // with the still-stale URL value, snapping the picker back to the old account.\n const nextParams = new URLSearchParams(searchParams);\n nextParams.set('billingAccountId', account.id);\n setSearchParams(nextParams, { replace: true });\n setIsAccountSelectorOpen(false);\n setCurrentPage(1); // Reset to first page when switching accounts\n };\n\n // Handle page change\n const handlePageChange = (newPage: number) => {\n setCurrentPage(newPage);\n };\n\n // Client-side status filter only; search is handled by the backend\n const filteredSubscriptions = subscriptions.filter((subscription) => {\n if (filterStatus === 'all') return true;\n if (filterStatus === 'inactive') {\n return INACTIVE_STATUSES.includes(subscription.status as (typeof INACTIVE_STATUSES)[number]);\n }\n return subscription.status === filterStatus;\n });\n\n const isLoading = isLoadingAccounts || isLoadingSubscriptions;\n\n // Permission check\n if (!permissions.canViewSubscriptions) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <div className=\"size-12 mx-auto rounded-full bg-bg-sunken flex items-center justify-center\">\n <svg\n className=\"size-6 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary max-w-sm\">\n {tr(\n 'billing.subscriptions.noViewPermission',\n \"You don't have permission to view subscriptions.\"\n )}\n </p>\n </div>\n </div>\n );\n }\n\n // Loading state\n if (isLoading && !selectedBillingAccount) {\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"h-8 w-48 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"space-y-4\">\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"border border-border-subtle rounded-lg p-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-12 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-5 w-32 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-48 bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <div className=\"size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center\">\n <svg\n className=\"size-6 text-status-error-text\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.subscriptions.failedToLoad', 'Failed to load subscriptions')}\n </h2>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n {tr('billing.common.tryAgain', 'Try Again')}\n </button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n {tr('billing.subscriptions.title', 'Subscriptions')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {tr('billing.subscriptions.subtitle', 'Manage your active and past subscriptions')}\n </p>\n <PagePurpose className=\"mt-3\">\n {tr(\n 'billing.subscriptions.purpose',\n 'See every plan a billing account is subscribed to — active, canceled and expired — in one place. Use it to review what you are paying for, when each plan renews or ends, upgrade or cancel a subscription, and start a new one by browsing plans.'\n )}\n </PagePurpose>\n </div>\n\n {permissions.canCreateSubscription && (\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200\"\n >\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 4v16m8-8H4\"\n />\n </svg>\n {tr('billing.subscriptions.newSubscription', 'New Subscription')}\n </button>\n )}\n </div>\n\n {/* Account Selector (if multiple accounts) */}\n {billingAccounts.length > 1 && (\n <div className=\"relative\">\n <button\n type=\"button\"\n onClick={() => setIsAccountSelectorOpen(!isAccountSelectorOpen)}\n className=\"w-full sm:w-auto flex items-center justify-between gap-3 px-4 py-3 border border-border-seam rounded-card bg-bg-surface hover:bg-bg-sunken hover:border-border-strong transition-all duration-200\"\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"size-9 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center\">\n <svg\n className=\"size-4 text-text-link\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4\"\n />\n </svg>\n </div>\n <div className=\"text-left\">\n <p className=\"text-sm font-medium text-text-primary\">\n {selectedBillingAccount?.name ||\n tr('billing.subscriptions.selectAccount', 'Select Account')}\n </p>\n <p className=\"text-xs text-text-secondary\">{selectedBillingAccount?.email}</p>\n </div>\n </div>\n <svg\n className={`size-4 text-text-secondary transition-transform ${isAccountSelectorOpen ? 'rotate-180' : ''}`}\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 9l-7 7-7-7\"\n />\n </svg>\n </button>\n\n {isAccountSelectorOpen && (\n <>\n <div className=\"fixed inset-0 z-10\" onClick={() => setIsAccountSelectorOpen(false)} />\n <div className=\"absolute top-full left-0 right-0 sm:right-auto mt-1 w-full sm:w-80 bg-bg-elevated border border-border-seam rounded-card shadow-elevation-3 z-20 py-1 max-h-60 overflow-y-auto\">\n {billingAccounts.map((account) => (\n <button\n type=\"button\"\n key={account.id}\n onClick={() => handleSelectAccount(account)}\n className=\"w-full flex items-center justify-between gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors\"\n >\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"size-9 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0\">\n <svg\n className=\"size-4 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4\"\n />\n </svg>\n </div>\n <div className=\"text-left min-w-0\">\n <p className=\"text-sm font-medium text-text-primary truncate\">\n {account.name}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{account.email}</p>\n </div>\n </div>\n {selectedBillingAccount?.id === account.id && (\n <svg\n className=\"size-4 text-text-link flex-shrink-0\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 13l4 4L19 7\"\n />\n </svg>\n )}\n </button>\n ))}\n </div>\n </>\n )}\n </div>\n )}\n\n {/* Account Summary — primary emphasis zone */}\n {selectedBillingAccount && (\n <EmphasisPanel className=\"p-5\">\n <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.account', 'Account')}\n </p>\n <p className=\"text-lg font-semibold text-text-primary mt-1\">\n {selectedBillingAccount.name}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.activeSubscriptions', 'Active Subscriptions')}\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-status-success-text mt-1\">\n {activeSubscriptions.length}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.creditBalance', 'Credit Balance')}\n </p>\n <p className=\"text-lg font-semibold tabular-nums text-text-primary mt-1\">\n {(selectedBillingAccount.creditAmount || 0).toLocaleString()}{' '}\n {tr('billing.common.credits', 'Credits')}\n </p>\n </div>\n </div>\n </EmphasisPanel>\n )}\n\n {/* Filters */}\n <div className=\"flex flex-col sm:flex-row flex-wrap items-stretch sm:items-center gap-3 sm:gap-4 pb-4 border-b border-border-subtle\">\n {/* Status Filter */}\n <div className=\"inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken flex-wrap\">\n {(['all', 'active', 'canceled', 'inactive'] as FilterStatus[]).map((status) => (\n <button\n type=\"button\"\n key={status}\n onClick={() => setFilterStatus(status)}\n className={`px-3 py-1.5 text-sm font-medium rounded-button transition-colors capitalize ${\n filterStatus === status\n ? 'bg-bg-surface text-text-primary shadow-sm'\n : 'text-text-secondary hover:text-text-primary'\n }`}\n >\n {status === 'all'\n ? tr('billing.subscriptions.statusAll', 'All')\n : status === 'active'\n ? tr('billing.subscriptions.statusActive', 'Active')\n : status === 'canceled'\n ? tr('billing.subscriptions.statusCanceled', 'Canceled')\n : tr('billing.subscriptions.statusInactive', 'Inactive')}\n </button>\n ))}\n </div>\n\n {/* Search */}\n <div className=\"relative flex-1 min-w-0 w-full sm:max-w-md\">\n <svg\n className=\"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder={tr('billing.subscriptions.searchPlaceholder', 'Search subscriptions...')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border-subtle rounded-button bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent\"\n />\n </div>\n\n {/* Total Count */}\n <div className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.totalCount', '{{count}} subscription{{plural}} total', {\n count: totalCount,\n plural: totalCount !== 1 ? 's' : '',\n })}\n </div>\n </div>\n\n {/* Subscriptions List */}\n {filteredSubscriptions.length === 0 ? (\n <IllustratedEmptyState\n illustration={filterStatus !== 'all' || debouncedSearch ? 'empty-search' : 'empty-data'}\n title={tr('billing.subscriptions.noSubscriptionsFound', 'No subscriptions found')}\n description={\n filterStatus !== 'all' || debouncedSearch\n ? tr(\n 'billing.subscriptions.noSubscriptionsMatchFilters',\n 'No subscriptions match your filters.'\n )\n : tr(\n 'billing.subscriptions.noSubscriptionsYet',\n \"You don't have any subscriptions yet.\"\n )\n }\n action={\n permissions.canCreateSubscription && filterStatus === 'all' && !debouncedSearch ? (\n <button\n type=\"button\"\n onClick={() => navigateTo('/plans')}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200\"\n >\n {tr('billing.subscriptions.browsePlans', 'Browse Plans')}\n </button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"space-y-4\">\n {filteredSubscriptions.map((subscription) => (\n <SubscriptionCard\n key={subscription.id}\n subscription={subscription}\n onView={() =>\n navigateTo(\n withBillingAccountId(\n `/subscriptions/${subscription.id}`,\n subscription.billingAccountId\n )\n )\n }\n canCancel={permissions.canCancelSubscription}\n />\n ))}\n </div>\n )}\n\n {/* Pagination */}\n {totalPages > 1 && (\n <div className=\"flex items-center justify-center gap-2 pt-4\">\n <button\n type=\"button\"\n onClick={() => handlePageChange(currentPage - 1)}\n disabled={currentPage === 1}\n className=\"px-3 py-1.5 text-sm border border-border-subtle rounded-button disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors\"\n >\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n\n <div className=\"flex items-center gap-1\">\n {Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => {\n // Show first, last, current, and adjacent pages\n const showPage =\n page === 1 || page === totalPages || Math.abs(page - currentPage) <= 1;\n\n // Show ellipsis\n const showEllipsisBefore = page === currentPage - 2 && currentPage > 3;\n const showEllipsisAfter = page === currentPage + 2 && currentPage < totalPages - 2;\n\n if (showEllipsisBefore || showEllipsisAfter) {\n return (\n <span key={page} className=\"px-2 text-text-secondary\">\n ...\n </span>\n );\n }\n\n if (!showPage) return null;\n\n return (\n <button\n type=\"button\"\n key={page}\n onClick={() => handlePageChange(page)}\n className={`px-3 py-1.5 text-sm rounded-button transition-colors ${\n page === currentPage\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'border border-border-subtle hover:bg-bg-sunken'\n }`}\n >\n {page}\n </button>\n );\n })}\n </div>\n\n <button\n type=\"button\"\n onClick={() => handlePageChange(currentPage + 1)}\n disabled={currentPage === totalPages}\n className=\"px-3 py-1.5 text-sm border border-border-subtle rounded-button disabled:opacity-50 disabled:cursor-not-allowed hover:bg-bg-sunken transition-colors\"\n >\n <svg className=\"size-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 5l7 7-7 7\" />\n </svg>\n </button>\n </div>\n )}\n </div>\n );\n};\n\n// ============================================================================\n// Subscription Card Component\n// ============================================================================\n\ninterface SubscriptionCardProps {\n subscription: BillingSubscription;\n onView: () => void;\n canCancel: boolean;\n}\n\nconst SubscriptionCard: FC<SubscriptionCardProps> = ({\n subscription,\n onView,\n canCancel: _canCancel,\n}) => {\n const tr = useTr();\n const plan = subscription.plan;\n const statusColor = getSubscriptionStatusColor(subscription.status);\n const isActive = subscription.status === ('active' as SubscriptionStatus);\n\n // Calculate days remaining\n const endDate = new Date(subscription.endDate);\n const now = new Date();\n const daysRemaining = Math.max(\n 0,\n Math.ceil((endDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24))\n );\n\n return (\n <div\n className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 hover:border-border-strong hover:shadow-elevation-2 transition-all duration-200 cursor-pointer\"\n onClick={onView}\n >\n <div className=\"p-5\">\n <div className=\"flex flex-col sm:flex-row sm:items-center gap-4\">\n {/* Plan Icon */}\n <div className=\"size-12 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center shrink-0\">\n <svg\n className=\"size-6 text-text-link\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"\n />\n </svg>\n </div>\n\n {/* Subscription Info */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"font-semibold text-text-primary\">\n {plan?.name || tr('billing.common.unknownPlan', 'Unknown Plan')}\n </h3>\n <StatusPill status={statusColor} dot pulse={isActive}>\n {formatSubscriptionStatus(subscription.status)}\n </StatusPill>\n </div>\n <div className=\"flex items-center gap-4 mt-1 text-sm text-text-secondary\">\n <span>\n {plan ? formatCurrency(plan.price, plan.currency) : '—'} /{' '}\n {plan ? formatPlanDuration(plan.duration) : '—'}\n </span>\n <span className=\"hidden sm:inline\">•</span>\n <span className=\"hidden sm:inline\">\n {tr('billing.subscriptions.started', 'Started {{date}}', {\n date: formatDate(subscription.startDate, 'short'),\n })}\n </span>\n </div>\n </div>\n\n {/* Right Side Info */}\n <div className=\"flex items-center gap-4\">\n {isActive && (\n <div className=\"text-right\">\n <p className=\"text-sm font-medium text-text-primary\">\n {tr('billing.subscriptions.daysRemaining', '{{count}} days', {\n count: daysRemaining,\n })}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tr('billing.subscriptions.remaining', 'remaining')}\n </p>\n </div>\n )}\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n onView();\n }}\n className=\"px-3 py-1.5 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200\"\n >\n {tr('billing.common.view', 'View')}\n </button>\n </div>\n </div>\n\n {/* Additional Info */}\n {subscription.addonSubscriptions && subscription.addonSubscriptions.length > 0 && (\n <div className=\"mt-4 pt-4 border-t border-border-subtle\">\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.addonsAttached', '{{count}} addon{{plural}} attached', {\n count: subscription.addonSubscriptions.length,\n plural: subscription.addonSubscriptions.length !== 1 ? 's' : '',\n })}\n </p>\n </div>\n )}\n\n {/* Cancellation Info */}\n {subscription.canceledAt && (\n <div className=\"mt-4 pt-4 border-t border-border-subtle\">\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.subscriptions.canceledOn', 'Canceled on {{date}}', {\n date: formatDate(subscription.canceledAt),\n })}\n {subscription.cancellationReason && <span>: {subscription.cancellationReason}</span>}\n </p>\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,IAAME,IAAoB,CAAC,WAAW,UAAU,GAE1CC,IAAY,IAELC,UAAkC;CAC7C,IAAMC,IAAKC,EAAM,GACXC,IAAaC,EAAmB,GAChCC,IAAcC,EAAsB,GACpC,EAAE,aAAUC,EAAW,GACvB,CAACC,GAAcC,KAAmBC,EAAgB,GAGlD,EAAE,oBAAiB,WAAWC,MAAsBC,EAAmB,GAGvE,EACJ,mBAAmBC,GACnB,sBAAsBC,MACpBC,EAA2B;EAC7B;EACA;EACA,aAAa;EACb,cAAc;CAChB,CAAC,GAEK,CAACC,GAAuBC,KAA4BC,EAAS,EAAK,GAClE,CAACC,GAAcC,KAAmBF,EAAuB,KAAK,GAC9D,CAACG,GAAaC,KAAkBJ,EAAS,EAAE,GAC3C,CAACK,GAAiBC,KAAsBN,EAAS,EAAE,GACnD,CAACO,GAAaC,KAAkBR,EAAS,CAAC,GAC1CS,IAAgBC,EAAkD,KAAA,CAAS;CAE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