@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.
Files changed (44) hide show
  1. package/dist/cjs/index.js +521 -598
  2. package/dist/cjs/src/components/BillingDetails/BillingDetails.d.ts +1 -1
  3. package/dist/cjs/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
  4. package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +3 -2
  5. package/dist/cjs/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
  6. package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +2 -1
  7. package/dist/cjs/src/components/Subscriptions/SubscriptionRequests.d.ts +1 -0
  8. package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +0 -1
  9. package/dist/cjs/src/components/TaxationForm.d.ts +2 -2
  10. package/dist/cjs/src/components/UpgradeFromTrial.d.ts +6 -0
  11. package/dist/cjs/src/graphql/QuoteRequests.d.ts +0 -1
  12. package/dist/cjs/src/graphql/queries/getFeatureUsage.d.ts +4 -1
  13. package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +4 -2
  14. package/dist/cjs/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -2
  15. package/dist/cjs/src/hooks/useCurrentUserData.d.ts +1 -10
  16. package/dist/cjs/src/hooks/usePaymentPlugins.d.ts +2 -2
  17. package/dist/cjs/src/mocks/handlers.d.ts +1 -1
  18. package/dist/esm/index.js +522 -599
  19. package/dist/esm/src/components/BillingDetails/BillingDetails.d.ts +1 -1
  20. package/dist/esm/src/components/PaymentForm/DemoPay/demoPayUtils.d.ts +2 -2
  21. package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +3 -2
  22. package/dist/esm/src/components/PaymentForm/PaymentMethodDetails.d.ts +1 -1
  23. package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/priceListCardUtils.d.ts +2 -1
  24. package/dist/esm/src/components/Subscriptions/SubscriptionRequests.d.ts +1 -0
  25. package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +0 -1
  26. package/dist/esm/src/components/TaxationForm.d.ts +2 -2
  27. package/dist/esm/src/components/UpgradeFromTrial.d.ts +6 -0
  28. package/dist/esm/src/graphql/QuoteRequests.d.ts +0 -1
  29. package/dist/esm/src/graphql/queries/getFeatureUsage.d.ts +4 -1
  30. package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +4 -2
  31. package/dist/esm/src/graphql/queries/getPriceListChangeOptions.d.ts +1 -2
  32. package/dist/esm/src/hooks/useCurrentUserData.d.ts +1 -10
  33. package/dist/esm/src/hooks/usePaymentPlugins.d.ts +2 -2
  34. package/dist/esm/src/mocks/handlers.d.ts +1 -1
  35. package/dist/index.d.ts +4 -3
  36. package/package.json +1 -1
  37. package/dist/cjs/src/graphql/mutations/subscriptionTrialConvert.d.ts +0 -7
  38. package/dist/cjs/src/graphql/queries/getCurrentUserData.d.ts +0 -13
  39. package/dist/cjs/src/utils/couponUtils.d.ts +0 -2
  40. package/dist/esm/src/graphql/mutations/subscriptionTrialConvert.d.ts +0 -7
  41. package/dist/esm/src/graphql/queries/getCurrentUserData.d.ts +0 -13
  42. package/dist/esm/src/utils/couponUtils.d.ts +0 -2
  43. /package/dist/cjs/src/components/icons/{IDeal.d.ts → iDeal.d.ts} +0 -0
  44. /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?: ((paymentMethodData?: any) => void) | undefined;
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 '@bunnyapp/common';
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?: ((response: any) => void) | undefined;
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: (response: any) => void;
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 '@bunnyapp/common';
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;
@@ -0,0 +1,6 @@
1
+ interface UpgradeFromTrialProps {
2
+ onClose: () => void;
3
+ open: boolean;
4
+ }
5
+ declare const UpgradeFromTrial: ({ onClose, open }: UpgradeFromTrialProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default UpgradeFromTrial;
@@ -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
- declare const getFormattedQuote: ({ token, apiHost }: {
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<any>;
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, accountCurrencyId, }: {
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
- import { currentUser as CurrentUser } from '@bunnyapp/common';
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, accountId, }: {
22
+ export declare const usePaymentPlugins: ({ apiHost, token, selectedEntityId, }: {
23
23
  apiHost: string;
24
24
  token?: string | undefined;
25
- accountId?: string | undefined;
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/HttpResponse-BbwAqLE_").G[];
1
+ export declare const handlers: import("msw/lib/core/GraphQLHandler-noP9MRWa").G[];
package/dist/index.d.ts CHANGED
@@ -70,16 +70,17 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
70
70
  noQuotesMessage?: string;
71
71
  }): react_jsx_runtime.JSX.Element;
72
72
 
73
- declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
73
+ declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, entityId, overrideToken, customCheckoutFunction, currencyId: currencyIdFromProps, paymentHoldOptions, }: {
74
74
  invoice?: FormattedInvoice | Invoice$1 | undefined;
75
75
  quote?: Quote$1 | undefined;
76
76
  onFail: (error: any) => void;
77
77
  onPaymentSuccess?: (() => void) | undefined;
78
78
  onPaymentHoldSuccess?: ((response: any) => void) | undefined;
79
- onSavePaymentMethod?: ((response: any) => void) | undefined;
79
+ onSavePaymentMethod?: (() => void) | undefined;
80
80
  onRemovePaymentMethod?: (() => void) | undefined;
81
81
  onSetDefaultPaymentMethod?: (() => void) | undefined;
82
82
  accountId?: string | undefined;
83
+ entityId?: string | undefined;
83
84
  overrideToken?: string | undefined;
84
85
  customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
85
86
  currencyId?: string | undefined;
@@ -200,7 +201,7 @@ declare const BillingDetails: ({ className, countryListFilter, hideBillingDetail
200
201
  isCardEnabled?: boolean | undefined;
201
202
  isUpgradeFromTrial?: boolean | undefined;
202
203
  shadow?: ShadowType | undefined;
203
- onSavePaymentMethod?: ((paymentMethodData?: any) => void) | undefined;
204
+ onSavePaymentMethod?: (() => void) | undefined;
204
205
  }) => react_jsx_runtime.JSX.Element;
205
206
 
206
207
  declare const Footer: ({ className }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.3.0-beta.1",
3
+ "version": "1.3.0-beta.4",
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",
@@ -1,7 +0,0 @@
1
- declare const subscriptionTrialConvert: ({ subscriptionId, paymentMethodId, apiHost, token, }: {
2
- subscriptionId: string;
3
- paymentMethodId?: string | undefined;
4
- apiHost: string;
5
- token?: string | undefined;
6
- }) => Promise<any>;
7
- export default subscriptionTrialConvert;
@@ -1,13 +0,0 @@
1
- declare const getCurrentUserData: ({ token, apiHost }: {
2
- token?: string | undefined;
3
- apiHost: string;
4
- }) => Promise<{
5
- authObjectName: any;
6
- account: any;
7
- companyName: any;
8
- returnUrl: any;
9
- privacyUrl: any;
10
- termsUrl: any;
11
- entityId: any;
12
- }>;
13
- export default getCurrentUserData;
@@ -1,2 +0,0 @@
1
- import { Quote, Subscription } from '@bunnyapp/common';
2
- export declare function shouldShowCouponEditor(quote: Quote, activeCouponsExist: boolean, upgradingSubscription: Subscription): boolean;
@@ -1,7 +0,0 @@
1
- declare const subscriptionTrialConvert: ({ subscriptionId, paymentMethodId, apiHost, token, }: {
2
- subscriptionId: string;
3
- paymentMethodId?: string | undefined;
4
- apiHost: string;
5
- token?: string | undefined;
6
- }) => Promise<any>;
7
- export default subscriptionTrialConvert;
@@ -1,13 +0,0 @@
1
- declare const getCurrentUserData: ({ token, apiHost }: {
2
- token?: string | undefined;
3
- apiHost: string;
4
- }) => Promise<{
5
- authObjectName: any;
6
- account: any;
7
- companyName: any;
8
- returnUrl: any;
9
- privacyUrl: any;
10
- termsUrl: any;
11
- entityId: any;
12
- }>;
13
- export default getCurrentUserData;
@@ -1,2 +0,0 @@
1
- import { Quote, Subscription } from '@bunnyapp/common';
2
- export declare function shouldShowCouponEditor(quote: Quote, activeCouponsExist: boolean, upgradingSubscription: Subscription): boolean;