@bunnyapp/components 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -20
- package/dist/cjs/index.js +20857 -0
- package/dist/cjs/playground/billingdetails/index.d.ts +1 -0
- package/dist/cjs/playground/main.d.ts +1 -0
- package/dist/cjs/playground/transactions/index.d.ts +1 -0
- package/dist/cjs/src/ajax.d.ts +1 -0
- package/dist/cjs/src/components/BillingDetails/BillingDetails.d.ts +15 -0
- package/dist/cjs/src/components/BillingDetails/BillingDetails.stories.d.ts +14 -0
- package/dist/cjs/src/components/BillingDetails/BillingDetailsForm.d.ts +9 -0
- package/dist/cjs/src/components/BillingDetails/index.d.ts +1 -0
- package/dist/cjs/src/components/BunnyProvider.d.ts +23 -0
- package/dist/cjs/src/components/Card.d.ts +7 -0
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +11 -0
- package/dist/cjs/src/components/Checkout/CouponComponent.d.ts +7 -0
- package/dist/cjs/src/components/Checkout/QuoteCheckout.d.ts +12 -0
- package/dist/cjs/src/components/Checkout/checkoutUtils.d.ts +2 -0
- package/dist/cjs/src/components/Checkout/index.d.ts +2 -0
- package/dist/cjs/src/components/DrawerHeader.d.ts +7 -0
- package/dist/cjs/src/components/Error.d.ts +5 -0
- package/dist/cjs/src/components/FeatureUsageGraph.d.ts +6 -0
- package/dist/cjs/src/components/HeaderModalWrapper.d.ts +2 -0
- package/dist/cjs/src/components/Invoice/Invoice.d.ts +3 -0
- package/dist/cjs/src/components/Invoice/Invoice.stories.d.ts +18 -0
- package/dist/cjs/src/components/Invoice/InvoiceQuoteContext.d.ts +18 -0
- package/dist/cjs/src/components/Invoice/InvoiceQuoteView.d.ts +11 -0
- package/dist/cjs/src/components/Invoice/index.d.ts +8 -0
- package/dist/cjs/src/components/LegacyInvoicePDF.d.ts +5 -0
- package/dist/cjs/src/components/PageWrapper.d.ts +1 -0
- package/dist/cjs/src/components/PandadocPollingModal.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +9 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/DemoPayCardCvc.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/DemoPayCardNumber.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/DemoPayExpiry.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/DemoPayForm.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +21 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +12 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +21 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/index.d.ts +1 -0
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +17 -0
- package/dist/cjs/src/components/PaymentForm/PaymentFormTypes.d.ts +24 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/CreditCard/CreditCard.d.ts +22 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/CreditCard/LargCardIcon.d.ts +2 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/CreditCard/PlusIcon.d.ts +4 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/PaymentMethod.d.ts +9 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/PaymentMethod.stories.d.ts +11 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/index.d.ts +1 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethodDetails.d.ts +9 -0
- package/dist/cjs/src/components/PaymentForm/PaymentMethodSelector.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/SavePaymentMethodFooter.d.ts +6 -0
- package/dist/cjs/src/components/PaymentForm/Stripe/PaymentMethodForm.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/Stripe/StripeForm.d.ts +7 -0
- package/dist/cjs/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +12 -0
- package/dist/cjs/src/components/PaymentForm/Stripe/hooks/useSave.d.ts +10 -0
- package/dist/cjs/src/components/PaymentForm/Stripe/stripeUtils.d.ts +26 -0
- package/dist/cjs/src/components/PaymentForm/index.d.ts +2 -0
- package/dist/cjs/src/components/PaymentForm/useRemovePaymentMethod.d.ts +3 -0
- package/dist/cjs/src/components/Quote/AcceptQuoteModal.d.ts +9 -0
- package/dist/cjs/src/components/Quote/Quote.d.ts +3 -0
- package/dist/cjs/src/components/Quote/Quote.stories.d.ts +144 -0
- package/dist/cjs/src/components/Quote/StyledModal.d.ts +3 -0
- package/dist/cjs/src/components/Quote/index.d.ts +1 -0
- package/dist/cjs/src/components/Quotes/Quotes.d.ts +40 -0
- package/dist/cjs/src/components/Quotes/Quotes.stories.d.ts +22 -0
- package/dist/cjs/src/components/Quotes/index.d.ts +1 -0
- package/dist/cjs/src/components/Signup/PaymentForms.d.ts +18 -0
- package/dist/cjs/src/components/Signup/PaymentSuccess.d.ts +9 -0
- package/dist/cjs/src/components/Signup/PriceListDisplay.d.ts +6 -0
- package/dist/cjs/src/components/Signup/Signup.d.ts +21 -0
- package/dist/cjs/src/components/Signup/Signup.stories.d.ts +10 -0
- package/dist/cjs/src/components/Signup/index.d.ts +1 -0
- package/dist/cjs/src/components/StateTag.d.ts +4 -0
- package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +23 -0
- package/dist/cjs/src/components/Subscriptions/Subscriptions.stories.d.ts +10 -0
- package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +8 -0
- package/dist/cjs/src/components/Subscriptions/index.d.ts +1 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +8 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +8 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +6 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +6 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +9 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardColumnHeaders.d.ts +12 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +8 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionsCardCell.d.ts +9 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardCellMobile.d.ts +8 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +5 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +16 -0
- package/dist/cjs/src/components/TaxationForm.d.ts +6 -0
- package/dist/cjs/src/components/Transactions/Transactions.d.ts +55 -0
- package/dist/cjs/src/components/Transactions/Transactions.stories.d.ts +26 -0
- package/dist/cjs/src/components/Transactions/TransactionsListContext.d.ts +30 -0
- package/dist/cjs/src/components/Transactions/index.d.ts +1 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionDate.d.ts +4 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionDownload.d.ts +7 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionGridCell.d.ts +2 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionTitle.d.ts +5 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsEmptyState.d.ts +2 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +7 -0
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +6 -0
- package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +3 -0
- package/dist/cjs/src/components/icons/ArrowDownToLine.d.ts +5 -0
- package/dist/cjs/src/components/icons/CardIcon.d.ts +2 -0
- package/dist/cjs/src/components/index.d.ts +10 -0
- package/dist/cjs/src/contexts/BrandContext.d.ts +7 -0
- package/dist/cjs/src/contexts/NavigationContext.d.ts +9 -0
- package/dist/cjs/src/contexts/PaymentContext.d.ts +10 -0
- package/dist/cjs/src/enums/SubscriptionState.d.ts +8 -0
- package/dist/cjs/src/graphql/mutations/accountSignup.d.ts +12 -0
- package/dist/cjs/src/graphql/mutations/accountUpdate.d.ts +7 -0
- package/dist/cjs/src/graphql/mutations/billingDetailsUpdate.d.ts +6 -0
- package/dist/cjs/src/graphql/mutations/checkout.d.ts +23 -0
- package/dist/cjs/src/graphql/mutations/quoteAccountSignup.d.ts +14 -0
- package/dist/cjs/src/graphql/mutations/quoteAddCoupon.d.ts +8 -0
- package/dist/cjs/src/graphql/mutations/quoteCompose.d.ts +13 -0
- package/dist/cjs/src/graphql/mutations/quoteRecalculateTaxes.d.ts +6 -0
- package/dist/cjs/src/graphql/mutations/quoteSubscriptionReinstate.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getBillingDetails.d.ts +6 -0
- package/dist/cjs/src/graphql/queries/getBranding.d.ts +6 -0
- package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +10 -0
- package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getPlanChangeOptions.d.ts +8 -0
- package/dist/cjs/src/graphql/queries/getPriceList.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getQuotes.d.ts +6 -0
- package/dist/cjs/src/graphql/queries/getSubscriptions.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getTaxationRequiredAccountFields.d.ts +6 -0
- package/dist/cjs/src/graphql/queries/getTransactions.d.ts +3 -0
- package/dist/cjs/src/hooks/index.d.ts +1 -0
- package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +20 -0
- package/dist/cjs/src/hooks/quotes/useSigningComplete.d.ts +5 -0
- package/dist/cjs/src/hooks/subscriptions/useSubscriptions.d.ts +5 -0
- package/dist/cjs/src/hooks/useFocusFirstInput.d.ts +7 -0
- package/dist/cjs/src/hooks/useHasTaxPlugin.d.ts +6 -0
- package/dist/cjs/src/hooks/useIsExpired.d.ts +2 -0
- package/dist/cjs/src/hooks/usePaymentMethod.d.ts +5 -0
- package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +11 -0
- package/dist/cjs/src/hooks/usePlugins.d.ts +6 -0
- package/dist/cjs/src/hooks/useSigningPlugins.d.ts +6 -0
- package/dist/cjs/src/hooks/useToken.d.ts +2 -0
- package/dist/cjs/src/index.d.ts +3 -0
- package/dist/cjs/src/mocks/browser.d.ts +1 -0
- package/dist/cjs/src/mocks/handlers.d.ts +1 -0
- package/dist/cjs/src/storybook-utils.d.ts +10 -0
- package/dist/cjs/src/types/billingDetails.d.ts +14 -0
- package/dist/cjs/src/types/shadowType.d.ts +1 -0
- package/dist/cjs/src/utils/GraphQLClient.d.ts +2 -0
- package/dist/cjs/src/utils/quoteInvoiceUtils.d.ts +6 -0
- package/dist/cjs/src/utils/styled.d.ts +3 -0
- package/dist/cjs/vite.config.d.ts +2 -0
- package/dist/esm/index.js +218 -215
- package/dist/esm/src/ajax.d.ts +1 -1
- package/dist/esm/src/components/BillingDetails/BillingDetails.d.ts +2 -1
- package/dist/esm/src/components/BillingDetails/BillingDetails.stories.d.ts +3 -0
- package/dist/esm/src/components/BillingDetails/BillingDetailsForm.d.ts +9 -0
- package/dist/esm/src/components/BunnyProvider.d.ts +2 -2
- package/dist/esm/src/components/DrawerHeader.d.ts +3 -2
- package/dist/esm/src/components/LegacyInvoicePDF.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +3 -1
- package/dist/esm/src/components/PaymentForm/PaymentMethod/PaymentMethod.d.ts +2 -1
- package/dist/esm/src/components/PaymentForm/PaymentMethodDetails.d.ts +3 -1
- package/dist/esm/src/components/PaymentForm/Stripe/stripeUtils.d.ts +3 -3
- package/dist/esm/src/components/PaymentForm/index.d.ts +1 -0
- package/dist/esm/src/components/PaymentForm/useRemovePaymentMethod.d.ts +1 -1
- package/dist/esm/src/components/Transactions/Transactions.d.ts +2 -1
- package/dist/esm/src/components/Transactions/transactionsList/TransactionDownload.d.ts +1 -1
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
- package/dist/esm/src/components/index.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/accountUpdate.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/billingDetailsUpdate.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/quoteAccountSignup.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/quoteAddCoupon.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getBillingDetails.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getBranding.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getPlanChangeOptions.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getPriceList.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getQuotes.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getSubscriptions.d.ts +1 -1
- package/dist/esm/src/graphql/queries/getTransactions.d.ts +1 -1
- package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -1
- package/dist/esm/src/hooks/quotes/useSigningComplete.d.ts +1 -1
- package/dist/esm/src/hooks/usePaymentMethod.d.ts +4 -1
- package/dist/esm/src/hooks/usePaymentPlugins.d.ts +1 -1
- package/dist/esm/src/hooks/usePlugins.d.ts +1 -1
- package/dist/esm/src/hooks/useSigningPlugins.d.ts +1 -1
- package/dist/esm/src/hooks/useToken.d.ts +1 -1
- package/dist/esm/src/utils/GraphQLClient.d.ts +1 -1
- package/dist/index.d.ts +30 -11
- package/package.json +2 -3
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import Quote from "./Quote";
|
|
4
|
+
declare const meta: Meta<typeof Quote>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
10
|
+
backButtonName?: string | undefined;
|
|
11
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
12
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
13
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
14
|
+
entityId: string;
|
|
15
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
hideDownloadButton?: boolean | undefined;
|
|
18
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
19
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
backButtonName?: string | undefined;
|
|
22
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
23
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
24
|
+
hideDownloadButton?: boolean | undefined;
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
className?: string | undefined;
|
|
27
|
+
entityId?: string | undefined;
|
|
28
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
29
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
30
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
31
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
32
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
35
|
+
id?: string | undefined;
|
|
36
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
37
|
+
backButtonName?: string | undefined;
|
|
38
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
39
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
40
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
41
|
+
entityId: string;
|
|
42
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
43
|
+
className?: string | undefined;
|
|
44
|
+
hideDownloadButton?: boolean | undefined;
|
|
45
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
46
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
backButtonName?: string | undefined;
|
|
49
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
50
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
51
|
+
hideDownloadButton?: boolean | undefined;
|
|
52
|
+
id?: string | undefined;
|
|
53
|
+
className?: string | undefined;
|
|
54
|
+
entityId?: string | undefined;
|
|
55
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
56
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
57
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
58
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
59
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
62
|
+
id?: string | undefined;
|
|
63
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
64
|
+
backButtonName?: string | undefined;
|
|
65
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
66
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
67
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
68
|
+
entityId: string;
|
|
69
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
70
|
+
className?: string | undefined;
|
|
71
|
+
hideDownloadButton?: boolean | undefined;
|
|
72
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
73
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
backButtonName?: string | undefined;
|
|
76
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
77
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
78
|
+
hideDownloadButton?: boolean | undefined;
|
|
79
|
+
id?: string | undefined;
|
|
80
|
+
className?: string | undefined;
|
|
81
|
+
entityId?: string | undefined;
|
|
82
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
83
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
84
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
85
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
86
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
89
|
+
id?: string | undefined;
|
|
90
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
91
|
+
backButtonName?: string | undefined;
|
|
92
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
93
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
94
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
95
|
+
entityId: string;
|
|
96
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
97
|
+
className?: string | undefined;
|
|
98
|
+
hideDownloadButton?: boolean | undefined;
|
|
99
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
100
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
backButtonName?: string | undefined;
|
|
103
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
104
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
105
|
+
hideDownloadButton?: boolean | undefined;
|
|
106
|
+
id?: string | undefined;
|
|
107
|
+
className?: string | undefined;
|
|
108
|
+
entityId?: string | undefined;
|
|
109
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
110
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
111
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
112
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
113
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
export declare const HideDownloadButton: Story;
|
|
116
|
+
export declare const AcceptedQuote: Story;
|
|
117
|
+
export declare const AcceptedQuoteDarkMode: Story;
|
|
118
|
+
export declare const DarkMode: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
|
|
119
|
+
id?: string | undefined;
|
|
120
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
121
|
+
backButtonName?: string | undefined;
|
|
122
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
123
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
124
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
125
|
+
entityId: string;
|
|
126
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
127
|
+
className?: string | undefined;
|
|
128
|
+
hideDownloadButton?: boolean | undefined;
|
|
129
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
130
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
backButtonName?: string | undefined;
|
|
133
|
+
onBackButtonClick?: (() => void) | undefined;
|
|
134
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
135
|
+
hideDownloadButton?: boolean | undefined;
|
|
136
|
+
id?: string | undefined;
|
|
137
|
+
className?: string | undefined;
|
|
138
|
+
entityId?: string | undefined;
|
|
139
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
140
|
+
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
141
|
+
onInvoiceDownloadError?: (() => void) | undefined;
|
|
142
|
+
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
143
|
+
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
144
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Quote } from "./Quote";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FrontendTransaction as T } from "@bunnyapp/common";
|
|
3
|
+
import { ShadowType } from "../../types/shadowType";
|
|
4
|
+
import { TransactionListColumnType } from "../Transactions/transactionsList/TransactionsListDesktop";
|
|
5
|
+
declare function Quotes({ className, columns, entityId, filter, filterQuotes, sort, noQuotesMessage, onQuoteClick, quoteComponent, searchBarClassName, shadow, showSearchBar, showTitle, title, style, suppressQuoteDisplay, useModal, }: {
|
|
6
|
+
/** A custom component to render instead of the default invoice component */
|
|
7
|
+
quoteComponent?: React.ReactNode;
|
|
8
|
+
/** Whether to show the search bar */
|
|
9
|
+
showSearchBar?: boolean;
|
|
10
|
+
/** Whether to show the title */
|
|
11
|
+
showTitle?: boolean;
|
|
12
|
+
/** The title to display in the quotes list */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** The columns to display in the quotes list */
|
|
15
|
+
columns?: TransactionListColumnType[];
|
|
16
|
+
/** A custom class name to apply to the component */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Whether to use a modal for the invoice drawer */
|
|
19
|
+
useModal?: boolean;
|
|
20
|
+
/** Whether to show a shadow around the transactions list */
|
|
21
|
+
shadow?: ShadowType;
|
|
22
|
+
/** A custom class name to apply to the search bar */
|
|
23
|
+
searchBarClassName?: string;
|
|
24
|
+
/** A function to call when a quote is clicked */
|
|
25
|
+
onQuoteClick?: (quote: T.Transaction) => void;
|
|
26
|
+
/** Whether to hide the display showing the quote */
|
|
27
|
+
suppressQuoteDisplay?: boolean;
|
|
28
|
+
/** A custom style to apply to the component */
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
/** A filter to apply to the quotes. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries */
|
|
31
|
+
filter?: string;
|
|
32
|
+
/** A function to filter the quotes. Runs on the client side. */
|
|
33
|
+
filterQuotes?: (quote: T.Transaction) => boolean;
|
|
34
|
+
/** A function to sort the quotes. Runs on the client side. */
|
|
35
|
+
sort?: (a: T.Transaction, b: T.Transaction) => number;
|
|
36
|
+
/** Message to display when there are no quotes */
|
|
37
|
+
noQuotesMessage?: string;
|
|
38
|
+
entityId: string;
|
|
39
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export default Quotes;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Quotes from "./Quotes";
|
|
3
|
+
declare const meta: Meta<typeof Quotes>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Padding0BGRed: Story;
|
|
8
|
+
export declare const NoShadow: Story;
|
|
9
|
+
export declare const WithModal: Story;
|
|
10
|
+
export declare const HideSearchBar: Story;
|
|
11
|
+
export declare const HideTitle: Story;
|
|
12
|
+
export declare const HideTitleAndSearchBar: Story;
|
|
13
|
+
export declare const CustomTitle: Story;
|
|
14
|
+
export declare const Mobile: Story;
|
|
15
|
+
export declare const WithCustomQuoteComponent: Story;
|
|
16
|
+
export declare const WithCustomColumns1: Story;
|
|
17
|
+
export declare const WithCustomColumns2: Story;
|
|
18
|
+
export declare const WithCustomColumns3: Story;
|
|
19
|
+
export declare const WithCustomColumns4: Story;
|
|
20
|
+
export declare const WithCustomColumns5: Story;
|
|
21
|
+
export declare const DarkMode: Story;
|
|
22
|
+
export declare const CustomColors: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Quotes } from "./Quotes";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PluginData, Quote } from "@bunnyapp/common";
|
|
2
|
+
export default function PaymentForms({ quote, handlePaymentSuccess, handlePaymentFail, handleSubmit, proceedingToPayment, entityId, accountId, overrideToken, customCheckoutFunction, }: {
|
|
3
|
+
quote?: Quote;
|
|
4
|
+
handlePaymentSuccess: () => void;
|
|
5
|
+
handlePaymentFail: (error: any) => void;
|
|
6
|
+
handleSubmit: (formData: FormData) => void;
|
|
7
|
+
proceedingToPayment: boolean;
|
|
8
|
+
entityId: string;
|
|
9
|
+
accountId?: string;
|
|
10
|
+
overrideToken?: string;
|
|
11
|
+
customCheckoutFunction?: (plugin: PluginData | undefined) => Promise<any>;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export type FormData = {
|
|
14
|
+
firstName: string;
|
|
15
|
+
lastName: string;
|
|
16
|
+
email: string;
|
|
17
|
+
accountName: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export default function PaymentSuccessDisplay({ amountPaid, className, companyName, returnUrl, style, currencyId, }: {
|
|
3
|
+
amountPaid: number;
|
|
4
|
+
className: string;
|
|
5
|
+
companyName: string;
|
|
6
|
+
returnUrl?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
currencyId: string;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../../styles/index.less";
|
|
2
|
+
import { PriceList } from "@bunnyapp/common";
|
|
3
|
+
export default function PriceListDisplay({ priceListData, topNavImageUrl, }: {
|
|
4
|
+
priceListData?: PriceList;
|
|
5
|
+
topNavImageUrl: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "../../styles/index.less";
|
|
3
|
+
import { ShadowType } from "../../types/shadowType";
|
|
4
|
+
export default function Signup({ companyName, entityId, priceListCode, returnUrl, isCardEnabled, className, shadow, style, }: {
|
|
5
|
+
/** The company name to display on the signup page */
|
|
6
|
+
companyName: string;
|
|
7
|
+
/** The entity ID to use for the signup */
|
|
8
|
+
entityId: string;
|
|
9
|
+
/** The price list code to use for the signup */
|
|
10
|
+
priceListCode: string;
|
|
11
|
+
/** The return URL to that customers can be redirected to after signup */
|
|
12
|
+
returnUrl?: string;
|
|
13
|
+
/** Whether or not to display signup within a card */
|
|
14
|
+
isCardEnabled?: boolean;
|
|
15
|
+
/** A custom class name to apply to the component */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** The shadow level to apply to the component */
|
|
18
|
+
shadow?: ShadowType;
|
|
19
|
+
/** A custom style to apply to the component */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Signup from "./Signup";
|
|
3
|
+
declare const meta: Meta<typeof Signup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoCard: Story;
|
|
8
|
+
export declare const Mobile: Story;
|
|
9
|
+
export declare const CustomClassName: Story;
|
|
10
|
+
export declare const DarkMode: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Signup } from "./Signup";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Subscription } from "@bunnyapp/common";
|
|
3
|
+
import "../../styles/index.less";
|
|
4
|
+
export type EditingQuoteDataType = {
|
|
5
|
+
id: string;
|
|
6
|
+
isTrial: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const Subscriptions: ({ className, companyName, entityId, hideExpired, onCancelSubscriptionClick, onChangePlanClick, onSubscriptionsLoaded, styles, noSubscriptionsComponent, }: {
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
companyName: string;
|
|
11
|
+
entityId: string;
|
|
12
|
+
hideExpired?: boolean | undefined;
|
|
13
|
+
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
14
|
+
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
15
|
+
onSubscriptionsLoaded?: ((subscriptions: Subscription[]) => void) | undefined;
|
|
16
|
+
styles?: {
|
|
17
|
+
gap?: number | undefined;
|
|
18
|
+
shadow?: "none" | "lg" | "md" | "sm" | undefined;
|
|
19
|
+
subscriptionProductNameStyle?: import("react").CSSProperties | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
noSubscriptionsComponent?: React.ReactNode;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Subscriptions;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Subscriptions from "./Subscriptions";
|
|
3
|
+
declare const meta: Meta<typeof Subscriptions>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Mobile: Story;
|
|
8
|
+
export declare const NoShadow: Story;
|
|
9
|
+
export declare const CustomClassName: Story;
|
|
10
|
+
export declare const DarkMode: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SubscriptionsContextValues = {
|
|
3
|
+
gap?: number;
|
|
4
|
+
shadow?: "none" | "sm" | "md" | "lg";
|
|
5
|
+
showTitle?: boolean;
|
|
6
|
+
subscriptionProductNameStyle?: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
export declare const SubscriptionsContext: import("react").Context<SubscriptionsContextValues>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Subscriptions } from "./Subscriptions";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PlanChangeOptions, Subscription } from "@bunnyapp/common";
|
|
2
|
+
declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, planChangeOptions, subscription, }: {
|
|
3
|
+
onChangePlanClick: (subscription: Subscription) => void;
|
|
4
|
+
onCancelSubscriptionClick: (subscription: Subscription) => void;
|
|
5
|
+
planChangeOptions?: PlanChangeOptions | undefined;
|
|
6
|
+
subscription: Subscription;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default SubscriptionCardActions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PlanChangeOptions, Subscription } from "@bunnyapp/common";
|
|
2
|
+
declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick, planChangeOptions, subscription, }: {
|
|
3
|
+
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
4
|
+
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
|
+
planChangeOptions?: PlanChangeOptions | undefined;
|
|
6
|
+
subscription: Subscription;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SubscriptionCardHeader;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Subscription, SubscriptionCharge } from "@bunnyapp/common";
|
|
2
|
+
declare const SubscriptionChargeTotal: ({ charge, subscription, }: {
|
|
3
|
+
charge: SubscriptionCharge;
|
|
4
|
+
subscription: Subscription;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default SubscriptionChargeTotal;
|
package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Subscription, SubscriptionCharge } from "@bunnyapp/common";
|
|
2
|
+
declare const SubscriptionChargeUnitPrice: ({ charge, subscription, }: {
|
|
3
|
+
charge: SubscriptionCharge;
|
|
4
|
+
subscription: Subscription;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default SubscriptionChargeUnitPrice;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PlanChangeOptions, Subscription } from "@bunnyapp/common";
|
|
2
|
+
declare const SubscriptionsList: ({ hideExpired, onChangePlanClick, onCancelSubscriptionClick, planChangeOptions, subscriptions, }: {
|
|
3
|
+
hideExpired: boolean;
|
|
4
|
+
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
|
+
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
6
|
+
planChangeOptions?: PlanChangeOptions | undefined;
|
|
7
|
+
subscriptions: Subscription[];
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SubscriptionsList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const SubscriptionCardColumnHeaders: ({ columns, }: {
|
|
2
|
+
columns: ({
|
|
3
|
+
title: string;
|
|
4
|
+
width: string;
|
|
5
|
+
className?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
className: string;
|
|
8
|
+
title: string;
|
|
9
|
+
width: string;
|
|
10
|
+
})[];
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default SubscriptionCardColumnHeaders;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PlanChangeOptions, Subscription } from "@bunnyapp/common";
|
|
2
|
+
declare const SubscriptionCardDesktop: ({ onChangePlanClick, onCancelSubscriptionClick, planChangeOptions, subscription, }: {
|
|
3
|
+
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
4
|
+
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
|
+
planChangeOptions?: PlanChangeOptions | undefined;
|
|
6
|
+
subscription: Subscription;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SubscriptionCardDesktop;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
declare const SubscriptionsListCell: ({ children, className, gridColumn, right, style, }: {
|
|
3
|
+
children?: ReactNode | ReactNode[];
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
gridColumn?: string | number | undefined;
|
|
6
|
+
right?: boolean | undefined;
|
|
7
|
+
style?: CSSProperties | undefined;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SubscriptionsListCell;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
type SubscriptionCardCellMobileProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
};
|
|
7
|
+
declare const SubscriptionCardCellMobile: ({ children, className, style, }: SubscriptionCardCellMobileProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default SubscriptionCardCellMobile;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Plan, Product, Quote, Subscription, SubscriptionCharge } from "@bunnyapp/common";
|
|
2
|
+
export declare const canShowQuantitiesInput: (charge: SubscriptionCharge, subscription: Subscription) => boolean | undefined;
|
|
3
|
+
export declare const createQuoteParams: (quote: Quote, subscriptionQuantity: number, editedSubscription?: any) => {
|
|
4
|
+
charges: {
|
|
5
|
+
id: string;
|
|
6
|
+
quantity: number;
|
|
7
|
+
}[];
|
|
8
|
+
quoteChange: import("@bunnyapp/common").QuoteChange | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const isSubscriptionNotActive: (subscription: Subscription) => boolean;
|
|
11
|
+
export declare const productPlanName: ({ plan, product, }: {
|
|
12
|
+
plan: Plan;
|
|
13
|
+
product: Product;
|
|
14
|
+
}) => string;
|
|
15
|
+
export declare const canShowSubscriptionActions: (subscription: Subscription) => boolean;
|
|
16
|
+
export declare const canShowCanceledActions: (subscription: Subscription) => boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FrontendTransaction as T, TransactionKind } from "@bunnyapp/common";
|
|
3
|
+
import { ShadowType } from "../../types/shadowType";
|
|
4
|
+
import { TransactionListColumnType } from "./transactionsList/TransactionsListDesktop";
|
|
5
|
+
import { TransactionDateType } from "./TransactionsListContext";
|
|
6
|
+
export default function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, entityId, filterTransactions, sortTransactions, transactionDateType, }: {
|
|
7
|
+
/** A custom component to render instead of the default invoice component */
|
|
8
|
+
transactionComponent?: React.ReactNode;
|
|
9
|
+
/** Whether to show the search bar */
|
|
10
|
+
showSearchBar?: boolean;
|
|
11
|
+
/** Whether to show the title */
|
|
12
|
+
showTitle?: boolean;
|
|
13
|
+
/** The title to display in the transactions list */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** The columns to display in the transactions list */
|
|
16
|
+
columns?: TransactionListColumnType[];
|
|
17
|
+
/** A custom class name to apply to the component */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Whether to use a modal for the invoice drawer */
|
|
20
|
+
useModal?: boolean;
|
|
21
|
+
/** Whether to show a shadow around the transactions list */
|
|
22
|
+
shadow?: ShadowType;
|
|
23
|
+
/** A custom class name to apply to the search bar */
|
|
24
|
+
searchBarClassName?: string;
|
|
25
|
+
/** A function to call when a transaction is clicked */
|
|
26
|
+
onTransactionClick?: (transaction: T.Transaction) => void;
|
|
27
|
+
/** Whether to hide the display showing the transaction */
|
|
28
|
+
suppressTransactionDisplay?: boolean;
|
|
29
|
+
/** The kinds of transactions to show */
|
|
30
|
+
kindsToShow?: TransactionKind[];
|
|
31
|
+
/** A custom style to apply to the component */
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
/** A filter to apply to the transactions. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries
|
|
34
|
+
* Filtering is applied on the api side, potentially speeding up the transactions query
|
|
35
|
+
*/
|
|
36
|
+
filter?: string;
|
|
37
|
+
/** Message to display when there are no transactions */
|
|
38
|
+
noTransactionsMessage?: string;
|
|
39
|
+
/** The entity id to pass to the invoice component */
|
|
40
|
+
entityId: string;
|
|
41
|
+
/** A function to filter the transactions
|
|
42
|
+
* Filtering is applied on the client side.
|
|
43
|
+
* This is useful to have more control over the filtering logic.
|
|
44
|
+
*/
|
|
45
|
+
filterTransactions?: (transaction: T.Transaction) => boolean;
|
|
46
|
+
/** A function to sort the transactions. Runs on the client side. */
|
|
47
|
+
sortTransactions?: (transactionA: T.Transaction, transactionB: T.Transaction) => number;
|
|
48
|
+
/** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
|
|
49
|
+
transactionDateType?: TransactionDateType;
|
|
50
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function TransactionsDisplay({ transactions, onSearchValueChanged, search, }: {
|
|
52
|
+
transactions: T.Transaction[];
|
|
53
|
+
onSearchValueChanged: (value: string) => void;
|
|
54
|
+
search: string;
|
|
55
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Transactions from "./Transactions";
|
|
3
|
+
declare const meta: Meta<typeof Transactions>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const basicArgs: {
|
|
7
|
+
token: string;
|
|
8
|
+
entityId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const Padding0BGRed: Story;
|
|
12
|
+
export declare const NoShadow: Story;
|
|
13
|
+
export declare const WithModal: Story;
|
|
14
|
+
export declare const HideSearchBar: Story;
|
|
15
|
+
export declare const HideTitle: Story;
|
|
16
|
+
export declare const HideTitleAndSearchBar: Story;
|
|
17
|
+
export declare const CustomTitle: Story;
|
|
18
|
+
export declare const Mobile: Story;
|
|
19
|
+
export declare const WithCustomTransactionComponent: Story;
|
|
20
|
+
export declare const WithCustomColumns1: Story;
|
|
21
|
+
export declare const WithCustomColumns2: Story;
|
|
22
|
+
export declare const WithCustomColumns3: Story;
|
|
23
|
+
export declare const WithCustomColumns4: Story;
|
|
24
|
+
export declare const WithCustomColumns5: Story;
|
|
25
|
+
export declare const DarkMode: Story;
|
|
26
|
+
export declare const CustomColors: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FrontendTransaction as T, TransactionKind } from "@bunnyapp/common";
|
|
3
|
+
import { ShadowType } from "../../types/shadowType";
|
|
4
|
+
import { TransactionListColumnType } from "./transactionsList/TransactionsListDesktop";
|
|
5
|
+
export type TransactionsContextValues = {
|
|
6
|
+
showSearchBar?: boolean;
|
|
7
|
+
showTitle?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
transactionComponent?: React.ReactNode;
|
|
10
|
+
transactionStateRenderer?: (state: string) => React.ReactNode;
|
|
11
|
+
columns: TransactionListColumnType[];
|
|
12
|
+
className?: string;
|
|
13
|
+
shadow?: ShadowType;
|
|
14
|
+
searchBarClassName?: string;
|
|
15
|
+
useModal?: boolean;
|
|
16
|
+
onTransactionClick?: (transaction: T.Transaction) => void;
|
|
17
|
+
onTransactionDisplayClose?: (transaction: T.Transaction | null) => void;
|
|
18
|
+
suppressTransactionDisplay?: boolean;
|
|
19
|
+
kindsToShow?: TransactionKind[];
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
filter?: string;
|
|
22
|
+
noTransactionsMessage?: string;
|
|
23
|
+
downloadTransactionLink?: (id: string) => string;
|
|
24
|
+
entityId: string;
|
|
25
|
+
filterTransactions?: (transaction: T.Transaction) => boolean;
|
|
26
|
+
sortTransactions?: (transactionA: T.Transaction, transactionB: T.Transaction) => number;
|
|
27
|
+
transactionDateType: TransactionDateType;
|
|
28
|
+
};
|
|
29
|
+
export type TransactionDateType = "createdAt" | "issuedAt" | "dueAt";
|
|
30
|
+
export declare const TransactionsListContext: import("react").Context<TransactionsContextValues>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Transactions";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FrontendTransaction as T } from "@bunnyapp/common";
|
|
2
|
+
declare const TransactionDownload: ({ transaction, token, apiHost, }: {
|
|
3
|
+
transaction: T.Transaction;
|
|
4
|
+
token?: string | undefined;
|
|
5
|
+
apiHost: string;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default TransactionDownload;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FrontendTransaction as T } from "@bunnyapp/common";
|
|
2
|
+
export type TransactionListColumnType = "date" | "title" | "state" | "amount" | "download" | "accountName";
|
|
3
|
+
declare const TransactionsListDesktop: ({ transactions, onTransactionClick, }: {
|
|
4
|
+
transactions: T.Transaction[];
|
|
5
|
+
onTransactionClick?: ((transaction: T.Transaction) => void) | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default TransactionsListDesktop;
|