@bunnyapp/components 1.8.0-beta.19 → 1.8.0-beta.20
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 +1999 -1377
- package/dist/cjs/types/src/components/DocumentTemplatePreview.d.ts +5 -1
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +4 -14
- package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +1 -2
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -1
- package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -13
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +4 -0
- package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
- package/dist/cjs/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
- package/dist/cjs/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
- package/dist/cjs/types/src/components/Quote/hooks/useAcceptQuote.d.ts +11 -6
- package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +30 -6
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +0 -2
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +25 -18
- package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +5 -46
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +32 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
- package/dist/cjs/types/src/components/Signup/components/Logo.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
- package/dist/cjs/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
- package/dist/cjs/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
- package/dist/cjs/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -2
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +13 -2
- package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -9
- package/dist/cjs/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +32 -0
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +46 -0
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
- package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
- package/dist/cjs/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
- package/dist/cjs/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
- package/dist/cjs/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
- package/dist/cjs/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
- package/dist/cjs/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
- package/dist/cjs/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
- package/dist/cjs/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
- package/dist/cjs/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
- package/dist/cjs/types/src/hooks/usePaymentPlugins.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useUpdateCoupons.d.ts +8 -2
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -0
- package/dist/esm/index.js +2010 -1388
- package/dist/esm/types/src/components/DocumentTemplatePreview.d.ts +5 -1
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +4 -14
- package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +1 -2
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -1
- package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +0 -13
- package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +4 -0
- package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
- package/dist/esm/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
- package/dist/esm/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
- package/dist/esm/types/src/components/Quote/hooks/useAcceptQuote.d.ts +11 -6
- package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +30 -6
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +0 -2
- package/dist/esm/types/src/components/Signup/Signup.d.ts +25 -18
- package/dist/esm/types/src/components/Signup/SignupContent.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +5 -46
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +32 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
- package/dist/esm/types/src/components/Signup/components/Logo.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
- package/dist/esm/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
- package/dist/esm/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
- package/dist/esm/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -2
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +13 -2
- package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -9
- package/dist/esm/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +32 -0
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +46 -0
- package/dist/esm/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
- package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
- package/dist/esm/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
- package/dist/esm/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
- package/dist/esm/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
- package/dist/esm/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
- package/dist/esm/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
- package/dist/esm/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
- package/dist/esm/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
- package/dist/esm/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
- package/dist/esm/types/src/hooks/usePaymentPlugins.d.ts +1 -1
- package/dist/esm/types/src/hooks/useUpdateCoupons.d.ts +8 -2
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -0
- package/dist/index.d.ts +55 -23
- package/package.json +3 -3
- package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
- package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
- package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +0 -39
- package/dist/cjs/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
- package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
- package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +0 -10
- package/dist/cjs/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
- package/dist/esm/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
- package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
- package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +0 -39
- package/dist/esm/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
- package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
- package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +0 -10
- package/dist/esm/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
- /package/dist/cjs/types/src/components/Signup/{PriceListDisplay.d.ts → components/PriceListDisplay.d.ts} +0 -0
- /package/dist/esm/types/src/components/Signup/{PriceListDisplay.d.ts → components/PriceListDisplay.d.ts} +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
export type DocumentPreviewFullscreenApi = {
|
|
2
|
+
toggleFullScreen: () => void;
|
|
3
|
+
};
|
|
4
|
+
declare const DocumentTemplatePreview: ({ targetUrl, onFullscreenApiChange, }: {
|
|
2
5
|
targetUrl: string;
|
|
6
|
+
onFullscreenApiChange?: (api: DocumentPreviewFullscreenApi | null) => void;
|
|
3
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
export default DocumentTemplatePreview;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type DocumentPreviewFullscreenApi } from '../../DocumentTemplatePreview';
|
|
2
|
+
type InvoiceQuoteViewOnlyProps = {
|
|
3
|
+
html: string | null | undefined;
|
|
4
|
+
targetUrl?: string;
|
|
5
|
+
onDocumentPreviewFullscreenApiChange?: (api: DocumentPreviewFullscreenApi | null) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const InvoiceQuoteView: ({ html, targetUrl, onDocumentPreviewFullscreenApiChange, }: InvoiceQuoteViewOnlyProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default InvoiceQuoteView;
|
package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { type DocumentPreviewFullscreenApi } from '../../DocumentTemplatePreview';
|
|
4
|
+
declare const InvoiceQuoteViewWithButtons: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, onDocumentPreviewFullscreenApiChange, }: {
|
|
5
|
+
html: string | null;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
formattedInvoice?: FormattedInvoice;
|
|
8
|
+
backButtonName?: string;
|
|
9
|
+
onBackButtonClick?: () => void;
|
|
10
|
+
onDownloadError?: () => void;
|
|
11
|
+
targetUrl?: string;
|
|
12
|
+
onDocumentPreviewFullscreenApiChange?: (api: DocumentPreviewFullscreenApi | null) => void;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default InvoiceQuoteViewWithButtons;
|
|
@@ -6,18 +6,8 @@ import { Pay } from './components/Pay';
|
|
|
6
6
|
import { PaymentMethodDetails } from './components/PaymentMethodDetails/PaymentMethodDetails';
|
|
7
7
|
import { StoredPaymentMethods } from './components/StoredPaymentMethods';
|
|
8
8
|
import { PaymentForm_PaymentMethodsFragment } from './fragments/PaymentForm_PaymentMethodsFragment';
|
|
9
|
+
import { PaymentForm_QuoteFragment } from './fragments/PaymentForm_QuoteFragment';
|
|
9
10
|
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
10
|
-
export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
11
|
-
id: string | null;
|
|
12
|
-
currencyId: string;
|
|
13
|
-
[$tada.fragmentRefs]: {
|
|
14
|
-
PaymentProvider_QuoteFragment: "Quote";
|
|
15
|
-
};
|
|
16
|
-
}, {}, {
|
|
17
|
-
fragment: "PaymentForm_QuoteFragment";
|
|
18
|
-
on: "Quote";
|
|
19
|
-
masked: true;
|
|
20
|
-
}>;
|
|
21
11
|
export declare const PaymentForm_InvoiceFragment: import("gql.tada").TadaDocumentNode<{
|
|
22
12
|
id: string | null;
|
|
23
13
|
currencyId: string;
|
|
@@ -29,7 +19,7 @@ export declare const PaymentForm_InvoiceFragment: import("gql.tada").TadaDocumen
|
|
|
29
19
|
on: "Invoice";
|
|
30
20
|
masked: true;
|
|
31
21
|
}>;
|
|
32
|
-
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod,
|
|
22
|
+
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
|
|
33
23
|
currencyId?: string;
|
|
34
24
|
invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
|
|
35
25
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
@@ -47,16 +37,16 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
|
|
|
47
37
|
onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
|
|
48
38
|
onSetDefaultPaymentMethod?: () => void;
|
|
49
39
|
accountId?: string;
|
|
50
|
-
overrideToken?: string;
|
|
51
40
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
52
41
|
children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
|
|
53
|
-
}): import("react/jsx-runtime").JSX.Element
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
54
43
|
type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
|
|
55
44
|
export type PaymentFormRenderState = {
|
|
56
45
|
hasPaymentMethods: boolean;
|
|
57
46
|
isPaymentMethodDetailsOpen: boolean;
|
|
58
47
|
isPayableAvailable: boolean;
|
|
59
48
|
amountDue: number | undefined;
|
|
49
|
+
paymentPluginsCount: number | undefined;
|
|
60
50
|
};
|
|
61
51
|
declare function PaymentFormInternal(props: PaymentFormProps & {
|
|
62
52
|
disablePayButton?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export declare function StripeFormProvider({ children, currencyId,
|
|
1
|
+
export declare function StripeFormProvider({ children, currencyId, }: {
|
|
2
2
|
children: React.ReactNode;
|
|
3
3
|
currencyId: string;
|
|
4
|
-
accountId?: string;
|
|
5
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,7 +27,7 @@ export declare const createPaymentHold: ({ quote, plugin, token, apiHost, paymen
|
|
|
27
27
|
apiHost: string;
|
|
28
28
|
paymentMethodId: string;
|
|
29
29
|
}) => Promise<any>;
|
|
30
|
-
export declare const useStripePlugin: (plugin: PluginData | undefined, currencyId: string
|
|
30
|
+
export declare const useStripePlugin: (plugin: PluginData | undefined, currencyId: string) => {
|
|
31
31
|
stripe: Stripe | null;
|
|
32
32
|
options: import("@stripe/stripe-js").StripeElementsOptionsMode;
|
|
33
33
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
type Props = {
|
|
2
2
|
className?: string;
|
|
3
3
|
disabled?: boolean;
|
|
4
|
+
onClickPrecondition?: () => Promise<boolean>;
|
|
5
|
+
buttonTextOverride?: {
|
|
6
|
+
text: string;
|
|
7
|
+
isProcessingText: string;
|
|
8
|
+
};
|
|
4
9
|
};
|
|
5
10
|
export declare function CheckoutNoPayment(props?: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
11
|
export {};
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type SaveButtonTextOverride = {
|
|
2
|
+
text: string;
|
|
3
|
+
isProcessingText: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function Save({ onClickPrecondition, buttonTextOverride, }: {
|
|
6
|
+
onClickPrecondition?: () => boolean | Promise<boolean>;
|
|
7
|
+
buttonTextOverride?: SaveButtonTextOverride;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export declare const StoredPaymentMethods_PaymentMethodsFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
-
[$tada.fragmentRefs]: {
|
|
3
|
-
MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
|
|
4
|
-
};
|
|
5
|
-
id: string;
|
|
6
|
-
plugin: {
|
|
7
|
-
id: string;
|
|
8
|
-
} | null;
|
|
9
|
-
}, {}, {
|
|
10
|
-
fragment: "StoredPaymentMethods_PaymentMethodsFragment";
|
|
11
|
-
on: "PaymentMethod";
|
|
12
|
-
masked: true;
|
|
13
|
-
}>;
|
|
14
1
|
type StoredPaymentMethodsProps = {
|
|
15
2
|
className?: string;
|
|
16
3
|
};
|
|
@@ -13,6 +13,8 @@ declare const PayableProvider: ({ value, children }: {
|
|
|
13
13
|
formattedAmountDue: string | undefined;
|
|
14
14
|
isPaid: boolean;
|
|
15
15
|
setIsPaid: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
|
+
isApproved: boolean;
|
|
17
|
+
setIsApproved: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
18
|
isPaying: boolean;
|
|
17
19
|
setIsPaying: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
20
|
isApprovingHold: boolean;
|
|
@@ -33,6 +35,8 @@ declare const PayableProvider: ({ value, children }: {
|
|
|
33
35
|
formattedAmountDue: string | undefined;
|
|
34
36
|
isPaid: boolean;
|
|
35
37
|
setIsPaid: React.Dispatch<React.SetStateAction<boolean>>;
|
|
38
|
+
isApproved: boolean;
|
|
39
|
+
setIsApproved: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
40
|
isPaying: boolean;
|
|
37
41
|
setIsPaying: React.Dispatch<React.SetStateAction<boolean>>;
|
|
38
42
|
isApprovingHold: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
currencyId: string;
|
|
4
|
+
[$tada.fragmentRefs]: {
|
|
5
|
+
PaymentProvider_QuoteFragment: "Quote";
|
|
6
|
+
};
|
|
7
|
+
}, {}, {
|
|
8
|
+
fragment: "PaymentForm_QuoteFragment";
|
|
9
|
+
on: "Quote";
|
|
10
|
+
masked: true;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const StoredPaymentMethods_PaymentMethodsFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
[$tada.fragmentRefs]: {
|
|
3
|
+
MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
|
|
4
|
+
};
|
|
5
|
+
id: string;
|
|
6
|
+
plugin: {
|
|
7
|
+
id: string;
|
|
8
|
+
} | null;
|
|
9
|
+
}, {}, {
|
|
10
|
+
fragment: "StoredPaymentMethods_PaymentMethodsFragment";
|
|
11
|
+
on: "PaymentMethod";
|
|
12
|
+
masked: true;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type QuoteIsAcceptedLabelProps = {
|
|
2
|
+
acceptedByName?: string | null;
|
|
3
|
+
acceptedAt: string;
|
|
4
|
+
};
|
|
5
|
+
declare const QuoteIsAcceptedLabel: ({ acceptedByName, acceptedAt }: QuoteIsAcceptedLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default QuoteIsAcceptedLabel;
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
+
import { type QuoteAcceptInput, type QuoteAcceptedData } from '../queries/quoteAccept';
|
|
1
2
|
export declare const useAcceptQuote: ({ quoteId, apiHost, token, onQuoteAccepted, }: {
|
|
2
3
|
quoteId?: string;
|
|
3
4
|
apiHost: string;
|
|
4
5
|
token?: string;
|
|
5
|
-
onQuoteAccepted?: () => void;
|
|
6
|
+
onQuoteAccepted?: (data: QuoteAcceptedData | null) => void;
|
|
6
7
|
}) => {
|
|
7
8
|
acceptBoxVisible: boolean;
|
|
8
9
|
isAccepting: boolean;
|
|
10
|
+
pandadocPollingModalVisible: boolean;
|
|
11
|
+
isSendAcceptPending: boolean;
|
|
12
|
+
hasSigningPlugins: boolean | undefined;
|
|
9
13
|
sendAccept: import("@tanstack/react-query").UseMutateFunction<{
|
|
10
14
|
quoteAccept: {
|
|
15
|
+
quote: {
|
|
16
|
+
[$tada.fragmentRefs]: {
|
|
17
|
+
QuoteAccept_AcceptedQuoteFragment: "Quote";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
11
20
|
errors: string | null;
|
|
12
21
|
} | null;
|
|
13
|
-
}, Error,
|
|
14
|
-
[key: string]: string;
|
|
15
|
-
}, unknown>;
|
|
22
|
+
}, Error, QuoteAcceptInput, unknown>;
|
|
16
23
|
setAcceptBoxVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
17
24
|
setIsAccepting: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
18
25
|
startAcceptance: () => void;
|
|
19
|
-
pandadocPollingModalVisible: boolean;
|
|
20
26
|
setPandadocPollingModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
21
|
-
isSendAcceptPending: boolean;
|
|
22
27
|
};
|
|
@@ -1,13 +1,37 @@
|
|
|
1
|
+
import { ResultOf } from 'gql.tada';
|
|
2
|
+
export declare const QuoteAccept_AcceptedQuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
id: string | null;
|
|
4
|
+
state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
|
|
5
|
+
acceptedAt: unknown;
|
|
6
|
+
acceptedByName: string | null;
|
|
7
|
+
acceptedByTitle: string | null;
|
|
8
|
+
}, {}, {
|
|
9
|
+
fragment: "QuoteAccept_AcceptedQuoteFragment";
|
|
10
|
+
on: "Quote";
|
|
11
|
+
masked: true;
|
|
12
|
+
}>;
|
|
13
|
+
export type QuoteAcceptedData = ResultOf<typeof QuoteAccept_AcceptedQuoteFragment>;
|
|
14
|
+
/** Values passed to the quote accept mutation (excluding apiHost, token, quoteId). */
|
|
15
|
+
export type QuoteAcceptInput = {
|
|
16
|
+
name: string;
|
|
17
|
+
title: string;
|
|
18
|
+
poNumber?: string | null;
|
|
19
|
+
taxNumber?: string | null;
|
|
20
|
+
};
|
|
21
|
+
/** Map `NoSigningPluginsForm` field values to `QuoteAcceptInput`. */
|
|
22
|
+
export declare function quoteAcceptInputFromNoSigningForm(values: Record<string, unknown>): QuoteAcceptInput;
|
|
1
23
|
type QuoteAcceptProps = {
|
|
2
24
|
apiHost: string;
|
|
3
|
-
changedFormItems: {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
};
|
|
6
|
-
quoteId?: string;
|
|
7
25
|
token?: string;
|
|
8
|
-
|
|
9
|
-
|
|
26
|
+
quoteId?: string | null;
|
|
27
|
+
} & QuoteAcceptInput;
|
|
28
|
+
declare const quoteAccept: ({ quoteId, apiHost, token, name, title, poNumber, taxNumber, }: QuoteAcceptProps) => Promise<{
|
|
10
29
|
quoteAccept: {
|
|
30
|
+
quote: {
|
|
31
|
+
[$tada.fragmentRefs]: {
|
|
32
|
+
QuoteAccept_AcceptedQuoteFragment: "Quote";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
11
35
|
errors: string | null;
|
|
12
36
|
} | null;
|
|
13
37
|
}>;
|
|
@@ -46,8 +46,6 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
|
|
|
46
46
|
AddonPlanRow_QuoteFragment: "Quote";
|
|
47
47
|
} & {
|
|
48
48
|
FeatureAddonRow_QuoteFragment: "Quote";
|
|
49
|
-
} & {
|
|
50
|
-
PaymentForms_QuoteFragment: "Quote";
|
|
51
49
|
} & {
|
|
52
50
|
useQuantityEditableCharges_QuoteFragment: "Quote";
|
|
53
51
|
} & {
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
+
import type { FormInstance } from "antd/es/form";
|
|
1
2
|
import { ShadowType } from '../../types/shadowType';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
companyName: string;
|
|
5
|
-
/** The price list code to use for the signup */
|
|
3
|
+
import { type DefaultSignupValues, InitialSignupFormData, type RequiredBillingDetailsFlags } from "./components/InitialSignupFormFields";
|
|
4
|
+
export type SignupProps = {
|
|
6
5
|
priceListCode: string;
|
|
7
|
-
/**
|
|
6
|
+
/** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
|
|
7
|
+
enableTrial?: boolean;
|
|
8
|
+
/** The URL to redirect to after the signup is complete */
|
|
8
9
|
returnUrl?: string;
|
|
9
|
-
/** An optional coupon code that gets applied automatically */
|
|
10
|
-
couponCode?: string;
|
|
11
10
|
/** A custom class name to apply to the component */
|
|
12
11
|
className?: string;
|
|
13
12
|
/** The shadow level to apply to the component */
|
|
14
13
|
shadow?: ShadowType;
|
|
15
14
|
/** A custom style to apply to the component */
|
|
16
15
|
style?: React.CSSProperties;
|
|
17
|
-
/** The default
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
/** The
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
/** The default form values to use for the signup */
|
|
17
|
+
defaultFormValues?: DefaultSignupValues;
|
|
18
|
+
/** Whether to require quote acceptance before checking out */
|
|
19
|
+
paymentRequiredToAcceptQuote?: boolean;
|
|
20
|
+
/** The document template ID to apply to the quote for the signup */
|
|
21
|
+
documentTemplateId?: string;
|
|
22
|
+
/** Which account billing fields to show and require. Omit for legacy behavior (country required only). */
|
|
23
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
24
|
+
};
|
|
25
|
+
declare const useSignupPortalSessionToken: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
|
|
26
|
+
declare const useSignupAccountId: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
|
|
27
|
+
declare const useSignupPurchaseSucceeded: () => [boolean, import("react").Dispatch<import("react").SetStateAction<boolean>>];
|
|
28
|
+
declare const useSignupForm: () => FormInstance<InitialSignupFormData>;
|
|
29
|
+
declare const useSignupOptions: () => {
|
|
30
|
+
enableTrial: boolean;
|
|
31
|
+
paymentRequiredToAcceptQuote?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export default function Signup({ priceListCode, enableTrial, returnUrl, className, shadow, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, }: SignupProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { useSignupAccountId, useSignupForm, useSignupOptions, useSignupPortalSessionToken, useSignupPurchaseSucceeded };
|
package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts
CHANGED
|
@@ -1,50 +1,9 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
}, {}, {
|
|
8
|
-
fragment: "CheckoutSummary_PriceListFragment";
|
|
9
|
-
on: "PriceList";
|
|
10
|
-
masked: true;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
13
|
-
id: string | null;
|
|
14
|
-
amountDue: number | null;
|
|
15
|
-
subtotal: number;
|
|
16
|
-
taxAmount: number;
|
|
17
|
-
currencyId: string;
|
|
18
|
-
quoteChanges: {
|
|
19
|
-
charges: {
|
|
20
|
-
id: string | null;
|
|
21
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
22
|
-
name: string | null;
|
|
23
|
-
coupon: {
|
|
24
|
-
couponCode: string;
|
|
25
|
-
} | null;
|
|
26
|
-
quantity: number | null;
|
|
27
|
-
subtotal: number | null;
|
|
28
|
-
currencyId: string;
|
|
29
|
-
}[];
|
|
30
|
-
}[] | null;
|
|
31
|
-
[$tada.fragmentRefs]: {
|
|
32
|
-
canApplyCoupons_QuoteFragment: "Quote";
|
|
33
|
-
};
|
|
34
|
-
}, {}, {
|
|
35
|
-
fragment: "CheckoutSummary_QuoteFragment";
|
|
36
|
-
on: "Quote";
|
|
37
|
-
masked: true;
|
|
38
|
-
}>;
|
|
39
|
-
export default function CheckoutSummary({ quote: maskedQuote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceList: maskedPriceList, isAddingCoupon, couponCode, setCouponCode, activeCouponsExist, }: {
|
|
40
|
-
quote: FragmentOf<typeof CheckoutSummary_QuoteFragment>;
|
|
2
|
+
import { CheckoutSummary_PriceListFragment } from './fragments/CheckoutSummary_PriceListFragment';
|
|
3
|
+
import { CheckoutSummary_QuoteFragment } from './fragments/CheckoutSummary_QuoteFragment';
|
|
4
|
+
export default function CheckoutSummary({ quote: maskedQuote, className, priceList: maskedPriceList, defaultCouponCode, }: {
|
|
5
|
+
quote: FragmentOf<typeof CheckoutSummary_QuoteFragment> | undefined;
|
|
41
6
|
className?: string;
|
|
42
|
-
onAddCoupon: (couponCode: string) => void;
|
|
43
|
-
onRemoveCoupon: (couponCode: string) => void;
|
|
44
|
-
isRemovingCoupon: boolean;
|
|
45
7
|
priceList: FragmentOf<typeof CheckoutSummary_PriceListFragment> | undefined | null;
|
|
46
|
-
|
|
47
|
-
couponCode: string;
|
|
48
|
-
setCouponCode: (couponCode: string) => void;
|
|
49
|
-
activeCouponsExist: boolean;
|
|
8
|
+
defaultCouponCode?: string;
|
|
50
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
subtotal: number;
|
|
3
|
+
taxes?: number;
|
|
4
|
+
amountDue: number | null;
|
|
5
|
+
currencyId: string;
|
|
6
|
+
taxCalculationMessage?: string;
|
|
7
|
+
/** When true, shows an “(estimated)” label with a tooltip next to each amount. */
|
|
8
|
+
isEstimated: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function CheckoutSummaryTotals({ subtotal, taxes, amountDue, currencyId, taxCalculationMessage, isEstimated, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const CheckoutSummary_PriceListFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
product: {
|
|
3
|
+
name: string;
|
|
4
|
+
} | null;
|
|
5
|
+
name: string;
|
|
6
|
+
basePrice: number | null;
|
|
7
|
+
currencyId: string;
|
|
8
|
+
trialAllowed: boolean;
|
|
9
|
+
charges: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
quantityMin: number | null;
|
|
13
|
+
basePrice: number;
|
|
14
|
+
featureAddon: boolean | null;
|
|
15
|
+
deprecated: boolean | null;
|
|
16
|
+
}[] | null;
|
|
17
|
+
}, {}, {
|
|
18
|
+
fragment: "CheckoutSummary_PriceListFragment";
|
|
19
|
+
on: "PriceList";
|
|
20
|
+
masked: true;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
id: string | null;
|
|
3
|
+
amountDue: number | null;
|
|
4
|
+
subtotal: number;
|
|
5
|
+
taxAmount: number;
|
|
6
|
+
currencyId: string;
|
|
7
|
+
payToAccept: boolean | null;
|
|
8
|
+
amount: number;
|
|
9
|
+
quoteChanges: {
|
|
10
|
+
id: string | null;
|
|
11
|
+
charges: {
|
|
12
|
+
id: string | null;
|
|
13
|
+
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
|
|
14
|
+
name: string | null;
|
|
15
|
+
coupon: {
|
|
16
|
+
couponCode: string;
|
|
17
|
+
} | null;
|
|
18
|
+
quantity: number | null;
|
|
19
|
+
subtotal: number | null;
|
|
20
|
+
currencyId: string;
|
|
21
|
+
}[];
|
|
22
|
+
}[] | null;
|
|
23
|
+
[$tada.fragmentRefs]: {
|
|
24
|
+
useApplyDefaultCoupon_QuoteFragment: "Quote";
|
|
25
|
+
} & {
|
|
26
|
+
canApplyCoupons_QuoteFragment: "Quote";
|
|
27
|
+
};
|
|
28
|
+
}, {}, {
|
|
29
|
+
fragment: "CheckoutSummary_QuoteFragment";
|
|
30
|
+
on: "Quote";
|
|
31
|
+
masked: true;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import type { ResultOf } from 'gql.tada';
|
|
3
|
+
import { CheckoutSummaryTotals } from './components/CheckoutSummaryTotals';
|
|
4
|
+
import { CheckoutSummary_PriceListFragment } from './fragments/CheckoutSummary_PriceListFragment';
|
|
5
|
+
import { CheckoutSummary_QuoteFragment } from './fragments/CheckoutSummary_QuoteFragment';
|
|
6
|
+
type CheckoutSummaryTotalsProps = ComponentProps<typeof CheckoutSummaryTotals>;
|
|
7
|
+
export declare function checkoutSummaryTotalsFromQuote(quote: ResultOf<typeof CheckoutSummary_QuoteFragment>): CheckoutSummaryTotalsProps;
|
|
8
|
+
export declare function checkoutSummaryTotalsFromPriceList(priceList: ResultOf<typeof CheckoutSummary_PriceListFragment>, willBeTrial: boolean): CheckoutSummaryTotalsProps;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type InitialSignupFormData = {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
email: string;
|
|
5
|
+
accountName: string;
|
|
6
|
+
/** Job title (e.g. for quote accept when there are no signing plugins). */
|
|
7
|
+
title?: string;
|
|
8
|
+
billingCountry: string;
|
|
9
|
+
accountBillingCountry?: string;
|
|
10
|
+
billingState: string;
|
|
11
|
+
billingCity: string;
|
|
12
|
+
billingZip: string;
|
|
13
|
+
billingStreet: string;
|
|
14
|
+
taxNumber: string;
|
|
15
|
+
};
|
|
16
|
+
export type DefaultSignupValues = {
|
|
17
|
+
firstName?: string;
|
|
18
|
+
lastName?: string;
|
|
19
|
+
email?: string;
|
|
20
|
+
accountName?: string;
|
|
21
|
+
billingCountry?: string;
|
|
22
|
+
billingState?: string;
|
|
23
|
+
billingCity?: string;
|
|
24
|
+
billingZip?: string;
|
|
25
|
+
billingStreet?: string;
|
|
26
|
+
taxNumber?: string;
|
|
27
|
+
};
|
|
28
|
+
/** Extra account billing fields (shown in “Account billing details”) when the flag is true. */
|
|
29
|
+
export type RequiredBillingDetailsFlags = {
|
|
30
|
+
billingCountry?: boolean;
|
|
31
|
+
billingState?: boolean;
|
|
32
|
+
billingCity?: boolean;
|
|
33
|
+
billingZip?: boolean;
|
|
34
|
+
billingStreet?: boolean;
|
|
35
|
+
taxNumber?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/** Optional fields not shown by default; enabled via `extraFieldsToShow`. */
|
|
38
|
+
export type ExtraSignupFormField = 'title';
|
|
39
|
+
export default function InitialSignupFormFields({ className, requiredBillingDetails,
|
|
40
|
+
/** Called when focus leaves this form (e.g. tab to payment). Implemented via Form `onBlurCapture` so moving between fields does not fire. */
|
|
41
|
+
onBlur, disabled, extraFieldsToShow, }: {
|
|
42
|
+
className?: string;
|
|
43
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
44
|
+
onBlur?: () => void;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
extraFieldsToShow?: ExtraSignupFormField[];
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export default function PurchaseSuccessDisplay({ purchaseAmount, currencyId, returnUrl, companyName, }: {
|
|
2
|
+
purchaseAmount: number | undefined | null;
|
|
3
|
+
currencyId: string | undefined | null;
|
|
4
|
+
returnUrl?: string;
|
|
5
|
+
companyName: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type QuoteCreateButtonProps = {
|
|
2
|
+
priceListCode: string;
|
|
3
|
+
priceList: {
|
|
4
|
+
trialAllowed?: boolean;
|
|
5
|
+
} | null | undefined;
|
|
6
|
+
documentTemplateId?: string;
|
|
7
|
+
};
|
|
8
|
+
export default function QuoteCreateButton({ priceListCode, priceList, documentTemplateId, }: QuoteCreateButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ResultOf } from 'gql.tada';
|
|
2
|
+
import { Signup_PriceListFragment } from '../../fragments/Signup_PriceListFragment';
|
|
3
|
+
import { type DefaultSignupValues, type RequiredBillingDetailsFlags } from '../InitialSignupFormFields';
|
|
4
|
+
type SignupFormProps = {
|
|
5
|
+
priceListCode: string;
|
|
6
|
+
priceList?: ResultOf<typeof Signup_PriceListFragment> | null;
|
|
7
|
+
defaultFormValues?: DefaultSignupValues;
|
|
8
|
+
paymentRequiredToAcceptQuote?: boolean;
|
|
9
|
+
documentTemplateId?: string;
|
|
10
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
11
|
+
};
|
|
12
|
+
export default function SignupForm({ priceListCode, priceList, defaultFormValues, documentTemplateId, requiredBillingDetails, }: SignupFormProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FragmentOf, type ResultOf } from 'gql.tada';
|
|
2
|
+
import { Signup_PriceListFragment } from '../../../fragments/Signup_PriceListFragment';
|
|
3
|
+
import { ExtraSignupFormField, type DefaultSignupValues, type RequiredBillingDetailsFlags } from '../../InitialSignupFormFields';
|
|
4
|
+
import { Signup_QuoteFragment } from '@/components/Signup/fragments/Signup_QuoteFragment';
|
|
5
|
+
export declare const ExistingAccountForm_AccountFragment: import("gql.tada").TadaDocumentNode<{
|
|
6
|
+
[$tada.fragmentRefs]: {
|
|
7
|
+
ExistingAccountLoadedEffect_AccountFragment: "Account";
|
|
8
|
+
};
|
|
9
|
+
billingContact: {
|
|
10
|
+
id: string;
|
|
11
|
+
} | null;
|
|
12
|
+
id: string;
|
|
13
|
+
}, {}, {
|
|
14
|
+
fragment: "ExistingAccountForm_AccountFragment";
|
|
15
|
+
on: "Account";
|
|
16
|
+
masked: true;
|
|
17
|
+
}>;
|
|
18
|
+
/** Account-details form after `quoteAccountSignup` has created an account; saves via `contactUpdate` + `accountUpdate` on blur. */
|
|
19
|
+
export default function ExistingAccountForm({ title, className, account: maskedAccount, extraFieldsToShow, requiredBillingDetails, defaultFormValues, priceList, onSelfServiceBuyDisabled, priceListCode, documentTemplateId, onQuoteAccountSignupSuccess, }: {
|
|
20
|
+
title: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
account: FragmentOf<typeof ExistingAccountForm_AccountFragment> | undefined | null;
|
|
23
|
+
extraFieldsToShow?: ExtraSignupFormField[];
|
|
24
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
25
|
+
defaultFormValues?: DefaultSignupValues;
|
|
26
|
+
priceList?: ResultOf<typeof Signup_PriceListFragment> | null;
|
|
27
|
+
onSelfServiceBuyDisabled: () => void;
|
|
28
|
+
priceListCode: string;
|
|
29
|
+
documentTemplateId?: string;
|
|
30
|
+
onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|