@bunnyapp/components 1.0.76 → 1.1.0-beta.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.
Files changed (104) hide show
  1. package/dist/cjs/index.js +881 -536
  2. package/dist/cjs/src/components/BillingDetails/BillingDetails.d.ts +7 -5
  3. package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +2 -2
  4. package/dist/cjs/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
  5. package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
  6. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +4 -5
  7. package/dist/cjs/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
  8. package/dist/cjs/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
  9. package/dist/cjs/src/components/QuotePreviewProvider.d.ts +17 -0
  10. package/dist/cjs/src/components/Quotes/Quotes.d.ts +6 -6
  11. package/dist/cjs/src/components/Quotes/Quotes.stories.d.ts +2 -2
  12. package/dist/cjs/src/components/Signup/PaymentForms.d.ts +9 -1
  13. package/dist/cjs/src/components/Signup/Signup.d.ts +11 -1
  14. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
  15. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
  16. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
  17. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
  18. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
  19. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
  20. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  21. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  22. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
  23. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
  24. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -3
  25. package/dist/cjs/src/components/Subscriptions/SubscriptionRequests.d.ts +0 -1
  26. package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
  27. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
  28. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +1 -1
  29. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -1
  30. package/dist/cjs/src/components/TaxationForm.d.ts +2 -2
  31. package/dist/cjs/src/components/Transactions/Transactions.d.ts +5 -5
  32. package/dist/cjs/src/components/Transactions/TransactionsListContext.d.ts +8 -8
  33. package/dist/cjs/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  34. package/dist/cjs/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
  35. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
  36. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
  37. package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +3 -3
  38. package/dist/cjs/src/components/icons/Bancontact.d.ts +4 -0
  39. package/dist/cjs/src/components/icons/IDeal.d.ts +4 -0
  40. package/dist/cjs/src/components/icons/Sepa.d.ts +4 -0
  41. package/dist/cjs/src/graphql/QuoteRequests.d.ts +1 -0
  42. package/dist/cjs/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
  43. package/dist/cjs/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
  44. package/dist/cjs/src/graphql/mutations/subscriptionTrialConvert.d.ts +7 -0
  45. package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +1 -4
  46. package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +2 -4
  47. package/dist/cjs/src/graphql/queries/getTransactions.d.ts +2 -2
  48. package/dist/cjs/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
  49. package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +2 -2
  50. package/dist/cjs/src/utils/couponUtils.d.ts +2 -0
  51. package/dist/cjs/src/utils/featureAddonUtils.d.ts +3 -0
  52. package/dist/esm/index.js +884 -539
  53. package/dist/esm/src/components/BillingDetails/BillingDetails.d.ts +7 -5
  54. package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +2 -2
  55. package/dist/esm/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
  56. package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
  57. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +4 -5
  58. package/dist/esm/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
  59. package/dist/esm/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
  60. package/dist/esm/src/components/QuotePreviewProvider.d.ts +17 -0
  61. package/dist/esm/src/components/Quotes/Quotes.d.ts +6 -6
  62. package/dist/esm/src/components/Quotes/Quotes.stories.d.ts +2 -2
  63. package/dist/esm/src/components/Signup/PaymentForms.d.ts +9 -1
  64. package/dist/esm/src/components/Signup/Signup.d.ts +11 -1
  65. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
  66. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
  67. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
  68. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
  69. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
  70. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
  71. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  72. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  73. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
  74. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
  75. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -3
  76. package/dist/esm/src/components/Subscriptions/SubscriptionRequests.d.ts +0 -1
  77. package/dist/esm/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
  78. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
  79. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +1 -1
  80. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -1
  81. package/dist/esm/src/components/TaxationForm.d.ts +2 -2
  82. package/dist/esm/src/components/Transactions/Transactions.d.ts +5 -5
  83. package/dist/esm/src/components/Transactions/TransactionsListContext.d.ts +8 -8
  84. package/dist/esm/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  85. package/dist/esm/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
  86. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
  87. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
  88. package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +3 -3
  89. package/dist/esm/src/components/icons/Bancontact.d.ts +4 -0
  90. package/dist/esm/src/components/icons/IDeal.d.ts +4 -0
  91. package/dist/esm/src/components/icons/Sepa.d.ts +4 -0
  92. package/dist/esm/src/graphql/QuoteRequests.d.ts +1 -0
  93. package/dist/esm/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
  94. package/dist/esm/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
  95. package/dist/esm/src/graphql/mutations/subscriptionTrialConvert.d.ts +7 -0
  96. package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +1 -4
  97. package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +2 -4
  98. package/dist/esm/src/graphql/queries/getTransactions.d.ts +2 -2
  99. package/dist/esm/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
  100. package/dist/esm/src/hooks/usePaymentPlugins.d.ts +2 -2
  101. package/dist/esm/src/utils/couponUtils.d.ts +2 -0
  102. package/dist/esm/src/utils/featureAddonUtils.d.ts +3 -0
  103. package/dist/index.d.ts +30 -19
  104. package/package.json +3 -3
