@bunnyapp/components 1.0.66 → 1.0.68-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.
- package/dist/cjs/index.js +452 -297
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +1 -3
- package/dist/cjs/src/components/Checkout/checkoutUtils.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +2 -1
- package/dist/cjs/src/components/PaymentForm/Stripe/StripeForm.d.ts +1 -1
- package/dist/cjs/src/components/Quote/AcceptQuoteModal.d.ts +1 -1
- package/dist/cjs/src/components/Signup/CheckoutSummary.d.ts +11 -0
- package/dist/cjs/src/components/Signup/PaymentForms.d.ts +6 -0
- package/dist/cjs/src/components/Signup/Signup.d.ts +1 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanManager.d.ts +0 -4
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardDescription.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/SubscriptionsContext.d.ts +2 -1
- package/dist/cjs/src/contexts/PaymentContext.d.ts +1 -1
- package/dist/cjs/src/graphql/mutations/accountSignup.d.ts +1 -2
- package/dist/cjs/src/graphql/mutations/quoteAccountSignup.d.ts +3 -2
- package/dist/cjs/src/graphql/mutations/quoteChangeAddCoupon.d.ts +8 -0
- package/dist/cjs/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +8 -0
- package/dist/cjs/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -2
- package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +24 -3
- package/dist/esm/index.js +455 -281
- package/dist/esm/src/components/Checkout/Checkout.d.ts +1 -3
- package/dist/esm/src/components/Checkout/checkoutUtils.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +2 -1
- package/dist/esm/src/components/PaymentForm/Stripe/StripeForm.d.ts +1 -1
- package/dist/esm/src/components/Quote/AcceptQuoteModal.d.ts +1 -1
- package/dist/esm/src/components/Signup/CheckoutSummary.d.ts +11 -0
- package/dist/esm/src/components/Signup/PaymentForms.d.ts +6 -0
- package/dist/esm/src/components/Signup/Signup.d.ts +1 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanManager.d.ts +0 -4
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCardDescription.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/SubscriptionsContext.d.ts +2 -1
- package/dist/esm/src/contexts/PaymentContext.d.ts +1 -1
- package/dist/esm/src/graphql/mutations/accountSignup.d.ts +1 -2
- package/dist/esm/src/graphql/mutations/quoteAccountSignup.d.ts +3 -2
- package/dist/esm/src/graphql/mutations/quoteChangeAddCoupon.d.ts +8 -0
- package/dist/esm/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +8 -0
- package/dist/esm/src/hooks/quotes/useSendAcceptQuote.d.ts +1 -2
- package/dist/esm/src/hooks/usePaymentPlugins.d.ts +24 -3
- package/dist/index.d.ts +3 -4
- package/package.json +4 -5
- package/dist/cjs/src/graphql/mutations/quoteAddCoupon.d.ts +0 -8
- package/dist/esm/src/graphql/mutations/quoteAddCoupon.d.ts +0 -8
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PaymentMethod } from '@bunnyapp/common';
|
|
2
2
|
import { CheckoutProps } from '../PaymentForm/PaymentFormTypes';
|
|
3
3
|
interface CheckoutComponentProps extends CheckoutProps {
|
|
4
|
-
isMobile: boolean;
|
|
5
|
-
token?: string;
|
|
6
4
|
storedPaymentMethod?: PaymentMethod;
|
|
7
5
|
}
|
|
8
|
-
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, selectedPriceList,
|
|
6
|
+
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, selectedPriceList, }: CheckoutComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
7
|
export default Checkout;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Quote } from
|
|
1
|
+
import { Quote } from '@bunnyapp/common';
|
|
2
2
|
export declare const getQuoteAmountDue: (quote: Quote) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
|
|
2
|
-
export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
|
|
2
|
+
export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, entityId, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
|
|
3
3
|
invoice?: FormattedInvoice | undefined;
|
|
4
4
|
quote?: Quote | undefined;
|
|
5
5
|
onFail: (error: any) => void;
|
|
@@ -9,6 +9,7 @@ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymen
|
|
|
9
9
|
onRemovePaymentMethod?: (() => void) | undefined;
|
|
10
10
|
onSetDefaultPaymentMethod?: (() => void) | undefined;
|
|
11
11
|
accountId?: string | undefined;
|
|
12
|
+
entityId?: string | undefined;
|
|
12
13
|
overrideToken?: string | undefined;
|
|
13
14
|
customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
|
|
14
15
|
currencyId?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormattedQuote } from
|
|
1
|
+
import { FormattedQuote } from '@bunnyapp/common';
|
|
2
2
|
declare const AcceptQuoteModal: ({ acceptBoxVisible, formattedQuote, sendAccept, setAcceptBoxVisible, setIsAccepting, isSendAcceptPending, }: {
|
|
3
3
|
acceptBoxVisible: boolean;
|
|
4
4
|
formattedQuote: FormattedQuote;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../../styles/index.less';
|
|
2
|
+
import { PriceList, Quote } from '@bunnyapp/common';
|
|
3
|
+
export default function CheckoutSummary({ quote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceListData, isAddingCoupon, }: {
|
|
4
|
+
quote: Quote;
|
|
5
|
+
className?: string;
|
|
6
|
+
onAddCoupon: (couponCode: string) => void;
|
|
7
|
+
onRemoveCoupon: (couponCode: string) => void;
|
|
8
|
+
isRemovingCoupon: boolean;
|
|
9
|
+
priceListData?: PriceList;
|
|
10
|
+
isAddingCoupon: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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, }: {
|
|
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,6 +16,4 @@ 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 entity ID to use for the signup */
|
|
20
|
-
entityId: string;
|
|
21
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PriceList, Quote,
|
|
1
|
+
import { PriceList, Quote, Subscription } from '@bunnyapp/common';
|
|
2
|
+
import { QuotePreviewData } from '../PlanPicker';
|
|
2
3
|
declare const CheckoutBarSummarySection: ({ open, quote, selectedPriceList, onClickCheckout, upgradingSubscription, quotePreviewData, }: {
|
|
3
4
|
open: boolean;
|
|
4
5
|
quote?: Quote | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditingQuoteDataType } from '
|
|
1
|
+
import { EditingQuoteDataType } from '../../../Subscriptions';
|
|
2
2
|
declare const PlanPickerCheckoutBarWrapper: ({ editingQuote, setEditingQuoteData, handlePortalErrors, onCheckoutSuccess, }: {
|
|
3
3
|
editingQuote?: EditingQuoteDataType | undefined;
|
|
4
4
|
setEditingQuoteData?: ((quoteId?: string, isTrial?: boolean) => void) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Feature, PriceList, Subscription } from
|
|
1
|
+
import { Feature, PriceList, Subscription } from '@bunnyapp/common';
|
|
2
2
|
declare const PriceListCardMobile: ({ description, disableOnClick, feature, isPriceListCurrentSubscription, isSelected, onClick, priceList, subscriptionPlan, trialRemainingDays, }: {
|
|
3
3
|
description: string;
|
|
4
4
|
disableOnClick: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Subscription } from '@bunnyapp/common';
|
|
3
|
+
import { QuotePreviewData } from './PlanManager/PlanPicker/PlanPicker';
|
|
3
4
|
export type SubscriptionsContextValues = {
|
|
4
5
|
gap?: number;
|
|
5
6
|
shadow?: 'none' | 'sm' | 'md' | 'lg';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode,
|
|
1
|
+
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
|
|
2
2
|
token: string;
|
|
3
3
|
apiHost: string;
|
|
4
4
|
accountId: string;
|
|
@@ -7,6 +7,5 @@ declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken
|
|
|
7
7
|
paymentMethodId?: string | undefined;
|
|
8
8
|
pluginId: string;
|
|
9
9
|
priceListCode: string;
|
|
10
|
-
entityId: string;
|
|
11
10
|
}) => Promise<any>;
|
|
12
11
|
export default accountSignup;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import BillingDetails from '../../types/billingDetails';
|
|
1
2
|
type BillingContact = {
|
|
2
3
|
firstName: string;
|
|
3
4
|
lastName: string;
|
|
4
5
|
email: string;
|
|
5
6
|
};
|
|
6
|
-
declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact,
|
|
7
|
+
declare const quoteAccountSignup: ({ token, apiHost, priceListCode, accountName, billingContact, billingDetails, }: {
|
|
7
8
|
token?: string | undefined;
|
|
8
9
|
apiHost: string;
|
|
9
10
|
priceListCode: string;
|
|
10
11
|
accountName: string;
|
|
11
12
|
billingContact: BillingContact;
|
|
12
|
-
|
|
13
|
+
billingDetails?: BillingDetails | undefined;
|
|
13
14
|
}) => Promise<any>;
|
|
14
15
|
export default quoteAccountSignup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Quote } from '@bunnyapp/common';
|
|
2
|
+
declare const quoteChangeAddCoupon: ({ quoteChangeId, couponCode, token, apiHost, }: {
|
|
3
|
+
quoteChangeId: string;
|
|
4
|
+
couponCode: string;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
apiHost: string;
|
|
7
|
+
}) => Promise<Quote>;
|
|
8
|
+
export default quoteChangeAddCoupon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Quote } from '@bunnyapp/common';
|
|
2
|
+
declare const quoteChangeRemoveCoupon: ({ quoteChangeId, couponCode, token, apiHost, }: {
|
|
3
|
+
quoteChangeId: string;
|
|
4
|
+
couponCode: string;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
apiHost: string;
|
|
7
|
+
}) => Promise<Quote>;
|
|
8
|
+
export default quoteChangeRemoveCoupon;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const useSendAcceptQuote: ({
|
|
3
|
-
onTokenExpired?: (() => void) | undefined;
|
|
2
|
+
declare const useSendAcceptQuote: ({ quoteId, apiHost, token, }: {
|
|
4
3
|
quoteId?: string | undefined;
|
|
5
4
|
apiHost: string;
|
|
6
5
|
token?: string | undefined;
|
|
@@ -1,9 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type PaymentPlugin = {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
entities: string[];
|
|
4
|
+
guid: string;
|
|
5
|
+
hidden: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
status: string;
|
|
9
|
+
type: string;
|
|
10
|
+
webhookEnabled: boolean;
|
|
11
|
+
components: {
|
|
12
|
+
frontend: {
|
|
13
|
+
name: string;
|
|
14
|
+
scenarios: string[];
|
|
15
|
+
}[];
|
|
16
|
+
backend: {
|
|
17
|
+
name: string;
|
|
18
|
+
access: string[];
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const usePaymentPlugins: ({ apiHost, token, selectedEntityId, }: {
|
|
3
23
|
apiHost: string;
|
|
4
24
|
token?: string | undefined;
|
|
25
|
+
selectedEntityId?: string | null | undefined;
|
|
5
26
|
}) => {
|
|
6
|
-
paymentPlugins:
|
|
27
|
+
paymentPlugins: PaymentPlugin[];
|
|
7
28
|
isFetched: boolean;
|
|
8
29
|
};
|
|
9
30
|
export default usePaymentPlugins;
|
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
|
|
|
71
71
|
noQuotesMessage?: string;
|
|
72
72
|
}): react_jsx_runtime.JSX.Element;
|
|
73
73
|
|
|
74
|
-
declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
|
|
74
|
+
declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, entityId, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
|
|
75
75
|
invoice?: FormattedInvoice | undefined;
|
|
76
76
|
quote?: Quote$1 | undefined;
|
|
77
77
|
onFail: (error: any) => void;
|
|
@@ -81,6 +81,7 @@ declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSu
|
|
|
81
81
|
onRemovePaymentMethod?: (() => void) | undefined;
|
|
82
82
|
onSetDefaultPaymentMethod?: (() => void) | undefined;
|
|
83
83
|
accountId?: string | undefined;
|
|
84
|
+
entityId?: string | undefined;
|
|
84
85
|
overrideToken?: string | undefined;
|
|
85
86
|
customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
|
|
86
87
|
currencyId?: string | undefined;
|
|
@@ -90,7 +91,7 @@ declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSu
|
|
|
90
91
|
} | undefined;
|
|
91
92
|
}) => react_jsx_runtime.JSX.Element;
|
|
92
93
|
|
|
93
|
-
declare function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style,
|
|
94
|
+
declare function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style, }: {
|
|
94
95
|
/** The company name to display on the signup page */
|
|
95
96
|
companyName: string;
|
|
96
97
|
/** The price list code to use for the signup */
|
|
@@ -105,8 +106,6 @@ declare function Signup({ companyName, priceListCode, returnUrl, couponCode, cla
|
|
|
105
106
|
shadow?: ShadowType;
|
|
106
107
|
/** A custom style to apply to the component */
|
|
107
108
|
style?: React.CSSProperties;
|
|
108
|
-
/** The entity ID to use for the signup */
|
|
109
|
-
entityId: string;
|
|
110
109
|
}): react_jsx_runtime.JSX.Element;
|
|
111
110
|
|
|
112
111
|
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, configProviderProps, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunnyapp/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.68-beta.10",
|
|
4
4
|
"description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"@storybook/test": "^8.4.7",
|
|
38
38
|
"@tanstack/eslint-plugin-query": "^5.60.1",
|
|
39
39
|
"@tanstack/react-query-devtools": "^5.65.1",
|
|
40
|
-
"@types/hellosign-embedded": "^2.0.6",
|
|
41
40
|
"@types/lodash": "^4.17.13",
|
|
42
41
|
"@types/lodash-es": "^4.17.12",
|
|
43
42
|
"@types/pluralize": "^0.0.33",
|
|
@@ -65,7 +64,7 @@
|
|
|
65
64
|
},
|
|
66
65
|
"peerDependencies": {
|
|
67
66
|
"@ant-design/icons": "^5.6.1",
|
|
68
|
-
"@bunnyapp/common": "^1.0.
|
|
67
|
+
"@bunnyapp/common": "^1.0.66-beta.8",
|
|
69
68
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
70
69
|
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
|
71
70
|
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
@@ -76,7 +75,6 @@
|
|
|
76
75
|
"@tanstack/react-query": "^5.59.20",
|
|
77
76
|
"antd": "^5.23.2",
|
|
78
77
|
"graphql-request": "^6.1.0",
|
|
79
|
-
"hellosign-embedded": "^2.12.2",
|
|
80
78
|
"interweave": "^13.1.0",
|
|
81
79
|
"less": "^4.2.0",
|
|
82
80
|
"lodash-es": "^4.17.21",
|
|
@@ -93,7 +91,8 @@
|
|
|
93
91
|
]
|
|
94
92
|
},
|
|
95
93
|
"dependencies": {
|
|
96
|
-
"
|
|
94
|
+
"@bunnyapp/common": "^1.0.66-beta.8",
|
|
95
|
+
"@pdf-viewer/react": "^1.7.2",
|
|
97
96
|
"msw-storybook-addon": "^2.0.4"
|
|
98
97
|
}
|
|
99
98
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Quote } from '@bunnyapp/common';
|
|
2
|
-
declare const quoteAddCoupon: ({ quoteId, couponCode, token, apiHost, }: {
|
|
3
|
-
quoteId?: string | undefined;
|
|
4
|
-
couponCode?: string | undefined;
|
|
5
|
-
token?: string | undefined;
|
|
6
|
-
apiHost: string;
|
|
7
|
-
}) => Promise<Quote>;
|
|
8
|
-
export default quoteAddCoupon;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Quote } from '@bunnyapp/common';
|
|
2
|
-
declare const quoteAddCoupon: ({ quoteId, couponCode, token, apiHost, }: {
|
|
3
|
-
quoteId?: string | undefined;
|
|
4
|
-
couponCode?: string | undefined;
|
|
5
|
-
token?: string | undefined;
|
|
6
|
-
apiHost: string;
|
|
7
|
-
}) => Promise<Quote>;
|
|
8
|
-
export default quoteAddCoupon;
|