@bunnyapp/components 1.8.0-beta.2 → 1.8.0-beta.21

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 (296) hide show
  1. package/dist/cjs/index.js +5124 -4379
  2. package/dist/cjs/types/src/ajax.d.ts +1 -1
  3. package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +6 -6
  4. package/dist/cjs/types/src/components/DocumentTemplatePreview.d.ts +5 -1
  5. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
  6. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
  7. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
  8. package/dist/cjs/types/src/components/PandadocPollingModal.d.ts +1 -1
  9. package/dist/cjs/types/src/components/PaymentForm/DemoPay/CreditCard/MiniCreditCard.d.ts +2 -0
  10. package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
  11. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
  12. package/dist/cjs/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
  13. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +35 -14
  14. package/dist/cjs/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +4 -0
  15. package/dist/cjs/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
  16. package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
  17. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +11 -0
  18. package/dist/cjs/types/src/components/PaymentForm/components/Pay.d.ts +6 -0
  19. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
  20. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
  21. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -0
  22. package/dist/cjs/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +5 -0
  23. package/dist/cjs/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
  24. package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
  25. package/dist/cjs/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
  26. package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +62 -37
  27. package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
  28. package/dist/cjs/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
  29. package/dist/cjs/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
  30. package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
  31. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
  32. package/dist/cjs/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
  33. package/dist/cjs/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
  34. package/dist/cjs/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
  35. package/dist/cjs/types/src/components/Quote/Quote.d.ts +28 -1
  36. package/dist/cjs/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
  37. package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
  38. package/dist/cjs/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
  39. package/dist/{esm/types/src/components/Quote/hooks/useSendAcceptQuote.d.ts → cjs/types/src/components/Quote/hooks/useAcceptQuote.d.ts} +16 -8
  40. package/dist/cjs/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
  41. package/dist/cjs/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
  42. package/dist/cjs/types/src/components/Quote/queries/quoteAccept.d.ts +38 -0
  43. package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +2 -8
  44. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +3 -3
  45. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -5
  46. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
  47. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
  48. package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
  49. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +41 -36
  50. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
  51. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +3 -19
  52. package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +18 -30
  53. package/dist/cjs/types/src/components/Signup/Signup.d.ts +25 -18
  54. package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +2 -0
  55. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +9 -0
  56. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
  57. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
  58. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +32 -0
  59. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
  60. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
  61. package/dist/cjs/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
  62. package/dist/cjs/types/src/components/Signup/components/Logo.d.ts +2 -0
  63. package/dist/cjs/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
  64. package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +9 -0
  65. package/dist/cjs/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
  66. package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
  67. package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
  68. package/dist/cjs/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
  69. package/dist/cjs/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
  70. package/dist/cjs/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
  71. package/dist/cjs/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
  72. package/dist/cjs/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
  73. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
  74. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
  75. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
  76. package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
  77. package/dist/cjs/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
  78. package/dist/cjs/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
  79. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -2
  80. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +14 -1
  81. package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +9 -0
  82. package/dist/cjs/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
  83. package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +13 -0
  84. package/dist/cjs/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
  85. package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +32 -0
  86. package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +46 -0
  87. package/dist/cjs/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
  88. package/dist/cjs/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
  89. package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +5 -0
  90. package/dist/cjs/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
  91. package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
  92. package/dist/cjs/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
  93. package/dist/cjs/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
  94. package/dist/cjs/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
  95. package/dist/cjs/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
  96. package/dist/cjs/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
  97. package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
  98. package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
  99. package/dist/cjs/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
  100. package/dist/cjs/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
  101. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +1 -13
  102. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
  103. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
  104. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
  105. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
  106. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -14
  107. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
  108. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlans_PlanFragment.d.ts +3 -0
  109. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
  110. package/dist/cjs/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
  111. package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +9 -1
  112. package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +4 -0
  113. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +2 -1
  114. package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +3 -3
  115. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
  116. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +1 -1
  117. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +1 -1
  118. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
  119. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -1
  120. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
  121. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +0 -2
  122. package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +1 -3
  123. package/dist/cjs/types/src/graphql/mutations/checkout.d.ts +24 -14
  124. package/dist/cjs/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
  125. package/dist/cjs/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
  126. package/dist/cjs/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  127. package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +4 -0
  128. package/dist/cjs/types/src/hooks/usePaymentPlugins.d.ts +1 -1
  129. package/dist/cjs/types/src/hooks/useUpdateCoupons.d.ts +8 -2
  130. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +9 -4
  131. package/dist/cjs/types/src/utils/chargeUtils.d.ts +1 -0
  132. package/dist/cjs/types/src/utils/couponUtils.d.ts +6 -6
  133. package/dist/cjs/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  134. package/dist/esm/index.js +5125 -4380
  135. package/dist/esm/types/src/ajax.d.ts +1 -1
  136. package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +6 -6
  137. package/dist/esm/types/src/components/DocumentTemplatePreview.d.ts +5 -1
  138. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/DownloadQuoteButton.d.ts +5 -0
  139. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteView.d.ts +8 -0
  140. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView/InvoiceQuoteViewWithButtons.d.ts +14 -0
  141. package/dist/esm/types/src/components/PandadocPollingModal.d.ts +1 -1
  142. package/dist/esm/types/src/components/PaymentForm/DemoPay/CreditCard/MiniCreditCard.d.ts +2 -0
  143. package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayFormProvider.d.ts +10 -0
  144. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/usePay.d.ts +2 -4
  145. package/dist/esm/types/src/components/PaymentForm/DemoPay/hooks/useSave.d.ts +1 -5
  146. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +35 -14
  147. package/dist/esm/types/src/components/PaymentForm/Stripe/StripeFormProvider.d.ts +4 -0
  148. package/dist/esm/types/src/components/PaymentForm/Stripe/hooks/usePay.d.ts +2 -4
  149. package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +1 -1
  150. package/dist/esm/types/src/components/PaymentForm/components/CheckoutNoPayment.d.ts +11 -0
  151. package/dist/esm/types/src/components/PaymentForm/components/Pay.d.ts +6 -0
  152. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/PaymentMethodDetails.d.ts +12 -0
  153. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Cancel.d.ts +1 -0
  154. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Save.d.ts +9 -0
  155. package/dist/esm/types/src/components/PaymentForm/components/StoredPaymentMethods.d.ts +5 -0
  156. package/dist/esm/types/src/components/PaymentForm/context/AccountIdContext.d.ts +5 -0
  157. package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +14 -0
  158. package/dist/esm/types/src/components/PaymentForm/context/PaymentMethodFormVisibilityContext.d.ts +12 -0
  159. package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +62 -37
  160. package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_QuoteFragment.d.ts +11 -0
  161. package/dist/esm/types/src/components/PaymentForm/fragments/StoredPaymentMethods_PaymentMethodsFragment.d.ts +13 -0
  162. package/dist/esm/types/src/components/PaymentForm/hooks/usePay.d.ts +14 -0
  163. package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +1 -1
  164. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentButtonText.d.ts +7 -1
  165. package/dist/esm/types/src/components/PaymentForm/hooks/usePaymentHold.d.ts +18 -0
  166. package/dist/esm/types/src/components/PaymentForm/hooks/useSave.d.ts +16 -0
  167. package/dist/esm/types/src/components/PaymentForm/types/PaymentType.d.ts +2 -1
  168. package/dist/esm/types/src/components/Quote/Quote.d.ts +28 -1
  169. package/dist/esm/types/src/components/Quote/components/PaymentHoldDisplay.d.ts +18 -0
  170. package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +13 -4
  171. package/dist/esm/types/src/components/Quote/components/QuoteIsAcceptedLabel.d.ts +6 -0
  172. package/dist/{cjs/types/src/components/Quote/hooks/useSendAcceptQuote.d.ts → esm/types/src/components/Quote/hooks/useAcceptQuote.d.ts} +16 -8
  173. package/dist/esm/types/src/components/Quote/hooks/useQuotePaymentHold.d.ts +20 -0
  174. package/dist/esm/types/src/{graphql → components/Quote}/queries/getFormattedQuote.d.ts +6 -1
  175. package/dist/esm/types/src/components/Quote/queries/quoteAccept.d.ts +38 -0
  176. package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +2 -8
  177. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +3 -3
  178. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +5 -5
  179. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_PriceListChargeFragment.d.ts +16 -0
  180. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +26 -0
  181. package/dist/esm/types/src/components/QuoteProvider/fragments/useQuoteQuantities_PriceListChargeFragment.d.ts +13 -0
  182. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +41 -36
  183. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +14 -3
  184. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +3 -19
  185. package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +18 -30
  186. package/dist/esm/types/src/components/Signup/Signup.d.ts +25 -18
  187. package/dist/esm/types/src/components/Signup/SignupContent.d.ts +2 -0
  188. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +9 -0
  189. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +11 -0
  190. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_PriceListFragment.d.ts +21 -0
  191. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +32 -0
  192. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +14 -0
  193. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +9 -0
  194. package/dist/esm/types/src/components/Signup/components/InitialSignupFormFields.d.ts +47 -0
  195. package/dist/esm/types/src/components/Signup/components/Logo.d.ts +2 -0
  196. package/dist/esm/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +6 -0
  197. package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +9 -0
  198. package/dist/esm/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +13 -0
  199. package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +31 -0
  200. package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +34 -0
  201. package/dist/esm/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +8 -0
  202. package/dist/esm/types/src/components/Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts +24 -0
  203. package/dist/esm/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +15 -0
  204. package/dist/esm/types/src/components/Signup/components/SignupPaymentForm.d.ts +15 -0
  205. package/dist/esm/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +6 -0
  206. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +10 -0
  207. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +6 -0
  208. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SuccessIcon.d.ts +2 -0
  209. package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +5 -0
  210. package/dist/esm/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +9 -0
  211. package/dist/esm/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +13 -0
  212. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +9 -2
  213. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +14 -1
  214. package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +9 -0
  215. package/dist/esm/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +10 -0
  216. package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +13 -0
  217. package/dist/esm/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +9 -0
  218. package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +32 -0
  219. package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +46 -0
  220. package/dist/esm/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +4 -0
  221. package/dist/esm/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +5 -0
  222. package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +5 -0
  223. package/dist/esm/types/src/components/Signup/mutations/contactUpdate.d.ts +12 -0
  224. package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +6 -3
  225. package/dist/esm/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +12 -0
  226. package/dist/esm/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +1 -0
  227. package/dist/esm/types/src/components/Signup/queries/getAccountByCode.d.ts +8 -0
  228. package/dist/esm/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +20 -0
  229. package/dist/esm/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +14 -0
  230. package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +2 -0
  231. package/dist/esm/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +9 -0
  232. package/dist/esm/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +14 -0
  233. package/dist/esm/types/src/components/Signup/utils/createPortalReturnUrl.d.ts +4 -0
  234. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +1 -13
  235. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/CheckoutBarInput_PriceListChargeFragment.d.ts +13 -0
  236. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/fragments/useChargeCRUD_QuoteFragment.d.ts +22 -0
  237. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +1 -1
  238. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
  239. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +0 -14
  240. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_PriceListChargeFragment.d.ts +14 -0
  241. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/addonPlans/fragments/AddonPlans_PlanFragment.d.ts +3 -0
  242. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListSelector/PriceListSelector.d.ts +3 -0
  243. package/dist/esm/types/src/components/Subscriptions/Upgrade/queries/getSubscriptions.d.ts +2 -163
  244. package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +9 -1
  245. package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +4 -0
  246. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +2 -1
  247. package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +3 -3
  248. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
  249. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +1 -1
  250. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +1 -1
  251. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
  252. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +1 -1
  253. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
  254. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +0 -2
  255. package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +1 -3
  256. package/dist/esm/types/src/graphql/mutations/checkout.d.ts +24 -14
  257. package/dist/esm/types/src/graphql/mutations/quoteChangeAddCoupon.d.ts +4 -4
  258. package/dist/esm/types/src/graphql/mutations/quoteChangeRemoveCoupon.d.ts +5 -2
  259. package/dist/esm/types/src/graphql/queries/getFormattedInvoice.d.ts +1 -1
  260. package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +4 -0
  261. package/dist/esm/types/src/hooks/usePaymentPlugins.d.ts +1 -1
  262. package/dist/esm/types/src/hooks/useUpdateCoupons.d.ts +8 -2
  263. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +9 -4
  264. package/dist/esm/types/src/utils/chargeUtils.d.ts +1 -0
  265. package/dist/esm/types/src/utils/couponUtils.d.ts +6 -6
  266. package/dist/esm/types/src/utils/featureAddonUtils/isAddonPurchased.d.ts +1 -1
  267. package/dist/index.d.ts +132 -34
  268. package/package.json +7 -4
  269. package/dist/cjs/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
  270. package/dist/cjs/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
  271. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
  272. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
  273. package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -41
  274. package/dist/cjs/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
  275. package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +0 -50
  276. package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +0 -39
  277. package/dist/cjs/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
  278. package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
  279. package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +0 -10
  280. package/dist/cjs/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
  281. package/dist/esm/types/src/components/Invoice/InvoiceQuoteView.d.ts +0 -12
  282. package/dist/esm/types/src/components/PaymentForm/components/CheckoutFooter.d.ts +0 -2
  283. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails.d.ts +0 -2
  284. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodFooter.d.ts +0 -4
  285. package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +0 -41
  286. package/dist/esm/types/src/components/QuoteProvider/utils/getQuantityFromQuoteChange.d.ts +0 -11
  287. package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +0 -50
  288. package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +0 -39
  289. package/dist/esm/types/src/components/Signup/PaymentSuccess.d.ts +0 -8
  290. package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +0 -58
  291. package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +0 -10
  292. package/dist/esm/types/src/graphql/mutations/quoteCompose.d.ts +0 -12
  293. /package/dist/cjs/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
  294. /package/dist/cjs/types/src/components/Signup/{PriceListDisplay.d.ts → components/PriceListDisplay.d.ts} +0 -0
  295. /package/dist/esm/types/src/components/PaymentForm/components/{PaymentMethodSelector.d.ts → PaymentMethodDetails/components/PaymentMethodSelector.d.ts} +0 -0
  296. /package/dist/esm/types/src/components/Signup/{PriceListDisplay.d.ts → components/PriceListDisplay.d.ts} +0 -0
