@bunnyapp/components 1.0.56 → 1.0.58-beta.0.1
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 +2231 -2140
- package/dist/cjs/playground/main.d.ts +1 -1
- package/dist/cjs/src/components/BillingDetails/BillingDetails.d.ts +2 -2
- package/dist/cjs/src/components/BunnyProvider.d.ts +3 -3
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +1 -2
- package/dist/cjs/src/components/PaymentForm/CheckoutFooter.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/CreditCard.d.ts +11 -6
- package/dist/cjs/src/components/PaymentForm/DemoPay/CreditCard/index.d.ts +1 -0
- package/dist/cjs/src/components/PaymentForm/DemoPay/DemoPayForm.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +4 -3
- package/dist/cjs/src/components/PaymentForm/DemoPay/index.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +3 -7
- package/dist/cjs/src/components/PaymentForm/PaymentMethodDetails.d.ts +4 -6
- package/dist/cjs/src/components/PaymentForm/Stripe/PaymentMethodForm.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/Stripe/hooks/useSave.d.ts +4 -3
- package/dist/cjs/src/components/PaymentForm/hooks/useAutoSetDefaultPaymentMethod.d.ts +9 -0
- package/dist/cjs/src/components/PaymentForm/hooks/useHasActiveSubscription.d.ts +5 -0
- package/dist/cjs/src/components/PaymentForm/hooks/usePaymentMethodSelectorPlugin.d.ts +11 -0
- package/dist/cjs/src/components/PaymentForm/index.d.ts +1 -2
- package/dist/cjs/src/components/PaymentForm/useRemovePaymentMethod.d.ts +2 -2
- package/dist/cjs/src/components/PaymentForm/useSetDefaultPaymentMethod.d.ts +6 -0
- package/dist/cjs/src/components/Quote/Quote.d.ts +1 -1
- package/dist/cjs/src/components/Quote/Quote.stories.d.ts +10 -10
- package/dist/cjs/src/components/Quote/StyledModal.d.ts +1 -1
- package/dist/cjs/src/components/Signup/PaymentForms.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanManager.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/NextPriceListButton.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +1 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +4 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/HideExpiredToggle.d.ts +1 -2
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +1 -1
- package/dist/cjs/src/components/icons/Cashapp.d.ts +4 -0
- package/dist/cjs/src/components/icons/Link.d.ts +4 -0
- package/dist/cjs/src/components/index.d.ts +11 -10
- package/dist/cjs/src/contexts/PaymentContext.d.ts +2 -1
- package/dist/cjs/src/graphql/QuoteRequests.d.ts +1 -0
- package/dist/cjs/src/graphql/mutations/quoteChargeCreate.d.ts +1 -2
- package/dist/cjs/src/graphql/mutations/quoteChargeUpdate.d.ts +12 -0
- package/dist/cjs/src/hooks/usePaymentMethod.d.ts +5 -4
- package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +3 -3
- package/dist/esm/index.js +2236 -2145
- package/dist/esm/playground/main.d.ts +1 -1
- package/dist/esm/src/components/BillingDetails/BillingDetails.d.ts +2 -2
- package/dist/esm/src/components/BunnyProvider.d.ts +3 -3
- package/dist/esm/src/components/Checkout/Checkout.d.ts +1 -2
- package/dist/esm/src/components/PaymentForm/CheckoutFooter.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/CreditCard.d.ts +11 -6
- package/dist/esm/src/components/PaymentForm/DemoPay/CreditCard/index.d.ts +1 -0
- package/dist/esm/src/components/PaymentForm/DemoPay/DemoPayForm.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +4 -3
- package/dist/esm/src/components/PaymentForm/DemoPay/index.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +3 -7
- package/dist/esm/src/components/PaymentForm/PaymentMethodDetails.d.ts +4 -6
- package/dist/esm/src/components/PaymentForm/Stripe/PaymentMethodForm.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/Stripe/hooks/useSave.d.ts +4 -3
- package/dist/esm/src/components/PaymentForm/hooks/useAutoSetDefaultPaymentMethod.d.ts +9 -0
- package/dist/esm/src/components/PaymentForm/hooks/useHasActiveSubscription.d.ts +5 -0
- package/dist/esm/src/components/PaymentForm/hooks/usePaymentMethodSelectorPlugin.d.ts +11 -0
- package/dist/esm/src/components/PaymentForm/index.d.ts +1 -2
- package/dist/esm/src/components/PaymentForm/useRemovePaymentMethod.d.ts +2 -2
- package/dist/esm/src/components/PaymentForm/useSetDefaultPaymentMethod.d.ts +6 -0
- package/dist/esm/src/components/Quote/Quote.d.ts +1 -1
- package/dist/esm/src/components/Quote/Quote.stories.d.ts +10 -10
- package/dist/esm/src/components/Quote/StyledModal.d.ts +1 -1
- package/dist/esm/src/components/Signup/PaymentForms.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanManager.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/NextPriceListButton.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/EverythingPlanFeatures.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +1 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerUtils.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/Subscriptions.d.ts +4 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/HideExpiredToggle.d.ts +1 -2
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +1 -1
- package/dist/esm/src/components/icons/Cashapp.d.ts +4 -0
- package/dist/esm/src/components/icons/Link.d.ts +4 -0
- package/dist/esm/src/components/index.d.ts +11 -10
- package/dist/esm/src/contexts/PaymentContext.d.ts +2 -1
- package/dist/esm/src/graphql/QuoteRequests.d.ts +1 -0
- package/dist/esm/src/graphql/mutations/quoteChargeCreate.d.ts +1 -2
- package/dist/esm/src/graphql/mutations/quoteChargeUpdate.d.ts +12 -0
- package/dist/esm/src/hooks/usePaymentMethod.d.ts +5 -4
- package/dist/esm/src/hooks/usePaymentPlugins.d.ts +3 -3
- package/dist/index.d.ts +20 -18
- package/package.json +3 -2
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/PaymentMethod.d.ts +0 -8
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/PaymentMethod.stories.d.ts +0 -11
- package/dist/cjs/src/components/PaymentForm/PaymentMethod/index.d.ts +0 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/consts.d.ts +0 -1
- package/dist/cjs/src/graphql/queries/getPortalPreviewQuery.d.ts +0 -2
- package/dist/esm/src/components/PaymentForm/PaymentMethod/PaymentMethod.d.ts +0 -8
- package/dist/esm/src/components/PaymentForm/PaymentMethod/PaymentMethod.stories.d.ts +0 -11
- package/dist/esm/src/components/PaymentForm/PaymentMethod/index.d.ts +0 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/consts.d.ts +0 -1
- package/dist/esm/src/graphql/queries/getPortalPreviewQuery.d.ts +0 -2
- /package/dist/cjs/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/LargCardIcon.d.ts +0 -0
- /package/dist/cjs/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/PlusIcon.d.ts +0 -0
- /package/dist/esm/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/LargCardIcon.d.ts +0 -0
- /package/dist/esm/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/PlusIcon.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '../src/styles/output.less';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ShadowType } from
|
|
1
|
+
import '../../styles/index.less';
|
|
2
|
+
import { ShadowType } from '../../types/shadowType';
|
|
3
3
|
declare const BillingDetails: ({ isCardEnabled, shadow, className, hidePaymentMethodForm, hideBillingDetailsForm, countryListFilter, }: {
|
|
4
4
|
isCardEnabled?: boolean | undefined;
|
|
5
5
|
shadow?: ShadowType | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { QueryClient } from
|
|
3
|
-
import { ThemeConfig } from
|
|
4
|
-
import { GraphQLClient } from
|
|
2
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { ThemeConfig } from 'antd';
|
|
4
|
+
import { GraphQLClient } from 'graphql-request';
|
|
5
5
|
export type BunnyContextValues = {
|
|
6
6
|
apiHost: string;
|
|
7
7
|
graphQLClient: GraphQLClient;
|
|
@@ -4,7 +4,6 @@ interface CheckoutComponentProps extends CheckoutProps {
|
|
|
4
4
|
isMobile: boolean;
|
|
5
5
|
token?: string;
|
|
6
6
|
storedPaymentMethod?: PaymentMethod;
|
|
7
|
-
quantity?: number;
|
|
8
7
|
}
|
|
9
|
-
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, selectedPriceList, token,
|
|
8
|
+
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, selectedPriceList, token, }: CheckoutComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
9
|
export default Checkout;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormattedInvoice, PluginData, Quote } from
|
|
1
|
+
import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
|
|
2
2
|
declare const CheckoutFooter: ({ quote, invoice, onPaymentSuccess, noPadding, plugin, }: {
|
|
3
3
|
quote?: Quote | undefined;
|
|
4
4
|
invoice?: FormattedInvoice | undefined;
|
package/dist/cjs/src/components/PaymentForm/{PaymentMethod → DemoPay}/CreditCard/CreditCard.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PaymentMethod } from
|
|
2
|
-
import { ShadowType } from
|
|
1
|
+
import { PaymentMethod } from '@bunnyapp/common';
|
|
2
|
+
import { ShadowType } from '../../../../types/shadowType';
|
|
3
3
|
type CreditCardProps = {
|
|
4
4
|
onClickRemove: () => void;
|
|
5
5
|
onClickUpdate: () => void;
|
|
@@ -8,10 +8,15 @@ type CreditCardProps = {
|
|
|
8
8
|
cardEnabled?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const CreditCard: ({ onClickRemove, onClickUpdate, paymentMethodData, shadow, cardEnabled, }: CreditCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare const MiniCreditCard: ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export declare const MiniCreditCard: ({ className, buttons, hideDropdownMenu, hideDefaultTag, onClickRemove, paymentMethodData, onClickSetDefault, id, }: {
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
buttons?: React.ReactNode;
|
|
14
|
+
hideDropdownMenu?: boolean | undefined;
|
|
15
|
+
hideDefaultTag?: boolean | undefined;
|
|
16
|
+
onClickRemove?: (() => void) | undefined;
|
|
17
|
+
paymentMethodData?: PaymentMethod | undefined;
|
|
18
|
+
onClickSetDefault?: (() => void) | undefined;
|
|
19
|
+
id?: string | undefined;
|
|
15
20
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
21
|
declare const EmptyCard: ({ onClick, shadow, cardEnabled, }: {
|
|
17
22
|
onClick: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MiniCreditCard } from './CreditCard';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FormattedInvoice, PluginData, Quote } from
|
|
2
|
-
export declare function useSave({ onSaveSuccess, token, apiHost, accountId, }: {
|
|
3
|
-
onSaveSuccess
|
|
1
|
+
import { FormattedInvoice, PluginData, Quote } from '@bunnyapp/common';
|
|
2
|
+
export declare function useSave({ onSaveSuccess, onSaveError, token, apiHost, accountId, }: {
|
|
3
|
+
onSaveSuccess?: (response: any) => void;
|
|
4
|
+
onSaveError?: (error: any) => void;
|
|
4
5
|
quote?: Quote;
|
|
5
6
|
invoice?: FormattedInvoice;
|
|
6
7
|
token?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { MiniCreditCard } from './CreditCard';
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { GraphQLClient } from "graphql-request";
|
|
4
|
-
export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, overrideToken, graphQLClient, customCheckoutFunction, currencyId: currencyIdFromProps, customPaymentForms, useAllPaymentPlugins, }: {
|
|
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, }: {
|
|
5
3
|
invoice?: FormattedInvoice | undefined;
|
|
6
4
|
quote?: Quote | undefined;
|
|
7
5
|
onFail: (error: any) => void;
|
|
8
6
|
onPaymentSuccess?: (() => void) | undefined;
|
|
9
7
|
onSavePaymentMethod?: (() => void) | undefined;
|
|
10
8
|
onRemovePaymentMethod?: (() => void) | undefined;
|
|
9
|
+
onSetDefaultPaymentMethod?: (() => void) | undefined;
|
|
11
10
|
accountId?: string | undefined;
|
|
12
11
|
overrideToken?: string | undefined;
|
|
13
|
-
graphQLClient: GraphQLClient;
|
|
14
12
|
customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
|
|
15
13
|
currencyId?: string | undefined;
|
|
16
|
-
customPaymentForms?: Record<string, import("react").ReactNode> | undefined;
|
|
17
|
-
useAllPaymentPlugins?: boolean | undefined;
|
|
18
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const PaymentMethodDetails: ({ onFail, paymentMethod, onSavePaymentMethod, customPaymentForms, }: {
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
|
+
declare const PaymentMethodDetails: ({ onFail, plugin, onSavePaymentMethod, }: {
|
|
4
3
|
onFail: (error: any) => void;
|
|
5
|
-
|
|
4
|
+
plugin: PluginData;
|
|
6
5
|
onSavePaymentMethod: () => void;
|
|
7
|
-
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
7
|
export default PaymentMethodDetails;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PluginData } from
|
|
2
|
-
export declare function useSave({ onSaveSuccess, }: {
|
|
3
|
-
onSaveSuccess
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
|
+
export declare function useSave({ onSaveSuccess, onSaveError, }: {
|
|
3
|
+
onSaveSuccess?: (response: any) => void;
|
|
4
|
+
onSaveError?: (error: any) => void;
|
|
4
5
|
}): {
|
|
5
6
|
save: ({ plugin }: {
|
|
6
7
|
plugin: PluginData;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaymentMethod } from '@bunnyapp/common';
|
|
2
|
+
declare const useAutoSetDefaultPaymentMethod: ({ accountId, token, handleSetDefault, setDefaultPaymentMethodLoading, enabled, }: {
|
|
3
|
+
accountId: string | undefined;
|
|
4
|
+
token?: string | undefined;
|
|
5
|
+
handleSetDefault: (paymentMethod: PaymentMethod) => void;
|
|
6
|
+
setDefaultPaymentMethodLoading: boolean;
|
|
7
|
+
enabled?: boolean | undefined;
|
|
8
|
+
}) => void;
|
|
9
|
+
export default useAutoSetDefaultPaymentMethod;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PaymentMethod, PluginData } from "@bunnyapp/common";
|
|
3
|
+
declare const usePaymentMethodSelectorPlugin: ({ defaultPaymentMethod, defaultPaymentMethodPlugin, paymentMethodAllowedPlugins, }: {
|
|
4
|
+
defaultPaymentMethod: PaymentMethod | undefined;
|
|
5
|
+
defaultPaymentMethodPlugin: PluginData | undefined;
|
|
6
|
+
paymentMethodAllowedPlugins: PluginData[] | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
selectorPaymentMethodPlugin: PluginData | undefined;
|
|
9
|
+
setSelectorPaymentMethodPlugin: import("react").Dispatch<import("react").SetStateAction<PluginData | undefined>>;
|
|
10
|
+
};
|
|
11
|
+
export default usePaymentMethodSelectorPlugin;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { PaymentForm } from "./PaymentForm";
|
|
1
|
+
export { PaymentForm } from './PaymentForm';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PluginData } from
|
|
2
|
-
declare function useRemovePaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onRemovePaymentMethod?: () => void): (data: any) => Promise<void>;
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
|
+
declare function useRemovePaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onRemovePaymentMethod?: () => void, onError?: (message: string) => void): (data: any) => Promise<void>;
|
|
3
3
|
export default useRemovePaymentMethod;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
|
+
declare function useSetDefaultPaymentMethod(paymentPlugins: PluginData[], apiHost: string, token?: string, accountId?: string, onError?: (message: string) => void, onSuccess?: () => void): {
|
|
3
|
+
setDefaultPaymentMethod: (data: any) => Promise<void>;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default useSetDefaultPaymentMethod;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InvoiceQuoteContextProps } from
|
|
1
|
+
import { InvoiceQuoteContextProps } from '../Invoice/InvoiceQuoteContext';
|
|
2
2
|
export declare const MarkupContainer: any;
|
|
3
3
|
export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, }: InvoiceQuoteContextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,12 +18,12 @@ export declare const Default: import("@storybook/core/csf").StoryAnnotations<imp
|
|
|
18
18
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
className?: string | undefined;
|
|
21
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
22
21
|
id?: string | undefined;
|
|
23
|
-
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
24
22
|
backButtonName?: string | undefined;
|
|
25
23
|
onBackButtonClick?: (() => void) | undefined;
|
|
24
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
26
25
|
hideDownloadButton?: boolean | undefined;
|
|
26
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
27
27
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
28
28
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
29
29
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
@@ -43,12 +43,12 @@ export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<im
|
|
|
43
43
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
44
44
|
}, {
|
|
45
45
|
className?: string | undefined;
|
|
46
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
47
46
|
id?: string | undefined;
|
|
48
|
-
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
49
47
|
backButtonName?: string | undefined;
|
|
50
48
|
onBackButtonClick?: (() => void) | undefined;
|
|
49
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
51
50
|
hideDownloadButton?: boolean | undefined;
|
|
51
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
52
52
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
53
53
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
54
54
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
@@ -68,12 +68,12 @@ export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<impo
|
|
|
68
68
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
69
69
|
}, {
|
|
70
70
|
className?: string | undefined;
|
|
71
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
72
71
|
id?: string | undefined;
|
|
73
|
-
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
74
72
|
backButtonName?: string | undefined;
|
|
75
73
|
onBackButtonClick?: (() => void) | undefined;
|
|
74
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
76
75
|
hideDownloadButton?: boolean | undefined;
|
|
76
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
77
77
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
78
78
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
79
79
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
@@ -93,12 +93,12 @@ export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotat
|
|
|
93
93
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
94
94
|
}, {
|
|
95
95
|
className?: string | undefined;
|
|
96
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
97
96
|
id?: string | undefined;
|
|
98
|
-
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
99
97
|
backButtonName?: string | undefined;
|
|
100
98
|
onBackButtonClick?: (() => void) | undefined;
|
|
99
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
101
100
|
hideDownloadButton?: boolean | undefined;
|
|
101
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
102
102
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
103
103
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
104
104
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
@@ -121,12 +121,12 @@ export declare const DarkMode: import("@storybook/core/csf").StoryAnnotations<im
|
|
|
121
121
|
onQuoteLoaded?: ((formattedQuote: import("@bunnyapp/common").FormattedQuote) => void) | undefined;
|
|
122
122
|
}, {
|
|
123
123
|
className?: string | undefined;
|
|
124
|
-
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
125
124
|
id?: string | undefined;
|
|
126
|
-
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
127
125
|
backButtonName?: string | undefined;
|
|
128
126
|
onBackButtonClick?: (() => void) | undefined;
|
|
127
|
+
shadow?: import("../../types/shadowType").ShadowType | undefined;
|
|
129
128
|
hideDownloadButton?: boolean | undefined;
|
|
129
|
+
onPaymentSuccess?: ((savePaymentMethod?: boolean | undefined) => void) | undefined;
|
|
130
130
|
invoiceQuoteViewComponent?: import("react").ReactNode;
|
|
131
131
|
onInvoiceDownloadError?: (() => void) | undefined;
|
|
132
132
|
onInvoiceLoaded?: ((formattedInvoice: import("@bunnyapp/common").FormattedInvoice) => void) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginData, Quote } from
|
|
1
|
+
import { PluginData, Quote } from '@bunnyapp/common';
|
|
2
2
|
export default function PaymentForms({ quote, handlePaymentSuccess, handlePaymentFail, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, }: {
|
|
3
3
|
quote?: Quote;
|
|
4
4
|
handlePaymentSuccess: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const PlanManager: ({ onChangePlanCancel, handlePortalErrors, }: {
|
|
2
2
|
onChangePlanCancel: () => void;
|
|
3
|
-
handlePortalErrors
|
|
3
|
+
handlePortalErrors?: ((error: any) => void) | undefined;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default PlanManager;
|
package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/NextPriceListButton.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
import { PriceList } from "@bunnyapp/common";
|
|
3
|
-
declare const NextPriceListButton: ({ availablePriceLists, priceListStart, setPriceListStart, }: {
|
|
3
|
+
declare const NextPriceListButton: ({ availablePriceLists, priceListStart, setPriceListStart, numberOfPlansToDisplay, }: {
|
|
4
4
|
availablePriceLists: PriceList[];
|
|
5
|
+
numberOfPlansToDisplay: number;
|
|
5
6
|
priceListStart: number;
|
|
6
7
|
setPriceListStart: Dispatch<SetStateAction<number>>;
|
|
7
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PriceList, PriceListCharge } from "@bunnyapp/common";
|
|
2
|
-
declare const CheckoutBarInput: ({ charge, quantity, selectedPriceList,
|
|
2
|
+
declare const CheckoutBarInput: ({ disabled, charge, quantity, selectedPriceList, onQuantityChanged, }: {
|
|
3
|
+
disabled?: boolean | undefined;
|
|
3
4
|
charge: PriceListCharge;
|
|
4
5
|
quantity: number;
|
|
5
6
|
selectedPriceList?: PriceList | undefined;
|
|
6
|
-
|
|
7
|
+
onQuantityChanged: (quantity: number) => void;
|
|
7
8
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
export default CheckoutBarInput;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { PriceList, Quote, QuotePreviewData, Subscription } from
|
|
2
|
-
declare const CheckoutBarSummarySection: ({ open,
|
|
1
|
+
import { PriceList, Quote, QuotePreviewData, Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const CheckoutBarSummarySection: ({ open, quote, selectedPriceList, onClickCheckout, upgradingSubscription, quotePreviewData, }: {
|
|
3
3
|
open: boolean;
|
|
4
|
-
quantityLocal: number;
|
|
5
4
|
quote?: Quote | undefined;
|
|
6
5
|
selectedPriceList: PriceList;
|
|
7
6
|
onClickCheckout: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const PlanPickerCheckoutBarWrapper: ({ handlePortalErrors, onCheckoutSuccess, }: {
|
|
2
|
-
handlePortalErrors
|
|
2
|
+
handlePortalErrors?: ((errors: any) => void) | undefined;
|
|
3
3
|
onCheckoutSuccess: () => void;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
export default PlanPickerCheckoutBarWrapper;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { PriceList, Product } from
|
|
2
|
-
declare const EverythingPlanFeatures: ({ availablePriceLists, selectedProduct, }: {
|
|
1
|
+
import { PriceList, Product } from '@bunnyapp/common';
|
|
2
|
+
declare const EverythingPlanFeatures: ({ availablePriceLists, selectedProduct, plansToDisplay, }: {
|
|
3
3
|
availablePriceLists: PriceList[];
|
|
4
|
+
plansToDisplay: number;
|
|
4
5
|
selectedProduct?: Product | undefined;
|
|
5
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default EverythingPlanFeatures;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Plan, Product } from
|
|
2
|
-
declare const PlanFeatures: ({ availablePlansArray, selectedProduct, }: {
|
|
1
|
+
import { Plan, Product } from '@bunnyapp/common';
|
|
2
|
+
declare const PlanFeatures: ({ availablePlansArray, selectedProduct, plansToDisplay, }: {
|
|
3
3
|
availablePlansArray: Plan[];
|
|
4
|
+
plansToDisplay: number;
|
|
4
5
|
selectedProduct?: Product | undefined;
|
|
5
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export default PlanFeatures;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PriceList, PriceListChangeOptions, Product, Subscription } from "@bunnyapp/common";
|
|
2
2
|
import { Dispatch, SetStateAction } from "react";
|
|
3
|
-
export declare const PLANS_TO_DISPLAY = 3;
|
|
4
3
|
type PriceListGridDesktopProps = {
|
|
5
4
|
availablePriceLists: PriceList[];
|
|
6
5
|
onChangePriceList: (selectedPriceList: PriceList) => void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { PriceList, PriceListChangeOptions } from "@bunnyapp/common";
|
|
2
|
-
export declare const getAvailablePlansAndPriceLists: ({ availablePriceLists, priceListChangeOptions, priceListStart, }: {
|
|
2
|
+
export declare const getAvailablePlansAndPriceLists: ({ availablePriceLists, priceListChangeOptions, priceListStart, plansToDisplay, }: {
|
|
3
3
|
availablePriceLists: PriceList[];
|
|
4
4
|
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
5
5
|
priceListStart: number;
|
|
6
|
+
plansToDisplay: number;
|
|
6
7
|
}) => {
|
|
7
8
|
availablePlansArray: import("@bunnyapp/common").Plan[];
|
|
8
9
|
displayPriceLists: PriceList[];
|
|
9
10
|
};
|
|
10
|
-
export declare const everythingInPlusString: ({ priceList }: {
|
|
11
|
+
export declare const everythingInPlusString: ({ priceList, }: {
|
|
11
12
|
priceList: PriceList;
|
|
12
13
|
}) => string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export type EditingQuoteDataType = {
|
|
3
3
|
id: string;
|
|
4
4
|
isTrial: boolean;
|
|
5
5
|
};
|
|
6
|
-
declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, hideTitle, }: {
|
|
7
|
-
handlePortalErrors
|
|
6
|
+
declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, hideTitle, hideExpiredToggle, }: {
|
|
7
|
+
handlePortalErrors?: ((errors: any) => void) | undefined;
|
|
8
8
|
companyName: string;
|
|
9
9
|
isInPreviewMode?: boolean | undefined;
|
|
10
10
|
productId?: string | undefined;
|
|
@@ -16,5 +16,6 @@ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPrev
|
|
|
16
16
|
} | undefined;
|
|
17
17
|
noSubscriptionsComponent?: React.ReactNode;
|
|
18
18
|
hideTitle?: boolean | undefined;
|
|
19
|
+
hideExpiredToggle?: boolean | undefined;
|
|
19
20
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export default SubscriptionsWrapper;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
declare const HideExpiredToggle: ({ hideExpired, setHideExpired,
|
|
1
|
+
declare const HideExpiredToggle: ({ hideExpired, setHideExpired, }: {
|
|
2
2
|
hideExpired: boolean;
|
|
3
3
|
setHideExpired: (value: boolean) => void;
|
|
4
|
-
visible: boolean;
|
|
5
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default HideExpiredToggle;
|
package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subscription } from
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
2
|
declare const SubscriptionsNavigation: ({ expiredSwitchVisible, hideExpired, setHideExpired, setQuantityDrawerOpen, subscriptions, }: {
|
|
3
3
|
expiredSwitchVisible: boolean;
|
|
4
4
|
hideExpired: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { Invoice } from
|
|
2
|
-
export { Quote } from
|
|
3
|
-
export { Quotes } from
|
|
4
|
-
export {
|
|
5
|
-
export { Signup } from
|
|
6
|
-
export { default as BunnyProvider } from
|
|
7
|
-
export { default as Transactions } from
|
|
8
|
-
export { Subscriptions } from
|
|
9
|
-
export { BillingDetails } from
|
|
10
|
-
export { Footer } from
|
|
1
|
+
export { Invoice } from './Invoice';
|
|
2
|
+
export { Quote } from './Quote';
|
|
3
|
+
export { Quotes } from './Quotes';
|
|
4
|
+
export { PaymentForm } from './PaymentForm';
|
|
5
|
+
export { Signup } from './Signup';
|
|
6
|
+
export { default as BunnyProvider } from './BunnyProvider';
|
|
7
|
+
export { default as Transactions } from './Transactions';
|
|
8
|
+
export { Subscriptions } from './Subscriptions';
|
|
9
|
+
export { BillingDetails } from './BillingDetails';
|
|
10
|
+
export { Footer } from './Footer';
|
|
11
|
+
export { MiniCreditCard } from './PaymentForm/DemoPay/CreditCard';
|
|
@@ -4,7 +4,8 @@ export type PaymentContextValues = {
|
|
|
4
4
|
onClickCancel?: () => void;
|
|
5
5
|
accountId?: string;
|
|
6
6
|
overrideToken?: string;
|
|
7
|
-
|
|
7
|
+
storedPaymentMethods?: PaymentMethod[];
|
|
8
|
+
defaultPaymentMethod?: PaymentMethod;
|
|
8
9
|
customCheckoutFunction?: (plugin: PluginData | undefined) => Promise<any>;
|
|
9
10
|
};
|
|
10
11
|
export declare const PaymentContext: import("react").Context<PaymentContextValues>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const useQuoteSubscriptionUpgrade: () => (subscriptionId: string, priceListId: string, apiHost: string, token?: string) => Promise<unknown>;
|
|
1
2
|
export declare const useCreateSubscriptionQuote: () => (subscriptionIds: string[], apiHost: string, token?: string) => Promise<unknown>;
|
|
2
3
|
export declare const useQuoteChangeUpdate: () => (charges: {
|
|
3
4
|
id: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
type QuoteChangeCreateChargeProps = {
|
|
2
2
|
apiHost: string;
|
|
3
|
-
endDate: string;
|
|
4
3
|
price?: number;
|
|
5
4
|
priceListChargeId?: string;
|
|
6
5
|
quantity?: number;
|
|
@@ -9,5 +8,5 @@ type QuoteChangeCreateChargeProps = {
|
|
|
9
8
|
subscriptionChargeId?: string;
|
|
10
9
|
token?: string;
|
|
11
10
|
};
|
|
12
|
-
declare const quoteChargeCreate: ({
|
|
11
|
+
declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<unknown>;
|
|
13
12
|
export default quoteChargeCreate;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteChargeId, startDate, subtotal, apiHost, token, }: {
|
|
2
|
+
discount?: number | undefined;
|
|
3
|
+
name?: string | undefined;
|
|
4
|
+
price?: number | undefined;
|
|
5
|
+
quantity?: number | undefined;
|
|
6
|
+
quoteChargeId: string;
|
|
7
|
+
startDate?: string | undefined;
|
|
8
|
+
subtotal?: number | undefined;
|
|
9
|
+
apiHost: string;
|
|
10
|
+
token: string;
|
|
11
|
+
}) => Promise<unknown>;
|
|
12
|
+
export default quoteChargeUpdate;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const usePaymentMethod: ({ accountId,
|
|
1
|
+
import { PaymentMethod } from '@bunnyapp/common';
|
|
2
|
+
export declare const usePaymentMethod: ({ accountId, token, apiHost, }: {
|
|
3
3
|
accountId?: string | undefined;
|
|
4
|
-
graphQLClient: GraphQLClient;
|
|
5
4
|
token?: string | undefined;
|
|
5
|
+
apiHost: string;
|
|
6
6
|
}) => {
|
|
7
|
-
|
|
7
|
+
paymentMethods: PaymentMethod[];
|
|
8
|
+
defaultPaymentMethod: PaymentMethod | undefined;
|
|
8
9
|
isLoading: boolean;
|
|
9
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PluginData } from
|
|
2
|
-
export declare const usePaymentPlugins: ({ apiHost, token, }: {
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
|
+
export declare const usePaymentPlugins: ({ apiHost, token, accountId, }: {
|
|
3
3
|
apiHost: string;
|
|
4
4
|
token?: string | undefined;
|
|
5
|
+
accountId?: string | undefined;
|
|
5
6
|
}) => {
|
|
6
7
|
paymentPlugins: PluginData[] | undefined;
|
|
7
|
-
paymentMethodAllowedPlugins: PluginData[] | undefined;
|
|
8
8
|
isFetched: boolean;
|
|
9
9
|
};
|
|
10
10
|
export default usePaymentPlugins;
|