@bunnyapp/components 1.5.0-beta.14 → 1.5.0-beta.15

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 (52) hide show
  1. package/dist/cjs/index.js +444 -417
  2. package/dist/cjs/src/components/Invoice/InvoiceQuoteView.d.ts +1 -1
  3. package/dist/cjs/src/components/PaymentForm/Stripe/stripeUtils.d.ts +2 -6
  4. package/dist/cjs/src/components/Subscriptions/AddonSubscriptionCards.d.ts +2 -2
  5. package/dist/cjs/src/components/Subscriptions/QuantityDrawerContainer.d.ts +2 -2
  6. package/dist/cjs/src/components/Subscriptions/Subscriptions.d.ts +3 -3
  7. package/dist/cjs/src/components/Subscriptions/SubscriptionsListContainer.d.ts +2 -2
  8. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +2 -1
  9. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  10. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +6 -0
  11. package/dist/{esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop → cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons}/FeatureAddons.d.ts +2 -4
  12. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +5 -0
  13. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/BackButton.d.ts +4 -0
  14. package/dist/cjs/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +2 -1
  15. package/dist/cjs/src/components/Subscriptions/Upgrade/Upgrade.d.ts +2 -1
  16. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridTitle.d.ts +2 -2
  17. package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +0 -2
  18. package/dist/cjs/src/components/Subscriptions/subscriptionsList/ShowInactiveToggle.d.ts +5 -0
  19. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -2
  20. package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +4 -4
  21. package/dist/cjs/src/contexts/SubscriptionsContext.d.ts +1 -1
  22. package/dist/cjs/src/utils/pricePickerUtils.d.ts +1 -1
  23. package/dist/esm/index.js +443 -416
  24. package/dist/esm/src/components/Invoice/InvoiceQuoteView.d.ts +1 -1
  25. package/dist/esm/src/components/PaymentForm/Stripe/stripeUtils.d.ts +2 -6
  26. package/dist/esm/src/components/Subscriptions/AddonSubscriptionCards.d.ts +2 -2
  27. package/dist/esm/src/components/Subscriptions/QuantityDrawerContainer.d.ts +2 -2
  28. package/dist/esm/src/components/Subscriptions/Subscriptions.d.ts +3 -3
  29. package/dist/esm/src/components/Subscriptions/SubscriptionsListContainer.d.ts +2 -2
  30. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/PlanPicker.d.ts +2 -1
  31. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures.d.ts +3 -3
  32. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +6 -0
  33. package/dist/{cjs/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop → esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons}/FeatureAddons.d.ts +2 -4
  34. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +5 -0
  35. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/BackButton.d.ts +4 -0
  36. package/dist/esm/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +2 -1
  37. package/dist/esm/src/components/Subscriptions/Upgrade/Upgrade.d.ts +2 -1
  38. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridTitle.d.ts +2 -2
  39. package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +0 -2
  40. package/dist/esm/src/components/Subscriptions/subscriptionsList/ShowInactiveToggle.d.ts +5 -0
  41. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -2
  42. package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsNavigation.d.ts +4 -4
  43. package/dist/esm/src/contexts/SubscriptionsContext.d.ts +1 -1
  44. package/dist/esm/src/utils/pricePickerUtils.d.ts +1 -1
  45. package/dist/index.d.ts +5 -4
  46. package/package.json +1 -1
  47. package/dist/cjs/src/components/PageWrapper.d.ts +0 -1
  48. package/dist/cjs/src/components/Subscriptions/PageTitle.d.ts +0 -5
  49. package/dist/cjs/src/components/Subscriptions/subscriptionsList/HideExpiredToggle.d.ts +0 -5
  50. package/dist/esm/src/components/PageWrapper.d.ts +0 -1
  51. package/dist/esm/src/components/Subscriptions/PageTitle.d.ts +0 -5
  52. package/dist/esm/src/components/Subscriptions/subscriptionsList/HideExpiredToggle.d.ts +0 -5
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
1
  import { FormattedInvoice } from '@bunnyapp/common';
