@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
package/dist/index.d.ts
CHANGED
|
@@ -96,17 +96,30 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
|
|
|
96
96
|
type Props = {
|
|
97
97
|
className?: string;
|
|
98
98
|
disabled?: boolean;
|
|
99
|
+
onClickPrecondition?: () => Promise<boolean>;
|
|
100
|
+
buttonTextOverride?: {
|
|
101
|
+
text: string;
|
|
102
|
+
isProcessingText: string;
|
|
103
|
+
};
|
|
99
104
|
};
|
|
100
105
|
declare function CheckoutNoPayment(props?: Props): react_jsx_runtime.JSX.Element;
|
|
101
106
|
|
|
102
107
|
type PayProps = {
|
|
103
108
|
disabled?: boolean;
|
|
109
|
+
onClickPrecondition?: () => boolean | Promise<boolean>;
|
|
104
110
|
};
|
|
105
111
|
declare function Pay(props?: PayProps): react_jsx_runtime.JSX.Element;
|
|
106
112
|
|
|
107
113
|
declare function Cancel(): react_jsx_runtime.JSX.Element;
|
|
108
114
|
|
|
109
|
-
|
|
115
|
+
type SaveButtonTextOverride = {
|
|
116
|
+
text: string;
|
|
117
|
+
isProcessingText: string;
|
|
118
|
+
};
|
|
119
|
+
declare function Save({ onClickPrecondition, buttonTextOverride, }: {
|
|
120
|
+
onClickPrecondition?: () => boolean | Promise<boolean>;
|
|
121
|
+
buttonTextOverride?: SaveButtonTextOverride;
|
|
122
|
+
}): react_jsx_runtime.JSX.Element;
|
|
110
123
|
|
|
111
124
|
type PaymentMethodDetailsProps = {
|
|
112
125
|
footer?: ReactNode;
|
|
@@ -136,7 +149,6 @@ declare const PaymentForm_PaymentMethodsFragment: gql_tada.TadaDocumentNode<{
|
|
|
136
149
|
masked: true;
|
|
137
150
|
}>;
|
|
138
151
|
|
|
139
|
-
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
140
152
|
declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
|
|
141
153
|
id: string | null;
|
|
142
154
|
currencyId: string;
|
|
@@ -148,6 +160,8 @@ declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
|
|
|
148
160
|
on: "Quote";
|
|
149
161
|
masked: true;
|
|
150
162
|
}>;
|
|
163
|
+
|
|
164
|
+
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
151
165
|
declare const PaymentForm_InvoiceFragment: gql_tada.TadaDocumentNode<{
|
|
152
166
|
id: string | null;
|
|
153
167
|
currencyId: string;
|
|
@@ -159,7 +173,7 @@ declare const PaymentForm_InvoiceFragment: gql_tada.TadaDocumentNode<{
|
|
|
159
173
|
on: "Invoice";
|
|
160
174
|
masked: true;
|
|
161
175
|
}>;
|
|
162
|
-
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod,
|
|
176
|
+
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
|
|
163
177
|
currencyId?: string;
|
|
164
178
|
invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
|
|
165
179
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
@@ -177,16 +191,16 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
|
|
|
177
191
|
onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
|
|
178
192
|
onSetDefaultPaymentMethod?: () => void;
|
|
179
193
|
accountId?: string;
|
|
180
|
-
overrideToken?: string;
|
|
181
194
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
182
195
|
children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
|
|
183
|
-
}): react_jsx_runtime.JSX.Element
|
|
196
|
+
}): react_jsx_runtime.JSX.Element;
|
|
184
197
|
type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
|
|
185
198
|
type PaymentFormRenderState = {
|
|
186
199
|
hasPaymentMethods: boolean;
|
|
187
200
|
isPaymentMethodDetailsOpen: boolean;
|
|
188
201
|
isPayableAvailable: boolean;
|
|
189
202
|
amountDue: number | undefined;
|
|
203
|
+
paymentPluginsCount: number | undefined;
|
|
190
204
|
};
|
|
191
205
|
declare function PaymentFormInternal(props: PaymentFormProps & {
|
|
192
206
|
disablePayButton?: boolean;
|
|
@@ -198,32 +212,50 @@ declare const PaymentForm: typeof PaymentFormInternal & {
|
|
|
198
212
|
PaymentMethodDetails: typeof PaymentMethodDetails;
|
|
199
213
|
};
|
|
200
214
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
215
|
+
type DefaultSignupValues = {
|
|
216
|
+
firstName?: string;
|
|
217
|
+
lastName?: string;
|
|
218
|
+
email?: string;
|
|
219
|
+
accountName?: string;
|
|
220
|
+
billingCountry?: string;
|
|
221
|
+
billingState?: string;
|
|
222
|
+
billingCity?: string;
|
|
223
|
+
billingZip?: string;
|
|
224
|
+
billingStreet?: string;
|
|
225
|
+
taxNumber?: string;
|
|
226
|
+
};
|
|
227
|
+
/** Extra account billing fields (shown in “Account billing details”) when the flag is true. */
|
|
228
|
+
type RequiredBillingDetailsFlags = {
|
|
229
|
+
billingCountry?: boolean;
|
|
230
|
+
billingState?: boolean;
|
|
231
|
+
billingCity?: boolean;
|
|
232
|
+
billingZip?: boolean;
|
|
233
|
+
billingStreet?: boolean;
|
|
234
|
+
taxNumber?: boolean;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
type SignupProps = {
|
|
205
238
|
priceListCode: string;
|
|
206
|
-
/**
|
|
239
|
+
/** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
|
|
240
|
+
enableTrial?: boolean;
|
|
241
|
+
/** The URL to redirect to after the signup is complete */
|
|
207
242
|
returnUrl?: string;
|
|
208
|
-
/** An optional coupon code that gets applied automatically */
|
|
209
|
-
couponCode?: string;
|
|
210
243
|
/** A custom class name to apply to the component */
|
|
211
244
|
className?: string;
|
|
212
245
|
/** The shadow level to apply to the component */
|
|
213
246
|
shadow?: ShadowType;
|
|
214
247
|
/** A custom style to apply to the component */
|
|
215
248
|
style?: React.CSSProperties;
|
|
216
|
-
/** The default
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
|
|
220
|
-
/** The
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}): react_jsx_runtime.JSX.Element;
|
|
249
|
+
/** The default form values to use for the signup */
|
|
250
|
+
defaultFormValues?: DefaultSignupValues;
|
|
251
|
+
/** Whether to require quote acceptance before checking out */
|
|
252
|
+
paymentRequiredToAcceptQuote?: boolean;
|
|
253
|
+
/** The document template ID to apply to the quote for the signup */
|
|
254
|
+
documentTemplateId?: string;
|
|
255
|
+
/** Which account billing fields to show and require. Omit for legacy behavior (country required only). */
|
|
256
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
257
|
+
};
|
|
258
|
+
declare function Signup({ priceListCode, enableTrial, returnUrl, className, shadow, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, }: SignupProps): react_jsx_runtime.JSX.Element;
|
|
227
259
|
|
|
228
260
|
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
|
|
229
261
|
children: React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunnyapp/components",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.20",
|
|
4
4
|
"description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@rollup/plugin-json": "^6.1.0",
|
|
35
35
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
36
36
|
"@rollup/plugin-replace": "^6.0.2",
|
|
37
|
-
"@rollup/plugin-terser": "^0.
|
|
37
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
38
38
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
39
39
|
"@storybook/addon-essentials": "^8.6.14",
|
|
40
40
|
"@storybook/addon-interactions": "^8.6.14",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"patch-package": "^8.0.1",
|
|
63
63
|
"postcss-import": "^16.1.1",
|
|
64
64
|
"postcss-less": "^6.0.0",
|
|
65
|
-
"postcss-url": "^
|
|
65
|
+
"postcss-url": "^8.0.0",
|
|
66
66
|
"rimraf": "^6.1.2",
|
|
67
67
|
"rollup": "^3.29.5",
|
|
68
68
|
"rollup-plugin-dts": "^6.2.3",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, }: {
|
|
4
|
-
html: string | null;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
formattedInvoice?: FormattedInvoice;
|
|
7
|
-
backButtonName?: string;
|
|
8
|
-
onBackButtonClick?: () => void;
|
|
9
|
-
onDownloadError?: () => void;
|
|
10
|
-
targetUrl?: string;
|
|
11
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default InvoiceQuoteView;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
export declare const PaymentForms_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
-
[$tada.fragmentRefs]: {
|
|
4
|
-
PaymentForm_QuoteFragment: "Quote";
|
|
5
|
-
};
|
|
6
|
-
}, {}, {
|
|
7
|
-
fragment: "PaymentForms_QuoteFragment";
|
|
8
|
-
on: "Quote";
|
|
9
|
-
masked: true;
|
|
10
|
-
}>;
|
|
11
|
-
export default function PaymentForms({ quote: maskedQuote, handlePaymentSuccess, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, defaultValues, }: {
|
|
12
|
-
quote?: FragmentOf<typeof PaymentForms_QuoteFragment> | null;
|
|
13
|
-
handlePaymentSuccess: () => void;
|
|
14
|
-
handleSubmit: (formData: FormData) => void;
|
|
15
|
-
proceedingToPayment: boolean;
|
|
16
|
-
accountId?: string;
|
|
17
|
-
overrideToken?: string;
|
|
18
|
-
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
19
|
-
defaultValues?: DefaultSignupValues;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export type FormData = {
|
|
22
|
-
firstName: string;
|
|
23
|
-
lastName: string;
|
|
24
|
-
email: string;
|
|
25
|
-
accountName: string;
|
|
26
|
-
billingCountry: string;
|
|
27
|
-
billingState: string;
|
|
28
|
-
billingCity: string;
|
|
29
|
-
billingZip: string;
|
|
30
|
-
billingStreet: string;
|
|
31
|
-
taxNumber: string;
|
|
32
|
-
};
|
|
33
|
-
export type DefaultSignupValues = {
|
|
34
|
-
firstName?: string;
|
|
35
|
-
lastName?: string;
|
|
36
|
-
email?: string;
|
|
37
|
-
accountName?: string;
|
|
38
|
-
billingCountry?: string;
|
|
39
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default function PaymentSuccessDisplay({ amountPaid, className, companyName, returnUrl, style, currencyId, }: {
|
|
2
|
-
amountPaid: number;
|
|
3
|
-
className: string;
|
|
4
|
-
companyName: string;
|
|
5
|
-
returnUrl?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
currencyId: string;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
|
|
2
|
-
token: string;
|
|
3
|
-
apiHost: string;
|
|
4
|
-
accountId: string;
|
|
5
|
-
quoteId: string;
|
|
6
|
-
paymentToken?: string;
|
|
7
|
-
paymentMethodId?: string;
|
|
8
|
-
pluginId: string;
|
|
9
|
-
priceListCode: string;
|
|
10
|
-
}) => Promise<{
|
|
11
|
-
errors: string[] | null;
|
|
12
|
-
quote: {
|
|
13
|
-
accountId: string;
|
|
14
|
-
amount: number;
|
|
15
|
-
amountDue: number | null;
|
|
16
|
-
applicationDate: unknown;
|
|
17
|
-
applied: boolean;
|
|
18
|
-
backdatedPeriods: boolean | null;
|
|
19
|
-
backdatedQuote: boolean | null;
|
|
20
|
-
billingDay: number | null;
|
|
21
|
-
contactId: string | null;
|
|
22
|
-
createdAt: unknown;
|
|
23
|
-
credits: number | null;
|
|
24
|
-
currencyId: string;
|
|
25
|
-
dealId: string | null;
|
|
26
|
-
discount: number | null;
|
|
27
|
-
discountValue: number;
|
|
28
|
-
endDate: unknown;
|
|
29
|
-
evergreen: boolean | null;
|
|
30
|
-
expiresAt: unknown;
|
|
31
|
-
id: string | null;
|
|
32
|
-
invoiceImmediately: boolean | null;
|
|
33
|
-
invoiceImmediatelyAvailable: boolean | null;
|
|
34
|
-
invoiceUntil: unknown;
|
|
35
|
-
isPendingApprovalRequest: boolean;
|
|
36
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
37
|
-
message: string | null;
|
|
38
|
-
name: string | null;
|
|
39
|
-
netPaymentDays: number | null;
|
|
40
|
-
notes: string | null;
|
|
41
|
-
number: string | null;
|
|
42
|
-
ownerId: string | null;
|
|
43
|
-
payableId: string | null;
|
|
44
|
-
periodAmount: number | null;
|
|
45
|
-
poNumber: string | null;
|
|
46
|
-
requiresApproval: boolean;
|
|
47
|
-
smallUnitAmountDue: number | null;
|
|
48
|
-
splitInvoice: boolean | null;
|
|
49
|
-
startDate: unknown;
|
|
50
|
-
state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
|
|
51
|
-
subtotal: number;
|
|
52
|
-
taxAmount: number;
|
|
53
|
-
taxCode: string | null;
|
|
54
|
-
updatedAt: unknown;
|
|
55
|
-
uuid: string;
|
|
56
|
-
} | null;
|
|
57
|
-
} | null>;
|
|
58
|
-
export default accountSignup;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Quote } from '@/types/Quote';
|
|
2
|
-
type Options = {
|
|
3
|
-
quoteId?: string;
|
|
4
|
-
priceListId?: string;
|
|
5
|
-
subscriptionId?: string;
|
|
6
|
-
quantity?: number;
|
|
7
|
-
accountId?: string;
|
|
8
|
-
token?: string;
|
|
9
|
-
apiHost: string;
|
|
10
|
-
};
|
|
11
|
-
declare const quoteCompose: ({ quoteId, priceListId, subscriptionId, quantity, accountId, token, apiHost, }: Options) => Promise<Quote>;
|
|
12
|
-
export default quoteCompose;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, }: {
|
|
4
|
-
html: string | null;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
formattedInvoice?: FormattedInvoice;
|
|
7
|
-
backButtonName?: string;
|
|
8
|
-
onBackButtonClick?: () => void;
|
|
9
|
-
onDownloadError?: () => void;
|
|
10
|
-
targetUrl?: string;
|
|
11
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default InvoiceQuoteView;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { FragmentOf } from 'gql.tada';
|
|
2
|
-
export declare const PaymentForms_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
-
[$tada.fragmentRefs]: {
|
|
4
|
-
PaymentForm_QuoteFragment: "Quote";
|
|
5
|
-
};
|
|
6
|
-
}, {}, {
|
|
7
|
-
fragment: "PaymentForms_QuoteFragment";
|
|
8
|
-
on: "Quote";
|
|
9
|
-
masked: true;
|
|
10
|
-
}>;
|
|
11
|
-
export default function PaymentForms({ quote: maskedQuote, handlePaymentSuccess, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, defaultValues, }: {
|
|
12
|
-
quote?: FragmentOf<typeof PaymentForms_QuoteFragment> | null;
|
|
13
|
-
handlePaymentSuccess: () => void;
|
|
14
|
-
handleSubmit: (formData: FormData) => void;
|
|
15
|
-
proceedingToPayment: boolean;
|
|
16
|
-
accountId?: string;
|
|
17
|
-
overrideToken?: string;
|
|
18
|
-
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
19
|
-
defaultValues?: DefaultSignupValues;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export type FormData = {
|
|
22
|
-
firstName: string;
|
|
23
|
-
lastName: string;
|
|
24
|
-
email: string;
|
|
25
|
-
accountName: string;
|
|
26
|
-
billingCountry: string;
|
|
27
|
-
billingState: string;
|
|
28
|
-
billingCity: string;
|
|
29
|
-
billingZip: string;
|
|
30
|
-
billingStreet: string;
|
|
31
|
-
taxNumber: string;
|
|
32
|
-
};
|
|
33
|
-
export type DefaultSignupValues = {
|
|
34
|
-
firstName?: string;
|
|
35
|
-
lastName?: string;
|
|
36
|
-
email?: string;
|
|
37
|
-
accountName?: string;
|
|
38
|
-
billingCountry?: string;
|
|
39
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default function PaymentSuccessDisplay({ amountPaid, className, companyName, returnUrl, style, currencyId, }: {
|
|
2
|
-
amountPaid: number;
|
|
3
|
-
className: string;
|
|
4
|
-
companyName: string;
|
|
5
|
-
returnUrl?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
currencyId: string;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
|
|
2
|
-
token: string;
|
|
3
|
-
apiHost: string;
|
|
4
|
-
accountId: string;
|
|
5
|
-
quoteId: string;
|
|
6
|
-
paymentToken?: string;
|
|
7
|
-
paymentMethodId?: string;
|
|
8
|
-
pluginId: string;
|
|
9
|
-
priceListCode: string;
|
|
10
|
-
}) => Promise<{
|
|
11
|
-
errors: string[] | null;
|
|
12
|
-
quote: {
|
|
13
|
-
accountId: string;
|
|
14
|
-
amount: number;
|
|
15
|
-
amountDue: number | null;
|
|
16
|
-
applicationDate: unknown;
|
|
17
|
-
applied: boolean;
|
|
18
|
-
backdatedPeriods: boolean | null;
|
|
19
|
-
backdatedQuote: boolean | null;
|
|
20
|
-
billingDay: number | null;
|
|
21
|
-
contactId: string | null;
|
|
22
|
-
createdAt: unknown;
|
|
23
|
-
credits: number | null;
|
|
24
|
-
currencyId: string;
|
|
25
|
-
dealId: string | null;
|
|
26
|
-
discount: number | null;
|
|
27
|
-
discountValue: number;
|
|
28
|
-
endDate: unknown;
|
|
29
|
-
evergreen: boolean | null;
|
|
30
|
-
expiresAt: unknown;
|
|
31
|
-
id: string | null;
|
|
32
|
-
invoiceImmediately: boolean | null;
|
|
33
|
-
invoiceImmediatelyAvailable: boolean | null;
|
|
34
|
-
invoiceUntil: unknown;
|
|
35
|
-
isPendingApprovalRequest: boolean;
|
|
36
|
-
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
37
|
-
message: string | null;
|
|
38
|
-
name: string | null;
|
|
39
|
-
netPaymentDays: number | null;
|
|
40
|
-
notes: string | null;
|
|
41
|
-
number: string | null;
|
|
42
|
-
ownerId: string | null;
|
|
43
|
-
payableId: string | null;
|
|
44
|
-
periodAmount: number | null;
|
|
45
|
-
poNumber: string | null;
|
|
46
|
-
requiresApproval: boolean;
|
|
47
|
-
smallUnitAmountDue: number | null;
|
|
48
|
-
splitInvoice: boolean | null;
|
|
49
|
-
startDate: unknown;
|
|
50
|
-
state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
|
|
51
|
-
subtotal: number;
|
|
52
|
-
taxAmount: number;
|
|
53
|
-
taxCode: string | null;
|
|
54
|
-
updatedAt: unknown;
|
|
55
|
-
uuid: string;
|
|
56
|
-
} | null;
|
|
57
|
-
} | null>;
|
|
58
|
-
export default accountSignup;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Quote } from '@/types/Quote';
|
|
2
|
-
type Options = {
|
|
3
|
-
quoteId?: string;
|
|
4
|
-
priceListId?: string;
|
|
5
|
-
subscriptionId?: string;
|
|
6
|
-
quantity?: number;
|
|
7
|
-
accountId?: string;
|
|
8
|
-
token?: string;
|
|
9
|
-
apiHost: string;
|
|
10
|
-
};
|
|
11
|
-
declare const quoteCompose: ({ quoteId, priceListId, subscriptionId, quantity, accountId, token, apiHost, }: Options) => Promise<Quote>;
|
|
12
|
-
export default quoteCompose;
|
|
File without changes
|
|
File without changes
|