@bunnyapp/components 1.7.0-beta.8 → 1.8.0-beta.2

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 (210) hide show
  1. package/dist/cjs/index.js +3001 -2091
  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/components/BillingDetails/BillingDetails.d.ts +3 -2
  7. package/dist/cjs/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
  8. package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
  9. package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +2 -1
  10. package/dist/cjs/types/src/components/Checkout/QuoteCheckout.d.ts +3 -1
  11. package/dist/cjs/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
  12. package/dist/cjs/types/src/components/Invoice/Invoice.d.ts +3 -1
  13. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +12 -3
  14. package/dist/cjs/types/src/components/PaymentForm/context/PaymentProvider.d.ts +9 -2
  15. package/dist/cjs/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
  16. package/dist/cjs/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +2 -1
  17. package/dist/cjs/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
  18. package/dist/cjs/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
  19. package/dist/cjs/types/src/components/Quote/Quote.d.ts +3 -1
  20. package/dist/{esm/types/src/components/Quote → cjs/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
  21. package/dist/cjs/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
  22. package/dist/cjs/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
  23. package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +2 -1
  24. package/dist/cjs/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
  25. package/dist/cjs/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +32 -0
  26. package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +3 -0
  27. package/dist/cjs/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
  28. package/dist/cjs/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
  29. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +70 -0
  30. package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +28 -4
  31. package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +37 -0
  32. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
  33. package/dist/cjs/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
  34. package/dist/cjs/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
  35. package/dist/cjs/types/src/components/Signup/CheckoutSummary.d.ts +41 -5
  36. package/dist/cjs/types/src/components/Signup/PaymentForms.d.ts +1 -1
  37. package/dist/cjs/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
  38. package/dist/cjs/types/src/components/Signup/Signup.d.ts +0 -1
  39. package/dist/cjs/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
  40. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
  41. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +17 -0
  42. package/dist/cjs/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  43. package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  44. package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  45. package/dist/{esm/types/src/graphql → cjs/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
  46. package/dist/cjs/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  47. package/dist/cjs/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
  48. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +21 -0
  49. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
  50. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  51. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +9 -14
  52. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
  53. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
  54. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
  55. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
  56. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
  57. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
  58. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
  59. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
  60. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
  61. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
  62. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
  63. package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
  64. package/dist/cjs/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
  65. package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +12 -0
  66. package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +6 -0
  67. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
  68. package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
  69. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
  70. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
  71. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
  72. package/dist/cjs/types/src/components/index.d.ts +1 -1
  73. package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +6 -5
  74. package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
  75. package/dist/cjs/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
  76. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
  77. package/dist/cjs/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
  78. package/dist/cjs/types/src/consts/AppConsts.d.ts +3 -0
  79. package/dist/cjs/types/src/contexts/InvoiceQuoteContext.d.ts +2 -0
  80. package/dist/cjs/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
  81. package/dist/cjs/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
  82. package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +5 -1
  83. package/dist/cjs/types/src/types/PriceList.d.ts +1 -0
  84. package/dist/cjs/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
  85. package/dist/cjs/types/src/utils/chargeUtils.d.ts +10 -5
  86. package/dist/cjs/types/src/utils/couponUtils.d.ts +2 -1
  87. package/dist/cjs/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
  88. package/dist/cjs/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
  89. package/dist/cjs/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
  90. package/dist/cjs/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
  91. package/dist/cjs/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
  92. package/dist/cjs/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
  93. package/dist/cjs/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
  94. package/dist/cjs/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
  95. package/dist/cjs/types/src/utils/pricePickerUtils.d.ts +1 -1
  96. package/dist/esm/index.js +3010 -2100
  97. package/dist/esm/types/node_modules/@reduxjs/toolkit/dist/uncheckedindexed.d.ts +5 -0
  98. package/dist/esm/types/src/UI/Tooltip.d.ts +2 -0
  99. package/dist/esm/types/src/UI/TruncatedText/TruncatedText.d.ts +4 -0
  100. package/dist/esm/types/src/UI/TruncatedText/hooks/useIsTextTruncated.d.ts +3 -0
  101. package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +3 -2
  102. package/dist/esm/types/src/components/{BunnyProvider.d.ts → BunnyProvider/BunnyProvider.d.ts} +4 -1
  103. package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +13 -0
  104. package/dist/esm/types/src/components/Checkout/Checkout.d.ts +2 -1
  105. package/dist/esm/types/src/components/Checkout/QuoteCheckout.d.ts +3 -1
  106. package/dist/esm/types/src/components/Checkout/QuoteIsLoadingIndicator.d.ts +1 -0
  107. package/dist/esm/types/src/components/Invoice/Invoice.d.ts +3 -1
  108. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +12 -3
  109. package/dist/esm/types/src/components/PaymentForm/context/PaymentProvider.d.ts +9 -2
  110. package/dist/esm/types/src/components/PaymentForm/fragments/PaymentForm_PaymentMethodsFragment.d.ts +3 -0
  111. package/dist/esm/types/src/components/PaymentForm/hooks/useHandlePayment.d.ts +2 -1
  112. package/dist/esm/types/src/components/PaymentForm/hooks/usePayableCurrency.d.ts +2 -1
  113. package/dist/esm/types/src/components/PaymentForm/hooks/useRemovePaymentMethod.d.ts +4 -1
  114. package/dist/esm/types/src/components/Quote/Quote.d.ts +3 -1
  115. package/dist/{cjs/types/src/components/Quote → esm/types/src/components/Quote/components}/AcceptQuoteModal.d.ts +3 -3
  116. package/dist/esm/types/src/components/Quote/components/NoSigningPluginsForm.d.ts +17 -0
  117. package/dist/esm/types/src/components/Quote/{PaymentHoldModal.d.ts → components/PaymentHoldModal.d.ts} +5 -1
  118. package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +2 -1
  119. package/dist/esm/types/src/components/QuoteProvider/context/QuoteContext.d.ts +1 -0
  120. package/dist/esm/types/src/components/QuoteProvider/context/quantityEditableChargesContext.d.ts +32 -0
  121. package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +3 -0
  122. package/dist/esm/types/src/components/QuoteProvider/hooks/useFeatureQuantities.d.ts +4 -4
  123. package/dist/esm/types/src/components/QuoteProvider/hooks/useIsFetchingQuote.d.ts +4 -0
  124. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuantityEditableCharges.d.ts +70 -0
  125. package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteQuantities.d.ts +28 -4
  126. package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +37 -0
  127. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeCreate.d.ts +23 -0
  128. package/dist/esm/types/src/components/QuoteProvider/mutations/quoteChargeUpdate.d.ts +12 -0
  129. package/dist/esm/types/src/components/QuoteProvider/quoteMutationKeys.d.ts +20 -0
  130. package/dist/esm/types/src/components/Signup/CheckoutSummary.d.ts +41 -5
  131. package/dist/esm/types/src/components/Signup/PaymentForms.d.ts +1 -1
  132. package/dist/esm/types/src/components/Signup/PriceListDisplay.d.ts +18 -4
  133. package/dist/esm/types/src/components/Signup/Signup.d.ts +0 -1
  134. package/dist/esm/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +14 -0
  135. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +17 -0
  136. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +17 -0
  137. package/dist/esm/types/src/components/Signup/mutations/accountSignup.d.ts +58 -0
  138. package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +31 -0
  139. package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/mutations/quoteRecalculateTaxes.d.ts +5 -1
  140. package/dist/{cjs/types/src/graphql → esm/types/src/components/Signup}/queries/getPriceList.d.ts +5 -2
  141. package/dist/esm/types/src/components/Signup/queries/getQuote.d.ts +10 -0
  142. package/dist/esm/types/src/components/Subscriptions/Subscriptions.d.ts +4 -1
  143. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/CheckoutBarInput.d.ts +21 -0
  144. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput/hooks/useChargeCRUD.d.ts +31 -0
  145. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +8 -3
  146. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/PlanPickerCheckoutBar.d.ts +9 -14
  147. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/fragments/PlanPickerCheckoutBar_QuoteFragment.d.ts +20 -0
  148. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonRow.d.ts +0 -3
  149. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/featureAddons/FeatureAddonsList.d.ts +2 -0
  150. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +2 -17
  151. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/util.d.ts +1 -0
  152. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerMobile/PriceListCardMobile.d.ts +3 -5
  153. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/BillingPeriodDescription.d.ts +12 -0
  154. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/PriceListCardPriceDescription.d.ts +13 -6
  155. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCard.d.ts +1 -1
  156. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardDescription.d.ts +3 -2
  157. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/priceListCardUtils.d.ts +0 -4
  158. package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.d.ts +10 -4
  159. package/dist/esm/types/src/components/Subscriptions/Upgrade/contexts/DefaultBillingPeriodContext.d.ts +4 -0
  160. package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +12 -0
  161. package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +6 -0
  162. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/QuantityDrawer.d.ts +2 -3
  163. package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/context/quoteRecalculateTaxesContext.d.ts +4 -1
  164. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +2 -0
  165. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -0
  166. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +61 -0
  167. package/dist/esm/types/src/components/index.d.ts +1 -1
  168. package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +6 -5
  169. package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +2 -1
  170. package/dist/esm/types/src/components/priceListPricing/components/PriceTierPrice.d.ts +10 -3
  171. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelDescription.d.ts +1 -1
  172. package/dist/esm/types/src/components/priceListPricing/utils/getPricingModelTitle.d.ts +1 -1
  173. package/dist/esm/types/src/consts/AppConsts.d.ts +3 -0
  174. package/dist/esm/types/src/contexts/InvoiceQuoteContext.d.ts +2 -0
  175. package/dist/esm/types/src/contexts/onPaymentMethodRemoved.d.ts +5 -0
  176. package/dist/esm/types/src/contexts/onPaymentMethodSaved.d.ts +5 -0
  177. package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +5 -1
  178. package/dist/esm/types/src/types/PriceList.d.ts +1 -0
  179. package/dist/esm/types/src/types/frontendTypes/ComponentJSON.d.ts +1 -1
  180. package/dist/esm/types/src/utils/chargeUtils.d.ts +10 -5
  181. package/dist/esm/types/src/utils/couponUtils.d.ts +2 -1
  182. package/dist/esm/types/src/utils/htmlUtils/isEmptyHTML.d.ts +5 -0
  183. package/dist/esm/types/src/utils/htmlUtils/removeHTMLTags.d.ts +4 -0
  184. package/dist/esm/types/src/utils/priceListChargeUtils/filterDeprecatedCharges.d.ts +11 -0
  185. package/dist/esm/types/src/utils/priceListChargeUtils/priceListChargePriceDescription.d.ts +13 -0
  186. package/dist/esm/types/src/utils/priceListUtils/getActiveCharges.d.ts +10 -0
  187. package/dist/esm/types/src/utils/priceListUtils/getPrice.d.ts +9 -0
  188. package/dist/esm/types/src/utils/priceListUtils/getPricingUnit.d.ts +16 -0
  189. package/dist/esm/types/src/utils/priceListUtils/priceDescription.d.ts +11 -4
  190. package/dist/esm/types/src/utils/pricePickerUtils.d.ts +1 -1
  191. package/dist/index.d.ts +53 -13
  192. package/package.json +17 -17
  193. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
  194. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
  195. package/dist/cjs/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  196. package/dist/cjs/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  197. package/dist/cjs/types/src/graphql/queries/getQuote.d.ts +0 -36
  198. package/dist/cjs/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
  199. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutBarInput.d.ts +0 -8
  200. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceDescription/utils/hasMultipleRecurringCharges.d.ts +0 -12
  201. package/dist/esm/types/src/graphql/mutations/accountSignup.d.ts +0 -11
  202. package/dist/esm/types/src/graphql/mutations/quoteAccountSignup.d.ts +0 -15
  203. package/dist/esm/types/src/graphql/queries/getQuote.d.ts +0 -36
  204. package/dist/esm/types/src/utils/priceListUtils/doesPriceListHaveFlatFeeCharges.d.ts +0 -12
  205. /package/dist/cjs/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
  206. /package/dist/cjs/types/src/{hooks/quotes → components/Quote/hooks}/useSendAcceptQuote.d.ts +0 -0
  207. /package/dist/cjs/types/src/{hooks/quotes → components/Quote/hooks}/useSigningComplete.d.ts +0 -0
  208. /package/dist/esm/types/src/{hooks → components/BunnyProvider/hooks}/useCreateQueryClient.d.ts +0 -0
  209. /package/dist/esm/types/src/{hooks/quotes → components/Quote/hooks}/useSendAcceptQuote.d.ts +0 -0
  210. /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,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;
@@ -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,6 +1,8 @@
1
1
  import FormattedInvoice from '@/types/FormattedInvoice';
2
2
  import Invoice from '@/types/Invoice';
3
- import { FragmentOf } from 'gql.tada';
3
+ import { FragmentOf, ResultOf } from 'gql.tada';
4
+ import { PaymentForm_PaymentMethodsFragment } from './fragments/PaymentForm_PaymentMethodsFragment';
5
+ type PaymentMethodFragment = ResultOf<typeof PaymentForm_PaymentMethodsFragment>;
4
6
  export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentNode<{
5
7
  id: string | null;
6
8
  currencyId: string;
@@ -12,13 +14,18 @@ export declare const PaymentForm_QuoteFragment: import("gql.tada").TadaDocumentN
12
14
  on: "Quote";
13
15
  masked: true;
14
16
  }>;
15
- export declare function PaymentForm({ invoice, quote: maskedQuote, onPaymentSuccess, onPaymentHoldSuccess, accountId, onSavePaymentMethod, onRemovePaymentMethod, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, }: {
17
+ export declare function PaymentForm({ currencyId: accountCurrencyId, invoice, quote: maskedQuote, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, overrideToken, customCheckoutFunction, paymentHoldOptions, disablePayButton, }: {
18
+ currencyId?: string;
16
19
  invoice?: FormattedInvoice | Invoice;
17
20
  quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
18
21
  onPaymentSuccess?: (response: any) => void;
19
22
  onPaymentHoldSuccess?: (response: any) => void;
23
+ /**
24
+ * If provided, the payment hold will only go through if this condition returns true.
25
+ */
26
+ paymentHoldPrecondition?: () => boolean | Promise<boolean>;
20
27
  onSavePaymentMethod?: (response: any) => void;
21
- onRemovePaymentMethod?: () => void;
28
+ onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
22
29
  onSetDefaultPaymentMethod?: () => void;
23
30
  accountId?: string;
24
31
  overrideToken?: string;
@@ -27,4 +34,6 @@ export declare function PaymentForm({ invoice, quote: maskedQuote, onPaymentSucc
27
34
  payToAccept?: boolean;
28
35
  amountToHold?: number;
29
36
  };
37
+ disablePayButton?: boolean;
30
38
  }): import("react/jsx-runtime").JSX.Element | null;
39
+ export {};
@@ -1,6 +1,7 @@
1
1
  import FormattedInvoice from '@/types/FormattedInvoice';
2
2
  import Invoice from '@/types/Invoice';
3
3
  import { FragmentOf } from 'gql.tada';
4
+ import { ReactNode } from 'react';
4
5
  import { PaymentType } from '../types/PaymentType';
5
6
  declare const useFormattedAmountDue: () => string | undefined;
6
7
  declare const usePaymentType: () => PaymentType | undefined;
@@ -13,7 +14,12 @@ declare const useHandlePaymentFormSubmit: () => (demoPayCardDetails?: {
13
14
  declare const useIsSaving: () => boolean | undefined;
14
15
  declare const useIsPaid: () => boolean | undefined;
15
16
  declare const useAccountId: () => string | undefined;
16
- export { useAccountId, useFormattedAmountDue, useHandlePaymentFormSubmit, useIsPaid, useIsPaying, useIsSaving, usePaymentType, };
17
+ declare const IsPayButtonDisabledProvider: ({ value, children }: {
18
+ value: boolean | undefined;
19
+ children?: ReactNode;
20
+ }) => import("react/jsx-runtime").JSX.Element, useIsPayButtonDisabled: () => boolean | undefined;
21
+ export { useAccountId, useFormattedAmountDue, useHandlePaymentFormSubmit, useIsPaid, useIsPaying, useIsSaving, usePaymentType, useIsPayButtonDisabled, };
22
+ export { IsPayButtonDisabledProvider };
17
23
  export declare const PaymentProvider_QuoteFragment: import("gql.tada").TadaDocumentNode<{
18
24
  id: string | null;
19
25
  [$tada.fragmentRefs]: {
@@ -24,13 +30,14 @@ export declare const PaymentProvider_QuoteFragment: import("gql.tada").TadaDocum
24
30
  on: "Quote";
25
31
  masked: true;
26
32
  }>;
27
- export declare function PaymentProvider({ children, accountId, quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldOptions, onSavePaymentMethod, }: {
33
+ export declare function PaymentProvider({ children, accountId, quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, paymentHoldOptions, onSavePaymentMethod, }: {
28
34
  children: React.ReactNode;
29
35
  accountId?: string;
30
36
  quote: FragmentOf<typeof PaymentProvider_QuoteFragment> | undefined;
31
37
  invoice: FormattedInvoice | Invoice | undefined;
32
38
  onPaymentSuccess?: (response: any) => void;
33
39
  onPaymentHoldSuccess?: (response: any) => void;
40
+ paymentHoldPrecondition?: () => boolean | Promise<boolean>;
34
41
  paymentHoldOptions: {
35
42
  payToAccept?: boolean;
36
43
  amountToHold?: number;
@@ -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";
@@ -15,11 +15,12 @@ export declare const useHandlePayment_QuoteFragment: import("gql.tada").TadaDocu
15
15
  on: "Quote";
16
16
  masked: true;
17
17
  }>;
18
- declare const useHandlePayment: ({ quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, plugin, paymentHoldOptions, accountId, }: {
18
+ declare const useHandlePayment: ({ quote: maskedQuote, invoice, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, plugin, paymentHoldOptions, accountId, }: {
19
19
  quote?: FragmentOf<typeof useHandlePayment_QuoteFragment>;
20
20
  invoice?: FormattedInvoice | Invoice;
21
21
  onPaymentSuccess?: (response: any) => void;
22
22
  onPaymentHoldSuccess?: (response: any) => void;
23
+ paymentHoldPrecondition?: () => boolean | Promise<boolean>;
23
24
  plugin: PluginData | undefined;
24
25
  paymentHoldOptions: {
25
26
  payToAccept?: boolean;
@@ -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,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;
@@ -2,6 +2,8 @@ import { InvoiceQuoteContextProps } from '../../contexts/InvoiceQuoteContext';
2
2
  export declare const MarkupContainer: any;
3
3
  type QuoteProps = InvoiceQuoteContextProps & {
4
4
  onQuoteAccepted?: () => void;
5
+ onQuoteUnavailableError?: () => void;
6
+ suppressQuoteUnavailableErrorNotification?: boolean;
5
7
  };
6
- export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
8
+ export default function Quote({ id, invoiceQuoteViewComponent, onInvoiceDownloadError, onPaymentSuccess, shadow, className, hideDownloadButton, onQuoteLoaded, onQuoteAccepted, onQuoteUnavailableError, suppressQuoteUnavailableErrorNotification, }: QuoteProps): import("react/jsx-runtime").JSX.Element;
7
9
  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";
@@ -0,0 +1,17 @@
1
+ import { FormInstance } from 'antd';
2
+ import { FragmentOf } from 'gql.tada';
3
+ export declare const NoSigningPluginsForm_FormattedQuoteFragment: import("gql.tada").TadaDocumentNode<{
4
+ poNumberRequired: boolean | null;
5
+ taxNumberRequired: boolean | null;
6
+ taxNumberLabel: string | null;
7
+ }, {}, {
8
+ fragment: "NoSigningPluginsForm_FormattedQuoteFragment";
9
+ on: "FormattedQuote";
10
+ masked: true;
11
+ }>;
12
+ declare function NoSigningPluginsForm({ isVisible, formattedQuote: maskedFormattedQuote, form, }: {
13
+ isVisible: boolean;
14
+ formattedQuote: FragmentOf<typeof NoSigningPluginsForm_FormattedQuoteFragment>;
15
+ form: FormInstance;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ export default NoSigningPluginsForm;
@@ -8,14 +8,18 @@ export declare const PaymentHoldModal_FormattedQuoteFragment: import("gql.tada")
8
8
  };
9
9
  currency: string | null;
10
10
  amount: number;
11
+ [$tada.fragmentRefs]: {
12
+ NoSigningPluginsForm_FormattedQuoteFragment: "FormattedQuote";
13
+ };
11
14
  }, {}, {
12
15
  fragment: "PaymentHoldModal_FormattedQuoteFragment";
13
16
  on: "FormattedQuote";
14
17
  masked: true;
15
18
  }>;
16
- declare const PaymentHoldModal: ({ visible, setVisible, formattedQuote: maskedFormattedQuote, }: {
19
+ declare const PaymentHoldModal: ({ visible, setVisible, formattedQuote: maskedFormattedQuote, sendAccept, }: {
17
20
  visible: boolean;
18
21
  setVisible: (visible: boolean) => void;
19
22
  formattedQuote: FragmentOf<typeof PaymentHoldModal_FormattedQuoteFragment>;
23
+ sendAccept: (changedFields: any) => void;
20
24
  }) => import("react/jsx-runtime").JSX.Element;
21
25
  export default PaymentHoldModal;
@@ -11,7 +11,7 @@ export declare const QuoteButtons_FormattedQuoteFragment: import("gql.tada").Tad
11
11
  on: "FormattedQuote";
12
12
  masked: true;
13
13
  }>;
14
- export declare function QuoteButtons({ isAccepted, formattedQuote: maskedFormattedQuote, isMobile, hideDownloadButton, id, isAccepting, handleClickAccept, setPaymentHoldModalVisible, shouldDoPaymentHold, paymentHoldCompleted, paymentHold, }: {
14
+ export declare function QuoteButtons({ isAccepted, formattedQuote: maskedFormattedQuote, isMobile, hideDownloadButton, id, isAccepting, handleClickAccept, setPaymentHoldModalVisible, shouldDoPaymentHold, paymentHoldCompleted, paymentHold, isSendAcceptPending, }: {
15
15
  isAccepted: boolean;
16
16
  formattedQuote: FragmentOf<typeof QuoteButtons_FormattedQuoteFragment>;
17
17
  isMobile: boolean;
@@ -23,4 +23,5 @@ export declare function QuoteButtons({ isAccepted, formattedQuote: maskedFormatt
23
23
  shouldDoPaymentHold: boolean;
24
24
  paymentHoldCompleted: boolean;
25
25
  paymentHold: PaymentHold | undefined;
26
+ isSendAcceptPending: boolean;
26
27
  }): import("react/jsx-runtime").JSX.Element;
@@ -8,6 +8,7 @@ export type QuoteContextValues = {
8
8
  isAddonPlanLoading: boolean;
9
9
  isFeatureAddonsLoading: boolean;
10
10
  isUpdatingQuote: boolean;
11
+ isRecalculatingTaxes: boolean;
11
12
  setIsAddonPlanLoading: React.Dispatch<React.SetStateAction<boolean>>;
12
13
  addFeatureAddonLoading: (featureAddonId: string) => void;
13
14
  removeFeatureAddonLoading: (featureAddonId: string) => void;
@@ -0,0 +1,32 @@
1
+ export declare const QuantityEditableChargesProvider: ({ value, children }: {
2
+ value: {
3
+ feature: {
4
+ id: string;
5
+ } | null;
6
+ deprecated: boolean | null;
7
+ id: string;
8
+ featureAddon: boolean | null;
9
+ [$tada.fragmentRefs]: {
10
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
11
+ } & {
12
+ PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
13
+ } & {
14
+ useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
15
+ };
16
+ }[] | undefined;
17
+ children?: import("react").ReactNode;
18
+ }) => import("react/jsx-runtime").JSX.Element, useQuantityEditableChargesContext: () => {
19
+ feature: {
20
+ id: string;
21
+ } | null;
22
+ deprecated: boolean | null;
23
+ id: string;
24
+ featureAddon: boolean | null;
25
+ [$tada.fragmentRefs]: {
26
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
27
+ } & {
28
+ PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
29
+ } & {
30
+ useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
31
+ };
32
+ }[] | undefined;
@@ -29,6 +29,9 @@ export declare const QuoteContext_QuoteFragment: import("gql.tada").TadaDocument
29
29
  quantityMin: number | null;
30
30
  quantityMax: number | null;
31
31
  selfServiceQuantity: boolean | null;
32
+ [$tada.fragmentRefs]: {
33
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
34
+ };
32
35
  } | null;
33
36
  feature: {
34
37
  id: string;
@@ -1,12 +1,12 @@
1
1
  export type FeatureQuantitiesDict = Record<string, number | undefined>;
2
2
  /**
3
- * Hook to manage feature quantities using a dictionary keyed by feature ID
4
- * This tracks quantities for each unique feature.
3
+ * Hook to manage feature quantities per (featureId, priceListChargeId) pair.
4
+ * Supports different quantities for different price list charges that share a feature.
5
5
  */
6
6
  export declare function useFeatureQuantities({ onFeatureQuantitiesChanged, }: {
7
7
  onFeatureQuantitiesChanged?: (featureQuantities: FeatureQuantitiesDict) => void;
8
8
  }): {
9
9
  featureQuantities: FeatureQuantitiesDict;
10
- getFeatureQuantity: (featureId: string, featureQuantities: FeatureQuantitiesDict) => number | undefined;
11
- onUpdateFeatureQuantity: (featureId: string, quantity: number) => void;
10
+ getFeatureQuantity: (featureId: string, priceListChargeId: string, featureQuantitiesSnapshot?: FeatureQuantitiesDict) => number | undefined;
11
+ onUpdateFeatureQuantity: (featureId: string, priceListChargeId: string, quantity: number) => void;
12
12
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Returns whether the editing quote query for the given quote ID is currently fetching.
3
+ */
4
+ export declare function useIsFetchingQuote(quoteId: string | undefined): boolean;
@@ -0,0 +1,70 @@
1
+ import { FragmentOf, ResultOf } from 'gql.tada';
2
+ import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
3
+ export declare const useQuantityEditableCharges_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
4
+ id: string;
5
+ currentCharges: {
6
+ quantity: number | null;
7
+ priceListCharge: {
8
+ id: string;
9
+ } | null;
10
+ }[] | null;
11
+ }, {}, {
12
+ fragment: "useQuantityEditableCharges_SubscriptionFragment";
13
+ on: "Subscription";
14
+ masked: true;
15
+ }>;
16
+ export declare const useQuantityEditableCharges_PriceListFragment: import("gql.tada").TadaDocumentNode<{
17
+ id: string;
18
+ charges: {
19
+ feature: {
20
+ id: string;
21
+ } | null;
22
+ deprecated: boolean | null;
23
+ id: string;
24
+ featureAddon: boolean | null;
25
+ [$tada.fragmentRefs]: {
26
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
27
+ } & {
28
+ PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
29
+ } & {
30
+ useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
31
+ };
32
+ }[] | null;
33
+ [$tada.fragmentRefs]: {
34
+ useSelectedPriceListQuoteChange_PriceListFragment: "PriceList";
35
+ };
36
+ }, {}, {
37
+ fragment: "useQuantityEditableCharges_PriceListFragment";
38
+ on: "PriceList";
39
+ masked: true;
40
+ }>;
41
+ /**
42
+ * Hook to provide list of pricelist charges whose quantities can be edited
43
+ */
44
+ export declare function useQuantityEditableCharges({ upgradingSubscription: maskedUpgradingSubscription, pricelist: maskedPricelist, quote }: {
45
+ upgradingSubscription: FragmentOf<typeof useQuantityEditableCharges_SubscriptionFragment> | undefined;
46
+ pricelist: FragmentOf<typeof useQuantityEditableCharges_PriceListFragment> | null;
47
+ quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
48
+ }): {
49
+ quantityEditableCharges: {
50
+ feature: {
51
+ id: string;
52
+ } | null;
53
+ deprecated: boolean | null;
54
+ id: string;
55
+ featureAddon: boolean | null;
56
+ [$tada.fragmentRefs]: {
57
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
58
+ } & {
59
+ PlanPickerCheckoutBar_PriceListChargeFragment: "PriceListCharge";
60
+ } & {
61
+ useQuoteQuantities_PriceListChargeFragment: "PriceListCharge";
62
+ };
63
+ }[] | undefined;
64
+ findSubscriptionCharge: (priceListChargeId: string) => {
65
+ quantity: number | null;
66
+ priceListCharge: {
67
+ id: string;
68
+ } | null;
69
+ } | undefined;
70
+ };
@@ -1,11 +1,35 @@
1
1
  import PriceList from '@/types/PriceList';
2
- import { ResultOf } from 'gql.tada';
2
+ import { FragmentOf, ResultOf } from 'gql.tada';
3
3
  import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
4
- export declare const useQuoteQuantities: ({ selectedPriceList, quote, }: {
4
+ export declare const useQuoteQuantities_PriceListChargeFragment: import("gql.tada").TadaDocumentNode<{
5
+ feature: {
6
+ id: string;
7
+ } | null;
8
+ id: string;
9
+ quantityMax: number | null;
10
+ quantityMin: number | null;
11
+ selfServiceQuantity: boolean | null;
12
+ }, {}, {
13
+ fragment: "useQuoteQuantities_PriceListChargeFragment";
14
+ on: "PriceListCharge";
15
+ masked: true;
16
+ }>;
17
+ export declare const useQuoteQuantities_SubscriptionFragment: import("gql.tada").TadaDocumentNode<{
18
+ currentCharges: {
19
+ id: string | null;
20
+ quantity: number | null;
21
+ }[] | null;
22
+ }, {}, {
23
+ fragment: "useQuoteQuantities_SubscriptionFragment";
24
+ on: "Subscription";
25
+ masked: true;
26
+ }>;
27
+ export declare const useQuoteQuantities: ({ selectedPriceList, quote, quantityEditableCharges: maskedQuantityEditableCharges, }: {
5
28
  selectedPriceList: PriceList;
6
29
  quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
30
+ quantityEditableCharges: FragmentOf<typeof useQuoteQuantities_PriceListChargeFragment>[] | undefined;
7
31
  }) => {
8
32
  onChangeQuantity: (priceListChargeId: string, quantity: number) => void;
9
- getFeatureQuantity: (featureId: string) => number | undefined;
10
- isUpdatingCharges: boolean;
33
+ getFeatureQuantity: (featureId: string, chargeId: string) => number | undefined;
34
+ featureQuantities: import("./useFeatureQuantities").FeatureQuantitiesDict;
11
35
  };
@@ -0,0 +1,37 @@
1
+ import { FragmentOf, ResultOf } from 'gql.tada';
2
+ import { QuoteContext_QuoteFragment } from '../fragments/quoteFragment';
3
+ export declare const useSelectedPriceListQuoteChange_PriceListFragment: import("gql.tada").TadaDocumentNode<{
4
+ id: string;
5
+ }, {}, {
6
+ fragment: "useSelectedPriceListQuoteChange_PriceListFragment";
7
+ on: "PriceList";
8
+ masked: true;
9
+ }>;
10
+ export declare function useSelectedPriceListQuoteChange({ quote, selectedPriceList: maskedSelectedPriceList, }: {
11
+ quote: ResultOf<typeof QuoteContext_QuoteFragment> | null | undefined;
12
+ selectedPriceList: FragmentOf<typeof useSelectedPriceListQuoteChange_PriceListFragment> | null;
13
+ }): {
14
+ id: string | null;
15
+ kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE";
16
+ priceList: {
17
+ id: string;
18
+ } | null;
19
+ charges: {
20
+ priceListCharge: {
21
+ id: string;
22
+ chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
23
+ pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
24
+ quantityMin: number | null;
25
+ quantityMax: number | null;
26
+ selfServiceQuantity: boolean | null;
27
+ [$tada.fragmentRefs]: {
28
+ CanEditChargeQuantity_PriceListChargeFragment: "PriceListCharge";
29
+ };
30
+ } | null;
31
+ feature: {
32
+ id: string;
33
+ } | null;
34
+ quantity: number | null;
35
+ id: string | null;
36
+ }[];
37
+ } | undefined;
@@ -0,0 +1,23 @@
1
+ type QuoteChangeCreateChargeProps = {
2
+ apiHost: string;
3
+ price?: number;
4
+ priceListChargeId?: string;
5
+ quantity?: number;
6
+ quoteChangeId: string;
7
+ startDate: string;
8
+ subscriptionChargeId?: string;
9
+ token?: string;
10
+ };
11
+ export declare const quoteChargeCreate: ({ price, priceListChargeId, quantity, quoteChangeId, startDate, subscriptionChargeId, token, apiHost, }: QuoteChangeCreateChargeProps) => Promise<{
12
+ quoteChange: {
13
+ id: string | null;
14
+ quoteId: string;
15
+ quote: {
16
+ [$tada.fragmentRefs]: {
17
+ QuoteContext_QuoteFragment: "Quote";
18
+ };
19
+ };
20
+ };
21
+ id: string | null;
22
+ } | null | undefined>;
23
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare const quoteChargeUpdate: (quoteChargeId: string, quantity: number, apiHost: string, token?: string) => Promise<{
2
+ quoteChange: {
3
+ id: string | null;
4
+ quoteId: string;
5
+ quote: {
6
+ [$tada.fragmentRefs]: {
7
+ QuoteContext_QuoteFragment: "Quote";
8
+ };
9
+ };
10
+ };
11
+ id: string | null;
12
+ } | null | undefined>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Mutation key used by all quote-related mutations (create/update/delete quote,
3
+ * quote changes, quote charges, recalculate taxes, etc.).
4
+ * Use this when calling useMutation so that useIsQuoteMutating() can detect loading.
5
+ */
6
+ export declare const QUOTE_MUTATION_KEY: readonly ["quote"];
7
+ export declare const QUOTE_RECALCULATE_TAXES_MUTATION_KEY: readonly ["quoteRecalculateTaxes"];
8
+ /**
9
+ * Returns the number of quote-related mutations currently in progress.
10
+ * Use in any component to show loading state or disable actions while the quote is being updated.
11
+ *
12
+ * @example
13
+ * const isQuoteMutating = useIsQuoteMutating();
14
+ * <Button disabled={isQuoteMutating}>Submit</Button>
15
+ *
16
+ * @example
17
+ * const count = useIsQuoteMutating();
18
+ * const isQuoteMutating = count > 0;
19
+ */
20
+ export declare function useIsQuoteMutating(): number;