2
+ import { ReactNode } from 'react';
3
3
  declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, }: {
4
4
  html: string;
5
5
  children?: ReactNode;
@@ -1,5 +1,5 @@
1
+ import { Payable, PluginData, Quote } from '@bunnyapp/common';
1
2
  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;
@@ -25,9 +25,5 @@ export declare const createPaymentHold: ({ quote, plugin, token, apiHost, paymen
25
25
  }) => Promise<any>;
26
26
  export declare const useStripePlugin: (plugin: PluginData | undefined, apiHost: string, currencyId: string, token?: string, accountId?: string) => {
27
27
  stripe: Stripe | null;
28
- options: {
29
- mode: "setup";
30
- currency: string;
31
- setupFutureUsage: "off_session";
32
- };
28
+ options: import("@stripe/stripe-js").StripeElementsOptionsMode;
33
29
  };
@@ -1,7 +1,7 @@
1
1
  import { Subscription } from '@bunnyapp/common';
2
- export declare function AddonSubscriptionsCards({ onCancelSubscriptionClick, subscriptions, subscription, hideExpired, }: {
2
+ export declare function AddonSubscriptionsCards({ onCancelSubscriptionClick, subscriptions, subscription, showInactive, }: {
3
3
  onCancelSubscriptionClick?: (subscription: Subscription) => void;
4
4
  subscriptions: Subscription[];
5
5
  subscription: Subscription;
6
- hideExpired: boolean;
6
+ showInactive: boolean;
7
7
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -8,7 +8,7 @@ interface QuantityDrawerContainerProps {
8
8
  quantityDrawerOpen: boolean;
9
9
  setQuantityDrawerOpen: (open: boolean) => void;
10
10
  handlePortalErrors?: (errors: any) => void;
11
- setHideExpiredState: (hide: boolean) => void;
11
+ setShowInactive: (showInactive: boolean) => void;
12
12
  }
13
- declare const QuantityDrawerContainer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setHideExpiredState, }: QuantityDrawerContainerProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const QuantityDrawerContainer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setShowInactive, }: QuantityDrawerContainerProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export default QuantityDrawerContainer;
@@ -3,7 +3,7 @@ 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, hideExpired, hideExpiredToggle, }: {
6
+ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPreviewMode, productId, className, styles: userStyles, noSubscriptionsComponent, showInactiveSubscriptions, showInactiveSubscriptionsToggle, }: {
7
7
  handlePortalErrors?: ((errors: any) => void) | undefined;
8
8
  companyName: string;
9
9
  isInPreviewMode?: boolean | undefined;
@@ -15,7 +15,7 @@ declare const SubscriptionsWrapper: ({ handlePortalErrors, companyName, isInPrev
15
15
  subscriptionProductNameStyle?: import("react").CSSProperties | undefined;
16
16
  } | undefined;
17
17
  noSubscriptionsComponent?: React.ReactNode;
18
- hideExpired?: boolean | undefined;
19
- hideExpiredToggle?: boolean | undefined;
18
+ showInactiveSubscriptions?: boolean | undefined;
19
+ showInactiveSubscriptionsToggle?: boolean | undefined;
20
20
  }) => import("react/jsx-runtime").JSX.Element;
21
21
  export default SubscriptionsWrapper;
@@ -4,9 +4,9 @@ export type EditingQuoteDataType = {
4
4
  id: string;
5
5
  isTrial: boolean;
6
6
  };
7
- declare const SubscriptionsListContainer: ({ companyName, hideExpired, onCancelSubscriptionClick, onChangePlanClick, noSubscriptionsComponent, subscriptions, subscriptionsAreLoading, }: {
7
+ declare const SubscriptionsListContainer: ({ companyName, showInactive, onCancelSubscriptionClick, onChangePlanClick, noSubscriptionsComponent, subscriptions, subscriptionsAreLoading, }: {
8
8
  companyName: string;
9
- hideExpired?: boolean | undefined;
9
+ showInactive?: boolean | undefined;
10
10
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
11
11
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
12
12
  noSubscriptionsComponent?: React.ReactNode;
@@ -1,5 +1,6 @@
1
1
  import { Subscription } from '@bunnyapp/common';
2
- declare const PlanPicker: ({ upgradingSubscription }: {
2
+ declare const PlanPicker: ({ upgradingSubscription, onGoBack, }: {
3
3
  upgradingSubscription?: Subscription | undefined;
4
+ onGoBack?: (() => void) | undefined;
4
5
  }) => import("react/jsx-runtime").JSX.Element | null;
5
6
  export default PlanPicker;
@@ -1,7 +1,7 @@
1
- import { PriceList, Product } from '@bunnyapp/common';
2
- declare const PlanFeatures: ({ displayPriceLists, selectedProduct, plansToDisplay, }: {
1
+ import { Feature, PriceList } from '@bunnyapp/common';
2
+ export declare const PlanFeatures: ({ displayPriceLists, features, plansToDisplay, }: {
3
3
  displayPriceLists: PriceList[];
4
4
  plansToDisplay: number;
5
- selectedProduct?: Product | undefined;
5
+ features?: Feature[] | undefined;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
7
7
  export default PlanFeatures;
@@ -13,4 +13,10 @@ type PriceListGridDesktopProps = {
13
13
  onClickPriceListCard: (priceList: PriceList) => void;
14
14
  };
15
15
  declare const PriceListGridDesktop: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, trialRemainingDays, selectedBillingPeriod, onClickPriceListCard, }: PriceListGridDesktopProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, }: {
17
+ children: React.ReactNode;
18
+ className?: string;
19
+ everythingInPlus: boolean;
20
+ plansToDisplay: number;
21
+ }): import("react/jsx-runtime").JSX.Element;
16
22
  export default PriceListGridDesktop;
@@ -1,9 +1,7 @@
1
1
  import { PriceList } from '@bunnyapp/common';
2
- declare const PlanFeatureAddons: ({ displayPriceLists, plansToDisplay, }: {
2
+ declare const PlanFeatureAddons: ({ displayPriceLists, plansToDisplay, everythingInPlus, }: {
3
3
  displayPriceLists: PriceList[];
4
4
  plansToDisplay: number;
5
+ everythingInPlus: boolean;
5
6
  }) => import("react/jsx-runtime").JSX.Element;
6
- export declare function FeatureAddonsList({ priceList }: {
7
- priceList: PriceList;
8
- }): import("react/jsx-runtime").JSX.Element;
9
7
  export default PlanFeatureAddons;
@@ -0,0 +1,5 @@
1
+ import { PriceList } from '@bunnyapp/common';
2
+ declare function FeatureAddonsList({ priceList }: {
3
+ priceList: PriceList;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export default FeatureAddonsList;
@@ -0,0 +1,4 @@
1
+ export default function BackButton({ onClick, title }: {
2
+ onClick?: () => void;
3
+ title?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,9 @@
1
1
  import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
2
- declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, priceListChangeOptions, subscriptions, }: {
2
+ declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, priceListChangeOptions, subscriptions, onGoBack, }: {
3
3
  arePlanChangeOptionsLoading: boolean;
4
4
  areSubscriptionsLoading: boolean;
5
5
  priceListChangeOptions: PriceListChangeOptions;
6
6
  subscriptions: Subscription[];
7
+ onGoBack?: (() => void) | undefined;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
8
9
  export default PriceListSelector;
@@ -1,10 +1,11 @@
1
1
  import { Subscription } from '@bunnyapp/common';
2
- declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, upgradingSubscription, isInPreviewMode, productId, className, }: {
2
+ declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, upgradingSubscription, isInPreviewMode, productId, className, shadow, }: {
3
3
  onChangePlanCancel: () => void;
4
4
  handlePortalErrors?: ((error: any) => void) | undefined;
5
5
  upgradingSubscription?: Subscription | undefined;
6
6
  isInPreviewMode: boolean;
7
7
  productId: string | undefined;
8
8
  className?: string | undefined;
9
+ shadow?: "none" | "lg" | "md" | "sm" | undefined;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
10
11
  export default UpgradeWrapper;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from "react";
2
- declare const QuantityChangeGridTitle: ({ children, right, }: {
1
+ import { ReactNode } from 'react';
2
+ declare const QuantityChangeGridTitle: ({ children, right }: {
3
3
  children: ReactNode;
4
4
  right?: boolean | undefined;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,5 @@
1
1
  import { Quote, Subscription } from '@bunnyapp/common';
2
2
  import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
3
- export declare const QUANTITY_CHANGE_HEADER_TITLE = "Update unit quantity";
4
- export declare const QUANTITY_CHANGE_HEADER_DESCRIPTION = "Adjust quantities below. The change will take effect immediately after checkout has been completed.";
5
3
  declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, onClose, open, openCheckout, setEditingQuoteData, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
6
4
  editingQuote?: Quote | undefined;
7
5
  editingQuoteData?: EditingQuoteDataType | undefined;
@@ -0,0 +1,5 @@
1
+ declare const ShowInactiveToggle: ({ showInactive, setShowInactive, }: {
2
+ showInactive: boolean;
3
+ setShowInactive: (value: boolean) => void;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default ShowInactiveToggle;
@@ -1,6 +1,6 @@
1
1
  import { Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionsList: ({ hideExpired, onChangePlanClick, onCancelSubscriptionClick, subscriptions, }: {
3
- hideExpired: boolean;
2
+ declare const SubscriptionsList: ({ showInactive, onChangePlanClick, onCancelSubscriptionClick, subscriptions, }: {
3
+ showInactive: boolean;
4
4
  onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
5
5
  onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
6
6
  subscriptions: Subscription[];
@@ -1,8 +1,8 @@
1
1
  import { Subscription } from '@bunnyapp/common';
2
- declare const SubscriptionsNavigation: ({ expiredSwitchVisible, hideExpired, setHideExpired, setQuantityDrawerOpen, subscriptions, }: {
3
- expiredSwitchVisible: boolean;
4
- hideExpired: boolean;
5
- setHideExpired: (value: boolean) => void;
2
+ declare const SubscriptionsNavigation: ({ inactiveSwitchVisible, showInactive, setShowInactive, setQuantityDrawerOpen, subscriptions, }: {
3
+ inactiveSwitchVisible: boolean;
4
+ showInactive: boolean;
5
+ setShowInactive: (value: boolean) => void;
6
6
  setQuantityDrawerOpen: (value: boolean) => void;
7
7
  subscriptions: Subscription[];
8
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,7 @@ export type SubscriptionsContextValues = {
8
8
  subscriptionProductNameStyle?: React.CSSProperties;
9
9
  productId?: string;
10
10
  isInPreviewMode: boolean;
11
- hideExpired?: boolean;
11
+ showInactiveSubscriptions?: boolean;
12
12
  upgradingSubscription?: Subscription;
13
13
  setUpgradingSubscription: React.Dispatch<React.SetStateAction<Subscription | undefined>>;
14
14
  };
@@ -1,5 +1,5 @@
1
1
  import { BillingPeriod, Plan, Product } from "@bunnyapp/common";
2
2
  export type PeriodMonths = 0 | 1 | 3 | 6 | 12;
3
3
  export declare const periodMonthsConverter: (period: PeriodMonths) => BillingPeriod;
4
- export declare const billingPeriodConverter: (period?: BillingPeriod) => 0 | 1 | 3 | 6 | 12;
4
+ export declare const billingPeriodConverter: (period?: BillingPeriod) => 1 | 0 | 3 | 6 | 12;
5
5
  export declare const createAvailableBillingPeriods: (plans?: Plan[], selectedProduct?: Product) => (0 | 1 | 3 | 6 | 12)[] | undefined;