@@ -23,6 +23,8 @@ export declare const usePaymentMethod: ({ accountId, enabled, }: {
23
23
  isDefault: boolean | null;
24
24
  [$tada.fragmentRefs]: {
25
25
  PaymentForm_PaymentMethodsFragment: "PaymentMethod";
26
+ } & {
27
+ StoredPaymentMethods_PaymentMethodsFragment: "PaymentMethod";
26
28
  };
27
29
  }[] | undefined;
28
30
  defaultPaymentMethod: {
@@ -46,6 +48,8 @@ export declare const usePaymentMethod: ({ accountId, enabled, }: {
46
48
  isDefault: boolean | null;
47
49
  [$tada.fragmentRefs]: {
48
50
  PaymentForm_PaymentMethodsFragment: "PaymentMethod";
51
+ } & {
52
+ StoredPaymentMethods_PaymentMethodsFragment: "PaymentMethod";
49
53
  };
50
54
  } | undefined;
51
55
  isLoading: boolean;
@@ -1,4 +1,4 @@
1
- export declare const usePaymentPlugins: (accountId: string | undefined) => {
1
+ export declare const usePaymentPlugins: () => {
2
2
  paymentPlugins: {
3
3
  enabled: boolean;
4
4
  entities: string[];
@@ -5,8 +5,14 @@ declare const useUpdateCoupons: ({ apiHost, token, quoteChangeId, onCouponAdded,
5
5
  onCouponAdded?: () => void;
6
6
  onCouponRemoved?: () => void;
7
7
  }) => {
8
- addCoupon: import("@tanstack/react-query").UseMutateFunction<import("../types/Quote").Quote, any, string, unknown>;
9
- removeCoupon: import("@tanstack/react-query").UseMutateFunction<import("../types/Quote").Quote, any, string, unknown>;
8
+ addCoupon: import("@tanstack/react-query").UseMutateFunction<{
9
+ id: string | null;
10
+ } | null | undefined, Error, string, unknown>;
11
+ removeCoupon: import("@tanstack/react-query").UseMutateFunction<{
12
+ quote: {
13
+ id: string | null;
14
+ };
15
+ } | null | undefined, Error, string, unknown>;
10
16
  isAddingCoupon: boolean;
11
17
  isRemovingCoupon: boolean;
12
18
  activeCouponsExist: boolean;
@@ -38,7 +38,7 @@ interface TableKeyParams {
38
38
  token?: string;
39
39
  }
40
40
  interface FormattedInvoiceKeyParams {
41
- id?: string;
41
+ id?: string | null | undefined;
42
42
  token?: string;
43
43
  }
44
44
  interface InvoiceKeyParams {
@@ -55,7 +55,7 @@ interface PortalPreviewDataKeyParams {
55
55
  token?: string;
56
56
  }
57
57
  interface QuoteKeyParams {
58
- id?: string;
58
+ id?: string | null | undefined;
59
59
  token?: string;
60
60
  }
61
61
  interface QuoteTaxCalculateKeyParams {
@@ -78,10 +78,14 @@ declare const QueryKeyFactory: {
78
78
  brandingKey: (token?: string) => string[];
79
79
  calculatedPricesKey: ({ priceListId, quantity, token }: CalculatedPricesKeyParams) => (string | number)[];
80
80
  createEventsKey: ({ entityId, pluralType, token }: EventsKeyParams) => string[];
81
- createFormattedInvoiceKey: ({ id, token }: FormattedInvoiceKeyParams) => (string | undefined)[];
81
+ quotesKey: (filter?: string, token?: string) => string[];
82
+ createFormattedInvoiceKey: ({ id, token }: FormattedInvoiceKeyParams) => (string | null | undefined)[];
82
83
  createInvoiceKey: ({ id, token }: InvoiceKeyParams) => (string | undefined)[];
83
84
  createObjectKey: ({ id, objectName, token }: ObjectKeyParams) => string[];
84
- createQuoteKey: ({ id, token }: QuoteKeyParams) => (string | undefined)[];
85
+ createQuoteKey: ({ id, token }: QuoteKeyParams) => (string | null | undefined)[];
86
+ signupQuoteKey: ({ token }: {
87
+ token?: string;
88
+ }) => string[];
85
89
  createQuoteTaxCalculateKey: ({ id, token }: QuoteTaxCalculateKeyParams) => string[];
86
90
  createTableKey: ({ filterString, pluralType, token }: TableKeyParams) => (string | undefined)[];
87
91
  currentUserKey: (token?: string) => string[];
@@ -102,5 +106,6 @@ declare const QueryKeyFactory: {
102
106
  token?: string;
103
107
  }) => string[];
104
108
  paymentPluginsKey: (token?: string) => string[];
109
+ accountForSignup: (token?: string) => string[];
105
110
  };
106
111
  export default QueryKeyFactory;
@@ -2,6 +2,7 @@ import { FragmentOf } from 'gql.tada';
2
2
  export declare const CanEditChargeQuantity_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
3
3
  chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
4
4
  pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
5
+ selfServiceQuantity: boolean | null;
5
6
  }, {}, {
6
7
  fragment: "CanEditChargeQuantity_PriceListChargeFragment";
7
8
  on: "PriceListCharge";
@@ -1,22 +1,22 @@
1
1
  import { FragmentOf } from 'gql.tada';
2
- export declare const shouldShowCouponEditor_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
+ export declare const canApplyCoupons_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
3
  id: string | null;
4
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
4
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
5
5
  amountDue: number | null;
6
6
  }, {}, {
7
- fragment: "shouldShowCouponEditor_QuoteFragment";
7
+ fragment: "canApplyCoupons_QuoteFragment";
8
8
  on: "Quote";
9
9
  masked: true;
10
10
  }>;
11
- export declare const shouldShowCouponEditor_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
11
+ export declare const canApplyCoupons_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
12
12
  id: string;
13
13
  state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
14
14
  charges: {
15
15
  discountedPrice: string | null;
16
16
  }[] | null;
17
17
  }, {}, {
18
- fragment: "shouldShowCouponEditor_SubscriptionFragment";
18
+ fragment: "canApplyCoupons_SubscriptionFragment";
19
19
  on: "Subscription";
20
20
  masked: true;
21
21
  }>;
22
- export declare function shouldShowCouponEditor(maskedQuote: FragmentOf<typeof shouldShowCouponEditor_QuoteFragment>, activeCouponsExist: boolean, maskedUpgradingSubscription?: FragmentOf<typeof shouldShowCouponEditor_SubscriptionFragment>): boolean;
22
+ export declare function canApplyCoupons(maskedQuote: FragmentOf<typeof canApplyCoupons_QuoteFragment> | undefined | null, activeCouponsExist: boolean, maskedUpgradingSubscription?: FragmentOf<typeof canApplyCoupons_SubscriptionFragment>): boolean;
@@ -21,4 +21,4 @@ export declare const isAddonPurchased_SubscriptionChargeFragment: import("gql.ta
21
21
  on: "Subscription";
22
22
  masked: true;
23
23
  }>;
24
- export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment>): boolean;
24
+ export declare function isAddonPurchased(maskedFeatureAddon: FragmentOf<typeof isAddonPurchased_PriceListChargeFragment>, maskedCurrentSubscription: FragmentOf<typeof isAddonPurchased_SubscriptionChargeFragment> | undefined): boolean;
package/dist/index.d.ts CHANGED
@@ -1,18 +1,16 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as gql_tada from 'gql.tada';
3
+ import { ResultOf, FragmentOf } from 'gql.tada';
2
4
  import FormattedInvoice from '@/types/FormattedInvoice';
3
- import { FormattedQuote } from '@/types/FormattedQuote';
4
5
  import { Transaction, TransactionKind } from '@/types/Transaction';
5
- import * as gql_tada from 'gql.tada';
6
- import { FragmentOf, ResultOf } from 'gql.tada';
7
- import Invoice$1 from '@/types/Invoice';
6
+ import react, { ReactNode, ComponentProps } from 'react';
8
7
  import { QueryClient } from '@tanstack/react-query';
9
8
  import { ThemeConfig } from 'antd';
10
- import react from 'react';
11
9
 
12
10
  type ShadowType = "shadow-none" | "shadow-sm" | "shadow-md" | "shadow-lg" | "shadow-xl";
13
11
 
14
12
  type InvoiceQuoteContextProps = {
15
- id?: string;
13
+ id?: string | null | undefined;
16
14
  invoiceQuoteViewComponent?: React.ReactNode;
17
15
  backButtonName?: string;
18
16
  onBackButtonClick?: () => void;
@@ -22,7 +20,6 @@ type InvoiceQuoteContextProps = {
22
20
  className?: string;
23
21
  hideDownloadButton?: boolean;
24
22
  onInvoiceLoaded?: (formattedInvoice: FormattedInvoice) => void;
25
- onQuoteLoaded?: (formattedQuote: FormattedQuote) => void;
26
23
  onQuoteUnavailableError?: () => void;
27
24
  suppressQuoteUnavailableErrorNotification?: boolean;
28
25
  };
@@ -41,10 +38,21 @@ declare global {
41
38
  }
42
39
  }
43
40
 
41
+ declare const OnQuoteLoadedFragment: gql_tada.TadaDocumentNode<{
42
+ vendorName: string | null;
43
+ quote: {
44
+ id: string | null;
45
+ };
46
+ }, {}, {
47
+ fragment: "OnQuoteLoadedFragment";
48
+ on: "FormattedQuote";
49
+ masked: true;
50
+ }>;
44
51
  type QuoteProps = InvoiceQuoteContextProps & {
45
52
  onQuoteAccepted?: () => void;
46
53
  onQuoteUnavailableError?: () => void;
47
54
  suppressQuoteUnavailableErrorNotification?: boolean;
55
+ onQuoteLoaded?: (formattedQuote: ResultOf<typeof OnQuoteLoadedFragment>) => void;
48
56
  };
49
57
  declare function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): react_jsx_runtime.JSX.Element;
50
58
 
@@ -85,6 +93,48 @@ declare function Quotes({ className, columns, filter, filterQuotes, sort, noQuot
85
93
  noQuotesMessage?: string;
86
94
  }): react_jsx_runtime.JSX.Element;
87
95
 
96
+ type Props = {
97
+ className?: string;
98
+ disabled?: boolean;
99
+ onClickPrecondition?: () => Promise<boolean>;
100
+ buttonTextOverride?: {
101
+ text: string;
102
+ isProcessingText: string;
103
+ };
104
+ };
105
+ declare function CheckoutNoPayment(props?: Props): react_jsx_runtime.JSX.Element;
106
+
107
+ type PayProps = {
108
+ disabled?: boolean;
109
+ onClickPrecondition?: () => boolean | Promise<boolean>;
110
+ };
111
+ declare function Pay(props?: PayProps): react_jsx_runtime.JSX.Element;
112
+
113
+ declare function Cancel(): react_jsx_runtime.JSX.Element;
114
+
115
+ type SaveButtonTextOverride = {
116
+ text: string;
117
+ isProcessingText: string;
118
+ };
119
+ declare function Save({ onClickPrecondition, buttonTextOverride, }: {
120
+ onClickPrecondition?: () => boolean | Promise<boolean>;
121
+ buttonTextOverride?: SaveButtonTextOverride;
122
+ }): react_jsx_runtime.JSX.Element;
123
+
124
+ type PaymentMethodDetailsProps = {
125
+ footer?: ReactNode;
126
+ };
127
+ declare function PaymentMethodDetailsRoot(props?: PaymentMethodDetailsProps): react_jsx_runtime.JSX.Element;
128
+ declare const PaymentMethodDetails: typeof PaymentMethodDetailsRoot & {
129
+ Cancel: typeof Cancel;
130
+ Save: typeof Save;
131
+ };
132
+
133
+ type StoredPaymentMethodsProps = {
134
+ className?: string;
135
+ };
136
+ declare function StoredPaymentMethods(props?: StoredPaymentMethodsProps): react_jsx_runtime.JSX.Element;
137
+
88
138
  declare const PaymentForm_PaymentMethodsFragment: gql_tada.TadaDocumentNode<{
89
139
  [$tada.fragmentRefs]: {
90
140
  MiniCreditCard_PaymentMethodFragment: "PaymentMethod";
@@ -99,7 +149,6 @@ declare const PaymentForm_PaymentMethodsFragment: gql_tada.TadaDocumentNode<{
99
149
  masked: true;
100
150
  }>;
101
151
 
102
- type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
103
152
  declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
104
153
  id: string | null;
105
154
  currencyId: string;
@@ -111,10 +160,27 @@ declare const PaymentForm_QuoteFragment: gql_tada.TadaDocumentNode<{
111
160
  on: "Quote";
112
161
  masked: true;
113
162
  }>;
114
- declare function PaymentForm({ currencyId: accountCurrencyId, invoice, quote: maskedQuote, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, disablePayButton, }: {
163
+
164
+ type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
165
+ declare const PaymentForm_InvoiceFragment: gql_tada.TadaDocumentNode<{
166
+ id: string | null;
167
+ currencyId: string;
168
+ [$tada.fragmentRefs]: {
169
+ PaymentProvider_InvoiceFragment: "Invoice";
170
+ };
171
+ }, {}, {
172
+ fragment: "PaymentForm_InvoiceFragment";
173
+ on: "Invoice";
174
+ masked: true;
175
+ }>;
176
+ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
115
177
  currencyId?: string;
116
- invoice?: FormattedInvoice | Invoice$1;
178
+ invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
117
179
  quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
180
+ paymentHold?: {
181
+ quoteId: string;
182
+ amountToHold: number;
183
+ };
118
184
  onPaymentSuccess?: (response: any) => void;
119
185
  onPaymentHoldSuccess?: (response: any) => void;
120
186
  /**
@@ -125,41 +191,71 @@ declare function PaymentForm({ currencyId: accountCurrencyId, invoice, quote: ma
125
191
  onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
126
192
  onSetDefaultPaymentMethod?: () => void;
127
193
  accountId?: string;
128
- overrideToken?: string;
129
194
  customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
130
- paymentHoldOptions?: {
131
- payToAccept?: boolean;
132
- amountToHold?: number;
133
- };
195
+ children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
196
+ }): react_jsx_runtime.JSX.Element;
197
+ type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
198
+ type PaymentFormRenderState = {
199
+ hasPaymentMethods: boolean;
200
+ isPaymentMethodDetailsOpen: boolean;
201
+ isPayableAvailable: boolean;
202
+ amountDue: number | undefined;
203
+ paymentPluginsCount: number | undefined;
204
+ };
205
+ declare function PaymentFormInternal(props: PaymentFormProps & {
134
206
  disablePayButton?: boolean;
135
- }): react_jsx_runtime.JSX.Element | null;
207
+ }): react_jsx_runtime.JSX.Element;
208
+ declare const PaymentForm: typeof PaymentFormInternal & {
209
+ StoredPaymentMethods: typeof StoredPaymentMethods;
210
+ Pay: typeof Pay;
211
+ CheckoutNoPayment: typeof CheckoutNoPayment;
212
+ PaymentMethodDetails: typeof PaymentMethodDetails;
213
+ };
136
214
 
137
- declare function Signup({ companyName, priceListCode, returnUrl, couponCode, className, shadow, style, defaultFirstName, defaultLastName, defaultEmail, defaultCompanyName, defaultBillingCountry, }: {
138
- /** The company name to display on the signup page */
139
- companyName: string;
140
- /** The price list code to use for the signup */
215
+ type DefaultSignupValues = {
216
+ firstName?: string;
217
+ lastName?: string;
218
+ email?: string;
219
+ accountName?: string;
220
+ billingCountry?: string;
221
+ billingState?: string;
222
+ billingCity?: string;
223
+ billingZip?: string;
224
+ billingStreet?: string;
225
+ taxNumber?: string;
226
+ };
227
+ /** Extra account billing fields (shown in “Account billing details”) when the flag is true. */
228
+ type RequiredBillingDetailsFlags = {
229
+ billingCountry?: boolean;
230
+ billingState?: boolean;
231
+ billingCity?: boolean;
232
+ billingZip?: boolean;
233
+ billingStreet?: boolean;
234
+ taxNumber?: boolean;
235
+ };
236
+
237
+ type SignupProps = {
141
238
  priceListCode: string;
142
- /** The return URL to that customers can be redirected to after signup */
239
+ /** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
240
+ enableTrial?: boolean;
241
+ /** The URL to redirect to after the signup is complete */
143
242
  returnUrl?: string;
144
- /** An optional coupon code that gets applied automatically */
145
- couponCode?: string;
146
243
  /** A custom class name to apply to the component */
147
244
  className?: string;
148
245
  /** The shadow level to apply to the component */
149
246
  shadow?: ShadowType;
150
247
  /** A custom style to apply to the component */
151
248
  style?: React.CSSProperties;
152
- /** The default first name to use for the signup */
153
- defaultFirstName?: string;
154
- /** The default last name to use for the signup */
155
- defaultLastName?: string;
156
- /** The default email to use for the signup */
157
- defaultEmail?: string;
158
- /** The default company name to use for the signup */
159
- defaultCompanyName?: string;
160
- /** The default billing country to use for the signup */
161
- defaultBillingCountry?: string;
162
- }): react_jsx_runtime.JSX.Element;
249
+ /** The default form values to use for the signup */
250
+ defaultFormValues?: DefaultSignupValues;
251
+ /** Whether to require quote acceptance before checking out */
252
+ paymentRequiredToAcceptQuote?: boolean;
253
+ /** The document template ID to apply to the quote for the signup */
254
+ documentTemplateId?: string;
255
+ /** Which account billing fields to show and require. Omit for legacy behavior (country required only). */
256
+ requiredBillingDetails?: RequiredBillingDetailsFlags;
257
+ };
258
+ declare function Signup({ priceListCode, enableTrial, returnUrl, className, shadow, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, }: SignupProps): react_jsx_runtime.JSX.Element;
163
259
 
164
260
  declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
165
261
  children: React.ReactNode;
@@ -286,6 +382,8 @@ declare const MiniCreditCard_PaymentMethodFragment: gql_tada.TadaDocumentNode<{
286
382
  type: string | null;
287
383
  identifier: string | null;
288
384
  } | null;
385
+ state: "FAILED" | "UNKNOWN" | "SUCCESS" | null;
386
+ failureReason: string | null;
289
387
  id: string;
290
388
  }, {}, {
291
389
  fragment: "MiniCreditCard_PaymentMethodFragment";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.8.0-beta.2",
3
+ "version": "1.8.0-beta.21",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -28,12 +28,13 @@
28
28
  "license": "ISC",
29
29
  "devDependencies": {
30
30
  "@chromatic-com/storybook": "^3.2.7",
31
+ "@fontsource-variable/inter": "^5.2.8",
31
32
  "@parcel/watcher": "^2.5.1",
32
33
  "@rollup/plugin-commonjs": "^28.0.8",
33
34
  "@rollup/plugin-json": "^6.1.0",
34
35
  "@rollup/plugin-node-resolve": "^16.0.3",
35
36
  "@rollup/plugin-replace": "^6.0.2",
36
- "@rollup/plugin-terser": "^0.4.4",
37
+ "@rollup/plugin-terser": "^1.0.0",
37
38
  "@rollup/plugin-typescript": "^11.1.6",
38
39
  "@storybook/addon-essentials": "^8.6.14",
39
40
  "@storybook/addon-interactions": "^8.6.14",
@@ -59,7 +60,10 @@
59
60
  "less": "^4.4.2",
60
61
  "msw": "^2.11.6",
61
62
  "patch-package": "^8.0.1",
63
+ "postcss-import": "^16.1.1",
62
64
  "postcss-less": "^6.0.0",
65
+ "postcss-url": "^8.0.0",
66
+ "rimraf": "^6.1.2",
63
67
  "rollup": "^3.29.5",
64
68
  "rollup-plugin-dts": "^6.2.3",
65
69
  "rollup-plugin-peer-deps-external": "^2.2.4",
@@ -67,8 +71,7 @@
67
71
  "storybook": "^8.6.14",
68
72
  "tailwindcss": "^3.4.18",
69
73
  "typescript": "^5.9.3",
70
- "vite": "^6.4.1",
71
- "rimraf": "^6.1.2"
74
+ "vite": "^6.4.1"
72
75
  },
73
76
  "peerDependencies": {
74
77
  "@ant-design/icons": "^6.0.0",
@@ -1,12 +0,0 @@
1
- import FormattedInvoice from '@/types/FormattedInvoice';
2
- import { ReactNode } from 'react';
3
- declare const InvoiceQuoteView: ({ children, formattedInvoice, html, backButtonName, onBackButtonClick, onDownloadError, targetUrl, }: {
4
- html: string | null;
5
- children?: ReactNode;
6
- formattedInvoice?: FormattedInvoice;
7
- backButtonName?: string;
8
- onBackButtonClick?: () => void;
9
- onDownloadError?: () => void;
10
- targetUrl?: string;
11
- }) => import("react/jsx-runtime").JSX.Element;
12
- export default InvoiceQuoteView;
@@ -1,2 +0,0 @@
1
- declare const CheckoutFooter: () => import("react/jsx-runtime").JSX.Element;
2
- export default CheckoutFooter;
@@ -1,2 +0,0 @@
1
- declare const PaymentMethodDetails: () => import("react/jsx-runtime").JSX.Element;
2
- export default PaymentMethodDetails;
@@ -1,4 +0,0 @@
1
- export declare function PaymentMethodFooter({ onSubmit, noPadding, }: {
2
- onSubmit: () => void;
3
- noPadding?: boolean;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,41 +0,0 @@
1
- import FormattedInvoice from '@/types/FormattedInvoice';
2
- import Invoice from '@/types/Invoice';
3
- import { PluginData } from '@/types/frontendTypes';
4
- import { FragmentOf } from 'gql.tada';
5
- import { PaymentType } from '../types/PaymentType';
6
- export declare const useHandlePayment_QuoteFragment: import("gql.tada").TadaDocumentNode<{
7
- id: string | null;
8
- amount: number;
9
- currencyId: string;
10
- [$tada.fragmentRefs]: {
11
- getQuoteAmountDue_QuoteFragment: "Quote";
12
- };
13
- }, {}, {
14
- fragment: "useHandlePayment_QuoteFragment";
15
- on: "Quote";
16
- masked: true;
17
- }>;
18
- declare const useHandlePayment: ({ quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, plugin, paymentHoldOptions, accountId, }: {
19
- quote?: FragmentOf<typeof useHandlePayment_QuoteFragment>;
20
- invoice?: FormattedInvoice | Invoice;
21
- onPaymentSuccess?: (response: any) => void;
22
- onPaymentHoldSuccess?: (response: any) => void;
23
- paymentHoldPrecondition?: () => boolean | Promise<boolean>;
24
- plugin: PluginData | undefined;
25
- paymentHoldOptions: {
26
- payToAccept?: boolean;
27
- amountToHold?: number;
28
- };
29
- accountId: string | undefined;
30
- }) => {
31
- handleApproveHold: (overridePaymentMethodId?: string) => Promise<void>;
32
- handlePayment: (overridePaymentMethodId: string) => Promise<void>;
33
- handleCheckoutNoPayment: import("@tanstack/react-query").UseMutateFunction<{
34
- savePaymentMethod: boolean | undefined;
35
- }, Error, void, unknown>;
36
- isPaying: boolean;
37
- isPaid: boolean;
38
- paymentType: PaymentType;
39
- formattedAmountDue: string | undefined;
40
- };
41
- export default useHandlePayment;
@@ -1,11 +0,0 @@
1
- export declare function getQuantityFromQuoteChange(quoteChange: {
2
- priceList: {
3
- id: string;
4
- } | null;
5
- charges: {
6
- feature: {
7
- id: string;
8
- } | null;
9
- quantity: number | null;
10
- }[];
11
- } | null, featureId: string): number | null | undefined;
@@ -1,50 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const CheckoutSummary_PriceListFragment: import("gql.tada").TadaDocumentNode<{
3
- product: {
4
- name: string;
5
- } | null;
6
- name: string;
7
- }, {}, {
8
- fragment: "CheckoutSummary_PriceListFragment";
9
- on: "PriceList";
10
- masked: true;
11
- }>;
12
- export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocumentNode<{
13
- id: string | null;
14
- amountDue: number | null;
15
- subtotal: number;
16
- taxAmount: number;
17
- currencyId: string;
18
- quoteChanges: {
19
- charges: {
20
- id: string | null;
21
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
22
- name: string | null;
23
- coupon: {
24
- couponCode: string;
25
- } | null;
26
- quantity: number | null;
27
- subtotal: number | null;
28
- currencyId: string;
29
- }[];
30
- }[] | null;
31
- [$tada.fragmentRefs]: {
32
- shouldShowCouponEditor_QuoteFragment: "Quote";
33
- };
34
- }, {}, {
35
- fragment: "CheckoutSummary_QuoteFragment";
36
- on: "Quote";
37
- masked: true;
38
- }>;
39
- export default function CheckoutSummary({ quote: maskedQuote, className, onAddCoupon, onRemoveCoupon, isRemovingCoupon, priceList: maskedPriceList, isAddingCoupon, couponCode, setCouponCode, activeCouponsExist, }: {
40
- quote: FragmentOf<typeof CheckoutSummary_QuoteFragment>;
41
- className?: string;
42
- onAddCoupon: (couponCode: string) => void;
43
- onRemoveCoupon: (couponCode: string) => void;
44
- isRemovingCoupon: boolean;
45
- priceList: FragmentOf<typeof CheckoutSummary_PriceListFragment> | undefined | null;
46
- isAddingCoupon: boolean;
47
- couponCode: string;
48
- setCouponCode: (couponCode: string) => void;
49
- activeCouponsExist: boolean;
50
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,39 +0,0 @@
1
- import { FragmentOf } from 'gql.tada';
2
- export declare const PaymentForms_QuoteFragment: import("gql.tada").TadaDocumentNode<{
3
- [$tada.fragmentRefs]: {
4
- PaymentForm_QuoteFragment: "Quote";
5
- };
6
- }, {}, {
7
- fragment: "PaymentForms_QuoteFragment";
8
- on: "Quote";
9
- masked: true;
10
- }>;
11
- export default function PaymentForms({ quote: maskedQuote, handlePaymentSuccess, handleSubmit, proceedingToPayment, accountId, overrideToken, customCheckoutFunction, defaultValues, }: {
12
- quote?: FragmentOf<typeof PaymentForms_QuoteFragment> | null;
13
- handlePaymentSuccess: () => void;
14
- handleSubmit: (formData: FormData) => void;
15
- proceedingToPayment: boolean;
16
- accountId?: string;
17
- overrideToken?: string;
18
- customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
19
- defaultValues?: DefaultSignupValues;
20
- }): import("react/jsx-runtime").JSX.Element;
21
- export type FormData = {
22
- firstName: string;
23
- lastName: string;
24
- email: string;
25
- accountName: string;
26
- billingCountry: string;
27
- billingState: string;
28
- billingCity: string;
29
- billingZip: string;
30
- billingStreet: string;
31
- taxNumber: string;
32
- };
33
- export type DefaultSignupValues = {
34
- firstName?: string;
35
- lastName?: string;
36
- email?: string;
37
- accountName?: string;
38
- billingCountry?: string;
39
- };
@@ -1,8 +0,0 @@
1
- export default function PaymentSuccessDisplay({ amountPaid, className, companyName, returnUrl, style, currencyId, }: {
2
- amountPaid: number;
3
- className: string;
4
- companyName: string;
5
- returnUrl?: string;
6
- style?: React.CSSProperties;
7
- currencyId: string;
8
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,58 +0,0 @@
1
- declare const accountSignup: ({ token, apiHost, accountId, quoteId, paymentToken, paymentMethodId, pluginId, priceListCode, }: {
2
- token: string;
3
- apiHost: string;
4
- accountId: string;
5
- quoteId: string;
6
- paymentToken?: string;
7
- paymentMethodId?: string;
8
- pluginId: string;
9
- priceListCode: string;
10
- }) => Promise<{
11
- errors: string[] | null;
12
- quote: {
13
- accountId: string;
14
- amount: number;
15
- amountDue: number | null;
16
- applicationDate: unknown;
17
- applied: boolean;
18
- backdatedPeriods: boolean | null;
19
- backdatedQuote: boolean | null;
20
- billingDay: number | null;
21
- contactId: string | null;
22
- createdAt: unknown;
23
- credits: number | null;
24
- currencyId: string;
25
- dealId: string | null;
26
- discount: number | null;
27
- discountValue: number;
28
- endDate: unknown;
29
- evergreen: boolean | null;
30
- expiresAt: unknown;
31
- id: string | null;
32
- invoiceImmediately: boolean | null;
33
- invoiceImmediatelyAvailable: boolean | null;
34
- invoiceUntil: unknown;
35
- isPendingApprovalRequest: boolean;
36
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
37
- message: string | null;
38
- name: string | null;
39
- netPaymentDays: number | null;
40
- notes: string | null;
41
- number: string | null;
42
- ownerId: string | null;
43
- payableId: string | null;
44
- periodAmount: number | null;
45
- poNumber: string | null;
46
- requiresApproval: boolean;
47
- smallUnitAmountDue: number | null;
48
- splitInvoice: boolean | null;
49
- startDate: unknown;
50
- state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
51
- subtotal: number;
52
- taxAmount: number;
53
- taxCode: string | null;
54
- updatedAt: unknown;
55
- uuid: string;
56
- } | null;
57
- } | null>;
58
- export default accountSignup;