@bunnyapp/components 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/dist/cjs/index.js +151 -30957
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
- package/dist/cjs/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
- package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
- package/dist/cjs/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +4 -6
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
- package/dist/cjs/types/src/components/PaymentForm/constants.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +1 -1
- package/dist/cjs/types/src/components/Quote/Quote.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +5 -0
- package/dist/cjs/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +4 -9
- package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +1 -2
- package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/components/PriceListDisplay.d.ts +11 -1
- package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +1 -4
- package/dist/cjs/types/src/components/Signup/consts.d.ts +1 -0
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -1
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +3 -2
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -10
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +1 -4
- package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +8 -1
- package/dist/cjs/types/src/components/Signup/queries/getSignupQuote.d.ts +10 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
- package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
- package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
- package/dist/cjs/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +2 -1
- package/dist/cjs/types/src/hooks/useIsExpired.d.ts +2 -1
- package/dist/cjs/types/src/hooks/useIsVisible.d.ts +4 -0
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +9 -1
- package/dist/esm/index.js +151 -30944
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
- package/dist/esm/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
- package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
- package/dist/esm/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +4 -6
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
- package/dist/esm/types/src/components/PaymentForm/constants.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +1 -1
- package/dist/esm/types/src/components/Quote/Quote.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +5 -0
- package/dist/esm/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/Signup.d.ts +4 -9
- package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +1 -2
- package/dist/esm/types/src/components/Signup/SignupContent.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/components/PriceListDisplay.d.ts +11 -1
- package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +1 -4
- package/dist/esm/types/src/components/Signup/consts.d.ts +1 -0
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -1
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +3 -2
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -10
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +1 -4
- package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +8 -1
- package/dist/esm/types/src/components/Signup/queries/getSignupQuote.d.ts +10 -0
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
- package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
- package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
- package/dist/esm/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
- package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +2 -1
- package/dist/esm/types/src/hooks/useIsExpired.d.ts +2 -1
- package/dist/esm/types/src/hooks/useIsVisible.d.ts +4 -0
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +9 -1
- package/dist/index.d.ts +12 -19
- package/package.json +19 -15
- package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +0 -46
- package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +0 -46
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import '../../styles/index.less';
|
|
2
|
-
|
|
3
|
-
declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, onPaymentMethodRemoved, }: {
|
|
4
|
-
className?: string;
|
|
2
|
+
declare const BillingDetails: ({ countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isUpgradeFromTrial, style, onSavePaymentMethod, onPaymentMethodRemoved, }: {
|
|
5
3
|
countryListFilter?: (country: {
|
|
6
4
|
value: string;
|
|
7
5
|
label: string;
|
|
8
6
|
}) => boolean;
|
|
9
7
|
hideBillingDetailsForm?: boolean;
|
|
10
8
|
hidePaymentMethodForm?: boolean;
|
|
11
|
-
isCardEnabled?: boolean;
|
|
12
9
|
isUpgradeFromTrial?: boolean;
|
|
13
|
-
|
|
10
|
+
style?: React.CSSProperties;
|
|
14
11
|
onSavePaymentMethod?: (paymentMethodId: string) => void;
|
|
15
12
|
onPaymentMethodRemoved?: (paymentMethodId: string) => void;
|
|
16
13
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
2
|
import BillingDetails from "./BillingDetails";
|
|
3
3
|
declare const meta: Meta<typeof BillingDetails>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const NoShadow: Story;
|
|
8
|
-
export declare const CustomClassName: Story;
|
|
9
|
-
export declare const NoCard: Story;
|
|
10
7
|
export declare const Mobile: Story;
|
|
11
8
|
export declare const DarkMode: Story;
|
|
12
9
|
export declare const HidePaymentMethodForm: Story;
|
|
13
10
|
export declare const HideBillingDetailsForm: Story;
|
|
14
11
|
export declare const HideBothForms: Story;
|
|
12
|
+
export declare const PrideTheme: Story;
|
|
@@ -7,7 +7,7 @@ export type BunnyContextValues = {
|
|
|
7
7
|
onTokenExpired?: () => void;
|
|
8
8
|
};
|
|
9
9
|
export declare const BunnyContext: import("react").Context<BunnyContextValues>;
|
|
10
|
-
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
|
|
10
|
+
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications, configProviderProps, }: {
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
darkMode?: boolean;
|
|
13
13
|
queryClient?: QueryClient;
|
|
@@ -17,6 +17,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
|
|
|
17
17
|
onUserUnavailable?: () => void;
|
|
18
18
|
onInvalidOrMissingAuthorization?: () => void;
|
|
19
19
|
suppressUserUnavailableErrorNotification?: boolean;
|
|
20
|
+
disableErrorNotifications?: boolean;
|
|
20
21
|
configProviderProps?: ThemeConfig | undefined;
|
|
21
22
|
}): import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export default BunnyProvider;
|
package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ declare const BunnyProviderCallbacksProvider: ({ value, children }: {
|
|
|
3
3
|
onUserUnavailable?: () => void;
|
|
4
4
|
onInvalidOrMissingAuthorization?: () => void;
|
|
5
5
|
suppressUserUnavailableErrorNotification?: boolean;
|
|
6
|
+
disableErrorNotifications?: boolean;
|
|
6
7
|
};
|
|
7
8
|
children?: import("react").ReactNode;
|
|
8
9
|
}) => import("react/jsx-runtime").JSX.Element, useBunnyProviderCallbacks: () => {
|
|
9
10
|
onUserUnavailable?: () => void;
|
|
10
11
|
onInvalidOrMissingAuthorization?: () => void;
|
|
11
12
|
suppressUserUnavailableErrorNotification?: boolean;
|
|
13
|
+
disableErrorNotifications?: boolean;
|
|
12
14
|
};
|
|
13
15
|
export { BunnyProviderCallbacksProvider, useBunnyProviderCallbacks };
|
|
@@ -19,7 +19,7 @@ export declare const PaymentForm_InvoiceFragment: import("gql.tada").TadaDocumen
|
|
|
19
19
|
on: "Invoice";
|
|
20
20
|
masked: true;
|
|
21
21
|
}>;
|
|
22
|
-
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess,
|
|
22
|
+
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, checkoutPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
|
|
23
23
|
currencyId?: string;
|
|
24
24
|
invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
|
|
25
25
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
@@ -29,17 +29,15 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
|
|
|
29
29
|
};
|
|
30
30
|
onPaymentSuccess?: (response: any) => void;
|
|
31
31
|
onPaymentHoldSuccess?: (response: any) => void;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
*/
|
|
35
|
-
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
32
|
+
/** Precondition that must pass before checking out free/trial/paid/payment-hold quotes. */
|
|
33
|
+
checkoutPrecondition?: () => boolean | Promise<boolean>;
|
|
36
34
|
onSavePaymentMethod?: (response: any) => void;
|
|
37
35
|
onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
|
|
38
36
|
onSetDefaultPaymentMethod?: () => void;
|
|
39
37
|
accountId?: string;
|
|
40
38
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
41
39
|
children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
|
|
42
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
43
41
|
type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
|
|
44
42
|
export type PaymentFormRenderState = {
|
|
45
43
|
hasPaymentMethods: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PAYMENT_FORM_GAP = "bunny-gap-2";
|
|
@@ -5,7 +5,7 @@ export type PaymentCallbacksContextValue = {
|
|
|
5
5
|
onPaymentMethodRemoved: ((paymentMethod: PaymentMethodFragment) => void) | undefined;
|
|
6
6
|
onSavePaymentMethod: ((response: any) => void) | undefined;
|
|
7
7
|
onPaymentHoldSuccess: ((response: any) => void) | undefined;
|
|
8
|
-
|
|
8
|
+
checkoutPrecondition: (() => boolean | Promise<boolean>) | undefined;
|
|
9
9
|
};
|
|
10
10
|
declare const PaymentFormCallbacksProvider: ({ value, children }: {
|
|
11
11
|
value: PaymentCallbacksContextValue;
|
|
@@ -6,6 +6,11 @@ export declare const QuoteButtons_FormattedQuoteFragment: import("gql.tada").Tad
|
|
|
6
6
|
amount: number;
|
|
7
7
|
expiresAt: unknown;
|
|
8
8
|
state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
|
|
9
|
+
quote: {
|
|
10
|
+
entity: {
|
|
11
|
+
tzIdentifier: string | null;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
9
14
|
}, {}, {
|
|
10
15
|
fragment: "QuoteButtons_FormattedQuoteFragment";
|
|
11
16
|
on: "FormattedQuote";
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import type { FormInstance } from "antd/es/form";
|
|
2
|
-
import { ShadowType } from '../../types/shadowType';
|
|
3
2
|
import { type DefaultSignupValues, InitialSignupFormData, type RequiredBillingDetailsFlags } from "./components/InitialSignupFormFields";
|
|
4
3
|
export type SignupProps = {
|
|
5
4
|
priceListCode: string;
|
|
6
5
|
/** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
|
|
7
6
|
enableTrial?: boolean;
|
|
8
|
-
/** The URL to redirect to after the signup is complete */
|
|
9
|
-
returnUrl?: string;
|
|
10
|
-
/** A custom class name to apply to the component */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** The shadow level to apply to the component */
|
|
13
|
-
shadow?: ShadowType;
|
|
14
7
|
/** A custom style to apply to the component */
|
|
15
8
|
style?: React.CSSProperties;
|
|
16
9
|
/** The default form values to use for the signup */
|
|
@@ -19,8 +12,10 @@ export type SignupProps = {
|
|
|
19
12
|
paymentRequiredToAcceptQuote?: boolean;
|
|
20
13
|
/** The document template ID to apply to the quote for the signup */
|
|
21
14
|
documentTemplateId?: string;
|
|
22
|
-
/** Which account billing fields to show and require
|
|
15
|
+
/** Which account billing fields to show and require */
|
|
23
16
|
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
17
|
+
/** A default coupon code to pre-apply to the checkout */
|
|
18
|
+
defaultCouponCode?: string;
|
|
24
19
|
};
|
|
25
20
|
declare const useSignupPortalSessionToken: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
|
|
26
21
|
declare const useSignupAccountId: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
|
|
@@ -30,5 +25,5 @@ declare const useSignupOptions: () => {
|
|
|
30
25
|
enableTrial: boolean;
|
|
31
26
|
paymentRequiredToAcceptQuote?: boolean;
|
|
32
27
|
};
|
|
33
|
-
export default function Signup({ priceListCode, enableTrial,
|
|
28
|
+
export default function Signup({ priceListCode, enableTrial, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, defaultCouponCode, }: SignupProps): import("react/jsx-runtime").JSX.Element;
|
|
34
29
|
export { useSignupAccountId, useSignupForm, useSignupOptions, useSignupPortalSessionToken, useSignupPurchaseSucceeded };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import Signup from './Signup';
|
|
3
3
|
declare const meta: Meta<typeof Signup>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Mobile: Story;
|
|
8
|
-
export declare const CustomClassName: Story;
|
|
9
8
|
export declare const DarkMode: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SignupProps } from './Signup';
|
|
2
|
-
export declare function SignupContent({ priceListCode, defaultFormValues, documentTemplateId, requiredBillingDetails,
|
|
2
|
+
export declare function SignupContent({ priceListCode, defaultFormValues, documentTemplateId, requiredBillingDetails, style, defaultCouponCode, }: SignupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,6 +14,16 @@ export declare const PriceListDisplay_PriceListFragment: import("gql.tada").Tada
|
|
|
14
14
|
on: "PriceList";
|
|
15
15
|
masked: true;
|
|
16
16
|
}>;
|
|
17
|
-
export
|
|
17
|
+
export declare const PriceListDisplay_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
18
|
+
quoteChanges: {
|
|
19
|
+
isTrial: boolean;
|
|
20
|
+
}[] | null;
|
|
21
|
+
}, {}, {
|
|
22
|
+
fragment: "PriceListDisplay_QuoteFragment";
|
|
23
|
+
on: "Quote";
|
|
24
|
+
masked: true;
|
|
25
|
+
}>;
|
|
26
|
+
export default function PriceListDisplay({ priceList: maskedPriceList, quote: maskedQuote, }: {
|
|
18
27
|
priceList: FragmentOf<typeof PriceListDisplay_PriceListFragment> | undefined | null;
|
|
28
|
+
quote?: FragmentOf<typeof PriceListDisplay_QuoteFragment> | undefined | null;
|
|
19
29
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
type QuoteCreateButtonProps = {
|
|
2
2
|
priceListCode: string;
|
|
3
|
-
priceList: {
|
|
4
|
-
trialAllowed?: boolean;
|
|
5
|
-
} | null | undefined;
|
|
6
3
|
documentTemplateId?: string;
|
|
7
4
|
};
|
|
8
|
-
export default function QuoteCreateButton({ priceListCode,
|
|
5
|
+
export default function QuoteCreateButton({ priceListCode, documentTemplateId, }: QuoteCreateButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
6
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SIGNUP_BACKGROUND_COLOR = "#f8fafc";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
2
|
[$tada.fragmentRefs]: {
|
|
3
|
-
useApplyDefaultCoupon_QuoteFragment: "Quote";
|
|
4
|
-
} & {
|
|
5
3
|
CheckoutSummary_QuoteFragment: "Quote";
|
|
6
4
|
} & {
|
|
7
5
|
PaymentForm_QuoteFragment: "Quote";
|
|
@@ -9,12 +7,15 @@ export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
|
9
7
|
SignupPaymentForm_QuoteFragment: "Quote";
|
|
10
8
|
} & {
|
|
11
9
|
SignupQuote_QuoteFragment: "Quote";
|
|
10
|
+
} & {
|
|
11
|
+
PriceListDisplay_QuoteFragment: "Quote";
|
|
12
12
|
};
|
|
13
13
|
state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
|
|
14
14
|
id: string | null;
|
|
15
15
|
accountId: string;
|
|
16
16
|
currencyId: string;
|
|
17
17
|
amountDue: number | null;
|
|
18
|
+
amount: number;
|
|
18
19
|
payToAccept: boolean | null;
|
|
19
20
|
quoteChanges: {
|
|
20
21
|
id: string | null;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { useApplyDefaultCoupon_QuoteFragment } from '../fragments/useApplyDefaultCoupon_QuoteFragment';
|
|
3
|
-
/**
|
|
4
|
-
* Applies a default coupon code once when quoteChangeId is available.
|
|
5
|
-
* Uses a ref to ensure coupon code is only applied once.
|
|
6
|
-
*/
|
|
7
|
-
export default function useApplyDefaultCoupon({ couponCode, quoteChangeId, quote: maskedQuote, activeCouponsExist, addCoupon, }: {
|
|
1
|
+
export default function useApplyDefaultCoupon({ couponCode, addCoupon, }: {
|
|
8
2
|
couponCode: string | undefined;
|
|
9
|
-
quoteChangeId: string | undefined;
|
|
10
|
-
quote: FragmentOf<typeof useApplyDefaultCoupon_QuoteFragment> | undefined | null;
|
|
11
|
-
activeCouponsExist: boolean;
|
|
12
3
|
addCoupon: (code: string) => void;
|
|
13
4
|
}): void;
|
|
@@ -4,14 +4,11 @@ import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
|
|
|
4
4
|
export type UseQuoteAccountSignupMutationOptions = {
|
|
5
5
|
priceListCode: string;
|
|
6
6
|
enableTrial: boolean;
|
|
7
|
-
priceList: {
|
|
8
|
-
trialAllowed?: boolean;
|
|
9
|
-
} | null | undefined;
|
|
10
7
|
paymentRequiredToAcceptQuote?: boolean;
|
|
11
8
|
documentTemplateId?: string;
|
|
12
9
|
onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
|
|
13
10
|
};
|
|
14
|
-
export declare function useQuoteAccountSignupMutation({ priceListCode, enableTrial,
|
|
11
|
+
export declare function useQuoteAccountSignupMutation({ priceListCode, enableTrial, paymentRequiredToAcceptQuote, documentTemplateId, onQuoteAccountSignupSuccess, }: UseQuoteAccountSignupMutationOptions): import("@tanstack/react-query").UseMutationResult<{
|
|
15
12
|
account: {
|
|
16
13
|
id: string;
|
|
17
14
|
} | null;
|
|
@@ -2,4 +2,11 @@ import { ResultOf } from 'gql.tada';
|
|
|
2
2
|
import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
|
|
3
3
|
export declare const useSignupQuoteQueryData: ({ tokenOverride, }: {
|
|
4
4
|
tokenOverride?: string;
|
|
5
|
-
}) =>
|
|
5
|
+
}) => {
|
|
6
|
+
data: ResultOf<typeof Signup_QuoteFragment> | undefined;
|
|
7
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
8
|
+
[$tada.fragmentRefs]: {
|
|
9
|
+
Signup_QuoteFragment: "Quote";
|
|
10
|
+
};
|
|
11
|
+
} | undefined, Error>>;
|
|
12
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SignupQuote: () => import("react/jsx-runtime").JSX.Element
|
|
1
|
+
declare const SignupQuote: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default SignupQuote;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, }: {
|
|
1
|
+
export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, style, }: {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
className?: string;
|
|
4
4
|
everythingInPlus: boolean;
|
|
5
5
|
plansToDisplay: number;
|
|
6
|
+
style?: React.CSSProperties;
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export default GridTemplateColumnsWrapper;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Feature from '@/types/Feature';
|
|
2
|
+
import PriceList from '@/types/PriceList';
|
|
3
|
+
export declare const PlanFeatures: ({ displayPriceLists, features, plansToDisplay, }: {
|
|
4
|
+
displayPriceLists: PriceList[];
|
|
5
|
+
plansToDisplay: number;
|
|
6
|
+
features?: Feature[];
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default PlanFeatures;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Feature from '@/types/Feature';
|
|
2
|
+
import PriceList from '@/types/PriceList';
|
|
3
|
+
declare const FeatureGroup: ({ features, displayPriceLists, plansToDisplay, groupIndex, }: {
|
|
4
|
+
features: Feature[];
|
|
5
|
+
displayPriceLists: PriceList[];
|
|
6
|
+
plansToDisplay: number;
|
|
7
|
+
groupIndex: number;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default FeatureGroup;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import Upgrade from './Upgrade';
|
|
3
|
+
declare const meta: Meta<typeof Upgrade>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Mobile: Story;
|
|
8
|
+
export declare const DarkMode: Story;
|
|
9
|
+
export declare const NoShadow: Story;
|
|
10
|
+
export declare const CustomClassName: Story;
|
|
11
|
+
export declare const DefaultBillingPeriodAnnual: Story;
|
|
12
|
+
export declare const PrideTheme: Story;
|
|
@@ -2,8 +2,6 @@ export declare const Subscriptions_SubscriptionFragment: import("gql.tada").Tada
|
|
|
2
2
|
state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
|
|
3
3
|
id: string;
|
|
4
4
|
[$tada.fragmentRefs]: {
|
|
5
|
-
UpgradingSubscriptionContext_SubscriptionFragment: "Subscription";
|
|
6
|
-
} & {
|
|
7
5
|
SubscriptionsListContainer_SubscriptionFragment: "Subscription";
|
|
8
6
|
} & {
|
|
9
7
|
CanShowQuantitiesInput_SubscriptionFragment: "Subscription";
|
package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const getSubscriptionChargeHistograms: ({ id, apiHost, token, }: {
|
|
2
|
+
id: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
token?: string;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
subscription: {
|
|
7
|
+
chargeReport: {
|
|
8
|
+
priceListChargeId: string | null;
|
|
9
|
+
histogram: {
|
|
10
|
+
[$tada.fragmentRefs]: {
|
|
11
|
+
FeatureUsageGraph_HistogramFragment: "Histogram";
|
|
12
|
+
};
|
|
13
|
+
} | null;
|
|
14
|
+
}[] | null;
|
|
15
|
+
} | null;
|
|
16
|
+
}>;
|
|
@@ -5,190 +5,6 @@ export declare const getSubscriptions: ({ apiHost, isInPreviewMode, token, }: {
|
|
|
5
5
|
}) => Promise<{
|
|
6
6
|
subscriptions: {
|
|
7
7
|
nodes: ({
|
|
8
|
-
addonSubscriptions: {
|
|
9
|
-
id: string;
|
|
10
|
-
priceList: {
|
|
11
|
-
id: string;
|
|
12
|
-
} | null;
|
|
13
|
-
plan: {
|
|
14
|
-
id: string;
|
|
15
|
-
} | null;
|
|
16
|
-
}[] | null;
|
|
17
|
-
cancellationDate: unknown;
|
|
18
|
-
currencyId: string;
|
|
19
|
-
endDate: unknown;
|
|
20
|
-
evergreen: boolean;
|
|
21
|
-
id: string;
|
|
22
|
-
period: string;
|
|
23
|
-
account: {
|
|
24
|
-
id: string;
|
|
25
|
-
};
|
|
26
|
-
daysLeftInTrial: number | null;
|
|
27
|
-
plan: {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string;
|
|
30
|
-
selfServiceBuy: boolean | null;
|
|
31
|
-
selfServiceCancel: boolean | null;
|
|
32
|
-
selfServiceRenew: boolean | null;
|
|
33
|
-
} | null;
|
|
34
|
-
priceList: {
|
|
35
|
-
id: string;
|
|
36
|
-
periodMonths: number | null;
|
|
37
|
-
name: string;
|
|
38
|
-
plan: {
|
|
39
|
-
id: string;
|
|
40
|
-
addon: boolean | null;
|
|
41
|
-
addonPlans: {
|
|
42
|
-
id: string;
|
|
43
|
-
}[] | null;
|
|
44
|
-
} | null;
|
|
45
|
-
} | null;
|
|
46
|
-
product: {
|
|
47
|
-
id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
showProductNameOnLineItem: boolean | null;
|
|
50
|
-
} | null;
|
|
51
|
-
startDate: unknown;
|
|
52
|
-
trialEndDate: unknown;
|
|
53
|
-
trialPeriod: string;
|
|
54
|
-
trialStartDate: unknown;
|
|
55
|
-
trialExpirationAction: "ACTIVATE" | "CANCEL" | null;
|
|
56
|
-
charges: {
|
|
57
|
-
priceListCharge: {
|
|
58
|
-
priceListChargeTiers: {
|
|
59
|
-
price: number | null;
|
|
60
|
-
starts: number | null;
|
|
61
|
-
}[] | null;
|
|
62
|
-
featureAddon: boolean | null;
|
|
63
|
-
id: string;
|
|
64
|
-
} | null;
|
|
65
|
-
amount: number | null;
|
|
66
|
-
billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
|
|
67
|
-
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
68
|
-
discount: number | null;
|
|
69
|
-
discountedPrice: string | null;
|
|
70
|
-
endDate: unknown;
|
|
71
|
-
expired: boolean;
|
|
72
|
-
feature: {
|
|
73
|
-
name: string;
|
|
74
|
-
} | null;
|
|
75
|
-
id: string | null;
|
|
76
|
-
isAmendment: boolean;
|
|
77
|
-
isRamp: boolean;
|
|
78
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
79
|
-
name: string | null;
|
|
80
|
-
periodPrice: number | null;
|
|
81
|
-
price: string | null;
|
|
82
|
-
priceDecimals: number | null;
|
|
83
|
-
priceListChargeId: string | null;
|
|
84
|
-
priceTiers: {
|
|
85
|
-
starts: number | null;
|
|
86
|
-
price: number | null;
|
|
87
|
-
}[] | null;
|
|
88
|
-
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
89
|
-
quantity: number | null;
|
|
90
|
-
selfServiceQuantity: boolean | null;
|
|
91
|
-
startDate: unknown;
|
|
92
|
-
trial: boolean;
|
|
93
|
-
}[] | null;
|
|
94
|
-
chargeReport: {
|
|
95
|
-
[$tada.fragmentRefs]: {
|
|
96
|
-
CanShowQuantitiesInput_SubscriptionChargeFragment: "Undefined Fragment";
|
|
97
|
-
};
|
|
98
|
-
priceListCharge: {
|
|
99
|
-
priceListChargeTiers: {
|
|
100
|
-
price: number | null;
|
|
101
|
-
starts: number | null;
|
|
102
|
-
}[] | null;
|
|
103
|
-
featureAddon: boolean | null;
|
|
104
|
-
id: string;
|
|
105
|
-
code: string | null;
|
|
106
|
-
} | null;
|
|
107
|
-
histogram: {
|
|
108
|
-
feature: {
|
|
109
|
-
id: string;
|
|
110
|
-
name: string;
|
|
111
|
-
};
|
|
112
|
-
periodRange: string;
|
|
113
|
-
dataInterval: "MONTHLY" | "QUARTERLY" | "DAILY" | "SEMIANNUALLY" | "YEARLY";
|
|
114
|
-
data: {
|
|
115
|
-
periodStart: unknown;
|
|
116
|
-
periodEnd: unknown;
|
|
117
|
-
intervals: {
|
|
118
|
-
intervalStart: unknown;
|
|
119
|
-
intervalUsage: number;
|
|
120
|
-
}[];
|
|
121
|
-
intervalsTotal: number;
|
|
122
|
-
}[] | null;
|
|
123
|
-
} | null;
|
|
124
|
-
amount: number | null;
|
|
125
|
-
billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
|
|
126
|
-
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
127
|
-
discount: number | null;
|
|
128
|
-
discountedPrice: string | null;
|
|
129
|
-
endDate: unknown;
|
|
130
|
-
expired: boolean;
|
|
131
|
-
feature: {
|
|
132
|
-
name: string;
|
|
133
|
-
} | null;
|
|
134
|
-
id: string | null;
|
|
135
|
-
isAmendment: boolean;
|
|
136
|
-
isRamp: boolean;
|
|
137
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
138
|
-
name: string | null;
|
|
139
|
-
periodPrice: number | null;
|
|
140
|
-
price: string | null;
|
|
141
|
-
priceDecimals: number | null;
|
|
142
|
-
priceListChargeId: string | null;
|
|
143
|
-
priceTiers: {
|
|
144
|
-
starts: number | null;
|
|
145
|
-
price: number | null;
|
|
146
|
-
}[] | null;
|
|
147
|
-
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
148
|
-
quantity: number | null;
|
|
149
|
-
selfServiceQuantity: boolean | null;
|
|
150
|
-
startDate: unknown;
|
|
151
|
-
trial: boolean;
|
|
152
|
-
}[] | null;
|
|
153
|
-
currentCharges: {
|
|
154
|
-
priceListCharge: {
|
|
155
|
-
priceListChargeTiers: {
|
|
156
|
-
price: number | null;
|
|
157
|
-
starts: number | null;
|
|
158
|
-
}[] | null;
|
|
159
|
-
featureAddon: boolean | null;
|
|
160
|
-
id: string;
|
|
161
|
-
code: string | null;
|
|
162
|
-
} | null;
|
|
163
|
-
amount: number | null;
|
|
164
|
-
billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
|
|
165
|
-
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
166
|
-
discount: number | null;
|
|
167
|
-
discountedPrice: string | null;
|
|
168
|
-
endDate: unknown;
|
|
169
|
-
expired: boolean;
|
|
170
|
-
feature: {
|
|
171
|
-
name: string;
|
|
172
|
-
} | null;
|
|
173
|
-
id: string | null;
|
|
174
|
-
isAmendment: boolean;
|
|
175
|
-
isRamp: boolean;
|
|
176
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
177
|
-
name: string | null;
|
|
178
|
-
periodPrice: number | null;
|
|
179
|
-
price: string | null;
|
|
180
|
-
priceDecimals: number | null;
|
|
181
|
-
priceListChargeId: string | null;
|
|
182
|
-
priceTiers: {
|
|
183
|
-
starts: number | null;
|
|
184
|
-
price: number | null;
|
|
185
|
-
}[] | null;
|
|
186
|
-
pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
|
|
187
|
-
quantity: number | null;
|
|
188
|
-
selfServiceQuantity: boolean | null;
|
|
189
|
-
startDate: unknown;
|
|
190
|
-
trial: boolean;
|
|
191
|
-
}[] | null;
|
|
192
8
|
[$tada.fragmentRefs]: {
|
|
193
9
|
Subscriptions_SubscriptionFragment: "Subscription";
|
|
194
10
|
};
|