@bunnyapp/components 1.5.0-beta.1 → 1.5.0-beta.2
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 +1098 -1001
- package/dist/cjs/src/components/BunnyProvider.d.ts +0 -1
- package/dist/cjs/src/components/Checkout/Checkout.d.ts +12 -6
- package/dist/cjs/src/components/Invoice/Invoice.d.ts +1 -1
- package/dist/cjs/src/components/PaymentForm/PaymentForm.d.ts +1 -2
- package/dist/cjs/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -11
- package/dist/cjs/src/components/Quote/Quote.d.ts +1 -1
- package/dist/cjs/src/components/QuoteProvider.d.ts +22 -0
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +3 -4
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +5 -5
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +1 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +2 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -2
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListGridMobile.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCard.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelector.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/QuantityDrawerContainer.d.ts +14 -0
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +4 -2
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +4 -2
- package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +3 -1
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -1
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -3
- package/dist/cjs/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +2 -3
- package/dist/cjs/src/components/Transactions/Transactions.d.ts +2 -2
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
- package/dist/cjs/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +1 -1
- package/dist/cjs/src/components/Transactions/transactionsList/utils.d.ts +1 -1
- package/dist/cjs/src/{components/Invoice → contexts}/InvoiceQuoteContext.d.ts +2 -2
- package/dist/cjs/src/{components/Subscriptions → contexts}/SubscriptionsContext.d.ts +0 -4
- package/dist/{esm/src/components/Transactions → cjs/src/contexts}/TransactionsListContext.d.ts +2 -2
- package/dist/cjs/src/graphql/mutations/quoteChargeUpdate.d.ts +2 -1
- package/dist/cjs/src/graphql/queries/getAddonPlans.d.ts +7 -0
- package/dist/cjs/src/graphql/queries/getFormattedQuote.d.ts +2 -1
- package/dist/cjs/src/hooks/quotes/useQuoteCreate.d.ts +1 -4
- package/dist/cjs/src/hooks/quotes/useQuoteQuantities.d.ts +14 -0
- package/dist/cjs/src/hooks/useCurrentUserData.d.ts +11 -8
- package/dist/cjs/src/hooks/usePaymentMethod.d.ts +2 -1
- package/dist/cjs/src/hooks/usePriceListChangeOptions.d.ts +6 -0
- package/dist/cjs/src/utils/addonPlanUtils.d.ts +3 -1
- package/dist/cjs/src/utils/chargeUtils.d.ts +2 -0
- package/dist/cjs/src/utils/featureAddonUtils.d.ts +5 -2
- package/dist/esm/index.js +1100 -1003
- package/dist/esm/src/components/BunnyProvider.d.ts +0 -1
- package/dist/esm/src/components/Checkout/Checkout.d.ts +12 -6
- package/dist/esm/src/components/Invoice/Invoice.d.ts +1 -1
- package/dist/esm/src/components/PaymentForm/PaymentForm.d.ts +1 -2
- package/dist/esm/src/components/PaymentForm/PaymentFormTypes.d.ts +1 -11
- package/dist/esm/src/components/Quote/Quote.d.ts +1 -1
- package/dist/esm/src/components/QuoteProvider.d.ts +22 -0
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/PriceListGrid.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +3 -4
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +5 -5
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PlanAddonsCard.d.ts +1 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListCardDesktop.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/PriceListGridDesktop.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerDesktop/planManagerUtils.d.ts +2 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -2
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/planPickerMobile/PriceListGridMobile.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListCard/PriceListCard.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelector.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/QuantityDrawerContainer.d.ts +14 -0
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts +4 -2
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/QuantityInput.d.ts +4 -2
- package/dist/esm/src/components/Subscriptions/quantityChangeDrawer/quantityChangeDrawerDesktop/QuantityChangeDrawerDesktop.d.ts +3 -1
- package/dist/esm/src/components/Subscriptions/subscriptionsList/ChangeQuantitiesButton.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts +2 -1
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionCardHeader.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -3
- package/dist/esm/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktop.d.ts +2 -3
- package/dist/esm/src/components/Transactions/Transactions.d.ts +2 -2
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListDesktop.d.ts +1 -1
- package/dist/esm/src/components/Transactions/transactionsList/TransactionsListMobile.d.ts +1 -1
- package/dist/esm/src/components/Transactions/transactionsList/utils.d.ts +1 -1
- package/dist/esm/src/{components/Invoice → contexts}/InvoiceQuoteContext.d.ts +2 -2
- package/dist/esm/src/{components/Subscriptions → contexts}/SubscriptionsContext.d.ts +0 -4
- package/dist/{cjs/src/components/Transactions → esm/src/contexts}/TransactionsListContext.d.ts +2 -2
- package/dist/esm/src/graphql/mutations/quoteChargeUpdate.d.ts +2 -1
- package/dist/esm/src/graphql/queries/getAddonPlans.d.ts +7 -0
- package/dist/esm/src/graphql/queries/getFormattedQuote.d.ts +2 -1
- package/dist/esm/src/hooks/quotes/useQuoteCreate.d.ts +1 -4
- package/dist/esm/src/hooks/quotes/useQuoteQuantities.d.ts +14 -0
- package/dist/esm/src/hooks/useCurrentUserData.d.ts +11 -8
- package/dist/esm/src/hooks/usePaymentMethod.d.ts +2 -1
- package/dist/esm/src/hooks/usePriceListChangeOptions.d.ts +6 -0
- package/dist/esm/src/utils/addonPlanUtils.d.ts +3 -1
- package/dist/esm/src/utils/chargeUtils.d.ts +2 -0
- package/dist/esm/src/utils/featureAddonUtils.d.ts +5 -2
- package/dist/index.d.ts +1 -2
- package/package.json +2 -2
- package/dist/cjs/src/components/PlanManagerQuoteProvider.d.ts +0 -19
- package/dist/cjs/src/components/QuotePreviewProvider.d.ts +0 -15
- package/dist/cjs/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelectorContext.d.ts +0 -9
- package/dist/cjs/src/components/Subscriptions/QuotePreviewData.d.ts +0 -6
- package/dist/esm/src/components/PlanManagerQuoteProvider.d.ts +0 -19
- package/dist/esm/src/components/QuotePreviewProvider.d.ts +0 -15
- package/dist/esm/src/components/Subscriptions/PlanManager/PlanPicker/priceListSelector/PriceListSelectorContext.d.ts +0 -9
- package/dist/esm/src/components/Subscriptions/QuotePreviewData.d.ts +0 -6
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { FormattedInvoice, Quote } from '@bunnyapp/common';
|
|
2
|
+
type CheckoutProps = {
|
|
3
|
+
invoice?: FormattedInvoice;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
onFail: (error: any) => void;
|
|
6
|
+
onSuccess: () => void;
|
|
7
|
+
open: boolean;
|
|
8
|
+
quote?: Quote;
|
|
9
|
+
token?: string;
|
|
10
|
+
isUpdatingQuote: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
13
|
export default Checkout;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../../styles/index.less';
|
|
2
|
-
import { InvoiceQuoteContextProps } from '
|
|
2
|
+
import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
|
|
3
3
|
export type InvoiceProps = InvoiceQuoteContextProps & {
|
|
4
4
|
hidePaymentForm?: boolean;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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,
|
|
2
|
+
export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymentHoldSuccess, quote, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, }: {
|
|
3
3
|
invoice?: FormattedInvoice | Invoice | undefined;
|
|
4
4
|
quote?: Quote | undefined;
|
|
5
5
|
onFail: (error: any) => void;
|
|
@@ -11,7 +11,6 @@ export declare const PaymentForm: ({ invoice, onFail, onPaymentSuccess, onPaymen
|
|
|
11
11
|
accountId?: string | undefined;
|
|
12
12
|
overrideToken?: string | undefined;
|
|
13
13
|
customCheckoutFunction?: ((plugin: PluginData | undefined) => Promise<any>) | undefined;
|
|
14
|
-
currencyId?: string | undefined;
|
|
15
14
|
paymentHoldOptions?: {
|
|
16
15
|
payToAccept?: boolean | undefined;
|
|
17
16
|
amountToHold?: number | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PluginData } from '@bunnyapp/common';
|
|
2
2
|
export type SavedPaymentMethodResponse = {
|
|
3
3
|
paymentMethodId: string;
|
|
4
4
|
};
|
|
@@ -12,13 +12,3 @@ export type InvoiceQuoteParentProps = {
|
|
|
12
12
|
onSuccess: () => void;
|
|
13
13
|
onFail: (error: any) => void;
|
|
14
14
|
};
|
|
15
|
-
export type CheckoutProps = {
|
|
16
|
-
invoice?: FormattedInvoice;
|
|
17
|
-
onCancel: () => void;
|
|
18
|
-
onFail: (error: any) => void;
|
|
19
|
-
onSuccess: () => void;
|
|
20
|
-
open: boolean;
|
|
21
|
-
quote?: Quote;
|
|
22
|
-
selectedPriceList?: PriceList;
|
|
23
|
-
token?: string;
|
|
24
|
-
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { InvoiceQuoteContextProps } from '
|
|
1
|
+
import { InvoiceQuoteContextProps } from '../../contexts/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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PriceList, Quote } from '@bunnyapp/common';
|
|
3
|
+
export type QuoteContextValues = {
|
|
4
|
+
quote: Quote | undefined;
|
|
5
|
+
selectedPriceList: PriceList | undefined;
|
|
6
|
+
isQuotePending: boolean;
|
|
7
|
+
isAddonPlanLoading: boolean;
|
|
8
|
+
isFeatureAddonsLoading: boolean;
|
|
9
|
+
isUpdatingQuote: boolean;
|
|
10
|
+
setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
+
addFeatureAddonLoading: (featureAddonId: string) => void;
|
|
12
|
+
removeFeatureAddonLoading: (featureAddonId: string) => void;
|
|
13
|
+
getFeatureQuantity: (featureId: string, chargeId: string) => number | undefined;
|
|
14
|
+
onClearQuote: () => void;
|
|
15
|
+
onChangeSelectedPriceList: (priceList: PriceList) => void;
|
|
16
|
+
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const QuoteContext: import("react").Context<QuoteContextValues>;
|
|
19
|
+
declare function QuoteProvider({ children }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default QuoteProvider;
|
|
@@ -10,6 +10,7 @@ type PriceListGridProps = {
|
|
|
10
10
|
setPriceListStart: Dispatch<SetStateAction<number>>;
|
|
11
11
|
upgradingSubscriptionState?: Subscription;
|
|
12
12
|
selectedBillingPeriod?: BillingPeriod | undefined;
|
|
13
|
+
onClickPriceListCard: (priceList: PriceList) => void;
|
|
13
14
|
};
|
|
14
|
-
declare const PriceListGrid: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, upgradingSubscriptionState, selectedBillingPeriod, }: PriceListGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const PriceListGrid: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, upgradingSubscriptionState, selectedBillingPeriod, onClickPriceListCard, }: PriceListGridProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default PriceListGrid;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const CheckoutBarInput: ({ disabled, charge, quantity,
|
|
1
|
+
import { PriceListCharge } from '@bunnyapp/common';
|
|
2
|
+
declare const CheckoutBarInput: ({ disabled, charge, quantity, onQuantityChanged, }: {
|
|
3
3
|
disabled?: boolean | undefined;
|
|
4
4
|
charge: PriceListCharge;
|
|
5
5
|
quantity: number;
|
|
6
|
-
selectedPriceList?: PriceList | undefined;
|
|
7
6
|
onQuantityChanged: (quantity: number) => void;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default CheckoutBarInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
1
|
+
import { PriceList } from '@bunnyapp/common';
|
|
2
|
+
declare const PlanPickerCheckoutBar: ({ selectedPriceList, handlePortalErrors, onCheckoutSuccess, }: {
|
|
3
|
+
selectedPriceList: PriceList;
|
|
4
4
|
handlePortalErrors?: ((errors: any) => void) | undefined;
|
|
5
5
|
onCheckoutSuccess: () => void;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
7
|
-
export default
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default PlanPickerCheckoutBar;
|
|
@@ -5,7 +5,7 @@ type PlanAddonsCardProps = {
|
|
|
5
5
|
addonPlans: Plan[];
|
|
6
6
|
selectedProduct: Product | undefined;
|
|
7
7
|
priceListChangeOptions: PriceListChangeOptions | undefined;
|
|
8
|
-
selectedBillingPeriod: BillingPeriod
|
|
8
|
+
selectedBillingPeriod: BillingPeriod;
|
|
9
9
|
};
|
|
10
10
|
declare const PlanAddonsCard: ({ selectedPriceList, subscriptions, addonPlans, selectedProduct, priceListChangeOptions, selectedBillingPeriod, }: PlanAddonsCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default PlanAddonsCard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Feature, PriceList, Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, noBorder, }: {
|
|
2
|
+
declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCurrentPlan, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, noBorder, onClickPriceListCard, }: {
|
|
3
3
|
hideButton?: boolean | undefined;
|
|
4
4
|
description: string;
|
|
5
5
|
disableSelectCurrentPlan: boolean;
|
|
@@ -10,5 +10,6 @@ declare const PriceListCardDesktop: ({ hideButton, description, disableSelectCur
|
|
|
10
10
|
subscriptionPlan?: Subscription | undefined;
|
|
11
11
|
trialRemainingDays?: number | undefined;
|
|
12
12
|
noBorder?: boolean | undefined;
|
|
13
|
+
onClickPriceListCard?: ((priceList: PriceList) => void) | undefined;
|
|
13
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export default PriceListCardDesktop;
|
|
@@ -10,6 +10,7 @@ type PriceListGridDesktopProps = {
|
|
|
10
10
|
subscriptions: Subscription[];
|
|
11
11
|
trialRemainingDays: number;
|
|
12
12
|
selectedBillingPeriod?: BillingPeriod | undefined;
|
|
13
|
+
onClickPriceListCard: (priceList: PriceList) => void;
|
|
13
14
|
};
|
|
14
|
-
declare const PriceListGridDesktop: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, trialRemainingDays, selectedBillingPeriod, }: PriceListGridDesktopProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const PriceListGridDesktop: ({ availablePriceLists, priceListChangeOptions, priceListStart, selectedPriceList, selectedProduct, setPriceListStart, subscriptions, trialRemainingDays, selectedBillingPeriod, onClickPriceListCard, }: PriceListGridDesktopProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default PriceListGridDesktop;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const calculateNewQuantity: (
|
|
1
|
+
import { PriceListCharge } from '@bunnyapp/common';
|
|
2
|
+
export declare const calculateNewQuantity: (priceListCharge: PriceListCharge, currentQuantity?: number) => number;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Feature, PriceList, Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const PriceListCardMobile: ({ description,
|
|
2
|
+
declare const PriceListCardMobile: ({ description, feature, isPriceListCurrentSubscription, isSelected, priceList, subscriptionPlan, trialRemainingDays, disableOnClickPriceListCard, onClickPriceListCard, }: {
|
|
3
3
|
description: string;
|
|
4
|
-
disableOnClick: boolean;
|
|
5
4
|
feature?: Feature | undefined;
|
|
6
5
|
isPriceListCurrentSubscription: boolean;
|
|
7
6
|
isSelected: boolean;
|
|
8
7
|
priceList: PriceList;
|
|
9
8
|
subscriptionPlan?: Subscription | undefined;
|
|
10
9
|
trialRemainingDays?: number | undefined;
|
|
10
|
+
disableOnClickPriceListCard: boolean;
|
|
11
|
+
onClickPriceListCard?: ((priceList: PriceList) => void) | undefined;
|
|
11
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default PriceListCardMobile;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { PriceList, PriceListChangeOptions, Product, Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const PriceListGridMobile: ({ availablePriceLists, priceListChangeOptions, selectedPriceList, selectedProduct, subscriptions, trialRemainingDays, }: {
|
|
2
|
+
declare const PriceListGridMobile: ({ availablePriceLists, priceListChangeOptions, selectedPriceList, selectedProduct, subscriptions, trialRemainingDays, onClickPriceListCard, }: {
|
|
3
3
|
availablePriceLists: PriceList[];
|
|
4
4
|
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
5
5
|
selectedPriceList?: PriceList | undefined;
|
|
6
6
|
selectedProduct?: Product | undefined;
|
|
7
7
|
subscriptions?: Subscription[] | undefined;
|
|
8
8
|
trialRemainingDays?: number | undefined;
|
|
9
|
+
onClickPriceListCard: (priceList: PriceList) => void;
|
|
9
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default PriceListGridMobile;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { PriceList, Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const PriceListCard: ({ hideButton, isSelected, priceList, subscriptions, trialRemainingDays, noBorder, }: {
|
|
2
|
+
declare const PriceListCard: ({ hideButton, isSelected, priceList, subscriptions, trialRemainingDays, noBorder, onClickPriceListCard, }: {
|
|
3
3
|
hideButton?: boolean | undefined;
|
|
4
4
|
isSelected: boolean;
|
|
5
5
|
priceList: PriceList;
|
|
6
6
|
subscriptions?: Subscription[] | undefined;
|
|
7
7
|
trialRemainingDays?: number | undefined;
|
|
8
8
|
noBorder?: boolean | undefined;
|
|
9
|
+
onClickPriceListCard?: ((priceList: PriceList) => void) | undefined;
|
|
9
10
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
11
|
export default PriceListCard;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, priceListChangeOptions,
|
|
1
|
+
import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const PriceListSelector: ({ arePlanChangeOptionsLoading, areSubscriptionsLoading, priceListChangeOptions, subscriptions, }: {
|
|
3
3
|
arePlanChangeOptionsLoading: boolean;
|
|
4
4
|
areSubscriptionsLoading: boolean;
|
|
5
5
|
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
6
|
-
selectedPriceList?: PriceList | undefined;
|
|
7
6
|
subscriptions: Subscription[];
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default PriceListSelector;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
export type EditingQuoteDataType = {
|
|
3
|
+
id: string;
|
|
4
|
+
isTrial: boolean;
|
|
5
|
+
};
|
|
6
|
+
interface QuantityDrawerContainerProps {
|
|
7
|
+
subscriptions: Subscription[];
|
|
8
|
+
quantityDrawerOpen: boolean;
|
|
9
|
+
setQuantityDrawerOpen: (open: boolean) => void;
|
|
10
|
+
handlePortalErrors?: (errors: any) => void;
|
|
11
|
+
setHideExpiredState: (hide: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const QuantityDrawerContainer: ({ subscriptions, quantityDrawerOpen, setQuantityDrawerOpen, handlePortalErrors, setHideExpiredState, }: QuantityDrawerContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default QuantityDrawerContainer;
|
package/dist/cjs/src/components/Subscriptions/quantityChangeDrawer/QuantityChangeGridRow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Quote, Subscription, SubscriptionCharge } from
|
|
2
|
-
declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions, subscriptionIndex, setEditingQuoteData, subscription, subscriptionCharge, }: {
|
|
1
|
+
import { Quote, Subscription, SubscriptionCharge } from '@bunnyapp/common';
|
|
2
|
+
declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions, subscriptionIndex, setEditingQuoteData, subscription, subscriptionCharge, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
|
|
3
3
|
chargeIndex: number;
|
|
4
4
|
editingQuote?: Quote | undefined;
|
|
5
5
|
subscriptions: Subscription[];
|
|
@@ -7,5 +7,7 @@ declare const QuantityChangeGridRow: ({ chargeIndex, editingQuote, subscriptions
|
|
|
7
7
|
setEditingQuoteData: (value: any) => void;
|
|
8
8
|
subscription: Subscription;
|
|
9
9
|
subscriptionCharge: SubscriptionCharge;
|
|
10
|
+
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
|
11
|
+
updatingChargeQuantityId: string | undefined;
|
|
10
12
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
13
|
export default QuantityChangeGridRow;
|
|
@@ -2,11 +2,11 @@ import { Quote, Subscription, SubscriptionCharge } from '@bunnyapp/common';
|
|
|
2
2
|
export type EditingSubscriptionType = {
|
|
3
3
|
chargeId: string;
|
|
4
4
|
chargeIndex: number;
|
|
5
|
-
quantity: number;
|
|
5
|
+
quantity: number | undefined;
|
|
6
6
|
subscription: Subscription;
|
|
7
7
|
subscriptionIndex: number;
|
|
8
8
|
};
|
|
9
|
-
declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuoteData, subscription, subscriptionIndex, subscriptions, }: {
|
|
9
|
+
declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuoteData, subscription, subscriptionIndex, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
|
|
10
10
|
charge: SubscriptionCharge;
|
|
11
11
|
chargeIndex: number;
|
|
12
12
|
editingQuote?: Quote | undefined;
|
|
@@ -17,5 +17,7 @@ declare const QuantityInput: ({ charge, chargeIndex, editingQuote, setEditingQuo
|
|
|
17
17
|
subscription: Subscription;
|
|
18
18
|
subscriptionIndex: number;
|
|
19
19
|
subscriptions: Subscription[];
|
|
20
|
+
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
|
21
|
+
updatingChargeQuantityId: string | undefined;
|
|
20
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export default QuantityInput;
|
|
@@ -2,7 +2,7 @@ import { Quote, Subscription } from '@bunnyapp/common';
|
|
|
2
2
|
import { EditingQuoteDataType } from '../../SubscriptionsListContainer';
|
|
3
3
|
export declare const QUANTITY_CHANGE_HEADER_TITLE = "Update unit quantity";
|
|
4
4
|
export declare const QUANTITY_CHANGE_HEADER_DESCRIPTION = "Adjust quantities below. The change will take effect immediately after checkout has been completed.";
|
|
5
|
-
declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, onClose, open, openCheckout, setEditingQuoteData, subscriptions, }: {
|
|
5
|
+
declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, onClose, open, openCheckout, setEditingQuoteData, subscriptions, setUpdatingChargeQuantityId, updatingChargeQuantityId, }: {
|
|
6
6
|
editingQuote?: Quote | undefined;
|
|
7
7
|
editingQuoteData?: EditingQuoteDataType | undefined;
|
|
8
8
|
onClose: () => void;
|
|
@@ -10,5 +10,7 @@ declare const QuantityChangeDrawerDesktop: ({ editingQuote, editingQuoteData, on
|
|
|
10
10
|
openCheckout: () => void;
|
|
11
11
|
setEditingQuoteData: (value: EditingQuoteDataType | undefined) => void;
|
|
12
12
|
subscriptions: Subscription[];
|
|
13
|
+
setUpdatingChargeQuantityId: (updatingChargeQuantityId: string | undefined) => void;
|
|
14
|
+
updatingChargeQuantityId: string | undefined;
|
|
13
15
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
16
|
export default QuantityChangeDrawerDesktop;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
declare const ChangeQuantitiesButton: ({
|
|
2
|
-
canShowChangeQuantitiesButton: boolean;
|
|
1
|
+
declare const ChangeQuantitiesButton: ({ setQuantityDrawerOpen, }: {
|
|
3
2
|
setQuantityDrawerOpen: (value: boolean) => void;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export default ChangeQuantitiesButton;
|
package/dist/cjs/src/components/Subscriptions/subscriptionsList/SubscriptionCardActions.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PriceListChangeOptions, Subscription } from '@bunnyapp/common';
|
|
2
|
-
declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, }: {
|
|
2
|
+
declare const SubscriptionCardActions: ({ onChangePlanClick, onCancelSubscriptionClick, priceListChangeOptions, subscription, isPaymentMethodLoading, }: {
|
|
3
3
|
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
4
4
|
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
5
|
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
6
6
|
subscription: Subscription;
|
|
7
|
+
isPaymentMethodLoading: boolean;
|
|
7
8
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
export default SubscriptionCardActions;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick,
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const SubscriptionCardHeader: ({ onChangePlanClick, onCancelSubscriptionClick, subscription, }: {
|
|
3
3
|
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
4
4
|
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
|
-
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
6
5
|
subscription: Subscription;
|
|
7
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default SubscriptionCardHeader;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const SubscriptionsList: ({ hideExpired, onChangePlanClick, onCancelSubscriptionClick,
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const SubscriptionsList: ({ hideExpired, onChangePlanClick, onCancelSubscriptionClick, subscriptions, }: {
|
|
3
3
|
hideExpired: boolean;
|
|
4
4
|
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
5
|
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
6
|
-
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
7
6
|
subscriptions: Subscription[];
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default SubscriptionsList;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const SubscriptionCardDesktop: ({ onChangePlanClick, onCancelSubscriptionClick,
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const SubscriptionCardDesktop: ({ onChangePlanClick, onCancelSubscriptionClick, subscription, isAddon, }: {
|
|
3
3
|
onChangePlanClick?: ((subscription: Subscription) => void) | undefined;
|
|
4
4
|
onCancelSubscriptionClick?: ((subscription: Subscription) => void) | undefined;
|
|
5
|
-
priceListChangeOptions?: PriceListChangeOptions | undefined;
|
|
6
5
|
subscription: Subscription;
|
|
7
6
|
isAddon?: boolean | undefined;
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Transaction, TransactionKind } from '@bunnyapp/common';
|
|
3
3
|
import { ShadowType } from '../../types/shadowType';
|
|
4
4
|
import { TransactionListColumnType } from './transactionsList/TransactionsListDesktop';
|
|
5
|
-
import { TransactionDateType } from '
|
|
5
|
+
import { TransactionDateType } from '../../contexts/TransactionsListContext';
|
|
6
6
|
export default function Transactions({ transactionComponent, showSearchBar, showTitle, title, columns, className, shadow, searchBarClassName, useModal, onTransactionClick, suppressTransactionDisplay, kindsToShow, style, filter, noTransactionsMessage, filterTransactions, sortTransactions, transactionDateType, hidePaymentForm, }: {
|
|
7
7
|
/** A custom component to render instead of the default invoice component */
|
|
8
8
|
transactionComponent?: React.ReactNode;
|
|
@@ -49,7 +49,7 @@ export default function Transactions({ transactionComponent, showSearchBar, show
|
|
|
49
49
|
hidePaymentForm?: boolean;
|
|
50
50
|
}): import("react/jsx-runtime").JSX.Element;
|
|
51
51
|
export declare function TransactionsDisplay({ transactions, onSearchValueChanged, search, }: {
|
|
52
|
-
transactions: Transaction[];
|
|
52
|
+
transactions: Transaction[] | undefined;
|
|
53
53
|
onSearchValueChanged: (value: string) => void;
|
|
54
54
|
search: string;
|
|
55
55
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Transaction } from '@bunnyapp/common';
|
|
2
2
|
export type TransactionListColumnType = 'date' | 'title' | 'state' | 'amount' | 'download' | 'accountName';
|
|
3
3
|
declare const TransactionsListDesktop: ({ transactions, onTransactionClick, }: {
|
|
4
|
-
transactions: Transaction[];
|
|
4
|
+
transactions: Transaction[] | undefined;
|
|
5
5
|
onTransactionClick?: ((transaction: Transaction) => void) | undefined;
|
|
6
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default TransactionsListDesktop;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Transaction } from '@bunnyapp/common';
|
|
2
2
|
declare const TransactionsListMobile: ({ transactions, onTransactionClick, }: {
|
|
3
|
-
transactions: Transaction[];
|
|
3
|
+
transactions: Transaction[] | undefined;
|
|
4
4
|
onTransactionClick: (transaction: Transaction) => void;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default TransactionsListMobile;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Transaction } from '@bunnyapp/common';
|
|
2
|
-
import { TransactionDateType } from '
|
|
2
|
+
import { TransactionDateType } from '../../../contexts/TransactionsListContext';
|
|
3
3
|
export declare function transactionDateToDisplay(transaction: Transaction, transactionDateType: TransactionDateType): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ShadowType } from
|
|
3
|
-
import { FormattedInvoice, FormattedQuote } from
|
|
2
|
+
import { ShadowType } from '../types/shadowType';
|
|
3
|
+
import { FormattedInvoice, FormattedQuote } from '@bunnyapp/common';
|
|
4
4
|
export type InvoiceQuoteContextProps = {
|
|
5
5
|
id?: string;
|
|
6
6
|
invoiceQuoteViewComponent?: React.ReactNode;
|
|
@@ -11,9 +11,5 @@ export type SubscriptionsContextValues = {
|
|
|
11
11
|
hideExpired?: boolean;
|
|
12
12
|
upgradingSubscription?: Subscription;
|
|
13
13
|
setUpgradingSubscription: React.Dispatch<React.SetStateAction<Subscription | undefined>>;
|
|
14
|
-
updatingChargeQuantityId?: string;
|
|
15
|
-
setUpdatingChargeQuantityId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
16
|
-
subscriptionUpgradeId: string | null;
|
|
17
|
-
setSubscriptionUpgradeId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
18
14
|
};
|
|
19
15
|
export declare const SubscriptionsContext: import("react").Context<SubscriptionsContextValues>;
|
package/dist/{esm/src/components/Transactions → cjs/src/contexts}/TransactionsListContext.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Transaction, TransactionKind } from '@bunnyapp/common';
|
|
3
|
-
import { ShadowType } from '
|
|
4
|
-
import { TransactionListColumnType } from '
|
|
3
|
+
import { ShadowType } from '../types/shadowType';
|
|
4
|
+
import { TransactionListColumnType } from '../components/Transactions/transactionsList/TransactionsListDesktop';
|
|
5
5
|
export type TransactionsContextValues = {
|
|
6
6
|
showSearchBar?: boolean;
|
|
7
7
|
showTitle?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QuoteCharge } from '@bunnyapp/common';
|
|
1
2
|
declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteChargeId, startDate, subtotal, apiHost, token, }: {
|
|
2
3
|
discount?: number | undefined;
|
|
3
4
|
name?: string | undefined;
|
|
@@ -8,5 +9,5 @@ declare const quoteChargeUpdate: ({ discount, name, price, quantity, quoteCharge
|
|
|
8
9
|
subtotal?: number | undefined;
|
|
9
10
|
apiHost: string;
|
|
10
11
|
token: string;
|
|
11
|
-
}) => Promise<
|
|
12
|
+
}) => Promise<QuoteCharge>;
|
|
12
13
|
export default quoteChargeUpdate;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { PriceList, Quote, Subscription } from '@bunnyapp/common';
|
|
2
|
-
|
|
3
|
-
export declare const useQuoteCreate: ({ editingQuote, setEditingQuoteData, upgradingSubscription, selectedPriceList, token, }: {
|
|
4
|
-
editingQuote?: EditingQuoteDataType | undefined;
|
|
5
|
-
setEditingQuoteData: (quoteId?: string, isTrial?: boolean) => void;
|
|
2
|
+
export declare const useQuoteCreate: ({ upgradingSubscription, selectedPriceList, token, }: {
|
|
6
3
|
upgradingSubscription?: Subscription | undefined;
|
|
7
4
|
selectedPriceList?: PriceList | undefined;
|
|
8
5
|
token?: string | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PriceList, Quote } from '@bunnyapp/common';
|
|
2
|
+
export declare const useQuoteQuantities: ({ selectedPriceList, quote, }: {
|
|
3
|
+
selectedPriceList: PriceList;
|
|
4
|
+
quote?: Quote | undefined;
|
|
5
|
+
}) => {
|
|
6
|
+
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
|
7
|
+
getFeatureQuantity: (featureId: string) => number | undefined;
|
|
8
|
+
isUpdatingCharges: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Hook to manage feature quantities using a dictionary keyed by feature ID
|
|
12
|
+
* This tracks quantities for each unique feature.
|
|
13
|
+
*/
|
|
14
|
+
export type FeatureQuantitiesDict = Record<string, number | undefined>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { currentUser as CurrentUser } from '@bunnyapp/common';
|
|
2
2
|
declare const useCurrentUserData: (token: string | undefined) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
currentUser: {
|
|
4
|
+
authObjectName: any;
|
|
5
|
+
account: any;
|
|
6
|
+
companyName: any;
|
|
7
|
+
returnUrl: any;
|
|
8
|
+
privacyUrl: any;
|
|
9
|
+
termsUrl: any;
|
|
10
|
+
entityId: any;
|
|
11
|
+
} | CurrentUser;
|
|
12
|
+
isCurrentUserDataLoading: boolean;
|
|
13
|
+
};
|
|
11
14
|
export default useCurrentUserData;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PaymentMethod } from '@bunnyapp/common';
|
|
2
|
-
export declare const usePaymentMethod: ({ accountId, token, apiHost, }: {
|
|
2
|
+
export declare const usePaymentMethod: ({ accountId, token, apiHost, enabled, }: {
|
|
3
3
|
accountId?: string | undefined;
|
|
4
4
|
token?: string | undefined;
|
|
5
5
|
apiHost: string;
|
|
6
|
+
enabled?: boolean | undefined;
|
|
6
7
|
}) => {
|
|
7
8
|
paymentMethods: PaymentMethod[];
|
|
8
9
|
defaultPaymentMethod: PaymentMethod | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Subscription } from '@bunnyapp/common';
|
|
2
|
+
declare const usePriceListChangeOptions: (onChangePlanClick?: ((subscription: Subscription) => void) | undefined) => {
|
|
3
|
+
priceListChangeOptions: any;
|
|
4
|
+
arePriceListChangeOptionsLoading: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default usePriceListChangeOptions;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Subscription } from '@bunnyapp/common';
|
|
1
|
+
import { Plan, PriceList, Subscription } from '@bunnyapp/common';
|
|
2
2
|
export declare const ADDON_INDENTATION = 64;
|
|
3
3
|
export declare function findNonAddonSubscriptions(subscriptions: Subscription[]): Subscription[];
|
|
4
4
|
export declare function findAddonSubscriptions(parentSubscription: Subscription, subscriptions: Subscription[]): Subscription[];
|
|
5
|
+
export declare function hasUnpurchasedAddonPlans(priceList: PriceList, currentSubscription: Subscription | undefined): boolean | undefined;
|
|
6
|
+
export declare function addonPlanSwitchTestId(addonPlan: Plan): string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { PriceList, PriceListCharge, Subscription } from '@bunnyapp/common';
|
|
1
|
+
import { PriceList, PriceListCharge, Quote, Subscription } from '@bunnyapp/common';
|
|
2
2
|
export declare function isAddonPurchased(featureAddon: PriceListCharge, currentSubscription: Subscription | undefined): boolean;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function hasUnpurchasedFeatureAddons(priceList: PriceList, currentSubscription: Subscription | undefined): boolean;
|
|
4
|
+
export declare function findQuoteChangeForFeatureAddon(quote: Quote): import("@bunnyapp/common").QuoteChange | undefined;
|
|
5
|
+
export declare function featureAddonInQuote(selectedPriceList: PriceList, priceListCharge: PriceListCharge, quote?: Quote): boolean;
|
|
6
|
+
export declare function featureAddonSwitchTestId(featureAddon: PriceListCharge): string;
|