@bunnyapp/components 1.8.0-beta.55 → 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/cjs/types/src/components/{Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts → 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 -35
- package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +4 -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 -5
- 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 -1
- 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/esm/types/src/components/{Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts → 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 -35
- package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +4 -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 -5
- 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 -1
- 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 +724 -50
- 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 -46
- 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 -7
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +0 -25
- 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 -6
- 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/contexts/SignupFormOptionsContext.d.ts +0 -24
- 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 -46
- 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 -7
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +0 -25
- 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 -6
- 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/contexts/SignupFormOptionsContext.d.ts +0 -24
- 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
|
@@ -1,41 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
accountId: string;
|
|
6
|
-
formattedQuote: {
|
|
7
|
-
html: string | null;
|
|
8
|
-
} | null;
|
|
9
|
-
[$tada.fragmentRefs]: {
|
|
10
|
-
QuoteCheckout_QuoteFragment: "Quote";
|
|
11
|
-
};
|
|
12
|
-
}, {}, {
|
|
13
|
-
fragment: "Checkout_QuoteFragment";
|
|
14
|
-
on: "Quote";
|
|
15
|
-
masked: true;
|
|
16
|
-
}>;
|
|
17
|
-
export declare const Checkout_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
18
|
-
id: string;
|
|
19
|
-
[$tada.fragmentRefs]: {
|
|
20
|
-
QuoteCheckout_SubscriptionFragment: "Subscription";
|
|
21
|
-
};
|
|
22
|
-
}, {}, {
|
|
23
|
-
fragment: "Checkout_SubscriptionFragment";
|
|
24
|
-
on: "Subscription";
|
|
25
|
-
masked: true;
|
|
26
|
-
}>;
|
|
27
|
-
type CheckoutProps = {
|
|
28
|
-
invoice?: FormattedInvoice;
|
|
29
|
-
onCancel: () => void;
|
|
30
|
-
onFail: (error: any) => void;
|
|
31
|
-
onSuccess: () => void;
|
|
32
|
-
onRecalculateTaxes: (quoteId: string) => void;
|
|
33
|
-
open: boolean;
|
|
34
|
-
quote?: FragmentOf<typeof Checkout_QuoteFragment> | null;
|
|
35
|
-
upgradingSubscription?: FragmentOf<typeof Checkout_SubscriptionFragment> | null;
|
|
36
|
-
token?: string;
|
|
37
|
-
isUpdatingQuote: boolean;
|
|
38
|
-
isRecalculatingTaxes: boolean;
|
|
1
|
+
import { CheckoutFlowProps } from '../CheckoutShared/components/CheckoutRoot';
|
|
2
|
+
export type CheckoutProps = CheckoutFlowProps & {
|
|
3
|
+
/** ID of a document template to render the quote with. When set, the quote PDF is shown under the summary. */
|
|
4
|
+
documentTemplateId?: string;
|
|
39
5
|
};
|
|
40
|
-
|
|
41
|
-
export default Checkout;
|
|
6
|
+
/** Self-service checkout for an existing account: subscribes it to a price list in one click. Needs a portal session token. */
|
|
7
|
+
export default function Checkout({ style, form, documentTemplateId, ...props }: CheckoutProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import Checkout from './Checkout';
|
|
3
|
+
declare const meta: Meta<typeof Checkout>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const DisabledFields: Story;
|
|
8
|
+
export declare const WithDocumentTemplate: Story;
|
|
9
|
+
export declare const StoredPaymentMethod: Story;
|
|
10
|
+
export declare const Mobile: Story;
|
|
11
|
+
export declare const DarkMode: Story;
|
|
12
|
+
export declare const Ledger: Story;
|
|
13
|
+
export declare const Midnight: Story;
|
|
14
|
+
export declare const LedgerMobile: Story;
|
|
15
|
+
export declare const MidnightMobile: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What makes the screen a checkout: the account already exists, so the form is prefilled from it and
|
|
3
|
+
* a real quote is composed up front to be checked out on submit. The coupon lives on that quote. The
|
|
4
|
+
* amount due is still previewed from the price list, so typing an address never touches the account;
|
|
5
|
+
* the entered billing details are saved, and the quote taxed with them, when the user pays.
|
|
6
|
+
*/
|
|
7
|
+
export declare function CheckoutContent({ style, documentTemplateId, }: {
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
/** The document template the quote is rendered with; its PDF is shown under the summary. */
|
|
10
|
+
documentTemplateId?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The quote Checkout composes on mount and checks out on submit: which coupon it carries, its quote PDF, and what the shared screen needs once it is checked out. */
|
|
2
|
+
export declare const Checkout_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
id: string | null;
|
|
4
|
+
quoteChanges: {
|
|
5
|
+
id: string | null;
|
|
6
|
+
charges: {
|
|
7
|
+
id: string | null;
|
|
8
|
+
coupon: {
|
|
9
|
+
couponCode: string;
|
|
10
|
+
} | null;
|
|
11
|
+
}[];
|
|
12
|
+
}[] | null;
|
|
13
|
+
[$tada.fragmentRefs]: {
|
|
14
|
+
CheckoutResult_QuoteFragment: "Quote";
|
|
15
|
+
} & {
|
|
16
|
+
CheckoutQuoteDocument_QuoteFragment: "Quote";
|
|
17
|
+
};
|
|
18
|
+
}, {}, {
|
|
19
|
+
fragment: "Checkout_QuoteFragment";
|
|
20
|
+
on: "Quote";
|
|
21
|
+
masked: true;
|
|
22
|
+
}>;
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
ExistingAccountForm_AccountFragment: "Account";
|
|
4
|
-
};
|
|
1
|
+
/** The account behind the portal session: what the form is prefilled with, and the contact its edits go to. */
|
|
2
|
+
export declare const useCheckoutAccount_AccountFragment: import("gql.tada").TadaDocumentNode<{
|
|
5
3
|
id: string;
|
|
6
|
-
code: string | null;
|
|
7
4
|
name: string | null;
|
|
8
5
|
billingCountry: string | null;
|
|
9
|
-
billingState: string | null;
|
|
10
|
-
billingCity: string | null;
|
|
11
6
|
billingZip: string | null;
|
|
12
7
|
billingStreet: string | null;
|
|
8
|
+
billingCity: string | null;
|
|
9
|
+
billingState: string | null;
|
|
13
10
|
taxNumber: string | null;
|
|
14
11
|
billingContact: {
|
|
15
12
|
id: string;
|
|
13
|
+
email: string | null;
|
|
16
14
|
firstName: string;
|
|
17
15
|
lastName: string | null;
|
|
18
|
-
email: string | null;
|
|
19
16
|
} | null;
|
|
20
17
|
}, {}, {
|
|
21
|
-
fragment: "
|
|
18
|
+
fragment: "useCheckoutAccount_AccountFragment";
|
|
22
19
|
on: "Account";
|
|
23
20
|
masked: true;
|
|
24
21
|
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { VariablesOf } from 'gql.tada';
|
|
2
|
+
declare const mutation: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
accountUpdate: {
|
|
4
|
+
errors: string[] | null;
|
|
5
|
+
account: {
|
|
6
|
+
id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
} | null;
|
|
9
|
+
}, {
|
|
10
|
+
attributes: {
|
|
11
|
+
website?: string | null | undefined;
|
|
12
|
+
timezone?: string | null | undefined;
|
|
13
|
+
taxNumber?: string | null | undefined;
|
|
14
|
+
shippingZip?: string | null | undefined;
|
|
15
|
+
shippingStreet?: string | null | undefined;
|
|
16
|
+
shippingState?: string | null | undefined;
|
|
17
|
+
shippingCountry?: string | null | undefined;
|
|
18
|
+
shippingCity?: string | null | undefined;
|
|
19
|
+
secondaryBillingContactIds?: string[] | null | undefined;
|
|
20
|
+
phone?: string | null | undefined;
|
|
21
|
+
payingAccountId?: string | null | undefined;
|
|
22
|
+
parentAccountId?: string | null | undefined;
|
|
23
|
+
ownerUserId?: string | null | undefined;
|
|
24
|
+
newQuoteBuilder?: boolean | null | undefined;
|
|
25
|
+
netPaymentDays?: number | null | undefined;
|
|
26
|
+
name?: string | null | undefined;
|
|
27
|
+
linkedinUrl?: string | null | undefined;
|
|
28
|
+
ipAddress?: string | null | undefined;
|
|
29
|
+
invoicedAccountId?: string | null | undefined;
|
|
30
|
+
invoiceTemplateId?: string | null | undefined;
|
|
31
|
+
industryId?: string | null | undefined;
|
|
32
|
+
groupId?: string | null | undefined;
|
|
33
|
+
fax?: string | null | undefined;
|
|
34
|
+
entityUseCode?: string | null | undefined;
|
|
35
|
+
entityId?: string | null | undefined;
|
|
36
|
+
employees?: number | null | undefined;
|
|
37
|
+
emailsEnabled?: boolean | null | undefined;
|
|
38
|
+
duns?: string | null | undefined;
|
|
39
|
+
draftInvoices?: boolean | null | undefined;
|
|
40
|
+
disableDunning?: boolean | null | undefined;
|
|
41
|
+
description?: string | null | undefined;
|
|
42
|
+
currencyId?: string | null | undefined;
|
|
43
|
+
consolidatedBilling?: boolean | null | undefined;
|
|
44
|
+
code?: string | null | undefined;
|
|
45
|
+
billingZip?: string | null | undefined;
|
|
46
|
+
billingStreet?: string | null | undefined;
|
|
47
|
+
billingState?: string | null | undefined;
|
|
48
|
+
billingCountry?: string | null | undefined;
|
|
49
|
+
billingContactId?: string | null | undefined;
|
|
50
|
+
billingContact?: {
|
|
51
|
+
title?: string | null | undefined;
|
|
52
|
+
salutation?: string | null | undefined;
|
|
53
|
+
portalAccess?: boolean | null | undefined;
|
|
54
|
+
phone?: string | null | undefined;
|
|
55
|
+
mobile?: string | null | undefined;
|
|
56
|
+
mailingZip?: string | null | undefined;
|
|
57
|
+
mailingStreet?: string | null | undefined;
|
|
58
|
+
mailingState?: string | null | undefined;
|
|
59
|
+
mailingCountry?: string | null | undefined;
|
|
60
|
+
mailingCity?: string | null | undefined;
|
|
61
|
+
linkedinUrl?: string | null | undefined;
|
|
62
|
+
lastName?: string | null | undefined;
|
|
63
|
+
firstName?: string | null | undefined;
|
|
64
|
+
email?: string | null | undefined;
|
|
65
|
+
description?: string | null | undefined;
|
|
66
|
+
code?: string | null | undefined;
|
|
67
|
+
campaignCode?: string | null | undefined;
|
|
68
|
+
accountId?: string | null | undefined;
|
|
69
|
+
accountCode?: string | null | undefined;
|
|
70
|
+
} | null | undefined;
|
|
71
|
+
billingCity?: string | null | undefined;
|
|
72
|
+
annualRevenue?: number | null | undefined;
|
|
73
|
+
accountTypeId?: string | null | undefined;
|
|
74
|
+
};
|
|
75
|
+
id: string;
|
|
76
|
+
}, void>;
|
|
77
|
+
export type CheckoutAccountAttributes = VariablesOf<typeof mutation>['attributes'];
|
|
78
|
+
declare const accountUpdate: ({ token, apiHost, accountId, attributes, }: {
|
|
79
|
+
token?: string;
|
|
80
|
+
apiHost: string;
|
|
81
|
+
accountId: string;
|
|
82
|
+
attributes: CheckoutAccountAttributes;
|
|
83
|
+
}) => Promise<void>;
|
|
84
|
+
export default accountUpdate;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { VariablesOf } from 'gql.tada';
|
|
2
|
+
declare const mutation: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
contactUpdate: {
|
|
4
|
+
errors: string | null;
|
|
5
|
+
contact: {
|
|
6
|
+
id: string;
|
|
7
|
+
} | null;
|
|
8
|
+
} | null;
|
|
9
|
+
}, {
|
|
10
|
+
attributes: {
|
|
11
|
+
title?: string | null | undefined;
|
|
12
|
+
salutation?: string | null | undefined;
|
|
13
|
+
portalAccess?: boolean | null | undefined;
|
|
14
|
+
phone?: string | null | undefined;
|
|
15
|
+
mobile?: string | null | undefined;
|
|
16
|
+
mailingZip?: string | null | undefined;
|
|
17
|
+
mailingStreet?: string | null | undefined;
|
|
18
|
+
mailingState?: string | null | undefined;
|
|
19
|
+
mailingCountry?: string | null | undefined;
|
|
20
|
+
mailingCity?: string | null | undefined;
|
|
21
|
+
linkedinUrl?: string | null | undefined;
|
|
22
|
+
lastName?: string | null | undefined;
|
|
23
|
+
firstName?: string | null | undefined;
|
|
24
|
+
email?: string | null | undefined;
|
|
25
|
+
description?: string | null | undefined;
|
|
26
|
+
code?: string | null | undefined;
|
|
27
|
+
campaignCode?: string | null | undefined;
|
|
28
|
+
accountId?: string | null | undefined;
|
|
29
|
+
accountCode?: string | null | undefined;
|
|
30
|
+
};
|
|
31
|
+
id: string;
|
|
32
|
+
}, void>;
|
|
33
|
+
export type CheckoutContactAttributes = VariablesOf<typeof mutation>['attributes'];
|
|
34
|
+
declare const contactUpdate: ({ token, apiHost, contactId, attributes, }: {
|
|
35
|
+
token?: string;
|
|
36
|
+
apiHost: string;
|
|
37
|
+
contactId: string;
|
|
38
|
+
attributes: CheckoutContactAttributes;
|
|
39
|
+
}) => Promise<void>;
|
|
40
|
+
export default contactUpdate;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const quoteAddCoupon: ({ token, apiHost, id, couponCode }: {
|
|
2
|
+
token?: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
id: string;
|
|
5
|
+
couponCode: string;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
[$tada.fragmentRefs]: {
|
|
8
|
+
Checkout_QuoteFragment: "Quote";
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default quoteAddCoupon;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const quoteRemoveCoupon: ({ token, apiHost, id, couponCode }: {
|
|
2
|
+
token?: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
id: string;
|
|
5
|
+
couponCode: string;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
[$tada.fragmentRefs]: {
|
|
8
|
+
Checkout_QuoteFragment: "Quote";
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export default quoteRemoveCoupon;
|
package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteSetDocumentTemplate.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Sets the document template the composed quote is rendered with. quoteCompose takes no template. */
|
|
2
|
+
declare const quoteSetDocumentTemplate: ({ token, apiHost, id, documentTemplateId, }: {
|
|
3
|
+
token?: string;
|
|
4
|
+
apiHost: string;
|
|
5
|
+
id: string;
|
|
6
|
+
documentTemplateId: string;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export default quoteSetDocumentTemplate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const getCheckoutAccount: ({ token, apiHost, accountId }: {
|
|
2
|
+
token?: string;
|
|
3
|
+
apiHost: string;
|
|
4
|
+
accountId: string;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
[$tada.fragmentRefs]: {
|
|
7
|
+
useCheckoutAccount_AccountFragment: "Account";
|
|
8
|
+
};
|
|
9
|
+
} | null>;
|
|
10
|
+
export default getCheckoutAccount;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** The account behind the portal session, with the billing details the form is prefilled from. */
|
|
2
|
+
export declare function useCheckoutAccount(): {
|
|
3
|
+
accountId: string | undefined;
|
|
4
|
+
account: {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string | null;
|
|
7
|
+
billingCountry: string | null;
|
|
8
|
+
billingZip: string | null;
|
|
9
|
+
billingStreet: string | null;
|
|
10
|
+
billingCity: string | null;
|
|
11
|
+
billingState: string | null;
|
|
12
|
+
taxNumber: string | null;
|
|
13
|
+
billingContact: {
|
|
14
|
+
id: string;
|
|
15
|
+
email: string | null;
|
|
16
|
+
firstName: string;
|
|
17
|
+
lastName: string | null;
|
|
18
|
+
} | null;
|
|
19
|
+
} | null | undefined;
|
|
20
|
+
isFetched: boolean;
|
|
21
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { Checkout_QuoteFragment } from '../graphql/fragments/Checkout_QuoteFragment';
|
|
3
|
+
/**
|
|
4
|
+
* The coupon on the composed quote. Applying or removing one goes to the API and the returned quote
|
|
5
|
+
* replaces the cached one; the preview then re-prices with the coupon the quote carries. An invalid
|
|
6
|
+
* code is reported by the global error handler and leaves the editor open.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useCheckoutCoupon({ quoteId, quote: maskedQuote, }: {
|
|
9
|
+
quoteId: string | undefined;
|
|
10
|
+
quote: FragmentOf<typeof Checkout_QuoteFragment> | undefined;
|
|
11
|
+
}): {
|
|
12
|
+
couponCode: string | undefined;
|
|
13
|
+
setCouponCode: import("@tanstack/react-query").UseMutateFunction<{
|
|
14
|
+
[$tada.fragmentRefs]: {
|
|
15
|
+
Checkout_QuoteFragment: "Quote";
|
|
16
|
+
};
|
|
17
|
+
} | undefined, Error, string | undefined, unknown>;
|
|
18
|
+
isApplying: boolean;
|
|
19
|
+
isRemoving: boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composes the quote for the price list on the session's account as soon as everything it depends
|
|
3
|
+
* on is known, then serves it from the cache. Coupon changes write the updated quote back through
|
|
4
|
+
* `useSetCheckoutQuoteQueryData`. Taxes are calculated by the API when the quote is checked out.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useCheckoutQuote({ priceListId, trial, couponCode, documentTemplateId, enabled, }: {
|
|
7
|
+
priceListId: string | undefined;
|
|
8
|
+
trial: boolean;
|
|
9
|
+
/** Applied once, on creation. An invalid code is dropped rather than blocking the checkout. */
|
|
10
|
+
couponCode: string | undefined;
|
|
11
|
+
/** Set once, on creation. A failure only loses the quote PDF, so it doesn't block the checkout. */
|
|
12
|
+
documentTemplateId: string | undefined;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
}): {
|
|
15
|
+
quote: NoInfer<{
|
|
16
|
+
[$tada.fragmentRefs]: {
|
|
17
|
+
Checkout_QuoteFragment: "Quote";
|
|
18
|
+
};
|
|
19
|
+
}> | undefined;
|
|
20
|
+
quoteId: string | undefined;
|
|
21
|
+
isCreating: boolean;
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CheckoutFormValues } from '../../CheckoutShared/contexts/CheckoutConfigContext';
|
|
2
|
+
/**
|
|
3
|
+
* Checks the composed quote out for the session's account: saves the edited billing details and
|
|
4
|
+
* contact, stores a new card on the account (or uses the chosen saved one) and pays. The API taxes
|
|
5
|
+
* the quote with the saved address as part of the checkout. Nothing is due for a trial, so that path
|
|
6
|
+
* checks out without a payment method.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useCheckoutSubmit({ quoteId }: {
|
|
9
|
+
quoteId: string | undefined;
|
|
10
|
+
}): {
|
|
11
|
+
submit: (values: CheckoutFormValues) => void;
|
|
12
|
+
isProcessing: boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { Checkout_QuoteFragment } from '../graphql/fragments/Checkout_QuoteFragment';
|
|
3
|
+
/** Writes a quote returned by a mutation into the cache `useCheckoutQuote` reads from. */
|
|
4
|
+
export declare function useSetCheckoutQuoteQueryData(): (quote: FragmentOf<typeof Checkout_QuoteFragment>) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as Checkout } from './Checkout';
|
|
2
|
+
export type { CheckoutProps } from './Checkout';
|
|
3
|
+
export type { CheckoutCallbacks, CheckoutDefaultValues, CheckoutDisabledFields, CheckoutFormOptions, RequiredBillingDetailsFlags, } from '../CheckoutShared/contexts/CheckoutConfigContext';
|
|
4
|
+
export type * from '../CheckoutShared/appearance/types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ResultOf } from 'gql.tada';
|
|
2
|
+
import type { CheckoutDefaultValues } from '../../CheckoutShared/contexts/CheckoutConfigContext';
|
|
3
|
+
import { useCheckoutAccount_AccountFragment } from '../graphql/fragments/useCheckoutAccount_AccountFragment';
|
|
4
|
+
type Account = ResultOf<typeof useCheckoutAccount_AccountFragment>;
|
|
5
|
+
/** The form values an existing account prefills. Empty account fields are left out so consumer defaults can fill them. */
|
|
6
|
+
export declare function accountDefaultValues(account: Account | null | undefined): CheckoutDefaultValues;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CheckoutNewPaymentMethod } from '../../CheckoutShared/hooks/useNewPaymentMethod';
|
|
2
|
+
/** Stores a card entered in the form on the account through its plugin and returns the stored payment method's id. */
|
|
3
|
+
export declare function storeNewPaymentMethod({ paymentMethod, accountId, token, apiHost, }: {
|
|
4
|
+
paymentMethod: CheckoutNewPaymentMethod;
|
|
5
|
+
accountId: string;
|
|
6
|
+
token?: string;
|
|
7
|
+
apiHost: string;
|
|
8
|
+
}): Promise<string>;
|
package/dist/cjs/types/src/components/CheckoutShared/appearance/CheckoutAppearanceProvider.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { type ResolvedAppearance } from './resolveAppearance';
|
|
3
|
+
import type { Appearance } from './types';
|
|
4
|
+
declare const useResolvedAppearance: () => ResolvedAppearance;
|
|
5
|
+
export { useResolvedAppearance };
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the appearance once and renders the root every rule is scoped to, with the rules as one
|
|
8
|
+
* `<style>`. The antd token is read here and nowhere else on the screen: it carries the brand color,
|
|
9
|
+
* dark mode and `configProviderProps` into the default variables.
|
|
10
|
+
*/
|
|
11
|
+
export declare function CheckoutAppearanceProvider({ appearance, children, }: {
|
|
12
|
+
appearance?: Appearance;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Appearance as StripeAppearance, StripeElementsOptions } from '@stripe/stripe-js';
|
|
2
|
+
import type { ResolvedAppearance } from '../resolveAppearance';
|
|
3
|
+
/** The resolved appearance in Stripe's terms, so the Payment Element is drawn like the form's own fields. */
|
|
4
|
+
export declare function toStripeAppearance({ variables, rules, sharedSelectors, darkMode, pageFontFamily, }: ResolvedAppearance): StripeAppearance;
|
|
5
|
+
/** `appearance` and `fonts` for Stripe's `<Elements>`. `fonts` can't change once the group is created. */
|
|
6
|
+
export declare function useStripeAppearance(): {
|
|
7
|
+
appearance: StripeAppearance;
|
|
8
|
+
fonts: NonNullable<StripeElementsOptions['fonts']>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { useStripeAppearance } from './adapters/stripe';
|
|
2
|
+
export { CheckoutAppearanceProvider } from './CheckoutAppearanceProvider';
|
|
3
|
+
export type { Appearance, AppearanceBlockStyle, AppearanceFont, AppearanceRules, AppearanceRuleStyle, AppearanceVariables, } from './types';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GlobalToken } from 'antd';
|
|
2
|
+
import type { Appearance, AppearanceFont } from './types';
|
|
3
|
+
import { type ResolvedVariables } from './variables';
|
|
4
|
+
/** Selector → style. Holds the public selectors and the internal ones the screen's other elements use. */
|
|
5
|
+
export type RulesMap = Record<string, Record<string, string>>;
|
|
6
|
+
export type ResolvedAppearance = {
|
|
7
|
+
variables: ResolvedVariables;
|
|
8
|
+
rules: RulesMap;
|
|
9
|
+
/** The selectors the payment provider's fields have too; their rules are handed over as they are. */
|
|
10
|
+
sharedSelectors: string[];
|
|
11
|
+
fonts: AppearanceFont[] | undefined;
|
|
12
|
+
darkMode: boolean;
|
|
13
|
+
/** The font our text inherits from the page, once measured. */
|
|
14
|
+
pageFontFamily: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Variables (our defaults, then the customer's) → the default rules built from them → the customer's
|
|
18
|
+
* rules merged in per selector. The result is the one rules map both our CSS and the payment
|
|
19
|
+
* provider's appearance are made from.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveAppearance(token: GlobalToken, darkMode: boolean, isMobile: boolean, appearance?: Appearance, pageFontFamily?: string): ResolvedAppearance;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AppearanceBlockStyle, AppearanceRuleStyle } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* What one rule source returns. All three groups are required (write `{}` when one is empty), so the
|
|
4
|
+
* registry's derived types can index every source by group.
|
|
5
|
+
*/
|
|
6
|
+
export type RuleGroups = {
|
|
7
|
+
/** Not in the API: base classes and elements customers reach only through variables. Any CSS. */
|
|
8
|
+
internal: Record<string, Record<string, string>>;
|
|
9
|
+
/** Public, and applied to our own fields and to the payment provider's alike: only the properties its fields accept. */
|
|
10
|
+
shared: Record<string, AppearanceRuleStyle>;
|
|
11
|
+
/** Public, Bunny-only elements: can also size them. */
|
|
12
|
+
block: Record<string, AppearanceBlockStyle>;
|
|
13
|
+
};
|
|
14
|
+
/** What a rule source can read besides the variables. */
|
|
15
|
+
export type RuleContext = {
|
|
16
|
+
isMobile: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { screenRules } from '../components/CheckoutScreen.rules';
|
|
2
|
+
import { demoPayCardBoxRules } from '../components/CheckoutForm/DemoPayCardBox.rules';
|
|
3
|
+
import { fieldRules } from '../components/CheckoutForm/Field.rules';
|
|
4
|
+
import { paymentTileRules } from '../components/CheckoutForm/PaymentTile.rules';
|
|
5
|
+
import { buttonRules } from '../components/controls/Button.rules';
|
|
6
|
+
import { selectRules } from '../components/controls/Select.rules';
|
|
7
|
+
import { textInputRules } from '../components/controls/TextInput.rules';
|
|
8
|
+
import type { AppearanceBlockStyle, AppearanceRuleStyle } from './types';
|
|
9
|
+
/**
|
|
10
|
+
* Every rule source. A selector belongs to one source (resolving throws in development otherwise), and
|
|
11
|
+
* a rule that overrides another uses a compound selector (`.Input.Select`), so the order here doesn't
|
|
12
|
+
* matter. Within a source, `internal` comes first, then `shared`, then `block`. The public types below
|
|
13
|
+
* derive from this list. Sources are `function` declarations so the emitted `.d.ts` refers to them by
|
|
14
|
+
* name and keeps their keys' JSDoc.
|
|
15
|
+
*/
|
|
16
|
+
export declare const RULE_SOURCES: readonly [typeof screenRules, typeof fieldRules, typeof textInputRules, typeof selectRules, typeof demoPayCardBoxRules, typeof paymentTileRules, typeof buttonRules];
|
|
17
|
+
type Source = ReturnType<(typeof RULE_SOURCES)[number]>;
|
|
18
|
+
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
19
|
+
type SharedGroups = UnionToIntersection<Source['shared']>;
|
|
20
|
+
type BlockGroups = UnionToIntersection<Source['block']>;
|
|
21
|
+
export type AppearanceRules = {
|
|
22
|
+
[K in keyof SharedGroups]?: AppearanceRuleStyle;
|
|
23
|
+
} & {
|
|
24
|
+
[K in keyof BlockGroups]?: AppearanceBlockStyle;
|
|
25
|
+
};
|
|
26
|
+
export type SharedSelector = keyof SharedGroups;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RulesMap } from './resolveAppearance';
|
|
2
|
+
/** The class on the element the rules are scoped to. */
|
|
3
|
+
export declare const ROOT_CLASS = "bunny-appearance";
|
|
4
|
+
/** The rules map as CSS for our own DOM. Selectors with no style (`.Summary` by default) are left out. */
|
|
5
|
+
export declare function rulesToCss(rules: RulesMap): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|