@bunnyapp/components 1.7.0-beta.8 → 1.8.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +5727 -4743
- package/dist/cjs/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
- package/dist/cjs/types/src/UI/Tooltip.d.ts +2 -0
- package/dist/cjs/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
- package/dist/cjs/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
- package/dist/cjs/types/src/ajax.d.ts +1 -1
- package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
- package/dist/cjs/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
- package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
- package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +2 -1
- package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +5 -3
- package/dist/cjs/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
- package/dist/cjs/types/src/components/Invoice/Invoice.d.ts +3 -1
- package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
- package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +50 -10
- package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +6 -0
- package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +1 -0
- package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +18 -0
- package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
- package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
- package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +46 -30
- package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
- package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
- package/dist/cjs/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
- package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
- package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
- package/dist/cjs/types/src/components/Quote/Quote.d.ts +31 -2
- package/dist/{esm/types/src/components/Quote → cjs/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
- package/dist/cjs/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
- package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
- package/dist/cjs/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
- package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
- package/dist/cjs/types/src/{hooks/quotes/useSendAcceptQuote.d.ts → components/Quote/hooks/useAcceptQuote.d.ts} +6 -3
- package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
- package/dist/cjs/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
- package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +14 -0
- package/dist/cjs/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
- package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +26 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +75 -0
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +16 -8
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +25 -0
- package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
- package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
- package/dist/cjs/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
- package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +0 -1
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +50 -0
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +19 -0
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +21 -0
- package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
- package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
- package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
- package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
- package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +10 -0
- package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +9 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -19
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
- package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +21 -1
- package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +10 -0
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
- package/dist/cjs/types/src/components/index.d.ts +1 -1
- package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +4 -5
- package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
- package/dist/cjs/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
- package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
- package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
- package/dist/cjs/types/src/consts/AppConsts.d.ts +3 -0
- package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +3 -3
- package/dist/cjs/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
- package/dist/cjs/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
- package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +5 -1
- package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +4 -0
- package/dist/cjs/types/src/types/PriceList.d.ts +1 -0
- package/dist/cjs/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -4
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +11 -5
- package/dist/cjs/types/src/utils/couponUtils.d.ts +6 -5
- package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/cjs/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
- package/dist/cjs/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
- package/dist/cjs/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
- package/dist/cjs/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
- package/dist/cjs/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
- package/dist/cjs/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
- package/dist/cjs/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
- package/dist/cjs/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
- package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +1 -1
- package/dist/esm/index.js +6657 -5673
- package/dist/esm/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
- package/dist/esm/types/src/UI/Tooltip.d.ts +2 -0
- package/dist/esm/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
- package/dist/esm/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
- package/dist/esm/types/src/ajax.d.ts +1 -1
- package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
- package/dist/esm/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
- package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
- package/dist/esm/types/src/components/Checkout/Checkout.d.ts +2 -1
- package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +5 -3
- package/dist/esm/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
- package/dist/esm/types/src/components/Invoice/Invoice.d.ts +3 -1
- package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
- package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
- package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +50 -10
- package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +6 -0
- package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +1 -0
- package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +18 -0
- package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
- package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
- package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
- package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +46 -30
- package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
- package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
- package/dist/esm/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
- package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
- package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
- package/dist/esm/types/src/components/Quote/Quote.d.ts +31 -2
- package/dist/{cjs/types/src/components/Quote → esm/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
- package/dist/esm/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
- package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
- package/dist/esm/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
- package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
- package/dist/esm/types/src/{hooks/quotes/useSendAcceptQuote.d.ts → components/Quote/hooks/useAcceptQuote.d.ts} +6 -3
- package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
- package/dist/esm/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
- package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +14 -0
- package/dist/esm/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
- package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +26 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
- package/dist/esm/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +75 -0
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +16 -8
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +25 -0
- package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
- package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
- package/dist/esm/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
- package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
- package/dist/esm/types/src/components/Signup/Signup.d.ts +0 -1
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +50 -0
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +19 -0
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +21 -0
- package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
- package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
- package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
- package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
- package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +10 -0
- package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +9 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -19
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
- package/dist/esm/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
- package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
- package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +21 -1
- package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +10 -0
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
- package/dist/esm/types/src/components/index.d.ts +1 -1
- package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +4 -5
- package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
- package/dist/esm/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
- package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
- package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
- package/dist/esm/types/src/consts/AppConsts.d.ts +3 -0
- package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +3 -3
- package/dist/esm/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
- package/dist/esm/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
- package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
- package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +5 -1
- package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +4 -0
- package/dist/esm/types/src/types/PriceList.d.ts +1 -0
- package/dist/esm/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -4
- package/dist/esm/types/src/utils/chargeUtils.d.ts +11 -5
- package/dist/esm/types/src/utils/couponUtils.d.ts +6 -5
- package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
- package/dist/esm/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
- package/dist/esm/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
- package/dist/esm/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
- package/dist/esm/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
- package/dist/esm/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
- package/dist/esm/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
- package/dist/esm/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
- package/dist/esm/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
- package/dist/esm/types/src/utils/pricePickerUtils.d.ts +1 -1
- package/dist/index.d.ts +128 -24
- package/package.json +17 -17
- package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
- package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
- package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -40
- package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +0 -14
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
- package/dist/cjs/types/src/graphql/mutations/accountSignup.d.ts +0 -11
- package/dist/cjs/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
- package/dist/cjs/types/src/graphql/queries/getQuote.d.ts +0 -36
- package/dist/cjs/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
- package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
- package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
- package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -40
- package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +0 -14
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
- package/dist/esm/types/src/graphql/mutations/accountSignup.d.ts +0 -11
- package/dist/esm/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
- package/dist/esm/types/src/graphql/queries/getQuote.d.ts +0 -36
- package/dist/esm/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
- /package/dist/cjs/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
- /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
- /package/dist/cjs/types/src/{hooks/quotes → components/Quote/hooks}/useSigningComplete.d.ts +0 -0
- /package/dist/esm/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
- /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
- /package/dist/esm/types/src/{hooks/quotes → components/Quote/hooks}/useSigningComplete.d.ts +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type IfMaybeUndefined<T, True, False> = [undefined] extends [T] ? True : False;
|
|
2
|
+
declare const testAccess: 0;
|
|
3
|
+
export type IfUncheckedIndexedAccess<True, False> = IfMaybeUndefined<typeof testAccess, True, False>;
|
|
4
|
+
export type UncheckedIndexedAccess<T> = IfUncheckedIndexedAccess<T | undefined, T>;
|
|
5
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useDownloadFile: (id?: string, onError?: (error: any) => void) => (url: string, token?: string) => Promise<any>;
|
|
1
|
+
export declare const useDownloadFile: (id?: string | null | undefined, onError?: (error: any) => void) => (url: string, token?: string) => Promise<any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../styles/index.less';
|
|
2
2
|
import { ShadowType } from '../../types/shadowType';
|
|
3
|
-
declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, }: {
|
|
3
|
+
declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, onPaymentMethodRemoved, }: {
|
|
4
4
|
className?: string;
|
|
5
5
|
countryListFilter?: (country: {
|
|
6
6
|
value: string;
|
|
@@ -11,6 +11,7 @@ declare const BillingDetails: ({ className, countryListFilter, hideBillingDetail
|
|
|
11
11
|
isCardEnabled?: boolean;
|
|
12
12
|
isUpgradeFromTrial?: boolean;
|
|
13
13
|
shadow?: ShadowType;
|
|
14
|
-
onSavePaymentMethod?: (
|
|
14
|
+
onSavePaymentMethod?: (paymentMethodId: string) => void;
|
|
15
|
+
onPaymentMethodRemoved?: (paymentMethodId: string) => void;
|
|
15
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default BillingDetails;
|
package/dist/cjs/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts}
RENAMED
|
@@ -7,13 +7,16 @@ export type BunnyContextValues = {
|
|
|
7
7
|
onTokenExpired?: () => void;
|
|
8
8
|
};
|
|
9
9
|
export declare const BunnyContext: import("react").Context<BunnyContextValues>;
|
|
10
|
-
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, configProviderProps, }: {
|
|
10
|
+
declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
darkMode?: boolean;
|
|
13
13
|
queryClient?: QueryClient;
|
|
14
14
|
apiHost: string;
|
|
15
15
|
token?: string;
|
|
16
16
|
onTokenExpired?: () => void;
|
|
17
|
+
onUserUnavailable?: () => void;
|
|
18
|
+
onInvalidOrMissingAuthorization?: () => void;
|
|
19
|
+
suppressUserUnavailableErrorNotification?: boolean;
|
|
17
20
|
configProviderProps?: ThemeConfig | undefined;
|
|
18
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export default BunnyProvider;
|
package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const BunnyProviderCallbacksProvider: ({ value, children }: {
|
|
2
|
+
value: {
|
|
3
|
+
onUserUnavailable?: () => void;
|
|
4
|
+
onInvalidOrMissingAuthorization?: () => void;
|
|
5
|
+
suppressUserUnavailableErrorNotification?: boolean;
|
|
6
|
+
};
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element, useBunnyProviderCallbacks: () => {
|
|
9
|
+
onUserUnavailable?: () => void;
|
|
10
|
+
onInvalidOrMissingAuthorization?: () => void;
|
|
11
|
+
suppressUserUnavailableErrorNotification?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export { BunnyProviderCallbacksProvider, useBunnyProviderCallbacks };
|
|
@@ -24,6 +24,7 @@ type CheckoutProps = {
|
|
|
24
24
|
quote?: FragmentOf<typeof Checkout_QuoteFragment> | null;
|
|
25
25
|
token?: string;
|
|
26
26
|
isUpdatingQuote: boolean;
|
|
27
|
+
isRecalculatingTaxes: boolean;
|
|
27
28
|
};
|
|
28
|
-
declare const Checkout: ({ onCancel, onSuccess, onFail, onRecalculateTaxes, invoice, open, quote: maskedQuote, isUpdatingQuote, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
declare const Checkout: ({ onCancel, onSuccess, onFail, onRecalculateTaxes, invoice, open, quote: maskedQuote, isUpdatingQuote, isRecalculatingTaxes, }: CheckoutProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
29
30
|
export default Checkout;
|
|
@@ -72,7 +72,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
72
72
|
}[];
|
|
73
73
|
kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
|
|
74
74
|
[$tada.fragmentRefs]: {
|
|
75
|
-
|
|
75
|
+
canApplyCoupons_QuoteFragment: "Quote";
|
|
76
76
|
} & {
|
|
77
77
|
PaymentForm_QuoteFragment: "Quote";
|
|
78
78
|
} & {
|
|
@@ -86,7 +86,7 @@ export declare const QuoteCheckout_QuoteFragment: import("gql.tada").TadaDocumen
|
|
|
86
86
|
export declare const QuoteCheckout_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
|
|
87
87
|
id: string;
|
|
88
88
|
[$tada.fragmentRefs]: {
|
|
89
|
-
|
|
89
|
+
canApplyCoupons_SubscriptionFragment: "Subscription";
|
|
90
90
|
};
|
|
91
91
|
}, {}, {
|
|
92
92
|
fragment: "QuoteCheckout_SubscriptionFragment";
|
|
@@ -100,6 +100,8 @@ interface QuoteCheckoutProps extends InvoiceQuoteParentProps {
|
|
|
100
100
|
token?: string;
|
|
101
101
|
storedPaymentMethod?: PaymentMethod;
|
|
102
102
|
onRecalculateTaxes: () => void;
|
|
103
|
+
isUpdatingQuote: boolean;
|
|
104
|
+
isRecalculatingTaxes: boolean;
|
|
103
105
|
}
|
|
104
|
-
declare const QuoteCheckout: ({ account, onSuccess, onFail, quote: maskedQuote, taxationRequiredAccountFields, onRecalculateTaxes, }: QuoteCheckoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
declare const QuoteCheckout: ({ account, onSuccess, onFail, quote: maskedQuote, taxationRequiredAccountFields, isUpdatingQuote, onRecalculateTaxes, isRecalculatingTaxes, }: QuoteCheckoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
105
107
|
export default QuoteCheckout;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QuoteLoadingIndicator(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
|
|
2
2
|
export type InvoiceProps = InvoiceQuoteContextProps & {
|
|
3
3
|
hidePaymentForm?: boolean;
|
|
4
|
+
onPaymentMethodSaved?: (paymentMethodId: string) => void;
|
|
5
|
+
onPaymentMethodRemoved?: (paymentMethodId: string) => void;
|
|
4
6
|
};
|
|
5
|
-
export default function Invoice({ id, invoiceQuoteViewComponent, backButtonName, onBackButtonClick, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, hidePaymentForm, onInvoiceLoaded, }: InvoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default function Invoice({ id, invoiceQuoteViewComponent, backButtonName, onBackButtonClick, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, hidePaymentForm, onInvoiceLoaded, onPaymentMethodSaved, onPaymentMethodRemoved, }: InvoiceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface PandadocPollingModalProps {
|
|
2
2
|
isVisible: boolean;
|
|
3
3
|
setVisible: (visible: boolean) => void;
|
|
4
|
-
id?: string;
|
|
4
|
+
id?: string | null | undefined;
|
|
5
5
|
}
|
|
6
6
|
declare const PandadocPollingModal: ({ isVisible, setVisible, id }: PandadocPollingModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default PandadocPollingModal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type DemoPayCardDetails = {
|
|
2
|
+
number: string;
|
|
3
|
+
expiry: string;
|
|
4
|
+
cvc: string;
|
|
5
|
+
};
|
|
6
|
+
declare const DemoPayFormProvider: ({ initialValue, children, }: {
|
|
7
|
+
initialValue?: DemoPayCardDetails | undefined;
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element, useDemoPayCardDetails: () => [DemoPayCardDetails, import("react").Dispatch<import("react").SetStateAction<DemoPayCardDetails>>];
|
|
10
|
+
export { DemoPayFormProvider, useDemoPayCardDetails };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import Invoice from '@/types/Invoice';
|
|
3
1
|
import { PluginData } from '@/types/frontendTypes';
|
|
4
|
-
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId,
|
|
2
|
+
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId, invoiceId, plugin, }: {
|
|
5
3
|
onPaymentSuccess?: (response: any) => void;
|
|
6
4
|
onPaymentError?: (error: any) => void;
|
|
7
5
|
quoteId?: string | null;
|
|
8
|
-
|
|
6
|
+
invoiceId?: string | null;
|
|
9
7
|
plugin: PluginData | undefined;
|
|
10
8
|
}): {
|
|
11
9
|
pay: (paymentMethodId: string) => Promise<void>;
|
|
@@ -3,11 +3,7 @@ export declare function useSave({ onSaveSuccess, onSaveError, accountId, }: {
|
|
|
3
3
|
onSaveError?: (error: any) => void;
|
|
4
4
|
accountId: string | undefined;
|
|
5
5
|
}): {
|
|
6
|
-
save: (
|
|
7
|
-
number: string;
|
|
8
|
-
expiry: string;
|
|
9
|
-
cvc: string;
|
|
10
|
-
}) => Promise<string | undefined>;
|
|
6
|
+
save: () => Promise<string | undefined>;
|
|
11
7
|
isSaving: boolean;
|
|
12
8
|
};
|
|
13
9
|
export default useSave;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { FragmentOf, ResultOf } from 'gql.tada';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { CheckoutNoPayment } from './components/CheckoutNoPayment';
|
|
5
|
+
import { Pay } from './components/Pay';
|
|
6
|
+
import { PaymentMethodDetails } from './components/PaymentMethodDetails/PaymentMethodDetails';
|
|
7
|
+
import { StoredPaymentMethods } from './components/StoredPaymentMethods';
|
|
8
|
+
import { PaymentForm_PaymentMethodsFragment } from './fragments/PaymentForm_PaymentMethodsFragment';
|
|
9
|
+
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
4
10
|
export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
5
11
|
id: string | null;
|
|
6
12
|
currencyId: string;
|
|
@@ -12,19 +18,53 @@ export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentN
|
|
|
12
18
|
on: "Quote";
|
|
13
19
|
masked: true;
|
|
14
20
|
}>;
|
|
15
|
-
export declare
|
|
16
|
-
|
|
21
|
+
export declare const PaymentForm_InvoiceFragment: import("gql.tada").TadaDocumentNode<{
|
|
22
|
+
id: string | null;
|
|
23
|
+
currencyId: string;
|
|
24
|
+
[$tada.fragmentRefs]: {
|
|
25
|
+
PaymentProvider_InvoiceFragment: "Invoice";
|
|
26
|
+
};
|
|
27
|
+
}, {}, {
|
|
28
|
+
fragment: "PaymentForm_InvoiceFragment";
|
|
29
|
+
on: "Invoice";
|
|
30
|
+
masked: true;
|
|
31
|
+
}>;
|
|
32
|
+
declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, children, }: {
|
|
33
|
+
currencyId?: string;
|
|
34
|
+
invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
|
|
17
35
|
quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
|
|
36
|
+
paymentHold?: {
|
|
37
|
+
quoteId: string;
|
|
38
|
+
amountToHold: number;
|
|
39
|
+
};
|
|
18
40
|
onPaymentSuccess?: (response: any) => void;
|
|
19
41
|
onPaymentHoldSuccess?: (response: any) => void;
|
|
42
|
+
/**
|
|
43
|
+
* If provided, the payment hold will only go through if this condition returns true.
|
|
44
|
+
*/
|
|
45
|
+
paymentHoldPrecondition?: () => boolean | Promise<boolean>;
|
|
20
46
|
onSavePaymentMethod?: (response: any) => void;
|
|
21
|
-
|
|
47
|
+
onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
|
|
22
48
|
onSetDefaultPaymentMethod?: () => void;
|
|
23
49
|
accountId?: string;
|
|
24
50
|
overrideToken?: string;
|
|
25
51
|
customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
|
|
26
|
-
|
|
27
|
-
payToAccept?: boolean;
|
|
28
|
-
amountToHold?: number;
|
|
29
|
-
};
|
|
52
|
+
children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
|
|
30
53
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
54
|
+
type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
|
|
55
|
+
export type PaymentFormRenderState = {
|
|
56
|
+
hasPaymentMethods: boolean;
|
|
57
|
+
isPaymentMethodDetailsOpen: boolean;
|
|
58
|
+
isPayableAvailable: boolean;
|
|
59
|
+
amountDue: number | undefined;
|
|
60
|
+
};
|
|
61
|
+
declare function PaymentFormInternal(props: PaymentFormProps & {
|
|
62
|
+
disablePayButton?: boolean;
|
|
63
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare const PaymentForm: typeof PaymentFormInternal & {
|
|
65
|
+
StoredPaymentMethods: typeof StoredPaymentMethods;
|
|
66
|
+
Pay: typeof Pay;
|
|
67
|
+
CheckoutNoPayment: typeof CheckoutNoPayment;
|
|
68
|
+
PaymentMethodDetails: typeof PaymentMethodDetails;
|
|
69
|
+
};
|
|
70
|
+
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import Invoice from '@/types/Invoice';
|
|
3
1
|
import { PluginData } from '@/types/frontendTypes';
|
|
4
|
-
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId,
|
|
2
|
+
export declare function usePay({ onPaymentSuccess, onPaymentError, quoteId, invoiceId, plugin, }: {
|
|
5
3
|
onPaymentSuccess?: (response: any) => void;
|
|
6
4
|
onPaymentError?: (error: any) => void;
|
|
7
5
|
quoteId?: string | null;
|
|
8
|
-
|
|
6
|
+
invoiceId?: string | null;
|
|
9
7
|
plugin: PluginData | undefined;
|
|
10
8
|
}): {
|
|
11
9
|
pay: (paymentMethodId: string) => Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Cancel } from './components/Cancel';
|
|
3
|
+
import { Save } from './components/Save';
|
|
4
|
+
type PaymentMethodDetailsProps = {
|
|
5
|
+
footer?: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare function PaymentMethodDetailsRoot(props?: PaymentMethodDetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const PaymentMethodDetails: typeof PaymentMethodDetailsRoot & {
|
|
9
|
+
Cancel: typeof Cancel;
|
|
10
|
+
Save: typeof Save;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Cancel(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Save(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const StoredPaymentMethods_PaymentMethodsFragment: import("gql.tada").TadaDocumentNode<{
|
|
2
|
+
[$tada.fragmentRefs]: {
|
|
3
|
+
MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
|
|
4
|
+
};
|
|
5
|
+
id: string;
|
|
6
|
+
plugin: {
|
|
7
|
+
id: string;
|
|
8
|
+
} | null;
|
|
9
|
+
}, {}, {
|
|
10
|
+
fragment: "StoredPaymentMethods_PaymentMethodsFragment";
|
|
11
|
+
on: "PaymentMethod";
|
|
12
|
+
masked: true;
|
|
13
|
+
}>;
|
|
14
|
+
type StoredPaymentMethodsProps = {
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function StoredPaymentMethods(props?: StoredPaymentMethodsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PaymentMethodFragment } from './PaymentMethodFormVisibilityContext';
|
|
2
|
+
export type PaymentCallbacksContextValue = {
|
|
3
|
+
onPaymentSuccess: ((response: any) => void) | undefined;
|
|
4
|
+
onSetDefaultPaymentMethod: (() => void) | undefined;
|
|
5
|
+
onPaymentMethodRemoved: ((paymentMethod: PaymentMethodFragment) => void) | undefined;
|
|
6
|
+
onSavePaymentMethod: ((response: any) => void) | undefined;
|
|
7
|
+
onPaymentHoldSuccess: ((response: any) => void) | undefined;
|
|
8
|
+
paymentHoldPrecondition: (() => boolean | Promise<boolean>) | undefined;
|
|
9
|
+
};
|
|
10
|
+
declare const PaymentFormCallbacksProvider: ({ value, children }: {
|
|
11
|
+
value: PaymentCallbacksContextValue;
|
|
12
|
+
children?: import("react").ReactNode;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element, usePaymentFormCallbacks: () => PaymentCallbacksContextValue;
|
|
14
|
+
export { PaymentFormCallbacksProvider, usePaymentFormCallbacks };
|
package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResultOf } from 'gql.tada';
|
|
2
|
+
import { PaymentForm_PaymentMethodsFragment } from '../fragments/PaymentForm_PaymentMethodsFragment';
|
|
3
|
+
export type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
4
|
+
export type PaymentMethodFormVisibilityContextValue = {
|
|
5
|
+
showPaymentMethodForm: boolean;
|
|
6
|
+
setShowPaymentMethodForm: (show: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const PaymentMethodFormVisibilityProvider: ({ value, children }: {
|
|
9
|
+
value: PaymentMethodFormVisibilityContextValue;
|
|
10
|
+
children?: import("react").ReactNode;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element, usePaymentMethodFormVisibility: () => PaymentMethodFormVisibilityContextValue;
|
|
12
|
+
export { PaymentMethodFormVisibilityProvider, usePaymentMethodFormVisibility };
|
|
@@ -1,44 +1,60 @@
|
|
|
1
|
-
import FormattedInvoice from '@/types/FormattedInvoice';
|
|
2
|
-
import Invoice from '@/types/Invoice';
|
|
3
1
|
import { FragmentOf } from 'gql.tada';
|
|
4
2
|
import { PaymentType } from '../types/PaymentType';
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
declare const PayableProvider: ({ value, children }: {
|
|
4
|
+
value: {
|
|
5
|
+
quoteId?: string;
|
|
6
|
+
invoiceId?: string;
|
|
7
|
+
paymentHold?: {
|
|
8
|
+
quoteId: string;
|
|
9
|
+
amountToHold: number;
|
|
10
|
+
};
|
|
11
|
+
paymentType: PaymentType;
|
|
12
|
+
amountDue: number | undefined;
|
|
13
|
+
formattedAmountDue: string | undefined;
|
|
14
|
+
isPaid: boolean;
|
|
15
|
+
setIsPaid: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
|
+
};
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element, usePayable: () => {
|
|
19
|
+
quoteId?: string;
|
|
20
|
+
invoiceId?: string;
|
|
21
|
+
paymentHold?: {
|
|
22
|
+
quoteId: string;
|
|
23
|
+
amountToHold: number;
|
|
24
|
+
};
|
|
25
|
+
paymentType: PaymentType;
|
|
26
|
+
amountDue: number | undefined;
|
|
27
|
+
formattedAmountDue: string | undefined;
|
|
28
|
+
isPaid: boolean;
|
|
29
|
+
setIsPaid: React.Dispatch<React.SetStateAction<boolean>>;
|
|
30
|
+
};
|
|
31
|
+
export { PayableProvider, usePayable, };
|
|
17
32
|
export declare const PaymentProvider_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
18
33
|
id: string | null;
|
|
34
|
+
currencyId: string;
|
|
19
35
|
[$tada.fragmentRefs]: {
|
|
20
|
-
|
|
36
|
+
getQuoteAmountDue_QuoteFragment: "Quote";
|
|
21
37
|
};
|
|
22
38
|
}, {}, {
|
|
23
39
|
fragment: "PaymentProvider_QuoteFragment";
|
|
24
40
|
on: "Quote";
|
|
25
41
|
masked: true;
|
|
26
42
|
}>;
|
|
27
|
-
export declare
|
|
43
|
+
export declare const PaymentProvider_InvoiceFragment: import("gql.tada").TadaDocumentNode<{
|
|
44
|
+
id: string | null;
|
|
45
|
+
currencyId: string;
|
|
46
|
+
amountDue: number | null;
|
|
47
|
+
}, {}, {
|
|
48
|
+
fragment: "PaymentProvider_InvoiceFragment";
|
|
49
|
+
on: "Invoice";
|
|
50
|
+
masked: true;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function PaymentProvider({ children, quote: maskedQuote, invoice: maskedInvoice, paymentHold, }: {
|
|
28
53
|
children: React.ReactNode;
|
|
29
|
-
accountId?: string;
|
|
30
54
|
quote: FragmentOf<typeof PaymentProvider_QuoteFragment> | undefined;
|
|
31
|
-
invoice:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
amountToHold?: number;
|
|
37
|
-
};
|
|
38
|
-
onSavePaymentMethod?: (response: any) => void;
|
|
39
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
export declare function StripeWrapper({ children, currencyId, accountId, }: {
|
|
41
|
-
children: React.ReactNode;
|
|
42
|
-
currencyId: string;
|
|
43
|
-
accountId?: string;
|
|
55
|
+
invoice: FragmentOf<typeof PaymentProvider_InvoiceFragment> | undefined;
|
|
56
|
+
paymentHold: {
|
|
57
|
+
quoteId: string;
|
|
58
|
+
amountToHold: number;
|
|
59
|
+
} | undefined;
|
|
44
60
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export declare const PaymentForm_PaymentMethodsFragment: import("gql.tada").Tada
|
|
|
3
3
|
MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
|
|
4
4
|
};
|
|
5
5
|
id: string;
|
|
6
|
+
plugin: {
|
|
7
|
+
id: string;
|
|
8
|
+
} | null;
|
|
6
9
|
}, {}, {
|
|
7
10
|
fragment: "PaymentForm_PaymentMethodsFragment";
|
|
8
11
|
on: "PaymentMethod";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PluginData } from '@/types/frontendTypes';
|
|
2
|
+
type UsePayArgs = {
|
|
3
|
+
plugin: PluginData | undefined;
|
|
4
|
+
quoteId?: string | null;
|
|
5
|
+
invoiceId?: string | null;
|
|
6
|
+
onPaymentSuccess?: (response: any) => void;
|
|
7
|
+
onPaymentError?: (error: any) => void;
|
|
8
|
+
};
|
|
9
|
+
type UsePayResult = {
|
|
10
|
+
pay: (paymentMethodId: string) => Promise<void>;
|
|
11
|
+
isPaying: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function usePay({ plugin, quoteId, invoiceId, onPaymentSuccess, onPaymentError, }: UsePayArgs): UsePayResult;
|
|
14
|
+
export default usePay;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare function usePayableCurrency({ payableCurrencyId }: {
|
|
1
|
+
export declare function usePayableCurrency({ payableCurrencyId, accountCurrencyId }: {
|
|
2
2
|
payableCurrencyId?: string;
|
|
3
|
+
accountCurrencyId?: string;
|
|
3
4
|
}): {
|
|
4
5
|
currencyId: string | undefined;
|
|
5
6
|
isCurrencyIdLoading: boolean;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type usePaymentButtonTextProps = {
|
|
2
|
+
isSaving?: boolean;
|
|
3
|
+
isPaying?: boolean;
|
|
4
|
+
isApprovingHold?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function usePaymentButtonText(props?: usePaymentButtonTextProps): string;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PluginData } from '@/types/frontendTypes';
|
|
2
|
+
type UsePaymentHoldArgs = {
|
|
3
|
+
plugin: PluginData | undefined;
|
|
4
|
+
onPaymentHoldSuccess?: (response: any) => void;
|
|
5
|
+
onPaymentHoldError?: (error: any) => void;
|
|
6
|
+
};
|
|
7
|
+
type UsePaymentHoldResult = {
|
|
8
|
+
approveHold: (args: {
|
|
9
|
+
quote: {
|
|
10
|
+
id: string;
|
|
11
|
+
amount: number;
|
|
12
|
+
};
|
|
13
|
+
paymentMethodId: string;
|
|
14
|
+
}) => Promise<void>;
|
|
15
|
+
isApprovingHold: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function usePaymentHold({ plugin, onPaymentHoldSuccess, onPaymentHoldError, }: UsePaymentHoldArgs): UsePaymentHoldResult;
|
|
18
|
+
export default usePaymentHold;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ResultOf } from 'gql.tada';
|
|
2
|
+
import { PaymentForm_PaymentMethodsFragment } from '../fragments/PaymentForm_PaymentMethodsFragment';
|
|
3
|
+
type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
|
|
4
|
+
declare function useRemovePaymentMethod(onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void, onError?: (message: string) => void): (data: PaymentMethodFragment) => Promise<void>;
|
|
2
5
|
export default useRemovePaymentMethod;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type SaveHookArgs = {
|
|
2
|
+
accountId: string | undefined;
|
|
3
|
+
onSaveSuccess?: (response: any) => void;
|
|
4
|
+
onSaveError?: (error: any) => void;
|
|
5
|
+
/**
|
|
6
|
+
* When true, invalidates the account payment methods query after a successful save.
|
|
7
|
+
* Defaults to true.
|
|
8
|
+
*/
|
|
9
|
+
invalidatePaymentMethodsQuery?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type SaveHookResult = {
|
|
12
|
+
save: () => Promise<string | undefined>;
|
|
13
|
+
isSaving: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function useSave({ accountId, onSaveSuccess, onSaveError, invalidatePaymentMethodsQuery, }: SaveHookArgs): SaveHookResult;
|
|
16
|
+
export default useSave;
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
+
import { ResultOf } from 'gql.tada';
|
|
1
2
|
import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
|
|
2
|
-
export declare const
|
|
3
|
+
export declare const Quote_PaymentHoldFragment: import("gql.tada").TadaDocumentNode<{
|
|
4
|
+
quote: {
|
|
5
|
+
currentPaymentHold: {
|
|
6
|
+
[$tada.fragmentRefs]: {
|
|
7
|
+
PaymentHoldDisplay_QuoteButtonsFragment: "PaymentHold";
|
|
8
|
+
};
|
|
9
|
+
} | null;
|
|
10
|
+
firstInvoice: {
|
|
11
|
+
id: string | null;
|
|
12
|
+
} | null;
|
|
13
|
+
};
|
|
14
|
+
}, {}, {
|
|
15
|
+
fragment: "Quote_PaymentHoldFragment";
|
|
16
|
+
on: "FormattedQuote";
|
|
17
|
+
masked: true;
|
|
18
|
+
}>;
|
|
19
|
+
declare const OnQuoteLoadedFragment: import("gql.tada").TadaDocumentNode<{
|
|
20
|
+
vendorName: string | null;
|
|
21
|
+
quote: {
|
|
22
|
+
id: string | null;
|
|
23
|
+
};
|
|
24
|
+
}, {}, {
|
|
25
|
+
fragment: "OnQuoteLoadedFragment";
|
|
26
|
+
on: "FormattedQuote";
|
|
27
|
+
masked: true;
|
|
28
|
+
}>;
|
|
3
29
|
type QuoteProps = InvoiceQuoteContextProps & {
|
|
4
30
|
onQuoteAccepted?: () => void;
|
|
31
|
+
onQuoteUnavailableError?: () => void;
|
|
32
|
+
suppressQuoteUnavailableErrorNotification?: boolean;
|
|
33
|
+
onQuoteLoaded?: (formattedQuote: ResultOf<typeof OnQuoteLoadedFragment>) => void;
|
|
5
34
|
};
|
|
6
|
-
export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
|
|
7
36
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FragmentOf } from 'gql.tada';
|
|
2
2
|
export declare const AcceptQuoteModal_FormattedQuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
NoSigningPluginsForm_FormattedQuoteFragment: "FormattedQuote";
|
|
5
|
+
};
|
|
6
6
|
}, {}, {
|
|
7
7
|
fragment: "AcceptQuoteModal_FormattedQuoteFragment";
|
|
8
8
|
on: "FormattedQuote";
|