@bunnyapp/components 1.3.0-beta.1 → 1.3.0-beta.4
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 +521 -598
- package/dist/cjs/src/components/BillingDetails/BillingDetails.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +3 -2
- package/dist/cjs/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/SubscriptionRequests.d.ts +1 -0
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +0 -1
- package/dist/cjs/src/components/TaxationForm.d.ts +2 -2
- package/dist/cjs/src/components/UpgradeFromTrial.d.ts +6 -0
- package/dist/cjs/src/graphql/QuoteRequests.d.ts +0 -1
- package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +4 -1
- package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +4 -2
- package/dist/cjs/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -2
- package/dist/cjs/src/hooks/useCurrentUserData.d.ts +1 -10
- package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +2 -2
- package/dist/cjs/src/mocks/handlers.d.ts +1 -1
- package/dist/esm/index.js +522 -599
- package/dist/esm/src/components/BillingDetails/BillingDetails.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +3 -2
- package/dist/esm/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/SubscriptionRequests.d.ts +1 -0
- package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +0 -1
- package/dist/esm/src/components/TaxationForm.d.ts +2 -2
- package/dist/esm/src/components/UpgradeFromTrial.d.ts +6 -0
- package/dist/esm/src/graphql/QuoteRequests.d.ts +0 -1
- package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +4 -1
- package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +4 -2
- package/dist/esm/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -2
- package/dist/esm/src/hooks/useCurrentUserData.d.ts +1 -10
- package/dist/esm/src/hooks/usePaymentPlugins.d.ts +2 -2
- package/dist/esm/src/mocks/handlers.d.ts +1 -1
- package/dist/index.d.ts +4 -3
- package/package.json +1 -1
- package/dist/cjs/src/graphql/mutations/subscriptionTrialConvert.d.ts +0 -7
- package/dist/cjs/src/graphql/queries/getCurrentUserData.d.ts +0 -13
- package/dist/cjs/src/utils/couponUtils.d.ts +0 -2
- package/dist/esm/src/graphql/mutations/subscriptionTrialConvert.d.ts +0 -7
- package/dist/esm/src/graphql/queries/getCurrentUserData.d.ts +0 -13
- package/dist/esm/src/utils/couponUtils.d.ts +0 -2
- /package/dist/cjs/src/components/icons/{IDeal.d.ts → iDeal.d.ts} +0 -0
- /package/dist/esm/src/components/icons/{IDeal.d.ts → iDeal.d.ts} +0 -0
|
@@ -11,6 +11,6 @@ declare const BillingDetails: ({ className, countryListFilter, hideBillingDetail
|
|
|
11
11
|
isCardEnabled?: boolean | undefined;
|
|
12
12
|
isUpgradeFromTrial?: boolean | undefined;
|
|
13
13
|
shadow?: ShadowType | undefined;
|
|
14
|
-
onSavePaymentMethod?: ((
|
|
14
|
+
onSavePaymentMethod?: (() => void) | undefined;
|
|
15
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default BillingDetails;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginData } from
|
|
2
|
-
export declare const confirmPayment: ({ amount, currency }: {
|
|
1
|
+
import { PluginData } from "@bunnyapp/common";
|
|
2
|
+
export declare const confirmPayment: ({ amount, currency, }: {
|
|
3
3
|
amount: number;
|
|
4
4
|
currency: string;
|
|
5
5
|
}) => {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { FormattedInvoice, Invoice, PluginData, Quote } from '@bunnyapp/common';
|
|
2
|
-
export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
|
|
2
|
+
export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, entityId, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
|
|
3
3
|
invoice?: FormattedInvoice | Invoice | undefined;
|
|
4
4
|
quote?: Quote | undefined;
|
|
5
5
|
onFail: (error: any) => void;
|
|
6
6
|
onPaymentSuccess?: (() => void) | undefined;
|
|
7
7
|
onPaymentHoldSuccess?: ((response: any) => void) | undefined;
|
|
8
|
-
onSavePaymentMethod?: ((
|
|
8
|
+
onSavePaymentMethod?: (() => void) | undefined;
|
|
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;
|
|
@@ -2,6 +2,6 @@ import { PluginData } from '@bunnyapp/common';
|
|
|
2
2
|
declare const PaymentMethodDetails: ({ onFail, plugin, onSavePaymentMethod, }: {
|
|
3
3
|
onFail: (error: any) => void;
|
|
4
4
|
plugin: PluginData;
|
|
5
|
-
onSavePaymentMethod: (
|
|
5
|
+
onSavePaymentMethod: () => void;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default PaymentMethodDetails;
|
|
@@ -3,8 +3,9 @@ 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, upgradingSubscription, canPurchaseFeatureAddons, }: {
|
|
6
|
+
export declare const isPriceListDisabled: ({ priceList, subscriptions, upgradingSubscription, canPurchaseFeatureAddons, }: {
|
|
7
7
|
priceList: PriceList;
|
|
8
|
+
subscriptions?: Subscription[] | undefined;
|
|
8
9
|
upgradingSubscription: Subscription | undefined;
|
|
9
10
|
canPurchaseFeatureAddons: boolean;
|
|
10
11
|
}) => boolean;
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export declare const useCancelSubscription: () => (subscriptionIds: string[], apiHost: string, token?: string) => Promise<any>;
|
|
2
|
+
export declare const useSubscriptionTrialConvert: (handlePortalErrors: (errors: any) => void, apiHost: string) => (subscriptionId: string, token?: string, paymentId?: string) => Promise<any>;
|
|
@@ -11,7 +11,6 @@ export declare const createQuoteParams: (quote: Quote, subscriptionQuantity: num
|
|
|
11
11
|
export declare const canShowChangeQuantities: ({ subscriptions }: {
|
|
12
12
|
subscriptions: Subscription[];
|
|
13
13
|
}) => boolean;
|
|
14
|
-
export declare const canSubscriptionUpgradeFromTrial: (subscription: Subscription) => boolean;
|
|
15
14
|
export declare const isSubscriptionNotActive: (subscription: Subscription) => boolean;
|
|
16
15
|
export declare const productPlanName: ({ plan, product }: {
|
|
17
16
|
plan: Plan;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Account, Quote } from
|
|
2
|
-
declare const TaxationForm: ({ account, quote }: {
|
|
1
|
+
import { Account, Quote } from "@bunnyapp/common";
|
|
2
|
+
declare const TaxationForm: ({ account, quote, }: {
|
|
3
3
|
account: Account;
|
|
4
4
|
quote: Quote;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,4 +5,3 @@ export declare const useQuoteChangeUpdate: () => (charges: {
|
|
|
5
5
|
quantity: number;
|
|
6
6
|
}[], quoteChangeId: string, apiHost: string, token?: string) => Promise<unknown>;
|
|
7
7
|
export declare const useQuoteDelete: () => (quoteId: string, apiHost: string, token?: string) => Promise<unknown>;
|
|
8
|
-
export declare const useQuoteSubscriptionActivate: () => (subscriptionId: string, apiHost: string, token?: string) => Promise<unknown>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FeatureUsage } from '@bunnyapp/common';
|
|
2
|
-
declare const getFeatureUsage: ({ subscriptionChargeId, token, apiHost, }: {
|
|
2
|
+
declare const getFeatureUsage: ({ subscriptionChargeId, startDate, endDate, dataInterval, token, apiHost, }: {
|
|
3
3
|
subscriptionChargeId: string;
|
|
4
|
+
startDate?: string | undefined;
|
|
5
|
+
endDate?: string | undefined;
|
|
6
|
+
dataInterval?: number | undefined;
|
|
4
7
|
token?: string | undefined;
|
|
5
8
|
apiHost: string;
|
|
6
9
|
}) => Promise<FeatureUsage>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { FormattedQuote } from '@bunnyapp/common';
|
|
2
|
+
declare const getFormattedQuote: ({ id, token, apiHost, }: {
|
|
3
|
+
id?: string | undefined;
|
|
2
4
|
apiHost: string;
|
|
3
5
|
token?: string | undefined;
|
|
4
|
-
}) => Promise<
|
|
6
|
+
}) => Promise<FormattedQuote>;
|
|
5
7
|
export default getFormattedQuote;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const getPriceListChangeOptions: ({ apiHost, isInPreviewMode, productId, token, upgradingSubscription,
|
|
2
|
+
declare const getPriceListChangeOptions: ({ apiHost, isInPreviewMode, productId, token, upgradingSubscription, }: {
|
|
3
3
|
apiHost: string;
|
|
4
4
|
isInPreviewMode?: boolean | undefined;
|
|
5
5
|
productId?: string | undefined;
|
|
6
6
|
token?: string | undefined;
|
|
7
7
|
upgradingSubscription?: Subscription | undefined;
|
|
8
|
-
accountCurrencyId: string;
|
|
9
8
|
}) => Promise<any>;
|
|
10
9
|
export default getPriceListChangeOptions;
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const useCurrentUserData: (token?: string) => {
|
|
3
|
-
authObjectName: any;
|
|
4
|
-
account: any;
|
|
5
|
-
companyName: any;
|
|
6
|
-
returnUrl: any;
|
|
7
|
-
privacyUrl: any;
|
|
8
|
-
termsUrl: any;
|
|
9
|
-
entityId: any;
|
|
10
|
-
} | CurrentUser;
|
|
1
|
+
declare const useCurrentUserData: () => any;
|
|
11
2
|
export default useCurrentUserData;
|
|
@@ -19,10 +19,10 @@ type PaymentPlugin = {
|
|
|
19
19
|
}[];
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export declare const usePaymentPlugins: ({ apiHost, token,
|
|
22
|
+
export declare const usePaymentPlugins: ({ apiHost, token, selectedEntityId, }: {
|
|
23
23
|
apiHost: string;
|
|
24
24
|
token?: string | undefined;
|
|
25
|
-
|
|
25
|
+
selectedEntityId?: string | null | undefined;
|
|
26
26
|
}) => {
|
|
27
27
|
paymentPlugins: PaymentPlugin[];
|
|
28
28
|
isFetched: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const handlers: import("msw/lib/core/
|
|
1
|
+
export declare const handlers: import("msw/lib/core/GraphQLHandler-noP9MRWa").G[];
|