@bunnyapp/components 1.0.73 → 1.0.76-beta.10

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 (88) hide show
  1. package/dist/cjs/index.js +628 -351
  2. package/dist/cjs/src/components/Invoice/Invoice.stories.d.ts +2 -2
  3. package/dist/cjs/src/components/Invoice/index.d.ts +1 -2
  4. package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +3 -4
  5. package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
  6. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +2 -2
  7. package/dist/cjs/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
  8. package/dist/cjs/src/components/QuotePreviewProvider.d.ts +17 -0
  9. package/dist/cjs/src/components/Quotes/Quotes.d.ts +6 -6
  10. package/dist/cjs/src/components/Quotes/Quotes.stories.d.ts +2 -2
  11. package/dist/cjs/src/components/Signup/PaymentForms.d.ts +9 -1
  12. package/dist/cjs/src/components/Signup/Signup.d.ts +11 -1
  13. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
  14. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
  15. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
  16. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
  17. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
  18. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
  19. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  20. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  21. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
  22. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
  23. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -2
  24. package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
  25. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
  26. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -2
  27. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +1 -1
  28. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +4 -2
  29. package/dist/cjs/src/components/Transactions/Transactions.d.ts +5 -5
  30. package/dist/cjs/src/components/Transactions/TransactionsListContext.d.ts +8 -8
  31. package/dist/cjs/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  32. package/dist/cjs/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
  33. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
  34. package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
  35. package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +3 -3
  36. package/dist/cjs/src/components/icons/Bancontact.d.ts +4 -0
  37. package/dist/cjs/src/components/icons/Sepa.d.ts +4 -0
  38. package/dist/cjs/src/components/icons/iDeal.d.ts +4 -0
  39. package/dist/cjs/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
  40. package/dist/cjs/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
  41. package/dist/cjs/src/graphql/queries/getTransactions.d.ts +2 -2
  42. package/dist/cjs/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
  43. package/dist/cjs/src/utils/featureAddonUtils.d.ts +3 -0
  44. package/dist/esm/index.js +632 -355
  45. package/dist/esm/src/components/Invoice/Invoice.stories.d.ts +2 -2
  46. package/dist/esm/src/components/Invoice/index.d.ts +1 -2
  47. package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +3 -4
  48. package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -2
  49. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +2 -2
  50. package/dist/esm/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -2
  51. package/dist/esm/src/components/QuotePreviewProvider.d.ts +17 -0
  52. package/dist/esm/src/components/Quotes/Quotes.d.ts +6 -6
  53. package/dist/esm/src/components/Quotes/Quotes.stories.d.ts +2 -2
  54. package/dist/esm/src/components/Signup/PaymentForms.d.ts +9 -1
  55. package/dist/esm/src/components/Signup/Signup.d.ts +11 -1
  56. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PlanPicker.d.ts +0 -5
  57. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -2
  58. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListSelector.d.ts +2 -3
  59. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +1 -3
  60. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +62 -2
  61. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/FeatureAddons.d.ts +9 -0
  62. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  63. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -2
  64. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -3
  65. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +7 -0
  66. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +3 -2
  67. package/dist/esm/src/components/Subscriptions/SubscriptionsContext.d.ts +0 -3
  68. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuoteChangeSummarySection.d.ts +2 -2
  69. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -2
  70. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +1 -1
  71. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +4 -2
  72. package/dist/esm/src/components/Transactions/Transactions.d.ts +5 -5
  73. package/dist/esm/src/components/Transactions/TransactionsListContext.d.ts +8 -8
  74. package/dist/esm/src/components/Transactions/transactionsList/TransactionDownload.d.ts +2 -2
  75. package/dist/esm/src/components/Transactions/transactionsList/TransactionTitle.d.ts +3 -3
  76. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +4 -4
  77. package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +3 -3
  78. package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +3 -3
  79. package/dist/esm/src/components/icons/Bancontact.d.ts +4 -0
  80. package/dist/esm/src/components/icons/Sepa.d.ts +4 -0
  81. package/dist/esm/src/components/icons/iDeal.d.ts +4 -0
  82. package/dist/esm/src/graphql/mutations/quoteChargeCreate.d.ts +2 -1
  83. package/dist/esm/src/graphql/mutations/quoteChargeDelete.d.ts +7 -0
  84. package/dist/esm/src/graphql/queries/getTransactions.d.ts +2 -2
  85. package/dist/esm/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +8 -0
  86. package/dist/esm/src/utils/featureAddonUtils.d.ts +3 -0
  87. package/dist/index.d.ts +21 -12
  88. package/package.json +3 -4
@@ -1,5 +1,5 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import Invoice from "./Invoice";
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Invoice from './Invoice';
3
3
  declare const meta: Meta<typeof Invoice>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
@@ -1,8 +1,7 @@
1
- export { default as Invoice } from "./Invoice";
1
+ export { default as Invoice } from './Invoice';
2
2
  declare global {
3
3
  interface Window {
4
4
  heap: any;
5
5
  PayFields: any;
6
- Finix: any;
7
6
  }
8
7
  }
