@bunnyapp/components 1.8.0-beta.54 → 1.8.0-beta.56
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 +154 -1
- package/dist/cjs/index.js +65 -32
- package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +6 -40
- package/dist/cjs/types/src/components/Checkout/Checkout.stories.d.ts +15 -0
- package/dist/cjs/types/src/components/Checkout/CheckoutContent.d.ts +11 -0
- package/dist/cjs/types/src/components/Checkout/components/CheckoutFlowForm.d.ts +4 -0
- package/dist/cjs/types/src/components/Checkout/graphql/fragments/Checkout_QuoteFragment.d.ts +22 -0
- package/dist/{esm/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts → cjs/types/src/components/Checkout/graphql/fragments/useCheckoutAccount_AccountFragment.d.ts} +6 -9
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/accountUpdate.d.ts +84 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/contactUpdate.d.ts +40 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteAddCoupon.d.ts +11 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteChangeUpdate.d.ts +7 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteCompose.d.ts +9 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteRemoveCoupon.d.ts +11 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteSetDocumentTemplate.d.ts +8 -0
- package/dist/cjs/types/src/components/Checkout/graphql/queries/getCheckoutAccount.d.ts +10 -0
- package/dist/cjs/types/src/components/Checkout/graphql/queries/getCheckoutQuote.d.ts +10 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutAccount.d.ts +21 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutCoupon.d.ts +20 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutQuote.d.ts +22 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutSubmit.d.ts +13 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useSetCheckoutQuoteQueryData.d.ts +4 -0
- package/dist/cjs/types/src/components/Checkout/index.d.ts +4 -0
- package/dist/cjs/types/src/components/Checkout/utils/accountDefaultValues.d.ts +7 -0
- package/dist/cjs/types/src/components/Checkout/utils/storeNewPaymentMethod.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/CheckoutAppearanceProvider.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/adapters/stripe.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/appearance.types.test.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/index.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/resolveAppearance.d.ts +21 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/ruleGroups.d.ts +17 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/rules.d.ts +27 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/rulesToCss.d.ts +5 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/scripts/dumpAppearance.d.ts +1 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/types.d.ts +144 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/variables.d.ts +29 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutFooter.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/CardBrandIcons.d.ts +2 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutFields.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutForm.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.rules.d.ts +30 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/Field.d.ts +24 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/Field.rules.d.ts +44 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PayButton.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PaymentFields.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.rules.d.ts +53 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PluginTiles.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/SavedPaymentMethodTiles.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/StripePaymentElement.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutLoadingOverlay.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutRoot.d.ts +28 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutScreen.d.ts +27 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutScreen.rules.d.ts +125 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSplitScreenContainer.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutStripeElements.d.ts +13 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutCouponEditor.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutQuoteDocument.d.ts +15 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutReceipt.d.ts +13 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutSummary.d.ts +12 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItem.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItems.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +24 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryDisclosure.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryHeader.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryLayout.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/SuccessDisplay/SuccessDisplay.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Button.d.ts +24 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Button.rules.d.ts +96 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Select.d.ts +17 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Select.rules.d.ts +55 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Spinner.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/TextInput.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/TextInput.rules.d.ts +68 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutConfigContext.d.ts +69 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutFieldsContext.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutFormContext.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutPaymentMethodsContext.d.ts +37 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutPricingContext.d.ts +23 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutResultContext.d.ts +20 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutQuoteDocument_QuoteFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutReceipt_QuoteFragment.d.ts +31 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutResult_QuoteFragment.d.ts +15 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummaryLineItems_QuoteFragment.d.ts +23 -0
- package/dist/cjs/types/src/components/{Signup/components/CheckoutSummary → CheckoutShared/graphql}/fragments/CheckoutSummary_PriceListFragment.d.ts +5 -12
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummary_QuoteFragment.d.ts +20 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SavedPaymentMethodTiles_PaymentMethodFragment.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PaymentMethodFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PriceListFragment.d.ts +11 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_QuoteFragment.d.ts +18 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/useCheckoutPriceList_PriceListFragment.d.ts +15 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/mutations/priceListAmountDuePreview.d.ts +53 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/mutations/taxationRequiredAccountFields.d.ts +10 -0
- package/dist/{esm/types/src/components/Signup → cjs/types/src/components/CheckoutShared/graphql}/queries/getPriceList.d.ts +1 -1
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useAmountDuePreview.d.ts +33 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutBillingDetails.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutFieldValue.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutFormSubmit.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutPriceList.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useFocusFirstField.d.ts +2 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useNewPaymentMethod.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useStripePaymentMethodId.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useTaxRequiredFields.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/stories/themes.d.ts +44 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/amountPaid.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/asPluginData.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/billingDetails.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/compactValues.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/nextBillingDate.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/planName.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/quoteCharges.d.ts +25 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/resolveCheckoutFields.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/validateDemoPayCard.d.ts +5 -0
- package/dist/cjs/types/src/components/DocumentTemplatePreview.d.ts +3 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayCardCvc.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayCardNumber.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayExpiry.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeLoader.d.ts +12 -0
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -3
- package/dist/cjs/types/src/components/PaymentForm/components/CouponEditor.d.ts +16 -0
- package/dist/cjs/types/src/components/Quote/queries/getFormattedQuote.d.ts +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +4 -4
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +2 -2
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +4 -32
- package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +5 -0
- package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +7 -2
- package/dist/cjs/types/src/components/Signup/components/SignupCheckoutForm.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/graphql/mutations/quoteAccountSignup.d.ts +76 -0
- package/dist/cjs/types/src/components/Signup/hooks/useSignupCheckout.d.ts +11 -0
- package/dist/cjs/types/src/components/Signup/index.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/AddonSubscriptionCards.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardButton.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/fragments/UpgradeContent_QuoteFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +4 -4
- package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -3
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionStatusText.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrial.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrialExpired.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +1 -1
- package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckout.d.ts +4 -4
- package/dist/cjs/types/src/components/UpgradeCheckout/UpgradeCheckout.d.ts +41 -0
- package/dist/cjs/types/src/components/index.d.ts +4 -0
- package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +7 -2
- package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +1 -1
- package/dist/cjs/types/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useHasTaxPlugin.d.ts +1 -0
- package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +41 -0
- package/dist/cjs/types/src/mocks/checkoutHandlers.d.ts +3 -0
- package/dist/cjs/types/src/mocks/handlers.d.ts +1 -1
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +26 -5
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +1 -1
- package/dist/cjs/types/src/utils/couponUtils.d.ts +2 -2
- package/dist/cjs/types/src/utils/priceListUtils/priceListPriceText.d.ts +1 -1
- package/dist/esm/index.js +65 -32
- package/dist/esm/types/src/components/Checkout/Checkout.d.ts +6 -40
- package/dist/esm/types/src/components/Checkout/Checkout.stories.d.ts +15 -0
- package/dist/esm/types/src/components/Checkout/CheckoutContent.d.ts +11 -0
- package/dist/esm/types/src/components/Checkout/components/CheckoutFlowForm.d.ts +4 -0
- package/dist/esm/types/src/components/Checkout/graphql/fragments/Checkout_QuoteFragment.d.ts +22 -0
- package/dist/{cjs/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts → esm/types/src/components/Checkout/graphql/fragments/useCheckoutAccount_AccountFragment.d.ts} +6 -9
- package/dist/esm/types/src/components/Checkout/graphql/mutations/accountUpdate.d.ts +84 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/contactUpdate.d.ts +40 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteAddCoupon.d.ts +11 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteChangeUpdate.d.ts +7 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteCompose.d.ts +9 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteRemoveCoupon.d.ts +11 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteSetDocumentTemplate.d.ts +8 -0
- package/dist/esm/types/src/components/Checkout/graphql/queries/getCheckoutAccount.d.ts +10 -0
- package/dist/esm/types/src/components/Checkout/graphql/queries/getCheckoutQuote.d.ts +10 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutAccount.d.ts +21 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutCoupon.d.ts +20 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutQuote.d.ts +22 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutSubmit.d.ts +13 -0
- package/dist/esm/types/src/components/Checkout/hooks/useSetCheckoutQuoteQueryData.d.ts +4 -0
- package/dist/esm/types/src/components/Checkout/index.d.ts +4 -0
- package/dist/esm/types/src/components/Checkout/utils/accountDefaultValues.d.ts +7 -0
- package/dist/esm/types/src/components/Checkout/utils/storeNewPaymentMethod.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/CheckoutAppearanceProvider.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/adapters/stripe.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/appearance.types.test.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/index.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/resolveAppearance.d.ts +21 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/ruleGroups.d.ts +17 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/rules.d.ts +27 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/rulesToCss.d.ts +5 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/scripts/dumpAppearance.d.ts +1 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/types.d.ts +144 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/variables.d.ts +29 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutFooter.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/CardBrandIcons.d.ts +2 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutFields.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutForm.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.rules.d.ts +30 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/Field.d.ts +24 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/Field.rules.d.ts +44 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PayButton.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PaymentFields.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.rules.d.ts +53 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PluginTiles.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/SavedPaymentMethodTiles.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/StripePaymentElement.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutLoadingOverlay.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutRoot.d.ts +28 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutScreen.d.ts +27 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutScreen.rules.d.ts +125 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSplitScreenContainer.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutStripeElements.d.ts +13 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutCouponEditor.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutQuoteDocument.d.ts +15 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutReceipt.d.ts +13 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutSummary.d.ts +12 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItem.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItems.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +24 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryDisclosure.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryHeader.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryLayout.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/components/SuccessDisplay/SuccessDisplay.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Button.d.ts +24 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Button.rules.d.ts +96 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Select.d.ts +17 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Select.rules.d.ts +55 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Spinner.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/TextInput.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/TextInput.rules.d.ts +68 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutConfigContext.d.ts +69 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutFieldsContext.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutFormContext.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutPaymentMethodsContext.d.ts +37 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutPricingContext.d.ts +23 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutResultContext.d.ts +20 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutQuoteDocument_QuoteFragment.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutReceipt_QuoteFragment.d.ts +31 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutResult_QuoteFragment.d.ts +15 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummaryLineItems_QuoteFragment.d.ts +23 -0
- package/dist/esm/types/src/components/{Signup/components/CheckoutSummary → CheckoutShared/graphql}/fragments/CheckoutSummary_PriceListFragment.d.ts +5 -12
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummary_QuoteFragment.d.ts +20 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SavedPaymentMethodTiles_PaymentMethodFragment.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PaymentMethodFragment.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PriceListFragment.d.ts +11 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_QuoteFragment.d.ts +18 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/useCheckoutPriceList_PriceListFragment.d.ts +15 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/mutations/priceListAmountDuePreview.d.ts +53 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/mutations/taxationRequiredAccountFields.d.ts +10 -0
- package/dist/{cjs/types/src/components/Signup → esm/types/src/components/CheckoutShared/graphql}/queries/getPriceList.d.ts +1 -1
- package/dist/esm/types/src/components/CheckoutShared/hooks/useAmountDuePreview.d.ts +33 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutBillingDetails.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutFieldValue.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutFormSubmit.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutPriceList.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useFocusFirstField.d.ts +2 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useNewPaymentMethod.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useStripePaymentMethodId.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useTaxRequiredFields.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/stories/themes.d.ts +44 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/amountPaid.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/asPluginData.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/billingDetails.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/compactValues.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/nextBillingDate.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/planName.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/quoteCharges.d.ts +25 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/resolveCheckoutFields.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/validateDemoPayCard.d.ts +5 -0
- package/dist/esm/types/src/components/DocumentTemplatePreview.d.ts +3 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayCardCvc.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayCardNumber.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayExpiry.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeLoader.d.ts +12 -0
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -3
- package/dist/esm/types/src/components/PaymentForm/components/CouponEditor.d.ts +16 -0
- package/dist/esm/types/src/components/Quote/queries/getFormattedQuote.d.ts +1 -1
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +4 -4
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +2 -2
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +1 -1
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +1 -1
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/Signup.d.ts +4 -32
- package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +5 -0
- package/dist/esm/types/src/components/Signup/SignupContent.d.ts +7 -2
- package/dist/esm/types/src/components/Signup/components/SignupCheckoutForm.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/graphql/mutations/quoteAccountSignup.d.ts +76 -0
- package/dist/esm/types/src/components/Signup/hooks/useSignupCheckout.d.ts +11 -0
- package/dist/esm/types/src/components/Signup/index.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/AddonSubscriptionCards.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardButton.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/fragments/UpgradeContent_QuoteFragment.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +4 -4
- package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -3
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionStatusText.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrial.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrialExpired.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +1 -1
- package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckout.d.ts +4 -4
- package/dist/esm/types/src/components/UpgradeCheckout/UpgradeCheckout.d.ts +41 -0
- package/dist/esm/types/src/components/index.d.ts +4 -0
- package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +7 -2
- package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +1 -1
- package/dist/esm/types/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/esm/types/src/hooks/useHasTaxPlugin.d.ts +1 -0
- package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +41 -0
- package/dist/esm/types/src/mocks/checkoutHandlers.d.ts +3 -0
- package/dist/esm/types/src/mocks/handlers.d.ts +1 -1
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +26 -5
- package/dist/esm/types/src/utils/chargeUtils.d.ts +1 -1
- package/dist/esm/types/src/utils/couponUtils.d.ts +2 -2
- package/dist/esm/types/src/utils/priceListUtils/priceListPriceText.d.ts +1 -1
- package/dist/index.d.ts +727 -32
- package/package.json +1 -2
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +0 -11
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -30
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/components/InitialSignupFormFields.d.ts +0 -47
- package/dist/cjs/types/src/components/Signup/components/LoadingOverlay.d.ts +0 -4
- package/dist/cjs/types/src/components/Signup/components/PriceListDisplay.d.ts +0 -29
- package/dist/cjs/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +0 -27
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +0 -29
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +0 -8
- package/dist/cjs/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +0 -15
- package/dist/cjs/types/src/components/Signup/components/SignupPaidPaymentForm.d.ts +0 -5
- package/dist/cjs/types/src/components/Signup/components/SignupPaymentForm.d.ts +0 -15
- package/dist/cjs/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +0 -5
- package/dist/cjs/types/src/components/Signup/consts.d.ts +0 -1
- package/dist/cjs/types/src/components/Signup/contexts/SignupCallbacksContext.d.ts +0 -17
- package/dist/cjs/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +0 -13
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -23
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -31
- package/dist/cjs/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -4
- package/dist/cjs/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +0 -29
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +0 -4
- package/dist/cjs/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +0 -5
- package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +0 -12
- package/dist/cjs/types/src/components/Signup/mutations/contactUpdate.d.ts +0 -12
- package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +0 -34
- package/dist/cjs/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +0 -12
- package/dist/cjs/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +0 -11
- package/dist/cjs/types/src/components/Signup/queries/getAccountByCode.d.ts +0 -8
- package/dist/cjs/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +0 -20
- package/dist/cjs/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/queries/getSignupQuote.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +0 -2
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +0 -11
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -30
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/components/InitialSignupFormFields.d.ts +0 -47
- package/dist/esm/types/src/components/Signup/components/LoadingOverlay.d.ts +0 -4
- package/dist/esm/types/src/components/Signup/components/PriceListDisplay.d.ts +0 -29
- package/dist/esm/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +0 -27
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +0 -29
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +0 -8
- package/dist/esm/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +0 -15
- package/dist/esm/types/src/components/Signup/components/SignupPaidPaymentForm.d.ts +0 -5
- package/dist/esm/types/src/components/Signup/components/SignupPaymentForm.d.ts +0 -15
- package/dist/esm/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +0 -5
- package/dist/esm/types/src/components/Signup/consts.d.ts +0 -1
- package/dist/esm/types/src/components/Signup/contexts/SignupCallbacksContext.d.ts +0 -17
- package/dist/esm/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +0 -13
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -23
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -31
- package/dist/esm/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -4
- package/dist/esm/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +0 -29
- package/dist/esm/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +0 -4
- package/dist/esm/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +0 -5
- package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +0 -12
- package/dist/esm/types/src/components/Signup/mutations/contactUpdate.d.ts +0 -12
- package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +0 -34
- package/dist/esm/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +0 -12
- package/dist/esm/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +0 -11
- package/dist/esm/types/src/components/Signup/queries/getAccountByCode.d.ts +0 -8
- package/dist/esm/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +0 -20
- package/dist/esm/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/queries/getSignupQuote.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +0 -2
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +0 -14
- /package/dist/cjs/types/src/components/{Signup → CheckoutShared}/components/Logo.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Signup → CheckoutShared}/components/SuccessDisplay/components/SuccessIcon.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Signup → CheckoutShared}/utils/createPortalReturnUrl.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckoutPaymentForm.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/QuoteIsLoadingIndicator.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/checkoutUtils.d.ts +0 -0
- /package/dist/esm/types/src/components/{Signup → CheckoutShared}/components/Logo.d.ts +0 -0
- /package/dist/esm/types/src/components/{Signup → CheckoutShared}/components/SuccessDisplay/components/SuccessIcon.d.ts +0 -0
- /package/dist/esm/types/src/components/{Signup → CheckoutShared}/utils/createPortalReturnUrl.d.ts +0 -0
- /package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckoutPaymentForm.d.ts +0 -0
- /package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/QuoteIsLoadingIndicator.d.ts +0 -0
- /package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/checkoutUtils.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** The charges listed as line items. A previewed (unsaved) quote has null ids. */
|
|
2
|
+
export declare const CheckoutSummaryLineItems_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
quoteChanges: {
|
|
4
|
+
id: string | null;
|
|
5
|
+
charges: {
|
|
6
|
+
id: string | null;
|
|
7
|
+
name: string | null;
|
|
8
|
+
subtotal: number | null;
|
|
9
|
+
coupon: {
|
|
10
|
+
couponCode: string;
|
|
11
|
+
} | null;
|
|
12
|
+
priceListCharge: {
|
|
13
|
+
[$tada.fragmentRefs]: {
|
|
14
|
+
PricingTooltip_PriceListChargeFragment: "PriceListCharge";
|
|
15
|
+
};
|
|
16
|
+
} | null;
|
|
17
|
+
}[];
|
|
18
|
+
}[] | null;
|
|
19
|
+
}, {}, {
|
|
20
|
+
fragment: "CheckoutSummaryLineItems_QuoteFragment";
|
|
21
|
+
on: "Quote";
|
|
22
|
+
masked: true;
|
|
23
|
+
}>;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
export declare const CheckoutSummary_PriceListFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
-
product: {
|
|
3
|
-
name: string;
|
|
4
|
-
} | null;
|
|
5
2
|
name: string;
|
|
6
|
-
basePrice: number | null;
|
|
7
3
|
currencyId: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
basePrice: number | null;
|
|
5
|
+
periodMonths: number | null;
|
|
6
|
+
trialLengthDays: number | null;
|
|
7
|
+
product: {
|
|
11
8
|
name: string;
|
|
12
|
-
|
|
13
|
-
basePrice: number;
|
|
14
|
-
featureAddon: boolean | null;
|
|
15
|
-
deprecated: boolean | null;
|
|
16
|
-
}[] | null;
|
|
9
|
+
} | null;
|
|
17
10
|
}, {}, {
|
|
18
11
|
fragment: "CheckoutSummary_PriceListFragment";
|
|
19
12
|
on: "PriceList";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** The previewed quote before the checkout: its line items, which coupon it carries and whether usage is billed on top. */
|
|
2
|
+
export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
CheckoutSummaryLineItems_QuoteFragment: "Quote";
|
|
5
|
+
};
|
|
6
|
+
quoteChanges: {
|
|
7
|
+
id: string | null;
|
|
8
|
+
charges: {
|
|
9
|
+
id: string | null;
|
|
10
|
+
chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
|
|
11
|
+
coupon: {
|
|
12
|
+
couponCode: string;
|
|
13
|
+
} | null;
|
|
14
|
+
}[];
|
|
15
|
+
}[] | null;
|
|
16
|
+
}, {}, {
|
|
17
|
+
fragment: "CheckoutSummary_QuoteFragment";
|
|
18
|
+
on: "Quote";
|
|
19
|
+
masked: true;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const SavedPaymentMethodTiles_PaymentMethodFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
[$tada.fragmentRefs]: {
|
|
3
|
+
CardImage_PaymentMethodFragment: "PaymentMethod";
|
|
4
|
+
};
|
|
5
|
+
id: string;
|
|
6
|
+
pluginId: string | null;
|
|
7
|
+
isDefault: boolean | null;
|
|
8
|
+
metadata: {
|
|
9
|
+
issuer: string | null;
|
|
10
|
+
identifier: string | null;
|
|
11
|
+
} | null;
|
|
12
|
+
}, {}, {
|
|
13
|
+
fragment: "SavedPaymentMethodTiles_PaymentMethodFragment";
|
|
14
|
+
on: "PaymentMethod";
|
|
15
|
+
masked: true;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const SuccessDisplay_PaymentMethodFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
[$tada.fragmentRefs]: {
|
|
3
|
+
CardImage_PaymentMethodFragment: "PaymentMethod";
|
|
4
|
+
};
|
|
5
|
+
id: string;
|
|
6
|
+
metadata: {
|
|
7
|
+
issuer: string | null;
|
|
8
|
+
identifier: string | null;
|
|
9
|
+
} | null;
|
|
10
|
+
}, {}, {
|
|
11
|
+
fragment: "SuccessDisplay_PaymentMethodFragment";
|
|
12
|
+
on: "PaymentMethod";
|
|
13
|
+
masked: true;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const SuccessDisplay_PriceListFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
name: string;
|
|
3
|
+
trialLengthDays: number | null;
|
|
4
|
+
product: {
|
|
5
|
+
name: string;
|
|
6
|
+
} | null;
|
|
7
|
+
}, {}, {
|
|
8
|
+
fragment: "SuccessDisplay_PriceListFragment";
|
|
9
|
+
on: "PriceList";
|
|
10
|
+
masked: true;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const SuccessDisplay_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
amountDue: number | null;
|
|
3
|
+
currencyId: string;
|
|
4
|
+
invoiceUntil: unknown;
|
|
5
|
+
quoteChanges: {
|
|
6
|
+
id: string | null;
|
|
7
|
+
isTrial: boolean;
|
|
8
|
+
trialEndDate: unknown;
|
|
9
|
+
}[] | null;
|
|
10
|
+
invoices: {
|
|
11
|
+
id: string | null;
|
|
12
|
+
amount: number;
|
|
13
|
+
}[] | null;
|
|
14
|
+
}, {}, {
|
|
15
|
+
fragment: "SuccessDisplay_QuoteFragment";
|
|
16
|
+
on: "Quote";
|
|
17
|
+
masked: true;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The price list as the screen's units need it, plus what the flows key their quote and trial on. */
|
|
2
|
+
export declare const useCheckoutPriceList_PriceListFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
CheckoutSummary_PriceListFragment: "PriceList";
|
|
5
|
+
} & {
|
|
6
|
+
SuccessDisplay_PriceListFragment: "PriceList";
|
|
7
|
+
};
|
|
8
|
+
id: string;
|
|
9
|
+
code: string | null;
|
|
10
|
+
trialAllowed: boolean;
|
|
11
|
+
}, {}, {
|
|
12
|
+
fragment: "useCheckoutPriceList_PriceListFragment";
|
|
13
|
+
on: "PriceList";
|
|
14
|
+
masked: true;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { VariablesOf } from 'gql.tada';
|
|
2
|
+
declare const mutation: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
priceListAmountDuePreview: {
|
|
4
|
+
amountDue: number | null;
|
|
5
|
+
subtotal: number | null;
|
|
6
|
+
discountAmount: number | null;
|
|
7
|
+
taxAmount: number | null;
|
|
8
|
+
taxesCalculated: boolean;
|
|
9
|
+
currencyId: string | null;
|
|
10
|
+
quote: {
|
|
11
|
+
[$tada.fragmentRefs]: {
|
|
12
|
+
CheckoutSummary_QuoteFragment: "Quote";
|
|
13
|
+
};
|
|
14
|
+
} | null;
|
|
15
|
+
errors: string[] | null;
|
|
16
|
+
} | null;
|
|
17
|
+
}, {
|
|
18
|
+
trial?: boolean | null | undefined;
|
|
19
|
+
couponCode?: string | null | undefined;
|
|
20
|
+
billingDetails?: {
|
|
21
|
+
taxNumber?: string | null | undefined;
|
|
22
|
+
billingZip?: string | null | undefined;
|
|
23
|
+
billingStreet?: string | null | undefined;
|
|
24
|
+
billingState?: string | null | undefined;
|
|
25
|
+
billingCountry?: string | null | undefined;
|
|
26
|
+
billingContactEmail?: string | null | undefined;
|
|
27
|
+
billingCity?: string | null | undefined;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
priceListCode: string;
|
|
30
|
+
}, void>;
|
|
31
|
+
export type PriceListAmountDuePreviewVariables = VariablesOf<typeof mutation>;
|
|
32
|
+
/**
|
|
33
|
+
* First-period amount due for a price list, priced by the API without touching any account. Taxes are
|
|
34
|
+
* calculated only once `billingDetails` holds every field the taxation plugin requires for the country (see `taxesCalculated`).
|
|
35
|
+
*/
|
|
36
|
+
declare const priceListAmountDuePreview: ({ token, apiHost, ...variables }: PriceListAmountDuePreviewVariables & {
|
|
37
|
+
token?: string;
|
|
38
|
+
apiHost: string;
|
|
39
|
+
}) => Promise<{
|
|
40
|
+
amountDue: number | null;
|
|
41
|
+
subtotal: number | null;
|
|
42
|
+
discountAmount: number | null;
|
|
43
|
+
taxAmount: number | null;
|
|
44
|
+
taxesCalculated: boolean;
|
|
45
|
+
currencyId: string | null;
|
|
46
|
+
quote: {
|
|
47
|
+
[$tada.fragmentRefs]: {
|
|
48
|
+
CheckoutSummary_QuoteFragment: "Quote";
|
|
49
|
+
};
|
|
50
|
+
} | null;
|
|
51
|
+
errors: string[] | null;
|
|
52
|
+
} | null>;
|
|
53
|
+
export default priceListAmountDuePreview;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Account fields the tenant's taxation plugin needs for a billing country, before any account exists. */
|
|
2
|
+
declare const taxationRequiredAccountFields: ({ token, apiHost, countryCode, }: {
|
|
3
|
+
token?: string;
|
|
4
|
+
apiHost: string;
|
|
5
|
+
countryCode?: string;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
fields: string[] | null;
|
|
8
|
+
errors: string[] | null;
|
|
9
|
+
} | null>;
|
|
10
|
+
export default taxationRequiredAccountFields;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { CheckoutSummary_QuoteFragment } from '../graphql/fragments/CheckoutSummary_QuoteFragment';
|
|
3
|
+
import type { CheckoutBillingDetails } from '../utils/billingDetails';
|
|
4
|
+
/** The API's first-period pricing: subtotal - discountAmount + taxAmount == amountDue. */
|
|
5
|
+
export type AmountDuePreview = {
|
|
6
|
+
amountDue: number;
|
|
7
|
+
subtotal: number;
|
|
8
|
+
discountAmount: number;
|
|
9
|
+
taxAmount: number;
|
|
10
|
+
/** False until the billing details hold every field the taxation plugin needs (or when no plugin applies): the amounts are untaxed. */
|
|
11
|
+
taxesCalculated: boolean;
|
|
12
|
+
currencyId: string;
|
|
13
|
+
/** The unsaved quote behind the amounts; the summary's line items come from it. */
|
|
14
|
+
quote: FragmentOf<typeof CheckoutSummary_QuoteFragment>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Keeps the amount due up to date without touching any account: previews on mount and again whenever
|
|
18
|
+
* the billing details, coupon or trial change. The previous answer stays on screen while the next one
|
|
19
|
+
* loads, and counts as pending while a typed field is still debouncing. A failed preview is reported by
|
|
20
|
+
* the query client's global error handler.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useAmountDuePreview({ priceListCode, billingDetails, couponCode, trial, enabled, }: {
|
|
23
|
+
priceListCode: string;
|
|
24
|
+
billingDetails: Partial<CheckoutBillingDetails>;
|
|
25
|
+
couponCode?: string;
|
|
26
|
+
trial?: boolean;
|
|
27
|
+
enabled?: boolean;
|
|
28
|
+
}): {
|
|
29
|
+
preview: NoInfer<AmountDuePreview> | undefined;
|
|
30
|
+
isPending: boolean;
|
|
31
|
+
hasResolvedOnce: boolean;
|
|
32
|
+
isError: boolean;
|
|
33
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CheckoutDefaultValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
/** The live billing details in the form; `fallback` fills a field until it mounts. */
|
|
3
|
+
export declare function useCheckoutBillingDetails(fallback?: CheckoutDefaultValues): Partial<import("../utils/billingDetails").CheckoutBillingDetails>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CheckoutFormValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
/** The live value of one checkout form field. `undefined` until the field mounts; an empty string once cleared. */
|
|
3
|
+
export declare function useCheckoutFieldValue<Name extends keyof CheckoutFormValues>(name: Name): CheckoutFormValues[Name] | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CheckoutFormValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
import { CheckoutResult } from '../contexts/CheckoutResultContext';
|
|
3
|
+
/**
|
|
4
|
+
* What submitting the checkout form has in common across the flows, once antd has validated it:
|
|
5
|
+
* layer the consumer's defaults under the entered values (fields that aren't shown still describe
|
|
6
|
+
* the account), run the flow's checkout and publish its result. Errors are toasted by the query
|
|
7
|
+
* client's global handler.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCheckoutFormSubmit({ mutationKey, checkout, onError, }: {
|
|
10
|
+
mutationKey: readonly string[];
|
|
11
|
+
checkout: (values: CheckoutFormValues) => Promise<CheckoutResult>;
|
|
12
|
+
onError?: () => void;
|
|
13
|
+
}): {
|
|
14
|
+
submit: (values: CheckoutFormValues) => void;
|
|
15
|
+
isProcessing: boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The price list being bought, and whether this checkout will start a trial on it. */
|
|
2
|
+
export declare function useCheckoutPriceList(): {
|
|
3
|
+
priceList: {
|
|
4
|
+
[$tada.fragmentRefs]: {
|
|
5
|
+
CheckoutSummary_PriceListFragment: "PriceList";
|
|
6
|
+
} & {
|
|
7
|
+
SuccessDisplay_PriceListFragment: "PriceList";
|
|
8
|
+
};
|
|
9
|
+
id: string;
|
|
10
|
+
code: string | null;
|
|
11
|
+
trialAllowed: boolean;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
willBeTrial: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CheckoutFormValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
import type { CheckoutPaymentPlugin } from '../utils/asPluginData';
|
|
3
|
+
/** A payment method entered in the form, ready for the plugin to store: a Stripe payment method token or DemoPay's card metadata. */
|
|
4
|
+
export type CheckoutNewPaymentMethod = {
|
|
5
|
+
plugin: CheckoutPaymentPlugin;
|
|
6
|
+
token?: string;
|
|
7
|
+
metadata?: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
/** Turns what was entered in the selected plugin's payment form into something the API can store. */
|
|
10
|
+
export declare function useNewPaymentMethod(): (values: CheckoutFormValues, accountId?: string) => Promise<CheckoutNewPaymentMethod>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CheckoutFormValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
type PayerValues = Pick<CheckoutFormValues, 'email' | 'nameOnCard' | 'billingCountry' | 'billingZip'>;
|
|
3
|
+
/**
|
|
4
|
+
* Sets the payment method in the Payment Element up in the browser (SetupIntent + confirmSetup,
|
|
5
|
+
* which runs any 3DS challenge) and returns the Stripe payment method id. Without an account,
|
|
6
|
+
* Stripe's customer is provisioned from the email.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useStripePaymentMethodId(): (values: PayerValues, accountId?: string) => Promise<string>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the checkout form's fields from the consumer's `requiredBillingDetails` and the fields the
|
|
3
|
+
* taxation plugin needs for the chosen country. Keeps the previous answer while a new country is
|
|
4
|
+
* fetched so fields don't flicker.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useTaxRequiredFields(countryCode: string | undefined): {
|
|
7
|
+
fields: import("../utils/resolveCheckoutFields").CheckoutFields;
|
|
8
|
+
isFetched: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Decorator } from '@storybook/react-vite';
|
|
2
|
+
import type { Appearance } from '../appearance';
|
|
3
|
+
/**
|
|
4
|
+
* For stories without a theme. The story page's font is Inter, which our text inherits; the payment
|
|
5
|
+
* iframe can't see the page's fonts, so Inter is declared for it here, as a customer would.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pageFontAppearance: Appearance;
|
|
8
|
+
/** Editorial, print-like: warm paper, ink hairlines, square corners, a serif face (the story page's font). */
|
|
9
|
+
export declare const ledger: Appearance;
|
|
10
|
+
/** Dark fintech: navy columns, filled inputs, a lime accent, a pill button, a monospace face (the story page's font). Needs `darkMode` on BunnyProvider. */
|
|
11
|
+
export declare const midnight: Appearance;
|
|
12
|
+
/** Spread into a story: the theme's `appearance` arg, its page font and, for Midnight, dark mode. */
|
|
13
|
+
export declare const ledgerStory: {
|
|
14
|
+
args: {
|
|
15
|
+
appearance: Appearance;
|
|
16
|
+
};
|
|
17
|
+
decorators: Decorator[];
|
|
18
|
+
};
|
|
19
|
+
export declare const midnightStory: {
|
|
20
|
+
args: {
|
|
21
|
+
appearance: Appearance;
|
|
22
|
+
};
|
|
23
|
+
decorators: Decorator[];
|
|
24
|
+
parameters: {
|
|
25
|
+
darkMode: boolean;
|
|
26
|
+
backgrounds: {
|
|
27
|
+
default: string;
|
|
28
|
+
values: {
|
|
29
|
+
name: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Story-level `globals` that render the story in a phone-sized iframe (320px, below the screen's
|
|
37
|
+
* 768px breakpoint). Storybook 10 ignores the older `parameters.viewport.defaultViewport`.
|
|
38
|
+
*/
|
|
39
|
+
export declare const mobileGlobals: {
|
|
40
|
+
viewport: {
|
|
41
|
+
value: string;
|
|
42
|
+
isRotated: boolean;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** What the checkout charged: the first invoice's amount, or the quote's amount due when no invoice was raised. */
|
|
2
|
+
export declare const amountPaid: (quote: {
|
|
3
|
+
invoices?: readonly {
|
|
4
|
+
amount?: number | null;
|
|
5
|
+
}[] | null;
|
|
6
|
+
amountDue?: number | null;
|
|
7
|
+
}) => number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import usePaymentPlugins from '@/hooks/usePaymentPlugins';
|
|
2
|
+
import { PluginData } from '@/types/frontendTypes';
|
|
3
|
+
export type CheckoutPaymentPlugin = ReturnType<typeof usePaymentPlugins>['paymentPlugins'][number];
|
|
4
|
+
/** The `paymentPlugins` GraphQL row doesn't share a type with the legacy `PluginData` the plugin helpers expect. */
|
|
5
|
+
export declare const asPluginData: (plugin: CheckoutPaymentPlugin) => PluginData;
|
|
6
|
+
export declare const pluginFrontendName: (plugin: CheckoutPaymentPlugin | undefined) => string | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CheckoutFormValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
/** The form's address and tax fields, as the API's `BillingDetailsAttributes`. */
|
|
3
|
+
export type CheckoutBillingDetails = Pick<CheckoutFormValues, 'billingCountry' | 'billingZip' | 'billingStreet' | 'billingCity' | 'billingState' | 'taxNumber'>;
|
|
4
|
+
/**
|
|
5
|
+
* Maps form values to `billingDetails`. The amount due preview and the signup both send this, so taxes
|
|
6
|
+
* are previewed from exactly the address that is signed up with.
|
|
7
|
+
*/
|
|
8
|
+
export declare const billingDetailsFromValues: (values: Partial<CheckoutFormValues>) => Partial<CheckoutBillingDetails>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type Compacted<T> = {
|
|
2
|
+
[K in keyof T]?: Exclude<T[K], null | undefined>;
|
|
3
|
+
};
|
|
4
|
+
/** Drops the null, undefined and empty-string entries, so an unset field is neither sent nor prefilled. */
|
|
5
|
+
export declare const compactValues: <T extends object>(values: T) => Compacted<T>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** The day after the trial ends, or else the day after the quote's invoiced period ends (ISO8601Date scalars are untyped, hence `unknown`). */
|
|
2
|
+
export declare const nextBillingDate: (quote: {
|
|
3
|
+
invoiceUntil?: unknown;
|
|
4
|
+
quoteChanges?: readonly {
|
|
5
|
+
isTrial?: boolean | null;
|
|
6
|
+
trialEndDate?: unknown;
|
|
7
|
+
}[] | null;
|
|
8
|
+
}) => string | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Every charge across the quote's changes. */
|
|
2
|
+
export declare const quoteCharges: <Charge>(quote: {
|
|
3
|
+
quoteChanges?: readonly {
|
|
4
|
+
charges?: readonly Charge[] | null;
|
|
5
|
+
}[] | null;
|
|
6
|
+
}) => Charge[];
|
|
7
|
+
/** The code of the coupon the API applied to the quote, if any. */
|
|
8
|
+
export declare const quoteCouponCode: (quote: {
|
|
9
|
+
quoteChanges?: readonly {
|
|
10
|
+
charges?: readonly {
|
|
11
|
+
coupon?: {
|
|
12
|
+
couponCode?: string | null;
|
|
13
|
+
} | null;
|
|
14
|
+
}[] | null;
|
|
15
|
+
}[] | null;
|
|
16
|
+
}) => string | undefined;
|
|
17
|
+
/** The total discount from the quote's coupon charges, which carry it as a positive subtotal. */
|
|
18
|
+
export declare const quoteCouponDiscount: (quote: {
|
|
19
|
+
quoteChanges?: readonly {
|
|
20
|
+
charges?: readonly {
|
|
21
|
+
subtotal?: number | null;
|
|
22
|
+
coupon?: unknown;
|
|
23
|
+
}[] | null;
|
|
24
|
+
}[] | null;
|
|
25
|
+
}) => number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RequiredBillingDetailsFlags, CheckoutFormValues } from '../contexts/CheckoutConfigContext';
|
|
2
|
+
export type CheckoutFieldName = Exclude<keyof CheckoutFormValues, 'nameOnCard'>;
|
|
3
|
+
export type CheckoutFieldRule = {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
required: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type CheckoutFields = Record<CheckoutFieldName, CheckoutFieldRule>;
|
|
8
|
+
/**
|
|
9
|
+
* Which account fields the checkout form shows and requires. Email always; country only when taxation
|
|
10
|
+
* needs it; every other field when the consumer flags it in `requiredBillingDetails` or taxation
|
|
11
|
+
* needs it. A shown field is always required.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveCheckoutFields({ requiredBillingDetails, taxRequiredFields, }: {
|
|
14
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
15
|
+
taxRequiredFields: readonly string[];
|
|
16
|
+
}): CheckoutFields;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type DocumentPreviewFullscreenApi = {
|
|
2
2
|
toggleFullScreen: () => void;
|
|
3
3
|
};
|
|
4
|
-
declare const DocumentTemplatePreview: ({ targetUrl, onFullscreenApiChange, }: {
|
|
4
|
+
declare const DocumentTemplatePreview: ({ targetUrl, version, onFullscreenApiChange, }: {
|
|
5
5
|
targetUrl: string;
|
|
6
|
+
/** Anything that changes when the document does; a new value fetches the PDF again. */
|
|
7
|
+
version?: string;
|
|
6
8
|
onFullscreenApiChange?: (api: DocumentPreviewFullscreenApi | null) => void;
|
|
7
9
|
}) => import("react").JSX.Element;
|
|
8
10
|
export default DocumentTemplatePreview;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const DemoPayCardCvc: ({ autoFocus, onChange, placeholder, value, }: {
|
|
1
|
+
declare const DemoPayCardCvc: ({ "aria-label": ariaLabel, autoFocus, onChange, placeholder, value, }: {
|
|
2
|
+
"aria-label"?: string;
|
|
2
3
|
autoFocus?: boolean;
|
|
3
4
|
onChange: (cvc: string) => void;
|
|
4
5
|
placeholder?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const DemoPayCardNumber: ({ autoFocus, onChange, placeholder, value, }: {
|
|
1
|
+
declare const DemoPayCardNumber: ({ "aria-label": ariaLabel, autoFocus, onChange, placeholder, value, }: {
|
|
2
|
+
"aria-label"?: string;
|
|
2
3
|
autoFocus?: boolean;
|
|
3
4
|
onChange: (number: string) => void;
|
|
4
5
|
placeholder?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const DemoPayExpiry: ({ autoFocus, onChange, placeholder, value, }: {
|
|
1
|
+
declare const DemoPayExpiry: ({ "aria-label": ariaLabel, autoFocus, onChange, placeholder, value, }: {
|
|
2
|
+
"aria-label"?: string;
|
|
2
3
|
autoFocus?: boolean;
|
|
3
4
|
onChange: (cvc: string) => void;
|
|
4
5
|
placeholder?: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginData } from '@/types/frontendTypes';
|
|
2
|
+
import type { Stripe } from '@stripe/stripe-js';
|
|
3
|
+
/** Fonts Stripe loads inside its iframes; pass as `fonts` in the Elements options. */
|
|
4
|
+
export declare const STRIPE_FONTS: {
|
|
5
|
+
cssSrc: string;
|
|
6
|
+
}[];
|
|
7
|
+
/** Font family for the Appearance API (Payment Element), which resolves CSS variables on the host page. */
|
|
8
|
+
export declare const getStripeFontFamily: (antdFontFamily: string) => string;
|
|
9
|
+
export declare const isStripePlugin: (plugin: PluginData | undefined) => boolean;
|
|
10
|
+
export declare const fetchStripePublishableKey: (plugin: PluginData, apiHost: string, token?: string) => Promise<string>;
|
|
11
|
+
/** Loads Stripe.js for a Stripe payment plugin. Re-runs when the plugin or token changes. */
|
|
12
|
+
export declare const useLoadStripe: (plugin: PluginData | undefined, token: string | undefined) => Stripe | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginData } from '@/types/frontendTypes';
|
|
2
2
|
import Payable from '@/types/interfaces/Payable';
|
|
3
|
-
import { Stripe } from '@stripe/stripe-js';
|
|
4
3
|
export declare const createPaymentMethod: ({ paymentMethodId, plugin, token, apiHost, accountId, }: {
|
|
5
4
|
paymentMethodId: string;
|
|
6
5
|
plugin: PluginData;
|
|
@@ -8,7 +7,14 @@ export declare const createPaymentMethod: ({ paymentMethodId, plugin, token, api
|
|
|
8
7
|
apiHost: string;
|
|
9
8
|
accountId?: string;
|
|
10
9
|
}) => Promise<any>;
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Creates a SetupIntent for an account, or — before any account exists (signup) — for a Stripe
|
|
12
|
+
* customer provisioned from `customer.email` / `customer.name`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const createSetupIntent: (plugin: PluginData, apiHost: string, token?: string, accountId?: string, customer?: {
|
|
15
|
+
email?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
}) => Promise<any>;
|
|
12
18
|
export declare const createPaymentIntent: ({ payable, savePaymentMethod, memo, plugin, token, apiHost, }: {
|
|
13
19
|
payable: Payable;
|
|
14
20
|
savePaymentMethod: boolean;
|
|
@@ -28,6 +34,6 @@ export declare const createPaymentHold: ({ quote, plugin, token, apiHost, paymen
|
|
|
28
34
|
paymentMethodId: string;
|
|
29
35
|
}) => Promise<any>;
|
|
30
36
|
export declare const useStripePlugin: (plugin: PluginData | undefined, currencyId: string) => {
|
|
31
|
-
stripe: Stripe | null;
|
|
37
|
+
stripe: import("@stripe/stripe-js").Stripe | null;
|
|
32
38
|
options: import("@stripe/stripe-js").StripeElementsOptionsMode;
|
|
33
39
|
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Note: the Signup / Checkout screen (`CheckoutShared`) deliberately has its own coupon editor
|
|
3
|
+
* (`CheckoutCouponEditor`) instead of reusing this view. That keeps the two loosely coupled, since
|
|
4
|
+
* that screen is styled by its `appearance` rather than by antd; only the coupon hooks are shared,
|
|
5
|
+
* so expect the two views to diverge.
|
|
6
|
+
*/
|
|
7
|
+
/** Coupon editor bound to a quote: applies and removes coupons through the quote coupon mutations. */
|
|
1
8
|
declare function CouponEditor({ className, apiHost, token, quoteId, appliedCoupons, onCouponAdded, onCouponRemoved, }: {
|
|
2
9
|
className?: string;
|
|
3
10
|
apiHost: string;
|
|
@@ -7,4 +14,13 @@ declare function CouponEditor({ className, apiHost, token, quoteId, appliedCoupo
|
|
|
7
14
|
onCouponAdded?: () => void;
|
|
8
15
|
onCouponRemoved?: () => void;
|
|
9
16
|
}): import("react").JSX.Element;
|
|
17
|
+
/** Presentational coupon editor: the caller decides what applying and removing a code does. */
|
|
18
|
+
export declare function CouponEditorView({ className, appliedCoupons, onApply, onRemove, isApplying, isRemoving, }: {
|
|
19
|
+
className?: string;
|
|
20
|
+
appliedCoupons: string[];
|
|
21
|
+
onApply: (code: string) => void;
|
|
22
|
+
onRemove: (code: string) => void;
|
|
23
|
+
isApplying: boolean;
|
|
24
|
+
isRemoving: boolean;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
10
26
|
export default CouponEditor;
|
|
@@ -14,7 +14,7 @@ declare const getFormattedQuote: ({ token, apiHost, id, }: {
|
|
|
14
14
|
}[] | null;
|
|
15
15
|
firstInvoice: {
|
|
16
16
|
id: string | null;
|
|
17
|
-
state: "READY" | "NOT_DUE" | "DUE" | "UNPAID" | "DRAFT" | "PREPARING" | "PAID" | "VOIDED" | "FAILED" | "
|
|
17
|
+
state: "READY" | "NOT_DUE" | "DUE" | "UNPAID" | "DRAFT" | "PREPARING" | "PAID" | "VOIDED" | "FAILED" | "CONSOLIDATED" | "MERGED" | "PROCESSING_PAYMENT" | "QUEUED";
|
|
18
18
|
} | null;
|
|
19
19
|
payableId: string | null;
|
|
20
20
|
id: string | null;
|