@bunnyapp/components 1.6.0 → 1.7.0-beta.3
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 +1561 -1258
- package/dist/cjs/types/src/components/BillingDetails/BillingDetailsForm.d.ts +0 -1
- package/dist/cjs/types/src/components/BillingDetails/components/AddContactButton.d.ts +3 -0
- package/dist/cjs/types/src/components/BillingDetails/components/AddContactModal.d.ts +8 -0
- package/dist/cjs/types/src/components/BillingDetails/fragments/AccountContactsFragment.d.ts +9 -0
- package/dist/cjs/types/src/components/BillingDetails/fragments/BillingDetailsSection_AccountFragment.d.ts +20 -0
- package/dist/cjs/types/src/components/BillingDetails/hooks/useSetAccountContactsQueryData.d.ts +5 -0
- package/dist/cjs/types/src/components/BillingDetails/mutations/accountUpdate.d.ts +22 -0
- package/dist/cjs/types/src/components/BillingDetails/mutations/contactCreate.d.ts +22 -0
- package/dist/cjs/types/src/components/BillingDetails/queries/getAccount.d.ts +9 -0
- package/dist/cjs/types/src/components/BillingDetails/queries/getAccountContacts.d.ts +9 -0
- package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +2 -1
- package/dist/cjs/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +7 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteRecalculateTaxes.d.ts +11 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSetQuoteQueryData.d.ts +5 -0
- package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteRecalculateTaxes.d.ts +11 -0
- package/dist/cjs/types/src/components/Subscriptions/AddonSubscriptionCards.d.ts +3 -2
- package/dist/cjs/types/src/components/Subscriptions/SubscriptionsListContainer.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +15 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutButton.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +12 -3
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/fragments/FeatureAddonRow_QuoteFragment.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/fragments/useQuoteUpdateFeatureAddon_QuoteFragment.d.ts +8 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/hooks/useQuoteUpdateFeatureAddon.d.ts +9 -0
- package/dist/cjs/types/src/{graphql → components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons}/mutations/quoteChargeCreate.d.ts +12 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/components/AddonPlanRow.d.ts +1 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlanRow_QuoteFragment.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/useToggleAddonPlan_QuoteFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/hooks/useToggleAddonQuoteChange.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/mutations/quoteChangeCreate.d.ts +18 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/mutations/quoteChangeDelete.d.ts +15 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIsLoadingContext.d.ts +5 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +6 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteRecalculateTaxes.d.ts +11 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/mutations/quoteDelete.d.ts +12 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/mutations/quoteRecalculateTaxes.d.ts +11 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/QuantityInput.d.ts +10 -1
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/QuoteIsLoadingUpdater.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts +3 -1
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +10 -0
- package/dist/esm/index.js +1562 -1259
- package/dist/esm/types/src/components/BillingDetails/BillingDetailsForm.d.ts +0 -1
- package/dist/esm/types/src/components/BillingDetails/components/AddContactButton.d.ts +3 -0
- package/dist/esm/types/src/components/BillingDetails/components/AddContactModal.d.ts +8 -0
- package/dist/esm/types/src/components/BillingDetails/fragments/AccountContactsFragment.d.ts +9 -0
- package/dist/esm/types/src/components/BillingDetails/fragments/BillingDetailsSection_AccountFragment.d.ts +20 -0
- package/dist/esm/types/src/components/BillingDetails/hooks/useSetAccountContactsQueryData.d.ts +5 -0
- package/dist/esm/types/src/components/BillingDetails/mutations/accountUpdate.d.ts +22 -0
- package/dist/esm/types/src/components/BillingDetails/mutations/contactCreate.d.ts +22 -0
- package/dist/esm/types/src/components/BillingDetails/queries/getAccount.d.ts +9 -0
- package/dist/esm/types/src/components/BillingDetails/queries/getAccountContacts.d.ts +9 -0
- package/dist/esm/types/src/components/Checkout/Checkout.d.ts +2 -1
- package/dist/esm/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +7 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteRecalculateTaxes.d.ts +11 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSetQuoteQueryData.d.ts +5 -0
- package/dist/esm/types/src/components/QuoteProvider/mutations/quoteRecalculateTaxes.d.ts +11 -0
- package/dist/esm/types/src/components/Subscriptions/AddonSubscriptionCards.d.ts +3 -2
- package/dist/esm/types/src/components/Subscriptions/SubscriptionsListContainer.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarSummarySection.d.ts +15 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutButton.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +12 -3
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/fragments/FeatureAddonRow_QuoteFragment.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/fragments/useQuoteUpdateFeatureAddon_QuoteFragment.d.ts +8 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/hooks/useQuoteUpdateFeatureAddon.d.ts +9 -0
- package/dist/esm/types/src/{graphql → components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons}/mutations/quoteChargeCreate.d.ts +12 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/components/AddonPlanRow.d.ts +1 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlanRow_QuoteFragment.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/useToggleAddonPlan_QuoteFragment.d.ts +13 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/hooks/useToggleAddonQuoteChange.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/mutations/quoteChangeCreate.d.ts +18 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/mutations/quoteChangeDelete.d.ts +15 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteIsLoadingContext.d.ts +5 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +6 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/hooks/useQuoteRecalculateTaxes.d.ts +11 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/mutations/quoteDelete.d.ts +12 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/mutations/quoteRecalculateTaxes.d.ts +11 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/QuantityInput.d.ts +10 -1
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/quantityInput/QuoteIsLoadingUpdater.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts +3 -1
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +10 -0
- package/package.json +2 -2
- package/dist/cjs/types/src/graphql/mutations/billingDetailsUpdate.d.ts +0 -6
- package/dist/cjs/types/src/graphql/mutations/quoteAddonCreate.d.ts +0 -7
- package/dist/cjs/types/src/graphql/mutations/quoteChangeCreate.d.ts +0 -8
- package/dist/cjs/types/src/graphql/mutations/quoteChangeDelete.d.ts +0 -6
- package/dist/cjs/types/src/graphql/queries/getBillingDetails.d.ts +0 -6
- package/dist/cjs/types/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +0 -7
- package/dist/cjs/types/src/hooks/useToggleAddonQuoteChange.d.ts +0 -7
- package/dist/esm/types/src/graphql/mutations/billingDetailsUpdate.d.ts +0 -6
- package/dist/esm/types/src/graphql/mutations/quoteAddonCreate.d.ts +0 -7
- package/dist/esm/types/src/graphql/mutations/quoteChangeCreate.d.ts +0 -8
- package/dist/esm/types/src/graphql/mutations/quoteChangeDelete.d.ts +0 -6
- package/dist/esm/types/src/graphql/queries/getBillingDetails.d.ts +0 -6
- package/dist/esm/types/src/hooks/quotes/useQuoteUpdateFeatureAddon.d.ts +0 -7
- package/dist/esm/types/src/hooks/useToggleAddonQuoteChange.d.ts +0 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type AddContactModalProps = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
accountId: string | undefined;
|
|
5
|
+
onContactCreated?: (contactId: string) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const AddContactModal: ({ open, onClose, accountId, onContactCreated, }: AddContactModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const BillingDetailsSection_AccountFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string;
|
|
3
|
+
name: string | null;
|
|
4
|
+
billingStreet: string | null;
|
|
5
|
+
billingCity: string | null;
|
|
6
|
+
billingState: string | null;
|
|
7
|
+
billingZip: string | null;
|
|
8
|
+
billingCountry: string | null;
|
|
9
|
+
taxNumber: string | null;
|
|
10
|
+
billingContactId: string | null;
|
|
11
|
+
secondaryBillingContactIds: string[] | null;
|
|
12
|
+
billingContact: {
|
|
13
|
+
email: string | null;
|
|
14
|
+
firstName: string;
|
|
15
|
+
} | null;
|
|
16
|
+
}, {}, {
|
|
17
|
+
fragment: "BillingDetailsSection_AccountFragment";
|
|
18
|
+
on: "Account";
|
|
19
|
+
masked: true;
|
|
20
|
+
}>;
|
package/dist/cjs/types/src/components/BillingDetails/hooks/useSetAccountContactsQueryData.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { AccountContactsFragment } from '../fragments/AccountContactsFragment';
|
|
3
|
+
export declare const useSetAccountContactsQueryData: () => {
|
|
4
|
+
setAccountContactsQueryData: (accountId: string, updater: FragmentOf<typeof AccountContactsFragment>[] | null | ((oldContacts: FragmentOf<typeof AccountContactsFragment>[] | null | undefined) => FragmentOf<typeof AccountContactsFragment>[] | null)) => void;
|
|
5
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type AccountUpdateProps = {
|
|
2
|
+
apiHost: string;
|
|
3
|
+
accountId: string;
|
|
4
|
+
attributes: {
|
|
5
|
+
name?: string | null;
|
|
6
|
+
billingStreet?: string | null;
|
|
7
|
+
billingCity?: string | null;
|
|
8
|
+
billingState?: string | null;
|
|
9
|
+
billingZip?: string | null;
|
|
10
|
+
billingCountry?: string | null;
|
|
11
|
+
taxNumber?: string | null;
|
|
12
|
+
billingContactId?: string | null;
|
|
13
|
+
secondaryBillingContactIds?: string[] | null;
|
|
14
|
+
};
|
|
15
|
+
token?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const accountUpdate: ({ accountId, attributes, apiHost, token, }: AccountUpdateProps) => Promise<{
|
|
18
|
+
[$tada.fragmentRefs]: {
|
|
19
|
+
BillingDetailsSection_AccountFragment: "Account";
|
|
20
|
+
};
|
|
21
|
+
} | null | undefined>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type ContactCreateProps = {
|
|
2
|
+
apiHost: string;
|
|
3
|
+
attributes: {
|
|
4
|
+
email?: string | null;
|
|
5
|
+
firstName?: string | null;
|
|
6
|
+
lastName?: string | null;
|
|
7
|
+
accountId?: string | null;
|
|
8
|
+
portalAccess?: boolean | null;
|
|
9
|
+
};
|
|
10
|
+
token?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const contactCreate: ({ attributes, apiHost, token }: ContactCreateProps) => Promise<{
|
|
13
|
+
id: string;
|
|
14
|
+
account: {
|
|
15
|
+
contacts: {
|
|
16
|
+
[$tada.fragmentRefs]: {
|
|
17
|
+
AccountContactsFragment: "Contact";
|
|
18
|
+
};
|
|
19
|
+
}[] | null;
|
|
20
|
+
} | null;
|
|
21
|
+
} | null | undefined>;
|
|
22
|
+
export {};
|
|
@@ -19,10 +19,11 @@ type CheckoutProps = {
|
|
|
19
19
|
onCancel: () => void;
|
|
20
20
|
onFail: (error: any) => void;
|
|
21
21
|
onSuccess: () => void;
|
|
22
|
+
onRecalculateTaxes: (quoteId: string) => void;
|
|
22
23
|
open: boolean;
|
|
23
24
|
quote?: FragmentOf<typeof Checkout_QuoteFragment> | null;
|
|
24
25
|
token?: string;
|
|
25
26
|
isUpdatingQuote: boolean;
|
|
26
27
|
};
|
|
27
|
-
declare const Checkout: ({ onCancel, onSuccess, onFail, invoice, open, quote: maskedQuote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
declare const Checkout: ({ onCancel, onSuccess, onFail, onRecalculateTaxes, invoice, open, quote: maskedQuote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
28
29
|
export default Checkout;
|
|
@@ -15,5 +15,6 @@ export type QuoteContextValues = {
|
|
|
15
15
|
onClearQuote: () => void;
|
|
16
16
|
onChangeSelectedPriceList: (priceList: PriceList) => void;
|
|
17
17
|
onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
|
|
18
|
+
onRecalculateTaxes: (quoteId: string) => void;
|
|
18
19
|
};
|
|
19
20
|
export declare const QuoteContext: import("react").Context<QuoteContextValues>;
|
|
@@ -14,6 +14,7 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
|
|
|
14
14
|
id: string | null;
|
|
15
15
|
currencyId: string;
|
|
16
16
|
amountDue: number | null;
|
|
17
|
+
startDate: unknown;
|
|
17
18
|
quoteChanges: {
|
|
18
19
|
id: string | null;
|
|
19
20
|
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
@@ -38,6 +39,12 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
|
|
|
38
39
|
}[] | null;
|
|
39
40
|
[$tada.fragmentRefs]: {
|
|
40
41
|
PlanPickerCheckoutBar_QuoteFragment: "Quote";
|
|
42
|
+
} & {
|
|
43
|
+
CheckoutBarSummarySection_QuoteFragment: "Quote";
|
|
44
|
+
} & {
|
|
45
|
+
AddonPlanRow_QuoteFragment: "Quote";
|
|
46
|
+
} & {
|
|
47
|
+
FeatureAddonRow_QuoteFragment: "Quote";
|
|
41
48
|
};
|
|
42
49
|
}, {}, {
|
|
43
50
|
fragment: "QuoteContext_QuoteFragment";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const useQuoteRecalculateTaxes: () => {
|
|
2
|
+
quoteRecalculateTaxesMutation: import("@tanstack/react-query").UseMutateFunction<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
5
|
+
};
|
|
6
|
+
id: string | null;
|
|
7
|
+
} | null | undefined, Error, {
|
|
8
|
+
quoteId: string;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
isRecalculatingTaxes: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
|
|
3
|
+
export declare const useSetQuoteQueryData: () => {
|
|
4
|
+
setQuoteQueryData: (quoteId: string, quote: FragmentOf<typeof QuoteContext_QuoteFragment> | null) => void;
|
|
5
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const quoteRecalculateTaxes: ({ quoteId, apiHost, token, }: {
|
|
2
|
+
quoteId: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
[$tada.fragmentRefs]: {
|
|
7
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
8
|
+
};
|
|
9
|
+
id: string | null;
|
|
10
|
+
} | null | undefined>;
|
|
11
|
+
export default quoteRecalculateTaxes;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Subscription } from '@bunnyapp/common';
|
|
2
|
-
export declare function AddonSubscriptionsCards({ onCancelSubscriptionClick, subscriptions, subscription, showInactive, }: {
|
|
3
|
-
onCancelSubscriptionClick
|
|
2
|
+
export declare function AddonSubscriptionsCards({ onCancelSubscriptionClick, onChangePlanClick, subscriptions, subscription, showInactive, }: {
|
|
3
|
+
onCancelSubscriptionClick: (subscription: Subscription) => void;
|
|
4
|
+
onChangePlanClick: (subscription: Subscription) => void;
|
|
4
5
|
subscriptions: Subscription[];
|
|
5
6
|
subscription: Subscription;
|
|
6
7
|
showInactive: boolean;
|
|
@@ -3,8 +3,8 @@ import '../../styles/index.less';
|
|
|
3
3
|
declare const SubscriptionsListContainer: ({ companyName, showInactive, onCancelSubscriptionClick, onChangePlanClick, noSubscriptionsComponent, subscriptions, subscriptionsAreLoading, }: {
|
|
4
4
|
companyName: string;
|
|
5
5
|
showInactive?: boolean;
|
|
6
|
-
onCancelSubscriptionClick
|
|
7
|
-
onChangePlanClick
|
|
6
|
+
onCancelSubscriptionClick: (subscription: Subscription) => void;
|
|
7
|
+
onChangePlanClick: (subscription: Subscription) => void;
|
|
8
8
|
noSubscriptionsComponent?: React.ReactNode;
|
|
9
9
|
subscriptions: Subscription[];
|
|
10
10
|
subscriptionsAreLoading: boolean;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { PriceList } from '@bunnyapp/common';
|
|
2
|
-
declare const
|
|
3
|
-
|
|
2
|
+
export declare const CheckoutBarSummarySection_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
quoteChanges: {
|
|
4
|
+
charges: {
|
|
5
|
+
id: string | null;
|
|
6
|
+
}[];
|
|
7
|
+
}[] | null;
|
|
8
|
+
[$tada.fragmentRefs]: {
|
|
9
|
+
CheckoutPrice_QuoteFragment: "Quote";
|
|
10
|
+
};
|
|
11
|
+
}, {}, {
|
|
12
|
+
fragment: "CheckoutBarSummarySection_QuoteFragment";
|
|
13
|
+
on: "Quote";
|
|
14
|
+
masked: true;
|
|
15
|
+
}>;
|
|
16
|
+
declare const CheckoutBarSummarySection: ({ selectedPriceList, onClickCheckout, }: {
|
|
4
17
|
selectedPriceList: PriceList;
|
|
5
18
|
onClickCheckout: () => void;
|
|
6
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const CheckoutButton: ({
|
|
2
|
-
|
|
1
|
+
declare const CheckoutButton: ({ disabled, onClickCheckout, loading, tooltipText, }: {
|
|
2
|
+
disabled: boolean;
|
|
3
3
|
onClickCheckout: () => void;
|
|
4
4
|
loading: boolean;
|
|
5
5
|
tooltipText?: string;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { PriceList
|
|
2
|
-
|
|
1
|
+
import { PriceList } from '@bunnyapp/common';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
export declare const CheckoutPrice_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
|
+
periodAmount: number | null;
|
|
5
|
+
amountDue: number | null;
|
|
6
|
+
}, {}, {
|
|
7
|
+
fragment: "CheckoutPrice_QuoteFragment";
|
|
8
|
+
on: "Quote";
|
|
9
|
+
masked: true;
|
|
10
|
+
}>;
|
|
11
|
+
declare const CheckoutPrice: ({ isUsage, quote: maskedQuote, selectedPriceList, }: {
|
|
3
12
|
isUsage: boolean;
|
|
4
|
-
quote?:
|
|
13
|
+
quote?: FragmentOf<typeof CheckoutPrice_QuoteFragment>;
|
|
5
14
|
selectedPriceList: PriceList;
|
|
6
15
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
16
|
export default CheckoutPrice;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const FeatureAddonRow_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
[$tada.fragmentRefs]: {
|
|
3
|
+
useQuoteUpdateFeatureAddon_QuoteFragment: "Quote";
|
|
4
|
+
};
|
|
5
|
+
}, {}, {
|
|
6
|
+
fragment: "FeatureAddonRow_QuoteFragment";
|
|
7
|
+
on: "Quote";
|
|
8
|
+
masked: true;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PriceListCharge } from '@bunnyapp/common';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
import { useQuoteUpdateFeatureAddon_QuoteFragment } from '../fragments/useQuoteUpdateFeatureAddon_QuoteFragment';
|
|
4
|
+
export declare const useQuoteUpdateFeatureAddon: (maskedQuote: FragmentOf<typeof useQuoteUpdateFeatureAddon_QuoteFragment> | null | undefined, featureAddon: PriceListCharge) => {
|
|
5
|
+
handleAddFeatureAddon: () => void;
|
|
6
|
+
handleRemoveFeatureAddon: () => void;
|
|
7
|
+
isPending: boolean;
|
|
8
|
+
isChecked: boolean;
|
|
9
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { QuoteCharge } from '@bunnyapp/common';
|
|
2
1
|
type QuoteChangeCreateChargeProps = {
|
|
3
2
|
apiHost: string;
|
|
4
3
|
price?: number;
|
|
@@ -9,5 +8,16 @@ type QuoteChangeCreateChargeProps = {
|
|
|
9
8
|
subscriptionChargeId?: string;
|
|
10
9
|
token?: string;
|
|
11
10
|
};
|
|
12
|
-
declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<
|
|
11
|
+
declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<{
|
|
12
|
+
quoteChange: {
|
|
13
|
+
id: string | null;
|
|
14
|
+
quoteId: string;
|
|
15
|
+
quote: {
|
|
16
|
+
[$tada.fragmentRefs]: {
|
|
17
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
id: string | null;
|
|
22
|
+
} | null | undefined>;
|
|
13
23
|
export default quoteChargeCreate;
|
|
@@ -5,6 +5,7 @@ export declare const AddonPlanRow_PriceListFragment: import("gql.tada").TadaDocu
|
|
|
5
5
|
plan: {
|
|
6
6
|
description: string | null;
|
|
7
7
|
name: string;
|
|
8
|
+
pricingDescription: string | null;
|
|
8
9
|
} | null;
|
|
9
10
|
[$tada.fragmentRefs]: {
|
|
10
11
|
PriceListCardPriceDescription_PriceListFragment: "PriceList";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const useToggleAddonPlan_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
quoteChanges: {
|
|
3
|
+
priceList: {
|
|
4
|
+
id: string;
|
|
5
|
+
} | null;
|
|
6
|
+
id: string | null;
|
|
7
|
+
}[] | null;
|
|
8
|
+
id: string | null;
|
|
9
|
+
}, {}, {
|
|
10
|
+
fragment: "useToggleAddonPlan_QuoteFragment";
|
|
11
|
+
on: "Quote";
|
|
12
|
+
masked: true;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PriceList } from '@bunnyapp/common';
|
|
2
|
+
import { FragmentOf } from 'gql.tada';
|
|
3
|
+
import { useToggleAddonPlan_QuoteFragment } from '../fragments/useToggleAddonPlan_QuoteFragment';
|
|
4
|
+
export declare const useToggleAddonPlan: (maskedQuote: FragmentOf<typeof useToggleAddonPlan_QuoteFragment> | null | undefined, addonPriceListId: string, selectedPriceList: PriceList, setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>) => {
|
|
5
|
+
isPending: boolean;
|
|
6
|
+
addedQuoteChange: boolean;
|
|
7
|
+
deleteQuoteChange: () => void;
|
|
8
|
+
addAddonQuoteChange: () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const quoteChangeCreate: ({ parentQuoteChangeId, priceListId, apiHost, token, quoteId, }: {
|
|
2
|
+
parentQuoteChangeId: string;
|
|
3
|
+
priceListId: string;
|
|
4
|
+
apiHost: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
quoteId: string;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
errors: string[] | null;
|
|
9
|
+
quoteChange: {
|
|
10
|
+
id: string | null;
|
|
11
|
+
quote: {
|
|
12
|
+
[$tada.fragmentRefs]: {
|
|
13
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
} | null;
|
|
17
|
+
} | null>;
|
|
18
|
+
export default quoteChangeCreate;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const quoteChangeDelete: ({ id, apiHost, token, }: {
|
|
2
|
+
id: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
errors: string[] | null;
|
|
7
|
+
quoteChange: {
|
|
8
|
+
quote: {
|
|
9
|
+
[$tada.fragmentRefs]: {
|
|
10
|
+
QuoteContext_QuoteFragment: "Quote";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
} | null;
|
|
14
|
+
} | null>;
|
|
15
|
+
export default quoteChangeDelete;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const QuoteIsLoadingProvider: ({ initialValue, children, }: {
|
|
2
|
+
initialValue?: boolean | undefined;
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element, useQuoteIsLoading: () => [boolean, import("react").Dispatch<import("react").SetStateAction<boolean>>];
|
|
5
|
+
export { QuoteIsLoadingProvider, useQuoteIsLoading };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type QuoteRecalculateTaxesValue = (quoteId: string) => void;
|
|
2
|
+
declare const QuoteRecalculateTaxesProvider: ({ value, children }: {
|
|
3
|
+
value: QuoteRecalculateTaxesValue;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element, useQuoteRecalculateTaxes: () => QuoteRecalculateTaxesValue;
|
|
6
|
+
export { QuoteRecalculateTaxesProvider, useQuoteRecalculateTaxes };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const useQuoteRecalculateTaxes: () => {
|
|
2
|
+
quoteRecalculateTaxesMutation: import("@tanstack/react-query").UseMutateFunction<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
QuantityDrawer_QuoteFragment: "Quote";
|
|
5
|
+
};
|
|
6
|
+
id: string | null;
|
|
7
|
+
} | null | undefined, Error, {
|
|
8
|
+
quoteId: string;
|
|
9
|
+
}, unknown>;
|
|
10
|
+
isRecalculatingTaxes: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const quoteRecalculateTaxes: ({ quoteId, apiHost, token, }: {
|
|
2
|
+
quoteId: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
[$tada.fragmentRefs]: {
|
|
7
|
+
QuantityDrawer_QuoteFragment: "Quote";
|
|
8
|
+
};
|
|
9
|
+
id: string | null;
|
|
10
|
+
} | null | undefined>;
|
|
11
|
+
export default quoteRecalculateTaxes;
|
|
@@ -11,7 +11,6 @@ export declare const QuantityInput_SubscriptionChargeFragment: import("gql.tada"
|
|
|
11
11
|
}>;
|
|
12
12
|
export declare const QuantityInput_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
13
13
|
id: string;
|
|
14
|
-
state: "TRIAL" | "ACTIVE" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
|
|
15
14
|
priceList: {
|
|
16
15
|
id: string;
|
|
17
16
|
} | null;
|
|
@@ -30,6 +29,16 @@ export declare const QuantityInput_SubscriptionFragment: import("gql.tada").Tada
|
|
|
30
29
|
on: "Subscription";
|
|
31
30
|
masked: true;
|
|
32
31
|
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Design note:
|
|
34
|
+
* If the quantity is cleared by the user (quantity becomes undefined), we delete the quote.
|
|
35
|
+
*
|
|
36
|
+
* Rationale:
|
|
37
|
+
* The user may next change the quantity for a charge on a different subscription, and we need to
|
|
38
|
+
* allow creating a new quote/quoteChange in that context. Currently there is no way to create a
|
|
39
|
+
* quoteChange of kind "update" without first calling `quoteSubscriptionUpdate`, so we delete the
|
|
40
|
+
* existing quote to reset the flow.
|
|
41
|
+
*/
|
|
33
42
|
declare const QuantityInput: ({ charge: maskedCharge, subscription: maskedSubscription, setUpdatingChargeQuantityId, updatingChargeQuantityId, setErrorUpdatingQuantity, }: {
|
|
34
43
|
charge: FragmentOf<typeof QuantityInput_SubscriptionChargeFragment>;
|
|
35
44
|
subscription: FragmentOf<typeof QuantityInput_SubscriptionFragment>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Note: It is good practice to isolate useEffects into their own components.
|
|
3
|
+
* This approach helps prevent unnecessary re-renders when data is unchanged,
|
|
4
|
+
* since useEffect will only be triggered in this dedicated sibling component.
|
|
5
|
+
*/
|
|
6
|
+
declare const QuoteIsLoadingUpdater: ({ quoteIsPending }: {
|
|
7
|
+
quoteIsPending: boolean;
|
|
8
|
+
}) => null;
|
|
9
|
+
export default QuoteIsLoadingUpdater;
|
package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Subscription } from '@bunnyapp/common';
|
|
2
2
|
declare const SubscriptionsList: ({ showInactive, onChangePlanClick, onCancelSubscriptionClick, subscriptions, }: {
|
|
3
3
|
showInactive: boolean;
|
|
4
|
-
onChangePlanClick
|
|
5
|
-
onCancelSubscriptionClick
|
|
4
|
+
onChangePlanClick: (subscription: Subscription) => void;
|
|
5
|
+
onCancelSubscriptionClick: (subscription: Subscription) => void;
|
|
6
6
|
subscriptions: Subscription[];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default SubscriptionsList;
|
package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/TieredDisplayDropdown.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { PriceTier } from '@bunnyapp/common';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
|
|
3
|
+
import { PricingModel } from '@/graphql-codegen/exportedScalarTypes';
|
|
4
|
+
declare const TieredDisplayDropdown: ({ pricingModel, priceTiers, currencyId, priceDecimals, truncatedText, }: {
|
|
5
|
+
pricingModel: PricingModel;
|
|
4
6
|
priceTiers: PriceTier[];
|
|
5
7
|
currencyId: string;
|
|
6
8
|
priceDecimals: number;
|
|
@@ -9,6 +9,14 @@ interface BillingDetailsKeyParams {
|
|
|
9
9
|
entityId?: string;
|
|
10
10
|
token?: string;
|
|
11
11
|
}
|
|
12
|
+
interface AccountBillingDetailsKeyParams {
|
|
13
|
+
accountId?: string;
|
|
14
|
+
token?: string;
|
|
15
|
+
}
|
|
16
|
+
interface AccountContactsKeyParams {
|
|
17
|
+
accountId?: string;
|
|
18
|
+
token?: string;
|
|
19
|
+
}
|
|
12
20
|
interface CalculatedPricesKeyParams {
|
|
13
21
|
priceListId?: string;
|
|
14
22
|
quantity?: number;
|
|
@@ -65,6 +73,8 @@ interface TransactionsKeyParams {
|
|
|
65
73
|
declare const QueryKeyFactory: {
|
|
66
74
|
accountPaymentMethodsKey: ({ accountId, entityId, token }: AccountPaymentMethodKeyParams) => string[];
|
|
67
75
|
billingDetailsKey: ({ entityId, token }: BillingDetailsKeyParams) => string[];
|
|
76
|
+
accountBillingDetailsKey: ({ accountId, token }: AccountBillingDetailsKeyParams) => string[];
|
|
77
|
+
accountContactsKey: ({ accountId, token }: AccountContactsKeyParams) => string[];
|
|
68
78
|
brandingKey: (token?: string) => string[];
|
|
69
79
|
calculatedPricesKey: ({ priceListId, quantity, token }: CalculatedPricesKeyParams) => (string | number)[];
|
|
70
80
|
createEventsKey: ({ entityId, pluralType, token }: EventsKeyParams) => string[];
|