@@ -1,10 +1,9 @@
1
- import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
2
- declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, noPadding, plugin, paymentHoldOptions, }: {
1
+ import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
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
- noPadding?: boolean | undefined;
8
7
  plugin: PluginData | undefined;
9
8
  paymentHoldOptions?: {
10
9
  payToAccept?: boolean | undefined;
@@ -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,6 +1,6 @@
1
- import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
1
+ import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
2
2
  export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, entityId, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
3
- invoice?: FormattedInvoice | undefined;
3
+ invoice?: FormattedInvoice | Invoice | undefined;
4
4
  quote?: Quote | undefined;
5
5
  onFail: (error: any) => void;
6
6
  onPaymentSuccess?: (() => void) | undefined;
@@ -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,11 @@
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, subscriptions, upgradingSubscription, canPurchaseFeatureAddons, }: {
7
7
  priceList: PriceList;
8
8
  subscriptions?: Subscription[] | undefined;
9
9
  upgradingSubscription: Subscription | undefined;
10
+ canPurchaseFeatureAddons: boolean;
10
11
  }) => boolean;
@@ -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;
@@ -1,8 +1,8 @@
1
- import { PriceListChangeOptions, Subscription } from "@bunnyapp/common";
1
+ import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
2
  declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, }: {
3
3
  onChangePlanClick: (subscription: Subscription) => void;
4
4
  onCancelSubscriptionClick: (subscription: Subscription) => void;
5
5
  priceListChangeOptions?: PriceListChangeOptions | undefined;
6
6
  subscription: Subscription;
7
- }) => import("react/jsx-runtime").JSX.Element | null;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
8
  export default SubscriptionCardActions;
@@ -1,4 +1,4 @@
1
- import { PriceListChangeOptions, Subscription } from "@bunnyapp/common";
1
+ import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
2
  declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, }: {
3
3
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
4
4
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
@@ -16,7 +16,9 @@ export declare const productPlanName: ({ plan, product }: {
16
16
  plan: Plan;
17
17
  product: Product;
18
18
  }) => string;
19
- export declare const canShowSubscriptionActions: (subscription: Subscription) => boolean;
19
+ export declare const isSubscriptionActiveOrPending: (subscription: Subscription) => boolean;
20
+ export declare const isSubscriptionTrial: (subscription: Subscription) => boolean;
20
21
  export declare const isDiscount: (kind?: QuoteChangeKind) => boolean;
21
22
  export declare const hasPriceTiers: (charge: SubscriptionCharge) => boolean;
22
- export declare const getApplicablePriceTier: (charge: SubscriptionCharge, currencyId: string) => string;
23
+ export declare const hasMultiplePriceTiers: (charge: SubscriptionCharge) => boolean;
24
+ export declare const getApplicablePriceTier: (charge: SubscriptionCharge, currencyId: string, priceDecimals: number) => string;
@@ -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 Sepa: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default Sepa;
@@ -0,0 +1,4 @@
1
+ declare const IDeal: ({ className }: {
2
+ className?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default IDeal;
@@ -1,3 +1,4 @@
1
+ import { QuoteCharge } from '@bunnyapp/common';
1
2
  type QuoteChangeCreateChargeProps = {
2
3
  apiHost: string;
3
4
  price?: number;
@@ -8,5 +9,5 @@ type QuoteChangeCreateChargeProps = {
8
9
  subscriptionChargeId?: string;
9
10
  token?: string;
10
11
  };
11
- declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<unknown>;
12
+ declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<QuoteCharge>;
12
13
  export default quoteChargeCreate;
@@ -0,0 +1,7 @@
1
+ type QuoteChargeDeleteProps = {
2
+ apiHost: string;
3
+ quoteChargeId: string;
4
+ token?: string;
5
+ };
6
+ declare const quoteChargeDelete: ({ quoteChargeId, token, apiHost }: QuoteChargeDeleteProps) => Promise<unknown>;
7
+ export default quoteChargeDelete;
@@ -1,3 +1,3 @@
1
- import { FrontendTransaction as T } from '@bunnyapp/common';
2
- declare const getTransactions: (filter: string, apiHost: string, token?: string) => Promise<T.Transaction[]>;
1
+ import { Transaction } from '@bunnyapp/common';
2
+ declare const getTransactions: (filter: string, apiHost: string, token?: string) => Promise<Transaction[]>;
3
3
  export default getTransactions;
@@ -0,0 +1,8 @@
1
+ import { PriceListCharge } from '@bunnyapp/common';
2
+ export declare const useQuoteUpdateFeatureAddon: (quoteId: string | undefined, featureAddon: PriceListCharge) => {
3
+ handleAddFeatureAddon: () => void;
4
+ handleRemoveFeatureAddon: () => void;
5
+ isPending: boolean;
6
+ isChecked: boolean;
7
+ editingQuoteLoaded: boolean;
8
+ };