@@ -1,14 +1,16 @@
1
1
  import '../../styles/index.less';
2
2
  import { ShadowType } from '../../types/shadowType';
3
- declare const BillingDetails: ({ isCardEnabled, shadow, className, hidePaymentMethodForm, hideBillingDetailsForm, countryListFilter, }: {
4
- isCardEnabled?: boolean | undefined;
5
- shadow?: ShadowType | undefined;
3
+ declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, }: {
6
4
  className?: string | undefined;
7
- hidePaymentMethodForm?: boolean | undefined;
8
- hideBillingDetailsForm?: boolean | undefined;
9
5
  countryListFilter?: ((country: {
10
6
  value: string;
11
7
  label: string;
12
8
  }) => boolean) | undefined;
9
+ hideBillingDetailsForm?: boolean | undefined;
10
+ hidePaymentMethodForm?: boolean | undefined;
11
+ isCardEnabled?: boolean | undefined;
12
+ isUpgradeFromTrial?: boolean | undefined;
13
+ shadow?: ShadowType | undefined;
14
+ onSavePaymentMethod?: ((paymentMethodData?: any) => void) | undefined;
13
15
  }) => import("react/jsx-runtime").JSX.Element;
14
16
  export default BillingDetails;
@@ -1,7 +1,7 @@
1
- import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
1
+ import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
2
2
  declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, }: {
3
3
  quote?: Quote | undefined;
4
- invoice?: FormattedInvoice | undefined;
4
+ invoice?: FormattedInvoice | Invoice | undefined;
5
5
  onPaymentSuccess?: ((response: any) => void) | undefined;
6
6
  onPaymentHoldSuccess?: ((response: any) => void) | undefined;
7
7
  plugin: PluginData | undefined;
@@ -1,5 +1,5 @@
1
- import { PluginData } from "@bunnyapp/common";
2
- export declare const confirmPayment: ({ amount, currency, }: {
1
+ import { PluginData } from '@bunnyapp/common';
2
+ export declare const confirmPayment: ({ amount, currency }: {
3
3
  amount: number;
4
4
  currency: string;
5
5
  }) => {
@@ -1,9 +1,9 @@
1
- import { FormattedInvoice, PaymentMethod, PluginData, Quote } from '@bunnyapp/common';
1
+ import { FormattedInvoice, Invoice, PaymentMethod, PluginData, Quote } from '@bunnyapp/common';
2
2
  export declare function usePay({ onPaymentSuccess, onPaymentError, quote, invoice, storedPaymentMethod, plugin, }: {
3
3
  onPaymentSuccess?: (response: any) => void;
4
4
  onPaymentError?: (error: any) => void;
5
5
  quote?: Quote;
6
- invoice?: FormattedInvoice;
6
+ invoice?: FormattedInvoice | Invoice;
7
7
  storedPaymentMethod?: PaymentMethod;
8
8
  plugin: PluginData | undefined;
9
9
  }): {
@@ -1,15 +1,14 @@
1
- import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
2
- export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, entityId, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
3
- invoice?: FormattedInvoice | undefined;
1
+ import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
2
+ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
3
+ invoice?: FormattedInvoice | Invoice | undefined;
4
4
  quote?: Quote | undefined;
5
5
  onFail: (error: any) => void;
6
6
  onPaymentSuccess?: (() => void) | undefined;
7
7
  onPaymentHoldSuccess?: ((response: any) => void) | undefined;
8
- onSavePaymentMethod?: (() => void) | undefined;
8
+ onSavePaymentMethod?: ((response: any) => void) | undefined;
9
9
  onRemovePaymentMethod?: (() => void) | undefined;
10
10
  onSetDefaultPaymentMethod?: (() => void) | undefined;
11
11
  accountId?: string | undefined;
12
- entityId?: string | undefined;
13
12
  overrideToken?: string | undefined;
14
13
  customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
15
14
  currencyId?: string | undefined;
@@ -2,6 +2,6 @@ import { PluginData } from '@bunnyapp/common';
2
2
  declare const PaymentMethodDetails: ({ onFail, plugin, onSavePaymentMethod, }: {
3
3
  onFail: (error: any) => void;
4
4
  plugin: PluginData;
5
- onSavePaymentMethod: () => void;
5
+ onSavePaymentMethod: (response: any) => void;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
7
7
  export default PaymentMethodDetails;
@@ -1,9 +1,9 @@
1
- import { FormattedInvoice, PaymentMethod, PluginData, Quote } from "@bunnyapp/common";
1
+ import { FormattedInvoice, Invoice, PaymentMethod, PluginData, Quote } from '@bunnyapp/common';
2
2
  export declare function usePay({ onPaymentSuccess, onPaymentError, quote, invoice, storedPaymentMethod, plugin, }: {
3
3
  onPaymentSuccess?: (response: any) => void;
4
4
  onPaymentError?: (error: any) => void;
5
5
  quote?: Quote;
6
- invoice?: FormattedInvoice;
6
+ invoice?: FormattedInvoice | Invoice;
7
7
  storedPaymentMethod?: PaymentMethod;
8
8
  plugin: PluginData | undefined;
9
9
  }): {
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { PriceList } from '@bunnyapp/common';
3
+ export type QuotePreviewData = {
4
+ priceList?: PriceList;
5
+ quantity?: number;
6
+ editingQuoteId?: string;
7
+ };
8
+ export type QuotePreviewContextValues = {
9
+ quotePreviewData?: QuotePreviewData;
10
+ setQuotePreviewData: React.Dispatch<React.SetStateAction<QuotePreviewData | undefined>>;
11
+ handleSetEditingQuote: (editingQuoteId: string) => void;
12
+ };
13
+ export declare const QuotePreviewContext: import("react").Context<QuotePreviewContextValues>;
14
+ declare function QuotePreviewProvider({ children }: {
15
+ children: React.ReactNode;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export default QuotePreviewProvider;
@@ -1,7 +1,7 @@
1
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";
2
+ import { Transaction } from '@bunnyapp/common';
3
+ import { ShadowType } from '../../types/shadowType';
4
+ import { TransactionListColumnType } from '../Transactions/transactionsList/TransactionsListDesktop';
5
5
  declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuotesMessage, onQuoteClick, quoteComponent, searchBarClassName, shadow, showSearchBar, showTitle, title, style, suppressQuoteDisplay, useModal, }: {
6
6
  /** A custom component to render instead of the default invoice component */
7
7
  quoteComponent?: React.ReactNode;
@@ -22,7 +22,7 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
22
22
  /** A custom class name to apply to the search bar */
23
23
  searchBarClassName?: string;
24
24
  /** A function to call when a quote is clicked */
25
- onQuoteClick?: (quote: T.Transaction) => void;
25
+ onQuoteClick?: (quote: Transaction) => void;
26
26
  /** Whether to hide the display showing the quote */
27
27
  suppressQuoteDisplay?: boolean;
28
28
  /** A custom style to apply to the component */
@@ -30,9 +30,9 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
30
30
  /** A filter to apply to the quotes. Docs on filter: https://docs.bunny.com/developer/getting-started/using-filters-in-queries */
31
31
  filter?: string;
32
32
  /** A function to filter the quotes. Runs on the client side. */
33
- filterQuotes?: (quote: T.Transaction) => boolean;
33
+ filterQuotes?: (quote: Transaction) => boolean;
34
34
  /** A function to sort the quotes. Runs on the client side. */
35
- sort?: (a: T.Transaction, b: T.Transaction) => number;
35
+ sort?: (a: Transaction, b: Transaction) => number;
36
36
  /** Message to display when there are no quotes */
37
37
  noQuotesMessage?: string;
38
38
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import Quotes from "./Quotes";
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Quotes from './Quotes';
3
3
  declare const meta: Meta<typeof Quotes>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
@@ -1,5 +1,5 @@
1
1
  import { PluginData, Quote } from '@bunnyapp/common';
2
- export default function PaymentForms({ quote, handlePaymentSuccess, handlePaymentFail, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, }: {
2
+ export default function PaymentForms({ quote, handlePaymentSuccess, handlePaymentFail, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, defaultValues, }: {
3
3
  quote?: Quote;
4
4
  handlePaymentSuccess: () => void;
5
5
  handlePaymentFail: (error: any) => void;
@@ -8,6 +8,7 @@ export default function PaymentForms({ quote, handlePaymentSuccess, handlePaymen
8
8
  accountId?: string;
9
9
  overrideToken?: string;
10
10
  customCheckoutFunction?: (plugin: PluginData | undefined) => Promise<any>;
11
+ defaultValues?: DefaultSignupValues;
11
12
  }): import("react/jsx-runtime").JSX.Element;
12
13
  export type FormData = {
13
14
  firstName: string;
@@ -21,3 +22,10 @@ export type FormData = {
21
22
  billingStreet: string;
22
23
  taxNumber: string;
23
24
  };
25
+ export type DefaultSignupValues = {
26
+ firstName?: string;
27
+ lastName?: string;
28
+ email?: string;
29
+ accountName?: string;
30
+ billingCountry?: string;
31
+ };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import '../../styles/index.less';
3
3
  import { ShadowType } from '../../types/shadowType';
4
- export default function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style, }: {
4
+ export default function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style, defaultFirstName, defaultLastName, defaultEmail, defaultCompanyName, defaultBillingCountry, }: {
5
5
  /** The company name to display on the signup page */
6
6
  companyName: string;
7
7
  /** The price list code to use for the signup */
@@ -16,4 +16,14 @@ export default function Signup({ companyName, priceListCode, returnUrl, couponCo
16
16
  shadow?: ShadowType;
17
17
  /** A custom style to apply to the component */
18
18
  style?: React.CSSProperties;
19
+ /** The default first name to use for the signup */
20
+ defaultFirstName?: string;
21
+ /** The default last name to use for the signup */
22
+ defaultLastName?: string;
23
+ /** The default email to use for the signup */
24
+ defaultEmail?: string;
25
+ /** The default company name to use for the signup */
26
+ defaultCompanyName?: string;
27
+ /** The default billing country to use for the signup */
28
+ defaultBillingCountry?: string;
19
29
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,2 @@
1
- import { PriceList } from '@bunnyapp/common';
2
- export type QuotePreviewData = {
3
- priceList?: PriceList;
4
- quantity?: number;
5
- };
6
1
  declare const PlanPicker: () => import("react/jsx-runtime").JSX.Element;
7
2
  export default PlanPicker;
@@ -1,5 +1,5 @@
1
- import { Dispatch, SetStateAction } from "react";
2
- import { PriceListChangeOptions, PriceList, Subscription, Product } from "@bunnyapp/common";
1
+ import { PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
2
+ import { Dispatch, SetStateAction } from 'react';
3
3
  type PriceListGridProps = {
4
4
  availablePriceLists: PriceList[];
5
5
  onChangePriceList: (selectedPriceList: PriceList) => void;
@@ -1,11 +1,10 @@
1
- import { PriceList, Subscription, PriceListChangeOptions } from "@bunnyapp/common";
2
- declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, onChangePriceList, priceListChangeOptions, selectedPriceList, subscriptions, upgradingSubscription, }: {
1
+ import { PriceList, PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
+ declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, onChangePriceList, priceListChangeOptions, selectedPriceList, subscriptions, }: {
3
3
  arePlanChangeOptionsLoading: boolean;
4
4
  areSubscriptionsLoading: boolean;
5
5
  onChangePriceList: (selectedPriceList: PriceList) => void;
6
6
  priceListChangeOptions?: PriceListChangeOptions | undefined;
7
7
  selectedPriceList?: PriceList | undefined;
8
8
  subscriptions: Subscription[];
9
- upgradingSubscription?: Subscription | undefined;
10
9
  }) => import("react/jsx-runtime").JSX.Element;
11
10
  export default PriceListSelector;
@@ -1,11 +1,9 @@
1
1
  import { PriceList, Quote, Subscription } from '@bunnyapp/common';
2
- import { QuotePreviewData } from '../PlanPicker';
3
- declare const CheckoutBarSummarySection: ({ open, quote, selectedPriceList, onClickCheckout, upgradingSubscription, quotePreviewData, }: {
2
+ declare const CheckoutBarSummarySection: ({ open, quote, selectedPriceList, onClickCheckout, upgradingSubscription, }: {
4
3
  open: boolean;
5
4
  quote?: Quote | undefined;
6
5
  selectedPriceList: PriceList;
7
6
  onClickCheckout: () => void;
8
7
  upgradingSubscription?: Subscription | undefined;
9
- quotePreviewData?: QuotePreviewData | undefined;
10
8
  }) => import("react/jsx-runtime").JSX.Element;
11
9
  export default CheckoutBarSummarySection;
@@ -1,6 +1,66 @@
1
- import { PriceList, Product } from '@bunnyapp/common';
2
- declare const EverythingPlanFeatures: ({ availablePriceLists, selectedProduct, plansToDisplay, }: {
1
+ import { PlanFeature, PriceList, Product } from '@bunnyapp/common';
2
+ export declare const filterUniqueFeatures: ({ availablePriceLists, }: {
3
3
  availablePriceLists: PriceList[];
4
+ }) => {
5
+ plan: {
6
+ planFeatures: PlanFeature[] | undefined;
7
+ addon?: boolean | undefined;
8
+ availableFrom?: string | undefined;
9
+ availableTo?: string | undefined;
10
+ basePrice?: number | undefined;
11
+ code?: string | undefined;
12
+ contactUsLabel?: string | undefined;
13
+ contactUsUrl?: string | undefined;
14
+ createdAt: string;
15
+ description?: string | undefined;
16
+ features?: import("@bunnyapp/common").Feature[] | undefined;
17
+ id: string;
18
+ internalNotes?: string | undefined;
19
+ isAvailableNow?: boolean | undefined;
20
+ isVisible?: boolean | undefined;
21
+ name: string;
22
+ position: number;
23
+ priceLists: PriceList[];
24
+ pricingDescription?: string | undefined;
25
+ pricingStyle: import("@bunnyapp/common").PricingStyle;
26
+ product: Product;
27
+ productId: string;
28
+ selfServiceBuy?: boolean | undefined;
29
+ selfServiceCancel?: boolean | undefined;
30
+ selfServiceRenew?: boolean | undefined;
31
+ trialEndDate?: string | undefined;
32
+ updatedAt: string;
33
+ };
34
+ basePrice: number;
35
+ charges: import("@bunnyapp/common").PriceListCharge[];
36
+ code?: string | undefined;
37
+ createdAt: string;
38
+ currency?: import("@bunnyapp/common").Currency | undefined;
39
+ currencyId: string;
40
+ id: string;
41
+ isVisible?: boolean | undefined;
42
+ monthlyBasePrice: number;
43
+ name: string;
44
+ periodMonths: 0 | 1 | 3 | 6 | 12;
45
+ planId: string;
46
+ priceAdjustmentAction?: import("@bunnyapp/common").PriceAdjustmentAction | undefined;
47
+ priceAdjustmentActionOptions?: string[] | undefined;
48
+ priceAdjustmentPercentage?: number | undefined;
49
+ priceAdjustmentTiming?: import("@bunnyapp/common").PriceAdjustmentTiming | undefined;
50
+ priceAdjustmentTimingOptions?: string[] | undefined;
51
+ priceDescription?: string | undefined;
52
+ product: Product;
53
+ productId?: string | undefined;
54
+ renewalTermMonths?: number | undefined;
55
+ showPriceAsMonthly?: boolean | undefined;
56
+ sku?: string | undefined;
57
+ trialAllowed: boolean;
58
+ trialExpirationAction?: ("CANCEL" | "ACTIVATE") | undefined;
59
+ trialLengthDays?: number | undefined;
60
+ updatedAt: string;
61
+ }[];
62
+ declare const EverythingPlanFeatures: ({ displayPriceLists, selectedProduct, plansToDisplay, }: {
63
+ displayPriceLists: PriceList[];
4
64
  plansToDisplay: number;
5
65
  selectedProduct?: Product | undefined;
6
66
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { PriceList } from '@bunnyapp/common';
2
+ declare const PlanFeatureAddons: ({ displayPriceLists, plansToDisplay, }: {
3
+ displayPriceLists: PriceList[];
4
+ plansToDisplay: number;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export declare function FeatureAddonsList({ priceList }: {
7
+ priceList: PriceList;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export default PlanFeatureAddons;
@@ -1,6 +1,6 @@
1
- import { Plan, Product } from '@bunnyapp/common';
2
- declare const PlanFeatures: ({ availablePlansArray, selectedProduct, plansToDisplay, }: {
3
- availablePlansArray: Plan[];
1
+ import { PriceList, Product } from '@bunnyapp/common';
2
+ declare const PlanFeatures: ({ displayPriceLists, selectedProduct, plansToDisplay, }: {
3
+ displayPriceLists: PriceList[];
4
4
  plansToDisplay: number;
5
5
  selectedProduct?: Product | undefined;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { PriceList, PriceListChangeOptions, Product, Subscription } from "@bunnyapp/common";
2
- import { Dispatch, SetStateAction } from "react";
1
+ import { PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
2
+ import { Dispatch, SetStateAction } from 'react';
3
3
  type PriceListGridDesktopProps = {
4
4
  availablePriceLists: PriceList[];
5
5
  onChangePriceList: (selectedPriceList: PriceList) => void;
@@ -1,13 +1,13 @@
1
- import { PriceList, PriceListChangeOptions } from "@bunnyapp/common";
1
+ import { PriceList, PriceListChangeOptions } from '@bunnyapp/common';
2
2
  export declare const getAvailablePlansAndPriceLists: ({ availablePriceLists, priceListChangeOptions, priceListStart, plansToDisplay, }: {
3
3
  availablePriceLists: PriceList[];
4
4
  priceListChangeOptions?: PriceListChangeOptions | undefined;
5
5
  priceListStart: number;
6
6
  plansToDisplay: number;
7
7
  }) => {
8
- availablePlansArray: import("@bunnyapp/common").Plan[];
8
+ availablePriceListsArray: PriceList[];
9
9
  displayPriceLists: PriceList[];
10
10
  };
11
- export declare const everythingInPlusString: ({ priceList, }: {
11
+ export declare const everythingInPlusString: ({ priceList }: {
12
12
  priceList: PriceList;
13
13
  }) => string;
@@ -1,6 +1,13 @@
1
1
  import { Feature, PriceList } from '@bunnyapp/common';
2
+ import { PeriodMonths } from '../../../../../utils/pricePickerUtils';
2
3
  declare const PriceListCardPriceDescription: ({ feature, priceList, }: {
3
4
  feature?: Feature | undefined;
4
5
  priceList: PriceList;
5
6
  }) => import("react/jsx-runtime").JSX.Element | null;
7
+ export declare function PriceDescriptionString({ unitName, showPriceAsMonthly, periodMonths, doesPlanHaveFlatFeeCharges, }: {
8
+ unitName?: string;
9
+ showPriceAsMonthly?: boolean;
10
+ periodMonths: PeriodMonths;
11
+ doesPlanHaveFlatFeeCharges: boolean;
12
+ }): string;
6
13
  export default PriceListCardPriceDescription;
@@ -1,10 +1,10 @@
1
- import { PriceList, PriceListCharge, Subscription } from "@bunnyapp/common";
1
+ import { PriceList, PriceListCharge, Subscription } from '@bunnyapp/common';
2
2
  export declare const createPlanDescription: (priceList: PriceList) => string;
3
3
  export declare const getActivePlanPriceData: (priceList?: PriceList, selectedPriceList?: PriceList) => {
4
4
  activeCharge: PriceListCharge | undefined;
5
5
  } | undefined;
6
- export declare const isPriceListDisabled: ({ priceList, subscriptions, upgradingSubscription, }: {
6
+ export declare const isPriceListDisabled: ({ priceList, upgradingSubscription, canPurchaseFeatureAddons, }: {
7
7
  priceList: PriceList;
8
- subscriptions?: Subscription[] | undefined;
9
8
  upgradingSubscription: Subscription | undefined;
9
+ canPurchaseFeatureAddons: boolean;
10
10
  }) => boolean;
@@ -1,2 +1 @@
1
1
  export declare const useCancelSubscription: () => (subscriptionIds: string[], apiHost: string, token?: string) => Promise<any>;
2
- export declare const useSubscriptionTrialConvert: (handlePortalErrors: (errors: any) => void, apiHost: string) => (subscriptionId: string, token?: string, paymentId?: string) => Promise<any>;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { Subscription } from '@bunnyapp/common';
3
- import { QuotePreviewData } from './PlanManager/PlanPicker/PlanPicker';
4
3
  export type SubscriptionsContextValues = {
5
4
  gap?: number;
6
5
  shadow?: 'none' | 'sm' | 'md' | 'lg';
@@ -14,8 +13,6 @@ export type SubscriptionsContextValues = {
14
13
  setUpgradingSubscription: React.Dispatch<React.SetStateAction<Subscription | undefined>>;
15
14
  updatingChargeQuantityId?: string;
16
15
  setUpdatingChargeQuantityId: React.Dispatch<React.SetStateAction<string | undefined>>;
17
- quotePreviewData?: QuotePreviewData;
18
- setQuotePreviewData: React.Dispatch<React.SetStateAction<QuotePreviewData | undefined>>;
19
16
  subscriptionUpgradeId: string | null;
20
17
  setSubscriptionUpgradeId: React.Dispatch<React.SetStateAction<string | null>>;
21
18
  };
@@ -1,5 +1,5 @@
1
- import { Quote } from "@bunnyapp/common";
2
- import { EditingQuoteDataType } from "../SubscriptionsListContainer";
1
+ import { Quote } from '@bunnyapp/common';
2
+ import { EditingQuoteDataType } from '../SubscriptionsListContainer';
3
3
  declare const QuoteChangeSummarySection: ({ editingQuote, editingQuoteData, openCheckout, setEditingQuoteData, }: {
4
4
  editingQuote?: Quote | undefined;
5
5
  editingQuoteData?: EditingQuoteDataType | undefined;
@@ -4,5 +4,5 @@ declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptio
4
4
  onCancelSubscriptionClick: (subscription: Subscription) => void;
5
5
  priceListChangeOptions?: PriceListChangeOptions | undefined;
6
6
  subscription: Subscription;
7
- }) => import("react/jsx-runtime").JSX.Element;
7
+ }) => import("react/jsx-runtime").JSX.Element | null;
8
8
  export default SubscriptionCardActions;
@@ -11,6 +11,7 @@ export declare const createQuoteParams: (quote: Quote, subscriptionQuantity: num
11
11
  export declare const canShowChangeQuantities: ({ subscriptions }: {
12
12
  subscriptions: Subscription[];
13
13
  }) => boolean;
14
+ export declare const canSubscriptionUpgradeFromTrial: (subscription: Subscription) => boolean;
14
15
  export declare const isSubscriptionNotActive: (subscription: Subscription) => boolean;
15
16
  export declare const productPlanName: ({ plan, product }: {
16
17
  plan: Plan;
@@ -21,4 +22,4 @@ export declare const isSubscriptionTrial: (subscription: Subscription) => boolea
21
22
  export declare const isDiscount: (kind?: QuoteChangeKind) => boolean;
22
23
  export declare const hasPriceTiers: (charge: SubscriptionCharge) => boolean;
23
24
  export declare const hasMultiplePriceTiers: (charge: SubscriptionCharge) => boolean;
24
- export declare const getApplicablePriceTier: (charge: SubscriptionCharge, currencyId: string) => string;
25
+ export declare const getApplicablePriceTier: (charge: SubscriptionCharge, currencyId: string, priceDecimals: number) => string;
@@ -1,5 +1,5 @@
1
- import { Account, Quote } from "@bunnyapp/common";
2
- declare const TaxationForm: ({ account, quote, }: {
1
+ import { Account, Quote } from '@bunnyapp/common';
2
+ declare const TaxationForm: ({ account, quote }: {
3
3
  account: Account;
4
4
  quote: Quote;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FrontendTransaction as T, TransactionKind } from '@bunnyapp/common';
2
+ import { Transaction, TransactionKind } from '@bunnyapp/common';
3
3
  import { ShadowType } from '../../types/shadowType';
4
4
  import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
5
5
  import { TransactionDateType } from './TransactionsListContext';
@@ -23,7 +23,7 @@ export default function Transactions({ transactionComponent, showSearchBar, show
23
23
  /** A custom class name to apply to the search bar */
24
24
  searchBarClassName?: string;
25
25
  /** A function to call when a transaction is clicked */
26
- onTransactionClick?: (transaction: T.Transaction) => void;
26
+ onTransactionClick?: (transaction: Transaction) => void;
27
27
  /** Whether to hide the display showing the transaction */
28
28
  suppressTransactionDisplay?: boolean;
29
29
  /** The kinds of transactions to show */
@@ -40,14 +40,14 @@ export default function Transactions({ transactionComponent, showSearchBar, show
40
40
  * Filtering is applied on the client side.
41
41
  * This is useful to have more control over the filtering logic.
42
42
  */
43
- filterTransactions?: (transaction: T.Transaction) => boolean;
43
+ filterTransactions?: (transaction: Transaction) => boolean;
44
44
  /** A function to sort the transactions. Runs on the client side. */
45
- sortTransactions?: (transactionA: T.Transaction, transactionB: T.Transaction) => number;
45
+ sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
46
46
  /** The type of date to display for transactions if applicable. Payments will always only show createdAt date. */
47
47
  transactionDateType?: TransactionDateType;
48
48
  }): import("react/jsx-runtime").JSX.Element;
49
49
  export declare function TransactionsDisplay({ transactions, onSearchValueChanged, search, }: {
50
- transactions: T.Transaction[];
50
+ transactions: Transaction[];
51
51
  onSearchValueChanged: (value: string) => void;
52
52
  search: string;
53
53
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
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";
2
+ import { Transaction, TransactionKind } from '@bunnyapp/common';
3
+ import { ShadowType } from '../../types/shadowType';
4
+ import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
5
5
  export type TransactionsContextValues = {
6
6
  showSearchBar?: boolean;
7
7
  showTitle?: boolean;
@@ -13,17 +13,17 @@ export type TransactionsContextValues = {
13
13
  shadow?: ShadowType;
14
14
  searchBarClassName?: string;
15
15
  useModal?: boolean;
16
- onTransactionClick?: (transaction: T.Transaction) => void;
17
- onTransactionDisplayClose?: (transaction: T.Transaction | null) => void;
16
+ onTransactionClick?: (transaction: Transaction) => void;
17
+ onTransactionDisplayClose?: (transaction: Transaction | null) => void;
18
18
  suppressTransactionDisplay?: boolean;
19
19
  kindsToShow?: TransactionKind[];
20
20
  style?: React.CSSProperties;
21
21
  filter?: string;
22
22
  noTransactionsMessage?: string;
23
23
  downloadTransactionLink?: (id: string) => string;
24
- filterTransactions?: (transaction: T.Transaction) => boolean;
25
- sortTransactions?: (transactionA: T.Transaction, transactionB: T.Transaction) => number;
24
+ filterTransactions?: (transaction: Transaction) => boolean;
25
+ sortTransactions?: (transactionA: Transaction, transactionB: Transaction) => number;
26
26
  transactionDateType: TransactionDateType;
27
27
  };
28
- export type TransactionDateType = "createdAt" | "issuedAt" | "dueAt";
28
+ export type TransactionDateType = 'createdAt' | 'issuedAt' | 'dueAt';
29
29
  export declare const TransactionsListContext: import("react").Context<TransactionsContextValues>;
@@ -1,6 +1,6 @@
1
- import { FrontendTransaction as T } from "@bunnyapp/common";
1
+ import { Transaction } from '@bunnyapp/common';
2
2
  declare const TransactionDownload: ({ transaction, token, apiHost, }: {
3
- transaction: T.Transaction;
3
+ transaction: Transaction;
4
4
  token?: string | undefined;
5
5
  apiHost: string;
6
6
  }) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
- import { FrontendTransaction as T } from "@bunnyapp/common";
2
- declare const TransactionRowTitle: ({ transaction, }: {
3
- transaction: T.Transaction;
1
+ import { Transaction } from '@bunnyapp/common';
2
+ declare const TransactionRowTitle: ({ transaction }: {
3
+ transaction: Transaction;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
5
5
  export default TransactionRowTitle;
@@ -1,7 +1,7 @@
1
- import { FrontendTransaction as T } from "@bunnyapp/common";
2
- export type TransactionListColumnType = "date" | "title" | "state" | "amount" | "download" | "accountName";
1
+ import { Transaction } from '@bunnyapp/common';
2
+ export type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
3
3
  declare const TransactionsListDesktop: ({ transactions, onTransactionClick, }: {
4
- transactions: T.Transaction[];
5
- onTransactionClick?: ((transaction: T.Transaction) => void) | undefined;
4
+ transactions: Transaction[];
5
+ onTransactionClick?: ((transaction: Transaction) => void) | undefined;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
7
7
  export default TransactionsListDesktop;
@@ -1,6 +1,6 @@
1
- import { FrontendTransaction as T } from "@bunnyapp/common";
1
+ import { Transaction } from '@bunnyapp/common';
2
2
  declare const TransactionsListMobile: ({ transactions, onTransactionClick, }: {
3
- transactions: T.Transaction[];
4
- onTransactionClick: (transaction: T.Transaction) => void;
3
+ transactions: Transaction[];
4
+ onTransactionClick: (transaction: Transaction) => void;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
6
6
  export default TransactionsListMobile;
@@ -1,3 +1,3 @@
1
- import { FrontendTransaction as T } from "@bunnyapp/common";
2
- import { TransactionDateType } from "../TransactionsListContext";
3
- export declare function transactionDateToDisplay(transaction: T.Transaction, transactionDateType: TransactionDateType): any;
1
+ import { Transaction } from '@bunnyapp/common';
2
+ import { TransactionDateType } from '../TransactionsListContext';
3
+ export declare function transactionDateToDisplay(transaction: Transaction, transactionDateType: TransactionDateType): string;
@@ -0,0 +1,4 @@
1
+ declare const Bancontact: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default Bancontact;
@@ -0,0 +1,4 @@
1
+ declare const IDeal: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default IDeal;
@@ -0,0 +1,4 @@
1
+ declare const Sepa: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default Sepa;
@@ -5,3 +5,4 @@ export declare const useQuoteChangeUpdate: () => (charges: {
5
5
  quantity: number;
6
6
  }[], quoteChangeId: string, apiHost: string, token?: string) => Promise<unknown>;
7
7
  export declare const useQuoteDelete: () => (quoteId: string, apiHost: string, token?: string) => Promise<unknown>;
8
+ export declare const useQuoteSubscriptionActivate: () => (subscriptionId: string, apiHost: string, token?: string) => Promise<unknown>;