@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.
Files changed (300) hide show
  1. package/dist/cjs/index.js +5727 -4743
  2. package/dist/cjs/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
  3. package/dist/cjs/types/src/UI/Tooltip.d.ts +2 -0
  4. package/dist/cjs/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
  5. package/dist/cjs/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
  6. package/dist/cjs/types/src/ajax.d.ts +1 -1
  7. package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
  8. package/dist/cjs/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
  9. package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
  10. package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +2 -1
  11. package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +5 -3
  12. package/dist/cjs/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
  13. package/dist/cjs/types/src/components/Invoice/Invoice.d.ts +3 -1
  14. package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
  15. package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
  16. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
  17. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
  18. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +50 -10
  19. package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +5 -0
  20. package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
  21. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +6 -0
  22. package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +5 -0
  23. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
  24. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
  25. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +1 -0
  26. package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +18 -0
  27. package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
  28. package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
  29. package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
  30. package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +46 -30
  31. package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
  32. package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
  33. package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
  34. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
  35. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
  36. package/dist/cjs/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
  37. package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
  38. package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
  39. package/dist/cjs/types/src/components/Quote/Quote.d.ts +31 -2
  40. package/dist/{esm/types/src/components/Quote → cjs/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
  41. package/dist/cjs/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
  42. package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
  43. package/dist/cjs/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
  44. package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
  45. package/dist/cjs/types/src/{hooks/quotes/useSendAcceptQuote.d.ts → components/Quote/hooks/useAcceptQuote.d.ts} +6 -3
  46. package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
  47. package/dist/cjs/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
  48. package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +14 -0
  49. package/dist/cjs/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
  50. package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +26 -0
  51. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -0
  52. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
  53. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
  54. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
  55. package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
  56. package/dist/cjs/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
  57. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +75 -0
  58. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
  59. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +16 -8
  60. package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +25 -0
  61. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
  62. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
  63. package/dist/cjs/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
  64. package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +1 -1
  65. package/dist/cjs/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
  66. package/dist/cjs/types/src/components/Signup/Signup.d.ts +0 -1
  67. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +50 -0
  68. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
  69. package/dist/cjs/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
  70. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
  71. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +19 -0
  72. package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +21 -0
  73. package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  74. package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  75. package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  76. package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
  77. package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  78. package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
  79. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +9 -0
  80. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
  81. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
  82. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
  83. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  84. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -19
  85. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
  86. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
  87. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
  88. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
  89. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
  90. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
  91. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
  92. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
  93. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
  94. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
  95. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
  96. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
  97. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
  98. package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
  99. package/dist/cjs/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
  100. package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
  101. package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +21 -1
  102. package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +10 -0
  103. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
  104. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
  105. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
  106. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
  107. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
  108. package/dist/cjs/types/src/components/index.d.ts +1 -1
  109. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +4 -5
  110. package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
  111. package/dist/cjs/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
  112. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
  113. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
  114. package/dist/cjs/types/src/consts/AppConsts.d.ts +3 -0
  115. package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +3 -3
  116. package/dist/cjs/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
  117. package/dist/cjs/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
  118. package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  119. package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +5 -1
  120. package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +4 -0
  121. package/dist/cjs/types/src/types/PriceList.d.ts +1 -0
  122. package/dist/cjs/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
  123. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +4 -4
  124. package/dist/cjs/types/src/utils/chargeUtils.d.ts +11 -5
  125. package/dist/cjs/types/src/utils/couponUtils.d.ts +6 -5
  126. package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  127. package/dist/cjs/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
  128. package/dist/cjs/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
  129. package/dist/cjs/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
  130. package/dist/cjs/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
  131. package/dist/cjs/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
  132. package/dist/cjs/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
  133. package/dist/cjs/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
  134. package/dist/cjs/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
  135. package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +1 -1
  136. package/dist/esm/index.js +6657 -5673
  137. package/dist/esm/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
  138. package/dist/esm/types/src/UI/Tooltip.d.ts +2 -0
  139. package/dist/esm/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
  140. package/dist/esm/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
  141. package/dist/esm/types/src/ajax.d.ts +1 -1
  142. package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
  143. package/dist/esm/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
  144. package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
  145. package/dist/esm/types/src/components/Checkout/Checkout.d.ts +2 -1
  146. package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +5 -3
  147. package/dist/esm/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
  148. package/dist/esm/types/src/components/Invoice/Invoice.d.ts +3 -1
  149. package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
  150. package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
  151. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
  152. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
  153. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +50 -10
  154. package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +5 -0
  155. package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
  156. package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +6 -0
  157. package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +5 -0
  158. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
  159. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
  160. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +1 -0
  161. package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +18 -0
  162. package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
  163. package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
  164. package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
  165. package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +46 -30
  166. package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
  167. package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
  168. package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
  169. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
  170. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
  171. package/dist/esm/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
  172. package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
  173. package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
  174. package/dist/esm/types/src/components/Quote/Quote.d.ts +31 -2
  175. package/dist/{cjs/types/src/components/Quote → esm/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
  176. package/dist/esm/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
  177. package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
  178. package/dist/esm/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
  179. package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
  180. package/dist/esm/types/src/{hooks/quotes/useSendAcceptQuote.d.ts → components/Quote/hooks/useAcceptQuote.d.ts} +6 -3
  181. package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
  182. package/dist/esm/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
  183. package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +14 -0
  184. package/dist/esm/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
  185. package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +26 -0
  186. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -0
  187. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
  188. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
  189. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
  190. package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
  191. package/dist/esm/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
  192. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +75 -0
  193. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
  194. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +16 -8
  195. package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +25 -0
  196. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
  197. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
  198. package/dist/esm/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
  199. package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +1 -1
  200. package/dist/esm/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
  201. package/dist/esm/types/src/components/Signup/Signup.d.ts +0 -1
  202. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +50 -0
  203. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
  204. package/dist/esm/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
  205. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
  206. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +19 -0
  207. package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +21 -0
  208. package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  209. package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  210. package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  211. package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
  212. package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  213. package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
  214. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +9 -0
  215. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
  216. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
  217. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
  218. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  219. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -19
  220. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
  221. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
  222. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
  223. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
  224. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
  225. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
  226. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
  227. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
  228. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
  229. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
  230. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
  231. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
  232. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
  233. package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
  234. package/dist/esm/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
  235. package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
  236. package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +21 -1
  237. package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +10 -0
  238. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
  239. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
  240. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
  241. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
  242. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
  243. package/dist/esm/types/src/components/index.d.ts +1 -1
  244. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +4 -5
  245. package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
  246. package/dist/esm/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
  247. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
  248. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
  249. package/dist/esm/types/src/consts/AppConsts.d.ts +3 -0
  250. package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +3 -3
  251. package/dist/esm/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
  252. package/dist/esm/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
  253. package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  254. package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +5 -1
  255. package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +4 -0
  256. package/dist/esm/types/src/types/PriceList.d.ts +1 -0
  257. package/dist/esm/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
  258. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +4 -4
  259. package/dist/esm/types/src/utils/chargeUtils.d.ts +11 -5
  260. package/dist/esm/types/src/utils/couponUtils.d.ts +6 -5
  261. package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  262. package/dist/esm/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
  263. package/dist/esm/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
  264. package/dist/esm/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
  265. package/dist/esm/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
  266. package/dist/esm/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
  267. package/dist/esm/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
  268. package/dist/esm/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
  269. package/dist/esm/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
  270. package/dist/esm/types/src/utils/pricePickerUtils.d.ts +1 -1
  271. package/dist/index.d.ts +128 -24
  272. package/package.json +17 -17
  273. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
  274. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
  275. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
  276. package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -40
  277. package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +0 -14
  278. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
  279. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
  280. package/dist/cjs/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  281. package/dist/cjs/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  282. package/dist/cjs/types/src/graphql/queries/getQuote.d.ts +0 -36
  283. package/dist/cjs/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
  284. package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
  285. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
  286. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
  287. package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -40
  288. package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +0 -14
  289. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
  290. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
  291. package/dist/esm/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  292. package/dist/esm/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  293. package/dist/esm/types/src/graphql/queries/getQuote.d.ts +0 -36
  294. package/dist/esm/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
  295. /package/dist/cjs/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
  296. /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
  297. /package/dist/cjs/types/src/{hooks/quotes → components/Quote/hooks}/useSigningComplete.d.ts +0 -0
  298. /package/dist/esm/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
  299. /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
  300. /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 {};
@@ -0,0 +1,2 @@
1
+ import { TooltipProps as AntdTooltipProps } from 'antd';
2
+ export declare function Tooltip(props: AntdTooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const TruncatedText: ({ className, text }: {
2
+ className?: string;
3
+ text: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { RefObject } from 'react';
2
+ declare const useIsTextTruncated: (textRef: RefObject<HTMLElement>, text?: string) => boolean;
3
+ export default useIsTextTruncated;
@@ -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?: (paymentMethodData?: any) => void;
14
+ onSavePaymentMethod?: (paymentMethodId: string) => void;
15
+ onPaymentMethodRemoved?: (paymentMethodId: string) => void;
15
16
  }) => import("react/jsx-runtime").JSX.Element;
16
17
  export default BillingDetails;
@@ -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;
@@ -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
- shouldShowCouponEditor_QuoteFragment: "Quote";
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
- shouldShowCouponEditor_SubscriptionFragment: "Subscription";
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, invoice, plugin, }: {
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
- invoice?: FormattedInvoice | Invoice;
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: (cardDetails: {
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 FormattedInvoice from '@/types/FormattedInvoice';
2
- import Invoice from '@/types/Invoice';
3
- import { FragmentOf } from 'gql.tada';
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 function PaymentForm({ invoice, quote: maskedQuote, onPaymentSuccess, onPaymentHoldSuccess, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, }: {
16
- invoice?: FormattedInvoice | Invoice;
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
- onRemovePaymentMethod?: () => void;
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
- paymentHoldOptions?: {
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 {};
@@ -0,0 +1,5 @@
1
+ export declare function StripeFormProvider({ children, currencyId, accountId, }: {
2
+ children: React.ReactNode;
3
+ currencyId: string;
4
+ accountId?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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, invoice, plugin, }: {
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
- invoice?: FormattedInvoice | Invoice;
6
+ invoiceId?: string | null;
9
7
  plugin: PluginData | undefined;
10
8
  }): {
11
9
  pay: (paymentMethodId: string) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ className?: string;
3
+ disabled?: boolean;
4
+ };
5
+ export declare function CheckoutNoPayment(props?: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ type PayProps = {
2
+ disabled?: boolean;
3
+ };
4
+ export declare function Pay(props?: PayProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -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,5 @@
1
+ declare const AccountIdProvider: ({ value, children }: {
2
+ value: string | undefined;
3
+ children?: import("react").ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element, useAccountId: () => string | undefined;
5
+ export { AccountIdProvider, useAccountId };
@@ -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 };
@@ -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 useFormattedAmountDue: () => string | undefined;
6
- declare const usePaymentType: () => PaymentType | undefined;
7
- declare const useIsPaying: () => boolean | undefined;
8
- declare const useHandlePaymentFormSubmit: () => (demoPayCardDetails?: {
9
- number: string;
10
- expiry: string;
11
- cvc: string;
12
- }) => Promise<void>;
13
- declare const useIsSaving: () => boolean | undefined;
14
- declare const useIsPaid: () => boolean | undefined;
15
- declare const useAccountId: () => string | undefined;
16
- export { useAccountId, useFormattedAmountDue, useHandlePaymentFormSubmit, useIsPaid, useIsPaying, useIsSaving, usePaymentType, };
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
- useHandlePayment_QuoteFragment: "Quote";
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 function PaymentProvider({ children, accountId, quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldOptions, onSavePaymentMethod, }: {
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: FormattedInvoice | Invoice | undefined;
32
- onPaymentSuccess?: (response: any) => void;
33
- onPaymentHoldSuccess?: (response: any) => void;
34
- paymentHoldOptions: {
35
- payToAccept?: boolean;
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;
@@ -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
- export declare function usePaymentButtonText(): string;
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
- declare function useRemovePaymentMethod(onRemovePaymentMethod?: () => void, onError?: (message: string) => void): (data: any) => Promise<void>;
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,5 +1,6 @@
1
1
  export declare enum PaymentType {
2
2
  PAY = "PAY",
3
3
  APPROVE_HOLD = "APPROVE_HOLD",
4
- CHECKOUT_NO_PAYMENT = "CHECKOUT_NO_PAYMENT"
4
+ CHECKOUT_NO_PAYMENT = "CHECKOUT_NO_PAYMENT",
5
+ SAVE = "SAVE"
5
6
  }
@@ -1,7 +1,36 @@
1
+ import { ResultOf } from 'gql.tada';
1
2
  import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
2
- export declare const MarkupContainer: any;
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
- poNumberRequired: boolean | null;
4
- taxNumberRequired: boolean | null;
5
- taxNumberLabel: string | null;
3
+ [$tada.fragmentRefs]: {
4
+ NoSigningPluginsForm_FormattedQuoteFragment: "FormattedQuote";
5
+ };
6
6
  }, {}, {
7
7
  fragment: "AcceptQuoteModal_FormattedQuoteFragment";
8
8
  on: "FormattedQuote";