@bunnyapp/components 1.0.62 → 1.0.64-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 (70) hide show
  1. package/dist/cjs/index.js +799 -355
  2. package/dist/cjs/src/components/CustomizedAntdComponents/Tag.d.ts +3 -1
  3. package/dist/cjs/src/components/DocumentTemplatePreview.d.ts +4 -0
  4. package/dist/cjs/src/components/Invoice/InvoiceQuoteView.d.ts +2 -1
  5. package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +7 -2
  6. package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/useApproveHold.d.ts +13 -0
  7. package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +1 -1
  8. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +6 -1
  9. package/dist/cjs/src/components/PaymentForm/Stripe/hooks/useApproveHold.d.ts +13 -0
  10. package/dist/cjs/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -2
  11. package/dist/cjs/src/components/Quote/AcceptQuoteModal.d.ts +2 -1
  12. package/dist/cjs/src/components/Quote/PaymentHoldModal.d.ts +7 -0
  13. package/dist/cjs/src/components/Quote/Quote.stories.d.ts +70 -116
  14. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/NextPriceListButton.d.ts +2 -2
  15. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardDescription.d.ts +1 -1
  16. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPrice.d.ts +1 -1
  17. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +1 -1
  18. package/dist/cjs/src/components/Subscriptions/SubscriptionsListContainer.d.ts +2 -2
  19. package/dist/cjs/src/components/Subscriptions/TieredDisplayDropdown.d.ts +8 -0
  20. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
  21. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -3
  22. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +1 -1
  23. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
  24. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +7 -4
  25. package/dist/cjs/src/enums/BillingPeriodConverter.d.ts +8 -0
  26. package/dist/cjs/src/graphql/queries/getQuoteFirstInvoice.d.ts +7 -0
  27. package/dist/cjs/src/graphql/queries/getTransactions.d.ts +1 -1
  28. package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +3 -2
  29. package/dist/cjs/src/hooks/usePlugins.d.ts +1 -1
  30. package/dist/cjs/src/mocks/handlers.d.ts +1 -1
  31. package/dist/cjs/src/styles/AntdOverrides.d.ts +3 -0
  32. package/dist/cjs/src/styles/constants.d.ts +4 -0
  33. package/dist/cjs/src/utils/stringUtils.d.ts +1 -0
  34. package/dist/esm/index.js +802 -359
  35. package/dist/esm/src/components/CustomizedAntdComponents/Tag.d.ts +3 -1
  36. package/dist/esm/src/components/DocumentTemplatePreview.d.ts +4 -0
  37. package/dist/esm/src/components/Invoice/InvoiceQuoteView.d.ts +2 -1
  38. package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +7 -2
  39. package/dist/esm/src/components/PaymentForm/DemoPay/hooks/useApproveHold.d.ts +13 -0
  40. package/dist/esm/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +1 -1
  41. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +6 -1
  42. package/dist/esm/src/components/PaymentForm/Stripe/hooks/useApproveHold.d.ts +13 -0
  43. package/dist/esm/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -2
  44. package/dist/esm/src/components/Quote/AcceptQuoteModal.d.ts +2 -1
  45. package/dist/esm/src/components/Quote/PaymentHoldModal.d.ts +7 -0
  46. package/dist/esm/src/components/Quote/Quote.stories.d.ts +70 -116
  47. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/NextPriceListButton.d.ts +2 -2
  48. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardDescription.d.ts +1 -1
  49. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPrice.d.ts +1 -1
  50. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardPriceDescription.d.ts +1 -1
  51. package/dist/esm/src/components/Subscriptions/SubscriptionsListContainer.d.ts +2 -2
  52. package/dist/esm/src/components/Subscriptions/TieredDisplayDropdown.d.ts +8 -0
  53. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
  54. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -3
  55. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +1 -1
  56. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
  57. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +7 -4
  58. package/dist/esm/src/enums/BillingPeriodConverter.d.ts +8 -0
  59. package/dist/esm/src/graphql/queries/getQuoteFirstInvoice.d.ts +7 -0
  60. package/dist/esm/src/graphql/queries/getTransactions.d.ts +1 -1
  61. package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +3 -2
  62. package/dist/esm/src/hooks/usePlugins.d.ts +1 -1
  63. package/dist/esm/src/mocks/handlers.d.ts +1 -1
  64. package/dist/esm/src/styles/AntdOverrides.d.ts +3 -0
  65. package/dist/esm/src/styles/constants.d.ts +4 -0
  66. package/dist/esm/src/utils/stringUtils.d.ts +1 -0
  67. package/dist/index.d.ts +6 -1
  68. package/package.json +3 -2
  69. package/dist/cjs/src/graphql/queries/getPlanChangeOptions.d.ts +0 -8
  70. package/dist/esm/src/graphql/queries/getPlanChangeOptions.d.ts +0 -8
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const tagStyleMap: {
2
3
  blue: {
3
4
  color: string;
@@ -28,9 +29,10 @@ declare const tagStyleMap: {
28
29
  background: string;
29
30
  };
30
31
  };
31
- declare const CustomizedTag: ({ children, color, className, }: {
32
+ declare const CustomizedTag: ({ children, color, className, style, }: {
32
33
  children: React.ReactNode;
33
34
  color?: "blue" | "purple" | "green" | "red" | "orange" | "yellow" | "black" | undefined;
34
35
  className?: string | undefined;
36
+ style?: import("react").CSSProperties | undefined;
35
37
  }) => import("react/jsx-runtime").JSX.Element;
36
38
  export default CustomizedTag;
@@ -0,0 +1,4 @@
1
+ declare const DocumentTemplatePreview: ({ targetUrl }: {
2
+ targetUrl: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ export default DocumentTemplatePreview;
@@ -1,11 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { FormattedInvoice } from '@bunnyapp/common';
3
- declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, }: {
3
+ declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, }: {
4
4
  html: string;
5
5
  children?: ReactNode;
6
6
  formattedInvoice?: FormattedInvoice | undefined;
7
7
  backButtonName?: string | undefined;
8
8
  onBackButtonClick?: (() => void) | undefined;
9
9
  onDownloadError?: (() => void) | undefined;
10
+ targetUrl?: string | undefined;
10
11
  }) => import("react/jsx-runtime").JSX.Element;
11
12
  export default InvoiceQuoteView;
@@ -1,9 +1,14 @@
1
1
  import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
2
- declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, noPadding, plugin, }: {
2
+ declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, onPaymentHoldSuccess, noPadding, plugin, paymentHoldOptions, }: {
3
3
  quote?: Quote | undefined;
4
4
  invoice?: FormattedInvoice | undefined;
5
- onPaymentSuccess: () => void;
5
+ onPaymentSuccess?: ((response: any) => void) | undefined;
6
+ onPaymentHoldSuccess?: ((response: any) => void) | undefined;
6
7
  noPadding?: boolean | undefined;
7
8
  plugin: PluginData | undefined;
9
+ paymentHoldOptions?: {
10
+ payToAccept?: boolean | undefined;
11
+ amountToHold?: number | undefined;
12
+ } | undefined;
8
13
  }) => import("react/jsx-runtime").JSX.Element | null;
9
14
  export default CheckoutFooter;
@@ -0,0 +1,13 @@
1
+ import { PluginData, Quote } from '@bunnyapp/common';
2
+ export declare function useApproveHold({ onApproveHoldSuccess, onApproveHoldError, }: {
3
+ onApproveHoldSuccess?: (response: any) => void;
4
+ onApproveHoldError?: (error: any) => void;
5
+ }): {
6
+ approveHold: ({ plugin, quote, paymentMethodId, }: {
7
+ plugin: PluginData;
8
+ quote: Quote;
9
+ paymentMethodId: string;
10
+ }) => Promise<void>;
11
+ isSaving: boolean;
12
+ };
13
+ export default useApproveHold;
@@ -1,6 +1,6 @@
1
1
  import { FormattedInvoice, PaymentMethod, PluginData, Quote } from '@bunnyapp/common';
2
2
  export declare function usePay({ onPaymentSuccess, onPaymentError, quote, invoice, storedPaymentMethod, plugin, }: {
3
- onPaymentSuccess: (response: any) => void;
3
+ onPaymentSuccess?: (response: any) => void;
4
4
  onPaymentError?: (error: any) => void;
5
5
  quote?: Quote;
6
6
  invoice?: FormattedInvoice;
@@ -1,9 +1,10 @@
1
1
  import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
2
- export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, }: {
2
+ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
3
3
  invoice?: FormattedInvoice | undefined;
4
4
  quote?: Quote | undefined;
5
5
  onFail: (error: any) => void;
6
6
  onPaymentSuccess?: (() => void) | undefined;
7
+ onPaymentHoldSuccess?: ((response: any) => void) | undefined;
7
8
  onSavePaymentMethod?: (() => void) | undefined;
8
9
  onRemovePaymentMethod?: (() => void) | undefined;
9
10
  onSetDefaultPaymentMethod?: (() => void) | undefined;
@@ -11,4 +12,8 @@ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, quote, a
11
12
  overrideToken?: string | undefined;
12
13
  customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
13
14
  currencyId?: string | undefined;
15
+ paymentHoldOptions?: {
16
+ payToAccept?: boolean | undefined;
17
+ amountToHold?: number | undefined;
18
+ } | undefined;
14
19
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { PluginData, Quote } from '@bunnyapp/common';
2
+ export declare function useApproveHold({ onApproveHoldSuccess, onApproveHoldError, }: {
3
+ onApproveHoldSuccess?: (response: any) => void;
4
+ onApproveHoldError?: (error: any) => void;
5
+ }): {
6
+ approveHold: ({ plugin, quote, paymentMethodId, }: {
7
+ plugin: PluginData;
8
+ quote: Quote;
9
+ paymentMethodId: string;
10
+ }) => Promise<void>;
11
+ isSaving: boolean;
12
+ };
13
+ export default useApproveHold;
@@ -1,5 +1,5 @@
1
- import { Stripe } from "@stripe/stripe-js";
2
- import { PluginData, Payable } from "@bunnyapp/common";
1
+ import { Stripe } from '@stripe/stripe-js';
2
+ import { PluginData, Payable, Quote } from '@bunnyapp/common';
3
3
  export declare const createPaymentMethod: ({ paymentMethodId, plugin, token, apiHost, accountId, }: {
4
4
  paymentMethodId: string;
5
5
  plugin: PluginData;
@@ -16,6 +16,13 @@ export declare const createPaymentIntent: ({ payable, savePaymentMethod, memo, p
16
16
  token: string;
17
17
  apiHost: string;
18
18
  }) => Promise<any>;
19
+ export declare const createPaymentHold: ({ quote, plugin, token, apiHost, paymentMethodId, }: {
20
+ quote: Quote;
21
+ plugin: PluginData;
22
+ token: string;
23
+ apiHost: string;
24
+ paymentMethodId: string;
25
+ }) => Promise<any>;
19
26
  export declare const useStripePlugin: (plugin: PluginData | undefined, apiHost: string, currencyId: string, token?: string, accountId?: string) => {
20
27
  stripe: Stripe | null;
21
28
  options: {
@@ -1,9 +1,10 @@
1
1
  import { FormattedQuote } from "@bunnyapp/common";
2
- declare const AcceptQuoteModal: ({ acceptBoxVisible, formattedQuote, sendAccept, setAcceptBoxVisible, setIsAccepting, }: {
2
+ declare const AcceptQuoteModal: ({ acceptBoxVisible, formattedQuote, sendAccept, setAcceptBoxVisible, setIsAccepting, isSendAcceptPending, }: {
3
3
  acceptBoxVisible: boolean;
4
4
  formattedQuote: FormattedQuote;
5
5
  sendAccept: (changedFields: any) => void;
6
6
  setAcceptBoxVisible: (visible: boolean) => void;
7
7
  setIsAccepting: (accepting: boolean) => void;
8
+ isSendAcceptPending: boolean;
8
9
  }) => import("react/jsx-runtime").JSX.Element;
9
10
  export default AcceptQuoteModal;
@@ -0,0 +1,7 @@
1
+ import { FormattedQuote } from '@bunnyapp/common';
2
+ declare const PaymentHoldModal: ({ visible, setVisible, quote, }: {
3
+ visible: boolean;
4
+ setVisible: (visible: boolean) => void;
5
+ quote: FormattedQuote;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default PaymentHoldModal;
@@ -1,134 +1,88 @@
1
- /// <reference types="react" />
2
1
  import type { Meta, StoryObj } from "@storybook/react";
3
2
  import Quote from "./Quote";
4
3
  declare const meta: Meta<typeof Quote>;
5
4
  export default meta;
6
5
  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
- shadow?: import("../../types/shadowType").ShadowType | undefined;
15
- className?: string | undefined;
16
- hideDownloadButton?: boolean | undefined;
17
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
18
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
6
+ export declare const Default: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
7
+ [x: string]: any;
19
8
  }, {
20
- className?: string | undefined;
21
- backButtonName?: string | undefined;
22
- onBackButtonClick?: (() => void) | undefined;
23
- shadow?: import("../../types/shadowType").ShadowType | undefined;
24
- hideDownloadButton?: boolean | undefined;
25
- id?: string | undefined;
26
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
27
- invoiceQuoteViewComponent?: import("react").ReactNode;
28
- onInvoiceDownloadError?: (() => void) | undefined;
29
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
30
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
9
+ [x: string]: any;
10
+ className?: any;
11
+ id?: any;
12
+ backButtonName?: any;
13
+ onBackButtonClick?: any;
14
+ shadow?: any;
15
+ hideDownloadButton?: any;
16
+ onPaymentSuccess?: any;
17
+ invoiceQuoteViewComponent?: any;
18
+ onInvoiceDownloadError?: any;
19
+ onInvoiceLoaded?: any;
20
+ onQuoteLoaded?: any;
31
21
  }>;
32
- export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
33
- id?: string | undefined;
34
- invoiceQuoteViewComponent?: import("react").ReactNode;
35
- backButtonName?: string | undefined;
36
- onBackButtonClick?: (() => void) | undefined;
37
- onInvoiceDownloadError?: (() => void) | undefined;
38
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
39
- shadow?: import("../../types/shadowType").ShadowType | undefined;
40
- className?: string | undefined;
41
- hideDownloadButton?: boolean | undefined;
42
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
43
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
22
+ export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
23
+ [x: string]: any;
44
24
  }, {
45
- className?: string | undefined;
46
- backButtonName?: string | undefined;
47
- onBackButtonClick?: (() => void) | undefined;
48
- shadow?: import("../../types/shadowType").ShadowType | undefined;
49
- hideDownloadButton?: boolean | undefined;
50
- id?: string | undefined;
51
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
52
- invoiceQuoteViewComponent?: import("react").ReactNode;
53
- onInvoiceDownloadError?: (() => void) | undefined;
54
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
55
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
25
+ [x: string]: any;
26
+ className?: any;
27
+ id?: any;
28
+ backButtonName?: any;
29
+ onBackButtonClick?: any;
30
+ shadow?: any;
31
+ hideDownloadButton?: any;
32
+ onPaymentSuccess?: any;
33
+ invoiceQuoteViewComponent?: any;
34
+ onInvoiceDownloadError?: any;
35
+ onInvoiceLoaded?: any;
36
+ onQuoteLoaded?: any;
56
37
  }>;
57
- export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
58
- id?: string | undefined;
59
- invoiceQuoteViewComponent?: import("react").ReactNode;
60
- backButtonName?: string | undefined;
61
- onBackButtonClick?: (() => void) | undefined;
62
- onInvoiceDownloadError?: (() => void) | undefined;
63
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
64
- shadow?: import("../../types/shadowType").ShadowType | undefined;
65
- className?: string | undefined;
66
- hideDownloadButton?: boolean | undefined;
67
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
68
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
38
+ export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
39
+ [x: string]: any;
69
40
  }, {
70
- className?: string | undefined;
71
- backButtonName?: string | undefined;
72
- onBackButtonClick?: (() => void) | undefined;
73
- shadow?: import("../../types/shadowType").ShadowType | undefined;
74
- hideDownloadButton?: boolean | undefined;
75
- id?: string | undefined;
76
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
77
- invoiceQuoteViewComponent?: import("react").ReactNode;
78
- onInvoiceDownloadError?: (() => void) | undefined;
79
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
80
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
41
+ [x: string]: any;
42
+ className?: any;
43
+ id?: any;
44
+ backButtonName?: any;
45
+ onBackButtonClick?: any;
46
+ shadow?: any;
47
+ hideDownloadButton?: any;
48
+ onPaymentSuccess?: any;
49
+ invoiceQuoteViewComponent?: any;
50
+ onInvoiceDownloadError?: any;
51
+ onInvoiceLoaded?: any;
52
+ onQuoteLoaded?: any;
81
53
  }>;
82
- export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
83
- id?: string | undefined;
84
- invoiceQuoteViewComponent?: import("react").ReactNode;
85
- backButtonName?: string | undefined;
86
- onBackButtonClick?: (() => void) | undefined;
87
- onInvoiceDownloadError?: (() => void) | undefined;
88
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
89
- shadow?: import("../../types/shadowType").ShadowType | undefined;
90
- className?: string | undefined;
91
- hideDownloadButton?: boolean | undefined;
92
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
93
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
54
+ export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
55
+ [x: string]: any;
94
56
  }, {
95
- className?: string | undefined;
96
- backButtonName?: string | undefined;
97
- onBackButtonClick?: (() => void) | undefined;
98
- shadow?: import("../../types/shadowType").ShadowType | undefined;
99
- hideDownloadButton?: boolean | undefined;
100
- id?: string | undefined;
101
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
102
- invoiceQuoteViewComponent?: import("react").ReactNode;
103
- onInvoiceDownloadError?: (() => void) | undefined;
104
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
105
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
57
+ [x: string]: any;
58
+ className?: any;
59
+ id?: any;
60
+ backButtonName?: any;
61
+ onBackButtonClick?: any;
62
+ shadow?: any;
63
+ hideDownloadButton?: any;
64
+ onPaymentSuccess?: any;
65
+ invoiceQuoteViewComponent?: any;
66
+ onInvoiceDownloadError?: any;
67
+ onInvoiceLoaded?: any;
68
+ onQuoteLoaded?: any;
106
69
  }>;
107
70
  export declare const HideDownloadButton: Story;
108
71
  export declare const AcceptedQuote: Story;
109
72
  export declare const AcceptedQuoteDarkMode: Story;
110
- export declare const DarkMode: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-a5624094").R, {
111
- id?: string | undefined;
112
- invoiceQuoteViewComponent?: import("react").ReactNode;
113
- backButtonName?: string | undefined;
114
- onBackButtonClick?: (() => void) | undefined;
115
- onInvoiceDownloadError?: (() => void) | undefined;
116
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
117
- shadow?: import("../../types/shadowType").ShadowType | undefined;
118
- className?: string | undefined;
119
- hideDownloadButton?: boolean | undefined;
120
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
121
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
73
+ export declare const DarkMode: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
74
+ [x: string]: any;
122
75
  }, {
123
- className?: string | undefined;
124
- backButtonName?: string | undefined;
125
- onBackButtonClick?: (() => void) | undefined;
126
- shadow?: import("../../types/shadowType").ShadowType | undefined;
127
- hideDownloadButton?: boolean | undefined;
128
- id?: string | undefined;
129
- onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
130
- invoiceQuoteViewComponent?: import("react").ReactNode;
131
- onInvoiceDownloadError?: (() => void) | undefined;
132
- onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
133
- onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
76
+ [x: string]: any;
77
+ className?: any;
78
+ id?: any;
79
+ backButtonName?: any;
80
+ onBackButtonClick?: any;
81
+ shadow?: any;
82
+ hideDownloadButton?: any;
83
+ onPaymentSuccess?: any;
84
+ invoiceQuoteViewComponent?: any;
85
+ onInvoiceDownloadError?: any;
86
+ onInvoiceLoaded?: any;
87
+ onQuoteLoaded?: any;
134
88
  }>;
@@ -1,5 +1,5 @@
1
- import { Dispatch, SetStateAction } from "react";
2
- import { PriceList } from "@bunnyapp/common";
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { PriceList } from '@bunnyapp/common';
3
3
  declare const NextPriceListButton: ({ availablePriceLists, priceListStart, setPriceListStart, numberOfPlansToDisplay, }: {
4
4
  availablePriceLists: PriceList[];
5
5
  numberOfPlansToDisplay: number;
@@ -1,4 +1,4 @@
1
- declare const PriceListCardDescription: ({ description, }: {
1
+ declare const PriceListCardDescription: ({ description }: {
2
2
  description?: string | undefined;
3
3
  }) => import("react/jsx-runtime").JSX.Element | null;
4
4
  export default PriceListCardDescription;
@@ -1,4 +1,4 @@
1
- import { PriceList } from "@bunnyapp/common";
1
+ import { PriceList } from '@bunnyapp/common';
2
2
  declare const PriceListCardPrice: ({ priceList }: {
3
3
  priceList: PriceList;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Feature, PriceList } from "@bunnyapp/common";
1
+ import { Feature, PriceList } from '@bunnyapp/common';
2
2
  declare const PriceListCardPriceDescription: ({ feature, priceList, }: {
3
3
  feature?: Feature | undefined;
4
4
  priceList: PriceList;
@@ -1,5 +1,5 @@
1
- import { Subscription } from "@bunnyapp/common";
2
- import "../../styles/index.less";
1
+ import { Subscription } from '@bunnyapp/common';
2
+ import '../../styles/index.less';
3
3
  export type EditingQuoteDataType = {
4
4
  id: string;
5
5
  isTrial: boolean;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { SubscriptionCharge } from '@bunnyapp/common';
3
+ declare const TieredDisplayDropdown: ({ charge, currencyId, truncatedText, }: {
4
+ charge: SubscriptionCharge;
5
+ currencyId: string;
6
+ truncatedText: ReactNode;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default TieredDisplayDropdown;
@@ -1,4 +1,4 @@
1
- import { Subscription, SubscriptionCharge } from "@bunnyapp/common";
1
+ import { Subscription, SubscriptionCharge } from '@bunnyapp/common';
2
2
  declare const SubscriptionChargeTotal: ({ charge, subscription, }: {
3
3
  charge: SubscriptionCharge;
4
4
  subscription: Subscription;
@@ -1,6 +1,6 @@
1
- import { Subscription, SubscriptionCharge } from "@bunnyapp/common";
2
- declare const SubscriptionChargeUnitPrice: ({ charge, subscription, }: {
1
+ import { SubscriptionCharge } from '@bunnyapp/common';
2
+ declare const SubscriptionChargeUnitPrice: ({ charge, currencyId, }: {
3
3
  charge: SubscriptionCharge;
4
- subscription: Subscription;
4
+ currencyId: string;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
6
6
  export default SubscriptionChargeUnitPrice;
@@ -1,4 +1,4 @@
1
- import { PriceListChangeOptions, Subscription } from "@bunnyapp/common";
1
+ import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
2
  declare const SubscriptionCardDesktop: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, }: {
3
3
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
4
4
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
@@ -1,4 +1,4 @@
1
- import { Subscription } from "@bunnyapp/common";
1
+ import { Subscription } from '@bunnyapp/common';
2
2
  declare const SubscriptionCard: ({ subscription }: {
3
3
  subscription: Subscription;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { Plan, Product, Quote, Subscription, SubscriptionCharge } from "@bunnyapp/common";
2
- import { EditingSubscriptionType } from "../quantityChangeDrawer/QuantityInput";
1
+ import { Plan, Product, Quote, Subscription, SubscriptionCharge, QuoteChangeKind } from '@bunnyapp/common';
2
+ import { EditingSubscriptionType } from '../quantityChangeDrawer/QuantityInput';
3
3
  export declare const canShowQuantitiesInput: (charge: SubscriptionCharge, subscription: Subscription) => boolean | undefined;
4
4
  export declare const createQuoteParams: (quote: Quote, subscriptionQuantity: number, editedSubscription?: EditingSubscriptionType) => {
5
5
  charges: {
@@ -8,12 +8,15 @@ export declare const createQuoteParams: (quote: Quote, subscriptionQuantity: num
8
8
  }[];
9
9
  quoteChange: import("@bunnyapp/common").QuoteChange | undefined;
10
10
  };
11
- export declare const canShowChangeQuantities: ({ subscriptions, }: {
11
+ export declare const canShowChangeQuantities: ({ subscriptions }: {
12
12
  subscriptions: Subscription[];
13
13
  }) => boolean;
14
14
  export declare const isSubscriptionNotActive: (subscription: Subscription) => boolean;
15
- export declare const productPlanName: ({ plan, product, }: {
15
+ export declare const productPlanName: ({ plan, product }: {
16
16
  plan: Plan;
17
17
  product: Product;
18
18
  }) => string;
19
19
  export declare const canShowSubscriptionActions: (subscription: Subscription) => boolean;
20
+ export declare const isDiscount: (kind?: QuoteChangeKind) => boolean;
21
+ export declare const hasPriceTiers: (charge: SubscriptionCharge) => boolean;
22
+ export declare const getApplicablePriceTier: (charge: SubscriptionCharge, currencyId: string) => string;
@@ -0,0 +1,8 @@
1
+ declare enum BillingPeriodConverter {
2
+ ONCE = "once",
3
+ MONTHLY = "monthly",
4
+ ANNUAL = "annually",
5
+ SEMI_ANNUAL = "semi annually",
6
+ QUARTERLY = "quarterly"
7
+ }
8
+ export default BillingPeriodConverter;
@@ -0,0 +1,7 @@
1
+ import { Invoice } from "@bunnyapp/common";
2
+ declare const getQuoteFirstInvoice: ({ id, token, apiHost, }: {
3
+ id?: string | undefined;
4
+ apiHost: string;
5
+ token?: string | undefined;
6
+ }) => Promise<Invoice>;
7
+ export default getQuoteFirstInvoice;
@@ -1,3 +1,3 @@
1
- import { FrontendTransaction as T } from "@bunnyapp/common";
1
+ import { FrontendTransaction as T } from '@bunnyapp/common';
2
2
  declare const getTransactions: (filter: string, apiHost: string, token?: string) => Promise<T.Transaction[]>;
3
3
  export default getTransactions;
@@ -7,13 +7,14 @@ declare const useSendAcceptQuote: ({ onTokenExpired, quoteId, apiHost, token, }:
7
7
  }) => {
8
8
  acceptBoxVisible: boolean;
9
9
  isAccepting: boolean;
10
- sendAccept: (changedFormItems: {
10
+ sendAccept: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<any, Error, {
11
11
  [key: string]: string;
12
- }) => void;
12
+ }, unknown>;
13
13
  setAcceptBoxVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
14
14
  setIsAccepting: import("react").Dispatch<import("react").SetStateAction<boolean>>;
15
15
  startAcceptance: () => void;
16
16
  pandadocPollingModalVisible: boolean;
17
17
  setPandadocPollingModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
18
+ isSendAcceptPending: boolean;
18
19
  };
19
20
  export default useSendAcceptQuote;
@@ -1,4 +1,4 @@
1
- declare const usePlugins: ({ apiHost, token, }: {
1
+ declare const usePlugins: ({ apiHost, token }: {
2
2
  apiHost: string;
3
3
  token?: string | undefined;
4
4
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<any, Error>;
@@ -1 +1 @@
1
- export declare const handlers: import("msw/lib/core/GraphQLHandler-C5CUIS_N").G[];
1
+ export declare const handlers: import("msw/lib/core/GraphQLHandler-noP9MRWa").G[];
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const AntdOverrides: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export default AntdOverrides;
@@ -0,0 +1,4 @@
1
+ export declare const BLUE_GRAY_HEX = "#717D94";
2
+ export declare const CHARCOAL_GRAY = "#232323";
3
+ export declare const PRIMARY_COLOR = "#FF5833";
4
+ export declare const SECONDARY_SUCCESS_COLOR = "#00B76A";
@@ -0,0 +1 @@
1
+ export declare const formatNumber: (num: number, decimals?: number) => string | number;